/* ==========================================================================
   Gross Market — vitrin ve yönetim paneli stilleri
   Framework yok; tek dosya, özel CSS değişkenleri üzerine kurulu.

   Renk yaklaşımı: marka rengi sarı. Sarı üzerinde beyaz yazı okunmadığı için
   dolgu sarı + koyu yazı (--on-brand) ikilisi kullanılır. Beyaz zemindeki
   metin, bağlantı ve fiyatlarda ise sarının koyu kehribar tonu (--brand-700)
   kullanılır; böylece kontrast her yerde yeterli kalır.
   ========================================================================== */

:root {
    /* Marka — sarı */
    --brand-800: #5c4300;
    --brand-700: #8a6400;   /* beyaz zeminde metin/fiyat için koyu kehribar */
    --brand-600: #e0a800;   /* koyu dolgu / hover */
    --brand-500: #ffc700;   /* birincil dolgu */
    --brand-400: #ffd84d;   /* açık dolgu */
    --brand-100: #ffefb8;
    --brand-50:  #fff8e0;
    --on-brand:  #1a1500;   /* sarı zemin üzerindeki yazı */

    /* Koyu yüzey (yönetim paneli kenar çubuğu) */
    --dark-900: #1f1c10;
    --dark-700: #2e2a19;

    /* Anlam renkleri */
    --red-600:    #c0392b;
    --red-50:     #fdeceb;
    --green-600:  #1a7a49;
    --green-50:   #eaf6ef;
    --blue-600:   #1f6fb2;
    --blue-50:    #eaf3fb;
    --orange-600: #b45309;
    --orange-50:  #fff1de;

    /* Nötrler — sarıya uyması için hafif sıcak tonlu */
    --ink-900: #1c1a12;
    --ink-700: #45412f;
    --ink-500: #736d57;
    --ink-300: #a8a289;
    --line:    #e8e3d5;
    --surface: #ffffff;
    --bg:      #faf8f2;

    --radius:    12px;
    --radius-sm: 8px;
    --shadow:    0 1px 2px rgba(28, 26, 18, .06), 0 4px 16px rgba(28, 26, 18, .06);
    --shadow-lg: 0 8px 32px rgba(28, 26, 18, .14);

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink-900);
    background: var(--bg);
}

img { max-width: 100%; display: block; }

a { color: var(--brand-700); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.75rem; letter-spacing: -.01em; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }

p { margin: 0 0 1em; }

.container {
    width: min(1200px, 100% - 2rem);
    margin-inline: auto;
}

.muted { color: var(--ink-500); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { margin-bottom: .35rem; }
.stack > * + * { margin-top: 1rem; }

/* --- Başlık ------------------------------------------------------------- */

.site-header {
    background: var(--surface);
    border-bottom: 3px solid var(--brand-500);
    position: sticky;
    top: 0;
    z-index: 40;
}

.header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    grid-template-areas: "brand search cart nav";
    align-items: center;
    gap: .75rem;
    padding: .75rem 0;
}

.brand {
    grid-area: brand;
    display: flex;
    align-items: center;
    gap: .6rem;
    color: var(--ink-900);
}
.brand:hover { text-decoration: none; }
.brand-mark {
    font-size: 1.25rem;
    line-height: 1;
    width: 2.25rem;
    height: 2.25rem;
    display: grid;
    place-items: center;
    background: var(--brand-500);
    border-radius: var(--radius-sm);
}
.brand-logo {
    display: block;
    height: 2.9rem;
    width: auto;
    max-width: 16rem;
    object-fit: contain;
}
.brand-text { display: flex; flex-direction: column; }
.brand-text strong { font-size: 1.1rem; letter-spacing: -.01em; }
.brand-text small { color: var(--ink-500); font-size: .78rem; line-height: 1.2; }

.search {
    grid-area: search;
    display: flex;
    gap: .4rem;
    max-width: 26rem;
    width: 100%;
    justify-self: center;
}
.search input {
    flex: 1;
    min-width: 0;
    padding: .6rem .85rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    font: inherit;
    font-size: .95rem;
    background: var(--bg);
}
.search input:focus {
    outline: 2px solid var(--brand-700);
    outline-offset: 1px;
    background: var(--surface);
}
.search button {
    padding: .6rem 1.1rem;
    border: 0;
    border-radius: 999px;
    background: var(--brand-500);
    color: var(--on-brand);
    font: inherit;
    font-weight: 700;
    font-size: .95rem;
    cursor: pointer;
}
.search button:hover { background: var(--brand-600); }

