/* ═══════════════════════════════════════════════════════════════
   LOL SNACKS — Jamaica's Candy Wonderland
   Playful / Pastel / Candy-Themed
   ═══════════════════════════════════════════════════════════════ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    /* Light Theme (default) */
    --bg: #FFF0F3;
    --bg-alt: #ffffff;
    --bg-card: #ffffff;
    --text: #2d2d2d;
    --text-dim: #666;
    --text-light: #999;
    --pink: #E91E63;
    --pink-light: #FCE4EC;
    --pink-dark: #C2185B;
    --border: rgba(0,0,0,0.08);
    --shadow: 0 4px 24px rgba(0,0,0,0.06);
    --shadow-hover: 0 8px 32px rgba(0,0,0,0.1);
    --nav-bg: rgba(255, 240, 243, 0.85);
    --nav-border: rgba(0,0,0,0.05);
    --candy-opacity: 0.45;
    --map-filter: none;

    --font-display: 'Baloo 2', cursive;
    --font-body: 'Nunito', sans-serif;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-pill: 50px;
    --container: 1100px;
    --nav-height: 64px;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
    --bg: #1a1a2e;
    --bg-alt: #16213e;
    --bg-card: #1f2940;
    --text: #f0f0f0;
    --text-dim: #b0b0c0;
    --text-light: #8888a0;
    --border: rgba(255,255,255,0.08);
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
    --shadow-hover: 0 8px 32px rgba(0,0,0,0.4);
    --nav-bg: rgba(26, 26, 46, 0.9);
    --nav-border: rgba(255,255,255,0.05);
    --candy-opacity: 0.2;
    --map-filter: brightness(0.8) contrast(1.1);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
    transition: background 0.4s, color 0.4s;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

::selection { background: var(--pink); color: #fff; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 40px);
}

/* ── Falling Candy Background ───────────────────────────────── */
.candy-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.candy {
    position: absolute;
    left: var(--x);
    top: -8%;
    font-size: calc(var(--size) * 1.6rem);
    opacity: var(--candy-opacity);
    animation: fallBounce var(--dur) ease-in infinite;
    animation-delay: var(--delay);
    user-select: none;
    transition: opacity 0.4s;
}

.candy.img-candy {
    font-size: 0;
    width: calc(var(--size) * 28px);
    height: calc(var(--size) * 28px);
}

.candy.img-candy img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Straight fall — no bounce, fade out at bottom */
@keyframes fallBounce {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0;
    }
    4% {
        opacity: var(--candy-opacity);
    }
    92% {
        opacity: var(--candy-opacity);
    }
    100% {
        transform: translateY(110vh) translateX(var(--drift, 30px)) rotate(var(--spin, 360deg));
        opacity: 0;
    }
}

/* ── Navigation ─────────────────────────────────────────────── */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-height);
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    border-bottom: 1px solid var(--nav-border);
    transition: background 0.4s, border-color 0.4s;
}

.nav-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 40px);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo-img {
    height: 60px;
    width: auto;
}

.nav-tabs {
    display: flex;
    gap: 4px;
}

.nav-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dim);
    transition: all 0.3s;
}

.nav-tab:hover {
    color: var(--text);
    background: rgba(233, 30, 99, 0.08);
}

.nav-tab.active {
    color: #fff;
    background: var(--text);
}

[data-theme="dark"] .nav-tab.active {
    background: var(--pink);
}

.tab-icon { font-size: 0.9rem; }

.theme-toggle {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: background 0.3s;
}
.theme-toggle:hover { background: rgba(0,0,0,0.06); }
[data-theme="dark"] .theme-toggle:hover { background: rgba(255,255,255,0.1); }

.nav-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}
.nav-burger span {
    display: block;
    width: 22px; height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    inset: 0;
    top: var(--nav-height);
    z-index: 999;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.mobile-menu.open { opacity: 1; pointer-events: all; }

.mobile-tab {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
}

.mobile-theme-toggle {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dim);
    padding: 10px 24px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 1;
    padding: 120px 24px 80px;
}

.hero-content {
    max-width: 600px;
}

.hero-logo {
    width: clamp(200px, 40vw, 340px);
    margin: 0 auto 32px;
    filter: drop-shadow(0 4px 20px rgba(233, 30, 99, 0.15));
}

.hero-tagline {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 12px;
}

.hero-sub {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    color: var(--text-dim);
    margin-bottom: 36px;
    line-height: 1.7;
}

.hero-ctas {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--border);
    background: var(--bg-card);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    box-shadow: var(--shadow);
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s, border-color 0.3s;
}

.cta-pill:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: var(--pink);
}

.cta-icon { font-size: 1rem; }

/* ── Section Shared ─────────────────────────────────────────── */
.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 12px;
    color: var(--text);
}

