/**
 * Ürünler sayfası — mobil akıcı liste (uygulama kartları)
 */

@media (max-width: 900px) {
  body[data-page="products"] .page-header--products {
    padding: 0.95rem 0 0.55rem;
  }

  body[data-page="products"] .page-header--products h1 {
    font-size: 1.45rem;
    margin-bottom: 0.2rem;
    letter-spacing: -0.03em;
    font-weight: 800;
  }

  body[data-page="products"] .page-header--products > .container > p:not(.page-header__ai-hint) {
    font-size: 0.86rem;
    margin: 0;
    color: var(--color-text-muted, #64748b);
  }

  body[data-page="products"] .page-header__ai-hint {
    display: none;
  }

  body[data-page="products"] .products-page {
    padding-bottom: calc(var(--mobile-nav-h, 72px) + 1.25rem);
  }

  body[data-page="products"] .products-page__toolbar {
    position: static;
    z-index: auto;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0;
    margin-bottom: 0.75rem;
  }

  body[data-page="products"] .products-page__top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  body[data-page="products"] .products-page__top .filters__search {
    flex: 1;
    min-width: 0;
    margin: 0;
  }

  body[data-page="products"] .products-page__top .filters__search input {
    min-height: 46px;
    border-radius: 14px;
    font-size: 1rem;
    padding-left: 2.35rem;
    border-color: var(--color-border, #e2e8f0);
    box-shadow: none;
    background: var(--color-surface, #fff);
  }

  body[data-page="products"] .products-filter-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex-shrink: 0;
    min-height: 46px;
    padding: 0 0.9rem;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 14px;
    background: var(--color-surface, #fff);
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--color-text, #0f172a);
    cursor: pointer;
    position: relative;
    -webkit-tap-highlight-color: transparent;
  }

  body[data-page="products"] .products-filter-toggle__icon::before {
    content: "⚙";
    font-size: 0.95rem;
    line-height: 1;
  }

  body[data-page="products"] .products-filter-toggle__dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-primary, #16a34a);
    border: 2px solid var(--color-surface, #fff);
  }

  body[data-page="products"] .products-page__filters {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.55rem;
    padding: 0.8rem;
    background: var(--color-surface, #fff);
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  }

  body[data-page="products"] .products-page__filters.is-open {
    display: flex;
  }

  body[data-page="products"] .products-page__filters select {
    width: 100%;
    min-height: 44px;
    border-radius: 12px;
    font-size: 0.95rem;
  }

  body[data-page="products"] .products-filters-panel__near {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.35rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--color-border, #e2e8f0);
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding-inline: 0;
    padding-bottom: 0;
  }

  body[data-page="products"] .products-filters-panel__near-label {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-text-muted, #64748b);
  }

  body[data-page="products"] .products-map-toolbar__near {
    width: 100%;
    margin: 0;
    min-height: 42px;
    font-size: 0.86rem;
    font-weight: 600;
  }

  body[data-page="products"] .radius-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  body[data-page="products"] .products-quick-filters,
  body[data-page="products"] .un-filters.products-quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0.35rem 0 0;
    width: 100%;
  }

  body[data-page="products"] .products-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    min-height: 36px;
    height: 36px;
    padding: 0 0.7rem;
    border: 1.5px solid var(--color-border, #e2e8f0);
    border-radius: 999px;
    background: var(--color-surface, #fff);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1;
    box-sizing: border-box;
    white-space: nowrap;
  }

  body[data-page="products"] .products-chip input {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: var(--color-primary, #16a34a);
  }

  body[data-page="products"] #near-me-btn {
    min-height: 36px;
    height: 36px;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 600;
    padding: 0 0.85rem;
  }

  body[data-page="products"] #near-me-btn.is-active {
    background: rgba(22, 163, 74, 0.12);
    border-color: rgba(22, 163, 74, 0.45);
    color: #15803d;
  }

  body[data-page="products"] .radius-chip {
    min-height: 34px;
    padding-inline: 0.65rem;
    font-size: 0.78rem;
    font-weight: 600;
  }

  body[data-page="products"] .products-page__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.15rem;
  }

  body[data-page="products"] .products-page__meta .results-count {
    margin: 0;
    flex: 1;
    min-width: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-muted, #64748b);
  }

  body[data-page="products"] .products-page__meta .view-toggle {
    flex-shrink: 0;
    width: auto;
    border-radius: 12px;
  }

  body[data-page="products"] .products-page__meta .view-toggle__btn {
    min-height: 36px;
    padding-inline: 0.8rem;
    font-size: 0.8rem;
    font-weight: 600;
  }

  /* Akıcı 2 sütun — büyük kare görsel */
  body[data-page="products"] .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.85rem !important;
  }

  body[data-page="products"] .product-card {
    border-radius: 20px !important;
    overflow: hidden !important;
    background: var(--color-surface, #fff) !important;
    border: 1px solid rgba(15, 23, 42, 0.06) !important;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.07) !important;
  }

  body[data-page="products"] .product-card__image {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    aspect-ratio: 1 / 1 !important;
  }

  body[data-page="products"] .product-card__image .product-card__img,
  body[data-page="products"] .product-card__image img {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center !important;
    transform: none !important;
  }

  body[data-page="products"] .product-card__body {
    padding: 0.7rem 0.75rem 0.85rem !important;
  }

  body[data-page="products"] .product-card h3 {
    font-size: 0.92rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin: 0 0 0.35rem !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  body[data-page="products"] .product-card__location {
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    color: var(--color-primary, #16a34a) !important;
    margin-bottom: 0.45rem !important;
  }

  body[data-page="products"] .product-card__overlays {
    top: 0.55rem;
    left: 0.55rem;
    right: 0.55rem;
  }

  body[data-page="products"] .product-card__badge {
    font-size: 0.62rem;
    padding: 0.18rem 0.45rem;
  }

  body[data-page="products"] .product-card__footer {
    padding-top: 0;
  }

  body[data-page="products"] .product-card__price-chip--daily .product-card__price-chip-value {
    font-size: 0.98rem !important;
    font-weight: 800 !important;
    color: var(--color-primary-dark, #15803d) !important;
  }

  body[data-page="products"] .products-grid .ux-empty,
  body[data-page="products"] .products-grid .empty-state {
    grid-column: 1 / -1;
    margin: 0.25rem 0 0.5rem;
    padding: 2rem 1rem;
    border: 1px dashed color-mix(in srgb, var(--color-border, #e2e8f0) 85%, transparent);
    border-radius: 18px;
    background: color-mix(in srgb, var(--color-surface, #fff) 92%, var(--color-bg, #f8fafc));
  }

  body[data-page="products"] .products-grid .ux-empty__title,
  body[data-page="products"] .products-grid .empty-state h3 {
    font-size: 1rem;
    font-weight: 700;
  }

  body[data-page="products"] .products-grid .ux-empty__desc,
  body[data-page="products"] .products-grid .empty-state p {
    font-size: 0.86rem;
    color: var(--color-text-muted, #64748b);
  }

  [data-theme="dark"] body[data-page="products"],
  body[data-page="products"][data-theme="dark"] {
    background: #000;
  }

  [data-theme="dark"] body[data-page="products"] .product-card {
    background: #1c1c1e !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
  }
}

/* Masaüstü — sadece PC */
@media (min-width: 901px) {
  body[data-page="products"] .products-filter-toggle {
    display: none !important;
  }

  body[data-page="products"] .products-page__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.7rem 0.85rem;
    margin-bottom: 1.35rem;
  }

  body[data-page="products"] .products-page__top,
  body[data-page="products"] .products-filters-panel,
  body[data-page="products"] .products-filters-panel .filters,
  body[data-page="products"] .products-map-toolbar {
    display: contents;
  }

  body[data-page="products"] .products-filters-panel[hidden] {
    display: contents !important;
  }

  /* display:contents ile gizli label'lar boş kutu gibi görünmesin */
  body[data-page="products"] .products-filters-panel .filters > .visually-hidden {
    display: none !important;
  }

  body[data-page="products"] .products-page__top .filters__search {
    flex: 1 1 260px;
    min-width: 220px;
    max-width: 440px;
  }

  body[data-page="products"] .products-filters-panel .filters select {
    flex: 0 1 150px;
    min-width: 132px;
    margin: 0;
    /* Sabit height + büyük padding yazıyı kesiyordu — sadece bunu düzelt */
    height: auto;
    min-height: 42px;
    padding: 0.55rem 2rem 0.55rem 0.85rem;
    line-height: 1.25;
    box-sizing: border-box;
  }

  body[data-page="products"] .products-view-toggle {
    display: inline-flex;
    border: 1.5px solid var(--color-border, #e2e8f0);
    border-radius: 10px;
    overflow: hidden;
    background: var(--color-surface, #fff);
  }

  body[data-page="products"] .products-view-toggle button {
    border: 0;
    background: transparent;
    padding: 0.5rem 0.95rem;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--color-text, #1e293b);
    cursor: pointer;
    line-height: 1.2;
  }

  body[data-page="products"] .products-view-toggle button + button {
    border-left: 1px solid var(--color-border, #e2e8f0);
  }

  body[data-page="products"] .products-view-toggle button.is-active {
    background: var(--color-primary, #16a34a);
    color: #fff;
  }

  body[data-page="products"] .products-view-toggle button:hover:not(.is-active) {
    background: rgba(22, 163, 74, 0.08);
  }

  body[data-page="products"] #near-me-btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  body[data-page="products"] .radius-chips {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
  }

  body[data-page="products"] .radius-chip {
    border: 1.5px solid var(--color-border, #e2e8f0);
    background: var(--color-surface, #fff);
    border-radius: 999px;
    padding: 0.38rem 0.75rem;
    font-size: 0.84rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--color-text, #1e293b);
    cursor: pointer;
    line-height: 1.2;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
  }

  body[data-page="products"] .radius-chip:hover,
  body[data-page="products"] .radius-chip.is-active {
    background: rgba(22, 163, 74, 0.12);
    border-color: rgba(22, 163, 74, 0.45);
    color: #15803d;
  }

  body[data-page="products"] .results-count {
    margin: 0 0 0 auto;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-muted, #64748b);
    white-space: nowrap;
  }

  body[data-page="products"] .page-header--products {
    padding-bottom: 1.25rem;
  }

  body[data-page="products"] .products-grid {
    gap: 1.25rem;
  }

  /* Acil filtre chip'leri — eski düzende boyut uyumu */
  body[data-page="products"] .products-quick-filters,
  body[data-page="products"] .un-filters.products-quick-filters {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
  }

  body[data-page="products"] .products-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    min-height: 36px;
    padding: 0.35rem 0.75rem;
    border: 1.5px solid var(--color-border, #e2e8f0);
    border-radius: 999px;
    background: var(--color-surface, #fff);
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.2;
    box-sizing: border-box;
    white-space: nowrap;
    cursor: pointer;
  }

  body[data-page="products"] .products-chip input {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: var(--color-primary, #16a34a);
  }

  body[data-page="products"] #near-me-btn.is-active {
    background: rgba(22, 163, 74, 0.12);
    border-color: rgba(22, 163, 74, 0.45);
    color: #15803d;
  }
}
