/* ═══════════════════════════════════════════════════════════════
 * ORTAKSISTEM E-TİCARET — SHOP ÖZEL STİLLERİ
 * ═══════════════════════════════════════════════════════════════
 * Hero, ürün kartı, kategori, sepet, filtre vb.
 */

/* ── Hero Banner ────────────────────────────────────────────── */
.hero {
  position: relative;
  background: linear-gradient(135deg,
    hsl(var(--primary-h), 60%, 12%) 0%,
    hsl(var(--primary-h), 50%, 20%) 50%,
    hsl(var(--accent-h), 40%, 18%) 100%);
  padding: var(--space-20) 0 var(--space-16);
  overflow: hidden;
  color: white;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

/* Animated gradient orbs */
.hero::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, hsla(var(--accent-h), 80%, 50%, 0.15) 0%, transparent 70%);
  top: -100px;
  right: -100px;
  animation: float 8s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-30px, 20px); }
}

.hero-inner {
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-4);
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 600px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: var(--fw-extrabold);
  margin-bottom: var(--space-4);
  line-height: 1.1;
  color: white;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, #60a5fa, #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.75);
  margin-bottom: var(--space-8);
  max-width: 500px;
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: var(--space-10);
  margin-top: var(--space-10);
}

.hero-stat {
  text-align: center;
}

.hero-stat-value {
  font-size: var(--text-3xl);
  font-weight: var(--fw-extrabold);
  font-family: var(--font-heading);
  background: linear-gradient(135deg, #60a5fa, #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-stat-label {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.6);
  margin-top: var(--space-1);
}

@media (max-width: 768px) {
  .hero { padding: var(--space-12) 0 var(--space-10); }
  .hero-stats { gap: var(--space-6); }
  .hero-stat-value { font-size: var(--text-xl); }
}

/* ── Kategori Kartları ──────────────────────────────────────── */
.categories-strip {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  padding: var(--space-2) 0;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.categories-strip::-webkit-scrollbar { display: none; }

.category-card {
  flex: 0 0 auto;
  width: 140px;
  padding: var(--space-5) var(--space-3);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  text-align: center;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-default);
  scroll-snap-align: start;
}

.category-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.category-card.active {
  background: var(--primary-bg);
  border-color: var(--primary);
}

.category-icon {
  font-size: 2rem;
  margin-bottom: var(--space-2);
  display: block;
}

.category-name {
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
}

.category-count {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: var(--space-1);
}

@media (max-width: 480px) {
  .category-card { width: 110px; padding: var(--space-4) var(--space-2); }
  .category-icon { font-size: 1.5rem; }
}

/* ── Ürün Kartı ─────────────────────────────────────────────── */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-default);
  cursor: pointer;
  position: relative;
}

.product-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: transparent;
  transform: translateY(-4px);
}

.product-card-img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--bg-tertiary);
}

.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-default);
}

.product-card:hover .product-card-img img {
  transform: scale(1.05);
}

.product-card-badges {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.product-card-badge {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  border-radius: var(--radius-md);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.product-card-badge.sale {
  background: rgba(239, 68, 68, 0.9);
  color: white;
}

.product-card-badge.featured {
  background: rgba(59, 130, 246, 0.9);
  color: white;
}

.product-card-actions {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  opacity: 0;
  transform: translateX(10px);
  transition: all var(--duration-normal) var(--ease-default);
}

.product-card:hover .product-card-actions {
  opacity: 1;
  transform: translateX(0);
}

.product-card-action {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  font-size: var(--text-base);
  transition: all var(--duration-fast) var(--ease-default);
  border: 1px solid rgba(255,255,255,0.2);
}

.product-card-action:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.product-card-action.favorited {
  color: var(--danger);
}

.product-card-body {
  padding: var(--space-4);
}

.product-card-category {
  font-size: var(--text-xs);
  color: var(--primary);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-2);
}

.product-card-name {
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  line-height: var(--lh-tight);
  margin-bottom: var(--space-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.product-card-price .price {
  font-size: var(--text-lg);
}

.product-card-price .price-old {
  font-size: var(--text-xs);
  display: block;
  margin-bottom: 2px;
}

.product-card-cart {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-lg);
  font-size: 1.1rem;
  transition: all var(--duration-fast) var(--ease-default);
}

.product-card-cart:hover {
  background: var(--primary-dark);
  transform: scale(1.1);
}

@media (max-width: 480px) {
  .product-card-body { padding: var(--space-3); }
  .product-card-name { font-size: var(--text-sm); }
  .product-card-price .price { font-size: var(--text-base); }
  .product-card-cart { width: 32px; height: 32px; font-size: 0.9rem; }
}

/* ── Ürün Detay ─────────────────────────────────────────────── */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-10);
  padding: var(--space-8) 0;
}

