/* ================================================================
   home.css — TilbeHome Pro
   ================================================================
   TABLE OF CONTENTS:
   1. Story Category Bar
   2. Trust Badges Strip
   3. Category Icon Circle Overrides
   4. Section Wrapper & Header
   5. Horizontal Scroll & Carousel
   6. Trust Box (Platform-Injected)
   7. Promo Banner Grid
   ================================================================ */

/* === kaynak: components.css 1198-1552 - Z-2 sprint === */

   SECTION 36 — C7-7: HOMEPAGE MODULES (Story Bar + Trust Badges)
   ═══════════════════════════════════════════════════════════════════ */

/* --- Story Category Bar --- */
.th-story__bar {
  background: var(--th-color-bg);
  padding: var(--th-space-4) 0;
  border-bottom: 1px solid var(--th-color-border-light);
  contain: layout style;
}
.th-story__track {
  display: flex;
  gap: var(--th-space-5);
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: var(--th-space-1) var(--th-space-6);
  max-width: 1440px;
  margin: 0 auto;
}
.th-story__track::-webkit-scrollbar { display: none; }
.th-story__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--th-space-2);
  flex-shrink: 0;
  text-decoration: none;
  transition: transform .2s ease;
}
.th-story__item:hover { transform: translateY(-3px); }
.th-story__ring {
  width: 64px; height: 64px;
  border-radius: var(--th-radius-full);
  background: linear-gradient(135deg, var(--th-color-accent), var(--th-orange-300), var(--th-color-accent-hover));
  padding: var(--th-space-1);
  display: flex; align-items: center; justify-content: center;
  transition: box-shadow .25s ease;
}
.th-story__item:hover .th-story__ring {
  box-shadow: var(--th-shadow-accent);
}
.th-story__ring img {
  width: 56px; height: 56px;
  border-radius: var(--th-radius-full);
  object-fit: cover;
  background: var(--th-color-bg);
  border: 2px solid var(--th-neutral-0);
}
.th-story__ring i {
  color: var(--th-color-text-inverse); font-size: var(--th-text-xl);
}
.th-story__name {
  font-size: var(--th-text-xs);
  font-weight: var(--th-font-semibold);
  color: var(--th-color-text-secondary);
  text-align: center;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .th-story__track { gap: var(--th-space-3-5); padding: var(--th-space-1) var(--th-space-4); }
  .th-story__ring { width: 56px; height: 56px; }
  .th-story__ring img { width: 48px; height: 48px; }
}

