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

:root {
    /* Apple-style pristine minimal palette */
    --background: #fbfbfd;       /* Apple off-white */
    --surface: #ffffff;          /* Pure white panels */
    --text-primary: #1d1d1f;     /* Deep charcoal, not pure black */
    --text-secondary: #86868b;   /* Apple signature gray text */
    --border: #d2d2d7;           /* Light subtle border */
    
    /* Vibrant, rich accents for contrast */
    --accent: #0071e3;           /* Apple classic blue */
    --accent-hover: #0077ED;
    --accent-gradient: linear-gradient(135deg, #0071e3, #4338ca);
    
    /* Radii */
    --radius-sm: 8px;
    --radius-md: 14px;           /* Slightly squarcle */
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    /* Apple-style diffuse shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 20px rgba(0, 113, 227, 0.3);
    
    /* Typography */
    --font-heading: 'Outfit', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    
    /* Fluidity */
    --transition-fluid: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s ease-out;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body { 
    font-family: var(--font-body); 
    background-color: var(--background); 
    color: var(--text-primary); 
    line-height: 1.5; 
    min-height: 100vh; 
    overflow-x: hidden;
    letter-spacing: -0.01em;
}

h1, h2, h3, h4, h5, h6 { 
    font-family: var(--font-heading); 
    font-weight: 700; 
    line-height: 1.1; 
    color: var(--text-primary); 
    letter-spacing: -0.03em;
}

a { color: var(--accent); text-decoration: none; transition: var(--transition-fast); }
a:hover { color: var(--accent-hover); }

/* Layout */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.container-fluid { width: 100%; max-width: 1600px; margin: 0 auto; padding: 0 2rem; }

/* Utilities */
.text-center { text-align: center; }
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.font-heading { font-family: var(--font-heading); }
.mt-4 { margin-top: 1rem; } .mt-8 { margin-top: 2rem; } .mt-12 { margin-top: 3rem; } .mt-20 { margin-top: 5rem; }
.mb-2 { margin-bottom: 0.5rem; } .mb-4 { margin-bottom: 1rem; } .mb-8 { margin-bottom: 2rem; }
.flex { display: flex; } .flex-col { flex-direction: column; }
.items-center { align-items: center; } .justify-center { justify-content: center; } .justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; } .gap-4 { gap: 1rem; } .gap-6 { gap: 1.5rem; } .gap-8 { gap: 2rem; }

/* Grid */
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1200px) { .grid-cols-5 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .grid-cols-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .grid-cols-5, .grid-cols-4, .grid-cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Template Grid (Expanded) */
.template-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); 
    gap: 2.5rem; 
    padding-bottom: 4rem; 
}
@media (max-width: 600px) { .grid-cols-5, .grid-cols-4, .grid-cols-3, .grid-cols-2 { grid-template-columns: 1fr; } }

/* Premium Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.8rem 1.8rem; border-radius: var(--radius-full);
    font-family: var(--font-heading); font-weight: 600; font-size: 1rem;
    cursor: pointer; transition: var(--transition-fluid); border: none; outline: none;
}
.btn-primary { background: var(--text-primary); color: white; }
.btn-primary:hover { transform: scale(1.02); box-shadow: var(--shadow-md); background: #000000; }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: var(--accent-hover); transform: scale(1.02); box-shadow: var(--shadow-glow); }
.btn-glass { 
    background: rgba(255,255,255,0.7); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    color: var(--text-primary); border: 1px solid rgba(0,0,0,0.05);
}
.btn-glass:hover { background: rgba(255,255,255,0.9); transform: scale(1.02); box-shadow: var(--shadow-sm); }

/* Glassmorphism Utilities */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-lg);
}

