/* ============================================================
   POLAFRAMES — Main Stylesheet
   ─────────────────────────────────────────────────────────
   Sections:
    1.  Custom Fonts
    2.  Design Tokens (CSS Custom Properties)
    3.  CSS Reset & Base Styles
    4.  Layout Utilities
    5.  Announcement Bar
    6.  Navigation Header
    7.  Mobile Hamburger Menu
    8.  Button System
    9.  Hero Section
   10.  Stacked Deck Photo Showcase
   11.  Vibes / Product Info Cards
   12.  Shop Section & Filter Bar
   13.  Product Grid & Cards
   14.  Features Section
   15.  Testimonials Section
   16.  Site Footer
   17.  Cart Drawer
   18.  Entrance Animations
   19.  Responsive Breakpoints (768px, 1024px, 1280px)
   ============================================================ */


/* ─── 1. CUSTOM FONTS ─────────────────────────────────── */

@font-face {
    font-family: 'Pulang';
    src: url('assets/pulang/Pulang.ttf') format('truetype'),
         url('assets/pulang/Pulang.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap; /* Prevent invisible text during font load */
}


/* ─── 2. DESIGN TOKENS ────────────────────────────────── */

:root {
    /* ── Colors ── */
    --color-bg:           #faf7f2;               /* Warm cream — main background */
    --color-white:        #ffffff;
    --color-text:         #3d3130;               /* Deep warm brown — primary text */
    --color-text-muted:   #8c7d7a;               /* Muted warm gray — secondary text */
    --color-accent:       #ffbbf2;               /* Signature bubbly pink */
    --color-accent-hover: #e8a5db;               /* Deeper pink for hover states */
    --color-accent-light: rgba(255, 187, 242, 0.15); /* Tint for hover backgrounds */
    --color-border:       rgba(61, 49, 48, 0.1); /* Soft, visible border */
    --color-price:        #59b275;               /* Friendly green for prices */
    --color-warning:      #f59e0b;               /* Amber for low-stock badges */
    --color-danger:       #ef4444;               /* Red for out-of-stock */

    /* Stock badge palette */
    --stock-in-bg:    #d4edda;
    --stock-in-text:  #155724;
    --stock-low-bg:   #fff3cd;
    --stock-low-text: #856404;
    --stock-out-bg:   #f8d7da;
    --stock-out-text: #721c24;

    /* ── Typography ── */
    --font-primary: 'Outfit', sans-serif;    /* Body copy */
    --font-header:  'Fredoka', sans-serif;   /* Display / section headings */
    --font-logo:    'Pulang', sans-serif;    /* Brand wordmark */

    /* ── Spacing & Layout ── */
    --container-width: 1380px; /* Wide container for full-width feel */
    --section-pad-y:   5rem;   /* Vertical padding for sections */
    --section-pad-x:   1.5rem; /* Horizontal padding (overridden at breakpoints) */

    /* ── Border Radius ── */
    --radius-sm:   16px;
    --radius-md:   24px;
    --radius-lg:   32px;
    --radius-full: 9999px;

    /* ── Shadows ── */
    --shadow-sm:       0 4px  12px rgba(61, 49, 48, 0.05);
    --shadow-md:       0 12px 32px rgba(61, 49, 48, 0.06);
    --shadow-lg:       0 20px 48px rgba(61, 49, 48, 0.10);
    --shadow-btn:      0 8px  24px rgba(223, 151, 163, 0.25);
    --shadow-btn-hover:0 12px 32px rgba(223, 151, 163, 0.35);

    /* ── Transitions ── */
    --transition:        all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-fast:   all 0.15s ease;
    --transition-spring: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);

    /* ── Logo ── */
    --logo-size: 44px;
}


/* ─── 3. CSS RESET & BASE ─────────────────────────────── */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg);
    color: var(--color-text);
    overflow-x: hidden;
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

button {
    font-family: var(--font-primary);
    cursor: pointer;
    border: none;
    background: none;
}

/* Accessible screen-reader-only utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}


/* ─── 4. LAYOUT UTILITIES ─────────────────────────────── */

/* Full-width container with a max-width cap for readability */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin-inline: auto;
    padding-inline: var(--section-pad-x);
}

/* Generic section heading shared across all sections */
.section-title {
    font-family: var(--font-header);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--color-text);
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 3rem;
}

/* Empty-state message centered inside grid containers */
.no-products-msg {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--color-text-muted);
    padding: 3rem 0;
    font-size: 1rem;
}


/* ─── 5. ANNOUNCEMENT BAR ─────────────────────────────── */

