@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Proxima Nova', 'Inter', -apple-system, sans-serif;
}

body {
    background-color: #ededed;
    color: #333;
    overflow-x: hidden;
}

/* Header */
header {
    background-color: #fff159;
    height: 100px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: center;
}

.nav-bar {
    width: 100%;
    max-width: 1200px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 15px;
    height: 60px;
    /* Top part */
}

.search-input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    /* Slight round, standard ML is 2px */
    font-size: 16px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .1);
    outline: none;
    color: #333;
}

.search-input::placeholder {
    color: #bfbfbf;
}

.menu-icon,
.cart-icon {
    font-size: 20px;
    color: #333;
    opacity: 0.7;
    cursor: pointer;
}

/* Layout */
.main-container {
    max-width: 1184px;
    margin: 20px auto;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .1);
    display: flex;
    flex-wrap: wrap;
    padding-bottom: 40px;
}

/* Mobile Wrapper Fix */
.product-header-mobile {
    display: none;
    /* Hide on desktop default */
    padding: 16px 16px 0;
}

/* Desktop Columns */
.gallery-section {
    width: 700px;
    padding: 16px;
}

.product-info {
    width: 360px;
    padding: 24px 16px;
    border: 1px solid #eee;
    /* ML Style right box border */
    border-radius: 8px;
    margin: 16px;
}

/* Gallery */
.product-gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.main-image {
    max-width: 100%;
    height: 500px;
    object-fit: contain;
    cursor: zoom-in;
}

.gallery-counter {
    display: none;
    /* Desktop */
}

/* Thumbnails */
.thumbnails-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 16px;
}

.thumbnail {
    width: 50px;
    height: 50px;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
}

.thumbnail:hover {
    border-color: #3483fa;
    border-width: 2px;
}


