/* ==========================================================================
   MercadoLibre-Style Product Detail Page
   Inspired by https://www.mercadolibre.cl/
   ========================================================================== */

/* ── Page Container ─────────────────────────────────────────── */
.ml-pdp-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ── Breadcrumbs ────────────────────────────────────────────── */
.ml-pdp-breadcrumbs {
    padding: 12px 0 8px;
    font-size: 13px;
    color: #999;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.ml-pdp-breadcrumbs a {
    color: #3483fa;
    text-decoration: none;
    transition: color .2s;
}

.ml-pdp-breadcrumbs a:hover {
    color: #1259c3;
}

.ml-pdp-breadcrumbs .ml-bc-sep {
    color: #bbb;
    font-size: 11px;
    margin: 0 2px;
}

.ml-pdp-breadcrumbs .ml-bc-current {
    color: #999;
}

/* ── Top Section (Gallery + Info) ───────────────────────────── */
.ml-pdp-top {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 16px;
    border: 1px solid #ededed;
}

@media (max-width: 991px) {
    .ml-pdp-top {
        flex-direction: column;
        padding: 16px;
        gap: 20px;
    }
}

/* ── Gallery Section ────────────────────────────────────────── */
.ml-pdp-gallery {
    flex: 0 0 50%;
    max-width: 50%;
    position: sticky;
    top: 100px;
    align-self: flex-start;
    z-index: 10;
}

@media (max-width: 991px) {
    .ml-pdp-gallery {
        flex: 1;
        max-width: 100%;
        position: relative;
        top: auto;
    }
}

/* ── Gallery Row (Thumbs Left + Main Right) ────────────────── */
.ml-pdp-gallery-row {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: flex-start;
}

/* Vertical thumbnail column */
.ml-pdp-thumb-col {
    flex: 0 0 70px;
    width: 70px;
    max-height: 480px;
    overflow: hidden;
    position: relative;
}

.ml-pdp-thumb-col .quickviewSliderThumb2 {
    height: 100%;
    max-height: 480px;
}

.ml-pdp-thumb-col .quickviewSliderThumb2 .swiper-wrapper {
    flex-direction: column;
}

.ml-pdp-thumb-col .quickviewSliderThumb2 .swiper-slide {
    width: 60px !important;
    height: 60px !important;
    flex-shrink: 0;
    border-radius: 6px;
    border: 2px solid #ededed !important;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
    overflow: hidden;
    margin-bottom: 6px;
}

.ml-pdp-thumb-col .quickviewSliderThumb2 .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ml-pdp-thumb-col .quickviewSliderThumb2 .swiper-slide-thumb-active {
    border-color: #3483fa !important;
    box-shadow: 0 0 0 1px #3483fa;
}

.ml-pdp-thumb-col .quickviewSliderThumb2 .swiper-slide:hover {
    border-color: #3483fa !important;
}