.announcement-bar {
    background: var(--color-accent);
    color: var(--color-white);
    text-align: center;
    padding: 0.6rem 1rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    position: relative;
    z-index: 200;
}


/* ─── 6. NAVIGATION HEADER ────────────────────────────── */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(250, 247, 242, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
}

/* Inner row that holds logo, nav, and action buttons */
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: var(--container-width);
    margin-inline: auto;
    padding-inline: var(--section-pad-x);
    height: 70px;
}

/* ── Logo ── */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-img {
    width: var(--logo-size);
    height: var(--logo-size);
    border-radius: 50%;
    object-fit: contain;
    background: var(--color-white);
    box-shadow: var(--shadow-sm);
}

.logo-text {
    font-family: var(--font-logo);
    font-size: 26px;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* ── Desktop nav links — hidden on mobile, shown at 1024px+ ── */
.nav-links {
    display: none;
    align-items: center;
    gap: 2.5rem;
}

.nav-links a {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    position: relative;
    transition: var(--transition-fast);
}

/* Animated underline indicator */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--color-accent-hover);
    border-radius: 2px;
    transition: width 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-accent-hover);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* ── Right-side action buttons (cart + hamburger) ── */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Cart icon button */
.cart-btn {
    position: relative;
    font-size: 1.35rem;
    color: var(--color-text);
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-full);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.cart-btn:hover {
    background: var(--color-accent-light);
}

/* Cart item count bubble — hidden until items are added */
.cart-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    background: var(--color-accent);      /* Fixed: was referencing undefined --primary-color */
    color: var(--color-white);
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: 50%;
    width: 19px;
    height: 19px;
    display: none;                        /* Hidden by default */
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* .visible class is toggled by cart.js when count > 0 */
.cart-badge.visible {
    display: flex;
}


/* ─── 7. MOBILE HAMBURGER MENU ────────────────────────── */

/* Three-line hamburger button */
.hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.hamburger-btn:hover {
    background: var(--color-accent-light);
}

/* Individual lines */
.hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: var(--transition);
    transform-origin: center;
}

/* Animate to × when menu is open */
.hamburger-btn.open .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger-btn.open .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger-btn.open .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Translucent overlay that dims the page behind the open menu */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(61, 49, 48, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.open {
    opacity: 1;
    pointer-events: all;
}

/* Slide-in panel from the right */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;                           /* Hidden off-screen */
    width: min(320px, 82vw);
    height: 100vh;
    background: var(--color-white);
    z-index: 95;
    padding: 5.5rem 2rem 2rem;
    transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -10px 0 40px rgba(61, 49, 48, 0.12);
    overflow-y: auto;
}

.mobile-menu.open {
    right: 0;
}

/* Mobile nav link list */
.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mobile-nav-links a {
    display: block;
    padding: 1rem 0;
    font-size: 1.35rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
    transition: var(--transition-fast);
}

.mobile-nav-links a:hover {
    color: var(--color-accent-hover);
    padding-left: 0.6rem;
}


/* ─── 8. BUTTON SYSTEM ────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 2rem;
    border-radius: var(--radius-full);
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

/* Primary — solid pink */
.btn-primary {
    background: var(--color-accent);
    color: var(--color-white);
    box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
    background: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-btn-hover);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-btn);
}

/* Secondary — white ghost */
.btn-secondary {
    background: var(--color-white);
    color: var(--color-text);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* Disabled state for out-of-stock buttons */
.btn-disabled,
.btn-primary.btn-disabled {
    background: #f0ebe6 !important;
    color: #a89e9a !important;
    box-shadow: none !important;
    transform: none !important;
    cursor: not-allowed;
    pointer-events: none;
}


/* ─── 9. HERO SECTION ─────────────────────────────────── */

.hero {
    padding-block: 3rem 4rem;
    overflow: hidden;
}

/* Mobile: vertical stack; desktop: side-by-side (see breakpoints) */
.hero .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    text-align: center;
}

/* Text half */
.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;  /* Left-aligned on desktop via breakpoint override */
    width: 100%;
    max-width: 680px;
}

.hero-title {
    font-family: var(--font-header);
    font-size: clamp(2.6rem, 7vw, 5rem);
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.07;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.18rem);
    color: var(--color-text-muted);
    line-height: 1.75;
    font-weight: 500;
    margin-bottom: 2rem;
    max-width: 560px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center; /* Left-justified on desktop via breakpoint */
    margin-bottom: 2.5rem;
}

/* Trust highlight badges */
.hero-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center; /* Left-justified on desktop via breakpoint */
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text);
}

.highlight-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
    line-height: 1;
}


/* ─── 10. STACKED DECK PHOTO SHOWCASE ─────────────────── */