/* Product Info Right Column */
.top-info {
    font-size: 14px;
    color: rgba(0, 0, 0, .55);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

.title-main {
    font-size: 16px;
    font-weight: 400;
    /* Regular */
    line-height: 1.3;
    color: rgba(0, 0, 0, .9);
    margin-bottom: 12px;
}

.badge-recommended {
    background-color: #000;
    /* Black */
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    /* Regular */
    padding: 3px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    font-family: 'Proxima Nova', -apple-system, sans-serif;
}

/* UI Refinements Round 3 Overrides */

/* 2. Rating Score */
.rating-big-number {
    font-size: 48px;
    font-weight: 800;
    /* Extrabold */
    color: #3483fa;
    /* Blue */
}

/* 4. Review Buttons Polish */
.btn-useful {
    /* Assuming btn-useful exists, check HTML */
    background-color: #fff;
    /* or light gray */
    border: 1px solid #ddd;
    border-radius: 16px;
    /* Pill */
    padding: 6px 12px;
    font-size: 14px;
    color: #3483fa;
    font-weight: 600;
    cursor: pointer;
    margin-right: 8px;
}

.btn-filter {
    /* If filter button exists, style similarly */
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    color: #3483fa;
    font-weight: 600;
    cursor: pointer;
}

/* Prices */
.price-container {
    margin-bottom: 24px;
}

.old-price {
    font-size: 16px;
    color: rgba(0, 0, 0, .55);
    text-decoration: line-through;
}

.current-price-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.current-price {
    font-size: 36px;
    font-weight: 300;
    color: rgba(0, 0, 0, .9);
}

.currency {
    font-size: 36px;
    margin-right: 2px;
}

.cents {
    font-size: 18px;
    vertical-align: top;
    margin-top: 5px;
    display: inline-block;
}

.discount-text {
    font-size: 18px;
    color: #00a650;
    font-weight: 400;
}

.installments {
    font-size: 18px;
    /* Bigger installments like reference */
    color: rgba(0, 0, 0, .9);
    margin-top: 8px;
}

.installment-highlight {
    color: #00a650;
    font-weight: 500;
}

.payment-methods-link {
    font-size: 14px;
    color: #3483fa;
    text-decoration: none;
    display: block;
    margin-top: 8px;
}

/* Shipping */
.shipping-section {
    margin-bottom: 32px;
}

.badge-shipping {
    background-color: #00a650;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 4px;
    border-radius: 3px;
    margin-bottom: 8px;
    display: inline-block;
}

.shipping-item {
    margin-bottom: 16px;
}

.shipping-text-line {
    font-size: 16px;
    color: rgba(0, 0, 0, .9);
}

.green-highlight,
.green-text {
    color: #00a650;
    font-weight: 600;
}

.time-bold,
.date-bold {
    font-weight: 600;
}

.shipping-subtext {
    font-size: 14px;
    color: rgba(0, 0, 0, .55);
    margin-top: 2px;
}

.more-details-link {
    font-size: 14px;
    color: #3483fa;
    text-decoration: none;
}

/* Stock & Actions */
.stock-section {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 24px;
}

.full-badge {
    color: #00a650;
    font-style: italic;
    font-weight: 900;
}

.quantity-selector {
    /* Basic styling for quantity trigger */
    display: flex;
    background: #f5f5f5;
    /* Light gray from screenshot? Or transparent? */
    /* ML actually uses a dropdown text button */
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.btn {
    width: 100%;
    height: 48px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background-color .2s;
    margin-bottom: 12px;
}

.btn-primary {
    background-color: #3483fa;
    color: #fff;
}

.btn-primary:hover {
    background-color: #2968c8;
}

.btn-secondary {
    background-color: rgba(65, 137, 230, .15);
    color: #3483fa;
}

.btn-secondary:hover {
    background-color: rgba(65, 137, 230, .2);
}


/* Reviews & Content */
.section-title {
    width: 100%;
    font-size: 24px;
    font-weight: 400;
    margin: 40px 16px 24px;
    border-top: 1px solid #eee;
    padding-top: 40px;
}

.title-main {
    font-size: 16px;
    font-weight: 400;
    /* Regular */
    line-height: 1.3;
    color: rgba(0, 0, 0, .9);
    margin-bottom: 12px;
}

/* ... */

.description {
    padding-left: 16px;
    padding-right: 16px;
    font-size: 14px;
    /* Smaller as requested */
    color: #666;
    line-height: 1.5;
    width: 100%;
    max-width: 800px;
}

.reviews-section {
    width: 100%;
    padding: 0;
    /* Align title correctly (it has its own padding) */
}

.reviews-content {
    padding: 16px;
    /* Restore padding for content */
}

/* Flex Mobile logic */
@media (max-width: 900px) {

    /* Flex Mobile logic */
    .main-container {
        flex-direction: column;
        width: 100%;
        overflow-x: hidden;
    }

    .gallery-section,
    .product-info,
    .description,
    .section-title,
    .reviews-section {
        width: 100% !important;
        margin: 0;
        box-sizing: border-box;
    }

    .main-image {
        height: auto;
        max-height: 400px;
        width: 100%;
    }

    .product-header-mobile {
        display: block;
        /* Show Title on top on mobile */
        width: 100%;
        box-sizing: border-box;
    }
}

/* UI Polish */
.payment-promo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 16px;
    color: #00a650;
}

.seller-info {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #eee;
    font-size: 14px;
    color: #666;
}

.seller-info strong {
    color: #333;
    font-weight: 600;
}

.specs-section {
    width: 100%;
    padding: 16px;
    margin-top: 20px;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    font-size: 14px;
}

.specs-table tr:nth-child(odd) {
    background-color: #f5f5f5;
}

.specs-table td {
    padding: 12px;
    color: #333;
}

.specs-table td:first-child {
    font-weight: 600;
    width: 40%;
}

/* Button & Price Polish */
.current-price {
    font-size: 40px;
    /* Larger */
}

.btn {
    border-radius: 8px;
    /* More rounded */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.quantity-selector {
    border: 1px solid #ddd;
    background: #fff;
}

/* Related Products & Reviews Scrollers */
.related-products-scroller,
.photos-scroller {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 10px 0;
    margin-bottom: 20px;
    /* Hide scrollbar for cleaner look */
    scrollbar-width: thin;
}

.related-products-scroller::-webkit-scrollbar,
.photos-scroller::-webkit-scrollbar {
    height: 6px;
}

.related-products-scroller::-webkit-scrollbar-thumb,
.photos-scroller::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
}

.related-product-card {
    min-width: 180px;
    width: 180px;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 10px;
    background: #fff;
    flex-shrink: 0;
    transition: box-shadow 0.2s;
}

.related-product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.related-image-container {
    width: 100%;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.related-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.related-info {
    font-size: 14px;
}

.related-title {
    color: #333;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    height: 38px;
    /* approx 2 lines */
}

.related-old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 12px;
}

.related-price {
    font-size: 18px;
    color: #333;
    font-weight: 400;
}

.related-shipping,
.full-text {
    font-size: 11px;
    font-weight: 600;
    color: #00a650;
    margin-right: 5px;
}

/* Review Photos Scroller */
.photos-scroller img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
    cursor: pointer;
}

border-color: #3483fa;
}

/* Payment Methods Fix */
.payment-promo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 16px;
    color: #00a650;
}