/* --- Trust Badges Strip --- */
.th-trust__strip {
  background: var(--th-color-bg-secondary);
  border-top: 1px solid var(--th-color-border-light);
  border-bottom: 1px solid var(--th-color-border-light);
  padding: var(--th-space-6) 0;
  contain: layout style;
}
.th-trust__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--th-space-6);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--th-space-5);
}
.th-trust__badge {
  display: flex;
  align-items: center;
  gap: var(--th-space-3-5);
}
.th-trust__icon {
  width: 48px; height: 48px;
  border-radius: var(--th-radius-xl);
  background: color-mix(in srgb, var(--th-color-accent) 8%, transparent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.th-trust__icon i {
  font-size: var(--th-text-xl);
  color: var(--th-color-accent);
}
.th-trust__text strong {
  display: block;
  font-size: var(--th-text-base);
  font-weight: var(--th-font-bold);
  color: var(--th-color-text);
  line-height: 1.3;
}
.th-trust__text span {
  font-size: var(--th-text-xs-plus);
  color: var(--th-color-text-muted);
  line-height: 1.3;
}

@media (max-width: 992px) {
  .th-trust__inner { grid-template-columns: repeat(2, 1fr); gap: var(--th-space-4); }
}
@media (max-width: 576px) {
  .th-trust__inner { grid-template-columns: 1fr 1fr; gap: var(--th-space-3); padding: 0 var(--th-space-4); }
  .th-trust__icon { width: 40px; height: 40px; border-radius: var(--th-radius-xl); }
  .th-trust__icon i { font-size: var(--th-text-md); }
  .th-trust__text strong { font-size: var(--th-text-sm); }
  .th-trust__text span { font-size: var(--th-text-xs); }
}

/* --- Category icon circle: theme color override --- */
.category-icon-circle {
  background: color-mix(in srgb, var(--th-color-accent) 8%, transparent);
  color: var(--th-color-accent);
}
.category-icon-item:hover .category-icon-circle {
  background: var(--th-color-accent);
  color: var(--th-color-text-inverse);
}
.category-icon-circle.new {
  background: color-mix(in srgb, var(--th-color-accent) 12%, transparent);
  color: var(--th-color-accent);
}
.category-icon-item:hover .category-icon-circle.new {
  background: var(--th-color-accent);
  color: var(--th-color-text-inverse);
}

/* =============================================

/* ═══════════════════════════════════════════════════════════════════
   SECTION 37 — HOMEPAGE SECTIONS
   Generic section wrapper, header, horizontal scroll, carousel
   ═══════════════════════════════════════════════════════════════════ */

/* ── Section Wrapper ── */
.th-home-section {
  padding: var(--th-section-gap-xl, 64px) 0;
  background: var(--th-color-bg);
  contain: layout style;
}
.th-home-section:nth-child(even) {
  background: var(--th-color-bg-page, var(--th-color-bg-secondary));
}
.th-home-section--flush {
  padding: 0;
}

/* ── Section Header ── */
.th-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--th-space-4);
  max-width: 1440px;
  margin: 0 auto var(--th-space-6);
  padding: 0 var(--th-space-6);
}
.th-section-title {
  font-size: var(--th-text-xl);
  font-weight: var(--th-font-bold);
  color: var(--th-color-text);
  margin: 0;
  line-height: 1.3;
}
.th-section-link {
  font-size: var(--th-text-sm);
  font-weight: var(--th-font-medium);
  color: var(--th-color-primary);
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: var(--th-space-1);
  transition: color .2s ease, gap .2s ease;
}
.th-section-link:hover {
  color: var(--th-color-primary-hover);
  gap: var(--th-space-2);
}
.th-section-link::after {
  content: "\203A";
  font-size: 1.2em;
  line-height: 1;
}

/* ── Section Content Container ── */
.th-section-body {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--th-space-6);
}

/* ── Horizontal Scroll ── */
.th-hscroll {
  display: flex;
  gap: var(--th-space-4);
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--th-space-1);
}
.th-hscroll::-webkit-scrollbar { display: none; }
.th-hscroll > * {
  scroll-snap-align: start;
  flex-shrink: 0;
}
.th-hscroll--card > * {
  width: 220px;
}

/* ── Carousel Wrapper ── */
.th-carousel-wrap {
  position: relative;
}
.th-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: var(--th-radius-full);
  background: var(--th-color-bg);
  border: 1px solid var(--th-color-border-light);
  box-shadow: var(--th-shadow-md, 0 4px 12px color-mix(in srgb, var(--th-ink-900) 10%, transparent));
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity .2s ease, box-shadow .2s ease;
  color: var(--th-color-text);
  font-size: var(--th-text-base);
  padding: 0;
}
.th-carousel-btn:hover {
  box-shadow: var(--th-shadow-lg, 0 8px 24px color-mix(in srgb, var(--th-ink-900) 15%, transparent));
}
.th-carousel-btn--prev { left: -20px; }
.th-carousel-btn--next { right: -20px; }
.th-carousel-btn[disabled] {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 768px) {
  .th-home-section { padding: var(--th-section-gap-lg, 48px) 0; }
  .th-section-header { padding: 0 var(--th-space-4); margin-bottom: var(--th-space-4); }
  .th-section-title { font-size: var(--th-text-lg); }
  .th-section-body { padding: 0 var(--th-space-4); }
  .th-carousel-btn { display: none; }
  .th-hscroll--card > * { width: 180px; }
}
@media (max-width: 576px) {
  .th-home-section { padding: var(--th-section-gap-md, 32px) 0; }
  .th-section-header { padding: 0 var(--th-space-3); margin-bottom: var(--th-space-3); }
  .th-section-body { padding: 0 var(--th-space-3); }
  .th-hscroll { gap: var(--th-space-3); }
  .th-hscroll--card > * { width: 160px; }
}
/* ═══════════════════════════════════════════════════════════════════
   SECTION 38 — TRUST BOX (Platform-injected HTML)
   HTML classes: .trust-box, .trust-list, .trust-item,
                 .trust-icon, .trust-content, .trust-title
   NOTE: HTML cannot be modified — only CSS styling
   ═══════════════════════════════════════════════════════════════════ */

