/* Temel: görünüm belirteçleri (vitrin / konak), sıfırlama, tipografi, düzen, ortak bileşenler */

/* O1 Vitrin: beyaz zemin, şarküteri kırmızısı, Bricolage Grotesque */
:root {
  --bg: #FFFFFF;
  --surface: #F4F1EC;
  --well: #ECE6DC;
  --ink: #1A1614;
  --muted: #6B625B;
  --line: #E6E0D8;
  --brand: #8C1D18;
  --brand-dark: #6E1612;
  --on-brand: #FFFFFF;
  --tag: #F3C64B;
  --tag-ink: #1A1614;
  --accent: #8C1D18;
  --ok: #2F6B3A;
  --footer-bg: #1A1614;
  --footer-ink: #F4F1EC;

  --font-display: 'Bricolage Grotesque', 'Helvetica Neue', 'Arial', sans-serif;
  --font-ui: 'Onest', 'Helvetica Neue', 'Arial', sans-serif;
  --display-weight: 750;
  --display-tracking: -0.02em;
  --display-leading: 1.04;
  /* Fiyat ve rakamlar; küçük başlıklar (kutu, kart, çekmece) */
  --font-num: var(--font-display);
  --num-weight: 750;
  --num-tracking: -0.01em;
  --font-minor: var(--font-display);
  --minor-weight: 700;
  --minor-tracking: -0.01em;
  /* Başlık ölçeği */
  --h-hero: clamp(2.3rem, 1.5rem + 3.2vw, 4.25rem);
  --h1: clamp(2rem, 1.5rem + 2.2vw, 3.25rem);
  --h2: clamp(1.6rem, 1.35rem + 1.1vw, 2.25rem);
  --h3: clamp(1.15rem, 1.08rem + 0.3vw, 1.35rem);
}

/* O2 Konak: kırık beyaz zemin, Bursa yeşili, Young Serif (tek ağırlık) */
:root[data-gorunum='konak'] {
  --bg: #FBFAF7;
  --surface: #EEF0EA;
  --well: #ECE6DC;
  --ink: #14211E;
  --muted: #5B6662;
  --line: #DCE1D8;
  --brand: #1F5E55;
  --brand-dark: #164840;
  --tag: #E9B949;
  --tag-ink: #14211E;
  --accent: #B5653A;
  --footer-bg: #14211E;
  --footer-ink: #EEF0EA;

  --font-display: 'Young Serif', 'Georgia', serif;
  --display-weight: 400;
  --display-tracking: -0.012em;
  --display-leading: 1.12;
  /* Young Serif tek ağırlık ve ağır; yalnız H1/H2 ve logo. Rakam ve küçük başlık Onest */
  --font-num: var(--font-ui);
  --num-weight: 700;
  --num-tracking: -0.01em;
  --font-minor: var(--font-ui);
  --minor-weight: 700;
  --minor-tracking: -0.005em;
  --h-hero: clamp(2.1rem, 1.5rem + 2.4vw, 3.5rem);
  --h1: clamp(1.85rem, 1.45rem + 1.6vw, 2.75rem);
  --h2: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);
  --h3: clamp(1.1rem, 1.05rem + 0.25vw, 1.25rem);
}

:root {
  --step--2: 0.75rem;
  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: clamp(1.125rem, 1.08rem + 0.2vw, 1.25rem);
  --step-2: clamp(1.35rem, 1.2rem + 0.6vw, 1.75rem);
  --step-3: clamp(1.6rem, 1.35rem + 1.1vw, 2.25rem);
  --step-4: clamp(2rem, 1.5rem + 2.2vw, 3.25rem);

  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-s: 0.75rem;
  --space-m: 1rem;
  --space-l: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: clamp(2rem, 1.6rem + 1.8vw, 3rem);
  --space-3xl: clamp(2.75rem, 2rem + 3vw, 4.5rem);

  --gutter: clamp(16px, 3vw, 40px);
  --column-gap: clamp(12px, 1.4vw, 20px);
  --container: 1360px;
  --radius: 12px;
  --radius-s: 8px;
  --radius-pill: 999px;
  --header-height: 72px;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --duration-drawer: 220ms;
  --duration-fast: 160ms;
  --shadow-hover: 0 10px 28px -12px rgb(26 22 20 / 0.28);
  --shadow-drawer: 0 0 48px rgb(26 22 20 / 0.22);
  --focus: var(--brand);
}

