:root {
  --bg: #f4f7fb;
  --bg-2: #edf2f8;
  --surface: rgba(255,255,255,.9);
  --surface-strong: #ffffff;
  --surface-soft: #f8fbff;
  --text: #122033;
  --muted: #617089;
  --line: rgba(17,24,39,.08);
  --line-strong: rgba(17,24,39,.12);
  --accent: #6d5efc;
  --accent-2: #3bb7ff;
  --accent-3: #0f172a;
  --shadow: 0 14px 45px rgba(15,23,42,.08);
  --shadow-lg: 0 28px 70px rgba(15,23,42,.12);
  --radius: 26px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f7fb;
  background:
    radial-gradient(circle at top left, rgba(109,94,252,.10), transparent 34%),
    radial-gradient(circle at top right, rgba(59,183,255,.09), transparent 26%),
    linear-gradient(180deg, #f8fbff 0%, #f2f6fb 100%);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: min(1220px, calc(100% - 32px)); margin: 0 auto; }

/* HEADER */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(248,251,255,.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,.75);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 18px;
}

.brand { font-size: 1.2rem; font-weight: 900; }
.topnav { display: flex; gap: 18px; color: var(--muted); }

/* HERO */
.hero { padding: 52px 0 30px; }

.hero-inner {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 30px;
  align-items: center;
}

/* SEARCH CARD */
.search-card {
  padding: 24px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.search-form,
.filters-box {
  display: grid;
  gap: 14px;
}

/* 🔥 CRITICAL FIX (zoom fix) */
input,
select,
textarea,
button {
  font-size: 16px;
}

/* INPUT STYLE */
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.92);
  color: var(--text);
  padding: 14px 15px;
  border-radius: 16px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
  -webkit-appearance: none;
  appearance: none;
}

/* EXTRA SAFE (form özel) */
.search-form input,
.search-form select,
.filters-box input,
.filters-box select {
  font-size: 16px;
}

input::placeholder { color: #96a1b8; }

/* BUTTON */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 13px 18px;
  border-radius: 15px;
  font-weight: 800;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
}

/* GRID */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

/* CARD BASE STYLES */
.card {
  background: var(--surface-strong);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
}

.card-image-wrap {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-2);
}

.card-image-wrap img,
.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card-body h3 {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}

.favicon {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  object-fit: contain;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 3px 8px;
  background: rgba(109,94,252,.1);
  color: var(--accent);
  border-radius: 20px;
  font-weight: 600;
}

.price {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
}

.old-price {
  font-size: 0.8rem;
  text-decoration: line-through;
  color: var(--muted);
}

.meta {
  font-size: 0.78rem;
  color: var(--muted);
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.btn-light {
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid var(--line);
}

/* LAYOUT */
.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
}

.sidebar {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

/* RESULTS */
.results-section { padding: 24px 0; }

.results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.results-head h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0;
}

.result-count {
  font-size: 0.85rem;
  color: var(--muted);
}

/* INFO GRID */
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 30px 0;
}

.info-card {
  background: var(--surface);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.info-card h3 { font-size: 1.1rem; font-weight: 700; margin: 0 0 8px; }
.info-card p { font-size: 0.9rem; color: var(--muted); margin: 0; }

/* SECTION HEAD */
.section-head { margin-bottom: 16px; }
.section-head h2 { font-size: 1.5rem; font-weight: 800; margin: 0 0 6px; }
.section-head p { font-size: 0.9rem; color: var(--muted); margin: 0; }

/* NOTICE */
.notice {
  padding: 20px;
  background: var(--surface);
  border-radius: 14px;
  text-align: center;
  color: var(--muted);
  border: 1px solid var(--line);
}

/* PAGINATION */
.pagination {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 24px 0;
}

/* QUICK SEARCHES */
.quick-searches { padding: 30px 0; }
.how-it-works { padding: 30px 0; }

/* FOOTER */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 24px 0;
}
.footer-inner {
  font-size: 0.85rem;
  color: var(--muted);
}

