@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Manrope:wght@300;400;500;600;700&family=Allura&display=swap');

:root {
    --green-900: #0a2a20;
    --green-800: #0e3a2c;
    --green-700: #134634;
    --green-600: #1a5a44;
    --cream: #f4ead5;
    --cream-2: #ece0c4;
    --ivory: #f8f1de;
    --gold: #c9a35a;
    --gold-soft: #b8954a;
    --serif: 'Cormorant Garamond', 'Times New Roman', serif;
    --sans: 'Manrope', system-ui, sans-serif;
    --script: 'Allura', cursive;
}

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

body {
    font-family: var(--sans);
    color: var(--green-900);
    -webkit-font-smoothing: antialiased;
    background: var(--green-900);
}

.no-scrollbar { scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

.hidden { display: none !important; }

/* Locked when overlay open */
body.locked { overflow: hidden; }

/* === PAGE BG === */
.page-bg {
    min-height: 100vh;
    background: var(--green-900);
    background-image:
        radial-gradient(ellipse at top, rgba(201,163,90,.05) 0%, transparent 60%),
        radial-gradient(ellipse at bottom right, rgba(26,90,68,.3) 0%, transparent 50%);
    color: var(--cream);
}

/* === PHONE CONTAINER === */
.phone {
    margin: 0 auto;
    max-width: 480px;
    min-height: 100vh;
    background: var(--cream);
    color: var(--green-900);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 0 80px rgba(0,0,0,.4);
    position: relative;
}

@media (min-width: 768px) {
    .phone {
        margin: 24px auto;
        min-height: calc(100vh - 48px);
        border-radius: 4px;
    }
}

/* === LOGO === */
.brand {
    display: flex;
    justify-content: center;
    padding: 16px 24px 4px;
    flex-shrink: 0;
}
.brand .logo {
    width: 130px;
    height: auto;
    color: var(--green-800);
}

/* === WELCOME === */
.welcome {
    text-align: center;
    padding: 8px 32px 12px;
    flex-shrink: 0;
}
.eyebrow {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .26em;
    color: rgba(19,70,52,.7);
    margin-bottom: 4px;
}
.welcome h1 {
    margin: 0;
    font-family: var(--serif);
    font-size: 24px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: .01em;
    color: var(--green-900);
}
.welcome h1 em {
    font-style: italic;
    font-weight: 400;
    color: var(--gold-soft);
}

/* === SEARCH === */
.searchbox {
    margin: 8px 28px 16px;
    padding: 12px 20px;
    background: var(--ivory);
    border: 1px solid rgba(14,58,44,.1);
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    transition: border-color .2s, box-shadow .2s;
}
.searchbox:focus-within {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201,163,90,.15);
}
.searchbox svg {
    width: 18px;
    height: 18px;
    color: var(--green-700);
    flex-shrink: 0;
}
.searchbox input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-family: var(--sans);
    font-size: 14px;
    color: var(--green-900);
    min-width: 0;
}
.searchbox input::placeholder {
    color: rgba(14,58,44,.4);
}

/* === BODY: vertical cats + grid === */
.body {
    flex: 1;
    display: grid;
    grid-template-columns: 44px 1fr;
    min-height: 0;
    overflow: hidden;
    position: relative;
}

/* CATEGORIES === */
.cats {
    background: var(--green-800);
    color: var(--cream);
    border-radius: 0 30px 30px 0;
    padding: 28px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    overflow-y: auto;
    overflow-x: hidden;
}

.cat-btn {
    border: none;
    background: transparent;
    color: rgba(244,234,213,.55);
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .25em;
    padding: 14px 4px;
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    position: relative;
    transition: color .2s;
}
.cat-btn:hover { color: var(--cream); }
.cat-btn.active { color: var(--cream); }

.cat-indicator {
    position: absolute;
    left: -2px;
    top: 50%;
    transform: translateY(-50%) rotate(180deg);
    width: 4px;
    height: 0;
    background: var(--gold);
    border-radius: 2px;
    transition: height .25s;
}
.cat-btn.active .cat-indicator {
    height: 30px;
}

