/* =====================================================
   Cake Palace — Design tokens
   Palette: deep plum + warm gold on a pastry-box cream
   Type: Fraunces (display, characterful) + Manrope (body/UI)
   Signature: scalloped "piped icing" divider used at section
   seams and as the accent under prices/cards.
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,500&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --plum-900: #34122E;
    --plum-700: #5A2160;
    --plum-600: #7A2D8A;
    --plum-500: #93409E;
    --orchid-300: #C98FD1;
    --orchid-100: #F1DDF2;
    --gold-500: #C9973E;
    --gold-300: #E8C888;
    --cream-50: #FCF6EF;
    --cream-100: #F6EAE0;
    --ink-900: #2A1728;
    --ink-600: #6B5A68;
    --white: #FFFFFF;
    --success: #3E8E5A;

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 28px;
    --shadow-card: 0 10px 30px -12px rgba(52, 18, 46, 0.25);
    --shadow-soft: 0 4px 16px rgba(52, 18, 46, 0.10);

    --container: 1240px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Manrope', sans-serif;
    background: var(--cream-50);
    color: var(--ink-900);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--plum-600);
}

h1, h2, h3, h4 {
    font-family: 'Fraunces', serif;
    color: var(--plum-900);
    line-height: 1.12;
}

.italic-accent { font-style: italic; font-weight: 500; color: var(--gold-500); }

:focus-visible {
    outline: 3px solid var(--gold-500);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 15px;
    border: 2px solid transparent;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
    background: linear-gradient(135deg, var(--plum-600), var(--plum-700));
    color: var(--white);
    box-shadow: 0 10px 24px -8px rgba(122, 45, 138, 0.55);
}
.btn-primary:hover { box-shadow: 0 14px 28px -8px rgba(122, 45, 138, 0.65); }
.btn-outline {
    background: transparent;
    border-color: var(--plum-600);
    color: var(--plum-600);
}
.btn-outline:hover { background: var(--orchid-100); }
.btn-gold {
    background: linear-gradient(135deg, var(--gold-500), #B9812E);
    color: var(--white);
    box-shadow: 0 10px 24px -8px rgba(201, 151, 62, 0.55);
}
.btn-block { width: 100%; }
.btn-sm { padding: 9px 18px; font-size: 13.5px; }

/* ---------- Scalloped icing divider (signature motif) ---------- */
.icing-divider {
    height: 22px;
    width: 100%;
    background-image: radial-gradient(circle at 11px 0, transparent 11px, var(--cream-50) 11.5px);
    background-size: 22px 22px;
    background-position: top;
}
.icing-divider.plum {
    background-image: radial-gradient(circle at 11px 0, transparent 11px, var(--plum-900) 11.5px);
}
.icing-divider.flip { transform: rotate(180deg); }

/* ---------- Top utility bar ---------- */
.topbar {
    background: var(--plum-900);
    color: var(--orchid-100);
    font-size: 12.5px;
    letter-spacing: .02em;
    overflow: hidden;
}
.topbar-marquee { overflow: hidden; width: 100%; padding: 8px 0; }
.topbar-marquee-track {
    display: flex;
    width: max-content;
    animation: marquee-scroll 22s linear infinite;
}
.topbar-marquee-track span {
    padding: 0 40px;
    white-space: nowrap;
}
@keyframes marquee-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
    .topbar-marquee-track { animation: none; overflow-x: auto; }
}

/* ---------- Shop by Occasion ---------- */
.occasion-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.occasion-card {
    position: relative;
    height: 130px;
    border-radius: var(--radius-md);
    display: flex; align-items: flex-end; padding: 18px;
    color: var(--white); font-family: 'Fraunces', serif; font-size: 19px; font-weight: 700;
    overflow: hidden;
    transition: transform .18s ease;
}
.occasion-card:hover { transform: translateY(-4px); }
.occasion-card::after {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 85% 15%, rgba(255,255,255,.25), transparent 55%);
}
.occasion-card span { position: relative; z-index: 1; }

