/* ==============================================================
   Nexsky Product Detail – Redesigned Info Card & Polished
   (Scrollbar hidden, modern glass‑card, light/dark ready)
   ============================================================== */
:root {
    --pd-gap: 1.25rem;
    --pd-radius: 2rem;
}

.product-page {
    max-width: 1000px;
    margin: 1.5rem auto 3rem;
    padding: 0 1rem;
    color: var(--text);
    direction: rtl;
    font-size: 0.95rem;
}

/* ========== Light‑mode mute‑text fix ========== */
body.light-mode {
    --text-muted: #1e293b;
}

/* ========== Breadcrumb ========== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}
.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}
.breadcrumb a:hover { color: var(--primary-light); }
.breadcrumb i { font-size: 0.55rem; color: var(--text-muted); }

/* ========== Two‑Column Grid ========== */
.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--pd-gap);
    align-items: start;
}

/* ========== Image Gallery ========== */
.gallery {
    position: sticky;
    top: calc(var(--navbar-height) + 1rem);
}
.main-image-container {
    position: relative;
    border-radius: var(--pd-radius);
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    cursor: pointer;
    aspect-ratio: 1 / 1;
}
body.light-mode .main-image-container img[src*="product-placeholder"] {
    filter: invert(1) hue-rotate(180deg);
    background: var(--surface);
}
.main-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.2, 0, 0.3, 1);
}
.main-image-container:hover img {
    transform: scale(1.05);
}
.zoom-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(0,240,255,0.08) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.main-image-container:hover .zoom-overlay { opacity: 1; }

/* Mobile swipe gallery – scrollbar hidden */
@media (max-width: 900px) {
    .main-image-container {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        display: flex;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;          /* Firefox */
        -ms-overflow-style: none;       /* IE/Edge */
    }
    .main-image-container::-webkit-scrollbar {
        display: none;                  /* Chrome, Safari, Opera */
    }
    .main-image-container img {
        scroll-snap-align: start;
        flex-shrink: 0;
        width: 100%;
        height: 100%;
    }
    .main-image-container::after {
        content: '';
        flex-shrink: 0;
        width: 1px;
    }
}

.thumbnail-strip {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}
.thumbnail-item {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.25s;
    background: var(--surface);
}
.thumbnail-item.active,
.thumbnail-item:hover {
    border-color: var(--primary);
    opacity: 1;
    box-shadow: 0 0 10px rgba(0,240,255,0.35);
    transform: translateY(-3px);
}
.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =============================================================
   REDESIGNED PRODUCT INFO CARD
   ============================================================= */
.info-card {
    --card-bg: rgba(18, 22, 35, 0.8);
    --card-border: rgba(255, 255, 255, 0.12);
    --card-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6),
                   0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    --price-bg: rgba(0, 0, 0, 0.25);
    --accent-glow: rgba(0, 240, 255, 0.2);
    --divider: rgba(255, 255, 255, 0.08);

    background: var(--card-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--card-border);
    border-radius: 2.8rem;
    padding: 1.8rem;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
}

/* Subtle top gradient line */
.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--accent), var(--primary), transparent);
    border-radius: 0 0 20px 20px;
    opacity: 0.5;
}

/* Light mode overrides */
body.light-mode .info-card {
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-border: rgba(15, 23, 42, 0.1);
    --card-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.1),
                   0 0 0 1px rgba(0, 0, 0, 0.04) inset;
    --price-bg: rgba(248, 250, 252, 0.9);
    --accent-glow: rgba(6, 152, 214, 0.15);
    --divider: rgba(15, 23, 42, 0.08);
}

.product-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 1rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    backdrop-filter: blur(8px);
    background: var(--accent-glow);
    border: 1px solid rgba(0,240,255,0.25);
    color: var(--primary-light);
}
.physical-badge {
    background: rgba(138, 43, 226, 0.12);
    border-color: rgba(138, 43, 226, 0.3);
    color: var(--accent-light);
}

.product-title {
    font-size: clamp(1.3rem, 2.5vw, 1.7rem);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}
.category-chip {
    background: rgba(0,240,255,0.06);
    border: 1px solid rgba(0,240,255,0.2);
    color: var(--primary-light);
    padding: 0.25rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}
.category-chip:hover {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,240,255,0.3);
}

