@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;
    min-height: 100dvh;
    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;
    height: 100vh;
    height: 100dvh; /* dvh: mobil adres çubuğu hesabıyla daha doğru */
    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;
        height: calc(100vh - 48px);
        height: calc(100dvh - 48px);
        border-radius: 4px;
    }
}

/* === LOGO (eski header) ARTIK KULLANILMIYOR ama default art veya intro için duruyor === */
.brand .logo {
    width: 130px;
    height: auto;
    color: var(--green-800);
}

/* === BODY: dikey akış (üst bar + grid) === */
.body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    position: relative;
}

/* === ÜST BAR === */
.top-bar {
    flex-shrink: 0;
    padding: 14px 18px 10px;
    background: transparent;
    border-bottom: 1px solid rgba(14,58,44,.06);
}

/* Üst sıra: logo solda | başlık ortada | instagram sağda (3 sütun) */
.top-bar-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

/* Logo sol — küçük */
.top-bar-logo {
    justify-self: start;
    flex-shrink: 0;
    color: var(--green-800);
    line-height: 0;
    text-decoration: none;
    display: block;
}
.top-bar-logo .logo {
    width: 50px;
    height: auto;
    display: block;
}

/* Başlık orta — MIAM serif + MENÜ italik gold */
.top-bar-title {
    justify-self: center;
    font-family: var(--serif);
    font-size: 21px;
    font-weight: 600;
    letter-spacing: .14em;
    color: var(--green-900);
    text-transform: uppercase;
    line-height: 1;
}
.top-bar-title em {
    font-style: italic;
    font-weight: 500;
    color: var(--gold-soft);
    letter-spacing: .08em;
    margin-left: 6px;
    text-transform: none;
    font-size: 22px;
}

/* Instagram sağ */
.top-bar-ig {
    justify-self: end;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--green-800);
    background: var(--ivory);
    border: 1px solid rgba(14,58,44,.1);
    text-decoration: none;
    transition: background .2s, color .2s, transform .15s, box-shadow .25s;
}
.top-bar-ig svg {
    width: 18px;
    height: 18px;
}
.top-bar-ig:hover {
    background: var(--gold);
    color: var(--green-900);
    border-color: var(--gold);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px -4px rgba(201,163,90,.5);
}

/* === SEARCH (tam genişlik, biraz daha rahat) === */
.searchbox {
    padding: 10px 16px;
    background: var(--ivory);
    border: 1px solid rgba(14,58,44,.1);
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-bottom: 12px;
    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: 16px;
    height: 16px;
    color: var(--green-700);
    flex-shrink: 0;
}
.searchbox input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-family: var(--sans);
    font-size: 13px;
    color: var(--green-900);
    min-width: 0;
}
.searchbox input::placeholder {
    color: rgba(14,58,44,.4);
}

/* === YATAY KATEGORI ŞERIDI (yeşil kart içinde, ayraçlı) === */
.chips-bar {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 6px 10px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    flex-shrink: 0;
    /* Yeşil şerit zemin */
    background: var(--green-800);
    border-radius: 22px;
    /* Sağ kenarda hafif fade ile "kaydır" hissi */
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 18px), transparent 100%);
            mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 18px), transparent 100%);
    box-shadow: 0 4px 14px -8px rgba(8,30,22,.3);
}

.cat-btn.chip {
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: rgba(244, 234, 213, 0.6);
    font-family: var(--sans);
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .18em;
    padding: 10px 16px;
    border-radius: 16px;
    cursor: pointer;
    user-select: none;
    transition: background .25s, color .25s, transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s;
    /* Eski vertical rotation kalıntısı varsa override */
    writing-mode: horizontal-tb;
    transform: none;
    position: relative;
    white-space: nowrap;
}

/* Chip'ler arası gold nokta ayraç */
.cat-btn.chip:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -3px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--gold);
    opacity: .4;
    transition: opacity .3s;
}

.cat-btn.chip:hover {
    color: var(--cream);
    background: rgba(244, 234, 213, 0.05);
}

/* AKTIF: gold dolu kapsül, koyu yeşil yazı, hafif scale */
.cat-btn.chip.active {
    background: var(--gold);
    color: var(--green-900);
    transform: scale(1.04);
    box-shadow: 0 6px 18px -8px rgba(201,163,90,.55),
                inset 0 0 0 1px rgba(255,255,255,.18);
    z-index: 2;
}

/* Aktif chip'in ayracı ile aktif sonrası chip'in ayracı gizlensin */
.cat-btn.chip.active::after,
.cat-btn.chip.active + .cat-btn.chip::after { opacity: 0; }
/* Aktiften sonraki chip'in soluna gelen ayraç da görünmesin (önceki chip'in ayracı zaten gizli ama yine de) */

.cat-btn.chip .cat-label {
    display: inline-block;
}

/* Eski cat-indicator (dikey çubuk) - artık yok */
.cat-indicator { display: none; }