/* HERO ELEMENTS */
.hero-copy h1 { font-size: 2.2rem; font-weight: 900; margin: 0 0 12px; }
.hero-copy p { font-size: 1rem; color: var(--muted); margin: 0 0 16px; }
.hero-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-pills span {
  font-size: 0.8rem;
  padding: 5px 12px;
  background: rgba(109,94,252,.1);
  border-radius: 20px;
  color: var(--accent);
  font-weight: 600;
}

/* CHIPS */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.chip {
  font-size: 0.82rem;
  padding: 6px 14px;
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid var(--line);
  cursor: pointer;
  white-space: nowrap;
}

/* SEARCH GRID */
.search-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 980px) {
  .hero-inner,
  .layout {
    grid-template-columns: 1fr;
  }

  .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .info-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sidebar {
    order: -1;
  }
}

@media (max-width: 640px) {
  /* Header */
  .topnav { display: none; }
  .brand { font-size: 1rem; }

  /* Hero */
  .hero { padding: 24px 0 20px; }
  .hero-copy { text-align: center; }
  .hero-copy h1 { font-size: 1.5rem; line-height: 1.3; }
  .hero-copy p { font-size: 0.9rem; }
  .hero-pills {
    justify-content: center;
  }
  .hero-pills span {
    font-size: 0.75rem;
    padding: 4px 10px;
  }

  /* Search card */
  .search-card { padding: 16px; border-radius: 18px; }
  .search-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  /* Chips */
  .chips {
    padding: 4px 0;
  }
  .chip {
    font-size: 0.8rem;
    padding: 6px 12px;
  }

  /* Section headings */
  .section-head h2 { font-size: 1.3rem; }

  /* Cards - Android fix */
  .cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .card-body { padding: 10px; }
  .card-body h3 { font-size: 0.8rem; }
  /* aspect-ratio fallback for older Android WebView */
  .card-image-wrap {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    position: relative;
  }
  .card-image-wrap::before {
    content: '';
    display: block;
    padding-top: 100%;
  }
  .card-image-wrap img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
  }
  .price { font-size: 0.9rem; font-weight: 800; }
  .old-price { font-size: 0.75rem; }
  .meta { font-size: 0.72rem; }
  .badge { font-size: 0.7rem; }
  .card-actions {
    flex-direction: column;
    gap: 6px;
  }
  .card-actions .btn {
    width: 100%;
    font-size: 0.78rem;
    padding: 8px 10px;
    text-align: center;
    justify-content: center;
  }

  /* Sidebar / filters */
  .sidebar { padding: 16px; }
  .filters-box { gap: 10px; }

  /* Info grid */
  .info-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .info-card { padding: 16px; }
  .info-card h3 { font-size: 1rem; }
  .info-card p { font-size: 0.85rem; }

  /* Results head */
  .results-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .results-head h2 { font-size: 1.1rem; }

  /* Pagination */
  .pagination {
    gap: 10px;
    padding: 20px 0;
  }

  /* Footer */
  .footer-inner { text-align: center; font-size: 0.8rem; }

  /* Sections spacing */
  .quick-searches,
  .how-it-works { padding: 20px 0; }
  .results-section { padding: 16px 0; }
}