/* ---------- How It Works ---------- */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step-card { text-align: center; padding: 8px; }
.step-num {
    width: 48px; height: 48px; margin: 0 auto 16px;
    border-radius: 50%; background: var(--plum-600); color: var(--white);
    display: flex; align-items: center; justify-content: center;
    font-family: 'Fraunces', serif; font-weight: 700; font-size: 19px;
}
.step-card h4 { font-family: 'Manrope', sans-serif; font-size: 15px; font-weight: 800; color: var(--ink-900); margin-bottom: 6px; }
.step-card p { font-size: 13.5px; color: var(--ink-600); line-height: 1.6; }

/* ---------- Testimonials ---------- */
.google-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--white); border: 1.5px solid var(--cream-100);
    border-radius: 999px; padding: 8px 16px; margin-top: 12px;
    font-size: 13px; color: var(--ink-900); box-shadow: var(--shadow-soft);
    transition: transform .15s ease;
}
.google-badge:hover { transform: translateY(-2px); }
.google-badge strong { color: var(--ink-900); }
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.testimonial-card { background: var(--white); border-radius: var(--radius-md); padding: 22px; box-shadow: var(--shadow-soft); display: flex; flex-direction: column; }
.testimonial-card .stars { color: var(--gold-500); font-size: 14px; margin-bottom: 10px; }
.testimonial-card p { font-size: 14px; color: var(--ink-900); line-height: 1.6; flex: 1; margin-bottom: 14px; }
.testimonial-author { display: flex; flex-direction: column; font-size: 12.5px; }
.testimonial-author strong { color: var(--plum-700); }
.testimonial-author span { color: var(--ink-600); }

/* ---------- Newsletter ---------- */
.newsletter-strip {
    background: var(--cream-100);
    border-radius: var(--radius-lg);
    padding: 36px 40px;
    display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.newsletter-strip h2 { font-size: 22px; margin-bottom: 6px; }
.newsletter-strip p { color: var(--ink-600); font-size: 14px; max-width: 380px; }
.newsletter-form { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter-form input {
    padding: 13px 18px; border-radius: 999px; border: 1.5px solid var(--cream-100);
    min-width: 260px; font-size: 14px; background: var(--white);
}

/* ---------- FAQ accordion ---------- */
.faq-section { padding-bottom: 40px; }
.faq-accordion { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
    background: var(--white);
    border: 1.5px solid var(--cream-100);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.faq-question {
    width: 100%;
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    background: none; border: none;
    text-align: left;
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 14.5px;
    color: var(--ink-900);
    cursor: pointer;
}
.faq-question svg { flex-shrink: 0; color: var(--plum-600); transition: transform .2s ease; }
.faq-item.open .faq-question svg { transform: rotate(45deg); }
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
}
.faq-answer p { padding: 0 20px 18px; color: var(--ink-600); font-size: 13.5px; line-height: 1.7; }
.faq-item.open .faq-answer { max-height: 400px; }

/* ---------- Instagram horizontal scroll ---------- */
.instagram-section { padding-bottom: 60px; }
.instagram-scroll {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 4px 24px 14px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}
.instagram-scroll::-webkit-scrollbar { height: 8px; }
.instagram-scroll::-webkit-scrollbar-thumb { background: var(--orchid-100); border-radius: 999px; }
.instagram-card {
    position: relative;
    flex: 0 0 auto;
    width: 220px;
    height: 220px;
    border-radius: var(--radius-md);
    overflow: hidden;
    scroll-snap-align: start;
    box-shadow: var(--shadow-soft);
}
.instagram-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.instagram-card:hover img { transform: scale(1.06); }
.instagram-card-icon {
    position: absolute; top: 10px; right: 10px;
    width: 30px; height: 30px; border-radius: 50%;
    background: rgba(52,18,46,.55);
    display: flex; align-items: center; justify-content: center;
}
.instagram-placeholder {
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    text-align: center; padding: 40px 24px;
    background: var(--white); border: 1.5px dashed var(--orchid-100); border-radius: var(--radius-md);
    color: var(--ink-600); font-size: 14px; max-width: 480px; margin: 0 auto;
}
.instagram-placeholder:hover { border-color: var(--plum-500); }

/* ---------- WhatsApp chat + scroll-to-top floating buttons ---------- */
.float-actions {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 60;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}
.whatsapp-fab {
    width: 56px; height: 56px; border-radius: 50%;
    background: #25D366;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 22px rgba(0,0,0,.25);
    transition: transform .15s ease;
}
.whatsapp-fab:hover { transform: scale(1.08); }
.scroll-top-fab {
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--plum-700);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    border: none;
    box-shadow: 0 8px 22px rgba(0,0,0,.2);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity .2s ease, transform .2s ease;
}
.scroll-top-fab.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* ---------- Mobile bottom app bar (hidden by default; shown <=640px below) ---------- */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 55;
    background: var(--white);
    border-top: 1px solid var(--cream-100);
    box-shadow: 0 -6px 20px rgba(52,18,46,.08);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    justify-content: space-around;
    align-items: center;
}
.mobile-bottom-nav a {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    font-size: 10.5px; font-weight: 700; color: var(--ink-600);
    padding: 4px 10px; position: relative;
}
.mobile-bottom-nav a.active { color: var(--plum-700); }
.mobile-bottom-nav a svg { width: 21px; height: 21px; }
.mobile-bottom-nav .nav-cart-badge {
    position: absolute; top: 0; right: 2px;
    background: var(--gold-500); color: #fff;
    font-size: 9px; font-weight: 800; border-radius: 999px;
    min-width: 15px; height: 15px; display: flex; align-items: center; justify-content: center; padding: 0 3px;
}