/* Navigation arrows for vertical thumbnails */
.ml-pdp-thumb-col .swiper-quickview-button-next,
.ml-pdp-thumb-col .swiper-quickview-button-prev {
    left: 50%;
    right: auto;
    transform: translateX(-50%) rotate(90deg);
    width: 24px;
    height: 24px;
    background: rgba(255,255,255,0.92);
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.ml-pdp-thumb-col .swiper-quickview-button-next::after,
.ml-pdp-thumb-col .swiper-quickview-button-prev::after {
    font-size: 10px;
    font-weight: 700;
    color: #333;
}

.ml-pdp-thumb-col .swiper-quickview-button-next {
    top: auto;
    bottom: 2px;
}

.ml-pdp-thumb-col .swiper-quickview-button-prev {
    top: 2px;
    bottom: auto;
}

/* Main image column */
.ml-pdp-main-img-col {
    flex: 1;
    min-width: 0;
    position: relative;
}

.ml-pdp-gallery .swiper-container.quickviewSlider2 {
    border: none !important;
    border-radius: 8px;
}

.ml-pdp-gallery .swiper-container.quickviewSlider2 img {
    border-radius: 8px;
}

/* Fallback for old horizontal thumb selectors — keep them in case */
.ml-pdp-gallery .quickviewSliderThumb2 .swiper-slide {
    border-radius: 4px;
    border: 1px solid #ededed !important;
    cursor: pointer;
    transition: border-color .2s;
}

.ml-pdp-gallery .quickviewSliderThumb2 .swiper-slide-thumb-active,
.ml-pdp-gallery .quickviewSliderThumb2 .swiper-slide:hover {
    border-color: #3483fa !important;
}

/* ── Mobile: thumbnails go horizontal below image ──────────── */
@media (max-width: 767px) {
    .ml-pdp-gallery-row {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .ml-pdp-thumb-col {
        flex: none;
        width: 100%;
        max-height: none;
        overflow: visible;
    }

    .ml-pdp-thumb-col .quickviewSliderThumb2 {
        max-height: none;
        height: auto;
    }

    .ml-pdp-thumb-col .quickviewSliderThumb2 .swiper-wrapper {
        flex-direction: row;
    }

    .ml-pdp-thumb-col .quickviewSliderThumb2 .swiper-slide {
        width: 56px !important;
        height: 56px !important;
        margin-bottom: 0;
        margin-right: 6px;
    }

    .ml-pdp-thumb-col .swiper-quickview-button-next,
    .ml-pdp-thumb-col .swiper-quickview-button-prev {
        transform: none;
        top: 50%;
        bottom: auto;
        left: auto;
        right: auto;
    }

    .ml-pdp-thumb-col .swiper-quickview-button-next {
        right: 0;
        transform: translateY(-50%);
    }

    .ml-pdp-thumb-col .swiper-quickview-button-prev {
        left: 0;
        transform: translateY(-50%);
    }
}

/* Discount badge on gallery */
.ml-pdp-gallery .discount-badge-wrapper {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 5;
}

.ml-pdp-gallery .discount-badge {
    background: #00a650 !important;
    border-radius: 4px;
    font-size: 13px;
    padding: 2px 10px;
    font-weight: 600;
}

/* Gallery icons (wishlist, share, product type) */
.ml-pdp-gallery .cz-product-gallery-icons {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
}

.ml-pdp-gallery .cz-product-gallery-icons > div > .btn-circle,
.ml-pdp-gallery .cz-product-gallery-icons > .btn-circle {
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.1);
}

.ml-pdp-gallery .cz-product-gallery-icons .share_dropdown .btn-circle {
    box-shadow: none;
}
.ml-pdp-gallery .cz-product-gallery-icons .share_dropdown .bg-facebook { background-color: #3b5998 !important; }
.ml-pdp-gallery .cz-product-gallery-icons .share_dropdown .bg-twitter { background-color: #1da1f2 !important; }
.ml-pdp-gallery .cz-product-gallery-icons .share_dropdown .bg-linkedin { background-color: #007bb5 !important; }
.ml-pdp-gallery .cz-product-gallery-icons .share_dropdown .bg-whatsapp { background-color: #25d366 !important; }

/* ── Product Info Section ───────────────────────────────────── */
.ml-pdp-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Condition / Sold line */
.ml-pdp-condition {
    font-size: 14px;
    color: #999;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ml-pdp-condition .ml-pdp-sold-count {
    color: #999;
}

.ml-pdp-condition .ml-pdp-separator {
    color: #ccc;
}

/* Product Title */
.ml-pdp-title {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    margin: 0 0 10px;
    letter-spacing: -0.2px;
}

/* Rating Row */
.ml-pdp-rating-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.ml-pdp-rating-row .star-rating {
    margin: 0;
}

.ml-pdp-rating-row .star-rating i {
    font-size: 14px;
}

.ml-pdp-rating-val {
    font-size: 14px;
    color: #3483fa;
    font-weight: 400;
}

.ml-pdp-rating-link {
    font-size: 14px;
    color: #3483fa !important;
    text-decoration: none !important;
}

.ml-pdp-rating-link:hover {
    text-decoration: underline !important;
}

.ml-pdp-meta-sep {
    width: 1px;
    height: 14px;
    background: #ddd;
}

.ml-pdp-meta-item {
    font-size: 13px;
    color: #999;
}

.ml-pdp-meta-item span {
    color: #333;
    font-weight: 500;
}

/* ── Flash Deal / MEGA SALE Bar ─────────────────────────────── */
.ml-pdp-flash-deal-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(135deg, var(--web-primary) 0%, var(--web-secondary) 50%, var(--web-primary) 100%);
    background-size: 200% 200%;
    animation: mlFlashBgGradient 5s ease infinite;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--web-primary-40);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes mlFlashBgGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Subtle shimmer overlay */
.ml-pdp-flash-deal-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.12) 50%,
        transparent 100%
    );
    animation: mlFlashShimmer 3s ease-in-out infinite;
}

@keyframes mlFlashShimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.ml-pdp-flash-deal-label {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.ml-pdp-flash-deal-icon {
    font-size: 18px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
    animation: mlFlashPulse 1.5s ease-in-out infinite;
    line-height: 1;
}

@keyframes mlFlashPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.85; }
}