.product-gallery {
  position: sticky;
  top: calc(var(--header-h) + var(--space-4));
}

.product-main-image {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  background: var(--bg-tertiary);
  margin-bottom: var(--space-4);
}

.product-main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info h1 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-4);
}

.product-price-block {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.product-price-block .price {
  font-size: var(--text-3xl);
  color: var(--primary);
}

.product-price-block .price-old {
  font-size: var(--text-lg);
}

.product-specs {
  margin: var(--space-6) 0;
}

.product-specs table {
  width: 100%;
  border-collapse: collapse;
}

.product-specs td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-light);
  font-size: var(--text-sm);
}

.product-specs td:first-child {
  font-weight: var(--fw-semibold);
  color: var(--text-secondary);
  width: 40%;
}

.product-actions {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

@media (max-width: 768px) {
  .product-detail { grid-template-columns: 1fr; gap: var(--space-6); }
  .product-gallery { position: static; }
}

/* ── Sepet Sidebar ──────────────────────────────────────────── */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  max-width: 90vw;
  height: 100vh;
  background: var(--bg-elevated);
  z-index: var(--z-modal);
  box-shadow: var(--shadow-xl);
  transition: right var(--duration-slow) var(--ease-default);
  display: flex;
  flex-direction: column;
}

.cart-sidebar.open { right: 0; }

.cart-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border-color);
}

.cart-sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4) var(--space-6);
}

.cart-sidebar-footer {
  padding: var(--space-5) var(--space-6);
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.cart-item {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border-light);
}

.cart-item-img {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-tertiary);
}

.cart-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-info { flex: 1; }
.cart-item-name {
  font-weight: var(--fw-semibold);
  font-size: var(--text-sm);
  margin-bottom: var(--space-1);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-3);
  font-size: var(--text-sm);
}

.cart-total-row.grand {
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  padding-top: var(--space-3);
  border-top: 2px solid var(--border-color);
}

/* Cart overlay */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: calc(var(--z-modal) - 1);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-normal) var(--ease-default);
}

.cart-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* ── Filtreler ──────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  flex-wrap: wrap;
}

.filter-bar select {
  width: auto;
  min-width: 160px;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  background: var(--bg-card);
  cursor: pointer;
}

/* ── Pagination ─────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-8);
}

.pagination-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: all var(--duration-fast) var(--ease-default);
  cursor: pointer;
}

.pagination-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.pagination-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Mobil Arama Overlay ────────────────────────────────────── */
.mobile-search-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: var(--z-modal);
  padding: var(--space-4);
  display: none;
}

.mobile-search-overlay.open { display: block; }

.mobile-search-bar {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

.mobile-search-bar input {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-base);
}

/* ── WhatsApp Float Button ──────────────────────────────────── */
.wa-float {
  position: fixed;
  bottom: calc(var(--space-6) + var(--bottom-nav-h));
  right: var(--space-6);
  width: 56px;
  height: 56px;
  background: #25d366;
  color: white;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  z-index: var(--z-sticky);
  transition: all var(--duration-normal) var(--ease-default);
  cursor: pointer;
}

.wa-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
}

@media (min-width: 769px) {
  .wa-float { bottom: var(--space-8); right: var(--space-8); }
}