/* ---------- Header ---------- */
.site-header {
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-soft);
}
.header-row {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 16px 24px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.logo-mark {
    width: 46px;
    height: 46px;
    border-radius: 50% 50% 50% 4px;
    background: linear-gradient(135deg, var(--plum-600), var(--plum-900));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-300);
    flex-shrink: 0;
}
.logo-img { height: 46px; width: auto; max-width: 160px; object-fit: contain; flex-shrink: 0; }
.logo-text { font-family: 'Fraunces', serif; font-weight: 700; font-size: 26px; color: var(--plum-800, var(--plum-700)); line-height: 1; }
.logo-text span { display: block; font-family: 'Manrope', sans-serif; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; color: var(--ink-600); text-transform: uppercase; margin-top: 3px; }

.search-bar {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--cream-100);
    border-radius: 999px;
    padding: 4px 6px 4px 20px;
    max-width: 560px;
}
.search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 0;
    font-size: 14.5px;
    color: var(--ink-900);
}
.search-bar input:focus { outline: none; }
.search-bar button {
    background: var(--plum-600);
    border: none;
    color: var(--white);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}
.header-icon-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink-900);
    position: relative;
}
.cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--gold-500);
    color: var(--white);
    font-size: 10.5px;
    font-weight: 800;
    border-radius: 999px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.main-nav {
    border-top: 1px solid var(--cream-100);
}
.main-nav .container { display: flex; flex-wrap: wrap; gap: 4px; row-gap: 0; }
.main-nav a {
    display: block;
    padding: 13px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-900);
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: color .15s ease, border-color .15s ease;
}
.main-nav a:hover, .main-nav a.active {
    color: var(--plum-700);
    border-color: var(--gold-500);
}
.main-nav a.subcat-link {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--ink-600);
    padding-left: 8px;
}
.main-nav a.subcat-link::before { content: '↳ '; color: var(--orchid-300); }
.main-nav a.subcat-link:hover, .main-nav a.subcat-link.active { color: var(--plum-600); }

/* ---------- Mobile nav toggle ---------- */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    color: var(--plum-700);
    cursor: pointer;
    flex-shrink: 0;
}
.nav-toggle .icon-close { display: none; }
.nav-toggle.open .icon-burger { display: none; }
.nav-toggle.open .icon-close { display: block; }

