/* product-view.php page styles — extracted from the two inline <style> blocks.
   Loaded after sf.css so it keeps overriding the shared storefront sheet, exactly
   as the inline block did. Cache-busted with filemtime() at the <link>. */

.customer-top-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid rgba(255,255,255,0.2);
}

.customer-bar-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.customer-bar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.customer-bar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.customer-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.15);
    padding: 8px 15px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
}

.customer-profile:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.customer-thumb {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.customer-profile:hover .customer-thumb {
    border-color: rgba(255,255,255,0.6);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.customer-thumb.default {
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
}

.customer-info {
    display: flex;
    flex-direction: column;
}

.customer-name {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.customer-provider {
    font-size: 11px;
    opacity: 0.8;
    margin: 0;
}

.logout-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    padding: 8px;
    margin-top: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    min-width: 120px;
    z-index: 1001;
}

.customer-profile:hover .logout-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.logout-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: white;
    transform: rotate(45deg);
    box-shadow: -2px -2px 5px rgba(0,0,0,0.1);
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    color: #dc3545;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.logout-btn:hover {
    background: #f8f9fa;
    color: #dc3545;
    transform: translateX(5px);
}

.login-btn {
    background: rgba(0, 123, 255, 0.9);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 123, 255, 0.3);
}

.login-btn:hover {
    background: rgba(0, 123, 255, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

.store-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.store-name {
    font-size: 16px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .customer-bar-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .customer-profile {
        padding: 6px 12px;
    }
    
    .customer-thumb {
        width: 30px;
        height: 30px;
    }
    
    .logout-dropdown {
        right: -10px;
    }
}

/* =============================================
   ADVANCED IMAGE GALLERY FEATURES
   ============================================= */

/* Variant Combinations Table */
.variant-combinations-section {
    margin: 30px 0;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.variant-combinations-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.variant-table-container {
    overflow-x: auto;
}

/* Flex "table": columns on desktop, cards ≤768px; rows built by JS, header from PHP. */
.vtbl {
    display: flex;
    flex-direction: column;
    min-width: 600px;
}

.vtbl-head,
.vtbl-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
}

.vtbl-head {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 8px 8px 0 0;
}

.vtbl-row {
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
    transition: all 0.3s ease;
}

/* flex-basis 0 so every text column gets an equal share whatever its content length */
.vtbl-cell {
    flex: 1 1 0;
    min-width: 0;
}

.vtbl-c-img    { flex: 0 0 60px; }
.vtbl-c-opt    { font-weight: 600; }
.vtbl-c-action { flex: 0 0 110px; }

/* Column label, printed only in the mobile card layout below */
.vtbl-cell::before {
    display: none;
    content: attr(data-label) ': ';
}

.vtbl-row:hover {
    background: #f8f9fa;
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Row matching the combination selected above — the table gave no indication of which row was live, so it read as a static list next to the option buttons. */
.vtbl-row.variant-row-selected {
    background: #eef1fd;
    box-shadow: inset 3px 0 0 #667eea;
}

.variant-table-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.variant-table-price {
    font-weight: 700;
    color: #4CAF50;
    font-size: 16px;
}

.variant-table-price.has-discount {
    color: #FF9800;
}

.variant-table-original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 13px;
    margin-left: 8px;
}

.variant-table-stock {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.variant-table-stock.in-stock {
    background: #d4edda;
    color: #155724;
}

.variant-table-stock.low-stock {
    background: #fff3cd;
    color: #856404;
}

.variant-table-stock.out-of-stock {
    background: #f8d7da;
    color: #721c24;
}

.variant-table-select-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.variant-table-select-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.variant-table-select-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Variant Hover Preview */
.variant-option-with-preview {
    position: relative;
}

.variant-hover-preview {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 15px;
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    pointer-events: none;
}

.variant-hover-preview::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: white;
}

.variant-option-with-preview:hover .variant-hover-preview {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

.variant-preview-image {
    width: 150px;
    height: 150px;
    object-fit: contain;
    border-radius: 6px;
    display: block;
}

.variant-preview-info {
    margin-top: 8px;
    text-align: center;
}

.variant-preview-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.variant-preview-price {
    font-size: 14px;
    font-weight: 700;
    color: #4CAF50;
}

.variant-preview-stock {
    font-size: 11px;
    color: #666;
    margin-top: 4px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    /* Card per row: header hidden, cells wrap and carry their own label. No side-scroll. */
    .variant-table-container { overflow-x: visible; }
    .vtbl      { min-width: 0; }
    .vtbl-head { display: none; }

    .vtbl-row {
        flex-wrap: wrap;
        gap: 8px 10px;
        padding: 12px;
        font-size: 13px;
        border: 1px solid #e6e6e6;
        border-radius: 12px;
        margin-bottom: 10px;
    }

    .vtbl-row:last-child { margin-bottom: 0; }

    .vtbl-row:hover {
        transform: none;
        background: white;
    }

    .vtbl-cell { flex: 0 1 auto; }

    /* image + option chips share the first line, price/stock the next, button its own */
    .vtbl-c-img { flex: 0 0 50px; }

    .vtbl-c-opt {
        font-size: 12px;
        padding: 4px 10px;
        border-radius: 8px;
        background: #f3f4f8;
    }

    .vtbl-c-opt::before {
        display: inline;
        color: #777;
        font-weight: 500;
    }

    .vtbl-c-price  { flex: 1 1 auto; }
    .vtbl-c-stock  { flex: 0 0 auto; }
    .vtbl-c-action { flex: 1 1 100%; }
    .vtbl-c-action .variant-table-select-btn { width: 100%; }

    .variant-table-image {
        width: 50px;
        height: 50px;
    }
    
    /* DISABLED - Variant hover preview mobile */
    /*
    .variant-hover-preview {
        left: auto;
        right: 0;
        transform: none;
    }
    
    .variant-option-with-preview:hover .variant-hover-preview {
        transform: translateY(-5px);
    }
    */
    
    .variant-preview-image {
        width: 120px;
        height: 120px;
    }
}

/* =============================================
   PRODUCT VIEW - FLEX LAYOUT (Mobile First)
   ============================================= */

/* Reset box-sizing */
.pv-wrapper *, .pv-wrapper *::before, .pv-wrapper *::after {
    box-sizing: border-box;
}

/* Main wrapper */
.pv-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Product main section - flex container */
.pv-product {
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* Image Gallery */
.pv-gallery {
    width: 100%;
}

.pv-main-image {
    width: 100%;
    aspect-ratio: 1;
    max-height: 400px;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    cursor: zoom-in;
}

.pv-thumbnails {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.pv-thumb {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    object-fit: contain;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
    background: #fff;
}

.pv-thumb:hover, .pv-thumb.active {
    border-color: #667eea;
    transform: scale(1.05);
}

.pv-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pv-carousel-nav:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.pv-carousel-nav.prev { left: 8px; }
.pv-carousel-nav.next { right: 8px; }

/* Product Details */
.pv-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pv-title {
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    line-height: 1.3;
}

.pv-title a {
    color: inherit;
    text-decoration: none;
}

/* Price Block */
.pv-price-block {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.pv-price {
    font-size: 28px;
    font-weight: 700;
    color: #059669;
}

.pv-mrp {
    font-size: 18px;
    color: #9ca3af;
    text-decoration: line-through;
}

.pv-discount {
    background: #fef2f2;
    color: #dc2626;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
}

.pv-savings {
    background: #ecfdf5;
    color: #059669;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
}

/* Variant Options */
.pv-variants {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pv-variant-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.pv-variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pv-variant-btn {
    padding: 8px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.pv-variant-btn:hover {
    border-color: #667eea;
}

.pv-variant-btn.selected,
.pv-variant-btn.green {
    border-color: #059669;
    background: #ecfdf5;
    color: #059669;
    font-weight: 600;
}

.pv-variant-btn.blue {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #3b82f6;
}

.pv-variant-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #9ca3af;
}

/* Unreachable value: no live variant carries it alongside the rest of the current
   selection (see pvValueReachable in product-view.js). Advisory only — the tag stays
   clickable, matching the "no auto-snap, no disabling" rule the picker is built on.
   Struck through rather than merely faded so it reads as "not this combination"
   rather than "loading" or "disabled". */
.pv-variant-btn.pv-unavail {
    opacity: 0.45;
    text-decoration: line-through;
    border-style: dashed;
}
/* A selected value can itself become unreachable — the shopper is standing on a dead
   combination. Keep the green "selected" identity, add the struck-through signal. */
.pv-variant-btn.green.pv-unavail {
    border-color: #059669;
    text-decoration-color: #059669;
}

/* Quantity Controls */
.pv-quantity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pv-qty-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.pv-qty-controls {
    display: flex;
    align-items: center;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.pv-qty-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #f9fafb;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    color: #667eea;
    transition: background 0.2s;
}

.pv-qty-btn:hover {
    background: #eef2ff;
}

.pv-qty-input {
    width: 60px;
    height: 40px;
    border: none;
    border-left: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

/* Action Buttons */
.pv-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pv-btn {
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-align: center;
}

.pv-btn-primary {
    background: linear-gradient(135deg, #059669, #047857);
    color: #fff;
}

.pv-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
}

.pv-btn-secondary {
    background: #fff;
    color: #667eea;
    border: 2px solid #667eea;
}

.pv-btn-secondary:hover {
    background: #eef2ff;
}

/* Out-of-stock state for Buy Now / Add to Cart (set by pvSetPurchaseEnabled). */
.pv-btn-oos,
.pv-btn-oos:hover {
    background: #e5e7eb !important;
    color: #9ca3af !important;
    border-color: #d1d5db !important;
    box-shadow: none !important;
    transform: none !important;
    cursor: not-allowed;
}

.pv-btn-wishlist {
    background: #fff;
    color: #ec4899;
    border: 2px solid #ec4899;
}

.pv-btn-wishlist:hover, .pv-btn-wishlist.active {
    background: #ec4899;
    color: #fff;
}

/* COD/refund badges now sit last in .pv-details, so sf.css's margin-bottom just trails dead space; the column's flex gap already spaces them off the buttons. */
.pv-badges {
    margin-bottom: 0;
}

/* .mIcon's baseline nudge is for inline text — cancel it inside the flex-centred pill. 1em would render smaller than the emoji it replaced. */
.pv-status-badge .mIcon {
    font-size: 16px;
    top: 0;
}

/* Offers Section — mild tint on the outer box only; cards stay clean white so the two never read as the same layer. */
.pv-offers {
    min-width: 0;
    margin: 4px 0;
    padding: 14px;
    background: #f0fdf4;
    border: 1px solid #d1fae5;
    border-radius: 14px;
}

/* Not uppercase-gray — that is .pv-offer-name's treatment inside the card. */
.pv-offers-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 10px 0;
}

.pv-offers-title .mIcon {
    font-size: 18px;
    color: #059669;
    top: 0;
}

/* Offers Carousel */
/* min-width: the slide track is N x this box wide, so without it the track's intrinsic width pushes the whole details column right. */
.pv-offers-carousel {
    position: relative;
    min-width: 0;
    border-radius: 10px;
    overflow: hidden;
}

.pv-offers-slider {
    display: flex;
    align-items: stretch;
    transition: transform 0.3s ease;
}

/* Flex so the card fills the slide; no padding, each slide is exactly one card wide. */
.pv-offer-slide {
    display: flex;
    box-sizing: border-box;
}

/* align-items so the icon chip keeps its square instead of stretching to card height. */
.pv-offer-card {
    --acc: #059669;
    --tint: #ecfdf5;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 3px solid var(--acc);
    border-radius: 10px;
    box-sizing: border-box;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.pv-offer-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

/* One pair of vars per type drives the accent bar, chip and headline colour. */
.pv-offer-card.pv-offer-bogo     { --acc: #059669; --tint: #ecfdf5; }
.pv-offer-card.pv-offer-shipping { --acc: #3b82f6; --tint: #eff6ff; }
.pv-offer-card.pv-offer-discount { --acc: #dc2626; --tint: #fef2f2; }
.pv-offer-card.pv-offer-freebie  { --acc: #9333ea; --tint: #faf5ff; }

/* The only tint inside the card — carries the offer type at a glance. */
.pv-offer-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--tint);
    color: var(--acc);
    line-height: 1;
    flex-shrink: 0;
}

/* .mIcon's baseline nudge is for inline text — cancel it inside the centred chip. */
.pv-offer-icon .mIcon {
    font-size: 21px;
    top: 0;
}

.pv-offer-content {
    flex: 1;
    min-width: 0;
}

.pv-offer-name {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 2px;
}

.pv-offer-headline {
    font-weight: 700;
    font-size: 15px;
    line-height: 1.35;
    color: var(--acc);
    margin-bottom: 4px;
}

/* Solid, not dashed — the dashed treatment stays unique to the coupon code below. */
.pv-offer-variant-scope {
    margin-top: 6px;
    font-size: 12px;
    color: #9a3412;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 6px;
    padding: 3px 8px;
    display: inline-block;
}

.pv-offer-desc {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

.pv-offer-code {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 8px;
    background: #eef2ff;
    border: 1px dashed #667eea;
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #667eea;
}

.pv-offer-note {
    margin-top: 6px;
    font-size: 12px;
    color: #9ca3af;
    font-style: italic;
}

/* Login Required Badge */
.pv-login-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
}

/* Urgency/Scarcity indicators */
.pv-offer-urgency {
    margin-top: 6px;
    font-size: 11px;
    color: #dc2626;
    font-weight: 600;
    animation: pulse-urgency 2s ease-in-out infinite;
}

.pv-offer-personal {
    margin-top: 4px;
    font-size: 11px;
    color: #059669;
    font-weight: 500;
}

@keyframes pulse-urgency {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.pv-offers-dots {
    text-align: center;
    padding: 10px 0 0;
}

.pv-offer-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 3px;
    background: #d1d5db;
    margin: 0 3px;
    cursor: pointer;
    transition: width 0.3s, background 0.3s;
}

/* Active dot widens into a pill instead of scaling — no layout jitter. */
.pv-offer-dot.active {
    width: 16px;
    background: #059669;
}

/* Slide height is the tallest card, so keep the card compact on narrow screens. */
@media (max-width: 768px) {
    .pv-offers {
        padding: 12px;
    }

    .pv-offer-card {
        gap: 10px;
        padding: 12px;
    }

    .pv-offer-icon {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }

    .pv-offer-icon .mIcon {
        font-size: 18px;
    }

    .pv-offer-headline {
        font-size: 14px;
    }

    .pv-offer-desc {
        font-size: 12px;
    }
}

.pv-offers-savings {
    margin-top: 12px;
    padding: 10px 16px;
    background: linear-gradient(90deg, #059669, #10b981);
    color: #fff;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
}

/* Info Panels */
.pv-panel {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin-top: 24px;
}

.pv-panel-title {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #667eea;
}

/* =============================================
   TABLET & DESKTOP (min-width: 768px)
   ============================================= */
@media (min-width: 768px) {
    .pv-wrapper {
        padding: 24px;
    }

    .pv-product {
        flex-direction: row;
        gap: 40px;
        padding: 32px;
    }

    .pv-gallery {
        flex: 0 0 45%;
        max-width: 480px;
        position: sticky;
        top: 100px;
        align-self: flex-start;
    }

    /* min-width: without it this row flex item can't shrink below its content's min width, so wide children overflow the page to the right. */
    .pv-details {
        flex: 1;
        min-width: 0;
        gap: 20px;
    }

    .pv-title {
        font-size: 28px;
    }

    .pv-price {
        font-size: 32px;
    }

    .pv-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .pv-btn {
        flex: 1;
        min-width: 140px;
    }
}

/* =============================================
   LARGE DESKTOP (min-width: 1024px)
   ============================================= */
@media (min-width: 1024px) {
    .pv-gallery {
        flex: 0 0 42%;
    }

    .pv-main-image {
        max-height: 500px;
    }

    .pv-title {
        font-size: 32px;
    }

    .pv-price {
        font-size: 36px;
    }
}

/* =============================================
   PRODUCT INFO PANELS (Description, Warranty, Info)
   ============================================= */
.pv-info-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

.pv-info-panel {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid #e5e7eb;
}

.pv-info-panel h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #667eea;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pv-info-panel h3::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 2px;
}

.pv-info-panel p {
    font-size: 15px;
    line-height: 1.7;
    color: #4b5563;
    margin: 0;
}

/* Product Information Table */
.pv-info-table {
    width: 100%;
    border-collapse: collapse;
}

.pv-info-table tr {
    border-bottom: 1px solid #f3f4f6;
}

.pv-info-table tr:last-child {
    border-bottom: none;
}

.pv-info-table td {
    padding: 12px 16px;
    font-size: 14px;
    vertical-align: top;
}

.pv-info-table td:first-child {
    font-weight: 600;
    color: #374151;
    background: #f9fafb;
    width: 40%;
    border-radius: 6px 0 0 6px;
}

.pv-info-table td:last-child {
    color: #4b5563;
}

/* Responsive Info Grid */
.pv-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

.pv-info-row {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid #f3f4f6;
}

.pv-info-row:last-child {
    border-bottom: none;
}

.pv-info-label {
    flex: 1 1 100%;
    padding: 12px 16px;
    font-weight: 600;
    color: #374151;
    background: #f9fafb;
    font-size: 14px;
}

.pv-info-value {
    flex: 1 1 100%;
    padding: 12px 16px;
    color: #4b5563;
    font-size: 14px;
}

@media (min-width: 576px) {
    .pv-info-label {
        flex: 0 0 40%;
        border-radius: 6px 0 0 6px;
    }
    
    .pv-info-value {
        flex: 0 0 60%;
    }
}

@media (min-width: 768px) {
    .pv-info-section {
        padding: 24px;
    }
    
    .pv-info-panel {
        padding: 28px;
    }
    
    .pv-info-panel h3 {
        font-size: 22px;
    }
    
    .pv-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pv-info-row {
        grid-column: span 2;
    }
}

/* Responsive YouTube Video Container */
.pv-video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}

.pv-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

/* Multiple product videos */
.pv-video-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-start;
}
.pv-video-list .pv-video-container {
    flex: 1 1 320px;
    min-width: 280px;
}
/* Vertical (Instagram reel) — fixed 9:16-ish box, white bg for the embed chrome */
.pv-video-container.vertical {
    flex: 0 0 auto;
    width: 340px;
    max-width: 100%;
    padding-bottom: 0;
    height: 600px;
    background: #fff;
}
/* Placeholder tile for videos without a thumbnail image (e.g. Instagram) */
.pv-video-thumb-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
}
.pv-video-thumb-instagram .pv-video-thumb-ph {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}
.pv-video-thumb-youtube .pv-video-thumb-ph {
    background: #000;
}

/* Breadcrumb — width/padding mirror .pv-wrapper so the trail lines up with the product title below it. The &rsaquo; separators are bare text nodes: they become anonymous flex items and pick up the gap, so they need no class of their own, and `span` matches only the current-product name. */
.pv-breadcrumb {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 16px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6b7280;
}
.pv-breadcrumb a { color: inherit; text-decoration: none; }
.pv-breadcrumb a:hover { color: #1f2937; text-decoration: underline; }
.pv-breadcrumb span { color: #1f2937; font-weight: 600; }

/* Item 6 — video gallery thumbnail */
.pv-video-thumb {
    position: relative;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.pv-video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}
.pv-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.65);
    color: #fff;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    pointer-events: none;
}

/* Item 10 — bought recently badge */
/* align-self: .pv-details is a column flex container, which blockifies inline-flex and stretches the pill across the full column. */
.pv-bought-badge {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 5px;
    background: #fff4e5;
    color: #c45500;
    border: 1px solid #f5c97a;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 500;
    margin: 8px 0;
}

/* Item 16 — stock badges */
.pv-stock-badge {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 5px;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 500;
    margin: 6px 0;
}
.pv-low-stock  { background: #fff3cd; color: #856404; border: 1px solid #ffc107; }
.pv-out-of-stock { background: #f8d7da; color: #842029; border: 1px solid #f5c6cb; }

/* Wishlist styles — were wrapped in a PHP `if ($pp_show_wishlist)` while this block
   was inline in product-view.php. A stylesheet cannot run PHP, and the stray tag was
   being parsed as a selector, silently swallowing the rule that followed it. They are
   unconditional now: rules for elements that are never rendered cost nothing. */
/* Wishlist button */
.wishlist-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    border: none; color: white; padding: 12px 20px; border-radius: 25px; cursor: pointer;
    font-size: 14px; font-weight: 500; transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255,107,107,0.3);
    display: flex; align-items: center; gap: 8px; text-decoration: none; margin: 10px 0;
}
.wishlist-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255,107,107,0.4); background: linear-gradient(135deg,#ff5252,#d84315); color: white; text-decoration: none; }
.wishlist-btn.active { background: linear-gradient(135deg,#e91e63,#c2185b); box-shadow: 0 4px 15px rgba(233,30,99,0.3); }
.wishlist-btn.active:hover { background: linear-gradient(135deg,#d81b60,#ad1457); box-shadow: 0 6px 20px rgba(233,30,99,0.4); }
.wishlist-btn i { font-size: 16px; }
.wishlist-count { background:#ff4444; color:white; border-radius:50%; padding:2px 6px; font-size:12px; font-weight:bold; margin-left:5px; display:none; }

/* Wishlist split button */
.wl-split-wrap { position: relative; display: inline-flex; }
.wl-main-btn  { border-radius: 6px 0 0 6px !important; border-right: none !important; }
.wl-arrow-btn { border-radius: 0 6px 6px 0 !important; padding: 0 10px !important; font-size: 11px !important; min-width: unset !important; border-left: 1px solid rgba(236,72,153,0.35) !important; }
.wl-arrow-btn.active { border-left-color: rgba(255,255,255,0.35) !important; }

/* Wishlist dropdown */
.wishlist-picker {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    padding: 8px;
    min-width: 190px;
    z-index: 500;
}
.wlp-lists { display: flex; flex-direction: column; max-height: 200px; overflow-y: auto; }
.wlp-list-item {
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background 0.15s;
}
.wlp-list-item:hover { background: #fdf0f7; color: #ec4899; }
.wlp-list-item-saved { color: #27ae60; font-weight: 500; }
.wlp-list-item-saved:hover { background: #eafaf1; color: #1e8449; }
.wlp-check { font-size: 12px; }
.wlp-new {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    border-top: 1px solid #eee;
    padding-top: 8px;
}
.wlp-new input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
    outline: none;
}
.wlp-new input:focus { border-color: #ec4899; }
.wlp-new button {
    background: #ec4899;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
}
.wlp-new button:hover { background: #d63384; }
/* end of the formerly PHP-gated wishlist styles */

/* Recently Viewed Products */
.recently-viewed-products { width: 100%; margin: 20px 0; }
.recently-viewed-products h3 { color:#333; font-size:18px; margin-bottom:15px; border-bottom:2px solid #e74c3c; padding-bottom:8px; display:inline-block; }
.recently-viewed-grid { display:flex; gap:15px; overflow-x:auto; padding:10px 0; scroll-behavior:smooth; }
.recently-viewed-grid::-webkit-scrollbar { height:6px; }
.recently-viewed-grid::-webkit-scrollbar-track { background:#f1f1f1; border-radius:3px; }
.recently-viewed-grid::-webkit-scrollbar-thumb { background:#888; border-radius:3px; }
.recently-viewed-grid::-webkit-scrollbar-thumb:hover { background:#555; }
.recently-viewed-item { flex:0 0 150px; border:1px solid #ddd; border-radius:8px; padding:10px; text-align:center; background:white; cursor:pointer; transition:all 0.3s ease; box-shadow:0 2px 4px rgba(0,0,0,0.1); }
.recently-viewed-item:hover { transform:translateY(-5px); box-shadow:0 6px 20px rgba(0,0,0,0.15); border-color:#e74c3c; }
.recently-viewed-item img { width:120px; height:120px; object-fit:contain; margin-bottom:8px; border-radius:4px; transition:transform 0.2s ease; }
.recently-viewed-item:hover img { transform:scale(1.05); }
.recently-viewed-item .product-title { font-size:12px; font-weight:bold; margin-bottom:5px; height:30px; overflow:hidden; line-height:15px; color:#333; }
.recently-viewed-item .product-price { font-size:14px; color:#e74c3c; font-weight:bold; }
.recently-viewed-item .product-price span { font-size:11px; color:#999; text-decoration:line-through; margin-left:5px; }
.recently-viewed-products button { background:#dc3545; color:white; border:none; padding:8px 15px; border-radius:4px; cursor:pointer; font-size:12px; transition:background 0.3s ease; }
.recently-viewed-products button:hover { background:#c82333; transform:translateY(-1px); }
@media (max-width:768px) {
    .recently-viewed-item { flex:0 0 120px; padding:8px; }
    .recently-viewed-item img { width:100px; height:100px; }
    .recently-viewed-item .product-title { font-size:11px; height:22px; line-height:11px; }
    .recently-viewed-item .product-price { font-size:12px; }
}

/* ── was a second inline <style> inside the also-bought section ── */
.related-product-card:hover {
transform: translateY(-5px);
box-shadow: 0 6px 20px rgba(0,0,0,0.15);
border-color: #007bff;
}
