/* MezatPay — mağaza stilleri */

/* ── Yardımcılar ─────────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.shop-wrap a:focus-visible,
.shop-wrap button:focus-visible,
.shop-wrap input:focus-visible,
.shop-wrap select:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* ── Sayfa düzeni: kenar çubuğu + ürün alanı ─────────────── */
.shop-wrap {
  max-width: 1200px; margin: 0 auto; padding: 28px 20px 72px;
  display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 32px; align-items: start;
}
.shop-main { min-width: 0; }

/* Kenar çubuğu */
.shop-sidebar {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px;
  position: sticky; top: 84px; max-height: calc(100vh - 108px); overflow-y: auto;
}
.shop-sidebar-title {
  font-weight: 800; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); padding: 6px 10px 10px;
}
.shop-cats { display: flex; flex-direction: column; gap: 2px; }
.shop-cat {
  display: block; padding: 10px 12px; border-radius: 10px;
  color: var(--ink-soft); font-size: 14.5px; font-weight: 600;
  border-left: 3px solid transparent; transition: background .15s, color .15s;
}
.shop-cat:hover { background: var(--bg-soft); color: var(--accent); text-decoration: none; }
.shop-cat.active {
  background: rgba(225, 29, 72, .08); color: var(--accent);
  border-left-color: var(--accent); font-weight: 700;
}

/* Yol bilgisi + başlık */
.shop-breadcrumb { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.shop-breadcrumb a { color: var(--muted); }
.shop-breadcrumb a:hover { color: var(--accent); }
.shop-breadcrumb .sep { margin: 0 8px; opacity: .6; }
.shop-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.shop-head h2 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
.shop-count {
  color: var(--muted); font-size: 13px; font-weight: 600;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px;
}

/* Arama + sıralama çubuğu */
.shop-toolbar {
  display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px; margin-bottom: 20px;
}
.shop-search { flex: 1 1 220px; position: relative; display: block; }
.shop-search svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none;
}
.shop-search input,
.shop-sort select {
  width: 100%; height: 42px; font: inherit; font-size: 14.5px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg-soft);
  transition: border-color .15s, background .15s;
}
.shop-search input { padding: 0 14px 0 38px; }
.shop-sort { flex: 0 1 230px; display: block; }
.shop-sort select { padding: 0 12px; cursor: pointer; }
.shop-search input:hover, .shop-sort select:hover { border-color: #cbd5e1; }
.shop-search input:focus, .shop-sort select:focus { background: #fff; border-color: var(--accent); outline: none; }
.shop-apply { height: 42px; padding: 0 22px; font-size: 14.5px; }

.shop-filters { display: flex; gap: 8px; flex-wrap: wrap; margin: -6px 0 18px; }
.filter-tag {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
  background: rgba(225, 29, 72, .08); color: var(--accent); border-radius: 999px; padding: 5px 12px;
}
.filter-tag:hover { background: rgba(225, 29, 72, .14); text-decoration: none; }

/* ── Ürün ızgarası ve kartlar ────────────────────────────── */
.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px;
}
.product-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: 16px; overflow: hidden; color: inherit;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.product-card:hover {
  text-decoration: none; box-shadow: var(--shadow); transform: translateY(-3px); border-color: #cbd5e1;
}
.product-img { aspect-ratio: 4 / 3; background: var(--bg-soft); overflow: hidden; position: relative; }
.product-img img {
  width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease;
}
.product-card:hover .product-img img { transform: scale(1.05); }
.product-img-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #94a3b8; }
.product-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.product-body h3 {
  margin: 0; font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.7em;
}
.product-meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; gap: 8px; }
.product-price { color: var(--accent); font-weight: 800; font-size: 18px; }
.product-more {
  font-size: 13px; font-weight: 700; color: var(--muted); transition: color .15s, transform .15s;
}
.product-card:hover .product-more { color: var(--accent); transform: translateX(2px); }

/* Boş durum */
.shop-empty {
  text-align: center; padding: 56px 20px; background: #fff; border: 1px dashed #cbd5e1;
  border-radius: 16px; color: var(--muted);
}
.shop-empty svg { color: #94a3b8; margin-bottom: 8px; }
.shop-empty h3 { margin: 6px 0 4px; font-size: 18px; color: var(--ink); }
.shop-empty p { margin: 0 0 18px; font-size: 14.5px; }

/* Sayfalama */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; margin-top: 36px; }
.pg {
  min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink-soft);
  font-size: 14px; font-weight: 600; transition: border-color .15s, color .15s;
}
.pg:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); }
.pg.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.pg-gap { color: var(--muted); padding: 0 4px; }