/* ---------- Homepage banner slider (admin-uploaded) ---------- */
.banner-slider {
    position: relative;
    height: min(70vh, 560px);
    min-height: 340px;
    overflow: hidden;
    background: var(--plum-900);
}
.banner-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity .6s ease;
}
.banner-slide.active { opacity: 1; }
.banner-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(52,18,46,.78) 0%, rgba(52,18,46,.35) 55%, rgba(52,18,46,.15) 100%);
    display: flex;
    align-items: center;
}
.banner-slide-overlay h1 { color: var(--white); font-size: clamp(28px, 4vw, 46px); max-width: 600px; margin-bottom: 14px; }
.banner-slide-overlay p { color: var(--orchid-100); font-size: 16px; max-width: 460px; margin-bottom: 22px; }
.banner-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}
.banner-dot {
    width: 9px; height: 9px; border-radius: 50%;
    background: rgba(255,255,255,.45);
    border: none;
    padding: 0;
}
.banner-dot.active { background: var(--gold-500); width: 22px; border-radius: 999px; }

.vertical-cat-strip { background: var(--white); border-bottom: 1px solid var(--cream-100); padding: 14px 0; }
.vertical-cat-list { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.vertical-cat-list a {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 16px; border-radius: 999px;
    background: var(--cream-50); border: 1px solid var(--cream-100);
    font-size: 13px; font-weight: 700; color: var(--plum-700);
    transition: background .15s ease, transform .15s ease;
}
.vertical-cat-list a:hover { background: var(--orchid-100); transform: translateY(-2px); }
.vertical-cat-list svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ---------- Hero ---------- */
.hero {
    background: radial-gradient(circle at 85% 20%, var(--orchid-100), transparent 55%), var(--cream-50);
    padding: 56px 0 40px;
    overflow: hidden;
}
.hero .container {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 40px;
    align-items: center;
}
.hero-copy h1 {
    font-size: clamp(34px, 4.4vw, 54px);
    margin: 10px 0 16px;
}
.hero-copy p {
    color: var(--ink-600);
    font-size: 16px;
    max-width: 460px;
    margin-bottom: 28px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-plate {
    width: min(100%, 420px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, #ffffff, #f1e4ee 70%);
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.hero-badge {
    position: absolute;
    top: -6px;
    left: -6px;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-500), #B9812E);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    font-weight: 800;
    font-size: 13px;
    line-height: 1.15;
    box-shadow: var(--shadow-card);
    transform: rotate(-8deg);
    z-index: 3;
}
.hero-badge strong { font-size: 20px; display: block; }

.hero-thumb {
    position: absolute;
    background: var(--white);
    border-radius: 999px;
    padding: 4px;
    box-shadow: var(--shadow-card);
}
.hero-thumb img, .hero-thumb .cake-swatch { border-radius: 999px; }
.thumb-1 { width: 120px; height: 120px; top: 4%; right: -4%; }
.thumb-2 { width: 130px; height: 130px; bottom: 2%; right: 6%; }

.hero-product-card {
    position: absolute;
    bottom: -18px;
    left: -12px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 10px 16px 10px 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 260px;
}
.hero-product-card .cake-swatch { width: 54px; height: 54px; border-radius: 12px; flex-shrink: 0; }
.hero-product-card h4 { font-size: 13.5px; margin-bottom: 3px; }
.hero-product-card .stars { color: var(--gold-500); font-size: 11.5px; }
.hero-product-card .price { font-weight: 800; color: var(--plum-700); font-size: 14px; }

/* generic cake color swatch used as a placeholder "photo" */
.cake-swatch {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.92);
}
.cake-swatch::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.35), transparent 55%);
}
.cake-swatch svg { width: 42%; height: 42%; position: relative; z-index: 1; }

