/**
 * Şişli Gıda — Mobil uygulama deneyimi (≤992px)
 * iOS/Android native app hissi
 */

@media (max-width: 992px) {
  :root {
    --app-bg: #f2f2f7;
    --app-card: #ffffff;
    --app-radius: 16px;
    --app-radius-sm: 12px;
    --app-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --app-shadow-lg: 0 8px 28px rgba(0, 0, 0, 0.1);
    --app-header-h: 64px;
    --app-tabbar-h: 64px;
    --top-bar-h: 0px;
    --header-h: var(--app-header-h);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-top: env(safe-area-inset-top, 0px);
  }

  html {
    -webkit-tap-highlight-color: transparent;
  }

  body {
    background: var(--app-bg);
    font-size: 16px;
    padding-bottom: calc(var(--app-tabbar-h) + var(--safe-bottom));
    overscroll-behavior-y: none;
  }

  body.nav-is-locked {
    padding-bottom: 0;
  }

  /* Üst bilgi çubuğu — kompakt şerit */
  .top-bar {
    height: 28px;
    font-size: 11px;
    --top-bar-h: 28px;
  }

  .top-bar__left {
    display: none;
  }

  .top-bar__inner {
    justify-content: center;
  }

  .top-bar__right span {
    font-weight: 600;
    letter-spacing: 0.02em;
  }

  /* App header */
  .site-header {
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    backdrop-filter: saturate(180%) blur(16px);
  }

  .site-header__inner {
    min-height: var(--app-header-h);
    gap: 12px;
    padding: 0 4px;
  }

  .logo__img {
    height: 52px;
    max-width: min(220px, 58vw);
    min-width: 120px;
  }

  .logo--footer .logo__img {
    height: 50px;
    max-width: 240px;
    min-width: 140px;
  }

  .header-actions__wa-desktop {
    display: none !important;
  }

  .header-actions__search--btn {
    display: none;
  }

  .header-actions__search--link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--app-bg);
  }

  .nav-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--app-bg);
    justify-content: center;
  }

  .site-main {
    min-height: calc(100dvh - var(--app-header-h) - var(--app-tabbar-h) - 28px);
  }

  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* ─── Alt tab bar (native app) ─── */
  .app-tabbar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1100;
    height: calc(var(--app-tabbar-h) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.06);
  }

  .app-tabbar__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 4px 8px;
    font-size: 10px;
    font-weight: 600;
    color: var(--gray-600);
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s ease, transform 0.1s ease;
  }

  .app-tabbar__item:active {
    transform: scale(0.94);
  }

  .app-tabbar__item.is-active {
    color: var(--red);
  }

  .app-tabbar__item.is-active svg {
    stroke: var(--red);
  }

  .app-tabbar__item--wa {
    color: var(--green);
  }

  .app-tabbar__item--wa svg {
    fill: var(--green);
  }

  .app-tabbar__item--menu.is-active {
    color: var(--gray-900);
  }

  /* ─── Hero — mobil kart ─── */
  .page-home .hero {
    min-height: auto;
    margin: 12px 16px 0;
    border-radius: var(--app-radius);
    overflow: hidden;
    box-shadow: var(--app-shadow-lg);
  }

  .page-home .hero::before {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.75) 100%);
  }

  .page-home .hero .container {
    padding: 32px 20px 28px;
  }

  .hero__title {
    font-size: 26px;
  }

  .hero__subtitle {
    font-size: 15px;
    margin-bottom: 24px;
  }

  .hero__actions {
    flex-direction: column;
    width: 100%;
  }

  .hero__actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
    border-radius: var(--app-radius-sm);
    font-size: 15px;
  }

  /* ─── Bölümler ─── */
  .section {
    padding: 28px 0;
  }

  .section--gray {
    background: transparent;
  }

  .section__header {
    text-align: left;
    margin-bottom: 20px;
    padding: 0 16px;
  }

  .section__title {
    font-size: 22px;
  }

  .section__label {
    font-size: 11px;
    margin-bottom: 8px;
  }

  /* Kategori — yatay kaydırma (app store tarzı) */
  .page-home .section:nth-of-type(2) .container,
  .page-home .section:nth-of-type(3) .container {
    padding-left: 0;
    padding-right: 0;
  }

  .page-home .section:nth-of-type(2) .section__header {
    padding: 0 16px;
  }

  .category-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 12px;
    padding: 4px 16px 16px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .category-grid::-webkit-scrollbar {
    display: none;
  }

  .category-card {
    flex: 0 0 148px;
    scroll-snap-align: start;
    border: none;
    box-shadow: var(--app-shadow);
    border-radius: var(--app-radius);
  }

  .category-card:active {
    transform: scale(0.98);
  }

  .category-card__body {
    padding: 28px 12px 14px;
  }

  .category-card__name {
    font-size: 13px;
  }

  /* Ürün kartları — 2 sütun, büyük görsel */
  .product-grid,
  .page-home .section--gray .product-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px;
    padding: 0 16px;
  }

  .product-grid--catalog {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .product-card {
    border: none;
    border-radius: var(--app-radius);
    padding: 0;
    box-shadow: var(--app-shadow);
    background: var(--app-card);
    overflow: hidden;
  }

  .product-card:active {
    transform: scale(0.98);
  }

  .product-card__media {
    min-height: 160px;
    aspect-ratio: 1;
    padding: 14px;
    border-bottom: 1px solid var(--gray-200);
  }

  .product-card__media img {
    min-height: 130px;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .product-card__body {
    padding: 12px 14px 16px;
  }

  .product-card__title {
    font-size: 13px;
    line-height: 1.35;
    margin-bottom: 6px;
  }

  .product-card__desc {
    font-size: 11px;
    -webkit-line-clamp: 2;
    margin-bottom: 10px;
  }

  .product-card__link {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 6px 12px;
    background: rgba(163, 29, 29, 0.08);
    border-radius: 8px;
    font-size: 12px;
  }

  .product-detail__image {
    margin: 16px;
    min-height: 280px;
    padding: 20px;
  }

  .product-detail__image img {
    min-height: 220px;
    max-height: 360px;
  }

  .section__footer-cta {
    padding: 0 16px;
    margin-top: 24px;
  }

  .section__footer-cta .btn {
    width: 100%;
    min-height: 48px;
    border-radius: var(--app-radius-sm);
  }

  /* Avantajlar — tam genişlik kartlar */
  .advantages-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0 16px;
  }

  .advantage-card {
    border: none;
    border-radius: var(--app-radius);
    box-shadow: var(--app-shadow);
    padding: 18px;
  }

  /* Dağıtım */
  .distribution-wrap {
    padding: 0 16px 16px;
  }

  .distribution {
    border-radius: var(--app-radius);
    overflow: hidden;
    box-shadow: var(--app-shadow);
    background: var(--app-card);
  }

  .distribution__content {
    padding: 24px 20px !important;
  }

  .distribution__title {
    font-size: 22px;
  }

  .distribution__image {
    min-height: 220px;
  }

  .distribution__image img {
    min-height: 220px;
  }

  .distribution__features {
    flex-direction: column;
    gap: 16px;
  }

  /* CTA — mobil kart */
  .cta-bar {
    margin: 16px;
    border-radius: var(--app-radius);
    padding: 24px 20px;
    box-shadow: var(--app-shadow-lg);
  }

  .cta-bar__inner {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .cta-bar__actions {
    width: 100%;
    flex-direction: column;
  }

  .cta-bar__actions .btn {
    width: 100%;
    min-height: 48px;
    border-radius: var(--app-radius-sm);
  }

  /* Footer — kompakt */
  .site-footer {
    margin-bottom: 8px;
    border-radius: var(--app-radius) var(--app-radius) 0 0;
  }

  .site-footer__grid {
    grid-template-columns: 1fr !important;
    gap: 28px;
    padding-bottom: 32px;
  }

  .site-footer__col h4 {
    font-size: 13px;
    margin-bottom: 12px;
  }

  .site-footer__about {
    max-width: none;
  }

  .site-footer__bottom-inner {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }

  /* ─── Breadcrumb → App toolbar ─── */
  .breadcrumb {
    background: var(--app-card);
    border-bottom: none;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
    padding: 0;
    position: sticky;
    top: calc(28px + var(--app-header-h));
    z-index: 90;
  }

  .breadcrumb .container {
    padding: 0;
  }

  .breadcrumb__app-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    min-height: 48px;
  }

  .breadcrumb__back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--app-bg);
    color: var(--gray-900);
  }

  .breadcrumb__back:active {
    background: var(--gray-200);
  }

  .breadcrumb__title {
    flex: 1;
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }

  .breadcrumb ul.breadcrumb__trail {
    display: none;
  }

  /* Breadcrumb varken tekrarlayan başlığı gizle */
  .breadcrumb + .page-header,
  .page-header--desktop-only {
    display: none;
  }

  /* Page header — app stili */
  .page-header {
    background: var(--app-card);
    padding: 20px 16px 16px;
    border-bottom: none;
    box-shadow: none;
  }

  .page-header h1 {
    font-size: 24px;
    line-height: 1.25;
  }

  .page-header p {
    font-size: 14px;
    margin-top: 6px;
  }

  /* Katalog */
  .catalog-layout {
    padding: 16px 0 24px !important;
    gap: 16px;
  }

  .catalog-sidebar {
    position: static;
    background: transparent;
    border: none;
    padding: 0 16px;
    border-radius: 0;
  }

  .catalog-sidebar h3 {
    display: none;
  }

  .catalog-sidebar > ul {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .catalog-sidebar > ul::-webkit-scrollbar {
    display: none;
  }

  .catalog-sidebar li {
    margin: 0;
    flex-shrink: 0;
  }

  .catalog-sidebar a {
    display: inline-block;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    border-radius: 100px;
    background: var(--app-card);
    box-shadow: var(--app-shadow);
    border: 1px solid transparent;
  }

  .catalog-sidebar a.is-active {
    background: var(--red);
    color: var(--white) !important;
    box-shadow: 0 4px 12px rgba(163, 29, 29, 0.35);
  }

  .catalog-sidebar .sub a,
  .catalog-sidebar .mini a {
    padding: 10px 14px;
    font-size: 12px;
  }

  .catalog-toolbar {
    padding: 0 16px;
    margin-bottom: 12px;
  }

  .catalog-toolbar__count {
    font-size: 13px;
    font-weight: 600;
    background: var(--app-card);
    padding: 8px 14px;
    border-radius: 100px;
    box-shadow: var(--app-shadow);
  }

  .catalog-main .product-grid {
    padding: 0 16px;
  }

  .catalog-page-wrap {
    padding: 16px 0 32px !important;
  }

  /* Ürün detay */
  .product-detail {
    padding: 0 0 100px !important;
    gap: 0 !important;
    display: block !important;
  }

  .product-detail__image {
    margin: 16px;
    border-radius: var(--app-radius);
    border: none;
    box-shadow: var(--app-shadow);
    padding: 24px;
  }

  .product-detail__info {
    padding: 0 16px 24px;
  }

  .product-detail__title {
    font-size: 22px;
  }

  .product-detail__price {
    font-size: 20px;
    padding: 12px 16px;
    background: var(--app-card);
    border-radius: var(--app-radius-sm);
    display: inline-block;
    margin-bottom: 16px;
    box-shadow: var(--app-shadow);
  }

  .product-detail__actions {
    display: none;
  }

  /* Sticky alt aksiyon çubuğu */
  .product-sticky-bar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(var(--app-tabbar-h) + var(--safe-bottom));
    z-index: 1050;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.96);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  }

  .product-sticky-bar .btn {
    flex: 1;
    min-height: 48px;
    border-radius: var(--app-radius-sm);
    font-size: 14px;
  }

  body.page-urun {
    padding-bottom: calc(var(--app-tabbar-h) + var(--safe-bottom) + 72px);
  }

  /* İçerik sayfaları */
  .content-page {
    padding: 16px 0 32px;
  }

  .content-page .container {
    background: var(--app-card);
    margin: 0 16px;
    padding: 24px 20px;
    border-radius: var(--app-radius);
    box-shadow: var(--app-shadow);
  }

  .content-page .prose {
    max-width: none;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 0;
    padding: 0;
  }

  .contact-card {
    border: none;
    box-shadow: var(--app-shadow);
    border-radius: var(--app-radius);
    padding: 22px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .contact-card svg {
    margin: 0;
    flex-shrink: 0;
  }

  .contact-form {
    max-width: none;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
  }

  .contact-form input,
  .contact-form textarea {
    font-size: 16px;
    min-height: 48px;
    border-radius: var(--app-radius-sm);
    border: 1px solid var(--gray-200);
    background: var(--app-bg);
  }

  .contact-form textarea {
    min-height: 120px;
  }

  .contact-form .btn {
    width: 100%;
    min-height: 52px;
    border-radius: var(--app-radius-sm);
    font-size: 16px;
  }

  /* Pagination */
  .pagination {
    padding: 0 16px 16px;
    flex-wrap: wrap;
  }

  .pagination a,
  .pagination span {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--app-radius-sm);
    border: none;
    background: var(--app-card);
    box-shadow: var(--app-shadow);
  }

  .pagination .is-current {
    background: var(--red);
    color: var(--white);
  }

  /* Empty state */
  .empty-state {
    padding: 48px 24px;
    margin: 16px;
    background: var(--app-card);
    border-radius: var(--app-radius);
    box-shadow: var(--app-shadow);
  }

  /* Butonlar genel */
  .btn {
    -webkit-tap-highlight-color: transparent;
  }

  .btn:active {
    transform: scale(0.98);
  }

  /* Arama overlay mobil */
  .search-overlay.is-open {
    position: fixed;
    inset: 0;
    top: calc(28px + var(--app-header-h));
    z-index: 1200;
    background: var(--app-bg);
    padding: 16px;
    display: flex !important;
    align-items: flex-start;
  }

  .search-form {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  .search-form input {
    min-height: 52px;
    font-size: 16px;
    border-radius: var(--app-radius-sm);
  }

  .search-form .btn {
    width: 100%;
    min-height: 48px;
  }

  /* Ana sayfa hızlı erişim şeridi */
  .app-quick-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 12px 16px 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .app-quick-strip::-webkit-scrollbar {
    display: none;
  }

  .app-quick-chip {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--app-card);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-800);
    box-shadow: var(--app-shadow);
  }

  .app-quick-chip svg {
    width: 16px;
    height: 16px;
    color: var(--red);
  }

  .app-quick-chip:active {
    transform: scale(0.96);
  }
}

/* Masaüstünde gizle */
@media (min-width: 993px) {
  .app-tabbar,
  .product-sticky-bar,
  .app-quick-strip,
  .breadcrumb__app-bar {
    display: none !important;
  }

  .page-header--desktop-only {
    display: block;
  }

  .header-actions__search--link {
    display: none;
  }

  .header-actions__search--btn {
    display: flex;
  }
}

@media (max-width: 992px) {
  .breadcrumb__trail-desktop {
    display: none;
  }
}

@media (min-width: 993px) {
  .breadcrumb__trail-desktop {
    display: flex;
  }
}
