﻿/* =========================================================
   Emsal Giyim - vitrin stilleri
   ========================================================= */

:root {
  --bg: #fbf8f4;
  --surface: #ffffff;
  --ink: #2a2320;
  --muted: #8a7f78;
  --line: #e7ded4;
  --plum: #6b2c3e;
  --plum-dark: #521f2e;
  --gold: #b08d57;
  --ok: #2f6b4f;
  --err: #a8322d;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(42, 35, 32, 0.07);
  --serif: "Playfair Display", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

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

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

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

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.25; margin: 0 0 .6rem; letter-spacing: .2px; }
h1 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.9rem); }

.wrap { width: min(1180px, 92vw); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { margin-bottom: .35rem; }
.center { text-align: center; }

/* ---------------- Üst bar & başlık ---------------- */

.topbar {
  background: var(--plum);
  color: #f6ece5;
  text-align: center;
  font-size: .82rem;
  letter-spacing: .04em;
  padding: .5rem 1rem;
}

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

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: .9rem 0;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: inherit; flex: 0 0 auto; }
.brand:hover { text-decoration: none; }
.brand-logo { height: 66px; width: auto; }

.brand-mark {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--plum); color: #fff;
  font-family: var(--serif); font-size: 1.35rem;
}
.brand-text strong { display: block; font-family: var(--serif); font-size: 1.2rem; letter-spacing: .04em; }
.brand-text small { display: block; color: var(--muted); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; }

.search { display: flex; flex: 1 1 240px; max-width: 420px; }
.search input {
  flex: 1; min-width: 0;
  border: 1px solid var(--line); border-right: 0;
  border-radius: 999px 0 0 999px;
  padding: .6rem 1rem; font: inherit; font-size: .92rem;
  background: var(--bg);
}
.search input:focus { outline: 2px solid var(--gold); outline-offset: -2px; }
.search button {
  border: 0; background: var(--ink); color: #fff;
  border-radius: 0 999px 999px 0; padding: 0 1.15rem;
  font: inherit; font-size: .9rem; cursor: pointer;
}
.search button:hover { background: var(--plum); }

.header-actions { display: flex; align-items: center; gap: 1.1rem; margin-left: auto; }
.link-quiet { color: var(--ink); font-size: .9rem; }
.cart-btn {
  background: var(--plum); color: #fff;
  padding: .55rem 1.1rem; border-radius: 999px;
  font-size: .9rem; display: inline-flex; align-items: center; gap: .45rem;
}
.cart-btn:hover { background: var(--plum-dark); text-decoration: none; }
.badge {
  background: var(--gold); color: #fff;
  min-width: 22px; height: 22px; border-radius: 999px;
  display: inline-grid; place-items: center;
  font-size: .75rem; font-weight: 700; padding: 0 .35rem;
}

.page { min-height: 60vh; padding-bottom: 3.5rem; }

/* ---------------- Uyarılar ---------------- */