/* Global Nav */
.global-nav {
    position: sticky; top: 0; z-index: 1000;
    width: 100%; padding: 1rem 0;
    background: rgba(251, 251, 253, 0.8); /* Apple nav bg */
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.nav-content { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.nav-brand { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; color: var(--text-primary); display: flex; align-items: center; gap: 0.5rem; letter-spacing: -0.05em; }
.nav-links { display: flex; gap: 2.5rem; }
.nav-link { font-size: 0.85rem; color: var(--text-primary); font-weight: 500; opacity: 0.8; transition: var(--transition-fast); position: relative; }
.nav-link:hover { opacity: 1; }
.nav-link-active { opacity: 1; color: var(--accent); }
.nav-link-active::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 100%; height: 2px; background: var(--accent); border-radius: 2px; }

/* Mega Menu (Full Width — JS-driven hover for gap-proof stability) */
.nav-item-dropdown { position: relative; }
.mega-menu {
    position: fixed; top: var(--nav-bottom, 60px); left: 0; width: 100vw;
    background: var(--surface);
    border-bottom: 1px solid rgba(0,0,0,0.08);
    box-shadow: var(--shadow-lg); z-index: 999; padding: 2rem 0;
    display: flex; justify-content: center;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
    transform-origin: top center;
    transform: translateY(-4px);
}
/* JS adds .mega-menu-open to the .nav-item-dropdown */
.nav-item-dropdown.mega-menu-open .mega-menu {
    opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0);
}
/* Bridge: covers the gap between the nav link and the panel so the mouse doesn't escape */
.nav-item-dropdown.mega-menu-open::after {
    content: ''; position: fixed;
    top: var(--nav-bottom, 60px); left: 0;
    width: 100vw; height: 12px;
    background: transparent; z-index: 1000;
}
.mega-menu-content { display: flex; max-width: 1400px; width: 100%; gap: 3rem; margin: 0 auto; padding: 0 2rem; }
.mega-menu-col { display: flex; flex-direction: column; gap: 0.75rem; min-width: 160px; }
.mega-menu-title { font-family: var(--font-heading); font-size: 0.8rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.75rem; text-transform: uppercase; letter-spacing: 0.07em; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; }
.mega-menu-link { font-size: 0.9rem; color: var(--text-secondary); font-weight: 500; text-decoration: none; transition: var(--transition-fast); padding: 0.15rem 0; }
.mega-menu-link:hover { color: var(--text-primary); padding-left: 4px; }
.mega-menu-shortcuts { display: flex; gap: 1rem; margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--border); width: 100%; justify-content: space-between; }
.mega-menu-shortcut-tile { flex: 1; background: rgba(0,0,0,0.02); border-radius: var(--radius-md); padding: 1.5rem; text-align: center; font-weight: 600; color: var(--text-primary); transition: var(--transition-fast); }
.mega-menu-shortcut-tile:hover { background: rgba(0,0,0,0.05); transform: translateY(-2px); }
/* Template Cards (Apple Style) */
.template-card {
    background: transparent; border: none; position: relative;
    display: flex; flex-direction: column; cursor: pointer; text-decoration: none;
    transition: var(--transition-fluid);
}
.template-img-container {
    width: 100%; aspect-ratio: 3/4; background: white;
    border-radius: var(--radius-md); overflow: hidden; 
    box-shadow: var(--shadow-sm); transition: var(--transition-fluid);
    margin-bottom: 1rem; border: 1px solid rgba(0,0,0,0.03);
}
.template-card:hover .template-img-container {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg);
}
.template-card img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition-fluid); }
.template-title { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.25rem; }
.template-category { font-size: 0.85rem; color: var(--text-secondary); font-weight: 500; }

/* Horizontal Filtering Toolbar (Gallery) */
.toolbar-sticky {
    position: sticky; top: 60px; z-index: 900; 
    background: rgba(251, 251, 253, 0.8); backdrop-filter: blur(20px);
    padding: 1.5rem 0; margin-bottom: 3rem; border-bottom: 1px solid rgba(0,0,0,0.05);
}
.primary-pills { display: flex; gap: 0.75rem; overflow-x: auto; padding-bottom: 0.5rem; scrollbar-width: none; }
.primary-pills::-webkit-scrollbar { display: none; }
.pill-primary {
    padding: 0.6rem 1.5rem; border-radius: var(--radius-full); background: rgba(0,0,0,0.04);
    border: none; font-size: 0.95rem; font-weight: 600; color: var(--text-primary);
    cursor: pointer; white-space: nowrap; transition: var(--transition-fluid);
    font-family: var(--font-heading);
}
.pill-primary:hover { background: rgba(0,0,0,0.08); }
.pill-primary.active { background: var(--text-primary); color: white; }