/* New price block */
.price-container {
    background: var(--price-bg);
    border: 1px solid var(--divider);
    border-radius: 2rem;
    padding: 1.1rem 1.3rem;
    margin: 1rem 0 1.5rem;
    position: relative;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.price-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.current-price {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary-light);
    letter-spacing: -0.5px;
}
.old-price {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-right: 0.5rem;
}
.currency {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-right: 0.2rem;
}
.discount-badge {
    background: rgba(255,0,85,0.15);
    border: 1px solid rgba(255,0,85,0.3);
    color: var(--rose);
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}
.stock-status {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 600;
    font-size: 0.85rem;
}
.in-stock { color: #4ade80; }
.out-of-stock { color: #f87171; }

.short-desc {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 1rem 0;
    font-size: 0.95rem;
}

/* ========== Variant Selectors ========== */
.variant-section {
    margin: 1.2rem 0;
}
.variant-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    color: var(--text);
}
.swatch-row {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.swatch-item {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid var(--border);
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text);
    background: var(--surface);
    overflow: hidden;
}
.swatch-item:hover {
    border-color: var(--primary-light);
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(0,240,255,0.3);
}
.swatch-item.selected {
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(0,240,255,0.5);
    background: rgba(0,240,255,0.1);
}
.swatch-item.color-swatch {
    background-size: cover;
    border: 2px solid var(--border);
}
.swatch-item.color-swatch.selected { border-color: #fff; }

/* ========== Quantity & Add to Cart ========== */
.qty-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.2rem 0 1.5rem;
    flex-wrap: wrap;
}
.qty-selector > span:first-child {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}
.qty-control {
    display: inline-flex;
    align-items: center;
    background: var(--surface);
    border: 1.5px solid var(--border-light);
    border-radius: 50px;
    overflow: hidden;
    padding: 3px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.qty-control:focus-within,
.qty-control:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.12);
}
.qty-btn {
    min-width: 42px;
    min-height: 42px;
    background: transparent;
    border: none;
    color: var(--text);
    padding: 0;
    font-size: 1.25rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
    font-family: var(--font-body);
    border-radius: 50%;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.qty-btn:hover {
    background: var(--surface-hover);
    color: var(--primary-light);
}
.qty-btn:active {
    background: rgba(0, 240, 255, 0.12);
    transform: scale(0.96);
}
.qty-display {
    min-width: 48px;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text);
    padding: 0 4px;
    line-height: 42px;
}
#variantStockNote {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
    width: 100%;
}
.btn-add-cart {
    width: 100%;
    padding: 0.9rem 1.5rem;
    min-height: 48px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 6px 20px rgba(0, 240, 255, 0.3);
    font-family: var(--font-body);
    margin-top: 0.4rem;
    letter-spacing: 0.2px;
}
.btn-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 240, 255, 0.45);
}
.btn-add-cart:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(0, 240, 255, 0.3);
}
.btn-add-cart:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.out-of-stock-msg {
    text-align: center;
    padding: 0.8rem;
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: var(--radius);
    color: #fca5a5;
    font-weight: 600;
    margin: 1rem 0;
    font-size: 0.9rem;
}

/* ========== Meta information ========== */
.variant-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}
.variant-meta-item {
    background: var(--surface-hover);
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    border: 1px solid var(--border);
}

/* ========== Tabs ========== */
.tabs-container {
    margin-top: 2rem;
}
.tab-nav {
    display: flex;
    gap: 0.3rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 0.25rem;
    backdrop-filter: blur(10px);
    margin-bottom: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}
.tab-btn {
    flex: 0 0 auto;
    scroll-snap-align: start;
    padding: 0.6rem 1.2rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: var(--font-body);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    white-space: nowrap;
}
.tab-btn.active {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    box-shadow: 0 4px 14px rgba(0,240,255,0.35);
}
.tab-panel {
    display: none;
    animation: fadeSlide 0.4s ease;
}
.tab-panel.active { display: block; }
@keyframes fadeSlide {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.long-description {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.9;
}

/* FAQ */
.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.6rem;
    background: var(--surface);
    overflow: hidden;
}
.faq-question {
    padding: 0.8rem 1.2rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text);
    transition: background 0.2s;
    font-size: 0.9rem;
}
.faq-question:hover { background: var(--surface-hover); }
.faq-icon {
    font-size: 1.3rem;
    color: var(--primary-light);
    transition: transform 0.3s;
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}
.faq-item.open .faq-answer {
    max-height: 1000px;  /* large enough to show any answer */
}
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer .faq-answer-content {
    padding: 0 1.2rem 0.8rem;
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.9rem;
}

/* ========== Related Products ========== */
.related-section { margin-top: 2rem; }
.section-title {
    font-size: 1.6rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}