@media (prefers-reduced-motion: reduce) {
  :root { --duration-drawer: 0ms; --duration-fast: 0ms; }
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; scroll-behavior: auto !important; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--step-0);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
p { margin: 0 0 var(--space-m); }
p:last-child { margin-bottom: 0; }
ul[role='list'], ol[role='list'] { list-style: none; margin: 0; padding: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }
table { border-collapse: collapse; width: 100%; }
em, i { font-style: normal; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.on-dark :focus-visible { outline-color: var(--tag); }

.skip-link {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 0.75rem 1rem; text-decoration: none; border-radius: var(--radius-s);
}
.skip-link:focus { top: 0.5rem; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.no-js .js-only { display: none !important; }
.js .no-js-only { display: none !important; }

/* Tipografi */
h1, h2, .display {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  line-height: var(--display-leading);
  margin: 0 0 var(--space-s);
  text-wrap: balance;
}
h3, h4 { font-family: var(--font-minor); font-weight: var(--minor-weight); letter-spacing: var(--minor-tracking); line-height: 1.3; margin: 0 0 var(--space-xs); text-wrap: balance; }
h1, .h1 { font-size: var(--h1); }
h2, .h2 { font-size: var(--h2); }
h3, .h3 { font-size: var(--h3); }
h4, .h4 { font-size: var(--step-0); }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--muted); max-width: 56ch; }
.prose { max-width: 68ch; }
.prose h2 { font-size: var(--step-2); margin-top: var(--space-xl); }
.prose h3 { font-size: var(--step-1); margin-top: var(--space-l); }
.prose img { margin: var(--space-l) 0; border-radius: var(--radius); }
.prose a { color: var(--brand); }
.prose ul, .prose ol { padding-left: 1.2em; }

.label {
  font-size: var(--step--1); font-weight: 600; line-height: 1.3; color: var(--muted);
}
.label--ink { color: var(--ink); }
.eyebrow { font-size: var(--step--1); font-weight: 600; color: var(--brand); margin: 0 0 var(--space-xs); }
.num, .price { font-variant-numeric: lining-nums proportional-nums; }
.muted { color: var(--muted); }
.small { font-size: var(--step--1); }

/* Düzen */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--space-2xl); }
@media (max-width: 749px) {
  .section { padding-block: var(--space-l); }
  .section-head { margin-bottom: var(--space-s); }
}
.section--tight { padding-block: var(--space-xl); }
.section--surface { background: var(--surface); }

.section-head {
  display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between;
  gap: var(--space-s) var(--space-l); margin-bottom: var(--space-l);
}
.section-head__title { margin: 0; font-size: var(--h2); }
.section-head__sub { margin: var(--space-2xs) 0 0; color: var(--muted); }
.section-head__actions { display: flex; align-items: center; gap: var(--space-s); }