.site-nav {
    grid-area: nav;
    display: flex;
    align-items: center;
    gap: .25rem;
    flex-wrap: wrap;
}
.site-nav a {
    padding: .45rem .7rem;
    border-radius: var(--radius-sm);
    color: var(--ink-700);
    font-size: .92rem;
    font-weight: 500;
    white-space: nowrap;
}
.site-nav a:hover { background: var(--brand-50); color: var(--brand-800); text-decoration: none; }
.site-nav a.is-active { background: var(--brand-500); color: var(--on-brand); font-weight: 600; }

.cart-link {
    grid-area: cart;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .8rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--ink-900);
    white-space: nowrap;
}
.cart-link:hover { text-decoration: none; border-color: var(--brand-500); background: var(--brand-50); }
.cart-link.is-active { border-color: var(--brand-500); background: var(--brand-50); }
.cart-link__icon { font-size: 1.05rem; line-height: 1; }
.cart-link__badge {
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 .3rem;
    border-radius: 999px;
    background: var(--red-600);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    display: grid;
    place-items: center;
    font-variant-numeric: tabular-nums;
}
.cart-link__badge[hidden] { display: none; }

.nav-toggle-label { display: none; }

/* --- Bildirimler --------------------------------------------------------- */

.alert {
    margin: 1rem 0 0;
    padding: .8rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid;
    font-size: .95rem;
}
.alert--success { background: var(--green-50);  border-color: #b9e0c9; color: #14603a; }
.alert--error   { background: var(--red-50);    border-color: #f3c2bd; color: var(--red-600); }
.alert--info    { background: var(--blue-50);   border-color: #c2ddf2; color: var(--blue-600); }
.alert--warning { background: var(--brand-50);  border-color: var(--brand-400); color: var(--brand-800); }

/* --- Ana içerik ---------------------------------------------------------- */

.site-main { padding: 1.5rem 0 3rem; min-height: 60vh; }

.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.page-head p { margin: 0; }

/* Hero ------------------------------------------------------------------- */

.hero {
    background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-400) 100%);
    color: var(--on-brand);
    border-radius: var(--radius);
    padding: 2.25rem 1.75rem;
    margin-bottom: 2rem;
}
.hero h1 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin-bottom: .5rem; }
.hero p { max-width: 48ch; margin-bottom: 1.25rem; color: rgba(26, 21, 0, .82); }
.hero .btn { background: var(--on-brand); color: var(--brand-400); border-color: var(--on-brand); }
.hero .btn:hover { background: #000; color: var(--brand-400); }
.hero .btn--ghost {
    background: transparent;
    color: var(--on-brand);
    border: 1px solid rgba(26, 21, 0, .35);
}
.hero .btn--ghost:hover { background: rgba(26, 21, 0, .08); color: var(--on-brand); }

/* Butonlar --------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .58rem 1.05rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: var(--brand-500);
    color: var(--on-brand);
    font: inherit;
    font-size: .93rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}
.btn:hover { background: var(--brand-600); text-decoration: none; color: var(--on-brand); }
.btn--secondary {
    background: var(--surface);
    color: var(--ink-700);
    border-color: var(--line);
    font-weight: 600;
}
.btn--secondary:hover { background: var(--brand-50); border-color: var(--brand-400); color: var(--ink-900); }
.btn--danger { background: var(--red-600); color: #fff; }
.btn--danger:hover { background: #a3271b; color: #fff; }
.btn--sm { padding: .35rem .7rem; font-size: .85rem; }
.btn--block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* Ana sayfa bilgi şeridi + mağaza kartı ------------------------------------ */

.value-band {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: .85rem;
    margin: 0 0 2.5rem;
}
.value-card {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    padding: 1.1rem 1.2rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.value-card__icon { font-size: 1.5rem; line-height: 1; }
.value-card strong { font-size: .98rem; color: var(--ink-900); }
.value-card span:not(.value-card__icon) { font-size: .87rem; color: var(--ink-500); line-height: 1.55; }

.store-info {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.5rem;
    margin: 2.5rem 0 0;
    padding: 1.4rem 1.5rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.store-info h2 { margin: 0 0 .6rem; font-size: 1.15rem; }
.store-info p { margin: 0 0 .35rem; font-size: .92rem; line-height: 1.6; }
.store-info__actions { display: flex; flex-direction: column; gap: .5rem; }
.store-info__actions .btn { white-space: nowrap; justify-content: center; }

/* Kategori kartları ------------------------------------------------------- */

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: .85rem;
    margin-bottom: 2.5rem;
}
.category-card {
    display: block;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink-900);
    transition: border-color .15s, transform .15s, background .15s;
}
.category-card:hover {
    border-color: var(--brand-500);
    background: var(--brand-50);
    transform: translateY(-2px);
    text-decoration: none;
}
.category-card strong { display: block; font-size: .98rem; }
.category-card span { color: var(--ink-500); font-size: .82rem; }

/* Ürün kartları ----------------------------------------------------------- */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1rem;
}