.hero-deck {
    position: relative;
    width: 100%;
    max-width: 360px;
    height: 360px;
    flex-shrink: 0;
}

/* Individual photo cards inside the fan */
.deck-card {
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: var(--radius-lg);
    background: var(--color-white);
    box-shadow: 0 20px 60px rgba(61, 49, 48, 0.12);
    overflow: hidden;
    transition: all 0.65s cubic-bezier(0.25, 0.8, 0.25, 1);
    left: 50%;
    top: 50%;
}

.deck-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

/* Default stacked / layered positions */
.deck-card:nth-child(1) {
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
    z-index: 5;
}
.deck-card:nth-child(2) {
    transform: translate(-50%, calc(-50% - 18px)) rotate(-4deg) scale(0.94);
    z-index: 4;
    opacity: 0.9;
}
.deck-card:nth-child(3) {
    transform: translate(-50%, calc(-50% - 32px)) rotate(5deg) scale(0.88);
    z-index: 3;
    opacity: 0.8;
}
.deck-card:nth-child(4) {
    transform: translate(-50%, calc(-50% - 44px)) rotate(-7deg) scale(0.82);
    z-index: 2;
    opacity: 0.7;
}

/* On hover, fan out to reveal each card */
.hero-deck:hover .deck-card:nth-child(1) {
    transform: translate(-50%, calc(-50% - 42px)) rotate(2deg) scale(1.04);
    box-shadow: 0 32px 80px rgba(61, 49, 48, 0.18);
}
.hero-deck:hover .deck-card:nth-child(2) {
    transform: translate(calc(-50% - 66px), calc(-50% + 24px)) rotate(-12deg) scale(0.94);
}
.hero-deck:hover .deck-card:nth-child(3) {
    transform: translate(calc(-50% + 66px), calc(-50% + 24px)) rotate(12deg) scale(0.88);
}
.hero-deck:hover .deck-card:nth-child(4) {
    transform: translate(-50%, calc(-50% + 44px)) rotate(-14deg) scale(0.82);
}


/* ─── 11. VIBES / PRODUCT INFO CARDS ──────────────────── */

.vibes-section {
    padding-block: var(--section-pad-y);
    background: var(--color-white);
}

.vibes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/* Individual vibe card */
.vibe-card {
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    padding: 2.25rem;
    transition: var(--transition);
}

.vibe-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.vibe-card-title {
    font-family: var(--font-logo);
    font-size: 1.75rem;
    color: var(--color-accent-hover);
    text-transform: uppercase;
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px dashed var(--color-border);
}

.vibe-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.vibe-item {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.vibe-icon {
    font-size: 1.5rem;
    background: var(--color-accent-light);
    border-radius: var(--radius-sm);
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
}

.vibe-item h4 {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text);
    margin-bottom: 0.35rem;
}

.vibe-item p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.65;
}


/* ─── 12. SHOP SECTION & FILTER BAR ───────────────────── */

.shop-section {
    padding-block: var(--section-pad-y);
}

/* Frosted glass pill bar for sort controls */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: var(--radius-full);
    padding: 0.9rem 1.75rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-sm);
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
}

.filter-label {
    font-size: 0.88rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text);
    margin-right: 0.25rem;
}

.filter-btn {
    background: var(--color-white);
    color: var(--color-text);
    padding: 0.5rem 1.15rem;
    border-radius: var(--radius-full);
    font-family: var(--font-primary);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.filter-btn:hover {
    background: var(--color-accent-light);
    color: var(--color-accent-hover);
    transform: translateY(-1px);
}

.filter-btn.active {
    background: var(--color-accent);
    color: var(--color-white);
    box-shadow: var(--shadow-btn);
}


/* ─── 13. PRODUCT GRID & CARDS ────────────────────────── */

/* Two-column grid on desktop, single column on mobile */
.product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

/* ── Product Card ── */
.product-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

/* ── Image Section (top half of card) ── */
.card-image-section {
    position: relative;
    padding: 2rem;
    /* Background tint is set inline by JS to match the selected color */
    transition: background 0.35s ease;
}

/* Inner square containing front/back images */
.card-image-inner {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    background: var(--color-white);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Front and back photos stacked; only one visible at a time */
.product-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1.25rem;
    background: var(--color-white);
    transition:
        opacity   0.5s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-img-front {
    opacity: 1;
    z-index: 2;
}

.product-img-back {
    opacity: 0;
    z-index: 1;
}

/* Hover (or JS-forced hover) flips to back image */
.card-image-inner:hover .product-img-front,
.product-card.force-hover .product-img-front {
    opacity: 0;
    transform: scale(1.06) rotate(-2deg);
}

.card-image-inner:hover .product-img-back,
.product-card.force-hover .product-img-back {
    opacity: 1;
    transform: scale(1.06) rotate(2deg);
    z-index: 2;
}

/* ── Stock Availability Badge ── */
.stock-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 13px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    z-index: 10;
}

.stock-in  { background: var(--stock-in-bg);  color: var(--stock-in-text);  }
.stock-low { background: var(--stock-low-bg); color: var(--stock-low-text); }
.stock-out { background: var(--stock-out-bg); color: var(--stock-out-text); }

/* ── Content Section (bottom half of card) ── */
.card-content-section {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

/* Small "SOLIDS" / "CHECKERS" eyebrow label */
.card-line-badge {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-accent-hover);
}

/* Product name (h3 for correct heading hierarchy) */
.card-title {
    font-family: var(--font-primary);
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.08;
    color: var(--color-text);
    margin-top: 0.1rem;
}

/* Color name sub-label — updated by JS on swatch click */
.card-color-name {
    font-size: 0.88rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}

/* SKU in monospace */
.card-sku {
    font-family: monospace;
    font-size: 0.72rem;
    color: var(--color-text-muted);
    letter-spacing: 0.04em;
}

/* Price display */
.card-price {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--color-price);
    margin-top: 0.3rem;
}