/* ---------- Section shell ---------- */
.section { padding: 56px 0; }
.section-head {
    text-align: center;
    max-width: 560px;
    margin: 0 auto 36px;
}
.section-head h2 { font-size: clamp(24px, 3vw, 32px); margin-top: 8px; }
.section-head p { color: var(--ink-600); margin-top: 8px; font-size: 14.5px; }

.category-banner img { width: 100%; max-height: 260px; object-fit: cover; display: block; }

/* ---------- Category grid ---------- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 18px;
}
.category-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 22px 16px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: transform .18s ease, box-shadow .18s ease;
    border: 1px solid transparent;
}
.category-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card);
    border-color: var(--orchid-100);
}
.category-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: var(--orchid-100);
    color: var(--plum-600);
    display: flex;
    align-items: center;
    justify-content: center;
}
.category-icon svg { width: 26px; height: 26px; }
.category-card h3 { font-family: 'Manrope', sans-serif; font-size: 15px; font-weight: 800; color: var(--ink-900); margin-bottom: 4px; }
.category-card p { font-size: 12px; color: var(--ink-600); }

/* ---------- Product grid & card ---------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}
.product-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform .18s ease, box-shadow .18s ease;
    display: flex;
    flex-direction: column;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card); }
.product-media { position: relative; padding: 14px 14px 0; }
.product-media .cake-swatch { border-radius: var(--radius-md); }
.product-tag {
    position: absolute;
    top: 24px;
    left: 24px;
    background: var(--plum-900);
    color: var(--gold-300);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 999px;
    z-index: 2;
}
.product-tag.sale { background: var(--gold-500); color: var(--white); }
.product-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-cat { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--plum-500); }
.product-body h3 { font-family: 'Manrope', sans-serif; font-size: 15.5px; font-weight: 800; color: var(--ink-900); }
.product-body a.title-link:hover h3 { color: var(--plum-700); }
.stars { color: var(--gold-500); font-size: 12.5px; }
.stars span { color: var(--ink-600); font-weight: 600; margin-left: 4px; }
.price-row { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.price-now { font-weight: 800; color: var(--plum-700); font-size: 17px; }
.price-old { text-decoration: line-through; color: var(--ink-600); font-size: 13px; }
.product-footer { display: flex; align-items: center; justify-content: space-between; padding: 0 16px 16px; margin-top: auto; }
.add-btn {
    background: var(--plum-600);
    color: var(--white);
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease, transform .15s ease;
    flex-shrink: 0;
}
.add-btn:hover { background: var(--plum-700); transform: scale(1.06); }

/* ---------- Offer / promo strip ---------- */
.promo-strip {
    background: linear-gradient(120deg, var(--plum-900), var(--plum-700));
    color: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.promo-strip h2 { color: var(--white); font-size: clamp(22px, 3vw, 30px); }
.promo-strip p { color: var(--orchid-100); margin-top: 8px; max-width: 420px; }

/* ---------- Feature strip (trust badges) ---------- */
.feature-strip {
    background: var(--white);
    border-top: 1px solid var(--cream-100);
}
.feature-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    padding: 30px 0;
}
.feature-item { display: flex; align-items: center; gap: 12px; }
.feature-item .icon {
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--orchid-100); color: var(--plum-600);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.feature-item .icon svg { width: 20px; height: 20px; }
.feature-item h4 { font-size: 13.5px; font-weight: 800; color: var(--ink-900); }
.feature-item p { font-size: 11.5px; color: var(--ink-600); }

/* ---------- Footer ---------- */
.site-footer { background: var(--plum-900); color: var(--orchid-100); padding-top: 8px; }
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 32px;
    padding: 48px 0 28px;
}
.footer-grid h4 { color: var(--white); font-family: 'Manrope', sans-serif; font-size: 14px; margin-bottom: 16px; letter-spacing: .03em; }
.footer-grid li { margin-bottom: 9px; font-size: 13.5px; }
.footer-grid a:hover { color: var(--gold-300); }
.footer-about p { font-size: 13.5px; color: var(--orchid-100); opacity: .85; margin: 12px 0 16px; max-width: 280px; }
.footer-logo { display: flex; align-items: center; gap: 10px; font-family: 'Fraunces', serif; font-size: 22px; color: var(--white); font-weight: 700; }
.footer-logo-img { height: 34px; width: auto; max-width: 150px; object-fit: contain; }
.social-row { display: flex; gap: 10px; }
.social-row a {
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(255,255,255,.08);
    display: flex; align-items: center; justify-content: center;
}
.social-row a:hover { background: var(--gold-500); }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 18px 0;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12.5px;
    color: rgba(255,255,255,.6);
}