.product-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow .15s, transform .15s, border-color .15s;
}
.product-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--brand-400);
    transform: translateY(-2px);
}

.product-card__media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #fff;
    display: grid;
    place-items: center;
    overflow: hidden;
}
/* Görsel kutuyu tamamen doldurur ama KIRPILMAZ.
   position:absolute şart: kutu yüksekliği aspect-ratio'dan geldiği için
   normal akışta height:100% çözülmüyor ve görsel taşıp kesiliyordu. */
.product-card__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: .5rem;
}
.product-card__placeholder { font-size: 2.5rem; opacity: .35; }

.badge {
    position: absolute;
    top: .55rem;
    left: .55rem;
    padding: .15rem .5rem;
    border-radius: 999px;
    background: var(--red-600);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.product-card__body {
    padding: .8rem .9rem 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: .3rem;
}
.product-card__category { font-size: .74rem; color: var(--ink-500); text-transform: uppercase; letter-spacing: .04em; }
.product-card__name {
    font-size: .96rem;
    font-weight: 600;
    color: var(--ink-900);
    line-height: 1.35;
}
.product-card__name:hover { color: var(--brand-700); text-decoration: none; }
.product-card__sku { font-size: .74rem; color: var(--ink-300); font-variant-numeric: tabular-nums; }

.price-row {
    margin-top: auto;
    padding-top: .5rem;
    display: flex;
    align-items: baseline;
    gap: .45rem;
    flex-wrap: wrap;
}
.price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--brand-700);
    font-variant-numeric: tabular-nums;
}
.price--old {
    font-size: .88rem;
    font-weight: 500;
    color: var(--ink-300);
    text-decoration: line-through;
}
.price-unit { font-size: .8rem; color: var(--ink-500); }

/* Filtre çubuğu ----------------------------------------------------------- */

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
}
.toolbar__count { color: var(--ink-500); font-size: .9rem; margin-right: auto; }
.toolbar select, .toolbar input {
    padding: .45rem .6rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: .9rem;
    background: var(--surface);
}

.chip-row { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.25rem; }
.chip {
    padding: .35rem .8rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink-700);
    font-size: .88rem;
}
.chip:hover { border-color: var(--brand-500); background: var(--brand-50); text-decoration: none; }
.chip.is-active {
    background: var(--brand-500);
    border-color: var(--brand-500);
    color: var(--on-brand);
    font-weight: 600;
}
.chip.is-active .muted { color: rgba(26, 21, 0, .6); }

/* Sayfalama --------------------------------------------------------------- */

.pagination {
    display: flex;
    justify-content: center;
    gap: .3rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.pagination a, .pagination span {
    min-width: 2.4rem;
    padding: .45rem .7rem;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink-700);
    font-size: .9rem;
}
.pagination a:hover { border-color: var(--brand-500); background: var(--brand-50); text-decoration: none; }
.pagination .is-current {
    background: var(--brand-500);
    border-color: var(--brand-500);
    color: var(--on-brand);
    font-weight: 700;
}
.pagination .is-disabled { opacity: .45; }

/* Ürün detay -------------------------------------------------------------- */

.product-detail {
    display: grid;
    grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
    gap: 2rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
}
.product-detail__media {
    position: relative;
    aspect-ratio: 1;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: grid;
    place-items: center;
    overflow: hidden;
}
.product-detail__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
}
.product-detail .price { font-size: 2rem; }

.meta-list { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; margin: 1.25rem 0; }
.meta-list dt { color: var(--ink-500); font-size: .9rem; }
.meta-list dd { margin: 0; font-size: .95rem; }

.breadcrumb { font-size: .88rem; color: var(--ink-500); margin-bottom: 1rem; }
.breadcrumb a { color: var(--ink-500); }
.breadcrumb a:hover { color: var(--brand-700); }

/* Sepet ------------------------------------------------------------------- */