.related-card {
    background: var(--surface);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}
.related-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 15px 30px rgba(0,240,255,0.08);
}
.related-card img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: transform 0.4s;
}
body.light-mode .related-card img[src*="product-placeholder"] {
    filter: invert(1) hue-rotate(180deg);
    background: var(--surface);
}
.related-card:hover img { transform: scale(1.05); }
.related-body { padding: 1rem; }
.related-body h3 {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
    color: var(--text);
}
.related-price {
    font-weight: 800;
    color: var(--primary-light);
    font-size: 0.95rem;
}
.related-price del {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-right: 0.2rem;
}

/* ========== Comments ========== */
.comment-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem;
    margin-bottom: 0.8rem;
    backdrop-filter: blur(6px);
}
.comment-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}
.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    font-size: 0.9rem;
}
.comment-author { font-weight: 700; color: var(--primary-light); font-size: 0.9rem; }
.comment-date { color: var(--text-muted); font-size: 0.75rem; margin-right: auto; }
.comment-body { color: var(--text-secondary); line-height: 1.6; font-size: 0.9rem; }
.no-comments {
    text-align: center;
    color: var(--text-muted);
    padding: 1.5rem;
    font-size: 0.9rem;
}
.comment-form {
    margin-top: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem;
    backdrop-filter: blur(10px);
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    margin-bottom: 1rem;
}
.form-group { display: flex; flex-direction: column; }
.form-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}
.product-page input,
.product-page textarea,
.product-page select {
    font-size: 16px !important;
}
.form-group input,
.form-group textarea,
.form-group select {
    padding: 0.6rem 0.8rem;
    background: var(--surface-hover);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font-body);
    outline: none;
    transition: border 0.2s;
    font-size: 16px;
    width: 100%;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,240,255,0.1);
}
.btn-submit {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    border: none;
    padding: 0.65rem 1.8rem;
    border-radius: 40px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-family: var(--font-body);
    font-size: 0.9rem;
}
.btn-submit:hover {
    box-shadow: 0 4px 16px rgba(0,240,255,0.35);
}

/* ========== Lightbox ========== */
.pdp-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.95);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}
.pdp-lightbox.active { display: flex; }
.pdp-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    cursor: default;
}

/* =============================================================
   MOBILE STICKY BAR – FLOATING ISLAND ABOVE BOTTOM NAV
   ============================================================= */
.mobile-sticky-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.5rem 1rem;
    background: rgba(10, 14, 28, 0.85);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 2rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.06);
    position: fixed;
    left: 1rem;
    right: 1rem;
    z-index: 50;
    /* Increased gap from bottom nav (was 0.8rem) */
    bottom: calc(var(--bottom-nav-height) + 1.2rem + env(safe-area-inset-bottom, 0px));
    width: auto;
}

body.light-mode .mobile-sticky-bar {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08),
                inset 0 1px 0 rgba(0, 0, 0, 0.04);
}
.sticky-variant-thumb {
    width: 44px;
    height: 44px;
    border-radius: 1rem;
    object-fit: cover;
    flex-shrink: 0;
}
.mobile-sticky-bar .price-summary {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.mobile-sticky-bar .price {
    font-weight: 800;
    font-size: 1rem;
    color: var(--primary-light);
}
.mobile-sticky-bar .old-price {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: line-through;
}
.mobile-sticky-bar .discount-badge {
    font-size: 0.7rem;
    background: rgba(255, 0, 85, 0.15);
    color: var(--rose);
    padding: 0.1rem 0.5rem;
    border-radius: 1rem;
}
.mobile-sticky-bar .btn-add-cart {
    width: auto;
    padding: 0.6rem 1.4rem;
    font-size: 0.95rem;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    border: none;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0,240,255,0.3);
}

/* ==================== MOBILE RESPONSIVE ==================== */
@media (max-width: 900px) {
    .gallery {
        position: static;
        margin-bottom: 1.5rem;
    }
    .product-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .related-grid {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
        gap: 0.75rem;
    }
    .related-card {
        display: flex;
        flex-direction: column;
        min-height: 100%;
    }
    .related-body {
        padding: 0.8rem;
        flex: 1;
    }
    .related-body h3 {
        font-size: 0.9rem;
        line-height: 1.3;
    }
    .related-price {
        font-size: 0.9rem;
    }
    .related-price del {
        font-size: 0.75rem;
    }
    .product-page {
        padding: 0 0.75rem;   
    }
    .info-card {
        border-radius: 1.5rem;
        padding: 1.5rem;
    }
    .tabs-container {
        padding: 0 0.75rem;
    }
    .related-section {
        padding: 0 0.75rem;
    }
    .mobile-sticky-bar {
        display: flex;
    }
    .support-widget {
        bottom: calc(var(--bottom-nav-height) + 80px + env(safe-area-inset-bottom, 0px)) !important;
    }
    body {
        padding-bottom: 70px;
    }
}

