/* Public Styles for Amazon Product Display - List Layout */

.apd-products-list-container {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #fff;
    /* Fundo branco para o conteúdo */
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.apd-products-table {
    width: 100%;
    border-collapse: collapse;
}

.apd-products-table th,
.apd-products-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.apd-products-table th {
    background-color: #f8f8f8;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    font-size: 13px;
}

.apd-products-table tbody tr:last-child td {
    border-bottom: none;
}

.apd-products-table tbody tr:hover {
    background-color: #fdfdfd;
}

.apd-list-image {
    width: 80px;
    vertical-align: middle;
}

.apd-list-image img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    /* Para manter a proporção da imagem */
    border-radius: 4px;
    border: 1px solid #eee;
    padding: 2px;
}

.apd-list-title {
    vertical-align: middle;
    font-size: 15px;
    color: #333;
}

.apd-list-title h3 {
    font-size: 16px;
    /* Título menor */
    text-align: left !important;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 5px 0;
    line-height: 1.3;
}

.apd-product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #777;
}

.apd-stars {
    font-size: 16px;
    color: #ffa500;
}

.apd-rating-text {
    font-size: 11px;
    color: #888;
}

.apd-list-price {
    vertical-align: middle;
    font-size: 16px;
    font-weight: 700;
    color: #27ae60;
    white-space: nowrap;
}

.center {
    text-align: center !important;
}

.apd-list-button {
    vertical-align: middle;
    text-align: center !important;
}

.apd-buy-button {
    width: 100%;
    display: inline-block;
    background: linear-gradient(135deg, #ff9900, #ff7700);
    color: white !important;
    text-decoration: none !important;
    padding: 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.apd-buy-button:hover {
    background: linear-gradient(135deg, #ff7700, #ff5500);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
    color: white !important;
    text-decoration: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {

    .apd-products-table,
    .apd-products-table tbody,
    .apd-products-table tr,
    .apd-products-table td,
    .apd-products-table th {
        display: block;
    }

    .apd-products-table thead {
        display: none;
    }

    .apd-products-table tr {
        margin-bottom: 15px;
        border: 1px solid #eee;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    }

    .apd-products-table td {
        border-bottom: 1px solid #eee;
        text-align: right;
        position: relative;
        padding-left: 50%;
    }

    .apd-products-table td:last-child {
        border-bottom: none;
    }

    .apd-products-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        width: calc(50% - 30px);
        text-align: left;
        font-weight: 600;
        color: #555;
    }

    .apd-list-image {
        width: 100%;
        text-align: center;
        padding: 10px 0;
        border-bottom: 1px solid #eee;
    }

    .apd-list-image img {
        width: 80px;
        height: 80px;
    }

    .apd-list-title,
    .apd-list-price,
    .apd-list-button {
        text-align: center;
        padding: 10px 15px;
    }

    .apd-list-title h3 {
        font-size: 18px;
    }

    .apd-product-rating {
        justify-content: center;
    }

    .apd-list-button {
        padding-bottom: 15px;
    }
}

@media (max-width: 480px) {

    .apd-products-table td {
        padding: 10px 15px;
        font-size: 14px;
    }

    .apd-products-table td::before {
        font-size: 12px;
    }

    .apd-buy-button {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .apd-products-list-container {
        background: #2c3e50;
        border-color: #34495e;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }

    .apd-products-table th {
        background-color: #34495e;
        color: #ecf0f1;
    }

    .apd-products-table td {
        border-bottom-color: #34495e;
        color: #ecf0f1;
    }

    .apd-products-table tbody tr:hover {
        background-color: #3a536e;
    }

    .apd-list-title h3 {
        color: #ecf0f1;
    }

    .apd-product-rating {
        color: #bdc3c7;
    }

    .apd-rating-text {
        color: #bdc3c7;
    }

    .apd-list-image img {
        border-color: #34495e;
    }
}

/* Print styles */
@media print {
    .apd-products-list-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .apd-products-table th,
    .apd-products-table td {
        border-color: #ccc;
    }

    .apd-buy-button {
        background: #333 !important;
        color: white !important;
    }
}

/* Estilos para preços de/por */
.apd-price-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.apd-old-price {
    font-size: 12px !important;
    color: #999 !important;
    text-decoration: line-through !important;
    font-weight: normal !important;
}

.apd-new-price {
    font-size: 16px;
    color: #12AF0A;
    font-weight: 700;
}

/* Estilos para botões múltiplos */
.apd-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.apd-primary-button {
    background: linear-gradient(135deg, #ff9900, #ff7700) !important;
}

.apd-primary-button:hover {
    background: linear-gradient(135deg, #ff7700, #ff5500) !important;
}

.apd-secondary-button {
    background: #FEE600;
    font-size: 12px !important;
    color: black !important;
    padding: 12px !important;
    font-weight: 700;
}

.apd-secondary-button:hover {
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3) !important;
}

/* Responsivo para botões */
@media (max-width: 768px) {
    .apd-buttons-container {
        width: 100%;
    }

    .apd-buy-button {
        width: 100%;
    }

    .apd-price-container {
        align-items: center;
    }
}

/* Dark mode para novos elementos */
@media (prefers-color-scheme: dark) {
    .apd-old-price {
        color: #7f8c8d;
    }

    .apd-new-price {
        color: #f39c12;
    }
}