.btn--cart { margin-top: .6rem; align-self: flex-start; }
.btn--cart.is-added { background: var(--green-600); border-color: transparent; color: #fff; }

.add-to-cart {
    display: flex;
    align-items: flex-end;
    gap: .6rem;
    margin: 1.25rem 0 0;
    flex-wrap: wrap;
}
.add-to-cart__qty { display: flex; flex-direction: column; gap: .2rem; }
.add-to-cart__qty input {
    width: 5.5rem;
    padding: .55rem .7rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: .95rem;
    background: var(--surface);
}
.add-to-cart .btn--cart { margin-top: 0; }

.cart[data-loading] { padding: 2rem 0; }

.cart-lines { list-style: none; margin: 0 0 1.25rem; padding: 0; display: grid; gap: .6rem; }
.cart-line {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto auto auto;
    align-items: center;
    gap: 1rem;
    padding: .75rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.cart-line__media {
    position: relative;
    width: 72px;
    aspect-ratio: 1;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    display: grid;
    place-items: center;
    overflow: hidden;
}
.cart-line__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: .25rem;
}
.cart-line__placeholder { font-size: 1.5rem; opacity: .35; }

.cart-line__info { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.cart-line__name { font-weight: 600; font-size: .95rem; color: var(--ink-900); }
.cart-line__name:hover { color: var(--brand-700); text-decoration: none; }
.cart-line__sku { font-size: .74rem; color: var(--ink-300); font-variant-numeric: tabular-nums; }
.cart-line__unit-price { font-size: .82rem; color: var(--ink-500); }

.cart-line__qty { display: inline-flex; align-items: center; gap: .25rem; }
.qty-btn {
    width: 2rem; height: 2rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font: inherit;
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    color: var(--ink-700);
}
.qty-btn:hover { background: var(--brand-50); border-color: var(--brand-400); }
.qty-input {
    width: 3.5rem;
    padding: .4rem .3rem;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: .9rem;
    font-variant-numeric: tabular-nums;
}

.cart-line__total {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: var(--brand-800);
}
.cart-line__remove {
    width: 2rem; height: 2rem;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--ink-300);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}
.cart-line__remove:hover { background: #fdecea; color: var(--red-600); }

.cart-summary {
    max-width: 26rem;
    margin-left: auto;
    padding: 1.1rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.cart-summary__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: .5rem;
    font-size: 1rem;
}
.cart-summary__row strong { font-size: 1.3rem; color: var(--brand-800); font-variant-numeric: tabular-nums; }
.cart-summary__row--muted { font-size: .85rem; color: var(--ink-500); }
.cart-summary .btn { margin-top: .6rem; }

.cart-warning {
    margin: .75rem 0 0;
    padding: .65rem .8rem;
    background: #fffaeb;
    border: 1px solid #f0dda0;
    border-radius: var(--radius-sm);
    font-size: .87rem;
    color: var(--ink-700);
    line-height: 1.5;
}
.cart-hint { margin: .5rem 0 0; font-size: .8rem; color: var(--ink-500); text-align: center; }

/* Blog -------------------------------------------------------------------- */

.blog-search { display: flex; gap: .4rem; }
.blog-search input {
    padding: .5rem .85rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    font: inherit;
    font-size: .93rem;
    background: var(--surface);
    min-width: 12rem;
}
.blog-search input:focus { outline: 2px solid var(--brand-700); outline-offset: 1px; }

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.post-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow .15s, transform .15s, border-color .15s;
}
.post-card:hover { box-shadow: var(--shadow); border-color: var(--brand-400); transform: translateY(-2px); }

.post-card__media {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--brand-50);
    display: grid;
    place-items: center;
    overflow: hidden;
}
.post-card__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.post-card__placeholder { font-size: 2.25rem; opacity: .4; }

.post-card__body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; flex: 1; gap: .45rem; }
.post-card__date { font-size: .78rem; color: var(--ink-500); text-transform: uppercase; letter-spacing: .04em; }
.post-card__title { margin: 0; font-size: 1.05rem; line-height: 1.35; }
.post-card__title a { color: var(--ink-900); }
.post-card__title a:hover { color: var(--brand-700); text-decoration: none; }
.post-card__excerpt { margin: 0; font-size: .9rem; color: var(--ink-700); line-height: 1.55; }
.post-card__more { margin-top: auto; padding-top: .5rem; font-size: .87rem; font-weight: 600; color: var(--brand-700); }

