/* Vitrin (müşteri tarafı) — kullanıcının gönderdiği Trendyol ekran
   görüntülerine göre açık tema. app.css'in koyu :root token'larını BİLEREK
   burada override ediyoruz — bu dosya sadece store/base.html'den yüklenir,
   admin paneli (admin.css) etkilenmez, koyu temada kalır. */

:root {
  --bg: #f4f4f6;
  --card: #ffffff;
  --border: #edeef1;
  --text: #2b2f36;
  --muted: #767e8c;
  --accent: #f27a1a;   /* Trendyol turuncusu */
  --accent2: #6b3fa0;  /* flaş moru */
  --ok: #2e9c48;
  --danger: #e2231a;
  --shadow: 0 2px 12px rgba(30,30,60,.06);
}

body { background: var(--bg); }
.btn-primary { color: #fff; }
.btn-primary:hover { background: #ff8c33; }

/* ------------------------------------------------------------------ Header */
.store-header {
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: #fff;
  box-shadow: var(--shadow);
  z-index: 20;
}
.store-header .container {
  display: flex; align-items: center; gap: 24px; padding: 14px 20px;
}
.store-logo { font-weight: 800; font-size: 1.4rem; color: var(--accent); letter-spacing: -.02em; }
.store-search { flex: 1; max-width: 480px; position: relative; }
.store-search input {
  border-radius: 999px; padding-left: 40px; border-color: var(--border); background: #f7f7f9;
}
.store-search::before {
  content: "🔍"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-size: .85rem; opacity: .55;
}
.store-nav { display: flex; gap: 20px; align-items: center; font-weight: 700; font-size: .92rem; white-space: nowrap; }
.cart-link { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.cart-count {
  position: absolute; top: -8px; right: -14px;
  background: var(--accent); color: #fff; border-radius: 999px;
  font-size: .68rem; font-weight: 800; padding: 1px 6px; min-width: 16px; text-align: center;
}

.store-categories {
  border-bottom: 1px solid var(--border); background: #fff;
}
.store-categories .container {
  display: flex; gap: 22px; padding: 10px 20px; overflow-x: auto; font-size: .88rem; font-weight: 600;
  color: var(--muted);
}
.store-categories a:hover, .store-categories a.active { color: var(--accent); }

/* -------------------------------------------------------------------- Hero */
.hero {
  padding: 44px 0 36px; text-align: center;
  background: linear-gradient(180deg, rgba(242,122,26,.08), transparent 80%);
}
.hero h1 { font-size: 2rem; margin: 0 0 8px; color: var(--text); }
.hero p { color: var(--muted); max-width: 560px; margin: 0 auto; }

/* --------------------------------------------------------- Banner Slider */
.banner-slider { position: relative; margin: 20px 0; border-radius: var(--radius); overflow: hidden; }
.banner-track { display: flex; transition: transform .5s ease; }
.banner-slide {
  position: relative; flex: 0 0 100%; display: block;
  aspect-ratio: 21 / 7; background: var(--card);
}
.banner-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-caption {
  position: absolute; left: 0; bottom: 0; padding: 20px 28px;
  background: linear-gradient(0deg, rgba(0,0,0,.55), transparent);
  color: #fff; width: 100%;
}
.banner-caption h2 { margin: 0 0 4px; font-size: 1.4rem; }
.banner-caption p { margin: 0; opacity: .9; }
.banner-dots { position: absolute; bottom: 10px; right: 16px; display: flex; gap: 6px; }
.banner-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.5); }
.banner-dot.active { background: #fff; }
@media (max-width: 860px) {
  .banner-slide { aspect-ratio: 4 / 3; }
}

.section-title { display: flex; align-items: center; justify-content: space-between; margin: 36px 0 16px; }
.section-title h2 { font-size: 1.25rem; margin: 0; }

/* ------------------------------------------------------------- Ürün kartı */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; position: relative; border-color: var(--border); transition: box-shadow .15s ease, transform .15s ease; }
.product-card:hover { box-shadow: 0 10px 24px rgba(30,30,60,.1); transform: translateY(-2px); }
.product-card-link { display: block; }
.product-card .img-wrap { aspect-ratio: 1 / 1; background: #fafafa; overflow: hidden; position: relative; }
.product-card img { width: 100%; height: 100%; object-fit: cover; }
.product-card .body { padding: 12px 14px 4px; }
.product-card .title {
  font-size: .88rem; font-weight: 500; margin: 0 0 8px; min-height: 2.6em;
  color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.quick-add { padding: 8px 14px 14px; }

.ribbon {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  padding: 4px 10px; border-radius: 999px; font-size: .72rem; font-weight: 800;
  color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.ribbon-flash { background: linear-gradient(135deg, var(--accent2), #9b5de5); }
.ribbon-static { position: static; display: inline-flex; align-items: center; margin-bottom: 10px; }

.favorite-toggle-form { position: absolute; top: 8px; right: 8px; z-index: 3; margin: 0; }
.favorite-toggle {
  width: 32px; height: 32px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,.9); color: var(--muted); font-size: 1.1rem; line-height: 1;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,.15);
  transition: transform .1s ease;
}
.favorite-toggle:hover { transform: scale(1.08); }
.favorite-toggle.active { color: #e2231a; }

.countdown-badge {
  position: absolute; left: 8px; bottom: 8px; z-index: 2;
  background: rgba(20,20,30,.78); color: #fff;
  padding: 3px 8px; border-radius: 6px; font-size: .72rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.price-row { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.price { font-weight: 800; color: var(--text); }
.price-old { text-decoration: line-through; color: var(--muted); font-weight: 400; font-size: .82em; }
.price-sale { color: var(--danger); font-size: 1.05em; }
.pct-badge {
  background: rgba(226,35,26,.1); color: var(--danger); font-weight: 800; font-size: .74rem;
  padding: 2px 6px; border-radius: 5px;
}

.countdown { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent); }

/* -------------------------------------------------------------- Filtreler */
.shop-layout { display: grid; grid-template-columns: 230px 1fr; gap: 24px; align-items: start; margin: 26px 0 60px; }
.filter-panel { padding: 18px; position: sticky; top: 84px; }
.filter-panel h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 10px; }
.filter-group { margin-bottom: 14px; border-bottom: 1px solid var(--border); padding-bottom: 14px; }
.filter-group:last-child { margin-bottom: 0; border-bottom: none; padding-bottom: 0; }
.filter-group summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between;
  font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 10px;
}
.filter-group summary::-webkit-details-marker { display: none; }
.filter-group summary::after { content: "⌄"; font-size: .95rem; color: var(--muted); transition: transform .15s ease; }
.filter-group[open] summary::after { transform: rotate(180deg); }
.filter-options-scroll { max-height: 220px; overflow-y: auto; padding-right: 4px; }
.filter-option { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: .88rem; cursor: pointer; }
.filter-option input { width: auto; flex-shrink: 0; }
.filter-option.active { color: var(--accent); font-weight: 700; }

/* ---------------------------------------------------------- Ürün detayı */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin: 30px 0 60px; }
.product-detail .gallery-main { aspect-ratio: 1/1; border-radius: var(--radius); overflow: hidden; background: var(--card); border: 1px solid var(--border); position: relative; }
.product-detail .thumbs { display: flex; gap: 8px; margin-top: 10px; }
.product-detail .thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); cursor: pointer; }
.product-detail h1 { font-size: 1.5rem; margin: 0 0 10px; color: var(--text); }
.product-detail .price-block { font-size: 1.7rem; margin: 16px 0; }
.qty-stepper { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; background: #fff; }
.qty-stepper button { background: none; border: none; color: var(--text); width: 36px; height: 36px; cursor: pointer; font-size: 1.1rem; }
.qty-stepper input { width: 48px; text-align: center; border: none; background: none; }

.variant-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.variant-pill { display: inline-block; border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; font-size: .82rem; color: var(--text); background: #fff; }
.variant-pill:hover { border-color: var(--accent); color: var(--accent); }
.variant-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.variant-pill.out-of-stock { color: var(--muted); text-decoration: line-through; }

/* --------------------------------------------------------------- Sepet */
.star-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; font-size: 1.8rem; line-height: 1; }
.star-input input { display: none; }
.star-input label { color: var(--border); cursor: pointer; }
.star-input input:checked ~ label,
.star-input label:hover,
.star-input label:hover ~ label { color: var(--accent); }

.rating-summary { display: flex; align-items: center; gap: 10px; margin: 8px 0 20px; }
.rating-summary .stars { color: var(--accent); font-size: 1.1rem; letter-spacing: 1px; }
.rating-summary .avg { font-weight: 800; font-size: 1.2rem; }
.review-item { border-top: 1px solid var(--border); padding: 16px 0; }
.review-item:first-child { border-top: none; }
.review-item .stars { color: var(--accent); font-size: .9rem; letter-spacing: 1px; }
.review-item .meta { color: var(--muted); font-size: .78rem; margin: 2px 0 8px; }
.review-item .admin-reply { background: #fafafa; border-radius: 8px; padding: 10px 12px; margin-top: 10px; font-size: .88rem; }
.helpful-btn { background: none; border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; font-size: .78rem; color: var(--muted); cursor: pointer; }
.helpful-btn:hover { border-color: var(--accent); color: var(--accent); }

.cart-table img { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; }
.coupon-form { display: flex; gap: 8px; margin-bottom: 14px; }
.coupon-form input[type="text"] { flex: 1; }
.coupon-applied { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; background: rgba(46,156,72,.08); border: 1px dashed var(--ok); border-radius: 8px; padding: 8px 12px; font-size: .85rem; }
.shipping-progress { margin-top: 12px; }
.shipping-progress-bar { height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; }
.shipping-progress-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent2), var(--accent)); transition: width .3s ease; }
.shipping-gap { font-size: .82rem; color: var(--accent); margin-top: 8px; font-weight: 600; }