.dropdown-filter { position: relative; }
.filter-btn {
    padding: 0.5rem 1.2rem; border-radius: var(--radius-full); background: white;
    border: 1px solid var(--border); font-size: 0.9rem; font-weight: 500; color: var(--text-primary);
    cursor: pointer; display: flex; align-items: center; gap: 0.5rem; transition: var(--transition-fluid);
    box-shadow: var(--shadow-sm);
}
.filter-btn:hover { border-color: var(--text-secondary); box-shadow: var(--shadow-md); }
.filter-btn svg { width: 14px; height: 14px; color: var(--text-secondary); }

.dropdown-menu {
    position: absolute; top: calc(100% + 10px); left: 0; min-width: 220px;
    background: rgba(255,255,255,0.85); backdrop-filter: blur(20px);
    border: 1px solid rgba(0,0,0,0.08); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); z-index: 100; padding: 1.25rem;
    opacity: 0; visibility: hidden; transform: translateY(-10px) scale(0.95); 
    transition: var(--transition-fluid); transform-origin: top left;
}
.dropdown-filter:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.dropdown-title { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); font-weight: 700; margin-bottom: 1rem; }
.checkbox-item { display: flex; align-items: center; gap: 0.75rem; font-size: 0.95rem; cursor: pointer; color: var(--text-primary); margin-bottom: 0.75rem; font-weight: 500; }
.checkbox-item input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; border: 1px solid var(--border); border-radius: 4px; }

/* Color Swatches Grid (Inside Dropdown) */
.color-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; }
.color-swatch {
    width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent;
    cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1); margin: auto;
    transition: var(--transition-fluid);
}
.color-swatch:hover { transform: scale(1.15); box-shadow: var(--shadow-sm); }
.color-swatch.active { border-color: var(--text-primary); padding: 2px; background-clip: content-box; }

/* GreetingStudio AI Canvas Tile */
.ai-canvas-card {
    border-radius: var(--radius-md);
    background: var(--surface);
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    aspect-ratio: 3/4; cursor: pointer; transition: var(--transition-fluid);
    padding: 2rem; position: relative; overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
}
.ai-canvas-card::before {
    content: ''; position: absolute; inset: 0;
    background: var(--accent-gradient); opacity: 0.05; transition: var(--transition-fluid);
}
.ai-canvas-card:hover { transform: translateY(-8px) scale(1.02); box-shadow: var(--shadow-lg); }
.ai-canvas-card:hover::before { opacity: 0.1; }
.ai-icon-wrap {
    width: 64px; height: 64px; background: var(--accent-gradient);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: white; margin-bottom: 1.5rem; transition: var(--transition-fluid);
    box-shadow: var(--shadow-glow);
}
.ai-canvas-card:hover .ai-icon-wrap { transform: scale(1.1); }
.ai-icon-wrap svg { width: 32px; height: 32px; }
.ai-title { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; color: var(--text-primary); margin-bottom: 0.5rem; line-height: 1.2; }
.ai-subtitle { font-size: 0.9rem; color: var(--text-secondary); font-weight: 500; }

/* Profile Dropdown */
.profile-dropdown { position: absolute; top: 110%; right: 0; background: white; border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-md); width: 180px; display: none; flex-direction: column; z-index: 1000; overflow: hidden; text-align: left; }
.profile-dropdown.active { display: flex; }
.profile-dropdown a { padding: 0.75rem 1rem; color: var(--text-primary); text-decoration: none; font-size: 0.85rem; font-weight: 500; transition: var(--transition-fast); }
.profile-dropdown a:hover { background: rgba(0,0,0,0.04); }
.profile-dropdown hr { border: none; border-top: 1px solid var(--border); margin: 0; }