.post { max-width: 76ch; margin-inline: auto; }
.post__head { margin-bottom: 1.25rem; }
.post__head h1 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); margin-bottom: .35rem; }
.post__meta { color: var(--ink-500); font-size: .9rem; margin: 0; }
.post__cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    margin-bottom: 1.5rem;
}
.post__body { max-width: none; }
.post__body img { border-radius: var(--radius-sm); margin: 1rem 0; }

.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2.5rem;
    max-width: 76ch;
    margin-inline: auto;
}
.post-nav__link {
    display: block;
    padding: .9rem 1.1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink-900);
}
.post-nav__link:hover { border-color: var(--brand-500); background: var(--brand-50); text-decoration: none; }
.post-nav__link--next { text-align: right; }
.post-nav__label { display: block; font-size: .8rem; color: var(--ink-500); margin-bottom: .15rem; }

/* İçerik sayfası ---------------------------------------------------------- */

.prose {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 72ch;
}
.prose h2 { margin-top: 1.75rem; font-size: 1.2rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: .35rem; }

.note {
    margin-top: 1.5rem;
    padding: .85rem 1rem;
    background: var(--brand-50);
    border: 1px solid var(--brand-400);
    border-left: 4px solid var(--brand-500);
    border-radius: var(--radius-sm);
    color: var(--brand-800);
    font-size: .9rem;
}

.empty-state {
    text-align: center;
    padding: 3.5rem 1rem;
    background: var(--surface);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    color: var(--ink-500);
}
.empty-state h2 { color: var(--ink-700); }

/* --- Alt bilgi ----------------------------------------------------------- */

.site-footer {
    background: var(--surface);
    border-top: 3px solid var(--brand-500);
    padding: 2.5rem 0 1.25rem;
    font-size: .92rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}
.footer-grid h3 { font-size: .95rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-500); }
.footer-grid p { margin-bottom: .4rem; }
.social { display: flex; gap: .75rem; flex-wrap: wrap; }
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    color: var(--ink-500);
    font-size: .85rem;
}

/* ==========================================================================
   Yönetim paneli — koyu kenar çubuğu + sarı vurgular
   ========================================================================== */

.admin-body { background: var(--bg); }

.admin-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }

.admin-sidebar {
    background: var(--dark-900);
    color: rgba(255, 255, 255, .82);
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    border-right: 3px solid var(--brand-500);
}
.admin-sidebar__brand {
    color: var(--brand-500);
    font-weight: 700;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.admin-sidebar__brand:hover { text-decoration: none; color: var(--brand-400); }
.admin-nav { display: flex; flex-direction: column; gap: .15rem; }
.admin-nav a {
    padding: .55rem .75rem;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, .82);
    font-size: .93rem;
}
.admin-nav a:hover { background: rgba(255, 199, 0, .16); color: #fff; text-decoration: none; }
.admin-nav a.is-active { background: var(--brand-500); color: var(--on-brand); font-weight: 700; }
.admin-sidebar__foot { margin-top: auto; font-size: .82rem; color: rgba(255, 255, 255, .58); }
.admin-sidebar__foot a { color: var(--brand-400); }

.admin-main { padding: 1.5rem 1.75rem 3rem; min-width: 0; }
.admin-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.admin-head h1 { margin: 0; font-size: 1.4rem; }

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.25rem;
}
.card + .card { margin-top: 1.25rem; }
.card__title { font-size: 1rem; margin-bottom: 1rem; padding-bottom: .75rem; border-bottom: 1px solid var(--line); }

.steps { margin: 0 0 .5rem; padding-left: 1.2rem; display: grid; gap: .55rem; font-size: .92rem; line-height: 1.6; }
.steps code {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: .05rem .3rem;
    font-size: .85em;
    word-break: break-all;
}

.logo-field { display: flex; align-items: flex-start; gap: 1.25rem; flex-wrap: wrap; }
.logo-preview {
    width: 12rem;
    height: 5rem;
    display: grid;
    place-items: center;
    padding: .5rem;
    background: #fff;
    border: 1px dashed var(--line);
    border-radius: var(--radius-sm);
}
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }

