/* =========================================
   APPLE-STYLE STICKY SUB-NAV RIBBON
   ========================================= */
:root {
    /* Perfectly matches the math of your main navbar: 
       Logo Height + (Top/Bottom Padding * 2) + 1px border */
    --nav-height: calc(clamp(40px, 6vw, 75px) + (clamp(15px, 2vw, 25px) * 2) + 1px);
}

.product-subnav {
    position: sticky;
    top: var(--nav-height);
    z-index: 95;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    margin-top: var(--nav-height); /* Clears the fixed main navbar on initial load */
    transition: background 0.3s ease;
}

.subnav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    height: 54px;
}

/* Left: Horizontal Pill Switcher */
.subnav-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -webkit-overflow-scrolling: touch;
    padding: 4px 0;
}

.subnav-switcher::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.subnav-pill {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 2px 14px;
    border-radius: 20px;
    color: var(--text-muted);
    text-decoration: none;
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.subnav-pill:hover {
    color: var(--text);
    background: rgba(0, 0, 0, 0.07);
}

/* Active Pill Highlight */
.subnav-pill.active {
    background: var(--twilight);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.subnav-divider {
    width: 1px;
    height: 20px;
    background-color: #cbd5e1; /* Light slate color */
    margin: 0 4px;
    flex-shrink: 0;
}

/* Right: Price & Buy Button */
.subnav-action {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.subnav-price {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text);
    white-space: nowrap;
}

.btn-subnav-buy {
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    padding: 7px 20px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-subnav-buy:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 157, 148, 0.25);
}

/* =========================================
   SUBNAV GROUPS & LABELS
   ========================================= */
.subnav-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 4px; /* Space between the label and the pills */
}

.subnav-group-label {
    font-size: 0.55rem;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1px;
    padding-left: 4px;
    line-height: 1;
    opacity: 0.6;
}

.subnav-group-pills {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Adjust the divider to align with the bottom row of pills */
.subnav-divider {
    width: 1px;
    height: 24px;
    background-color: #cbd5e1;
    margin: 0 8px;
    align-self: flex-end; 
    margin-bottom: 3px; /* Nudges it up to center alongside the pills */
    flex-shrink: 0;
}

/* Product Section Alignment (Replaces the old 140px padding hack) */
.section-shop {
    padding-top: 40px !important;
    padding-bottom: 60px;
}

.subnav-switcher-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 1 auto;       /* Takes up remaining space */
    min-width: 0;         /* CRITICAL: Prevents flexbox from forcing horizontal page scroll */
    margin-right: 20px;
}

.subnav-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 4px 0;
    width: 100%;
    scroll-behavior: smooth; /* Ensures clicking the arrow glides smoothly */
}

/* Hide scrollbar for Chrome/Safari */
.subnav-switcher::-webkit-scrollbar {
    display: none;
}

.switcher-arrow {
    display: none; /* Hidden by default; JavaScript will reveal if needed */
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    height: 100%;
    width: 35px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s ease;
}

.switcher-arrow:hover {
    color: var(--primary);
}

.switcher-arrow .lucide {
    width: 18px;
    height: 18px;
}

/* Left Arrow with Fade to Right */
.switcher-arrow.left-arrow {
    left: 0;
    background: linear-gradient(to right, rgba(255,255,255,0.95) 40%, rgba(255,255,255,0));
    justify-content: flex-start;
}

/* Right Arrow with Fade to Left */
.switcher-arrow.right-arrow {
    right: 0;
    background: linear-gradient(to left, rgba(255,255,255,0.95) 40%, rgba(255,255,255,0));
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .section-shop {
        padding-top: 25px !important;
    }

    .subnav-price {
        font-size: 1rem;
    }

    .btn-subnav-buy {
        padding: 6px 16px;
    }
}

/* =========================================
   PRODUCT PAGE ACCORDION
   ========================================= */
.product-accordion {
    margin-top: 40px;
    border-top: 1px solid #e2e8f0;
}

.accordion-item {
    border-bottom: 1px solid #e2e8f0;
}

.accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    background: none;
    border: none;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
    cursor: pointer;
}

.accordion-header i {
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-header i {
    transform: rotate(180deg);
    color: var(--primary);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion-inner {
    padding-bottom: 20px;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.accordion-inner ul {
    padding-left: 20px;
    list-style-type: disc;
    margin-bottom: 10px;
}

.accordion-inner li {
    margin-bottom: 8px;
}

/* =========================================
   KIT BENTO GRID (What's in the Box)
   ========================================= */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.bento-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bento-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(15, 23, 42, 0.08);
    border-color: var(--primary);
}

.bento-img-wrap {
    height: 140px;
    width: 100%;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bento-img-wrap img {
    max-height: 100%;
    object-fit: contain;
    filter: none;
}

.bento-qty {
    background: #f1f5f9;
    color: var(--primary);
    font-weight: 800;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.bento-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    font-family: var(--font-head);
}

.bento-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Bento Card Image Zoom on Hover */
.bento-img-wrap {
    overflow: hidden;
}

.bento-img-wrap img {
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), filter 0.45s ease;
}

.bento-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 38px -10px rgba(15, 23, 42, 0.14);
    border-color: var(--primary);
}

.bento-card:hover .bento-img-wrap img {
    transform: scale(1.08);
    filter: none;
}
