/* =========================================================
   GLOBAL THEME TOKENS
========================================================= */
:root{
  /* Brand palette */
  --brand:#f51919;
  --brand-dark:#680101;
  --accent:#ff1e1e;

  /* Base */
  --bg:#f6f7f9;
  --card:#ffffff;
  --text:#1f2937;
  --muted:#6b7280;
  --border:#e5e7eb;
  --ring:rgba(245,25,25,.15);

  /* Shadows */
  --shadow-sm:0 6px 16px rgba(2,8,23,.04);
  --shadow-md:0 12px 32px rgba(2,8,23,.06), 0 2px 8px rgba(2,8,23,.04);
}

/* =========================================================
   BASE & LAYOUT
========================================================= */
*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,"Helvetica Neue",Arial,"Noto Sans",sans-serif;
  color:var(--text);
  background:var(--bg);
  -webkit-tap-highlight-color:transparent;
}
a{ color:inherit; text-decoration:none; }
img{ display:block; max-width:100%; height:auto; }
.container{ max-width:1100px; margin:0 auto; padding:0 16px; }

/* Utilities */
.small{ font-size:12px; color:var(--muted); }
.badge{ padding:3px 8px; border-radius:999px; font-size:12px; background:#ff0000; color:#fff; border:1px solid var(--border); }
.pill{ padding:2px 8px; border-radius:999px; background:#eef8f1; color:#045c32; font-size:12px; margin-left:8px; }

/* =========================================================
   HEADER (top row only – menu/drawer header-menu.css'te)
========================================================= */
.header{
  position:sticky; top:0; z-index:10;
  background:#fff; border-bottom:1px solid #eee;
}
.header .top{ display:flex; align-items:center; gap:16px; padding:10px 0; }
.logo{ display:flex; align-items:center; gap:10px; font-weight:800; letter-spacing:.3px; }
.logo-badge{
  width:34px; height:34px; border-radius:10px;
  background:linear-gradient(135deg,var(--brand),#ff0000);
  display:grid; place-items:center; color:#fff; font-weight:900;
}
/* Search */
.search{ flex:1; display:flex; border:1px solid var(--border); border-radius:12px; overflow:hidden; background:#fff; }
.search input{ flex:1; border:0; padding:10px 12px; font-size:14px; outline:none; min-width:0; }
.search button{ border:0; background:var(--brand); color:#fff; padding:0 14px; cursor:pointer; }
.search button:focus-visible{ outline:0; box-shadow:0 0 0 3px var(--ring); }
/* Toolbar */
.toolbar{ display:flex; gap:10px; align-items:center; }

/* Chip nav’ı SADECE header içinde uygula */
.header .nav{ display:flex; gap:14px; padding:10px 0 12px; font-size:14px; overflow:auto; -webkit-overflow-scrolling:touch; }
.header .nav a{ padding:8px 12px; border-radius:999px; border:1px solid var(--border); background:#fff; white-space:nowrap; }
.header .nav a.active,.header .nav a:hover{ border-color:var(--brand); color:var(--brand); }

/* Header dışındaki .navlar normal link kalsın */
.nav:not(.header .nav) a{ padding:0; border:0; background:none; border-radius:0; }

/* =========================================================
   BUTTONS
========================================================= */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  border-radius:12px; border:1px solid var(--border);
  padding:10px 12px; background:#fff; cursor:pointer;
  transition: box-shadow .2s ease, transform .02s ease, filter .2s ease;
}
.btn:hover{ box-shadow:var(--shadow-sm); }
.btn:focus-visible{ outline:none; box-shadow:0 0 0 3px var(--ring); }
.btn.primary{ background:var(--brand); border-color:var(--brand); color:#fff; }
.btn.primary:hover{ filter:brightness(1.02); }
.btn.full{ width:100%; }
.btn.big{ width:100%; padding:14px 16px; border-radius:14px; font-weight:700; font-size:16px; margin-top:12px; }
.btn.disabled{ opacity:.6; cursor:not-allowed; }
.btn.icon{ padding:8px 10px; }
.btn.danger{ border-color:#fca5a5; color:#b91c1c; background:#fff5f5; }
.btn.danger:hover{ background:#fee2e2; }

/* =========================================================
   CARDS & GRID (product list)
========================================================= */
.grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:18px;           /* 16px yerine 18px yaparak kategoriyle eşit */
}
.card{
  background:#fff; border:1px solid #eee; border-radius:16px;
  overflow:hidden; display:flex; flex-direction:column; box-shadow:var(--shadow-sm);
}
.card .img{ aspect-ratio:1/1; background:#fff; display:grid; place-items:center; }
.card .img img{ max-width:90%; max-height:90%; }
.card .content{ padding:12px; }
.price{ display:flex; align-items:baseline; gap:8px; }
.price .sale{ color:var(--accent); font-weight:700; }
.price .orig{ color:var(--muted); text-decoration:line-through; font-size:13px; }

/* =========================================================
   HERO / BREADCRUMB
========================================================= */
.hero{ background:linear-gradient(90deg,#e9fff3,#ffffff); border-bottom:1px solid #eef2f5; }
.hero-inner{ display:flex; gap:24px; align-items:center; padding:24px 0; flex-wrap:wrap; }
.hero img{ border-radius:18px; border:1px solid var(--border); max-width:100%; }
.breadcrumbs{ font-size:13px; color:var(--muted); margin:12px 0; overflow:auto; white-space:nowrap; }

/* =========================================================
   FORMS & TABLES
========================================================= */
.form label{ display:block; margin:8px 0 6px; }
.form input,.form textarea,.form select{
  width:100%; padding:10px; border:1px solid var(--border); border-radius:10px; background:#fff;
}
.table{ width:100%; border-collapse:collapse; }
.table th,.table td{ padding:10px; border-bottom:1px solid #eee; text-align:left; }
.table tfoot td{ font-weight:700; }

/* =========================================================
   ALERT
========================================================= */
.alert{
  padding:10px 12px; border:1px solid var(--border); background:#fff;
  border-left:4px solid var(--brand); border-radius:8px;
}

/* =========================================================
   FOOTER
========================================================= */
.footer{ margin-top:40px; padding:30px 0; border-top:1px solid #eee; color:#6b7280; background:#fff; }

/* =========================================================
   HOME – Slider & Tiles & Home Categories
========================================================= */
.home-slider {
  position: relative;
  margin-top: 12px;
  overflow: hidden; /* dışarı taşan slide'ı gizle */
  border-radius: 18px;
}

.slider-track {
  display: flex;
  width: 100%; /* JS ile güncellenecek */
  transition: transform 0.6s ease-in-out;
}

.slide {
  flex: 0 0 100%;   /* her slide tam genişlik */
  max-width: 100%;
  box-sizing: border-box;
}

.slide img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
  border: 1px solid var(--border);
}

.slide-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #333;
}

.slide-nav.prev { left: 12px; }
.slide-nav.next { right: 12px; }


/* Kampanya kutuları */
.tiles-grid{ display:grid; grid-template-columns:repeat(6,1fr); gap:12px; margin:16px 0 8px; }
.tile{ display:block; background:#fff; border:1px solid #eee; border-radius:16px; overflow:hidden; }
.tile img{ width:100%; height:100%; object-fit:cover; display:block; }

/* Ana sayfa kategorileri (kart karusel) */
.homecat-wrap{ position:relative; margin:8px 0 18px; }
.homecat-track{ display:flex; gap:14px; overflow:auto; scroll-snap-type:x mandatory; padding:4px; }
.homecat-track::-webkit-scrollbar{ display:none; }
.homecat-card{
  min-width:240px; height:190px; scroll-snap-align:start;
  background:#fff; border:1px solid #eee; border-radius:18px;
  display:flex; flex-direction:column; align-items:center; justify-content:flex-start;
  padding:12px; position:relative; text-align:center;
}
.homecat-card img{ width:100%; height:130px; object-fit:contain; }
.homecat-title{ font-weight:800; margin-bottom:8px; }
.homecat-nav{
  position:absolute; top:50%; transform:translateY(-50%);
  width:40px;height:40px;border-radius:999px;border:1px solid var(--border);
  background:#fff; box-shadow:0 6px 16px rgba(0,0,0,.08); cursor:pointer; display:none;
}
.homecat-nav.prev{ left:-6px; } .homecat-nav.next{ right:-6px; }
.category-title{ display:none; }

/* =========================================================
   PRODUCT DETAIL
========================================================= */
.product-detail{
  display:grid; grid-template-columns: 1fr 350px; gap:32px; align-items:start;
  margin-bottom:30px;
}
.product-left{ display:flex; justify-content:center; align-items:flex-start; }
.product-right{ max-width:350px; width:100%; }

.qty{ display:flex; align-items:center; gap:10px; border:1px solid var(--border); border-radius:12px; padding:8px 10px; background:#fff; }
.qty input{ width:56px; padding:8px; border:0; outline:none; text-align:center; }

/* =========================================================
   CART
========================================================= */
.cart-grid{
  display:grid; grid-template-columns:1.4fr .8fr; gap:24px; margin-top:12px;
  align-items:start;
}
.cart-items{ display:flex; flex-direction:column; gap:16px; }

.cart-item{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  background:#fff; border:1px solid #eef0f2; border-radius:16px; padding:16px;
  box-shadow:var(--shadow-sm); flex-wrap:wrap;
}
.cart-item-left{ display:flex; align-items:center; gap:14px; min-width:0; }
.cart-img{
  width:84px; height:84px; border-radius:12px; background:#fff; border:1px solid #eef0f2;
  display:grid; place-items:center; overflow:hidden; flex:0 0 84px;
}
.cart-img img{ max-width:90%; max-height:90%; object-fit:contain; }
.cart-title{ font-weight:700; margin-bottom:4px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:420px; }
.price-line{ color:#16a34a; font-weight:700; }

/* >>> Kilit düzen: taşma engelleme + hizalama */
.cart-item-right{
  display:grid;
  grid-template-columns:auto 1fr auto; /* qty | esnek | çöp */
  align-items:center;
  gap:12px;
  min-width:0;
  width:100%;
}
.line-subtotal{
  justify-self:end;
  white-space:nowrap;
  max-width:45vw;
  overflow:hidden;
  text-overflow:ellipsis;
  font-weight:800; color:#0f172a;
}

.qty-control{
  display:flex; align-items:center; gap:8px;
  border:1px solid var(--border); border-radius:12px; padding:6px 8px; background:#fff;
}
.qty-control input{ width:56px; text-align:center; border:0; outline:none; padding:6px 4px; }
.btn-qty{
  border:0; background:#f3f4f6; width:28px; height:28px; border-radius:8px;
  cursor:pointer; font-size:18px; line-height:1;
}
.btn-qty:hover{ background:#e5e7eb; }

.cart-actions{ display:flex; gap:10px; margin-top:8px; }

/* Summary */
.summary-card{
  background:#fff; border:1px solid #eef0f2; border-radius:16px; padding:16px;
  position:sticky; top:86px; height:fit-content; box-shadow:var(--shadow-md);
}
.summary-note{
  display:flex; gap:12px; align-items:flex-start;
  background:#f9ece8; border:1px solid #f2d7cf; border-radius:14px; padding:12px; margin-bottom:16px;
}
.summary-note .note-icon{ font-size:20px; }
.summary-note .ok{ color:#0a8a4b; font-weight:700; }
.danger{ color:#ef4444; }

.summary-table .row{
  display:flex; justify-content:space-between; padding:8px 0;
}
.summary-table .total{ font-weight:700; }
.summary-table .grand{ font-size:18px; font-weight:800; color:#0a8a4b; }

/* =========================================================
   CHECKOUT – Payment options & summary
========================================================= */
.paybox{
  margin-top:18px; padding:14px; border:1px solid var(--border); border-radius:16px; background:#fff;
}
.paybox .title{
  font-weight:800; font-size:16px; margin-bottom:10px; display:flex; align-items:center; gap:8px;
}
.paybox .title::before{ content:"💳"; font-size:18px; }
.payopts{ display:grid; gap:10px; }

.payopt{ position:relative; display:flex; align-items:stretch; cursor:pointer; user-select:none; }
.payopt input[type="radio"]{ position:absolute; inset:0; opacity:0; cursor:pointer; }
.payopt-card{
  flex:1; border:1.5px solid var(--border); background:#fff; border-radius:14px;
  padding:12px 14px; display:flex; align-items:center; gap:12px;
  transition:border-color .2s ease, box-shadow .2s ease, transform .02s ease;
}
.payopt:hover .payopt-card{ border-color:var(--brand); }
.payopt input[type="radio"]:focus-visible ~ .payopt-card{ outline:3px solid var(--ring); outline-offset:2px; }
.payopt input[type="radio"]:checked ~ .payopt-card{ border-color:var(--brand); box-shadow:0 10px 32px rgba(10,138,75,.12); }

.paycheck{
  width:20px; height:20px; border-radius:50%; border:2px solid #cbd5e1; flex:0 0 20px; position:relative;
}
.payopt input[type="radio"]:checked ~ .payopt-card .paycheck{ border-color:var(--brand); }
.payopt input[type="radio"]:checked ~ .payopt-card .paycheck::after{
  content:""; position:absolute; inset:4px; border-radius:50%; background:var(--brand);
}
.paylabel{ font-weight:600; }
.paydesc{ font-size:12px; color:#6b7280; margin-top:2px; }
.paybox .hint{ margin-top:6px; color:#6b7280; font-size:12px; }

/* Checkout summary (right) */
.summary-head{
  display:flex; align-items:center; justify-content:space-between;
  font-weight:800; font-size:18px; margin-bottom:10px;
}
.sum-items{ border-top:1px solid #eef2f5; margin-top:6px; padding-top:8px; }
.sum-item{ display:flex; justify-content:space-between; align-items:center; padding:6px 0; gap:10px; font-size:14px; }
.sum-item .name{ color:#374151; } .sum-item .price{ font-weight:600; }
.sum-totals{ margin-top:8px; border-top:1px dashed #e5e7eb; padding-top:8px; }
.sum-row{ display:flex; align-items:center; justify-content:space-between; padding:8px 0; font-size:14px; }
.sum-row.muted{ color:#6b7280; }
.sum-row.total{ font-weight:800; font-size:16px; border-top:1px solid #eef2f5; margin-top:6px; padding-top:10px; }
.sum-row .grand{ font-size:17px; }

/* Checkout left form card */
.checkout-card{
  background:#fff; border:1px solid var(--border); border-radius:16px; padding:16px; box-shadow:0 8px 30px rgba(0,0,0,.04);
}
.checkout-title{ font-size:18px; font-weight:800; margin-bottom:10px; }
.form-grid-2{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.field{ margin-bottom:12px; }
.field label{ display:flex; align-items:center; gap:6px; font-size:14px; font-weight:600; margin:0 0 6px; }
.field .optional{ font-weight:400; color:#6b7280; font-size:12px; }
.checkout-card .form input,
.checkout-card .form select,
.checkout-card .form textarea{
  border-radius:12px; border:1px solid var(--border); background:#fff; padding:10px 12px; width:100%;
  outline:none; transition:border-color .15s ease, box-shadow .15s ease;
}
.checkout-card .form textarea{ min-height:110px; resize:vertical; }
.checkout-card .form input:focus,
.checkout-card .form select:focus,
.checkout-card .form textarea:focus{ border-color:var(--brand); box-shadow:0 0 0 3px var(--ring); }
.checkout-actions{ margin-top:12px; }

/* =========================================================
   DASHBOARD
========================================================= */
.dash{ display:grid; gap:16px; }
.dash-cards{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.dash-card{ background:#fff; border:1px solid #eee; border-radius:14px; padding:16px; }
.dash-card .k{ color:#6b7280; font-size:12px; }
.dash-card .v{ font-size:28px; font-weight:800; margin:6px 0; }
.dash-card .s{ color:#6b7280; }
.dash-card .small{ font-size:12px; }

.dash-grids{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.panel{ background:#fff; border:1px solid #eee; border-radius:14px; padding:16px; }
.panel-head{ font-weight:700; margin-bottom:10px; }

.bars{ display:flex; align-items:flex-end; gap:8px; height:180px; overflow-x:auto; }
.bar{ position:relative; width:100%; max-width:42px; display:flex; flex-direction:column; align-items:center; }
.bar-col{ width:100%; background:linear-gradient(180deg,#18a058,#0a8a4b); border-radius:8px 8px 0 0; min-height:6%; }
.bar-x{ font-size:11px; color:#6b7280; margin-top:6px; white-space:nowrap; }
.bar-v{ position:absolute; top:-18px; font-size:11px; background:#111; color:#fff; padding:1px 4px; border-radius:4px; opacity:.85; }

.table.compact th,.table.compact td{ padding:8px; }
.pct{ position:relative; height:8px; background:#f1f5f9; border-radius:999px; }
.pct span{ position:absolute; left:0; top:0; bottom:0; background:#0a8a4b; border-radius:999px; }
.pct em{ position:absolute; right:6px; top:-18px; font-size:11px; color:#6b7280; }

.badge.status-completed,.badge.status-paid,.badge.status-delivered{ background:#eafff3; color:#047857; }
.badge.status-pending{ background:#fff7ed; color:#b45309; }
.badge.status-cancelled{ background:#ffe4e6; color:#b91c1c; }

.row-addcat{ display:flex; gap:8px; margin:10px 0; flex-wrap:wrap; }

/* =========================================================
   TOGGLE SWITCH (Dashboard sound switch)
========================================================= */
:root{
  --tg-track-off:#e5e7eb;
  --tg-track-on:#0ea5e9;
  --tg-thumb:#fff;
  --tg-shadow:rgba(2,8,23,.12);
  --tg-text:#1e293b;
  --tg-muted:#64748b;
}
.ui-row{ margin-bottom:8px; display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.toggle{ display:inline-flex; align-items:center; gap:10px; user-select:none; }
.toggle-text{ font-size:14px; color:var(--tg-muted); }
.toggle-input{ position:absolute; appearance:none; inset:auto; width:1px; height:1px; opacity:0; }
.toggle-track{
  width:46px; height:28px; background:var(--tg-track-off); border-radius:999px; position:relative;
  display:inline-block; box-shadow:inset 0 0 0 1px rgba(0,0,0,.04); transition:background-color .2s ease, box-shadow .2s ease; cursor:pointer;
}
.toggle-thumb{
  position:absolute; top:3px; left:3px; width:22px; height:22px; background:var(--tg-thumb); border-radius:50%;
  box-shadow:0 2px 8px var(--tg-shadow); transition:transform .22s ease;
}
.toggle-input:checked + .toggle-track{ background:var(--tg-track-on); }
.toggle-input:checked + .toggle-track .toggle-thumb{ transform:translateX(18px); }
.toggle-track:hover{ box-shadow: inset 0 0 0 1px rgba(0,0,0,.06), 0 2px 10px rgba(2,8,23,.06); }
.toggle-input:focus-visible + .toggle-track{ box-shadow:0 0 0 4px rgba(14,165,233,.25); outline:none; }
@media (prefers-reduced-motion: reduce){ .toggle-track, .toggle-thumb{ transition:none; } }
@media (prefers-color-scheme: dark){
  :root{ --tg-track-off:#374151; --tg-text:#e5e7eb; --tg-muted:#9ca3af; --tg-shadow:rgba(0,0,0,.35); }
  .toggle-text{ color:var(--tg-muted); }
}

/* =========================================================
   TOAST (single, deduplicated)
========================================================= */
#toast-host{
  position:fixed; top:16px; right:16px; display:grid; gap:10px; z-index:9999;
}
.toast{
  background:#0a8a4b; color:#fff; padding:10px 12px; border-radius:10px;
  border:1px solid rgba(255,255,255,.2); box-shadow:0 8px 24px rgba(0,0,0,.08);
  opacity:0; transform:translateY(-8px); transition:opacity .25s ease, transform .25s ease;
  font-weight:600;
}
.toast.error{ background:#dc3545; }
.toast.visible{ opacity:1; transform:translateY(0); }

/* =========================================================
   ADMIN LAYOUT
========================================================= */
.admin-grid{ display:grid; grid-template-columns:220px 1fr; gap:16px; }
.sidebar{ background:#fff; border:1px solid #eee; border-radius:14px; height:100%; }
.sidebar a{ display:block; padding:12px 14px; border-bottom:1px solid #f1f5f9; }
.sidebar a:hover{ background:#f9fafb; }
.box{ background:#fff; border:1px solid #eee; border-radius:14px; padding:16px; }
.login{ max-width:360px; margin:60px auto; background:#fff; border:1px solid #eee; border-radius:14px; padding:20px; }

/* =========================================================
   RESPONSIVE BREAKPOINTS
========================================================= */

/* Large → Tablet */
@media(max-width:1100px){
  .grid{ grid-template-columns:repeat(3,1fr); }
}

/* Tablet */
@media(max-width:900px){
  .grid{ grid-template-columns:repeat(2,1fr); }
  .product-detail{ grid-template-columns:1fr; gap:18px; }
  .summary-card{ top:12px; position:static; }
  .cart-grid{ grid-template-columns:1fr; }
  .form-grid-2{ grid-template-columns:1fr; }
  .slide-nav{ display:block; }
  .homecat-nav{ display:block; }
}

/* Small tablets / big phones */
@media(max-width:700px){
  .homecat-card{ min-width:68%; }
  .tiles-grid{ grid-template-columns:repeat(3,1fr); }
}

/* Phones */
@media(max-width:600px){
  .tiles-grid{ grid-template-columns:repeat(2,1fr); }
  .cart-item{ align-items:flex-start; gap:10px; }
  .cart-title{ max-width:60vw; }
  .cart-actions{ flex-direction:column; }
  .cart-actions .btn{ width:100%; }
}

/* Tiny phones */
@media(max-width:430px){
  .grid{ grid-template-columns:1fr; }          /* ürün listesi tek kolon */
  .cart-img{ width:64px; height:64px; }        /* daha küçük görsel */
  .cart-item-right{ grid-template-columns:auto auto; } /* qty + çöp aynı satır */
  .line-subtotal{ grid-column:1 / -1; margin-top:4px; } /* ara toplam alta inip sağda */
}

.field.error input,
.field.error select,
.field.error textarea,
.paybox.error .payopt-card{
  border-color:#dc2626 !important;
  box-shadow:0 0 0 3px rgba(220,38,38,.12);
}
.error-msg{
  margin-top:6px;
  color:#b91c1c;
  font-size:12px;
  line-height:1.3;
}

.card.out-of-stock {
  opacity: 0.6;
  pointer-events: none;
}

.sold-out-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #ff4d4f;
  color: white;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 4px;
}

/* Kart görseli üstü TÜKENDİ etiketi */
.card .img{ position:relative; }  /* Önemli: rozetin konumlanması için */
.soldout-tag{
  position:absolute;
  left:50%; top:50%;
  transform:translate(-50%,-50%);
  background:#b91c1c;
  color:#fff; font-weight:800; letter-spacing:.5px;
  padding:8px 12px; border-radius:10px; font-size:14px;
  box-shadow:0 8px 20px rgba(0,0,0,.18);
  pointer-events:none;  /* tıklamayı engellemesin */
}

/* İstersen kartı biraz soluk gösterelim */
.card.is-soldout .img img{ filter:grayscale(30%) brightness(.96); }
.card.is-soldout .btn.primary{ opacity:.6; cursor:not-allowed; }


/* Ürün kartlarında TÜKENDİ rozeti (liste sayfaları) */
.card .img{ position:relative; } /* rozet için gerekli */

.soldout-badge{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  background:#b91c1c;
  color:#fff;
  font-weight:800;
  letter-spacing:.4px;
  padding:8px 12px;
  border-radius:10px;
  font-size:14px;
  box-shadow:0 8px 20px rgba(0,0,0,.18);
  pointer-events:none;
}

/* İstersen kartı biraz soluk göster */
.card.out-of-stock .img img{ filter:grayscale(30%) brightness(.96); }

/* ======= Phones: ürün kartlarını 2 sütun ZORUNLU yap ======= */
@media (max-width: 600px){
  /* ürün listesi grid’i – container içindeki grid’lere uygula */
  .container .grid{
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
    gap: 14px; /* mobilde azıcık daralt */
  }

  /* kart içi ufak dokunuşlar ki iki sütuna rahat sığsın */
  .card .content h3{
    font-size: 14px;
    line-height: 1.25;
    margin: 6px 0;
  }
  .btn.full{ padding: 10px 12px; font-size: 14px; }
  .card .img{ aspect-ratio: 1/1; } /* görsel kutusu kare kalsın, taşmasın */
}

/* çok küçük telefonlar için (isteğe bağlı) */
@media (max-width: 380px){
  .container .grid{ gap: 12px; }
}

/* ===== Benzer ürünler - mobilde 2 sütun ===== */
@media (max-width: 600px) {
  .similar-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }

  /* kartları mobil için optimize et */
  .sim-card {
    padding: 8px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  }

  .sim-card img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 6px;
  }

  .sim-name {
    font-size: 14px;
    margin: 6px 0;
    display: block;
    line-height: 1.3;
  }

  .sim-price {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .sim-price__curr {
    font-size: 15px;
    font-weight: 600;
    color: #000;
  }

  .sim-price__old {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
  }

  .sim-actions .btn {
    width: 100%;
    padding: 8px 0;
    font-size: 13px;
    border-radius: 6px;
  }
}

/* WHY section */
.why{ margin:28px auto 8px; text-align:center; }
.why-title{ font-size:32px; margin:6px 0 8px; letter-spacing:-.02em; }
.why-sub{ max-width:860px; margin:0 auto 18px; color:#6b7280; line-height:1.6; }
.why-grid{
  display:grid; gap:18px; grid-template-columns:repeat(4,1fr);
}
.why-card{
  background:#fff; border:1px solid #e5e7eb; border-radius:20px;
  padding:28px 18px 20px; box-shadow:0 8px 28px rgba(2,8,23,.05);
}
.why-icon{
  width:96px; height:96px; border-radius:50%; background:#f5f7fb;
  margin:-58px auto 12px; display:grid; place-items:center; border:1px solid #eef2f7;
}
.why-icon img{ width:72px; height:72px; object-fit:contain; }
.why-card-title{ font-size:20px; margin:10px 0 6px; }
.why-card-body{ color:#6b7280; margin:0; line-height:1.55; }

/* responsive */
@media (max-width:1100px){ .why-grid{ grid-template-columns:repeat(3,1fr);} }
@media (max-width:800px){ .why-grid{ grid-template-columns:repeat(2,1fr);} }
@media (max-width:520px){
  .why-title{ font-size:26px; }
  .why-grid{ grid-template-columns:1fr; }
  .why-icon{ width:84px;height:84px; margin:-50px auto 10px; }
}

/* === Home-info (neden biz?) === */
.home-info{ 
  background: #f8fafc;         /* açık gri zemin (istersen kaldır) */
  padding: 28px 0 36px;        /* üst/alt nefes */
  border-top: 1px solid #eef2f5;
}

.home-info .hi-head{
  text-align:center;
  margin-bottom: 22px;
}
.home-info .hi-title{
  margin:0;
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -.01em;
}
.home-info .hi-sub{
  margin: 8px auto 0;
  max-width: 740px;
  color: var(--muted);
}

/* grid ürün kartlarının genişliğiyle aynı olsun */
.home-info-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 16px;                    /* .grid ile aynı boşluk */
}

.hi-card{
  background:#fff;
  border:1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow-sm, 0 6px 16px rgba(2,8,23,.04));
  text-align:center;
  min-height: 180px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  align-items: start;
}

/* ikon çemberi */
.hi-iconwrap{
  width: 88px; height: 88px;
  margin: -44px auto 8px;      /* kartın içine “yüzen” görünüm */
  border-radius: 999px;
  background:#fff;
  display:grid; place-items:center;
  box-shadow: 0 8px 28px rgba(2,8,23,.08);
  border: 1px solid #eef2f5;
}
.hi-iconwrap img{ 
  max-width: 56px; 
  max-height: 56px; 
  object-fit: contain; 
}

.hi-tt{ font-weight: 800; font-size: 18px; margin: 6px 0; }
.hi-tx{ color: var(--muted); font-size: 14px; }

/* responsive kırılımlar — ürün grid’i ile paralel */
@media (max-width:1100px){ .home-info-grid{ grid-template-columns: repeat(3,1fr);} }
@media (max-width:900px){  .home-info-grid{ grid-template-columns: repeat(2,1fr);} }
@media (max-width:600px){  .home-info-grid{ grid-template-columns: 1fr; } }

.home-info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 1100px) {
  .home-info-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .home-info-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .home-info-grid { grid-template-columns: repeat(2, 1fr); } /* 👈 ESKİ: 1fr idi */
  .home-info { padding: 22px 0 28px; }
}

/* =================== FOOTER =================== */
/* Footer arka planını tam genişlikte yap */



.foot-top{
  display:grid;
  grid-template-columns: 260px repeat(4,1fr);
  gap:28px;
  align-items:flex-start;
}

.foot-brand{ display:flex; flex-direction:column; gap:12px; }
.foot-logo{ width:138px; height:auto; }
.foot-hashtag{ color:#16a34a; font-weight:800; }
.foot-qr{ width:140px; height:auto; border:1px solid #e5e7eb; border-radius:12px; padding:6px; background:#fff; }

.foot-col{}
.foot-title{ font-weight:800; margin:8px 0 10px; }
.foot-list{ list-style:none; margin:0; padding:0; display:grid; gap:8px; }
.foot-list a{ color:#1f2937; text-decoration:none; }
.foot-list a:hover{ text-decoration:underline; }

.foot-mid{
  display:grid;
  grid-template-columns: 1fr auto auto;
  gap:18px;
  align-items:center;
  padding:18px 0;
  border-top:1px solid #eef2f5;
  border-bottom:1px solid #eef2f5;
  margin-top:18px;
}

.foot-call{ display:flex; align-items:center; gap:12px; }
.call-icon{ font-size:28px; }
.call-label{ color:var(--muted); font-size:13px; }
.call-phone{ display:block; font-size:22px; font-weight:800; color:#0b274a; }

.foot-social{ display:flex; gap:14px; font-size:22px; }
.foot-social a{ text-decoration:none; color:#0b274a; opacity:.9; }
.foot-social a:hover{ opacity:1; }

.foot-stores{ display:flex; gap:12px; }
.foot-stores img{ height:44px; width:auto; display:block; }

.foot-bottom{
  color:var(--muted);
  font-size:13px;
  padding-top:14px;
}

/* Responsive */
@media (max-width:1100px){
  .foot-top{ grid-template-columns: 220px repeat(3,1fr); }
}
@media (max-width:900px){
  .foot-top{ grid-template-columns: 1fr 1fr; }
}
@media (max-width:600px){
  .foot-top{ grid-template-columns: 1fr; }
  .foot-mid{ grid-template-columns: 1fr; text-align:center; }
  .foot-call{ justify-content:center; }
  .foot-social{ justify-content:center; }
  .foot-stores{ justify-content:center; }
}

/* ================= Page (statik sayfalar) ================= */
.breadcrumbs.page-section {
  max-width: 880px;
  margin: 16px auto 0;
  padding: 0 16px;
  color: #64748b;
  font-size: 14px;
}
.breadcrumbs .sep { margin: 0 6px; color: #cbd5e1; }

.page-detail.page-section.card {
  max-width: 880px;              /* footer/container ile aynı hiza */
  margin: 14px auto 32px;
  padding: 22px 20px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #eef1f5;
  box-shadow: 0 6px 20px rgba(15,23,42,.04);
}

.page-detail h1 {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -.01em;
  margin: 0 0 12px;
}

/* Tipografi */
.page-body {
  font-size: 15.5px;
  line-height: 1.72;
  color: #1f2937;
}
.page-body > *:first-child { margin-top: 0; }
.page-body > *:last-child  { margin-bottom: 0; }

.page-body h2,
.page-body h3,
.page-body h4 {
  color: #0f172a;
  margin: 22px 0 10px;
  line-height: 1.3;
}
.page-body h2 { font-size: 22px; font-weight: 800; }
.page-body h3 { font-size: 18px; font-weight: 700; }
.page-body h4 { font-size: 16px; font-weight: 700; }

/* Paragraflar, listeler */
.page-body p     { margin: 10px 0 14px; }
.page-body ul,
.page-body ol    { margin: 8px 0 16px 20px; }
.page-body li+li { margin-top: 6px; }

/* Linkler */
.page-body a {
  color: #2563eb;
  text-decoration: none;
  border-bottom: 1px dashed rgba(37, 99, 235, .35);
  transition: color .15s, border-color .15s;
}
.page-body a:hover {
  color: #1d4ed8;
  border-color: rgba(29, 78, 216, .6);
}

/* Görseller */
.page-body img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
  margin: 10px auto;
  box-shadow: 0 8px 24px rgba(2,6,23,.06);
}

/* Tablolar */
.page-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 16px;
  font-size: 14px;
}
.page-body th,
.page-body td {
  border: 1px solid #e5e7eb;
  padding: 10px 12px;
}
.page-body th {
  background: #f8fafc;
  text-align: left;
  color: #0f172a;
  font-weight: 700;
}

/* Alıntılar */
.page-body blockquote {
  margin: 14px 0;
  padding: 12px 14px;
  border-left: 4px solid #93c5fd;
  background: #f1f5f9;
  color: #334155;
  border-radius: 10px;
}

/* Kod blokları */
.page-body pre,
.page-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
.page-body pre {
  background: #0b1220;
  color: #e5e7eb;
  padding: 12px 14px;
  border-radius: 12px;
  overflow: auto;
  margin: 12px 0 16px;
}
.page-body code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 6px;
}

/* Yatay çizgi */
.page-body hr {
  border: none;
  border-top: 1px dashed #e5e7eb;
  margin: 18px 0;
}

/* Mobil düzen */
@media (max-width: 768px) {
  .breadcrumbs.page-section { padding: 0 12px; }
  .page-detail.page-section.card { padding: 18px 16px; border-radius: 14px; }
  .page-detail h1 { font-size: 22px; margin-bottom: 10px; }
  .page-body { font-size: 15px; }
}

/* ==== Page & Footer Hizalama Düzeltmesi ==== */

/* Breadcrumb hizalama */
.breadcrumbs.page-section {
  max-width: 1200px; /* footer'ın container genişliğiyle aynı */
  margin: 16px auto 8px;
  padding: 0 20px;
  color: #64748b;
  font-size: 14px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

/* Page detay kartı */
.page-detail.page-section.card {
  max-width: 1200px !important; /* footer container ile aynı genişlikte */
  margin: 0 auto 32px;
  padding: 28px 32px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #eef1f5;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

/* Page başlığı */
.page-detail h1 {
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

/* Page içeriği */
.page-body {
  font-size: 16px;
  line-height: 1.7;
  color: #1f2937;
}

/* Mobil uyum */
@media (max-width: 768px) {
  .breadcrumbs.page-section,
  .page-detail.page-section.card {
    max-width: 100%;
    padding: 16px;
    border-radius: 12px;
  }
}

/* ===========================
   Admin – Kampanyalar sayfası
   =========================== */

/* Kutu başlığı ve genel boşluklar */
.box h2 {
  font-size: 22px;
  letter-spacing: -.01em;
  margin: 0 0 12px;
}

.box .alert { margin-bottom: 14px; }

/* --- Form yerleşimi --- */
.campaigns-form,
.box > form[action*="campaigns"] { /* fallback */
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(2,8,23,.04);
}

/* satır içi grid: Başlık | Link | Sıra | Görsel | Buton */
.campaigns-form .form-grid,
.box > form[action*="campaigns"] .form-grid { /* fallback */
  display: grid;
  grid-template-columns: 1.3fr 1.2fr 110px 1.1fr auto;
  gap: 10px;
  align-items: end;
}

/* label + input blokları */
.campaigns-form .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.campaigns-form label {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

/* inputlar */
.campaigns-form input[type="text"],
.campaigns-form input[type="number"],
.campaigns-form input[type="url"] {
  height: 40px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  padding: 0 12px;
  outline: 0;
  width: 100%;
}

.campaigns-form input[type="text"]:focus,
.campaigns-form input[type="number"]:focus,
.campaigns-form input[type="url"]:focus {
  border-color: #cbd5e1;
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}

/* Dosya inputunu güzelleştirme */
.campaigns-form .file-wrap {
  position: relative;
}
.campaigns-form .file-wrap input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.campaigns-form .file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 14px;
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  border-radius: 10px;
  font-weight: 600;
}
.campaigns-form .file-button:hover {
  background: #eef2f7;
}

/* Ekle butonu */
.campaigns-form .btn.primary {
  height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  font-weight: 800;
}

/* Mobil/dar ekran uyumu */
@media (max-width: 1100px) {
  .campaigns-form .form-grid {
    grid-template-columns: 1fr 1fr 100px 1fr auto;
  }
}
@media (max-width: 900px) {
  .campaigns-form .form-grid {
    grid-template-columns: 1fr 1fr;
  }
  .campaigns-form .field--full { grid-column: 1 / -1; }
  .campaigns-form .btn.primary { grid-column: 1 / -1; width: 100%; }
}

/* --- Liste Tablosu --- */
.campaigns-table,
.table.campaigns-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 6px 18px rgba(2,8,23,.04);
}

.campaigns-table thead th {
  background: #f8fafc;
  font-weight: 700;
  color: #0f172a;
  border-bottom: 1px solid var(--border, #e5e7eb);
  padding: 10px 12px;
  text-align: left;
  font-size: 14px;
}

.campaigns-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.campaigns-table tbody tr:hover {
  background: #f9fafb;
}

.campaigns-table img.thumb {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #eef2f5;
}

/* Sil butonu (küçük ve belirgin) */
.campaigns-table .btn.danger {
  background: #ef4444;
  color: #fff;
  border: 0;
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 700;
  line-height: 1;
}
.campaigns-table .btn.danger:hover { filter: brightness(.92); }

/* Link hücresinde uzun URL’leri taşırmadan kır */
.campaigns-table .cell-url {
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sticky table head – uzun listelerde güzel durur */
@media (min-height: 700px) {
  .campaigns-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
  }
}

/* Küçük rozet (Sıra) */
.badge-order {
  display: inline-block;
  min-width: 28px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-weight: 700;
  font-size: 12px;
  text-align: center;
}