.alert {
  border-radius: 10px; padding: .8rem 1rem; margin: 1rem 0;
  font-size: .93rem; border: 1px solid transparent;
}
.alert-success { background: #eaf4ee; border-color: #cbe4d5; color: var(--ok); }
.alert-error { background: #fbeceb; border-color: #f0cfcd; color: var(--err); }
.alert ul { margin: .4rem 0 0; padding-left: 1.1rem; }

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

.hero {
  background: linear-gradient(135deg, #f3e9e2 0%, #efe3ea 55%, #e8e5da 100%);
  border-bottom: 1px solid var(--line);
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
  margin-bottom: 2.2rem;
}
.hero-inner { max-width: 640px; }
.hero .eyebrow {
  text-transform: uppercase; letter-spacing: .18em;
  font-size: .72rem; color: var(--gold); font-weight: 700; margin-bottom: .7rem;
}
.hero p { color: #5b504a; font-size: 1.03rem; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.4rem; }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border: 1px solid transparent; border-radius: 999px;
  padding: .7rem 1.5rem; font: inherit; font-size: .93rem; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--plum); color: #fff; }
.btn-primary:hover { background: var(--plum-dark); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-outline { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-danger { background: #fff; border-color: #e2bcba; color: var(--err); }
.btn-danger:hover { background: var(--err); color: #fff; }
.btn-sm { padding: .4rem .9rem; font-size: .84rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

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

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem;
}

.filters { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.chip {
  border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: .38rem 1rem; font-size: .86rem; color: var(--ink);
}
.chip:hover { border-color: var(--plum); text-decoration: none; }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.select {
  border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: .4rem 1rem; font: inherit; font-size: .86rem;
}

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

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: .2s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.card-media { position: relative; aspect-ratio: 3 / 4; background: #f0eae4; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: .4s ease; }
.card:hover .card-media img { transform: scale(1.04); }
.card-media .no-photo { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); font-size: .85rem; }
.card-body { padding: .9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.card-title { font-family: var(--serif); font-size: 1.02rem; line-height: 1.35; margin: 0; }
.card-title a { color: inherit; }
.card-meta { color: var(--muted); font-size: .8rem; }
.price-row { display: flex; align-items: baseline; gap: .5rem; margin-top: auto; padding-top: .5rem; }
.price { font-size: 1.12rem; font-weight: 700; color: var(--plum); }
.price-old { text-decoration: line-through; color: var(--muted); font-size: .88rem; }

.tag {
  position: absolute; top: .7rem; left: .7rem;
  background: rgba(42,35,32,.85); color: #fff;
  font-size: .7rem; letter-spacing: .05em; text-transform: uppercase;
  padding: .25rem .6rem; border-radius: 999px;
}
.tag-out { background: rgba(168,50,45,.9); }

.size-pills { display: flex; gap: .3rem; flex-wrap: wrap; }
.size-pills span {
  border: 1px solid var(--line); border-radius: 6px;
  font-size: .72rem; padding: .1rem .42rem; color: var(--muted);
}
.size-pills span.off { opacity: .4; text-decoration: line-through; }

.empty {
  background: var(--surface); border: 1px dashed var(--line);
  border-radius: var(--radius); padding: 3rem 1.5rem; text-align: center; color: var(--muted);
}

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

.breadcrumb { font-size: .84rem; color: var(--muted); padding: 1.2rem 0; }
.breadcrumb a { color: var(--muted); }

.product-layout { display: grid; grid-template-columns: 1.05fr 1fr; gap: 2.5rem; align-items: start; }
.gallery-main {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; aspect-ratio: 3 / 4;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: .6rem; margin-top: .7rem; flex-wrap: wrap; }
.gallery-thumbs button {
  width: 72px; aspect-ratio: 3 / 4; padding: 0; overflow: hidden; cursor: pointer;
  border: 2px solid var(--line); border-radius: 8px; background: none;
}
.gallery-thumbs button.active { border-color: var(--plum); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.product-info .price { font-size: 1.75rem; }
.product-code { color: var(--muted); font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; }
.product-desc { white-space: pre-line; color: #574c46; }

.field-label { display: block; font-weight: 600; font-size: .9rem; margin: 1.3rem 0 .5rem; }
.size-options { display: flex; gap: .5rem; flex-wrap: wrap; position: relative; }
.size-options input {
  position: absolute; width: 1px; height: 1px;
  opacity: 0; pointer-events: none; margin: 0;
}
.size-options input:focus-visible + label { outline: 2px solid var(--gold); outline-offset: 2px; }
.size-options label {
  border: 1px solid var(--line); background: var(--surface);
  border-radius: 10px; padding: .5rem 1.1rem; cursor: pointer;
  font-size: .92rem; min-width: 54px; text-align: center;
}
.size-options input:checked + label { border-color: var(--plum); background: var(--plum); color: #fff; }
.size-options input:disabled + label { opacity: .38; cursor: not-allowed; text-decoration: line-through; }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); }
.qty button { border: 0; background: none; width: 38px; height: 40px; font-size: 1.1rem; cursor: pointer; color: var(--ink); }
.qty input { width: 46px; border: 0; text-align: center; font: inherit; background: none; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.info-list { border-top: 1px solid var(--line); margin-top: 1.8rem; padding-top: 1.2rem; display: grid; gap: .6rem; font-size: .9rem; color: #574c46; }

/* ---------------- WhatsApp ---------------- */
.wa-link { display: inline-flex; align-items: center; gap: .45rem; }
.wa-icon { width: 1.15em; height: 1.15em; flex: none; color: #25d366; }
.wa-float {
  position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 50;
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: #25d366; color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
  transition: transform .15s ease, box-shadow .15s ease;
}
.wa-float:hover, .wa-float:focus-visible { transform: scale(1.06); box-shadow: 0 8px 22px rgba(0, 0, 0, .28); color: #fff; }
.wa-float-icon { width: 30px; height: 30px; }
@media print { .wa-float { display: none; } }

/* ---------------- Sepet / form tabloları ---------------- */

.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem;
}
.panel + .panel { margin-top: 1.2rem; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }

.cart-layout { display: grid; grid-template-columns: 1.7fr 1fr; gap: 1.5rem; align-items: start; }

.cart-item { display: grid; grid-template-columns: 92px 1fr auto; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-item:last-child { border-bottom: 0; }
.cart-item img { width: 92px; aspect-ratio: 3/4; object-fit: cover; border-radius: 8px; }
.cart-item .no-photo { width: 92px; aspect-ratio: 3/4; background: #f0eae4; border-radius: 8px; }
.cart-item h3 { font-size: 1rem; margin: 0 0 .2rem; }
.cart-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }

.totals { display: grid; gap: .55rem; font-size: .95rem; }
.totals .row { display: flex; justify-content: space-between; }
.totals .row.grand { border-top: 1px solid var(--line); padding-top: .7rem; font-size: 1.15rem; font-weight: 700; color: var(--plum); }

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

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row { display: flex; flex-direction: column; gap: .35rem; }
.form-row.full { grid-column: 1 / -1; }
label.req::after { content: " *"; color: var(--err); }
.form-row label { font-size: .87rem; font-weight: 600; }
input[type=text], input[type=tel], input[type=email], input[type=number], input[type=password], input[type=search], textarea, select {
  border: 1px solid var(--line); border-radius: 10px;
  padding: .65rem .85rem; font: inherit; font-size: .95rem;
  background: var(--surface); color: var(--ink); width: 100%;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--gold); outline-offset: -1px; }
.hint { color: var(--muted); font-size: .8rem; }

.radio-list { display: grid; gap: .6rem; }
.radio-card {
  display: flex; gap: .7rem; align-items: flex-start;
  border: 1px solid var(--line); border-radius: 10px; padding: .8rem 1rem; cursor: pointer;
}
.radio-card:has(input:checked) { border-color: var(--plum); background: #fdf7f8; }
.checkbox { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; }
.pay-badge {
  display: inline-block; margin-left: .5rem; vertical-align: middle;
  background: #eaf3ee; color: #2f6b4f; border-radius: 999px;
  font-size: .7rem; font-weight: 700; padding: .15rem .55rem; letter-spacing: .02em;
}

/* ---------------- Sipariş özeti / takip ---------------- */

.order-head {
  background: linear-gradient(135deg, #f3e9e2, #efe3ea);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2rem; text-align: center; margin-bottom: 1.5rem;
}
.order-no { font-family: var(--serif); font-size: 1.7rem; letter-spacing: .06em; color: var(--plum); }

.status-pill {
  display: inline-block; border-radius: 999px; padding: .25rem .8rem;
  font-size: .78rem; font-weight: 700; background: #efe9e2; color: #6a5c53;
}
.status-yeni { background: #e6eef7; color: #2b5b8c; }
.status-onaylandi { background: #e9f2ec; color: #2f6b4f; }
.status-hazirlaniyor { background: #fbf1de; color: #916c1c; }
.status-kargoda { background: #ece7f7; color: #563f8f; }
.status-teslim { background: #e2f0e6; color: #23663f; }
.status-iptal { background: #fbeceb; color: var(--err); }

table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th, table.data td { padding: .7rem .6rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
table.data tbody tr:hover { background: #fcf9f6; }
.table-scroll { overflow-x: auto; }

/* ---------------- Sözleşme sayfaları ---------------- */

.legal-layout {
  display: grid; grid-template-columns: 250px 1fr; gap: 1.4rem;
  align-items: start; margin-top: 2rem;
}
.legal-nav { position: sticky; top: 100px; }
.legal-nav a { color: var(--ink); }
.legal-nav a.active { color: var(--plum); font-weight: 700; }
.legal-body {
  white-space: pre-line; color: #4d443f; font-size: .95rem; line-height: 1.75;
  margin-top: 1rem;
}

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

.site-footer { background: var(--ink); color: #ddd3cb; padding: 2.8rem 0 1.4rem; margin-top: 3rem; }
.site-footer h4 { color: #fff; font-size: 1rem; }
.site-footer a { color: #ddd3cb; }
.site-footer .muted { color: #a1958c; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.copyright {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,.12); margin-top: 2rem; padding-top: 1.2rem;
  font-size: .82rem; color: #a1958c;
}

/* ---------------- Duyarlı ---------------- */

@media (max-width: 900px) {
  .product-layout, .cart-layout, .legal-layout { grid-template-columns: 1fr; }
  .legal-nav { position: static; }
  .header-inner { gap: .8rem; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .header-actions { margin-left: 0; }
}

@media (max-width: 560px) {
  .brand-logo { height: 44px; }
  .form-grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1.1rem .8rem; }
  .header-actions { width: 100%; justify-content: space-between; }
  .cart-item { grid-template-columns: 70px 1fr; }
  .cart-item img, .cart-item .no-photo { width: 70px; }
  .cart-item > :last-child { grid-column: 1 / -1; }
  .panel { padding: 1.1rem; }
}
