@import url('https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;600;800&display=swap');

:root {
    --cobalt: #1e40af;
    --deep-black: #0a0a0a;
    --glass: rgba(255, 255, 255, 0.03);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--deep-black);
    color: white;
    scroll-behavior: smooth;
}

.glass-nav {
    backdrop-filter: blur(16px);
    background-color: rgba(0, 0, 0, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gradient-text {
    background: linear-gradient(to right, #ffffff, #60a5fa, #93c5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.product-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(145deg, #121212, #080808);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.product-card:hover {
    transform: translateY(-12px);
    border-color: var(--cobalt);
    box-shadow: 0 25px 50px -12px rgba(30, 64, 175, 0.25);
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 800px;
    height: 100%;
    max-height: 800px;
    background: radial-gradient(circle, rgba(30, 64, 175, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: 1;
    pointer-events: none;
}

/* ============================================================
   Mobile Side Drawer (≤ 767px only)
   ============================================================ */

/* Dark backdrop */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 190;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    transition: background 0.35s ease, backdrop-filter 0.35s ease;
    pointer-events: none;
}

.mobile-menu-overlay.open {
    display: block;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    pointer-events: all;
}

/* Drawer panel — slides in from the right */
.mobile-side-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100vw;               /* full screen on mobile */
    max-width: 100vw;
    z-index: 195;
    background: #080808;
    border-left: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    padding: 0;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    pointer-events: none;
}

.mobile-side-drawer.open {
    transform: translateX(0);
    pointer-events: all;
}

/* Header row: logo + close */
.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.mobile-drawer-close {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #a1a1aa;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.mobile-drawer-close:hover {
    background: rgba(255,255,255,0.1);
    color: #ffffff;
}

/* Nav link list */
.mobile-drawer-nav {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 2rem 0;
    gap: 0;
    overflow-y: auto;
}

.mobile-drawer-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.75rem;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.2s, color 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.mobile-drawer-link:active,
.mobile-drawer-link:hover {
    background: rgba(59,130,246,0.06);
    color: #60a5fa;
}

.mobile-drawer-link__label {
    /* inherits from parent */
}

.mobile-drawer-link__arrow {
    font-size: 0.7rem;
    color: #3f3f46;
    transition: color 0.2s;
}

.mobile-drawer-link:hover .mobile-drawer-link__arrow,
.mobile-drawer-link:active .mobile-drawer-link__arrow {
    color: #3b82f6;
}

/* CTA button */
.mobile-drawer-cta {
    padding: 1.5rem 1.75rem;
}

.mobile-drawer-cta__btn {
    width: 100%;
    background: #1e40af;
    color: #ffffff;
    padding: 1.1rem 1.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: background 0.25s, transform 0.15s;
}

.mobile-drawer-cta__btn:active {
    transform: scale(0.97);
    background: #1d4ed8;
}

/* Footer label */
.mobile-drawer-footer {
    text-align: center;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #3f3f46;
    padding: 1rem 0 2rem;
}

/* Ensure the drawer is invisible + non-interactive on md+ screens */
@media (min-width: 768px) {
    .mobile-side-drawer,
    .mobile-menu-overlay {
        display: none !important;
    }
}

.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: #000;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #1e40af;
    border-radius: 10px;
}
.shop-tab {
    transition: all 0.3s ease;
    position: relative;
}
.shop-tab.active {
    color: #60a5fa;
}
.shop-tab.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: #1e40af;
    border-radius: 99px;
    box-shadow: 0 0 10px #1e40af;
}
.product-card.hidden {
    display: none;
}
.view-section {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}
.view-section.active {
    display: block;
    opacity: 1;
}

/* Modal / Cart Styles */
.modal-blur {
    backdrop-filter: blur(12px);
    background: rgba(0, 0, 0, 0.8);
}
.cart-badge {
    background: #1e40af;
    box-shadow: 0 0 15px rgba(30, 64, 175, 0.5);
}

.checkout-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}
.checkout-input:focus {
    border-color: #3b82f6;
    background: rgba(255, 255, 255, 0.08);
    outline: none;
}

/* ============================================================
   Shop Grid Card — growthguys.is-inspired clean layout
   ============================================================ */
.shop-grid-card {
    display: flex;
    flex-direction: column;
    background: #111111;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 1rem;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.35s ease,
                box-shadow 0.35s ease;
}