.trust-box {
  background: var(--th-trust-bg, var(--th-color-bg-page));
  border: 1px solid var(--th-trust-border, var(--th-color-border-light));
  border-radius: var(--th-trust-radius, var(--th-radius-xl));
  padding: var(--th-trust-padding, var(--th-space-5));
}
.trust-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--th-trust-gap, var(--th-space-4));
  list-style: none;
  margin: 0;
  padding: 0;
}
.trust-item {
  display: flex;
  align-items: flex-start;
  gap: var(--th-space-3);
  padding: var(--th-space-3);
  border-radius: var(--th-radius-md, var(--th-radius-lg));
  background: color-mix(in srgb, var(--th-neutral-0) 70%, transparent);
  transition: background .2s ease;
}
.trust-item:hover {
  background: color-mix(in srgb, var(--th-neutral-0) 95%, transparent);
}
.trust-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: var(--th-radius-md, var(--th-radius-lg));
  background: var(--th-trust-bg-alt, color-mix(in srgb, var(--th-color-accent) 8%, transparent));
  color: var(--th-trust-icon-color, var(--th-color-accent));
  font-size: var(--th-trust-icon-size, var(--th-text-xl));
}
.trust-icon img,
.trust-icon svg {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.trust-content {
  flex: 1;
  min-width: 0;
}
.trust-title {
  display: block;
  font-size: var(--th-trust-title-font, var(--th-text-sm));
  font-weight: var(--th-trust-title-weight, var(--th-font-semibold));
  color: var(--th-trust-title-color, var(--th-ink-800));
  line-height: 1.3;
  margin-bottom: var(--th-space-0-5);
}
.trust-content p,
.trust-content span:not(.trust-title) {
  font-size: var(--th-trust-desc-font, var(--th-text-xs));
  color: var(--th-trust-desc-color, var(--th-ink-500));
  line-height: 1.4;
  margin: 0;
}

@media (max-width: 768px) {
  .trust-list { grid-template-columns: repeat(2, 1fr); }
  .trust-item { padding: var(--th-space-2); gap: var(--th-space-2); }
  .trust-icon { width: 32px; height: 32px; font-size: var(--th-text-md); }
}
@media (max-width: 576px) {
  .trust-list { grid-template-columns: 1fr; }
  .trust-box { padding: var(--th-space-3); }
}

/* === misc.css'ten taşındı — S6 promo-banner-grid12 / matara === */
.promo-banner-grid12 {
    display: flex;
    flex-wrap: wrap;
    gap: var(--th-space-5);
    justify-content: center;
    max-width: 100%;
    margin: var(--th-space-2-5) 0 30px
}
@media (max-width: 768px) {
  .promo-banner-grid12 { gap: var(--th-space-3); margin: var(--th-space-2) 0 var(--th-space-5); }
}
@media (max-width: 576px) {
  .promo-banner-grid12 { gap: var(--th-space-2); margin: var(--th-space-1-5) 0 var(--th-space-4); }
}
.matara-masaustu-liste {
    width: 100%;
    height: auto;
    border-radius: var(--th-radius-md);
    overflow: hidden;
    margin: var(--th-space-2-5) 0 0;
    padding: 0
}
.matara-masaustu-liste img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block
}

/* ═══════════════════════════════════════════════════════════════════
   SECTION 39 — PERFORMANCE & ACCESSIBILITY
   contain, content-visibility, CLS prevention, focus-visible,
   reduced-motion, forced-colors
   ═══════════════════════════════════════════════════════════════════ */