/* ===== Search page fix ===== */
.search-page-body {
  background:
    radial-gradient(circle at top left, rgba(109,94,252,.07), transparent 30%),
    radial-gradient(circle at top right, rgba(59,183,255,.07), transparent 22%),
    linear-gradient(180deg, #f8fbff 0%, #f3f6fb 100%);
}
.eyebrow {
  display:inline-flex; align-items:center; gap:8px;
  font-size:.78rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase;
  color: var(--accent); margin-bottom: 12px;
}
.home-search-card { max-width: 560px; justify-self: end; width: 100%; }
.search-shell { padding: 28px 0 40px; }
.search-toolbar {
  background: rgba(255,255,255,.86);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 24px;
  padding: 18px;
  margin-bottom: 20px;
}
.search-toolbar-form { display:grid; gap: 14px; }
.toolbar-main-fields,
.toolbar-filter-row {
  display:grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 12px;
}
.toolbar-filter-row {
  grid-template-columns: repeat(4, minmax(0,1fr)) auto;
  align-items:end;
}
.search-toolbar label,
.search-form label,
.filters-box label { display:grid; gap:8px; }
.search-toolbar label span,
.search-form label span,
.filters-box label span {
  font-size: .8rem;
  font-weight: 700;
  color: var(--muted);
}
.toolbar-submit { min-height: 48px; }
.toolbar-checks { display:flex; flex-wrap:wrap; gap:10px; }
.check-pill {
  display:inline-flex; align-items:center; gap:8px;
  border:1px solid var(--line); background:#fff; border-radius:999px;
  padding:8px 12px; font-size:.82rem; color:var(--text); font-weight:700;
}
.check-pill input { width:16px; height:16px; margin:0; }
.search-page-head {
  display:flex; justify-content:space-between; align-items:flex-end; gap:16px;
  margin-bottom: 18px;
}
.search-page-head h1 { margin:0 0 6px; font-size:1.6rem; line-height:1.15; }
.search-page-head p { margin:0; color:var(--muted); }
.search-results-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.product-card { border-radius: 20px; }
.product-thumb-wrap { background:#fff; }
.product-thumb-wrap img,
.card-image { object-fit: contain; padding: 14px; }
.compact-store-row { font-size:.78rem; color:var(--muted); gap:6px; align-items:center; }
.store-row { display:flex; align-items:center; gap:8px; }
.price-row { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.badge-row { min-height: 24px; }
.compact-actions .btn { flex:1; min-width:0; }
.error { color:#a32626; background:#fff2f2; border-color: rgba(163,38,38,.14); }
.back-link { font-weight:700; color:var(--muted); }
.product-page { padding: 28px 0 44px; }
.product-layout {
  display:grid; grid-template-columns: minmax(320px, 520px) minmax(0, 1fr); gap: 28px;
  align-items:start; margin-bottom: 28px;
}
.product-media,
.product-info,
.rich-store-card {
  background: rgba(255,255,255,.9); border:1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow);
}
.product-media { padding: 20px; }
.product-image {
  width:100%; aspect-ratio:1/1; object-fit:contain; background:#fff; border-radius:20px;
}
.product-info { padding: 24px; }
.product-info h1 { margin: 10px 0 14px; font-size: 2rem; line-height:1.15; }
.store-row.big { font-size: .95rem; font-weight:700; color:var(--muted); }
.price-row.big .price { font-size: 1.75rem; }
.detail-stack { display:grid; gap:10px; margin: 18px 0 22px; }
.detail-line { margin:0; padding: 12px 14px; background: var(--surface-soft); border-radius: 14px; }
.product-actions { display:flex; gap:12px; flex-wrap:wrap; }
.stores-section { margin-top: 20px; }
.stores-head { display:flex; justify-content:space-between; align-items:flex-end; gap:16px; }
.rich-store-cards { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:20px; }
.rich-store-card { padding: 18px; overflow:hidden; }
.store-card-top { display:flex; justify-content:space-between; gap:14px; align-items:flex-start; margin-bottom: 10px; }
.store-card-top h3 { margin:0 0 6px; font-size:1.15rem; }
.mall-pill {
  display:inline-flex; margin:0; font-size:.77rem; font-weight:800; color:var(--accent);
  background: rgba(109,94,252,.1); padding:6px 10px; border-radius:999px;
}
.muted-pill { color: var(--muted); background: var(--bg-2); }
.store-price { font-size: 1.1rem; font-weight: 900; white-space: nowrap; }
.store-address { color:var(--muted); margin:0 0 12px; }
.store-meta-row { display:flex; flex-wrap:wrap; gap:8px; margin-bottom: 12px; }
.store-gallery {
  position:relative; overflow:hidden; border-radius:18px; background: var(--bg-2);
  margin-bottom: 14px;
}
.store-slider-track { display:flex; transition: transform .35s ease; }
.store-slide { min-width:100%; }
.store-photo { width:100%; aspect-ratio: 16/10; object-fit: cover; }
.store-slider-btn {
  position:absolute; top:50%; transform:translateY(-50%); z-index:2; width:40px; height:40px;
  border:none; border-radius:999px; background: rgba(15,23,42,.64); color:#fff; font-size:24px; cursor:pointer;
}
.store-slider-btn.prev { left:10px; }
.store-slider-btn.next { right:10px; }
.store-slider-dots { display:flex; justify-content:center; gap:8px; padding: 10px; }
.store-slider-dot {
  width:10px; height:10px; border-radius:999px; border:none; background: rgba(17,24,39,.18); cursor:pointer;
}
.store-slider-dot.active { background: var(--accent); }
.store-map-box { border-radius:18px; overflow:hidden; border:1px solid var(--line); }
.store-map { width:100%; height:240px; border:0; display:block; }
@media (max-width: 1180px) {
  .search-results-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .toolbar-filter-row { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .toolbar-submit { grid-column: span 2; }
}
@media (max-width: 980px) {
  .search-page-head, .stores-head { align-items:flex-start; flex-direction:column; }
  .search-results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-layout, .rich-store-cards, .toolbar-main-fields { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .search-shell { padding-top: 16px; }
  .search-toolbar { padding: 14px; border-radius: 20px; }
  .toolbar-main-fields,
  .toolbar-filter-row { grid-template-columns: 1fr 1fr; }
  .toolbar-filter-row .toolbar-submit { grid-column: 1 / -1; }
  .search-page-head h1 { font-size: 1.2rem; }
  .search-results-grid,
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-card { border-radius: 16px; }
  .product-thumb-wrap img, .card-image { padding: 10px; }
  .product-card-body { padding: 10px; gap: 6px; }
  .product-card-body h3 { font-size: .78rem; min-height: 2.1em; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
  .compact-store-row { font-size: .68rem; }
  .price { font-size: .88rem; }
  .old-price, .meta, .badge { font-size: .68rem; }
  .compact-actions { flex-direction: row; }
  .compact-actions .btn { padding: 8px 8px; font-size: .72rem; }
  .product-page { padding-top: 16px; }
  .product-layout { gap: 16px; }
  .product-media { padding: 12px; border-radius: 18px; }
  .product-info { padding: 16px; border-radius: 18px; }
  .product-info h1 { font-size: 1.25rem; }
  .price-row.big .price { font-size: 1.25rem; }
  .detail-line { font-size:.9rem; }
  .product-actions .btn { flex: 1 1 100%; }
  .rich-store-cards { grid-template-columns: 1fr; gap: 14px; }
  .rich-store-card { padding: 14px; border-radius: 18px; }
  .store-map { height: 220px; }
}


.pagination-wrap{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;margin:18px 0 22px;}
.pagination-bottom{margin-top:22px;margin-bottom:8px;}
.pagination-status{font-size:13px;font-weight:700;color:var(--muted);background:#fff;border:1px solid var(--line);padding:10px 14px;border-radius:999px;}
@media (max-width:640px){
  .pagination-wrap{gap:10px;}
  .pagination-wrap .btn{flex:1 1 calc(50% - 10px);text-align:center;justify-content:center;}
  .pagination-status{width:100%;text-align:center;}
}


/* Infinite scroll */
.infinite-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 0 10px;
}

.loading-chip,
.end-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  border: 1px solid var(--line);
  color: var(--muted);
  box-shadow: var(--shadow);
  font-weight: 700;
}

.load-more-fallback {
  min-width: 160px;
}

.scroll-sentinel {
  width: 100%;
  height: 2px;
}

.is-hidden {
  display: none !important;
}