.payment-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.payment-icon-box {
    width: 60px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee;
    border-radius: 4px;
    background: #fff;
}

.payment-icon-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Reviews Layout Fix */
.rating-overview-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.rating-big-number {
    font-size: 48px;
    font-weight: 300;
    color: #333;
}

.rating-stars-row {
    display: flex;
    flex-direction: column;
}

.stars-blue,
.stars-blue-small {
    color: #3483fa;
    font-size: 14px;
}

.stars-blue-small {
    font-size: 12px;
    /* Smaller for attributes */
}

.rating-count {
    color: #999;
    font-size: 14px;
}

.rating-bars-wrapper {
    margin-bottom: 32px;
}

.rating-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 12px;
    color: #999;
}

.bar-container {
    flex: 1;
    height: 4px;
    background: #eee;
    border-radius: 2px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: #3483fa;
    /* Or gray depending on design */
    border-radius: 2px;
}

.count-tiny {
    width: 30px;
    text-align: right;
}

/* Attribute Ratings */
.attribute-ratings {
    margin-bottom: 32px;
}

.attr-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
    color: #666;
}

.review-item {
    padding: 24px 0;
    border-bottom: 1px solid #eee;
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.review-date {
    font-size: 12px;
    color: #999;
}

.review-text {
    font-size: 14px;
    color: #333;
    line-height: 1.4;
    margin-bottom: 12px;
}

.ai-summary-box {
    background: #f5f5f5;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #333;
}

.ai-footer {
    margin-top: 10px;
    font-size: 12px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Review Images Fixed */
.review-image-thumbnail img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 10px;
}

/* UI Polish Round 2 Overrides & Additions */

/* 1. Global Font */
body,
button,
input {
    font-family: 'Proxima Nova', -apple-system, sans-serif !important;
}

/* 2. Header Mobile Polish */
@media (max-width: 900px) {
    header {
        height: auto;
        /* Allow auto height */
        min-height: 60px;
        padding-bottom: 10px;
        align-items: flex-start;
        /* Align search top */
    }

    .nav-bar {
        height: auto;
        padding-top: 10px;
    }

    .search-input {
        height: 38px;
        /* Slightly smaller on mobile */
        border-radius: 2px;
        /* ML style */
        box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .1);
    }
}

/* 3. Quantity Selector Fix & Style */
.quantity-selector {
    position: relative;
    /* For dropdown positioning */
    border: 1px solid #ddd;
    /* Basic border */
    border-radius: 6px;
    background: #f5f5f5;
    /* Light bg */
    padding: 0 12px;
    height: 48px;
    /* Match button height */
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 16px;
}

/* The actual dropdown list */
.quantity-dropdown {
    display: none;
    /* Hidden by default */
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
    margin-top: 4px;
    overflow: hidden;
}

.quantity-dropdown.show {
    display: block;
}

.quantity-option {
    padding: 10px 12px;
    cursor: pointer;
    transition: background .1s;
}

.quantity-option:hover {
    background: #f0f0f0;
    color: #3483fa;
}

/* 4. Alignment Fixes (Padding) */
.section-title,
.payment-promo,
.related-title,
.description {
    padding-left: 16px;
    padding-right: 16px;
    width: 100%;
    box-sizing: border-box;
    margin-left: 0;
    margin-right: 0;
}

.section-title {
    margin-top: 30px;
    margin-bottom: 16px;
    font-size: 20px;
}

/* 5. Seller Info "Capricho" */
.seller-info {
    border-top: 1px solid #f0f0f0;
    padding: 20px 16px;
    margin-top: 24px;
    background-color: #fdfdfd;
    /* Slight bg distinction */
    border-radius: 8px;
    border: 1px solid #eee;
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background-color: #3483fa;
    /* Blue badge */
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff200;
    /* Yellow border to match header if needed, or just white border */
    border: 2px solid #fff159;
    /* Matching header background for cut-out effect */
}

.seller-status-highlight {
    color: #00a650;
    font-weight: 700;
}

color: #00a650;
font-weight: 700;
}

.seller-info-title {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.seller-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.seller-badge {
    color: #00a650;
    /* ML Green */
    font-size: 14px;
}

.seller-status-text {
    font-size: 12px;
    color: #999;
}

/* 6. Footer "Capricho" */
footer {
    background-color: #fff;
    border-top: 1px solid #eee;
    padding: 30px 16px 50px;
    /* Extra bottom padding for mobile */
    margin-top: 40px;
    text-align: center;
    font-size: 12px;
    color: #999;
}

.footer-links {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #333;
    text-decoration: none;
}

.copyright-text {
    line-height: 1.5;
}