.section-sub {
    text-align: center;
    font-size: clamp(0.9rem, 1.5vw, 1.05rem);
    color: var(--text-dim);
    max-width: 540px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

/* Rainbow Text */
.rainbow-text {
    background: linear-gradient(90deg, #E91E63, #FF5722, #FF9800, #4CAF50, #2196F3, #9C27B0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] .rainbow-text {
    background: linear-gradient(90deg, #F48FB1, #FF8A65, #FFB74D, #81C784, #64B5F6, #CE93D8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── The Sweets ─────────────────────────────────────────────── */
.sweets {
    padding: clamp(80px, 10vw, 120px) 0;
    position: relative;
    z-index: 1;
}

.filter-tabs {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.filter-tab {
    padding: 10px 22px;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--border);
    background: var(--bg-card);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dim);
    transition: all 0.3s;
}

.filter-tab:hover {
    border-color: var(--pink);
    color: var(--pink);
}

.filter-tab.active {
    background: var(--text);
    color: #fff;
    border-color: var(--text);
}

[data-theme="dark"] .filter-tab.active {
    background: var(--pink);
    border-color: var(--pink);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.product-card {
    background: var(--card-gradient, linear-gradient(135deg, #FFE0B2, #FFCCBC));
    border-radius: var(--radius);
    overflow: hidden;
    padding: 24px;
    transition: transform 0.4s var(--ease-out), box-shadow 0.4s;
    cursor: default;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.product-card.hidden {
    display: none;
}

.product-img {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.product-img img {
    max-height: 160px;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.1));
    transition: transform 0.4s var(--ease-out);
}

.product-card:hover .product-img img {
    transform: scale(1.08) rotate(2deg);
}

.product-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: #2d2d2d;
    margin-bottom: 4px;
}

.product-desc {
    font-size: 0.82rem;
    color: #666;
    line-height: 1.5;
}

/* ── Locations ──────────────────────────────────────────────── */
.locations {
    padding: clamp(80px, 10vw, 120px) 0;
    position: relative;
    z-index: 1;
}

.locations-grid {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.location-card {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 32px;
    align-items: start;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    transition: background 0.4s, box-shadow 0.4s;
}

.location-name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.loc-icon { font-size: 1.3rem; }

.location-detail {
    margin-bottom: 16px;
}

.location-detail strong {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--text);
    margin-bottom: 4px;
}

.location-detail p {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.6;
}

.location-detail a {
    color: var(--pink);
    font-weight: 600;
    transition: opacity 0.3s;
}
.location-detail a:hover { opacity: 0.7; }

.location-map {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-alt);
}

.location-map iframe {
    width: 100%;
    height: 280px;
    border: none;
    filter: var(--map-filter);
}

.map-link {
    display: inline-block;
    padding: 8px 16px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--pink);
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    z-index: 2;
    transition: transform 0.3s;
}
.map-link:hover { transform: translateY(-2px); }

/* ── Newsletter ─────────────────────────────────────────────── */
.newsletter {
    padding: clamp(60px, 8vw, 100px) 0;
    position: relative;
    z-index: 1;
}

.newsletter-card {
    max-width: 560px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: clamp(32px, 5vw, 48px);
    box-shadow: var(--shadow);
    text-align: center;
    transition: background 0.4s, box-shadow 0.4s;
}

.newsletter-icon {
    font-size: 2.5rem;
    width: 60px; height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF5722, #FF9800);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.newsletter-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.newsletter-sub {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 28px;
}

.newsletter-form { text-align: left; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: border-color 0.3s;
    outline: none;
    -webkit-appearance: none;
}

.form-group input::placeholder { color: var(--text-light); }

.form-group input:focus,
.form-group select:focus {
    border-color: var(--pink);
}

.form-group select { cursor: pointer; }

.submit-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(90deg, #E91E63, #FF5722, #FF9800);
    color: #fff;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s;
    box-shadow: 0 4px 16px rgba(233, 30, 99, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(233, 30, 99, 0.4);
}

.submit-btn.success {
    background: linear-gradient(90deg, #4CAF50, #66BB6A);
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.3);
}

.form-note {
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-light);
    margin-top: 14px;
}

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
    padding: 60px 0 40px;
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 1;
    transition: border-color 0.4s;
}

.footer-content {
    text-align: center;
}

.footer-logo {
    width: 120px;
    margin: 0 auto 16px;
}

.footer-tagline {
    font-size: 0.95rem;
    color: var(--text-dim);
    margin-bottom: 24px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.footer-links a,
.footer-links span {
    font-size: 0.88rem;
    color: var(--text-dim);
    transition: color 0.3s;
}

.footer-links a:hover { color: var(--pink); }

.footer-divider {
    width: 80px;
    height: 2px;
    background: var(--border);
    margin: 24px auto;
    border-radius: 2px;
}

.footer-made {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.footer-copy {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .location-card { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-tabs { display: none; }
    .theme-toggle { display: none; }
    .nav-burger { display: flex; }

    .hero { padding-top: 100px; }
    .hero-logo { width: clamp(180px, 50vw, 260px); }
}

@media (max-width: 540px) {
    .product-grid { grid-template-columns: 1fr; max-width: 360px; margin: 0 auto; }
    .hero-ctas { flex-direction: column; align-items: center; }
    .cta-pill { width: 100%; justify-content: center; }
    .form-row { grid-template-columns: 1fr; }
    .location-card { padding: 20px; }
}

/* ── Data-reveal initial state ──────────────────────────────── */
[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
}

/* ── Skip Navigation ───────────────────────────────────────── */
.skip-nav {
    position: absolute;
    top: -100%;
    left: 0;
    background: #E91E63;
    color: #fff;
    padding: 0.75rem 1.5rem;
    z-index: 10000;
    font-size: 0.875rem;
    text-decoration: none;
    font-weight: 700;
    font-family: var(--font-display);
    border-radius: 0 0 16px 0;
}
.skip-nav:focus { top: 0; }

/* ── Footer Legal ──────────────────────────────────────────── */
.footer-legal {
    margin-top: 0.5rem;
    font-size: 0.85rem;
}
.footer-legal a {
    color: var(--text-dim);
    text-decoration: none;
}
.footer-legal a:hover {
    color: var(--pink);
}

/* ── Reduced Motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