/* =====================================================
   Inner pages: listing, product, cart, checkout, auth
   ===================================================== */

.page-hero {
    background: var(--plum-900);
    color: var(--white);
    padding: 34px 0;
}
.breadcrumb { font-size: 12.5px; color: var(--orchid-100); }
.breadcrumb a:hover { color: var(--gold-300); }
.page-hero h1 { color: var(--white); font-size: 30px; margin-top: 6px; }

.listing-layout { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; }
.filter-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 96px;
}
.filter-card h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--plum-700); margin: 18px 0 10px; }
.filter-card h4:first-child { margin-top: 0; }
.filter-link {
    display: flex; justify-content: space-between;
    padding: 8px 0; font-size: 13.5px; color: var(--ink-900);
    border-bottom: 1px solid var(--cream-100);
}
.filter-link:hover, .filter-link.active { color: var(--plum-700); font-weight: 700; }
.filter-link .count { color: var(--ink-600); font-weight: 500; }
.filter-link.subcat-filter { padding-left: 14px; font-size: 12.5px; color: var(--ink-600); }

.listing-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.listing-toolbar p { font-size: 13.5px; color: var(--ink-600); }
.sort-select {
    border: 1.5px solid var(--cream-100);
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    background: var(--white);
}

.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-600); }
.empty-state h3 { margin-bottom: 8px; color: var(--plum-800, var(--plum-700)); }