.ml-pdp-flash-deal-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.ml-pdp-flash-deal-discount {
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    padding: 5px 14px;
    border-radius: 20px;
    white-space: nowrap;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
}

/* Mobile responsiveness */
@media (max-width: 575px) {
    .ml-pdp-flash-deal-bar {
        padding: 8px 12px;
        border-radius: 6px;
    }

    .ml-pdp-flash-deal-title {
        font-size: 13px;
    }

    .ml-pdp-flash-deal-icon {
        font-size: 15px;
    }

    .ml-pdp-flash-deal-discount {
        font-size: 11px;
        padding: 4px 10px;
    }
}

/* ── Pricing Section ────────────────────────────────────────── */
.ml-pdp-price-section {
    margin-bottom: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.ml-pdp-price-old {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    margin: 0 0 2px;
    font-weight: 400;
    letter-spacing: 0;
}

.ml-pdp-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 4px;
}

.ml-pdp-price-main {
    font-size: 36px;
    font-weight: 400;
    color: #333;
    line-height: 1.15;
    letter-spacing: -0.5px;
}

.ml-pdp-price-off {
    font-size: 16px;
    font-weight: 400;
    color: #00a650;
    white-space: nowrap;
}

/* Single price (no discount) */
.ml-pdp-price-single {
    font-size: 36px;
    font-weight: 400;
    color: #333;
    letter-spacing: -0.5px;
    margin: 0 0 4px;
    line-height: 1.15;
}

/* Installments */
.ml-pdp-installments {
    font-size: 14px;
    color: #00a650;
    margin: 6px 0 0;
    font-weight: 400;
}

.ml-pdp-installments a {
    color: #3483fa;
    text-decoration: none;
    margin-left: 4px;
    font-size: 13px;
}

.ml-pdp-installments a:hover {
    text-decoration: underline;
}

/* Free Shipping */
.ml-pdp-shipping {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #00a650;
    font-weight: 600;
    margin: 10px 0 0;
}

.ml-pdp-shipping-bolt {
    font-style: normal;
}

.ml-pdp-shipping-full {
    font-weight: 700;
    font-style: italic;
}

.ml-pdp-shipping-sub {
    font-size: 12px;
    color: #999;
    font-weight: 400;
    margin: 2px 0 0;
}

/* ── Stock Availability ─────────────────────────────────────── */
.ml-pdp-stock {
    margin: 12px 0;
    padding: 12px 0;
    border-top: 1px solid #f0f0f0;
}

.ml-pdp-stock-label {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.ml-pdp-stock-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00a650;
    display: inline-block;
    flex-shrink: 0;
}

.ml-pdp-stock-dot.out {
    background: #ff4444;
}

.ml-pdp-stock-avail {
    font-size: 13px;
    color: #999;
}

/* ── Quantity Selector ──────────────────────────────────────── */
.ml-pdp-qty-section {
    margin-bottom: 16px;
}