/* GRID === */
.grid-wrap {
    overflow-y: auto;
    padding: 16px 20px 32px;
}

.cat-grid {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.cat-grid.active { display: grid; }

.prod-card {
    background: var(--ivory);
    border: 1px solid rgba(14,58,44,.06);
    border-radius: 22px;
    padding: 12px 12px 16px;
    cursor: pointer;
    box-shadow: 0 4px 14px -8px rgba(8,30,22,.25);
    transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s;
    animation: cardIn .55s cubic-bezier(.2,.8,.2,1) both;
}
.prod-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px -16px rgba(8,30,22,.35);
}

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

.prod-thumb {
    aspect-ratio: 1;
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--green-700), var(--green-900));
    margin-bottom: 12px;
}
.prod-thumb img,
.prod-thumb svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.prod-card h3 {
    margin: 0 0 2px;
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: .01em;
    color: var(--green-900);
}
.prod-card .sub {
    font-family: var(--serif);
    font-style: italic;
    font-size: 11px;
    color: var(--green-700);
    opacity: .65;
    min-height: 14px;
    margin-bottom: 8px;
}
.prod-card .price {
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 600;
    color: var(--gold-soft);
}

.empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 20px;
    font-family: var(--serif);
    font-style: italic;
    font-size: 16px;
    color: var(--green-700);
    opacity: .6;
}

/* === DETAIL OVERLAY === */
.detail {
    position: fixed;
    inset: 0;
    max-width: 480px;
    margin: 0 auto;
    background: var(--cream);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform .5s cubic-bezier(.7,0,.2,1);
    z-index: 100;
}
.detail.open {
    transform: translateX(0);
}

@media (min-width: 768px) {
    .detail {
        top: 24px;
        bottom: 24px;
        border-radius: 4px;
        box-shadow: 0 0 80px rgba(0,0,0,.4);
    }
}

.detail-hero {
    position: relative;
    height: 340px;
    background: linear-gradient(135deg, var(--green-700), var(--green-900));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 0 0 32px 32px;
}
.detail-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 30%, rgba(201,163,90,.18) 0%, transparent 55%);
    pointer-events: none;
}

.detail-back {
    position: absolute;
    left: 18px;
    top: 18px;
    width: 44px;
    height: 44px;
    background: rgba(244,234,213,.95);
    color: var(--green-800);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 6px 20px -8px rgba(0,0,0,.3);
    transition: background .2s, transform .15s;
    z-index: 5;
}
.detail-back:hover {
    background: var(--cream);
    transform: scale(1.05);
}
.detail-back svg { width: 20px; height: 20px; }

.detail-img {
    position: relative;
    z-index: 1;
    width: 70%;
    max-width: 300px;
    aspect-ratio: 1;
    border-radius: 14px;
    overflow: hidden;
}
.detail-img img,
.detail-img svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.detail-body {
    padding: 28px 32px 48px;
}
.detail-body h2 {
    margin: 0 0 6px;
    font-family: var(--serif);
    font-size: 36px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: .01em;
    color: var(--green-900);
}
.detail-sub {
    font-family: var(--serif);
    font-style: italic;
    font-size: 16px;
    color: var(--green-700);
    opacity: .75;
    margin-bottom: 16px;
}
.detail-sub:empty { display: none; }

.detail-price {
    display: inline-block;
    font-family: var(--serif);
    font-size: 26px;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--gold-soft);
    border-bottom: 1px solid var(--gold);
    padding: 4px 0;
    margin-bottom: 20px;
}

.section-title {
    margin-top: 24px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--serif);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .26em;
    color: var(--green-800);
}
.section-title .sep {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--gold), transparent);
    opacity: .5;
}
.section-title.hidden { display: none; }

.ing-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.ing-pills span {
    background: var(--ivory);
    border: 1px solid rgba(14,58,44,.12);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 500;
    color: var(--green-800);
}

.detail-desc {
    margin: 0;
    font-size: 14px;
    line-height: 1.75;
    color: var(--green-800);
    opacity: .9;
}
.detail-desc:empty { display: none; }
