/**
 * Web mağaza — dikey mobil / dokunmatik uyumluluk
 * shop-marketplace + webmagaza-shop sonrasında yüklenir.
 */

/* Güvenli alan (çentik / home indicator) */
@supports (padding: env(safe-area-inset-bottom)) {
  .shop-mp-root {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  .shop-mp-header {
    padding-top: env(safe-area-inset-top);
  }

  .shop-mp-footer {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ——— Tablet / telefon ortak (≤900px) ——— */
@media (max-width: 900px) {
  .shop-mp-container {
    padding-inline: 0.75rem;
  }

  .shop-mp-topbar {
    font-size: 0.72rem;
  }

  .shop-mp-topbar__inner {
    gap: 0.5rem;
    padding-block: 0.35rem;
  }

  /* Logo — mobilde header’ı şişirmesin */
  .shop-mp-logo--header img,
  .shop-site-logo {
    height: 3.15rem;
    max-width: min(200px, 46vw);
  }

  .shop-mp-logo--header .shop-mp-logo__fallback {
    width: 3.15rem;
    height: 3.15rem;
    font-size: 1.15rem;
  }

  .shop-mp-header__main--www {
    gap: 0.55rem;
    padding-block: 0.55rem 0.45rem;
  }

  .shop-mp-header__actions {
    gap: 0.35rem;
  }

  .shop-mp-action,
  .shop-mp-login-btn,
  .shop-color-mode-btn {
    min-height: 2.55rem;
    min-width: 2.55rem;
  }

  /* Sekmeler — yatay kaydırma + snap */
  .shop-www-nav {
    gap: 0.35rem;
    margin: 0 -0.15rem;
    padding: 0.1rem 0.15rem 0.35rem;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 0.5rem;
  }

  .shop-www-nav__link {
    flex: 0 0 auto;
    scroll-snap-align: start;
    padding: 0.55rem 0.95rem;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid rgb(226 232 240);
    background: #fff;
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
  }

  .shop-www-nav__link.is-active {
    border-color: color-mix(in srgb, var(--shop-primary, #f27a1a) 45%, #e2e8f0);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--shop-primary, #f27a1a) 18%, transparent);
  }

  .shop-www-nav__link--quote,
  .shop-www-nav__link--quote.is-active {
    color: #fff !important;
    border-color: transparent;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 4px 12px rgb(22 163 74 / 0.4);
  }

  :where([data-theme="dark"]) .shop-www-nav__link {
    background: var(--dm-surface, #161b24);
    border-color: var(--dm-border-strong, rgb(148 163 184 / 0.24));
  }

  /* Kategori şeridi — dokunmatik kartlar */
  .shop-storefront-cats--grid-8 .sht-market__cat,
  .sht-market__cat {
    min-height: 3.1rem;
    padding: 0.65rem 0.7rem;
    border-radius: 12px;
    font-size: 0.72rem;
    line-height: 1.25;
    gap: 0.45rem;
  }

  .sht-market__cat-icon {
    width: 1.85rem;
    height: 1.85rem;
    flex-shrink: 0;
  }

  .sht-market__cat-icon svg {
    width: 15px;
    height: 15px;
  }

  /* Arama hub */
  .shop-hero-hub {
    padding: 0.65rem;
    border-radius: 14px;
  }

  .shop-hero-hub__search-row {
    border-radius: 12px;
    gap: 0.4rem;
  }

  .shop-hero-hub__input-wrap input {
    font-size: 1rem; /* iOS zoom engeli */
    min-height: 2.75rem;
  }

  .shop-hero-hub__btn {
    min-height: 2.75rem;
    padding-inline: 0.95rem;
    font-size: 0.88rem;
  }

  /* Banner / marketplace hero */
  .sht-market__banner-main {
    min-height: 220px;
    border-radius: 14px;
  }

  .sht-market__banner-slide {
    grid-template-columns: 1fr;
    padding: 1rem 1rem 2.5rem;
    gap: 0.75rem;
  }

  .sht-market__section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }

  .sht-market__section-head h2 {
    font-size: 1.15rem;
  }

  /* Ürün ızgarası — telefonda 2 sütun (katalog yoğunluğu) */
  .shop-product-grid,
  .shop-search-results,
  .shop-search-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.65rem !important;
  }

  .shop-product-card__media,
  .shop-product-card--has-image .shop-product-card__media-stage,
  .shop-search-card__media {
    min-height: 8.5rem !important;
  }

  .shop-product-card--has-image .shop-product-card__media-stage {
    padding: 0.45rem !important;
  }

  .shop-product-card__body,
  .shop-search-card__body {
    padding: 0.55rem 0.6rem 0.5rem;
  }

  .shop-product-card__title,
  .shop-search-card__title {
    font-size: 0.74rem;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .shop-product-card__price,
  .shop-search-card__price,
  .shop-product-card__price-col .money-try--strong {
    font-size: 0.92rem;
  }

  .shop-product-card__brand .shop-mfr-logo,
  .shop-product-card__brand .shop-product-brand-logo,
  .shop-search-card__brand-mark-img {
    width: min(var(--shop-brand-logo-w-badge, 9.5rem), 5.5rem);
    height: auto;
    max-height: 2.1rem;
  }

  /* Katalog araç çubuğu */
  .shop-catalog-toolbar {
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .shop-catalog-toolbar__meta {
    font-size: 0.78rem;
    width: 100%;
  }

  /* PDP */
  .shop-mp-pdp__buybox h1 {
    font-size: 1.2rem;
  }

  .shop-mp-tabs__head {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .shop-mp-tabs__head::-webkit-scrollbar {
    display: none;
  }

  .shop-mp-tabs__head button {
    flex: 0 0 auto;
    min-height: 2.65rem;
    white-space: nowrap;
  }

  /* Sepet satırları */
  .shop-cart-line {
    padding: 0.85rem;
  }

  /* Footer */
  .shop-footer-pro__grid {
    gap: 1.25rem;
  }

  .shop-footer-pro__logo {
    max-height: 44px;
  }
}

/* ——— Dar telefon (≤560px) ——— */
@media (max-width: 560px) {
  .shop-mp-container {
    padding-inline: 0.65rem;
  }

  .shop-mp-topbar {
    display: none; /* üst şerit mobilde yer kaplıyor */
  }

  .shop-mp-logo--header img,
  .shop-site-logo {
    height: 2.75rem;
    max-width: min(168px, 42vw);
  }

  .shop-mp-login-btn {
    padding-inline: 0.65rem;
    font-size: 0.78rem;
  }

  .shop-www-nav__link {
    padding: 0.5rem 0.85rem;
    font-size: 0.78rem;
  }

  /* Kategori: 2 sütun zaten; satır yüksekliği */
  .shop-storefront-cats--grid-8 .sht-market__cats-track,
  .shop-storefront-cats--grid-8 .shop-storefront-cats__track {
    gap: 0.45rem;
  }

  .shop-storefront-cats--grid-8 .sht-market__cat,
  .sht-market__cat {
    min-height: 3.35rem;
    padding: 0.55rem 0.55rem;
    font-size: 0.68rem;
  }

  /* Araç filtresi — dikey stack */
  .shop-vf__filters-row {
    grid-template-columns: 1fr !important;
    gap: 0.45rem;
  }

  .shop-vf__layout {
    grid-template-columns: 1fr !important;
    gap: 0.55rem;
  }

  .shop-vf__clear--stacked,
  .shop-vf__apply--stacked {
    width: 100% !important;
    min-height: 2.75rem;
  }

  .shop-vf--inline .shop-vf__layout,
  .shop-vf--search-page .shop-vf__layout {
    grid-template-columns: 1fr !important;
  }

  .shop-hero-hub__layout {
    grid-template-columns: 1fr !important;
  }

  .shop-search-hero {
    margin: 0.75rem 0 1rem;
    padding: 0.95rem 0.75rem 0.9rem;
    border-radius: 14px;
  }

  .shop-search-hero__tools-pane {
    padding: 0.7rem;
  }

  .shop-search-sidebar {
    border-radius: 12px;
  }

  .shop-search-sidebar__section {
    padding: 0.85rem 0.9rem;
  }

  .shop-search-filter-item {
    min-height: 2.4rem;
    font-size: 0.88rem;
  }

  /* Kartlar daha kompakt */
  .shop-product-grid,
  .shop-search-results,
  .shop-search-grid {
    gap: 0.5rem !important;
  }

  .shop-product-card,
  .shop-search-card {
    border-radius: 10px;
  }

  .shop-product-card__media,
  .shop-product-card--has-image .shop-product-card__media-stage,
  .shop-search-card__media {
    min-height: 7.25rem !important;
    aspect-ratio: 1 / 1;
  }

  .shop-product-card__footer,
  .shop-search-card__footer {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
  }

  .shop-product-card__add,
  .shop-search-card .shop-mp-btn {
    width: 100%;
    min-height: 2.35rem;
    font-size: 0.78rem;
  }

  /* Kategoriler sayfası */
  .shop-categories-section__title {
    font-size: 1.05rem;
  }

  .shop-category-card--part .shop-category-card__name {
    font-size: 0.78rem;
    line-height: 1.3;
  }

  /* Statik / hero */
  .shop-static-hero,
  .shop-page-hero {
    padding: 1.15rem 1rem;
    border-radius: 14px;
  }

  .shop-static-hero h1,
  .shop-page-hero__copy h1 {
    font-size: 1.35rem;
  }

  /* WhatsApp FAB safe area */
  .shop-wa-fab,
  [data-shop-whatsapp-fab] {
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    right: calc(0.85rem + env(safe-area-inset-right, 0px));
  }
}

/* ——— Çok dar (≤380px) ——— */
@media (max-width: 380px) {
  .shop-mp-logo--header img,
  .shop-site-logo {
    height: 2.45rem;
    max-width: 38vw;
  }

  .shop-product-card__title,
  .shop-search-card__title {
    font-size: 0.7rem;
  }

  .shop-www-nav__link {
    padding: 0.45rem 0.7rem;
    font-size: 0.74rem;
  }
}

/* Dokunmatik: hover yerine aktif geri bildirim */
@media (hover: none) and (pointer: coarse) {
  .shop-product-card:hover,
  .shop-search-card:hover {
    transform: none;
  }

  .shop-product-card:active,
  .shop-search-card:active,
  .sht-market__cat:active,
  .shop-www-nav__link:active {
    transform: scale(0.98);
  }
}