/* ---------- Product detail ---------- */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 46px; align-items: start; }
.pd-gallery .cake-swatch { border-radius: var(--radius-lg); aspect-ratio: 1; }
.pd-info .product-cat { margin-bottom: 8px; display: block; }
.pd-info h1 { font-size: 30px; margin-bottom: 10px; }
.pd-rating { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; font-size: 13.5px; }
.pd-price { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.pd-price .price-now { font-size: 30px; }
.pd-desc { color: var(--ink-600); font-size: 14.5px; line-height: 1.7; margin-bottom: 24px; }
.qty-row { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.qty-stepper { display: flex; align-items: center; border: 1.5px solid var(--cream-100); border-radius: 999px; overflow: hidden; }
.qty-stepper button { width: 40px; height: 40px; border: none; background: var(--cream-100); font-size: 18px; font-weight: 700; color: var(--plum-700); }
.qty-stepper input { width: 46px; text-align: center; border: none; font-weight: 700; }
.pd-actions { display: flex; gap: 14px; margin-bottom: 24px; flex-wrap: wrap; }
.pd-meta { border-top: 1px solid var(--cream-100); padding-top: 18px; font-size: 13px; color: var(--ink-600); display: flex; flex-direction: column; gap: 8px; }

/* ---------- Add-ons ---------- */
.addon-list { margin-bottom: 20px; }
.addon-option {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px; border: 1.5px solid var(--cream-100); border-radius: var(--radius-sm);
    margin-bottom: 8px; font-size: 14px; cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.addon-option:has(.addon-checkbox:checked) { border-color: var(--plum-500); background: var(--orchid-100); }
.addon-option input[type="checkbox"] { width: auto; margin-right: 8px; }
.addon-price { font-weight: 700; color: var(--plum-700); font-size: 13px; }

/* ---------- Popup modal (Customize This Cake) ---------- */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(42,23,40,.55);
    display: flex; align-items: center; justify-content: center;
    padding: 20px; z-index: 100;
    opacity: 0; pointer-events: none;
    transition: opacity .18s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal-box {
    background: var(--white); border-radius: var(--radius-lg);
    padding: 32px; max-width: 480px; width: 100%;
    max-height: 90vh; overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-card);
    transform: translateY(14px);
    transition: transform .18s ease;
}
.modal-overlay.open .modal-box { transform: translateY(0); }
.modal-close {
    position: absolute; top: 14px; right: 16px;
    background: none; border: none; font-size: 26px; line-height: 1;
    color: var(--ink-600); cursor: pointer;
}

/* ---------- Reviews ---------- */
.review-list { display: flex; flex-direction: column; gap: 16px; }
.review-item { background: var(--white); border-radius: var(--radius-md); padding: 18px 20px; box-shadow: var(--shadow-soft); }
.review-item-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.review-item .stars { color: var(--gold-500); font-size: 13px; }
.review-item p { color: var(--ink-900); font-size: 14px; line-height: 1.6; margin-bottom: 6px; }
.review-date { font-size: 11.5px; color: var(--ink-600); }

/* ---------- Cart ---------- */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
.cart-item {
    display: grid;
    grid-template-columns: 76px 1fr auto auto;
    gap: 16px;
    align-items: center;
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 14px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 14px;
}
.cart-item .cake-swatch { border-radius: 12px; }
.cart-item h4 { font-size: 14.5px; margin-bottom: 4px; }
.cart-item .unit-price { font-size: 12.5px; color: var(--ink-600); }
.cart-item .remove-link { font-size: 12px; color: #B0413E; font-weight: 700; margin-top: 6px; display: inline-block; }
.cart-summary {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 96px;
}
.cart-summary h3 { font-size: 18px; margin-bottom: 18px; }
.summary-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-600); margin-bottom: 10px; }
.summary-row.total { color: var(--ink-900); font-weight: 800; font-size: 17px; border-top: 1px solid var(--cream-100); padding-top: 14px; margin-top: 10px; }

/* ---------- Forms (auth / checkout) ---------- */
.form-shell {
    max-width: 460px;
    margin: 50px auto;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-card);
}
.form-shell.wide { max-width: 780px; }
.form-shell h1 { font-size: 26px; margin-bottom: 6px; }
.form-shell > p.subtitle { color: var(--ink-600); font-size: 13.5px; margin-bottom: 26px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-900); margin-bottom: 6px; }
.field input, .field select, .field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--cream-100);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--cream-50);
    transition: border-color .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--plum-500);
    background: var(--white);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-foot { text-align: center; font-size: 13.5px; color: var(--ink-600); margin-top: 18px; }
.form-foot a { color: var(--plum-700); font-weight: 700; }

