/* =====================================================================
   store.css — Mağaza yerleşimi ve ortak mağaza bileşenleri
   (üst bar, başlık, menü, alt bilgi, ürün kartı, kategori kutuları,
    hero, güven rozetleri, sayfa başlığı, breadcrumb, özet kutusu)
   ===================================================================== */

/* ---------- Üst bar ---------- */
.topbar { background: var(--c-primary-700); color: #cbd5e1; font-size: .82rem; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 36px; }
.topbar a { color: #e2e8f0; display: inline-flex; align-items: center; gap: 6px; }
.topbar a:hover { color: #fff; }
.topbar-links { display: flex; gap: 18px; align-items: center; }
.topbar-note { display: inline-flex; align-items: center; gap: 6px; }
.topbar-note strong { color: #fdba74; }
@media (max-width: 760px) { .topbar-links { display: none; } .topbar-inner { justify-content: center; text-align: center; } .topbar-note { font-size: .78rem; } }

/* ---------- Başlık ---------- */
.site-header { background: var(--c-surface); border-bottom: 1px solid var(--c-border); position: sticky; top: 0; z-index: 500; }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.logo { display: flex; align-items: center; flex-shrink: 0; color: var(--c-primary-700); }
.logo img { max-height: 46px; width: auto; }
.logo-text { font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; line-height: 1; }
.logo-text span { color: var(--c-accent); }
.header-search { flex: 1; max-width: 560px; display: flex; position: relative; }
.header-search input { width: 100%; height: 44px; padding: 0 52px 0 16px; border: 1.5px solid var(--c-border-strong); border-radius: 999px; background: var(--c-surface-2); font-size: .95rem; }
.header-search input:focus { outline: none; border-color: var(--c-accent); background: #fff; box-shadow: 0 0 0 3px rgba(234, 88, 12, .12); }
.header-search button { position: absolute; right: 4px; top: 4px; height: 36px; width: 44px; border: 0; border-radius: 999px; background: var(--c-accent); color: #fff; display: flex; align-items: center; justify-content: center; }
.header-search button:hover { background: var(--c-accent-700); }
.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.header-action { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--radius-sm); color: var(--c-primary); font-weight: 600; font-size: .9rem; background: none; border: 0; }
.header-action:hover { background: var(--c-surface-2); color: var(--c-primary-700); }
.header-action small { display: block; font-weight: 500; font-size: .74rem; color: var(--c-muted); line-height: 1.1; }
.header-action-label { line-height: 1.15; }
.cart-count { position: absolute; top: -1px; left: 21px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--c-accent); color: #fff; font-size: .7rem; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }
.cart-count[data-count="0"] { display: none; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; margin-left: -8px; color: var(--c-primary); }
.search-toggle { display: none; }

/* ---------- Ana menü ---------- */
.main-nav { background: var(--c-surface); border-top: 1px solid var(--c-border); }
.nav-list { display: flex; align-items: stretch; flex-wrap: wrap; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-list.nav-js { flex-wrap: nowrap; } /* store.js sığmayanları "Diğer" menüsüne taşır */
.nav-dropdown-right { left: auto; right: 0; }
.nav-dropdown .nav-sub a { padding-left: 24px; font-size: .86rem; color: var(--c-muted); }
.nav-item { position: relative; }
.nav-link { display: flex; align-items: center; gap: 4px; padding: 12px 14px; color: var(--c-primary); font-weight: 600; font-size: .92rem; white-space: nowrap; }
.nav-link:hover, .nav-item.active > .nav-link { color: var(--c-accent-700); }
.nav-item.active > .nav-link { box-shadow: inset 0 -2px 0 var(--c-accent); }
.nav-dropdown { position: absolute; top: 100%; left: 0; min-width: 230px; background: #fff; border: 1px solid var(--c-border); border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow); list-style: none; margin: 0; padding: 8px; display: none; z-index: 20; }
.nav-item:hover > .nav-dropdown, .nav-item:focus-within > .nav-dropdown { display: block; }
.nav-dropdown a { display: block; padding: 8px 12px; border-radius: var(--radius-sm); color: var(--c-text); font-size: .9rem; }
.nav-dropdown a:hover { background: var(--c-accent-50); color: var(--c-accent-700); }
.nav-sub-toggle { display: none; }
.nav-close { display: none; }
.nav-mobile-extra { display: none; }

@media (max-width: 980px) {
  :root { --header-h: 62px; }
  .nav-toggle { display: flex; }
  .header-inner { gap: 10px; }
  .header-search { order: 10; flex-basis: 100%; max-width: none; margin: 0 0 10px; display: none; }
  .header-search.open { display: flex; }
  .header-inner { flex-wrap: wrap; }
  .search-toggle { display: flex; }
  .header-action-label { display: none; }
  .header-actions { gap: 0; }
  .header-action { padding: 8px; }
  .cart-count { left: 17px; top: 0; }
  .logo-text { font-size: 1.08rem; }
  .logo img { max-height: 38px; width: auto; }
  .main-nav { position: fixed; inset: 0 auto 0 0; width: min(86vw, 340px); z-index: 900; border: 0; box-shadow: var(--shadow-lg); transform: translateX(-105%); transition: transform .25s ease; overflow-y: auto; }
  .main-nav { padding-left: env(safe-area-inset-left, 0px); } /* yatay tutulan çentikli telefon (viewport-fit=cover); diğer cihazlarda 0 */
  .main-nav.open { transform: none; }
  .main-nav .container { padding: 0; }
  .nav-close { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--c-border); font-weight: 800; }
  .nav-close button { background: none; border: 0; padding: 4px; color: var(--c-muted); }
  .nav-list { flex-direction: column; padding: 8px 0; }
  .nav-link { padding: 12px 16px; justify-content: space-between; }
  .nav-item.active > .nav-link { box-shadow: inset 3px 0 0 var(--c-accent); }
  .nav-item:hover > .nav-dropdown, .nav-item:focus-within > .nav-dropdown { display: none; }
  .nav-dropdown { position: static; display: none; box-shadow: none; border: 0; border-radius: 0; padding: 0 0 6px 16px; min-width: 0; }
  .nav-item.open > .nav-dropdown { display: block; }
  .nav-sub-toggle { display: flex; background: none; border: 0; padding: 12px 16px; position: absolute; right: 0; top: 0; color: var(--c-muted); }
  .nav-item.has-children > .nav-link { padding-right: 52px; }
  .nav-item.has-children > .nav-link .icon { display: none; }
  .nav-mobile-extra { display: block; border-top: 1px solid var(--c-border); padding: 12px 16px; font-size: .9rem; }
  .nav-mobile-extra a { display: flex; align-items: center; gap: 8px; padding: 8px 0; color: var(--c-primary); font-weight: 600; }
  .nav-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 800; display: none; }
  .nav-backdrop.open { display: block; }
}
@media (max-width: 420px) {
  .logo img { max-height: 32px; }
  .header-inner { gap: 6px; }
}

/* ---------- Ana içerik ---------- */
.site-main { min-height: 50vh; padding-bottom: 48px; }

/* Sayfa başlığı + breadcrumb */
.page-head { padding: 22px 0 6px; }
.page-head h1 { margin: 6px 0 4px; font-size: 1.6rem; }
.page-head p { color: var(--c-muted); margin: 0; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; font-size: .84rem; color: var(--c-muted); }
.breadcrumbs li { display: inline-flex; align-items: center; gap: 4px; }
.breadcrumbs li + li::before { content: "›"; color: var(--c-light); margin-right: 2px; }
.breadcrumbs a { color: var(--c-muted); }
.breadcrumbs a:hover { color: var(--c-accent-700); }
.breadcrumbs [aria-current] { color: var(--c-primary); font-weight: 600; }

/* ---------- Hero / slider ---------- */
.hero { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: linear-gradient(120deg, #0f172a 0%, #1e293b 55%, #334155 100%); color: #fff; min-height: 340px; display: flex; align-items: center; }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15, 23, 42, .88) 0%, rgba(15, 23, 42, .55) 55%, rgba(15, 23, 42, .15) 100%); }
.hero-content { position: relative; padding: 48px; max-width: 620px; }
.hero-content h1, .hero-content h2 { color: #fff; font-size: 2.3rem; line-height: 1.15; margin-bottom: 14px; letter-spacing: -.02em; }
.hero-content p { color: #cbd5e1; font-size: 1.08rem; margin-bottom: 24px; }
.hero-kicker { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: rgba(234, 88, 12, .2); color: #fdba74; font-weight: 700; font-size: .8rem; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .05em; }
.hero-slider { position: relative; }
.hero-slider .hero { display: none; }
.hero-slider .hero.active { display: flex; animation: fade-in .45s ease; }
.hero-dots { position: absolute; bottom: 16px; left: 48px; display: flex; gap: 8px; z-index: 3; }
.hero-dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; padding: 0; background: rgba(255, 255, 255, .45); }
.hero-dots button.active { background: var(--c-accent); width: 26px; border-radius: 6px; }
.hero-dots .hero-pause { width: auto; height: 22px; border-radius: 11px; padding: 0 8px; margin-left: 6px; margin-top: -6px; background: rgba(15, 23, 42, .55); color: #fff; font-size: 10px; line-height: 22px; }
.hero-dots .hero-pause:hover { background: var(--c-accent); }
@keyframes fade-in { from { opacity: .65; } to { opacity: 1; } }
@media (max-width: 640px) {
  .hero { min-height: 280px; }
  .hero-content { padding: 28px 22px 40px; }
  .hero-content h1, .hero-content h2 { font-size: 1.6rem; }
  .hero-dots { left: 22px; }
  /* Slayt noktaları ve durdur düğmesi: görünüm aynı, dokunma alanı 44x44 (şeffaf dolgu; kutu dolgu kadar dışa kaydırılır) */
  .hero-dots { gap: 0; align-items: center; margin: 0 0 -17px -17px; }
  .hero-dots button, .hero-dots button.active { box-sizing: content-box; padding: 17px; border-radius: 22px; background-clip: content-box; }
  .hero-dots .hero-pause { width: 26px; height: 26px; margin: 0; padding: 9px; border-radius: 22px; font-size: 12px; line-height: 26px; }
  .hero-dots .hero-pause, .hero-dots .hero-pause:hover { background-clip: content-box; } /* "background" kısaltması kırpmayı sıfırlar */
}

/* ---------- Güven rozetleri ---------- */
.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.feature { display: flex; gap: 14px; align-items: center; padding: 18px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); }
.feature-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--c-accent-50); color: var(--c-accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.feature strong { display: block; color: var(--c-primary-700); font-size: .95rem; }
.feature span { font-size: .83rem; color: var(--c-muted); }
@media (max-width: 980px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .features { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Kategori kutuları ---------- */
.category-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.category-tile { display: flex; flex-direction: column; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); overflow: hidden; color: var(--c-primary-700); transition: box-shadow var(--t), transform var(--t), border-color var(--t); }
.category-tile:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--c-accent-100); color: var(--c-accent-700); }
.category-tile-img { aspect-ratio: 4 / 3; background: var(--c-surface-2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.category-tile-img img { width: 100%; height: 100%; object-fit: cover; }
.category-tile-img .icon { color: var(--c-light); }
.category-tile-name { padding: 12px 14px; font-weight: 700; font-size: .95rem; display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* Alt kategori çipleri */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--c-border-strong); background: var(--c-surface); color: var(--c-primary); font-size: .87rem; font-weight: 600; }
.chip:hover, .chip.active { border-color: var(--c-accent); color: var(--c-accent-700); background: var(--c-accent-50); }

/* ---------- Ürün kartı ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.product-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 780px) { .product-grid, .product-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.product-card { position: relative; display: flex; flex-direction: column; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); overflow: hidden; transition: box-shadow var(--t), border-color var(--t), transform var(--t); }
.product-card:hover { box-shadow: var(--shadow); border-color: var(--c-border-strong); transform: translateY(-2px); }
.product-card-img { position: relative; display: block; aspect-ratio: 1 / 1; background: #fff; overflow: hidden; border-bottom: 1px solid var(--c-border); }
.product-card-img img { width: 100%; height: 100%; object-fit: contain; padding: 8px; transition: transform .35s ease; }
.product-card:hover .product-card-img img { transform: scale(1.04); }
.product-card-badges { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 6px; z-index: 2; }
.product-card-body { display: flex; flex-direction: column; flex: 1; padding: 12px 14px 14px; gap: 6px; }
.product-card-cat { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--c-light); font-weight: 700; }
.product-card-title { margin: 0; font-size: .95rem; font-weight: 600; line-height: 1.35; color: var(--c-primary-700); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.product-card-title a { color: inherit; }
.product-card-title a:hover { color: var(--c-accent-700); }
.product-card-meta { font-size: .78rem; color: var(--c-muted); }
.product-card-price { margin-top: auto; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; padding-top: 4px; }
.product-card-price .price { font-size: 1.12rem; }
.product-card-price .price-old { font-size: .85rem; }
.product-card-unit { font-size: .76rem; color: var(--c-muted); }
.product-card-actions { margin-top: 10px; }
.product-card .out-of-stock { opacity: .6; }
@media (max-width: 520px) {
  .product-card-body { padding: 10px; }
  .product-card-title { font-size: .87rem; }
  .product-card-price .price { font-size: 1rem; }
}

/* Liste araç çubuğu (sıralama, sonuç sayısı) */
.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 12px 0 18px; padding: 10px 14px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); }
.list-toolbar .form-select { width: auto; min-height: 36px; padding-top: 6px; padding-bottom: 6px; font-size: .88rem; }

/* Kenar çubuklu düzen (kategori/hesap) */
.layout-sidebar { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 980px) { .layout-sidebar { grid-template-columns: minmax(0, 1fr); } }
.sidebar-box { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 16px; }
.sidebar-box + .sidebar-box { margin-top: 16px; }
.sidebar-box h3 { font-size: .95rem; margin-bottom: 10px; }
.sidebar-links { list-style: none; margin: 0; padding: 0; }
.sidebar-links a { display: flex; justify-content: space-between; align-items: center; padding: 7px 8px; border-radius: var(--radius-sm); color: var(--c-text); font-size: .92rem; }
.sidebar-links a:hover, .sidebar-links a.active { background: var(--c-accent-50); color: var(--c-accent-700); }
.sidebar-links ul { list-style: none; padding-left: 12px; margin: 0; }

/* Sipariş/sepet özet kutusu */
:root { --sticky-top: calc(var(--header-h) + 66px); } /* yapışkan başlık + kategori menüsü yüksekliği */
@media (max-width: 980px) { :root { --sticky-top: calc(var(--header-h) + 16px); } }
.summary-box { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 18px; position: sticky; top: var(--sticky-top); }
.summary-box h3 { font-size: 1.05rem; margin-bottom: 14px; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: .93rem; }
.summary-row span:first-child { color: var(--c-muted); }
.summary-row.discount span:last-child { color: var(--c-success); font-weight: 600; }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 12px; margin-top: 8px; border-top: 1px dashed var(--c-border-strong); font-weight: 800; font-size: 1.15rem; color: var(--c-primary-700); }
.summary-note { font-size: .8rem; color: var(--c-muted); margin-top: 8px; }
.free-shipping-bar { margin: 6px 0 14px; font-size: .84rem; color: var(--c-muted); }
.free-shipping-bar .bar { height: 6px; background: var(--c-surface-2); border-radius: 99px; overflow: hidden; margin-top: 6px; border: 1px solid var(--c-border); }
.free-shipping-bar .bar span { display: block; height: 100%; background: var(--c-success); border-radius: 99px; }

/* Kampanya / bilgi bandı */
.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 28px 32px; border-radius: var(--radius-lg); background: linear-gradient(110deg, var(--c-accent) 0%, #f97316 100%); color: #fff; }
.cta-band h2, .cta-band h3 { color: #fff; margin: 0 0 4px; }
.cta-band p { margin: 0; color: #ffedd5; }
.cta-band .btn { background: #fff; color: var(--c-accent-700); }
.cta-band .btn:hover { background: var(--c-primary-700); color: #fff; }

/* ---------- Alt bilgi ---------- */
.site-footer { background: var(--c-primary-700); color: #94a3b8; font-size: .9rem; margin-top: 24px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; padding-top: 44px; padding-bottom: 32px; }
@media (max-width: 980px) { .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .footer-top { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
.footer-brand .logo-text { color: #fff; font-size: 1.3rem; }
.footer-logo { display: inline-block; }
.footer-logo img { display: block; height: 46px; width: auto; }
.footer-brand p { margin: 12px 0 0; line-height: 1.6; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #fff; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact .icon { margin-top: 2px; color: #fdba74; }
.social-links { display: flex; gap: 8px; margin-top: 14px; }
.social-links a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .08); display: flex; align-items: center; justify-content: center; }
.social-links a:hover { background: var(--c-accent); color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding: 18px 0; }
.footer-bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.payment-badges { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.payment-badge { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 5px; background: #fff; color: var(--c-primary-700); font-weight: 800; font-size: .74rem; letter-spacing: .02em; }
.payment-badge.visa { color: #1a1f71; font-style: italic; font-size: .85rem; }
.payment-badge.mc { color: #eb001b; }
.payment-badge.troy { color: #00a6a6; }
.payment-badge.secure { background: transparent; color: #cbd5e1; border: 1px solid rgba(255, 255, 255, .2); gap: 6px; }

/* Sabit öğeler güvenli alanın içinde kalır (viewport-fit=cover; çentiksiz cihazlarda env() 0'dır, görünüm değişmez) */
/* WhatsApp yüzen düğme */
.whatsapp-float { position: fixed; right: calc(18px + env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 600; width: 56px; height: 56px; border-radius: 50%; background: var(--c-whatsapp); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 22px rgba(37, 211, 102, .45); transition: transform var(--t); }
.whatsapp-float:hover { transform: scale(1.07); color: #fff; }
body.has-cookie-bar .whatsapp-float { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }

/* Bildirimler (base.css #toast-root konumu + güvenli alan) */
#toast-root { right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }

/* Çerez bildirimi */
.cookie-bar { position: fixed; left: calc(16px + env(safe-area-inset-left, 0px)); right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 700; max-width: 760px; margin: 0 auto; display: flex; gap: 16px; align-items: center; padding: 14px 18px; background: var(--c-primary-700); color: #e2e8f0; border-radius: var(--radius); box-shadow: var(--shadow-lg); font-size: .87rem; }
.cookie-bar a { color: #fdba74; text-decoration: underline; }
.cookie-bar .btn { flex-shrink: 0; }
@media (max-width: 560px) { .cookie-bar { flex-direction: column; align-items: stretch; text-align: center; } }

/* Hata sayfası */
.error-page { text-align: center; padding: 64px 16px; }
.error-code { font-size: 5rem; font-weight: 900; line-height: 1; color: var(--c-accent); letter-spacing: -.04em; }
.error-page h1 { margin: 12px 0 8px; }
.error-page p { color: var(--c-muted); max-width: 480px; margin: 0 auto 24px; }

/* =====================================================================
   MOBİL ARAYÜZ (<=640px) — sade çerçeve ve ortak mobil sözleşme
   (ayrıntı: docs/ARCHITECTURE.md "Mobil arayüz"). 641px ve üzeri değişmez:
   aşağıdaki yalnızca-mobil öğeler orada display:none'dır.
     --tabbar-h      alt menü (.mobile-tabbar) yüksekliği
     --actionbar-h   sayfa işlem çubuğu (.mobile-actionbar) için üst sınır
     --mobile-bottom o anki alt çubuğun yüksekliği (güvenli alan dahil);
                     çerez çubuğu, bildirimler ve yüzen öğeler bunun üstünde durur
   ===================================================================== */
:root { --tabbar-h: 60px; --actionbar-h: 72px; --mobile-bottom: 0px; }
/* .mobile-actionbar'ı sayfa CSS'i (catalog.css, checkout.css) <=640px'te gösterir ve konumlar; burada yalnızca güvenlik ağı */
.mobile-tabbar, .mobile-actionbar, .footer-m, .product-card-min { display: none; }
/* viewport-fit=cover: yatay tutulan çentikli telefonlarda içerik çentiğin altına girmesin (diğer cihazlarda 0) */
body.store { padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }

@media (max-width: 640px) {
  :root { --header-h: 56px; --mobile-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); }
  /* Sayfada işlem çubuğu varsa alt menü gizlenir, alt boşluk işlem çubuğuna göre ayarlanır.
     (:has() desteklemeyen tarayıcılar için store.js body'ye .has-actionbar ekler; kurallar ayrı yazılmalı) */
  body.store:has(.mobile-actionbar) { --mobile-bottom: calc(var(--actionbar-h) + env(safe-area-inset-bottom, 0px)); }
  body.store.has-actionbar { --mobile-bottom: calc(var(--actionbar-h) + env(safe-area-inset-bottom, 0px)); }
  body.store:has(.mobile-actionbar) .mobile-tabbar { display: none; }
  body.store.has-actionbar .mobile-tabbar { display: none; }
  body.store { padding-bottom: var(--mobile-bottom); }
  .site-main { padding-bottom: 28px; }

  /* ---------- Üst bar ve başlık: tek satır (logo + arama) ---------- */
  .topbar { display: none; }
  .header-inner { flex-wrap: nowrap; gap: 12px; min-height: var(--header-h); padding-top: 6px; padding-bottom: 6px; }
  .nav-toggle, .header-actions { display: none; }
  .logo img { height: 32px; max-height: none; width: auto; max-width: 132px; object-fit: contain; object-position: left center; }
  .logo img.logo-default { height: 30px; max-width: none; object-fit: cover; }
  .header-search, .header-search.open { display: flex; order: 0; flex: 1 1 auto; flex-basis: auto; min-width: 0; max-width: none; margin: 0; }
  .header-search input { height: 44px; padding: 0 12px 0 44px; font-size: 16px; /* iOS odakta yakınlaştırmasın */ border: 1px solid var(--c-border-strong); background: var(--c-surface-2); text-overflow: ellipsis; }
  .header-search input::placeholder { color: var(--c-muted); }
  /* Boşken görünmeyen temizle (×) düğmesi yer kaplamasın; ipucu metni kesilmesin (yazı varken düğme görünür) */
  .header-search input:placeholder-shown::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
  .header-search button { left: 0; right: auto; top: 0; width: 44px; height: 44px; background: transparent; color: var(--c-muted); }
  .header-search button:hover { background: transparent; color: var(--c-accent-700); }
  .cart-count { min-width: 20px; height: 20px; font-size: 12px; }

  /* İşlem çubuğu olan sayfalarda (ürün, ödeme) alt menü gizli olduğundan sepete başlıktan ulaşılır:
     başlıkta yalnızca sepet simgesi görünür. Sepet sayfasının kendisinde gösterilmez (.is-cart-page). */
  body.store:has(.mobile-actionbar) .header-actions:not(.is-cart-page) { display: flex; }
  body.store.has-actionbar .header-actions:not(.is-cart-page) { display: flex; }
  .header-actions { margin: 0 -12px 0 -4px; }
  .header-actions > :not(.header-cart) { display: none; }
  .header-cart { width: 44px; height: 44px; padding: 0; justify-content: center; }
  .header-cart .cart-count { top: 4px; left: 24px; }
  body.store:has(.mobile-actionbar) .header-search input { padding-right: 8px; }
  body.store.has-actionbar .header-search input { padding-right: 8px; }

  /* ---------- Kategori menüsü (soldan açılan tam boy panel) ---------- */
  /* Kapalıyken görünmez (ekran dışındaki bağlantılara klavyeyle odaklanılmasın); kapanma kayması bitince gizlenir */
  .main-nav { width: min(88vw, 380px); padding-bottom: env(safe-area-inset-bottom, 0px); overscroll-behavior: contain; visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s; }
  .main-nav.open { visibility: visible; transition: transform .25s ease, visibility 0s; }
  .nav-close { position: sticky; top: 0; z-index: 2; min-height: 56px; padding: 0 6px 0 16px; background: var(--c-surface); font-size: 1.05rem; color: var(--c-primary-700); }
  .nav-close button { width: 44px; height: 44px; padding: 0; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--c-primary); }
  .nav-close button:hover { background: var(--c-surface-2); }
  .nav-list { padding: 0; gap: 0; }
  .nav-item { border-bottom: 1px solid var(--c-border); }
  .nav-link { min-height: 52px; padding: 8px 16px; font-size: 1rem; line-height: 1.3; white-space: normal; }
  .nav-item.has-children > .nav-link { padding-right: 60px; }
  .nav-sub-toggle { width: 52px; height: 52px; padding: 0; align-items: center; justify-content: center; color: var(--c-muted); }
  .nav-sub-toggle .icon { transition: transform var(--t); }
  .nav-sub-toggle[aria-expanded="true"] .icon { transform: rotate(180deg); color: var(--c-accent-700); }
  .nav-dropdown { padding: 0 0 6px; background: var(--c-surface-2); }
  .nav-dropdown a { display: flex; align-items: center; min-height: 46px; padding: 6px 16px 6px 30px; border-radius: 0; font-size: .95rem; }
  .nav-mobile-extra { border-top: 0; padding: 8px 16px 16px; }
  .nav-mobile-extra a { min-height: 48px; padding: 0; font-size: .95rem; gap: 10px; }

  /* ---------- Alt menü ---------- */
  .mobile-tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 480; /* başlığın (500) altında: açılan menü üstünü örter */
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
    padding: 0 env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
    background: var(--c-surface); border-top: 1px solid var(--c-border); box-shadow: 0 -2px 12px rgba(15, 23, 42, .06);
  }
  .tabbar-item {
    flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    padding: 4px 2px; border: 0; background: none; color: var(--c-muted); font-size: 12px; font-weight: 600; line-height: 1.2;
    -webkit-tap-highlight-color: transparent;
  }
  .tabbar-item:hover { color: var(--c-primary-700); }
  .tabbar-item:focus-visible { outline-offset: -3px; border-radius: var(--radius-sm); }
  .tabbar-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar-icon { position: relative; display: flex; align-items: center; justify-content: center; width: 52px; height: 28px; border-radius: 999px; transition: background var(--t); }
  .tabbar-item.active, .tabbar-item[aria-expanded="true"] { color: var(--c-accent-700); }
  .tabbar-item.active .tabbar-icon, .tabbar-item[aria-expanded="true"] .tabbar-icon { background: var(--c-accent-50); }
  .tabbar-whatsapp .tabbar-icon { color: var(--c-success); }
  .tabbar-item .cart-count { top: -3px; left: 28px; }

  /* ---------- Alt bilgi: kısa ---------- */
  .site-footer { margin-top: 16px; box-shadow: 0 var(--mobile-bottom) 0 var(--c-primary-700); /* alt çubuğun arkası da koyu kalsın */ }
  .footer-top { display: none; }
  .footer-m { display: block; padding-top: 22px; padding-bottom: 4px; }
  .footer-m-brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
  .footer-m-brand .logo-text { display: block; color: #fff; font-size: 1.12rem; }
  .footer-m-brand .footer-logo img { height: 38px; }
  .footer-m-brand span { display: block; margin-top: 5px; font-size: .84rem; line-height: 1.4; }
  .footer-m-brand .social-links { margin: 0; gap: 4px; flex-shrink: 0; }
  .footer-m-brand .social-links a { width: 44px; height: 44px; }
  .footer-m-actions { display: flex; gap: 8px; margin-bottom: 14px; }
  .footer-m-actions .btn { flex: 1 1 0; min-width: 0; min-height: 46px; }
  .footer-m-actions .btn-light { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); color: #fff; }
  .footer-m-contact { list-style: none; margin: 0 0 12px; padding: 0; font-size: .88rem; }
  .footer-m-contact li { display: flex; gap: 10px; align-items: center; min-height: 36px; }
  .footer-m-contact a { display: flex; align-items: center; min-width: 0; min-height: 44px; overflow-wrap: anywhere; }
  .footer-m-contact .icon, .footer-m-address .icon { color: #fdba74; }
  .footer-m-group { border-top: 1px solid rgba(255, 255, 255, .1); }
  .footer-m-group:last-child { border-bottom: 1px solid rgba(255, 255, 255, .1); }
  .footer-m-group summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 50px; list-style: none; cursor: pointer; color: #fff; font-weight: 700; font-size: .95rem; }
  .footer-m-group summary::-webkit-details-marker { display: none; }
  .footer-m-group summary .icon { color: #94a3b8; transition: transform var(--t); }
  .footer-m-group[open] summary .icon { transform: rotate(180deg); }
  .footer-m-group ul { list-style: none; margin: 0; padding: 0 0 8px; }
  .footer-m-group li a { display: block; padding: 11px 0; }
  .footer-m-address { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; font-size: .87rem; line-height: 1.5; }
  .footer-m-address .icon { margin-top: 2px; }
  .footer-bottom { border-top: 0; padding: 14px 0 18px; }
  .footer-bottom-inner { flex-direction: column; gap: 10px; text-align: center; font-size: .8rem; }
  .footer-bottom-inner > span { order: 2; }
  .payment-badges { justify-content: center; gap: 6px; }
  .payment-badge { height: 24px; padding: 0 8px; font-size: 12px; }
  .payment-badge.visa { font-size: .82rem; }
  .payment-badge.secure { flex-basis: 100%; justify-content: center; height: auto; padding: 0 0 2px; border: 0; font-size: .8rem; font-weight: 600; letter-spacing: 0; }

  /* Yüzen WhatsApp düğmesinin yerini alt menü alır */
  .whatsapp-float { display: none; }

  /* ---------- Çerez çubuğu ve bildirimler: alt çubuğun üstünde, kompakt ---------- */
  .cookie-bar { left: 8px; right: 8px; bottom: calc(var(--mobile-bottom) + 8px); gap: 10px; padding: 12px; flex-direction: column; align-items: stretch; text-align: left; font-size: .82rem; line-height: 1.45; border: 1px solid rgba(255, 255, 255, .14); }
  .cookie-bar .btn-group { display: flex; flex-wrap: nowrap; gap: 8px; }
  .cookie-bar .btn { flex: 1 1 0; min-height: 44px; }
  #toast-root { left: 10px; right: 10px; bottom: calc(var(--mobile-bottom) + 10px); width: auto; max-width: none; gap: 8px; }
  /* Çerez çubuğu açıkken bildirimler üstte, başlığın altında çıkar (çerez düğmelerinin üstünü örtmesin) */
  body.has-cookie-bar #toast-root { top: calc(var(--header-h) + 8px); bottom: auto; }
  .toast { padding: 12px 14px; font-size: .9rem; flex-wrap: wrap; }
  /* "Sepete git" bağlantısı: sağa yaslı, 44px dokunma alanı (bildirimin dolgusuna taşar, yüksekliği değiştirmez) */
  .toast a { display: inline-flex; align-items: center; min-height: 44px; margin: -12px 0 -12px auto; }

  /* ---------- Sayfa başlığı: tüm sayfalarda aynı ----------
     Sayfa yolu (breadcrumbs) gizlidir; geri dönüş alt menü, ürün sayfasındaki kategori bağlantısı
     ve işlem çubuklu sayfalarda başlıktaki sepet simgesiyle yapılır. */
  .breadcrumbs { display: none; }
  .page-head { padding: 14px 0 0; }
  .page-head h1 { margin: 0 0 4px; font-size: 1.3rem; overflow-wrap: break-word; }
  .page-head p { font-size: .9rem; }

  /* ---------- Ürün kartı: görsel, 2 satır ad, fiyat, tek düğme ---------- */
  .product-grid, .product-grid.cols-3 { gap: 10px; }
  .product-card:hover { transform: none; box-shadow: none; border-color: var(--c-border); }
  .product-card:hover .product-card-img img { transform: none; }
  .product-card-img img { padding: 6px; }
  .product-card-badges { top: 6px; left: 6px; gap: 4px; }
  .product-card-badges .badge { padding: 2px 7px; gap: 3px; font-size: .75rem; }
  .product-card-badges .badge .icon { width: 11px; height: 11px; }
  .product-card-badges .badge + .badge { display: none; } /* küçük görselde tek rozet: Tükendi / indirim önceliklidir */
  .product-card-badges .badge-tier { display: none; } /* "Toptan fiyat" neredeyse her üründe var; ayırt etmediği için mobilde gösterilmez */
  .product-card-cat, .product-card-meta, .product-card-unit { display: none; }
  .product-card-body { padding: 9px 10px 10px; gap: 4px; }
  .product-card-title { font-size: .88rem; line-height: 1.32; min-height: 2.64em; }
  /* Fiyat her kartta 2 satırlık addan hemen sonra başlar (yan yana kartlarda aynı hizada); yalnızca düğme alta yaslanır */
  .product-card-price { margin-top: 0; padding-top: 2px; gap: 0 6px; }
  .product-card-price .price { font-size: 1.05rem; white-space: normal; }
  .product-card-price .price-old { font-size: .8rem; }
  .product-card-min { display: block; font-size: .78rem; font-weight: 600; color: var(--c-muted); }
  .product-card-actions { margin-top: auto; padding-top: 6px; }
  .product-card-actions .btn { min-height: 44px; padding: 0 8px; font-size: .88rem; }
}
/* Çok dar ekranlar (ör. 320px): logoda yalnızca simge, arama kutusuna yer kalsın; sekme adları sığsın */
@media (max-width: 359px) {
  .header-inner { gap: 10px; }
  .logo img.logo-default { width: 34px; } /* yalnızca soldaki ev simgesi */
  .tabbar-item { padding-left: 0; padding-right: 0; letter-spacing: -.02em; }
  .tabbar-icon { width: 46px; }
}