/* ── CLS Prevention ── */
.th-story__ring img {
  aspect-ratio: 1 / 1;
}
.promo-banner-grid12 img {
  aspect-ratio: 3 / 2;
  width: 100%;
  height: auto;
}

/* ── Focus Visible ── */
.th-story__item:focus-visible {
  outline: 2px solid var(--th-color-accent);
  outline-offset: 2px;
  border-radius: var(--th-radius-md);
}
.th-section-link:focus-visible {
  outline: 2px solid var(--th-color-primary);
  outline-offset: 2px;
  border-radius: var(--th-radius-sm);
}
.th-carousel-btn:focus-visible {
  outline: 2px solid var(--th-color-primary);
  outline-offset: 2px;
}
.trust-item:focus-visible {
  outline: 2px solid var(--th-color-primary);
  outline-offset: 2px;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  .th-story__item,
  .th-story__ring,
  .th-section-link,
  .th-carousel-btn,
  .trust-item {
    transition: none;
  }
  .th-story__item:hover {
    transform: none;
  }
  .th-hscroll,
  .th-story__track {
    scroll-behavior: auto;
  }
}

/* ── Forced Colors (Windows High Contrast) ── */
@media (forced-colors: active) {
  .th-story__ring {
    border: 2px solid LinkText;
    background: none;
  }
  .th-trust__icon {
    border: 1px solid ButtonText;
    background: none;
  }
  .trust-icon {
    border: 1px solid ButtonText;
    background: none;
  }
  .th-carousel-btn {
    border: 1px solid ButtonText;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   SECTION 40 — SON GÖRÜNTÜLENENLER / SANA ÖZEL KARTLARI
   JS ile doldurulan mini ürün kartları (localStorage)
   ═══════════════════════════════════════════════════════════════════ */
.th-recent__card {
  display: flex;
  flex-direction: column;
  gap: var(--th-space-2);
  text-decoration: none;
  width: var(--th-space-40, 160px);
  flex-shrink: 0;
  scroll-snap-align: start;
}
.th-recent__img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: var(--th-radius-lg);
  overflow: hidden;
  background: var(--th-color-bg-secondary);
}
.th-recent__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--th-duration-normal, 0.2s) var(--th-ease-out, ease);
}
.th-recent__card:hover .th-recent__img img {
  transform: scale(1.05);
}
.th-recent__name {
  font-size: var(--th-text-xs);
  font-weight: var(--th-font-medium);
  color: var(--th-color-text);
  line-height: var(--th-leading-snug, 1.3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.th-recent__price {
  font-size: var(--th-text-sm);
  font-weight: var(--th-font-bold);
  color: var(--th-color-text);
}

/* Deal of the Day hero */
.th-deal {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: var(--th-container-max, 1240px);
  margin: 0 auto;
  background: linear-gradient(135deg, var(--th-ink-900), var(--th-ink-800, #1a1a1a));
  border-radius: var(--th-radius-xl);
  overflow: hidden;
  color: var(--th-neutral-0);
}
.th-deal__image {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.th-deal__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.th-deal__discount {
  position: absolute;
  top: var(--th-space-4);
  left: var(--th-space-4);
  background: var(--th-color-danger, var(--th-red-600));
  color: var(--th-neutral-0);
  font-size: var(--th-text-sm);
  font-weight: var(--th-font-bold);
  padding: var(--th-space-1) var(--th-space-3);
  border-radius: var(--th-radius-md);
}
.th-deal__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--th-space-4);
  padding: var(--th-space-10) var(--th-space-8);
}
.th-deal__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--th-space-2);
  font-size: var(--th-text-sm);
  font-weight: var(--th-font-bold);
  color: var(--th-color-accent);
  text-transform: uppercase;
  letter-spacing: var(--th-tracking-wide, 1px);
  align-self: flex-start;
}
.th-deal__title {
  font-size: var(--th-text-2xl);
  font-weight: var(--th-font-bold);
  line-height: var(--th-leading-snug, 1.3);
  margin: 0;
}
.th-deal__title a { color: inherit; text-decoration: none; }
.th-deal__prices {
  display: flex;
  align-items: baseline;
  gap: var(--th-space-3);
}
.th-deal__price-old {
  font-size: var(--th-text-lg);
  color: var(--th-neutral-400, rgba(255,255,255,0.5));
  text-decoration: line-through;
}
.th-deal__price-now {
  font-size: var(--th-text-3xl);
  font-weight: var(--th-font-extrabold);
  color: var(--th-color-accent);
}
.th-deal__ship {
  display: inline-flex;
  align-items: center;
  gap: var(--th-space-2);
  font-size: var(--th-text-sm);
  color: var(--th-color-success);
  font-weight: var(--th-font-medium);
}
.th-deal__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--th-space-2);
  padding: var(--th-space-4) var(--th-space-8);
  background: var(--th-color-accent);
  color: var(--th-neutral-0);
  font-size: var(--th-text-lg);
  font-weight: var(--th-font-bold);
  border-radius: var(--th-radius-xl);
  text-decoration: none;
  align-self: flex-start;
  transition: background var(--th-duration-normal, 0.2s) var(--th-ease-out, ease);
}
.th-deal__cta:hover {
  background: var(--th-color-accent-hover, var(--th-orange-700));
}