.check-field { display: flex; align-items: flex-start; gap: .6rem; cursor: pointer; }
.check-field input { margin-top: .2rem; width: 1.05rem; height: 1.05rem; accent-color: var(--brand-700); }
.check-field span { display: flex; flex-direction: column; gap: .15rem; }
.check-field strong { font-size: .9rem; font-weight: 600; color: var(--ink-700); }
.check-field .hint { font-size: .8rem; color: var(--ink-500); font-weight: 400; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat {
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 4px solid var(--brand-500);
    border-radius: var(--radius);
    padding: 1rem 1.15rem;
}
.stat__label { color: var(--ink-500); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.stat__value { font-size: 1.75rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat--orange { border-left-color: var(--orange-600); }
.stat--blue { border-left-color: var(--blue-600); }

/* Tablolar ---------------------------------------------------------------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th, table.data td { padding: .65rem .85rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data th {
    background: var(--brand-50);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--brand-800);
    white-space: nowrap;
    position: sticky;
    top: 0;
}
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: #fffdf5; }
table.data td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-actions { display: flex; gap: .35rem; justify-content: flex-end; }

.thumb {
    width: 44px; height: 44px;
    border-radius: var(--radius-sm);
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--line);
}
.thumb--empty { display: grid; place-items: center; color: var(--ink-300); font-size: 1.1rem; }

.pill {
    display: inline-block;
    padding: .1rem .5rem;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 600;
}
.pill--on  { background: var(--green-50); color: #14603a; }
.pill--off { background: #f0eee6; color: var(--ink-500); }
.pill--new { background: var(--blue-50); color: var(--blue-600); }
.pill--upd { background: var(--brand-100); color: var(--brand-800); }
.pill--err { background: var(--red-50); color: var(--red-600); }

/* Formlar ----------------------------------------------------------------- */

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.1rem; }
.form-grid--wide { grid-template-columns: 1fr; }

.field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.field label { font-size: .88rem; font-weight: 600; color: var(--ink-700); }
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field input[type="search"],
.field input[type="file"],
.field select,
.field textarea {
    padding: .55rem .7rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: .95rem;
    background: var(--surface);
    color: var(--ink-900);
    width: 100%;
}
.field textarea { min-height: 7rem; resize: vertical; line-height: 1.5; }
.field textarea.tall { min-height: 18rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88rem; }
.field input:focus, .field select:focus, .field textarea:focus {
    outline: 2px solid var(--brand-700);
    outline-offset: -1px;
    border-color: var(--brand-600);
}
.field .hint { font-size: .8rem; color: var(--ink-500); }
.field .error { font-size: .82rem; color: var(--red-600); font-weight: 500; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--red-600); }

.check-row { display: flex; align-items: center; gap: .5rem; }
.check-row input { width: 1.05rem; height: 1.05rem; accent-color: var(--brand-600); }
.check-row label { font-weight: 500; font-size: .93rem; }

.form-actions {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
}
.form-actions .spacer { margin-left: auto; }

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    align-items: flex-end;
    margin-bottom: 1.25rem;
}
.filter-bar .field { flex: 1 1 180px; }

/* Zengin metin editörü ---------------------------------------------------- */

.editor {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    overflow: hidden;
}
.editor:focus-within { border-color: var(--brand-600); box-shadow: 0 0 0 2px var(--brand-100); }

.editor__toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: .2rem;
    padding: .45rem .5rem;
    background: var(--brand-50);
    border-bottom: 1px solid var(--line);
}

.editor__btn {
    padding: .32rem .6rem;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--ink-700);
    font: inherit;
    font-size: .85rem;
    line-height: 1.4;
    cursor: pointer;
    white-space: nowrap;
}
.editor__btn:hover { background: var(--surface); border-color: var(--line); color: var(--ink-900); }
.editor__btn.is-active { background: var(--brand-500); border-color: var(--brand-600); color: var(--on-brand); font-weight: 700; }

.editor__sep { width: 1px; align-self: stretch; margin: .15rem .3rem; background: var(--line); }

.editor__area {
    min-height: 20rem;
    max-height: 60vh;
    overflow-y: auto;
    padding: 1rem 1.1rem;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ink-900);
    outline: none;
}
/* Yer tutucu: alan görsel olarak boşken göster (içinde <p><br></p> olsa bile) */
.editor__area.is-empty[data-placeholder]::before {
    content: attr(data-placeholder);
    color: var(--ink-300);
    pointer-events: none;
    position: absolute;
}
.editor__area > *:first-child { margin-top: 0; }
.editor__area h2 { font-size: 1.3rem; margin: 1.4rem 0 .5rem; }
.editor__area h3 { font-size: 1.1rem; margin: 1.2rem 0 .4rem; }
.editor__area p { margin: 0 0 .9rem; }
.editor__area ul, .editor__area ol { padding-left: 1.4rem; margin: 0 0 .9rem; }
.editor__area li { margin-bottom: .25rem; }
.editor__area blockquote {
    margin: 0 0 .9rem;
    padding: .5rem 0 .5rem 1rem;
    border-left: 3px solid var(--brand-500);
    color: var(--ink-700);
    font-style: italic;
}
.editor__area img { max-width: 100%; height: auto; border-radius: var(--radius-sm); margin: .5rem 0; }
.editor__area hr { border: 0; border-top: 1px solid var(--line); margin: 1.2rem 0; }
.editor__area a { color: var(--brand-700); text-decoration: underline; }
.editor__area table { border-collapse: collapse; width: 100%; margin-bottom: .9rem; }
.editor__area th, .editor__area td { border: 1px solid var(--line); padding: .4rem .6rem; }