/* Global Search Bar */
.global-search-container { flex: 1; max-width: 500px; margin: 0 2rem; position: relative; }
.global-search-input { width: 100%; padding: 0.8rem 1rem 0.8rem 2.5rem; border-radius: var(--radius-full); border: 1px solid var(--border); background: var(--surface); font-family: var(--font-body); font-size: 0.95rem; transition: var(--transition-fast); outline: none; }
.global-search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,113,227,0.1); }
.global-search-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--text-secondary); pointer-events: none; }

/* AI Create Pill */
.btn-ai-pill { background: var(--accent-gradient); color: white; border-radius: var(--radius-full); padding: 0.6rem 1.25rem; font-weight: 600; font-family: var(--font-heading); display: inline-flex; align-items: center; gap: 0.5rem; transition: var(--transition-fast); border: none; cursor: pointer; box-shadow: var(--shadow-glow); }
.btn-ai-pill:hover { transform: scale(1.05); }

/* Sticky Shrink Behavior */
.global-nav.scrolled { padding: 0.5rem 0; box-shadow: var(--shadow-sm); }

/* Horizontal Scroll Rows (Netflix Style) */
.scroll-row-container { margin-bottom: 4rem; }
.scroll-row-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 1.5rem; }
.scroll-row-title { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 700; color: var(--text-primary); margin: 0; }
.scroll-row { display: flex; gap: 1.5rem; overflow-x: auto; padding-bottom: 1rem; scrollbar-width: none; scroll-snap-type: x mandatory; }
.scroll-row::-webkit-scrollbar { display: none; }
.scroll-item { flex: 0 0 300px; scroll-snap-align: start; }

/* Icon Grid (Browse by Occasion) */
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 1.5rem; margin-bottom: 4rem; }
.icon-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.5rem 1rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.75rem; transition: var(--transition-fast); text-decoration: none; color: var(--text-primary); font-weight: 600; font-size: 0.95rem; cursor: pointer; }
.icon-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); border-color: var(--accent); color: var(--accent); }
.icon-tile span.emoji { font-size: 2rem; }

/* Guided Flow */
.guided-flow-container { background: rgba(0, 113, 227, 0.03); border: 1px solid rgba(0, 113, 227, 0.1); border-radius: var(--radius-lg); padding: 3rem; margin-bottom: 4rem; }
.guided-step { margin-bottom: 2rem; }
.guided-step-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; color: var(--text-primary); }
.guided-options { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.guided-option { background: white; border: 1px solid var(--border); border-radius: var(--radius-full); padding: 0.75rem 1.5rem; font-weight: 500; cursor: pointer; transition: var(--transition-fast); }
.guided-option:hover { border-color: var(--text-primary); }
.guided-option.selected { background: var(--text-primary); color: white; border-color: var(--text-primary); }

/* Recipient / Style Pills */
.recipient-row { display: flex; gap: 1rem; overflow-x: auto; scrollbar-width: none; padding-bottom: 1rem; margin-bottom: 4rem; }
.recipient-row::-webkit-scrollbar { display: none; }
.recipient-pill { flex: 0 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-full); padding: 1rem 2rem; font-size: 1.1rem; font-weight: 600; color: var(--text-primary); text-decoration: none; transition: var(--transition-fast); }
.recipient-pill:hover { border-color: var(--accent); color: var(--accent); background: rgba(0, 113, 227, 0.02); transform: scale(1.02); }

/* Sidebar Filters */
.sidebar-filters { border-right: 1px solid var(--border); padding-right: 2rem; }
.filter-group { margin-bottom: 2rem; }
.filter-title { font-family: var(--font-heading); font-size: 1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 0.05em; }
.filter-list { display: flex; flex-direction: column; gap: 0.75rem; }
.filter-label { display: flex; align-items: center; gap: 0.75rem; font-size: 0.95rem; cursor: pointer; color: var(--text-primary); font-weight: 500; transition: var(--transition-fast); }
.filter-label:hover { color: var(--accent); }
.filter-checkbox { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; border-radius: 4px; border: 1px solid var(--border); }