/* Bağlantılar ve düğmeler */
.link { color: var(--brand); text-decoration: underline; text-decoration-color: currentColor; }
.link:hover { color: var(--brand-dark); }
.link-arrow {
  display: inline-flex; align-items: center; gap: 0.35em;
  color: var(--brand); text-decoration: none; font-weight: 600; font-size: var(--step--1); white-space: nowrap;
}
.link-arrow::after { content: '\2192'; transition: transform var(--duration-fast) var(--ease); }
.link-arrow:hover::after { transform: translateX(3px); }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  min-height: 48px; padding: 0.7rem 1.35rem;
  border: 1.5px solid var(--brand); border-radius: var(--radius-s);
  background: var(--brand); color: var(--on-brand);
  font-family: var(--font-ui); font-size: var(--step-0); font-weight: 600; line-height: 1.2;
  text-decoration: none; text-align: center;
  transition: background-color var(--duration-fast) var(--ease), border-color var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease);
}
.button:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.button .icon { width: 20px; height: 20px; flex: none; }
.button--secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.button--secondary:hover { background: var(--surface); border-color: var(--ink); }
.button--outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.button--outline:hover { background: var(--brand); color: var(--on-brand); }
.button--light { background: #FFFFFF; color: var(--ink); border-color: #FFFFFF; }
.button--light:hover { background: var(--surface); border-color: var(--surface); }
.button--ghost-light { background: transparent; color: #FFFFFF; border-color: rgb(255 255 255 / 0.7); }
.button--ghost-light:hover { background: rgb(255 255 255 / 0.14); border-color: #FFFFFF; }
.button--small { min-height: 40px; padding: 0.45rem 0.9rem; font-size: var(--step--1); }
.button--full { width: 100%; }
.button[disabled], .button[aria-disabled='true'] { opacity: 0.45; cursor: not-allowed; }
.button[aria-busy='true'] { opacity: 0.7; cursor: progress; }

.icon { width: 22px; height: 22px; flex: none; }
.icon-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4em;
  min-width: 44px; min-height: 44px; padding: 0 0.5rem; border-radius: var(--radius-s);
  background: none; border: 0; color: inherit; text-decoration: none;
  font-size: var(--step--1); font-weight: 600;
}
.icon-button:hover { background: var(--surface); }

/* Form alanları */
.field { display: grid; gap: 0.35rem; margin-bottom: var(--space-m); }
.field__label { font-size: var(--step--1); font-weight: 600; }
.field__input, .select {
  width: 100%; min-height: 48px; padding: 0.65rem 0.9rem;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-s);
}
textarea.field__input { min-height: 120px; resize: vertical; }
.field__input:focus-visible, .select:focus-visible { outline-offset: 0; border-color: var(--ink); }
.select {
  appearance: none; padding-right: 2.4rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236B625B' stroke-width='1.6'/%3E%3C/svg%3E");
  background-position: calc(100% - 14px) 50%; background-size: 12px 8px; background-repeat: no-repeat;
}
.checkbox { display: flex; gap: 0.65rem; align-items: flex-start; font-size: var(--step--1); line-height: 1.45; cursor: pointer; }
.checkbox input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--brand); }
.form-message { padding: 0.8rem 1rem; border-radius: var(--radius-s); background: var(--surface); font-size: var(--step--1); margin-bottom: var(--space-m); }
.form-message--error { background: #FBEAE8; color: #8C1D18; }
.form-message--success { background: #E8F2EA; color: var(--ok); }

/* Rozetler ve çipler */
.badge {
  display: inline-flex; align-items: center; gap: 0.35em;
  padding: 0.25rem 0.6rem; border-radius: var(--radius-pill);
  background: var(--bg); color: var(--ink);
  font-size: var(--step--2); font-weight: 600; line-height: 1.3;
}
.badge .icon { width: 14px; height: 14px; }
.badge--pickup { background: var(--ink); color: var(--bg); }
.badge--ship { background: #E8F2EA; color: var(--ok); }
.badge--best { background: var(--brand); color: var(--on-brand); }
.badge--soldout { background: var(--muted); color: #FFFFFF; }
.chip {
  display: inline-flex; align-items: center; gap: 0.4em; min-height: 40px; padding: 0.4rem 0.95rem;
  border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--bg);
  font-size: var(--step--1); font-weight: 600; text-decoration: none; white-space: nowrap;
}
.chip:hover { border-color: var(--ink); }
.chip--active { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* Medya kutuları: sabit oran, yüzey renginde zemin (görsel yoksa düzgün yer tutucu) */
.media { position: relative; overflow: hidden; background: var(--well); border-radius: var(--radius); }
.media > img, .media > svg { width: 100%; height: 100%; object-fit: cover; }
.placeholder-svg { fill: color-mix(in srgb, var(--ink) 14%, transparent); background: var(--well); }
.ratio-1 { aspect-ratio: 1; }
.ratio-45 { aspect-ratio: 4 / 5; }
.ratio-32 { aspect-ratio: 3 / 2; }
.ratio-23 { aspect-ratio: 2 / 3; }
.ratio-169 { aspect-ratio: 16 / 9; }

/* Tezgâh etiketi: sarı fiyat etiketi (imza öğe) */
.price-tag {
  --tag-rotate: -2deg;
  position: relative; display: inline-flex; align-items: baseline; gap: 0.2em;
  padding: 0.32rem 0.7rem 0.32rem 1.45rem;
  background: var(--tag); color: var(--tag-ink);
  border-radius: 4px 8px 8px 4px;
  font-family: var(--font-num); font-weight: var(--num-weight); letter-spacing: var(--num-tracking);
  font-size: 0.92rem; line-height: 1.1; white-space: nowrap;
  transform: rotate(var(--tag-rotate));
  box-shadow: 0 2px 0 rgb(0 0 0 / 0.12);
  font-variant-numeric: lining-nums;
}
.price-tag::before {
  content: ''; position: absolute; left: 0.5rem; top: 50%; width: 8px; height: 8px; margin-top: -4px;
  border-radius: 50%; background: var(--well); border: 1.5px solid rgb(0 0 0 / 0.38);
  box-shadow: inset 0 1px 1.5px rgb(0 0 0 / 0.3);
}
.price-tag__unit { font-family: var(--font-ui); font-weight: 600; font-size: 0.72em; }
.price-tag--large { font-size: 1.2rem; padding: 0.45rem 0.9rem 0.45rem 1.7rem; }
.price-tag[hidden] { display: none; }

/* Yatay raf: kaydır-yapış; oklar section-rail.css içinde */
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 68%;
  gap: var(--column-gap); overflow-x: auto; scroll-snap-type: x mandatory;
  margin-inline: calc(var(--gutter) * -1); padding: 4px var(--gutter) var(--space-s);
  scroll-padding-inline: var(--gutter); scrollbar-width: none; overscroll-behavior-x: contain;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; min-width: 0; }
@media (min-width: 750px) { .rail { grid-auto-columns: calc((100% - var(--gutter) * 2 - var(--column-gap) * 2) / 3); } }
/* Masaüstünde raf kartları ızgara sütunlarıyla aynı genişlikte; kenardan taşmaz, oklarla kayar */
@media (min-width: 1100px) {
  .rail { margin-inline: 0; padding-inline: 0; scroll-padding-inline: 0; grid-auto-columns: calc((100% - var(--column-gap) * 3) / 4); }
}

.product-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-xl) var(--column-gap);
}
@media (min-width: 750px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .product-grid { grid-template-columns: repeat(var(--grid-cols, 4), minmax(0, 1fr)); } }

/* Çekmece (dialog) */
.drawer {
  position: fixed; inset: 0 0 0 auto; margin: 0; padding: 0;
  width: min(440px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh;
  border: 0; background: var(--bg); color: var(--ink);
  box-shadow: var(--shadow-drawer);
  transform: translateX(100%);
  transition: transform var(--duration-drawer) var(--ease), display var(--duration-drawer) allow-discrete, overlay var(--duration-drawer) allow-discrete;
}
.drawer--left { inset: 0 auto 0 0; transform: translateX(-100%); }
.drawer[open] { transform: none; }
@starting-style { .drawer[open] { transform: translateX(100%); } .drawer--left[open] { transform: translateX(-100%); } }
.drawer::backdrop { background: rgb(20 16 14 / 0.45); }
.drawer__inner { display: flex; flex-direction: column; height: 100%; }
.drawer__head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-m);
  padding: var(--space-s) var(--space-l); border-bottom: 1px solid var(--line); min-height: 64px;
}
.drawer__title { font-family: var(--font-minor); font-weight: var(--minor-weight); letter-spacing: var(--minor-tracking); font-size: var(--step-1); line-height: 1.2; margin: 0; }
.drawer__body { flex: 1; overflow-y: auto; padding: var(--space-l); }
.drawer__foot { border-top: 1px solid var(--line); padding: var(--space-l); background: var(--bg); }