.ml-pdp-qty-label {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.ml-pdp-qty-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ml-pdp-qty-wrap .quantity-box {
    border: 1px solid #e0e0e0 !important;
    border-radius: 6px !important;
    overflow: hidden;
    height: 40px;
    width: 120px;
}

.ml-pdp-qty-wrap .btn-number {
    background: #f5f5f5 !important;
    border: none;
    color: #3483fa;
    font-size: 18px;
    font-weight: 600;
    transition: background .2s;
}

.ml-pdp-qty-wrap .btn-number:hover {
    background: #e8e8e8 !important;
}

.ml-pdp-qty-wrap .product-details-cart-qty {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.ml-pdp-qty-avail {
    font-size: 13px;
    color: #999;
}

/* ── Total Price ────────────────────────────────────────────── */
.ml-pdp-total {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 10px 16px;
    background: #f5f5f5;
    border-radius: 6px;
}

.ml-pdp-total-label {
    font-size: 14px;
    color: #666;
    font-weight: 400;
    white-space: nowrap;
}

.ml-pdp-total-amount {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

/* ── Action Buttons (Buy Now / Add to Cart) ─────────────────── */
.ml-pdp-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.ml-pdp-btn-buy {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    background: #3483fa;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ml-pdp-btn-buy:hover {
    background: #2968c8;
    color: #fff;
}

.ml-pdp-btn-cart {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    background: #d6eaff;
    color: #3483fa;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ml-pdp-btn-cart:hover {
    background: #c4dffc;
    color: #2968c8;
}

.ml-pdp-btn-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Wishlist + Share row */
.ml-pdp-secondary-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}

.ml-pdp-secondary-actions .btn {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    color: #3483fa;
    background: #fff;
    transition: all .2s;
}

.ml-pdp-secondary-actions .btn:hover {
    background: #f0f6ff;
    border-color: #3483fa;
}

/* ── Color & Variant Selectors ──────────────────────────────── */
.ml-pdp-variant-section {
    margin-bottom: 16px;
}

.ml-pdp-variant-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ml-pdp-variant-label strong {
    color: #333;
    font-weight: 600;
}

.ml-pdp-variant-section .checkbox-color li {
    margin: 0;
}

.ml-pdp-variant-section .checkbox-color label {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
    transition: border-color .2s;
    cursor: pointer;
}

.ml-pdp-variant-section .checkbox-color input:checked + label {
    border-color: #3483fa;
    box-shadow: 0 0 0 2px #3483fa;
}

.ml-pdp-variant-section .checkbox-alphanumeric--style-1 label {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 13px;
    transition: all .2s;
    cursor: pointer;
}

.ml-pdp-variant-section .checkbox-alphanumeric--style-1 input:checked + label {
    border-color: #3483fa;
    background: #f0f6ff;
    color: #3483fa;
    font-weight: 600;
}

/* ── Restock Request ────────────────────────────────────────── */
.ml-pdp-restock {
    margin-bottom: 16px;
}

.ml-pdp-restock .request-restock-btn {
    width: 100%;
    height: 48px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    border: 2px solid #3483fa;
    color: #3483fa;
    background: #fff;
}

.ml-pdp-restock .request-restock-btn:hover {
    background: #f0f6ff;
    color: #3483fa !important;
}

/* ── Vacation/Temp Close Alert ──────────────────────────────── */
.ml-pdp-shop-alert {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 13px;
    color: #856404;
    margin-bottom: 12px;
}


/* ==========================================================================
   Overview / Reviews Tabs
   ========================================================================== */

.ml-pdp-tabs-container {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #ededed;
    margin-bottom: 16px;
    overflow: hidden;
}

.ml-pdp-tabs-container .nav-tabs {
    border-bottom: 1px solid #ededed;
    padding: 0 24px;
    background: #fafafa;
    gap: 0;
}

.ml-pdp-tabs-container .nav-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    color: #999;
    transition: all .2s;
    background: transparent;
    margin-bottom: -1px;
}

.ml-pdp-tabs-container .nav-tabs .nav-link:hover {
    color: #3483fa;
    background: transparent;
}

.ml-pdp-tabs-container .nav-tabs .nav-link.active {
    color: #3483fa;
    border-bottom-color: #3483fa;
    background: transparent;
}

.ml-pdp-tabs-container .tab-content {
    padding: 24px;
}


/* ==========================================================================
   Right Sidebar
   ========================================================================== */

.ml-pdp-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Company Reliability */
.ml-pdp-trust-badges {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #ededed;
    overflow: hidden;
}

.ml-pdp-trust-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid #f5f5f5;
    font-size: 14px;
    color: #333;
}

.ml-pdp-trust-badge:last-child {
    border-bottom: none;
}

.ml-pdp-trust-badge img {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Seller Card */
.ml-pdp-seller-card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #ededed;
    padding: 20px;
}

.ml-pdp-seller-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.ml-pdp-seller-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #ededed;
}

.ml-pdp-seller-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.3;
}

.ml-pdp-seller-name a {
    color: inherit;
    text-decoration: none;
}

.ml-pdp-seller-name a:hover {
    color: #3483fa;
}

.ml-pdp-seller-status {
    font-size: 12px;
    color: #e74c3c;
    font-weight: 500;
}

.ml-pdp-seller-stats {
    display: flex;
    gap: 0;
    border: 1px solid #ededed;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 16px;
}