/* ==========================================================================
   CARDYLA PERSISTENT OCCASION NAVIGATION STRIP & POPUP SUBMENUS
   ========================================================================== */

.cardyla-occasion-nav-strip {
    position: sticky;
    top: 60px;
    z-index: 950;
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 16px -6px rgba(0, 0, 0, 0.03);
    padding: 0.4rem 0 0.5rem;
    transition: all 0.2s ease;
}

.occasion-nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.occasion-line-1,
.occasion-line-2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
}

.occasion-line-2 {
    display: none;
    padding-top: 0.35rem;
    border-top: 1px dashed #f1f5f9;
    width: 100%;
}
.occasion-line-2.show {
    display: block;
    animation: fadeInDropdown 0.2s ease forwards;
}

.occasion-expanded-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    width: 100%;
    padding: 0.2rem 0;
}

.step-nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.22rem 0.6rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #7e22ce, #c026d3);
    color: #ffffff;
    box-shadow: 0 2px 5px rgba(126, 34, 206, 0.22);
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.1;
    user-select: none;
}

.step-nav-badge.step-1-badge {
    background: linear-gradient(135deg, #7c3aed, #9333ea);
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.25);
    margin-right: 0.15rem;
}

.step-nav-badge.step-2-badge {
    background: linear-gradient(135deg, #c026d3, #db2777);
    box-shadow: 0 2px 6px rgba(192, 38, 211, 0.25);
    margin-right: 0.25rem;
}

.step-nav-badge.step-3-badge {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
    font-size: 0.68rem;
    padding: 0.22rem 0.6rem;
    margin-right: 0.25rem;
}

.occasion-tab-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #7e22ce;
    background: #fdf4ff;
    border: 1.5px solid #f5d0fe;
    padding: 0.35rem 0.8rem;
    border-radius: 9999px;
    white-space: nowrap;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    font-family: var(--font-heading, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
}
.occasion-tab-primary:hover,
.occasion-tab-primary.active {
    background: #fae8ff;
    border-color: #e879f9;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(192, 38, 211, 0.12);
}

.occasion-chips-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex: 1;
    padding: 0.1rem 0;
}
.occasion-chips-group::-webkit-scrollbar {
    display: none;
}

.occasion-chip-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-family: var(--font-heading, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-main, #0f172a);
    text-decoration: none;
    background: rgba(0, 0, 0, 0.025);
    border: 1px solid rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    user-select: none;
}

.occasion-chip-btn:hover,
.occasion-chip-btn.active {
    background: #ffffff;
    color: var(--primary, #c026d3);
    border-color: #f5d0fe;
    box-shadow: 0 4px 14px rgba(192, 38, 211, 0.12);
    transform: translateY(-1px);
}

.occasion-chip-btn .chip-icon {
    font-size: 1.05rem;
    line-height: 1;
}

.occasion-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.8rem;
    border-radius: 9999px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    font-family: var(--font-heading, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    font-size: 0.8125rem;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s ease;
}
.occasion-more-btn:hover,
.occasion-more-btn.expanded {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
}
.occasion-more-btn .more-chevron {
    width: 13px;
    height: 13px;
    transition: transform 0.2s ease;
}
.occasion-more-btn.expanded .more-chevron {
    transform: rotate(180deg);
}

/* Line 3: Who are you celebrating ? (Step 2) */
.celebrating-line-3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 0.45rem;
    border-top: 1px solid #f1f5f9;
    width: 100%;
}

.celebrating-chips-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex: 1;
    padding: 0.1rem 0;
}
.celebrating-chips-group::-webkit-scrollbar {
    display: none;
}

.celebrating-line-2 {
    display: none;
    padding-top: 0.5rem;
    border-top: 1px dashed #e2e8f0;
    width: 100%;
}
.celebrating-line-2.show {
    display: block;
    animation: fadeInDropdown 0.2s ease forwards;
}

.celebrating-expanded-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    padding: 0.15rem 0;
}

.celebrating-label-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #0f172a;
    font-family: var(--font-heading, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    white-space: nowrap;
    flex-shrink: 0;
    padding-right: 0.35rem;
}