/* --------------------------------------------------------- Sipariş takip çubuğu */
.order-tracker { display: flex; align-items: flex-start; margin: 14px 0; }
.order-tracker-step {
  flex: 1; text-align: center; position: relative; font-size: .78rem; color: var(--muted);
}
.order-tracker-step::before {
  content: ""; position: absolute; top: 9px; left: -50%; width: 100%; height: 3px;
  background: var(--border); z-index: 0;
}
.order-tracker-step:first-child::before { content: none; }
.order-tracker-dot {
  display: block; width: 20px; height: 20px; border-radius: 50%; background: var(--card);
  border: 3px solid var(--border); margin: 0 auto 6px; position: relative; z-index: 1;
}
.order-tracker-step.done::before,
.order-tracker-step.active::before { background: var(--accent); }
.order-tracker-step.done .order-tracker-dot { background: var(--accent); border-color: var(--accent); }
.order-tracker-step.active .order-tracker-dot { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(242,122,26,.2); }
.order-tracker-step.active .order-tracker-label,
.order-tracker-step.done .order-tracker-label { color: var(--text); font-weight: 700; }
.order-tracker-note { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.order-tracker-cancelled { padding: 6px 0; }
.cancel-order-form { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }

.checkout-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; align-items: start; margin: 30px 0 60px; }

.store-footer { border-top: 1px solid var(--border); margin-top: 60px; padding: 30px 0; color: var(--muted); font-size: .85rem; background: #fff; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--accent); }

.legal-page h3 { font-size: 1rem; margin: 22px 0 8px; color: var(--text); }
.legal-page h3:first-child { margin-top: 0; }
.legal-page p { margin: 0 0 12px; line-height: 1.6; }
.legal-page ul, .legal-page ol { margin: 0 0 12px; padding-left: 22px; line-height: 1.6; }
.legal-page table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.legal-page table td, .legal-page table th { border-bottom: 1px solid var(--border); padding: 6px 8px; }

.whatsapp-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 30;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25d366; color: #fff; font-size: 1.6rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.25); text-decoration: none;
}
.whatsapp-float:hover { transform: scale(1.06); }

@media (max-width: 860px) {
  .product-detail, .checkout-grid, .shop-layout { grid-template-columns: 1fr; }
  .store-header .container { flex-wrap: wrap; row-gap: 10px; }
  .store-search { order: 3; flex: 1 1 100%; max-width: none; }
  .store-nav a:not(.cart-link):not(.account-link) { display: none; }
  .filter-panel { position: static; }
}