/* GRID === */
.grid-wrap {
    overflow-y: auto;
    padding: 6px 18px 28px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.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: 22px;
    font-weight: 600;
    color: var(--gold-soft);
    margin-top: 6px;
    letter-spacing: .01em;
}

.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; }

/* ============================================================
   ACILIS PRELOADER (intro overlay) - dönen altın halka + logo
   ============================================================ */
body.intro-active { overflow: hidden; }

.intro {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: var(--green-900);
    background-image:
        radial-gradient(ellipse at top, rgba(201,163,90,.06) 0%, transparent 60%),
        radial-gradient(ellipse at bottom right, rgba(26,90,68,.35) 0%, transparent 50%);
    display: grid;
    place-items: center;
    pointer-events: none;
    opacity: 1;
    transition: opacity .5s ease;
}
.intro.intro-hide { opacity: 0; }

.intro-stage {
    position: relative;
    width: 220px;
    height: 220px;
    display: grid;
    place-items: center;
}

/* Dönen altın halka - tam çember içinde 270deg dolu, açık kalan kısım sürekli dönüyor */
.intro-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    color: var(--gold);
    animation: introSpin 1.4s linear infinite;
}
.intro-ring svg {
    width: 100%;
    height: 100%;
    display: block;
}
.intro-ring-track {
    fill: none;
    stroke: rgba(201,163,90,.15);
    stroke-width: 2;
}
.intro-ring-fill {
    fill: none;
    stroke: var(--gold);
    stroke-width: 2;
    stroke-linecap: round;
    /* circumference of r=100 ≈ 628; 470 visible (75%), 158 gap */
    stroke-dasharray: 470 628;
    stroke-dashoffset: 0;
}
@keyframes introSpin {
    to { transform: rotate(360deg); }
}

/* Halkanın içindeki logo */
.intro-logo {
    position: relative;
    z-index: 2;
    width: 130px;
    color: var(--cream);
    animation: introLogoFade .7s cubic-bezier(.2,.8,.2,1) .15s both;
}
.intro-logo svg { width: 100%; height: auto; display: block; }

@keyframes introLogoFade {
    from { opacity: 0; transform: scale(.92); }
    to   { opacity: 1; transform: scale(1); }
}

/* Reduced-motion icin halka durur, logo direkt gözükür */
@media (prefers-reduced-motion: reduce) {
    .intro-ring,
    .intro-logo {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ============================================================
   ARKA PLAN GÖRSELI (admin > Görünüm)
   ============================================================ */

/* body.has-bg → page-bg arka rengi şeffaf olsun ki görüntü görünsün */
body.has-bg .page-bg {
    background: transparent;
    background-image: none;
    position: relative;
    z-index: 1;
}

/* body.has-bg → phone container şeffaf, ürün kartları kendi başına okunur */
body.has-bg .phone {
    background: transparent;
    box-shadow: none;
}
@media (min-width: 768px) {
    body.has-bg .phone {
        background: rgba(244, 234, 213, 0.04); /* hafif krem tini */
    }
}

/* Üst bar: yeni 3-sütun yapı için renkler */
body.has-bg .top-bar-logo {
    color: var(--cream);
}
body.has-bg .top-bar-title {
    color: var(--cream);
    text-shadow: 0 2px 12px rgba(0,0,0,.3);
}
body.has-bg .top-bar-title em {
    color: var(--gold);
}
body.has-bg .top-bar-ig {
    background: rgba(248, 241, 222, 0.9);
    border-color: rgba(244, 234, 213, 0.3);
    color: var(--green-900);
}
body.has-bg .top-bar {
    border-bottom-color: rgba(244, 234, 213, 0.15);
}

/* Search kutu hafif backdrop blur ile cam efekti */
body.has-bg .searchbox {
    background: rgba(248, 241, 222, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: rgba(244, 234, 213, 0.3);
    box-shadow: 0 4px 16px -8px rgba(0,0,0,.25);
}

/* Chips şerit bg modunda cam efektli */
body.has-bg .chips-bar {
    background: rgba(10, 42, 32, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
body.has-bg .cat-btn.chip {
    background: transparent;
    border-color: transparent;
}
body.has-bg .cat-btn.chip.active {
    background: var(--gold);
    color: var(--green-900);
}

/* Detail overlay görsel altında kalmasın */
body.has-bg .detail {
    background: var(--cream);
    z-index: 100;
}

/* Boş kategori mesajı arka planda kaybolmasın */
body.has-bg .empty {
    color: var(--cream);
    opacity: .85;
}

/* Tam ekran arkaplan görseli - fixed, blur uygulanır */
.site-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: var(--green-900);
    /* filter inline style ile geliyor */
    /* Filtreden dolayı kenarda ince renksiz şerit görünmesin diye küçük scale */
    transform: scale(1.08);
    transform-origin: center;
    will-change: filter;
}

/* Yeşil koyu overlay (okunabilirlik için) */
.site-bg-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg,
        rgba(10,42,32,.85) 0%,
        rgba(10,42,32,.7) 40%,
        rgba(14,58,44,.75) 100%);
    pointer-events: none;
}