.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 18px; }
.alert-error { background: #FCEAEA; color: #B0413E; border: 1px solid #F4C9C9; }
.alert-success { background: #E8F5EC; color: var(--success); border: 1px solid #BEE4CB; }

/* ---------- Order success ---------- */
.success-shell { max-width: 560px; margin: 60px auto; text-align: center; background: var(--white); border-radius: var(--radius-lg); padding: 48px 40px; box-shadow: var(--shadow-card); }
.success-icon { width: 80px; height: 80px; border-radius: 50%; background: #E8F5EC; color: var(--success); display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
.success-icon svg { width: 40px; height: 40px; }

/* ---------- Account / order history ---------- */
.order-row {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.status-pill {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    background: var(--orchid-100);
    color: var(--plum-700);
}
.status-pill.delivered { background: #E8F5EC; color: var(--success); }
.status-pill.cancelled { background: #FCEAEA; color: #B0413E; }

/* =====================================================
   Responsive
   ===================================================== */
@media (max-width: 1100px) {
    .listing-layout { grid-template-columns: 220px 1fr; gap: 20px; }
    .product-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 980px) {
    .hero .container { grid-template-columns: 1fr; }
    .hero-visual { order: -1; max-width: 340px; margin: 0 auto; }
    .category-grid { grid-template-columns: repeat(3, 1fr); }
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .listing-layout { grid-template-columns: 1fr; }
    .filter-card { position: static; }
    .product-detail { grid-template-columns: 1fr; }
    .cart-layout { grid-template-columns: 1fr; }
    .occasion-grid { grid-template-columns: repeat(2, 1fr); }
    .steps-grid { grid-template-columns: 1fr; gap: 30px; }
    .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    /* Deterministic grid instead of flex-wrap+order guesswork:
       row 1 = logo | actions | hamburger, row 2 = full-width search. */
    .header-row {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-areas: "logo actions toggle" "search search search";
        align-items: center;
        gap: 10px 8px;
        padding: 12px 16px;
    }
    .logo { grid-area: logo; min-width: 0; }
    .logo-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .logo-text span { display: none; }
    .logo-img { height: 34px; }
    .logo-mark { width: 34px; height: 34px; }
    .header-actions { grid-area: actions; justify-self: end; gap: 10px; }
    .header-icon-link span.label-text { display: none; }
    .btn.btn-primary.btn-sm { padding: 9px 12px; font-size: 12.5px; white-space: nowrap; }
    .btn.btn-primary.btn-sm span.label-text { display: none; }
    .nav-toggle { grid-area: toggle; display: flex; align-items: center; justify-content: center; }
    .search-bar { grid-area: search; max-width: 100%; margin: 0; }

    .topbar-marquee-track span { padding: 0 24px; font-size: 12px; }
    .main-nav .container { justify-content: flex-start; padding-left: 16px; padding-right: 16px; }
    .main-nav a { padding: 11px 12px; font-size: 13px; }

    .main-nav { display: none; border-top: none; }
    .main-nav.open {
        display: block;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background: var(--white);
        box-shadow: 0 16px 30px rgba(52,18,46,.18);
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        z-index: 45;
    }
    .main-nav.open .container {
        flex-direction: column;
        gap: 0;
        padding: 8px 0;
    }
    .main-nav.open a {
        padding: 13px 20px;
        border-bottom: 1px solid var(--cream-100);
        border-left: 3px solid transparent;
    }
    .main-nav.open a.active { border-left-color: var(--gold-500); background: var(--orchid-100); }

    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .product-grid { grid-template-columns: 1fr 1fr; }
    .feature-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 26px; padding: 36px 0 20px; }
    .footer-bottom { flex-direction: column; text-align: center; gap: 6px; }
    .field-row { grid-template-columns: 1fr; }
    .promo-strip { flex-direction: column; text-align: center; }
    .banner-slider { height: 380px; }
    .banner-slide-overlay { background: linear-gradient(180deg, rgba(52,18,46,.55) 0%, rgba(52,18,46,.85) 100%); }

    .cart-item { grid-template-columns: 60px 1fr auto; row-gap: 10px; }

    .instagram-card { width: 160px; height: 160px; }
    .instagram-scroll { padding-left: 16px; padding-right: 16px; }

    body { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
    .site-footer { padding-bottom: 16px; }
    .footer-grid { padding-bottom: 8px; }
    .float-actions { right: 14px; bottom: 78px; gap: 10px; }
    .whatsapp-fab { width: 50px; height: 50px; }
    .whatsapp-fab svg { width: 24px; height: 24px; }
    .scroll-top-fab { width: 38px; height: 38px; }
    .mobile-bottom-nav { display: flex; }

    .pd-actions { flex-direction: column; align-items: stretch; }
    .pd-actions .btn { width: 100%; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .btn { width: 100%; text-align: center; }

    .admin-table { display: block; overflow-x: auto; white-space: nowrap; }

    .occasion-grid { grid-template-columns: 1fr 1fr; }
    .testimonial-grid { grid-template-columns: 1fr; }
    .newsletter-strip { flex-direction: column; text-align: center; padding: 28px 22px; }
    .newsletter-form { width: 100%; }
    .newsletter-form input { min-width: 0; flex: 1; }
}

@media (max-width: 400px) {
    .header-actions { gap: 6px; }
}