/* ── Eski kategori çipleri / açılır grup (diğer sayfalar kullanıyor olabilir) ── */
.cat-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.cat-chip {
  display: inline-block; padding: 8px 14px; border: 1px solid var(--line);
  border-radius: 999px; color: var(--ink-soft); font-size: 14px; font-weight: 600;
}
.cat-chip:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); }
.cat-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.cat-all { display: block; padding: 9px 12px; border-radius: 9px; font-weight: 600; color: var(--ink-soft); margin-bottom: 4px; }
.cat-all:hover, .cat-all.active { background: var(--bg-soft); color: var(--accent); text-decoration: none; }
.cat-group { border-top: 1px solid var(--line); }
.cat-group summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; font-weight: 600; color: var(--ink); font-size: 14px;
}
.cat-group summary::-webkit-details-marker { display: none; }
.cat-group summary:hover { color: var(--accent); }
.cat-arrow { font-size: 11px; color: var(--muted); transition: transform .15s; }
.cat-group[open] .cat-arrow { transform: rotate(180deg); }
.subcat-list { list-style: none; margin: 0; padding: 0 0 8px; }
.subcat-list li a { display: block; padding: 7px 12px 7px 24px; border-radius: 8px; color: var(--muted); font-size: 13.5px; }
.subcat-list li a:hover { color: var(--accent); background: var(--bg-soft); text-decoration: none; }
.subcat-list li a.active { color: var(--accent); font-weight: 700; background: var(--bg-soft); }

/* ── Ürün detay sayfası ──────────────────────────────────── */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.product-detail-img { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--bg-soft); }
.product-detail-img img { width: 100%; display: block; }

/* ── Mağaza rozetleri (Google Play / App Store) ──────────── */
.store-badges { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 16px; flex-wrap: nowrap; }
.store-badges a { display: inline-flex; align-items: center; }
.store-badges img { height: 38px; width: auto; display: block; }
.soon-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 24px);
  background: #0f172a; color: #fff; padding: 12px 20px; border-radius: 999px;
  font-size: 14px; font-weight: 600; box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  opacity: 0; visibility: hidden; transition: .3s ease; z-index: 1300;
}
.soon-toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ── Sepet FAB + çekmece ─────────────────────────────────── */
.cart-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 1000;
  width: 58px; height: 58px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .22); transition: background .2s, transform .15s;
}
.cart-fab:hover { background: var(--accent-dark); transform: scale(1.05); }
.cart-fab-count {
  position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 5px;
  background: #ef4444; color: #fff; border-radius: 999px; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.cart-overlay {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45); opacity: 0; visibility: hidden;
  transition: .25s; z-index: 1100;
}
.cart-overlay.show { opacity: 1; visibility: visible; }
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 360px; max-width: 92vw; background: #fff;
  z-index: 1200; transform: translateX(100%); transition: transform .25s ease;
  display: flex; flex-direction: column; box-shadow: -8px 0 30px rgba(0, 0, 0, .15);
}
.cart-drawer.open { transform: translateX(0); }
.cart-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.cart-drawer-head h3 { margin: 0; }
.cart-close { border: none; background: none; font-size: 26px; cursor: pointer; color: var(--muted); line-height: 1; }
.cart-drawer-body { flex: 1; overflow-y: auto; padding: 16px 18px; }
.cart-empty { color: var(--muted); text-align: center; margin: 30px 0; }
.cart-line { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cart-line img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; }
.cart-line-info { flex: 1; min-width: 0; }
.cart-line-info b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.cart-line-info span { color: var(--muted); font-size: 13px; }
.cart-line-sub { font-weight: 700; color: var(--ink); }
.cart-drawer-foot { padding: 14px 18px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.cart-total { display: flex; justify-content: space-between; font-size: 16px; }

/* ── Mobil ───────────────────────────────────────────────── */
@media (max-width: 860px) {
  .shop-wrap { grid-template-columns: 1fr; gap: 18px; padding-top: 18px; }
  .product-detail { grid-template-columns: 1fr; }

  /* Kenar çubuğu → yatay kaydırılan kategori çipleri */
  .shop-sidebar {
    position: static; max-height: none; overflow: visible; padding: 0; border: none; background: transparent;
  }
  .shop-sidebar-title { display: none; }
  .shop-cats {
    flex-direction: row; gap: 8px; overflow-x: auto; padding-bottom: 6px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .shop-cats::-webkit-scrollbar { display: none; }
  .shop-cat {
    flex: 0 0 auto; white-space: nowrap; border: 1px solid var(--line); border-radius: 999px;
    padding: 8px 16px; background: #fff; font-size: 14px;
  }
  .shop-cat.active { background: var(--accent); color: #fff; border-color: var(--accent); }
}
@media (max-width: 520px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .product-body { padding: 10px 12px 12px; }
  .product-body h3 { font-size: 14px; }
  .product-price { font-size: 16px; }
  .product-more { display: none; }
  .shop-head h2 { font-size: 22px; }
  .shop-sort, .shop-apply { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .product-card, .product-img img, .cart-drawer, .cart-overlay { transition: none; }
  .product-card:hover { transform: none; }
}

/* ── Ödeme: kart formu ─────────────────────────────────────── */
.card-form {
  border: 1px solid var(--line); border-radius: 10px; padding: 14px;
  display: grid; gap: 12px; margin: 2px 0 4px; background: var(--bg-soft);
}
.card-form label { font-weight: 600; font-size: 13px; }
.card-form input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; font-size: 15px;
}
.card-form input:focus { outline: 2px solid var(--accent); border-color: transparent; }
.card-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