/* Akordeon */
.accordion { border-bottom: 1px solid var(--line); }
.accordion:first-of-type { border-top: 1px solid var(--line); }
.accordion > summary {
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-m);
  min-height: 56px; cursor: pointer; list-style: none; font-weight: 600;
}
.accordion > summary::-webkit-details-marker { display: none; }
.accordion > summary::after {
  content: ''; width: 10px; height: 10px; flex: none; margin-right: 4px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-3px); transition: transform var(--duration-fast) var(--ease);
}
.accordion[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.accordion__content { padding-bottom: var(--space-l); color: var(--muted); }

/* Sayfalama */
.pagination { display: flex; flex-direction: column; align-items: center; gap: var(--space-s); margin-top: var(--space-2xl); }
.pagination__pages { display: flex; gap: var(--space-2xs); font-size: var(--step--1); }
.pagination__pages a, .pagination__pages span {
  min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; text-decoration: none; border-radius: var(--radius-s);
}
.pagination__pages a:hover { background: var(--surface); }
.pagination__pages .is-current { background: var(--ink); color: var(--bg); }

/* Sepet sayacı tıkı */
@keyframes count-tick { 0% { transform: scale(0.6); opacity: 0; } 100% { transform: none; opacity: 1; } }
.cart-count.is-ticking { animation: count-tick 260ms var(--ease); }

/* Ekmek kırıntısı */
.breadcrumb { font-size: var(--step--1); color: var(--muted); margin-bottom: var(--space-s); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0.35rem; list-style: none; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: '/'; margin-right: 0.35rem; color: var(--line); }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--brand); text-decoration: underline; }

.page-head { padding-block: var(--space-m) var(--space-l); }
.page-head__title { margin: 0; }
.rte-empty { color: var(--muted); }

/* Ürün bilgi tablosu (tezgâh etiketi verisi) */
.ticket { margin: 0; display: grid; font-variant-numeric: lining-nums; }
.ticket__head { display: none; }
.ticket__row {
  display: grid; grid-template-columns: minmax(7rem, 2fr) 3fr; gap: var(--space-m);
  padding: 0.6rem 0; border-bottom: 1px solid var(--line); font-size: var(--step--1);
}
.ticket__row:last-child { border-bottom: 0; }
.ticket__row dt { color: var(--muted); }
.ticket__row dd { margin: 0; color: var(--ink); font-weight: 500; }
.ticket__row--warn dd { color: var(--brand); }

/* Bölüm başlığı: başlık solda, bağlantı sağda; mobilde de aynı satırda */
.section-head > div:first-child { min-width: 0; flex: 1 1 auto; }
@media (max-width: 749px) {
  .section-head { flex-wrap: nowrap; align-items: flex-end; gap: var(--space-s); }
  .section-head__sub { font-size: var(--step--1); }
  .section-head__actions { flex: none; padding-bottom: 2px; }
}