/* Row of color dot swatches */
.card-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0.6rem;
}

/* Individual round color swatch button */
.color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: var(--transition-spring);
    border: none;
    flex-shrink: 0;
}

.color-swatch:hover {
    transform: scale(1.18) translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.14);
}

/* Active swatch gets a ring + checkmark */
.color-swatch.active {
    transform: scale(1.18) translateY(-2px);
    outline: 2px solid var(--color-text);
    outline-offset: 2px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.16);
}

/* Checkmark overlay — color adapts to swatch lightness via --check-color */
.color-swatch.active::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 900;
    color: var(--check-color, #ffffff);
}

/* Add to cart button spans full card width */
.card-buy-btn {
    width: 100%;
    margin-top: 1rem;
}


/* ─── 14. FEATURES SECTION ────────────────────────────── */

.features-section {
    padding-block: var(--section-pad-y);
    background: var(--color-white);
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Icon circle with pink background */
.feature-icon {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 12px 28px rgba(223, 151, 163, 0.22);
    line-height: 1;
}

.feature-title {
    font-size: 1.05rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text);
    margin-bottom: 0.6rem;
}

.feature-desc {
    font-size: 0.93rem;
    color: var(--color-text-muted);
    line-height: 1.65;
    max-width: 280px;
}


/* ─── 15. TESTIMONIALS SECTION ────────────────────────── */

.testimonials-section {
    padding-block: var(--section-pad-y);
    background: linear-gradient(
        135deg,
        rgba(223, 151, 163, 0.05) 0%,
        rgba(223, 151, 163, 0.13) 100%
    );
}

.testimonials-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.testimonial-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 2.25rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.testimonial-stars {
    color: var(--color-warning);
    font-size: 1.1rem;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.testimonial-text {
    font-size: 1rem;
    color: var(--color-text);
    line-height: 1.75;
    font-style: italic;
    margin-bottom: 1.5rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Circular avatar photo */
.author-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.author-name {
    font-size: 0.88rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text);
    display: block;
}

.author-handle {
    font-size: 0.76rem;
    color: var(--color-text-muted);
    display: block;
}


/* ─── 16. SITE FOOTER ─────────────────────────────────── */

/*
 * Note: No hover color-change on the footer.
 * The previous accidental footer:hover rule that flipped
 * background+text colors has been intentionally removed.
 */
.site-footer {
    background: var(--color-accent);
    padding-block: 4.5rem;
    text-align: center;
    color: var(--color-white);
}

/* Logo row inside pink footer */
.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 1.75rem;
}

/* Override logo image background for contrast on pink footer */
.site-footer .logo-img {
    background: rgba(255, 255, 255, 0.25);
}

/* White logo text inside footer */
.site-footer .logo-text {
    color: var(--color-white);
}

/* Footer navigation links */
.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.75rem;
    margin-bottom: 1.75rem;
}

.footer-nav a {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-white);
    opacity: 0.88;
    transition: var(--transition-fast);
}

.footer-nav a:hover {
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Brand description paragraph */
.footer-about {
    max-width: 520px;
    margin-inline: auto;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.75;
    opacity: 0.82;
}

.footer-copyright {
    font-size: 0.76rem;
    opacity: 0.65;
}


/* ─── 17. CART DRAWER ─────────────────────────────────── */

/* Dimming overlay — clicking it closes the cart */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.42);
    z-index: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.cart-overlay.open {
    opacity: 1;
    pointer-events: all;
}

