/* ─── Otomat 360 — Tasarım Sistemi ─────────────────────────────────────────── */
/* Mira · IEF Framework · Dark Americana / Espresso palette                    */

:root {
  --ink: #16130f;
  --ink2: #211b15;
  --paper: #faf7f2;
  --line: #e9e2d7;
  --accent: #e9a23b;
  --accent-d: #c9821c;
  --muted: #8a7f70;
  --wa: #25D366;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

body {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  background-color: var(--paper);
  color: var(--ink);
}

::selection {
  background: rgba(233, 162, 59, 0.2);
  color: var(--ink);
}

/* ─── Kart lift hover (layered motion) ─── */
.product-card {
  transition: transform .4s var(--ease-out-expo), box-shadow .4s var(--ease-out-expo), border-color .4s ease;
  border: 1px solid var(--line);
  cursor: pointer;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
  border-color: var(--accent);
}
.product-card .product-img img {
  transition: transform .5s var(--ease-out-expo);
}
.product-card:hover .product-img img {
  transform: scale(1.08);
}
.product-card .card-arrow {
  transition: transform .3s var(--ease-out-expo);
}
.product-card:hover .card-arrow {
  transform: translateX(4px);
}

/* ─── Buton micro-feedback ─── */
.btn {
  transition: transform .2s var(--ease-out-expo), background .25s ease, box-shadow .25s ease;
  cursor: pointer;
}
.btn:active {
  transform: scale(0.97);
}
.btn-accent {
  background-color: var(--accent);
  color: var(--ink);
}
.btn-accent:hover {
  background-color: var(--accent-d);
}
.btn-wa {
  background-color: var(--wa);
  color: #fff;
}
.btn-wa:hover {
  background-color: #1da851;
}
.btn-ink {
  background-color: var(--ink);
  color: #fff;
}
.btn-ink:hover {
  background-color: var(--ink2);
}

/* ─── Animated underline link ─── */
.link-underline {
  position: relative;
}
.link-underline::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 1px;
  width: 100%;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .4s var(--ease-out-expo);
}
.link-underline:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ─── GSAP reveal animasyonu ─── */
/* Baslangic durumu GSAP tarafindan set edilir (gsap.from).
   CSS'te opacity:0 KOYMUYORUZ — GSAP yuklenemezse icerik gorunur kalsin. */
.reveal-item.in {
  opacity: 1;
  transform: none;
  transition: opacity .6s var(--ease-out-expo), transform .6s var(--ease-out-expo);
}

/* ─── Teknik ozellik tablosu ─── */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.spec-table td,
.spec-table th {
  padding: 10px 14px;
  border: 1px solid var(--line);
  text-align: left;
}
.spec-table tr:nth-child(even) {
  background: rgba(0,0,0,0.02);
}
.spec-table tr:hover {
  background: rgba(233,162,59,0.06);
}
.spec-table strong {
  font-weight: 600;
}

/* ─── Urun detay sayfasi - eski CMS HTML tablolarini stille ─── */
.product-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 1rem 0;
}
.product-content table td {
  padding: 10px 14px;
  border: 1px solid var(--line);
}
.product-content table tr:nth-child(even) {
  background: rgba(0,0,0,0.02);
}
.product-content table tr:hover {
  background: rgba(233,162,59,0.06);
}

/* ─── Toast bildirim ─── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--ink);
  color: #fff;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: transform .5s var(--ease-out-expo), opacity .5s var(--ease-out-expo);
  pointer-events: none;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ─── Kategori pill filtreleri ─── */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  transition: all .25s var(--ease-out-expo);
  cursor: pointer;
}
.pill:hover,
.pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
}

/* ─── Hero amber glow ─── */
.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(233,162,59,0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* ─── Sticky header blur ─── */
.site-header {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: box-shadow .3s ease, background .3s ease;
}
.site-header.scrolled {
  box-shadow: 0 2px 24px rgba(0,0,0,0.06);
}

/* ─── Sepet rozeti ─── */
.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  background: var(--accent);
  color: var(--ink);
  font-size: 0.625rem;
  font-weight: 700;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0 4px;
}

/* ─── Mobil hamburger menu ─── */
.mobile-menu {
  transform: translateX(100%);
  transition: transform .4s var(--ease-out-expo);
}
.mobile-menu.open {
  transform: translateX(0);
}

/* ─── Gorsel placeholder ─── */
.img-placeholder {
  background: linear-gradient(135deg, #f0ece4 0%, #e5dfd5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── Live Search Dropdown ─── */
.search-wrapper {
  position: relative;
}
.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.04);
  z-index: 100;
  overflow: hidden;
  max-height: 420px;
  overflow-y: auto;
  transition: opacity .2s ease, transform .2s ease;
}
.search-dropdown-mobile {
  position: relative;
  top: 8px;
  border-radius: 12px;
}
.search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  text-decoration: none;
  color: var(--ink);
  transition: background .15s ease;
}
.search-item:hover {
  background: #f5f0e8;
}
.search-item-img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f5f0e8;
}
.search-item-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 16px;
}
.search-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.search-item-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-item-cat {
  font-size: 0.6875rem;
  color: var(--muted);
  font-weight: 500;
}
.search-all {
  display: block;
  text-align: center;
  padding: 12px 16px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border-top: 1px solid var(--line);
  transition: background .15s ease;
}
.search-all:hover {
  background: #faf7f2;
  color: var(--accent-d);
}
.search-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 16px;
  color: var(--muted);
  font-size: 0.8125rem;
}
.search-empty i {
  opacity: 0.4;
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal-item {
    opacity: 1;
    transform: none;
  }
  .hero-glow {
    display: none;
  }
}