.editor .editor__source {
    display: none;
    width: 100%;
    min-height: 20rem;
    border: 0;
    border-radius: 0;
    padding: 1rem 1.1rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .85rem;
    line-height: 1.6;
    resize: vertical;
}
.editor .editor__source:focus { outline: none; }
.editor.is-source .editor__source { display: block; }
.editor.is-source .editor__area { display: none; }

.editor__status {
    min-height: 1.5rem;
    padding: .25rem .7rem;
    font-size: .82rem;
    color: var(--ink-500);
    border-top: 1px solid transparent;
}
.editor__status:not(:empty) { border-top-color: var(--line); background: var(--bg); }
.editor__status.is-error { color: var(--red-600); font-weight: 500; }

/* Giriş ekranı ------------------------------------------------------------ */

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-400) 55%, var(--brand-100) 100%);
}
.login-card {
    width: min(400px, 100%);
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border-top: 4px solid var(--brand-500);
    padding: 2rem;
}
.login-card h1 { font-size: 1.3rem; text-align: center; margin-bottom: .25rem; }
.login-card .subtitle { text-align: center; color: var(--ink-500); font-size: .9rem; margin-bottom: 1.5rem; }

/* İçe aktarma ------------------------------------------------------------- */

.steps { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.step {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .9rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    font-size: .88rem;
    color: var(--ink-500);
}
.step__num {
    width: 1.4rem; height: 1.4rem;
    border-radius: 50%;
    background: var(--bg);
    display: grid; place-items: center;
    font-size: .78rem; font-weight: 700;
}
.step.is-active { border-color: var(--brand-500); background: var(--brand-50); color: var(--brand-800); font-weight: 600; }
.step.is-active .step__num { background: var(--brand-500); color: var(--on-brand); }
.step.is-done .step__num { background: var(--brand-100); color: var(--brand-800); }

.dropzone {
    border: 2px dashed var(--brand-400);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    background: var(--brand-50);
}
.dropzone input[type="file"] { margin: 1rem auto 0; max-width: 22rem; }

.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .85rem; margin-bottom: 1.5rem; }
.summary {
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
    text-align: center;
}
.summary__value { font-size: 2rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.summary__label { font-size: .85rem; color: var(--ink-500); }
.summary--new { border-color: #c2ddf2; }
.summary--new .summary__value { color: var(--blue-600); }
.summary--upd { border-color: var(--brand-400); }
.summary--upd .summary__value { color: var(--brand-700); }
.summary--err { border-color: #f3c2bd; }
.summary--err .summary__value { color: var(--red-600); }

.price-change { display: inline-flex; align-items: center; gap: .35rem; font-variant-numeric: tabular-nums; }
.price-change .from { color: var(--ink-300); text-decoration: line-through; }
.price-change .to { font-weight: 600; }
.price-change .up { color: var(--red-600); }
.price-change .down { color: var(--green-600); }

.mapping-table select { min-width: 12rem; }

details.help {
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 4px solid var(--brand-500);
    border-radius: var(--radius);
    padding: .85rem 1.1rem;
    margin-bottom: 1.25rem;
}
details.help summary { cursor: pointer; font-weight: 600; font-size: .93rem; }
details.help[open] summary { margin-bottom: .75rem; }

code {
    background: var(--brand-50);
    padding: .1rem .35rem;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .88em;
    color: var(--brand-800);
}

/* --- Duyarlı düzen ------------------------------------------------------- */

/* Menü 1200px altında tek satıra sığmıyor — bu genişliğin altında hamburger.
   Arama da kendi satırını kaplamayıp logo ile sepetin arasına giriyor. */
@media (max-width: 1150px) {
    .header-inner {
        grid-template-columns: auto minmax(0, 1fr) auto auto;
        grid-template-areas:
            "brand search cart toggle"
            "nav   nav    nav  nav";
        gap: .45rem;
        padding: .5rem 0;
    }
    .search { grid-area: search; max-width: none; justify-self: stretch; gap: .3rem; }
    .search input { padding: .45rem .7rem; font-size: .9rem; }
    /* "Ara" yazısı yerine büyüteç — inputa daha çok yer kalsın */
    .search button { padding: .45rem; width: 2.3rem; font-size: 0; }
    .search button::before { content: "🔍"; font-size: .95rem; line-height: 1; }

    .cart-link { padding: .35rem .55rem; }
    .cart-link__text { display: none; }
    .brand-logo { height: 2.5rem; max-width: 9.5rem; }

    .nav-toggle-label {
        grid-area: toggle;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        width: 42px; height: 38px;
        padding: 8px;
        border: 1px solid var(--line);
        border-radius: var(--radius-sm);
        background: var(--brand-50);
        cursor: pointer;
    }
    .nav-toggle-label span { display: block; height: 2px; background: var(--ink-700); border-radius: 2px; }
    .site-nav { display: none; flex-direction: column; align-items: stretch; gap: .1rem; padding-bottom: .5rem; }
    .nav-toggle:checked ~ .site-nav { display: flex; }
    .site-nav a { padding: .6rem .75rem; }
}

/* Dar ekranda kenar boşluğunu kıs — arama kutusuna yer kalsın */
@media (max-width: 640px) {
    .container { width: min(1200px, 100% - 1.25rem); }
    .header-inner { gap: .35rem; }
    .cart-link { padding: .35rem .45rem; }
}

/* Çok küçük telefonlarda arama tek satıra sığmıyor; kendi satırına insin.
   Bu genişlikte iki satır, ezilmiş bir arama kutusundan iyidir. */
@media (max-width: 380px) {
    .header-inner {
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "brand  cart   toggle"
            "search search search"
            "nav    nav    nav";
    }
    .search button { width: auto; padding: .45rem .9rem; font-size: .9rem; }
    .search button::before { content: none; }
}

/* Küçük telefonlarda site adı yazısı düşsün, logoya yer kalsın */
@media (max-width: 560px) {
    .brand-text { display: none; }
    .brand-mark { width: 2rem; height: 2rem; font-size: 1.05rem; }
    .brand-logo { height: 2.3rem; max-width: 8rem; }
}


/* Menü ikinci satıra taşmasın: dar ekranda sepet yazısı düşer, ikon kalır */
@media (max-width: 1250px) {
    .cart-link__text { display: none; }
    .cart-link { padding: .45rem .65rem; }
}


@media (max-width: 900px) {
    .product-detail { grid-template-columns: 1fr; gap: 1.25rem; }
    .product-detail__media { max-width: 320px; }

    .cart-line {
        grid-template-columns: 64px minmax(0, 1fr) auto;
        grid-template-areas:
            "media info remove"
            "media qty  total";
        row-gap: .5rem;
    }
    .cart-line__media { grid-area: media; width: 64px; }
    .cart-line__info { grid-area: info; }
    .cart-line__qty { grid-area: qty; }
    .cart-line__total { grid-area: total; text-align: right; }
    .cart-line__remove { grid-area: remove; justify-self: end; }
    .cart-summary { max-width: none; margin-left: 0; }

    .store-info { grid-template-columns: 1fr; }
    .store-info__actions { flex-direction: row; flex-wrap: wrap; }
    .store-info__actions .btn { flex: 1; min-width: 10rem; }

    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        gap: .75rem;
        padding: .85rem 1rem;
        border-right: 0;
        border-bottom: 3px solid var(--brand-500);
    }
    .admin-nav { flex-direction: row; flex-wrap: wrap; }
    .admin-sidebar__foot { margin-top: 0; width: 100%; }
    .admin-main { padding: 1.25rem 1rem 3rem; }
}

@media (max-width: 560px) {
    body { font-size: 15px; }
    .post-nav { grid-template-columns: 1fr; }
    .post-nav__link--next { text-align: left; }
    .blog-search { width: 100%; }
    .blog-search input { flex: 1; min-width: 0; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; }
    .category-grid { grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); }
    .hero { padding: 1.5rem 1.15rem; }
    .prose { padding: 1.25rem; }
    .card { padding: 1rem; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media print {
    .site-header, .site-footer, .toolbar, .pagination, .chip-row { display: none; }
    body { background: #fff; }
    .product-card { break-inside: avoid; }
}