.celebrating-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    font-family: var(--font-heading, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    font-size: 0.8125rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.celebrating-chip:hover,
.celebrating-chip.active {
    background: #fdf4ff;
    color: #7e22ce;
    border-color: #f5d0fe;
    box-shadow: 0 2px 8px rgba(192, 38, 211, 0.1);
    transform: translateY(-1px);
}

/* Full-width Mega Dropdown Popup Window */
.occasion-mega-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.18);
    z-index: 1000;
    padding: 1.25rem 0 1.5rem;
    display: none;
    transform: translateY(-6px);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.occasion-mega-dropdown.open {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.occasion-dropdown-panel {
    display: none;
    animation: fadeInDropdown 0.2s ease forwards;
}

.occasion-dropdown-panel.active {
    display: block;
}

@keyframes fadeInDropdown {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.mega-dropdown-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

.mega-dropdown-header {
    width: 100%;
    margin: 0 0 1rem;
    padding: 0 0 0.85rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    box-sizing: border-box;
}

.mega-dropdown-header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mega-dropdown-header-title {
    font-family: var(--font-heading, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    font-size: 0.8125rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    line-height: 1.25;
}

.mega-dropdown-header-desc {
    font-family: var(--font-body, var(--font-heading, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif));
    font-size: 0.75rem;
    color: #64748b;
    margin: 0.15rem 0 0;
    line-height: 1.35;
    font-weight: 400;
}

.mega-dropdown-header-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.mega-dropdown-close-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 1rem;
    line-height: 1;
}

.mega-dropdown-close-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
}

.mega-dropdown-grid {
    width: 100%;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.25rem;
    box-sizing: border-box;
}

.mega-dropdown-grid.cols-5 {
    grid-template-columns: repeat(5, 1fr);
}

.mega-dropdown-grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.mega-dropdown-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.mega-dropdown-col {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mega-dropdown-title {
    font-family: var(--font-heading, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #0f172a;
    padding-bottom: 0.35rem;
    margin-bottom: 0.4rem;
    border-bottom: 1px solid #f1f5f9;
}

.mega-dropdown-link {
    font-family: var(--font-body, var(--font-heading, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif));
    font-size: 0.78rem;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    padding: 0.12rem 0;
    transition: all 0.15s ease;
    line-height: 1.35;
    display: inline-flex;
    align-items: center;
}

.mega-dropdown-link:hover {
    color: #7c3aed;
    transform: translateX(2px);
}

.mega-dropdown-link.active {
    background: #fdf4ff;
    color: #7e22ce;
    font-weight: 600;
    border-radius: 6px;
    padding: 0.15rem 0.45rem;
    box-shadow: 0 1px 4px rgba(126, 34, 206, 0.12);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.mega-dropdown-link.active::before {
    content: '✓';
    font-size: 0.7rem;
    color: #a855f7;
    font-weight: 800;
}

.mega-dropdown-link.incompatible-subcat {
    opacity: 0.35;
    pointer-events: none;
    cursor: not-allowed;
    text-decoration: line-through;
    color: #94a3b8;
    position: relative;
}

.mega-dropdown-link.incompatible-subcat::after {
    content: ' (N/A)';
    font-size: 0.65rem;
    color: #ef4444;
    font-style: italic;
    text-decoration: none;
    display: inline;
}

.mega-dropdown-see-all {
    font-family: var(--font-heading, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    font-size: 0.78rem;
    font-weight: 600;
    color: #0284c7;
    text-decoration: none;
    margin-top: 0.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.15s ease;
}

.mega-dropdown-see-all:hover {
    color: #0369a1;
    text-decoration: none;
    transform: translateX(2px);
}

.mega-dropdown-header-actions .mega-dropdown-see-all {
    margin-top: 0;
    color: #0284c7;
    font-weight: 600;
    font-size: 0.8125rem;
}

@media (max-width: 1100px) {
    .mega-dropdown-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
}
@media (max-width: 650px) {
    .mega-dropdown-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}