.shop-grid-card:hover {
    transform: translateY(-6px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 20px 40px -8px rgba(30, 64, 175, 0.2);
}

/* Image zone: square aspect ratio via padding-bottom trick */
.shop-grid-card__image-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* 1:1 square */
    overflow: hidden;
    background: #0d0d0d;
}

.shop-grid-card__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.shop-grid-card:hover .shop-grid-card__image {
    transform: scale(1.06);
}

/* Body zone */
.shop-grid-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.1rem 1.25rem 1.25rem;
    flex: 1;
}

/* Category / type tag */
.shop-grid-card__tag {
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #60a5fa;
}

/* Title + price row */
.shop-grid-card__title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.shop-grid-card__title {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.3;
    color: #ffffff;
    flex: 1;
    min-width: 0;
}

.shop-grid-card__price {
    font-size: 0.82rem;
    font-weight: 600;
    color: #e2e8f0;
    white-space: nowrap;
    padding-top: 0.05rem;
    flex-shrink: 0;
}

/* Batch number badge */
.shop-grid-card__batch {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #3b82f6;
    font-family: monospace;
    opacity: 0.75;
    margin-top: -0.15rem;
}

/* Description snippet */
.shop-grid-card__meta {
    font-size: 0.72rem;
    color: #6b7280;
    line-height: 1.5;
    margin-top: 0.15rem;
    flex: 1;
}

/* CTA button */
.shop-grid-card__cta {
    margin-top: auto;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
    width: 100%;
    background: #1e40af;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease;
}

.shop-grid-card__cta:hover {
    background: #ffffff;
    color: #0a0a0a;
}

/* Override the shop grid layout to 2-col on sm, 3-col on lg, 4-col on xl */
#full-product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 640px)  { #full-product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { #full-product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { #full-product-grid { grid-template-columns: repeat(4, 1fr); } }

#home-product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 640px)  { #home-product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { #home-product-grid { grid-template-columns: repeat(3, 1fr); } }

/* ============================================================
   Sold-Out States
   ============================================================ */

/* Overlay badge on product card image */
.sold-out-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: rgba(239, 68, 68, 0.85);
    color: #ffffff;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 0.35rem 0.75rem;
    border-radius: 99px;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 2;
    pointer-events: none;
}

/* Whole card — dim and desaturate when sold out */
.shop-grid-card.sold-out {
    filter: grayscale(0.45) brightness(0.8);
    cursor: default;
}

/* Don't lift on hover when sold out */
.shop-grid-card.sold-out:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.07);
    box-shadow: none;
}

/* Don't zoom image on hover when sold out */
.shop-grid-card.sold-out:hover .shop-grid-card__image {
    transform: none;
}

/* Disabled CTA button */
.shop-grid-card__cta--soldout,
.shop-grid-card__cta--soldout:hover {
    background: #27272a;
    color: #71717a;
    cursor: not-allowed;
}

/* ============================================================
   Mobile 2-col card — compact overrides (< 640px only)
   ============================================================ */
@media (max-width: 639px) {
    /* Tighter body padding so content isn't squeezed */
    .shop-grid-card__body {
        padding: 0.75rem 0.8rem 0.85rem;
        gap: 0.3rem;
    }

    /* Slightly smaller title to fit 2 columns */
    .shop-grid-card__title {
        font-size: 0.78rem;
        line-height: 1.25;
    }

    /* Price inline with title — keep readable */
    .shop-grid-card__price {
        font-size: 0.68rem;
    }

    /* Clip description to 2 lines so card height stays uniform */
    .shop-grid-card__meta {
        font-size: 0.62rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Compact CTA button */
    .shop-grid-card__cta {
        padding-top: 0.6rem;
        padding-bottom: 0.6rem;
        font-size: 0.6rem;
        letter-spacing: 0.1em;
        border-radius: 0.4rem;
    }
}

/* ============================================================
   Fullscreen Product Modal — mobile only (< 768px)
   ============================================================ */
@media (max-width: 767px) {
    /* Image panel: viewport-relative height — tall enough to showcase the product,
       compact enough that Add to Cart is visible without scrolling */
    .modal-image-panel {
        min-height: 55vw;
        max-height: 55vw;
        flex-shrink: 0;
    }

    /* Content side: fill remaining height and scroll */
    #product-modal .modal-image-panel ~ div {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Reset on desktop — let flex-row layout handle sizing */
@media (min-width: 768px) {
    .modal-image-panel {
        min-height: 0;
        max-height: none;
    }
}