.ml-pdp-seller-stat {
    flex: 1;
    text-align: center;
    padding: 12px 8px;
    font-size: 12px;
    color: #999;
}

.ml-pdp-seller-stat:first-child {
    border-right: 1px solid #ededed;
}

.ml-pdp-seller-stat strong {
    display: block;
    font-size: 18px;
    color: #333;
    font-weight: 600;
    margin-bottom: 2px;
}

.ml-pdp-seller-chat-btn {
    width: 100%;
    height: 40px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    background: #3483fa;
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background .2s;
}

.ml-pdp-seller-chat-btn:hover {
    background: #2968c8;
    color: #fff;
}

/* More from seller */
.ml-pdp-more-from-seller {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #ededed;
    padding: 16px;
}

.ml-pdp-more-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ml-pdp-more-title a {
    font-size: 13px;
    color: #3483fa;
    text-decoration: none;
    font-weight: 400;
}

.ml-pdp-more-title a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Sidebar Video Ad Slots
   ========================================================================== */

.ml-pdp-sidebar-ads {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 16px;
}

/* Override hero-ad-slot sizing for the sidebar context */
.ml-pdp-sidebar-ads .hero-ad-slot {
    height: 240px;
    border-radius: 10px;
    min-height: 0;
}

/* Tablet: side-by-side layout */
@media (max-width: 991px) {
    .ml-pdp-sidebar-ads {
        grid-template-rows: none;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .ml-pdp-sidebar-ads .hero-ad-slot {
        height: 200px;
    }
}

/* Mobile: still 2 columns but shorter */
@media (max-width: 767px) {
    .ml-pdp-sidebar-ads {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .ml-pdp-sidebar-ads .hero-ad-slot {
        height: 160px;
        border-radius: 8px;
    }
}

/* Small mobile */
@media (max-width: 400px) {
    .ml-pdp-sidebar-ads .hero-ad-slot {
        height: 130px;
    }
}


/* ==========================================================================
   Similar Products Section
   ========================================================================== */

.ml-pdp-similar-section {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #ededed;
    padding: 24px;
    margin-bottom: 16px;
}

.ml-pdp-similar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.ml-pdp-similar-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.ml-pdp-similar-header a {
    font-size: 14px;
    color: #3483fa;
    text-decoration: none;
    font-weight: 400;
}

.ml-pdp-similar-header a:hover {
    text-decoration: underline;
}


/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 575px) {
    .ml-pdp-top {
        padding: 12px;
    }

    .ml-pdp-title {
        font-size: 18px;
    }

    .ml-pdp-price-main,
    .ml-pdp-price-single {
        font-size: 28px;
    }

    .ml-pdp-price-off {
        font-size: 14px;
    }

    .ml-pdp-btn-buy,
    .ml-pdp-btn-cart {
        height: 44px;
        font-size: 15px;
    }

    .ml-pdp-tabs-container .tab-content {
        padding: 16px;
    }

    .ml-pdp-tabs-container .nav-tabs .nav-link {
        font-size: 14px;
        padding: 12px 16px;
    }
}

@media (min-width: 576px) and (max-width: 991px) {
    .ml-pdp-price-main,
    .ml-pdp-price-single {
        font-size: 32px;
    }
}

/* Override existing card styles on product detail page */
.ml-pdp-top .card,
.ml-pdp-top .card-body {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    background: transparent !important;
}

/* Override existing __inline-23 container */
.__inline-23 .ml-pdp-container {
    max-width: 1440px;
}

/* Digital product authors */
.ml-pdp-info .digital-product-authors {
    margin-bottom: 12px;
}

.ml-pdp-info .digital-product-authors .digital-product-author-title {
    font-size: 13px;
    color: #999;
}

/* See more button in description */
.ml-pdp-tabs-container .see-more-details {
    border-color: #3483fa !important;
    color: #3483fa !important;
    background: #fff !important;
    border-radius: 6px;
}

.ml-pdp-tabs-container .see-more-details:hover,
.ml-pdp-tabs-container .see-more-details:focus,
.ml-pdp-tabs-container .see-more-details:active {
    background: #f0f6ff !important;
    color: #3483fa !important;
    border-color: #3483fa !important;
}

/* Review progress bars */
.ml-pdp-tabs-container .progress {
    border-radius: 4px;
}

.ml-pdp-tabs-container .web--bg-primary {
    background: #3483fa !important;
}

/* View more reviews button */
.ml-pdp-tabs-container .view_more_button {
    background: #3483fa !important;
    border-radius: 6px;
}

.ml-pdp-tabs-container .view_more_button:hover {
    background: #2968c8 !important;
}

/* ==========================================================================
   Override existing product-details styles
   ========================================================================== */

/* Remove old card styling on main product section */
.ml-pdp-top .row {
    margin: 0;
}

/* Fix the product info container to fill properly */
.ml-pdp-info.product-cart-option-container {
    height: auto !important;
}

/* Remove old details class height constraints */
.ml-pdp-info.details {
    height: auto !important;
}

/* Fix product-add-and-buy-section to stack vertically */
.ml-pdp-actions .product-add-and-buy-section {
    flex-direction: column !important;
    width: 100%;
}

.ml-pdp-actions .product-add-and-buy-section .ml-pdp-btn-buy,
.ml-pdp-actions .product-add-and-buy-section .ml-pdp-btn-cart {
    width: 100% !important;
    flex: none;
}

/* Override old __btn-grp styles */
.ml-pdp-actions.product-add-and-buy-section-parent {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px;
}

/* Ensure the form fills the info column */
.ml-pdp-info .add-to-cart-details-form {
    flex: 1;
}

/* Fix quantity section competing with old product-quantity styles */
.ml-pdp-qty-section .product-quantity {
    flex-direction: column;
    gap: 8px;
}

/* Page body background to match ML light grey */
.__inline-23 {
    background: #ebebeb;
}

/* Override any existing details page inline styles */
.ml-pdp-info h1.ml-pdp-title {
    font-size: 22px !important;
    font-weight: 600 !important;
    margin-bottom: 10px !important;
}

/* Override old price styles */
.ml-pdp-price-main.discounted-unit-price,
.ml-pdp-price-single.discounted-unit-price {
    font-size: 36px !important;
    font-weight: 400 !important;
    color: #333 !important;
}

@media (max-width: 575px) {
    .ml-pdp-price-main.discounted-unit-price,
    .ml-pdp-price-single.discounted-unit-price {
        font-size: 28px !important;
    }
}

/* Fix the product-details-chosen-price-section inherited padding */
.product-details-chosen-price-section {
    padding: 0;
}

/* Fix border radius on gallery swiper */
.ml-pdp-gallery .pd-img-wrap {
    border-radius: 8px;
    overflow: hidden;
}

/* Fix mb-12 (bootstrap doesn't have this) */
.mb-12 {
    margin-bottom: 12px;
}

/* Product Description Images - Full Size */
.p-details-description img,
.rich-editor-html-content img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain;
}