/* Slide-in drawer panel */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -450px;              /* Hidden off-screen by default */
    width: min(420px, 100vw);
    height: 100vh;
    background: var(--color-white);
    z-index: 510;
    display: flex;
    flex-direction: column;
    box-shadow: -12px 0 40px rgba(61, 49, 48, 0.14);
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-drawer.open {
    right: 0;
}

/* Cart header row */
.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.75rem;
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}

.cart-header h2 {
    font-family: var(--font-header);
    font-size: 1.5rem;
    color: var(--color-text);
}

.cart-close-btn {
    font-size: 1.5rem;
    color: var(--color-text-muted);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    transition: var(--transition-fast);
    line-height: 1;
}

.cart-close-btn:hover {
    color: var(--color-text);
    background: var(--color-accent-light);
}

/* Scrollable item list area */
.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.75rem;
}

/* Message shown when cart is empty */
.cart-empty-msg {
    text-align: center;
    color: var(--color-text-muted);
    padding-top: 2rem;
    font-size: 0.95rem;
}

/* ── Cart Item Row ── */
.cart-item {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--color-border); /* Fixed: was transparent */
}

.cart-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.cart-item-img {
    width: 76px;
    height: 76px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
    min-width: 0; /* Prevents text overflow from breaking layout */
}

.cart-item-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price {
    font-size: 0.83rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

/* Quantity stepper row */
.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cart-qty-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: var(--color-white);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-text);
    transition: var(--transition-fast);
    flex-shrink: 0;
    line-height: 1;
}

.cart-qty-btn:hover {
    background: var(--color-accent-light);
    border-color: var(--color-accent);
}

.cart-qty-count {
    font-size: 0.88rem;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

/* Remove (×) button */
.cart-remove-btn {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    padding: 0.25rem;
    border-radius: var(--radius-full);
    transition: var(--transition-fast);
    flex-shrink: 0;
    line-height: 1;
    cursor: pointer;
}

.cart-remove-btn:hover {
    color: var(--color-danger);
    background: rgba(239, 68, 68, 0.08);
}

/* ── Cart Footer (subtotal + checkout) ── */
.cart-footer {
    padding: 1.5rem 1.75rem;
    border-top: 1px solid var(--color-border);
    background: var(--color-bg);
    flex-shrink: 0;
}

.cart-subtotal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text);
}

.cart-checkout-btn {
    width: 100%;
}


/* ─── 18. ENTRANCE ANIMATIONS ─────────────────────────── */

/* Elements with .fade-in start invisible */
.fade-in {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* Added by IntersectionObserver in app.js when element enters viewport */
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger helpers — applied as additional classes on individual children */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }


/* ─── 19. RESPONSIVE BREAKPOINTS ──────────────────────── */

/* ═══ Tablet: 768px+ ══════════════════════════════════ */
@media (min-width: 768px) {
    :root {
        --section-pad-x: 2.5rem;
    }

    /* Hero becomes side-by-side: text left, deck right */
    .hero .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: left;
        gap: 4rem;
    }

    .hero-content {
        align-items: flex-start;
        max-width: none;
        flex: 1;
    }

    .hero-actions,
    .hero-highlights {
        justify-content: flex-start;
    }

    .hero-deck {
        max-width: 420px;
        height: 420px;
    }

    .deck-card {
        width: 300px;
        height: 300px;
    }

    /* Vibes: 2 columns */
    .vibes-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Testimonials: 2 columns */
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ═══ Desktop: 1024px+ ════════════════════════════════ */
@media (min-width: 1024px) {
    :root {
        --section-pad-y: 7rem;
        --section-pad-x: 3rem;
    }

    /* Show desktop nav links, hide hamburger */
    .nav-links {
        display: flex;
    }

    .hamburger-btn {
        display: none;
    }

    /* Taller hero with more breathing room */
    .hero {
        padding-block: 5rem 7rem;
    }

    /* Larger deck cards */
    .hero-deck {
        max-width: 490px;
        height: 490px;
    }

    .deck-card {
        width: 350px;
        height: 350px;
    }

    /* Product grid: 2 columns */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Features: 3 columns */
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Testimonials: 3 columns */
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ═══ Wide Desktop: 1280px+ ═══════════════════════════ */
@media (min-width: 1280px) {
    :root {
        --section-pad-x: 4rem;
    }

    /* Maximum deck size */
    .hero-deck {
        max-width: 540px;
        height: 540px;
    }

    .deck-card {
        width: 390px;
        height: 390px;
    }
}