@media (max-width: 768px) {
    .mobile-sticky-bar {
        bottom: calc(var(--bottom-nav-height) + 1.2rem + env(safe-area-inset-bottom, 0px));
        left: 0.8rem;
        right: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    body {
        padding-bottom: calc(var(--bottom-nav-height) + 80px + env(safe-area-inset-bottom, 0px));
    }
    .qty-selector {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    .qty-control {
        width: 100%;
        max-width: 200px;
        justify-content: space-between;
    }
    .qty-btn {
        flex: 0 0 auto;
        min-width: 48px;
        min-height: 48px;
    }
    .qty-display {
        flex: 1;
        text-align: center;
    }
    .btn-add-cart {
        min-height: 44px;
        font-size: 0.95rem;
        padding: 0.65rem 1rem;
    }
    .tab-nav {
        gap: 0;
    }
    .tab-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }
    .comment-card {
        padding: 0.8rem;
        margin-bottom: 0.6rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    .comment-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .comment-author {
        flex-basis: 100%;
        word-break: break-word;
    }
    .comment-date {
        margin-right: 0;
        flex-basis: 100%;
    }
    .comment-body {
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
    }
    .comment-form {
        padding: 0.8rem;
        margin: 1rem 0 0;
    }
    .form-grid {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }
    .form-grid .form-group {
        grid-column: auto !important;
    }
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px;
        width: 100%;
    }
    .btn-submit {
        width: 100%;
        padding: 0.7rem 1.2rem;
    }
}

/* Markdown content styling for product descriptions */
.short-desc > *:first-child,
.long-description > *:first-child {
  margin-top: 0;
}
.long-description img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 1rem 0;
}
.long-description h1,
.long-description h2,
.long-description h3,
.long-description h4,
.long-description h5,
.long-description h6 {
  color: var(--text);
  margin: 1.5rem 0 0.75rem;
  line-height: 1.4;
}
.long-description ul,
.long-description ol,
.short-desc ul,
.short-desc ol {
  padding-inline-start: 1.5rem;
}
.long-description blockquote,
.short-desc blockquote {
  border-right: 3px solid var(--primary);
  padding-right: 1rem;
  margin: 1rem 0;
  color: var(--text-secondary);
}
.long-description code,
.short-desc code {
  background: rgba(0, 240, 255, 0.1);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}
.long-description pre,
.short-desc pre {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: var(--radius);
  overflow-x: auto;
}



/* =========================================================
   PRODUCT DETAIL MAIN IMAGE + LIGHTBOX FIX
   ========================================================= */

/* Main image frame */
.main-image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary, rgba(10, 14, 29, 0.95));
  border-radius: var(--radius-lg, 1.25rem);
  margin: 0 auto;
}

/* Full image inside frame, never cropped or overflowing */
.main-image-container img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  display: block;
}

/* Thumbnails */
.thumbnail-strip .thumbnail-item {
  overflow: hidden;
  border-radius: 0.75rem;
}

.thumbnail-strip .thumbnail-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Fullscreen lightbox */
.pdp-lightbox {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  z-index: 9500 !important;
  display: none !important;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.95) !important;
  padding: clamp(1rem, 4vw, 2rem);
  overflow: auto !important;
}

.pdp-lightbox.active {
  display: flex !important;
}

.pdp-lightbox img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain !important;
  border-radius: 0.75rem;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6);
  display: block;
  margin: auto;
}


/* =========================================================
   PRODUCT LIGHTBOX STACKING CONTEXT FIX
   Stops the navbar from covering the fullscreen image.
   ========================================================= */

/* Allow product-page fixed elements to escape the main-container stacking context */
body .main-container {
  z-index: auto !important;
}

/* Force product lightbox above everything except native browser UI */
.pdp-lightbox {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  z-index: 2147483000 !important;
  display: none !important;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.96) !important;
  padding: clamp(1rem, 4vw, 2rem) !important;
  overflow: auto !important;
}

.pdp-lightbox.active {
  display: flex !important;
}

.pdp-lightbox img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain !important;
  border-radius: 0.75rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65);
  display: block;
  margin: auto;
}