/* IPEKERP_426_2_SEARCH_FINAL_POLISH_V1
 * Final search-only geometry/responsive authority.
 * Presentation only. No data, filter semantics, price, stock or compatibility mutation.
 */

body.sf-search-v2 #urunler,
body.sf-stage5-search-v1 #urunler {
  --sf426-gap: 14px;
}

/* Desktop shell: keep filters useful without stealing product-card width. */
@media (min-width: 1280px) {
  body.sf-search-v2 #urunler .sf2-catalog-layout,
  body.sf-stage5-search-v1 #urunler .sf2-catalog-layout {
    grid-template-columns: 250px minmax(0, 1fr) !important;
    gap: 16px !important;
  }

  body.sf-search-v2 #urunler aside.sf2-filter-panel,
  body.sf-stage5-search-v1 #urunler aside.sf2-filter-panel {
    width: 250px !important;
    min-width: 250px !important;
    max-width: 250px !important;
  }
}

@media (min-width: 981px) and (max-width: 1279px) {
  body.sf-search-v2 #urunler .sf2-catalog-layout,
  body.sf-stage5-search-v1 #urunler .sf2-catalog-layout {
    grid-template-columns: 230px minmax(0, 1fr) !important;
    gap: 14px !important;
  }

  body.sf-search-v2 #urunler aside.sf2-filter-panel,
  body.sf-stage5-search-v1 #urunler aside.sf2-filter-panel {
    width: 230px !important;
    min-width: 230px !important;
    max-width: 230px !important;
  }
}

/* Toolbar: denser and aligned with the card grid. */
body.sf-search-v2 #urunler .sf2-results-toolbar,
body.sf-stage5-search-v1 #urunler .sf2-results-toolbar {
  min-height: 50px !important;
  margin-bottom: 10px !important;
  padding-top: 0 !important;
  padding-bottom: 8px !important;
  gap: 12px !important;
}

body.sf-search-v2 #urunler label.sf2-sort.sf2-sort--desktop select,
body.sf-stage5-search-v1 #urunler label.sf2-sort.sf2-sort--desktop select {
  min-width: 190px !important;
  height: 38px !important;
  min-height: 38px !important;
}

/* Card grid: fixed desktop rhythm; responsive count changes only at clear breakpoints. */
body.sf-search-v2 #urunler #storefront-product-grid,
body.sf-stage5-search-v1 #urunler #storefront-product-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  align-content: start !important;
  gap: var(--sf426-gap) !important;
  width: 100% !important;
  overflow: visible !important;
}

/* Neutralize older 500px minimum-card rules that re-expanded the compact cards. */
body.sf-search-v2 #urunler #storefront-product-grid > .sf-product-card,
body.sf-stage5-search-v1 #urunler #storefront-product-grid > .sf-product-card {
  min-height: 0 !important;
  height: auto !important;
  align-self: stretch !important;
}

body.sf-search-v2 #urunler .sf-product-card__link,
body.sf-stage5-search-v1 #urunler .sf-product-card__link {
  min-height: 0 !important;
}

body.sf-search-v2 #urunler .sf-product-card__image,
body.sf-stage5-search-v1 #urunler .sf-product-card__image {
  min-height: 188px !important;
  height: 188px !important;
  padding: 28px 14px 8px !important;
}

body.sf-search-v2 #urunler .sf-product-card__image > img,
body.sf-stage5-search-v1 #urunler .sf-product-card__image > img {
  width: 100% !important;
  height: 146px !important;
  max-height: 146px !important;
  object-fit: contain !important;
}

body.sf-search-v2 #urunler .sf-product-card__placeholder,
body.sf-stage5-search-v1 #urunler .sf-product-card__placeholder {
  height: 146px !important;
  min-height: 146px !important;
}

body.sf-search-v2 #urunler .sf-product-card__body,
body.sf-stage5-search-v1 #urunler .sf-product-card__body {
  padding: 10px 12px 11px !important;
}

body.sf-search-v2 #urunler .sf-product-card__body h2,
body.sf-stage5-search-v1 #urunler .sf-product-card__body h2 {
  min-height: 40px !important;
  margin-bottom: 0 !important;
  font-size: 12.5px !important;
  line-height: 1.45 !important;
}

body.sf-search-v2 #urunler .sf-product-card__footer,
body.sf-stage5-search-v1 #urunler .sf-product-card__footer {
  padding-top: 10px !important;
}

body.sf-search-v2 #urunler .sf-product-card__actions,
body.sf-stage5-search-v1 #urunler .sf-product-card__actions {
  padding: 0 12px 12px !important;
}

body.sf-search-v2 #urunler .sf-cart-add-button,
body.sf-stage5-search-v1 #urunler .sf-cart-add-button {
  min-height: 40px !important;
}

/* Mid-size desktop / tablet landscape. */
@media (min-width: 981px) and (max-width: 1180px) {
  body.sf-search-v2 #urunler #storefront-product-grid,
  body.sf-stage5-search-v1 #urunler #storefront-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* Tablet: preserve existing mobile filter behavior; only own result geometry. */
@media (min-width: 641px) and (max-width: 980px) {
  body.sf-search-v2 #urunler #storefront-product-grid,
  body.sf-stage5-search-v1 #urunler #storefront-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  body.sf-search-v2 #urunler .sf2-results-toolbar,
  body.sf-stage5-search-v1 #urunler .sf2-results-toolbar {
    gap: 10px !important;
  }

  body.sf-search-v2 #urunler .sf-product-card__image,
  body.sf-stage5-search-v1 #urunler .sf-product-card__image {
    height: 176px !important;
    min-height: 176px !important;
  }

  body.sf-search-v2 #urunler .sf-product-card__image > img,
  body.sf-stage5-search-v1 #urunler .sf-product-card__image > img,
  body.sf-search-v2 #urunler .sf-product-card__placeholder,
  body.sf-stage5-search-v1 #urunler .sf-product-card__placeholder {
    height: 136px !important;
    max-height: 136px !important;
    min-height: 136px !important;
  }
}

/* Phone: one clear card per row, no horizontal catalog overflow. */
@media (max-width: 640px) {
  body.sf-search-v2 #urunler,
  body.sf-stage5-search-v1 #urunler {
    --sf426-gap: 10px;
  }

  body.sf-search-v2 #urunler #storefront-product-grid,
  body.sf-stage5-search-v1 #urunler #storefront-product-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    overflow-x: clip !important;
  }

  body.sf-search-v2 #urunler .sf-product-card__image,
  body.sf-stage5-search-v1 #urunler .sf-product-card__image {
    height: 172px !important;
    min-height: 172px !important;
  }

  body.sf-search-v2 #urunler .sf-product-card__image > img,
  body.sf-stage5-search-v1 #urunler .sf-product-card__image > img,
  body.sf-search-v2 #urunler .sf-product-card__placeholder,
  body.sf-stage5-search-v1 #urunler .sf-product-card__placeholder {
    height: 132px !important;
    max-height: 132px !important;
    min-height: 132px !important;
  }

  body.sf-search-v2 #urunler .sf-product-card__body,
  body.sf-stage5-search-v1 #urunler .sf-product-card__body {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  body.sf-search-v2 #urunler .sf-product-card__actions,
  body.sf-stage5-search-v1 #urunler .sf-product-card__actions {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

@media (hover: hover) and (pointer: fine) {
  body.sf-search-v2 #urunler .sf-product-card:hover,
  body.sf-stage5-search-v1 #urunler .sf-product-card:hover {
    transform: translateY(-1px) !important;
  }
}