/* Yeni üye banner */
.th-newmember {
  position: fixed;
  bottom: var(--th-space-4);
  left: var(--th-space-4);
  z-index: var(--th-z-toast, 1070);
  max-width: var(--th-space-80, 320px);
  animation: th-slideUp var(--th-duration-slow, 0.3s) var(--th-ease-entrance, ease-out);
}
.th-newmember__inner {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: var(--th-space-3);
  padding: var(--th-space-5);
  background: var(--th-neutral-0);
  border: var(--th-border-width-default, 1px) solid var(--th-color-border-light);
  border-radius: var(--th-radius-xl);
  box-shadow: var(--th-shadow-xl, 0 20px 25px -5px rgba(0,0,0,0.1));
}
.th-newmember__close {
  position: absolute;
  top: var(--th-space-2);
  right: var(--th-space-2);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--th-color-text-muted);
  font-size: var(--th-text-sm);
  padding: var(--th-space-1);
}
.th-newmember__icon {
  font-size: var(--th-text-2xl);
  color: var(--th-color-accent);
  flex-shrink: 0;
}
.th-newmember__title {
  display: block;
  font-size: var(--th-text-sm);
  font-weight: var(--th-font-bold);
  color: var(--th-color-text);
  margin-bottom: var(--th-space-1);
}
.th-newmember__text {
  font-size: var(--th-text-xs);
  color: var(--th-color-text-muted);
  line-height: var(--th-leading-normal, 1.5);
  margin: 0 0 var(--th-space-3);
}
.th-newmember__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--th-space-1-5);
  padding: var(--th-space-2) var(--th-space-4);
  background: var(--th-color-accent);
  color: var(--th-neutral-0);
  font-size: var(--th-text-xs);
  font-weight: var(--th-font-bold);
  border-radius: var(--th-radius-lg);
  text-decoration: none;
  transition: background var(--th-duration-fast, 0.15s) var(--th-ease-out, ease);
}
.th-newmember__cta:hover {
  background: var(--th-color-accent-hover, var(--th-orange-700));
}
@keyframes th-slideUp {
  from { opacity: 0; transform: translateY(var(--th-space-6)); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .th-recent__card { width: var(--th-space-36, 144px); }
  .th-deal { grid-template-columns: 1fr; }
  .th-deal__image { aspect-ratio: 4 / 3; }
  .th-deal__body { padding: var(--th-space-6) var(--th-space-4); }
  .th-deal__title { font-size: var(--th-text-xl); }
  .th-deal__price-now { font-size: var(--th-text-2xl); }
  .th-deal__cta { width: 100%; justify-content: center; }
  .th-newmember { left: var(--th-space-3); right: var(--th-space-3); bottom: var(--th-space-3); max-width: none; }
}
@media (max-width: 375px) {
  .th-recent__card { width: var(--th-space-32, 128px); }
}
@media (prefers-reduced-motion: reduce) {
  .th-recent__img img { transition: none; }
  .th-newmember { animation: none; }
}