/* ── Premium Lens Zoom (Desktop Right Side Canvas) ──────────── */
.premium-zoom-lens {
    position: absolute;
    background-color: rgba(52, 131, 250, 0.15);
    border: 1.5px solid #3483fa;
    cursor: crosshair;
    pointer-events: none;
    z-index: 20;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(52, 131, 250, 0.3);
    /* shown/hidden via opacity + display via JS */
    display: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

/*
 * Preview pane uses position:fixed so it escapes any overflow:hidden
 * ancestor inside the gallery column. Left/top/width/height are set
 * exclusively via JavaScript using getBoundingClientRect().
 */
.premium-zoom-preview-pane {
    position: fixed;
    top: 0;
    left: 0;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.10);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.16);
    border-radius: 12px;
    overflow: hidden;
    display: none;
    z-index: 9990;
    pointer-events: none;
    transition: opacity 0.22s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: scale(0.97);
    transform-origin: left top;
}

.premium-zoom-highres-img {
    position: absolute;
    top: 0;
    left: 0;
    max-width: none !important;
    max-height: none !important;
    width: auto;
    height: auto;
    transform-origin: 0 0;
    will-change: transform;
    opacity: 0;
    transition: opacity 0.18s ease;
}

.premium-zoom-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    z-index: 2;
}

.premium-zoom-spinner {
    width: 38px;
    height: 38px;
    border: 3px solid rgba(52, 131, 250, 0.18);
    border-top-color: #3483fa;
    border-radius: 50%;
    animation: premiumZoomSpin 0.75s linear infinite;
}

@keyframes premiumZoomSpin {
    to { transform: rotate(360deg); }
}
