/**
 * Ana sayfa — sade, odaklı düzen (mobil + masaüstü)
 */

/* ---- Hero: gereksiz öğeler (admin’den açılabilir) ---- */
body[data-page="home"]:not(.home-show-hero-badge) .hero__badge,
body[data-page="home"]:not(.home-show-hero-stats) .hero-metrics,
body[data-page="home"]:not(.home-show-hero-stats) .hero__stats,
body[data-page="home"] .hero__ai-promo,
body[data-page="home"]:not(.home-show-why) #neden,
body[data-page="home"]:not(.home-show-testimonials) #home-testimonials,
body[data-page="home"]:not(.home-show-quick-links) .home-quick-links {
  display: none !important;
}

body[data-page="home"].platform-no-ai-promo .hero__ai-promo {
  display: none !important;
}

body[data-page="home"] .hero {
  padding: clamp(1.25rem, 4vw, 2.5rem) 0 clamp(1.5rem, 3vw, 2rem);
}

body[data-page="home"] .hero h1 {
  font-size: clamp(1.65rem, 4.5vw, 2.35rem);
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

body[data-page="home"] .hero__text {
  font-size: clamp(0.9rem, 2vw, 1.02rem);
  max-width: 36ch;
  margin-bottom: 1.1rem;
  color: var(--color-text-muted, #64748b);
}

body[data-page="home"] .hero__grid {
  gap: 1.5rem;
  align-items: start;
}

body[data-page="home"] .hero-search__card {
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.07);
}

body[data-page="home"] .hero-search__btn {
  min-height: 48px;
  font-weight: 700;
  border-radius: 12px;
}

body[data-page="home"] .hero__tags {
  margin-top: 0.85rem;
  gap: 0.4rem;
}

body[data-page="home"] .hero__tag {
  font-size: 0.78rem;
  padding: 0.32rem 0.65rem;
}

body[data-page="home"] .hero__tags-label {
  font-size: 0.76rem;
}

/* Hızlı erişim */
body[data-page="home"] .home-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

body[data-page="home"] .home-quick-links a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--color-text, #0f172a);
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #e2e8f0);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

body[data-page="home"] .home-quick-links a:hover,
body[data-page="home"] .home-quick-links a:focus-visible {
  border-color: var(--color-primary, #16a34a);
  color: var(--color-primary-dark, #15803d);
}

body[data-page="home"] .home-quick-links a.home-quick-links__primary {
  background: var(--color-primary, #16a34a);
  border-color: var(--color-primary, #16a34a);
  color: #fff;
}

/* Bölüm başlıkları — kompakt */
body[data-page="home"] .section {
  padding: clamp(2rem, 5vw, 3rem) 0;
}

body[data-page="home"] .section__header {
  margin-bottom: 1.25rem;
}

body[data-page="home"] .section__header h2 {
  font-size: clamp(1.2rem, 3vw, 1.45rem);
  margin-bottom: 0.25rem;
}

body[data-page="home"] .section__header p {
  font-size: 0.9rem;
  color: var(--color-text-muted, #64748b);
  margin: 0;
}

body[data-page="home"] .categories__footer,
body[data-page="home"] .section__footer-link {
  margin-top: 1rem;
  font-size: 0.88rem;
  font-weight: 600;
}

/* Kategoriler — daha az yoğun */
body[data-page="home"] .categories {
  gap: 0.65rem;
}

body[data-page="home"] .category-card {
  border-radius: 14px;
  padding: 0.85rem 0.65rem;
}

body[data-page="home"] .category-card h3 {
  font-size: 0.82rem;
}

/* Ürün ızgarası */
body[data-page="home"] .products-grid {
  gap: 0.75rem;
}

body[data-page="home"] .smart-section__chip {
  font-size: 0.68rem;
}

body[data-page="home"] .smart-section__hint {
  font-size: 0.85rem;
}

/* CTA — sade */
body[data-page="home"] .cta {
  padding: clamp(1.5rem, 4vw, 2rem);
  border-radius: 18px;
}

body[data-page="home"] .cta h2 {
  font-size: clamp(1.15rem, 3vw, 1.4rem);
}

body[data-page="home"] .cta p {
  font-size: 0.9rem;
}

/* Mobil */
@media (max-width: 900px) {
  body[data-page="home"] .hero {
    padding: 1.15rem 0 1.5rem;
    background:
      radial-gradient(ellipse 120% 80% at 50% -20%, rgba(22, 163, 74, 0.12) 0%, transparent 55%),
      linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
  }

  body[data-page="home"] .hero__grid {
    text-align: center !important;
    gap: 1rem !important;
  }

  /* Tek padding katmanı — Android safe-area kaymasını önler */
  body[data-page="home"] .hero > .container {
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
    padding-inline: max(1rem, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
    box-sizing: border-box;
  }

  body[data-page="home"] .hero__grid {
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
    padding-inline: 0;
    box-sizing: border-box;
  }

  body[data-page="home"] .hero__visual {
    display: none;
  }

  body[data-page="home"] .hero__content {
    max-width: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin-inline: 0;
  }

  body[data-page="home"] .hero h1 {
    font-size: clamp(1.85rem, 6.2vw, 2.35rem);
    font-weight: 800 !important;
    line-height: 1.08;
    letter-spacing: -0.035em;
    margin: 0 0 0.7rem;
    padding-inline: 0;
    text-align: left !important;
    max-width: none;
    width: 100%;
    align-self: stretch;
    /* İki tonlu başlık — yalnızca mobil */
    color: #0f172a !important;
    background: none !important;
    -webkit-text-fill-color: #0f172a !important;
    background-clip: unset !important;
    -webkit-background-clip: unset !important;
    text-wrap: balance;
  }

  body[data-page="home"] .hero h1 #hero-title,
  body[data-page="home"] .hero h1 span:first-child {
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
    background: none !important;
    background-clip: unset !important;
    -webkit-background-clip: unset !important;
  }

  body[data-page="home"] .hero h1 #hero-title-highlight,
  body[data-page="home"] .hero h1 span:last-child {
    display: inline;
    color: #16a34a !important;
    -webkit-text-fill-color: #16a34a !important;
    background: none !important;
    background-clip: unset !important;
    -webkit-background-clip: unset !important;
    font-weight: 800;
  }

  [data-theme="dark"] body[data-page="home"] .hero h1,
  [data-theme="dark"] body[data-page="home"] .hero h1 #hero-title,
  [data-theme="dark"] body[data-page="home"] .hero h1 span:first-child {
    color: #f8fafc !important;
    -webkit-text-fill-color: #f8fafc !important;
  }

  [data-theme="dark"] body[data-page="home"] .hero h1 #hero-title-highlight,
  [data-theme="dark"] body[data-page="home"] .hero h1 span:last-child {
    color: #22c55e !important;
    -webkit-text-fill-color: #22c55e !important;
  }

  body[data-page="home"] .hero__text {
    font-size: 0.94rem;
    font-weight: 400;
    line-height: 1.55;
    letter-spacing: -0.01em;
    max-width: none;
    width: 100%;
    margin: 0 0 1.35rem;
    padding-inline: 0;
    text-align: left !important;
    align-self: stretch;
    color: #64748b;
    text-wrap: pretty;
  }

  [data-theme="dark"] body[data-page="home"] .hero__text {
    color: #94a3b8;
  }

  body[data-page="home"] .hero-search {
    max-width: 100% !important;
    width: 100%;
    margin-inline: auto;
    align-self: stretch;
    box-sizing: border-box;
  }

  body[data-page="home"] .hero-search__card {
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
    box-sizing: border-box;
    padding: 0.9rem;
    gap: 0.65rem;
    border-radius: 18px;
    border-color: color-mix(in srgb, var(--color-border, #e2e8f0) 90%, var(--color-primary, #16a34a));
    box-shadow:
      0 2px 8px rgba(15, 23, 42, 0.04),
      0 12px 32px rgba(15, 23, 42, 0.07);
  }

  body[data-page="home"] .hero-search__label {
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--color-text-muted, #64748b);
  }

  body[data-page="home"] .hero-search__input {
    height: 44px;
    border-radius: 12px;
    background: var(--color-surface, #fff);
  }

  body[data-page="home"] .hero-search__input input,
  body[data-page="home"] .hero-search__input select {
    font-size: 0.95rem;
  }

  /* Konum + kategori alt alta — kesilme olmaz */
  body[data-page="home"] .hero-search__filters {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  body[data-page="home"] .hero-search__field--query {
    grid-column: auto;
  }

  body[data-page="home"] .hero-search__btn {
    width: 100%;
    min-height: 46px;
    margin-top: 0.1rem;
    border-radius: 12px;
    font-size: 0.92rem;
    letter-spacing: 0.01em;
  }

  /* Popüler etiketler — ortalı başlangıç, kaydırılabilir */
  body[data-page="home"] .hero__tags {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    margin-top: 0.95rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 0.15rem 0.15rem;
  }

  body[data-page="home"] .hero__tags::-webkit-scrollbar {
    display: none;
  }

  body[data-page="home"] .hero__tags-label {
    flex-shrink: 0;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--color-text-muted, #64748b);
  }

  body[data-page="home"] .hero__tag {
    flex-shrink: 0;
    font-size: 0.78rem;
    padding: 0.38rem 0.7rem;
    border-radius: 999px;
    background: var(--color-surface, #fff);
    border: 1px solid var(--color-border, #e2e8f0);
  }

  /* Hızlı bağlantılar — eşit 3 sütun */
  body[data-page="home"] .home-quick-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
    margin-top: 0.85rem;
    width: 100%;
    align-self: stretch;
  }

  body[data-page="home"] .home-quick-links a {
    justify-content: center;
    text-align: center;
    min-height: 40px;
    padding: 0.45rem 0.35rem;
    border-radius: 12px;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.2;
  }

  body[data-page="home"] .home-quick-links a.home-quick-links__primary {
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.28);
  }

  body[data-page="home"] #kategoriler {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }

  body[data-page="home"] .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.85rem !important;
  }

  body[data-page="home"] .product-card {
    border-radius: 20px !important;
  }

  body[data-page="home"] .product-card__image {
    height: auto !important;
    max-height: none !important;
    aspect-ratio: 1 / 1 !important;
  }

  body[data-page="home"] .product-card__image .product-card__img,
  body[data-page="home"] .product-card__image img {
    object-fit: cover !important;
    object-position: center !important;
    transform: none !important;
  }

  body.mobile-app[data-page="home"] main {
    padding-bottom: 0.25rem;
  }

  body.mobile-app[data-page="home"] .footer {
    padding-bottom: calc(var(--mobile-nav-h, 72px) + 1rem);
  }
}

@media (min-width: 901px) {
  body[data-page="home"] .hero__grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  }

  body[data-page="home"] .hero__visual {
    position: sticky;
    top: calc(var(--header-h, 72px) + 1rem);
  }

  body[data-page="home"] .hero__card {
    border-radius: 18px;
    max-height: min(520px, 70vh);
    overflow: auto;
  }

  body[data-page="home"] .categories {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  body[data-page="home"] .categories-strip::after {
    display: none;
  }

  body[data-page="home"] .section__header--categories {
    display: block;
  }

  /* PC: alt metinler başlığın altında ortalı */
  body[data-page="home"] .section__header,
  body[data-page="home"] .section__header--categories,
  body[data-page="home"] .how-hub__header {
    text-align: center;
  }

  body[data-page="home"] .section__header p,
  body[data-page="home"] .section__header--categories p,
  body[data-page="home"] .how-hub__header p,
  body[data-page="home"] .smart-section__hint {
    display: block;
    max-width: 36rem;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center;
  }

  body[data-page="home"] .smart-section__chip,
  body[data-page="home"] .how-hub__chip,
  body[data-page="home"] .categories-hub__chip {
    display: inline-flex;
  }
}
