/* ==========================================================================
   ui-enhance.css — لایه طراحی طلایی/مشکی حرفه‌ای (Gold & Black Design Layer)
   الهام گرفته از buynotheme.ir — فقط ظاهری، بدون تغییر منطق یا API
   ========================================================================== */

/* ---------- متغیرهای طراحی ---------- */
:root {
  --gold: #d4af37;
  --gold-dark: #a8841c;
  --gold-light: rgba(212, 175, 55, 0.12);
  --gold-glow: rgba(212, 175, 55, 0.25);
  --bg-deep: #0a0906;
  --bg-card: #141210;
  --bg-elevated: #1c1a15;
  --border-subtle: #2a271e;
  --border-gold: rgba(212, 175, 55, 0.2);
  --text-primary: #f3ecda;
  --text-secondary: #c9c2b0;
  --text-muted: #8a8270;
  --text-dim: #5c5544;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-card: 0 4px 20px rgba(0,0,0,0.3), 0 0 0 1px rgba(212,175,55,0.06);
  --shadow-hover: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(212,175,55,0.15);
  --shadow-glow: 0 0 30px rgba(212,175,55,0.08);
  --font: 'Vazirmatn', Tahoma, sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- اسکرول‌بار ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--gold), var(--gold-dark));
  border-radius: 10px;
  border: 2px solid var(--bg-deep);
}
::-webkit-scrollbar-thumb:hover { background: var(--gold); }
html { scroll-behavior: smooth; }
body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: var(--bg-deep);
}

a, button, input, textarea, select {
  transition: all 0.2s ease;
}
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection {
  background: var(--gold);
  color: var(--bg-deep);
}

/* ---------- انیمیشن‌های کی‌فریم ---------- */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scale-in {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212,175,55,0.35); }
  50%      { box-shadow: 0 0 0 8px rgba(212,175,55,0); }
}
@keyframes shine {
  0%   { transform: translateX(-120%) skewX(-20deg); }
  100% { transform: translateX(220%) skewX(-20deg); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes gold-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.7; }
}
@keyframes border-glow {
  0%, 100% { border-color: var(--border-subtle); box-shadow: 0 0 0 0 rgba(212,175,55,0); }
  50%      { border-color: var(--gold); box-shadow: 0 0 20px rgba(212,175,55,0.1); }
}
@keyframes slide-down {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slide-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer-bg {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes gold-shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes glow-pulse {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(212,175,55,0.3)); }
  50% { filter: drop-shadow(0 0 20px rgba(212,175,55,0.6)); }
}

@keyframes ripple-out {
  0% { box-shadow: 0 0 0 0 rgba(212,175,55,0.4); }
  100% { box-shadow: 0 0 0 12px rgba(212,175,55,0); }
}

@keyframes count-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes skeleton-wave {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes card-enter {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes badge-pop {
  0% { transform: scale(0); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

@keyframes heart-beat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.3); }
  30% { transform: scale(1); }
  45% { transform: scale(1.15); }
  60% { transform: scale(1); }
}

@keyframes glow-border {
  0%, 100% { border-color: var(--border-gold); }
  50% { border-color: var(--gold); }
}

@keyframes shimmer-text {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes slide-in-right {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slide-in-left {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes zoom-in {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes toast-slide-in {
  from { opacity: 0; transform: translateX(50%) translateY(20px) scale(0.92); }
  to { opacity: 1; transform: translateX(50%) translateY(0) scale(1); }
}

@keyframes toast-slide-out {
  from { opacity: 1; transform: translateX(50%) translateY(0) scale(1); }
  to { opacity: 0; transform: translateX(50%) translateY(-10px) scale(0.95); }
}

@keyframes fade-scale-in {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- کلاس‌های ابزاری انیمیشن ---------- */
.ui-fade-up {
  animation: fade-up 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.ui-fade-in {
  animation: fade-in 0.4s ease both;
}
.ui-scale-in {
  animation: scale-in 0.35s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.ui-slide-up {
  animation: slide-up 0.4s ease both;
}
.ui-zoom-in {
  animation: zoom-in 0.4s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.ui-gold-text {
  background: linear-gradient(135deg, var(--gold), #f2e2a0, var(--gold-dark));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% auto;
  animation: shimmer-text 3s linear infinite;
}
.ui-glow {
  animation: glow-pulse 2.4s ease-in-out infinite;
}

/* ---------- انیمیشن‌های اسکرول (با IntersectionObserver در ui-enhance.js فعال می‌شوند) ---------- */
.ui-scroll-anim {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.ui-scroll-anim.ui-visible {
  opacity: 1;
  transform: translateY(0);
}
.ui-scroll-fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.ui-scroll-fade-up.ui-visible {
  opacity: 1;
  transform: translateY(0);
}
.ui-scroll-scale-in {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.ui-scroll-scale-in.ui-visible {
  opacity: 1;
  transform: scale(1);
}
.ui-scroll-slide-right {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.ui-scroll-slide-right.ui-visible {
  opacity: 1;
  transform: translateX(0);
}
.ui-scroll-slide-left {
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.ui-scroll-slide-left.ui-visible {
  opacity: 1;
  transform: translateX(0);
}

/* تاخیرهای استagger برای انیمیشن‌های اسکرول */
.ui-delay-1 { transition-delay: 0.05s; }
.ui-delay-2 { transition-delay: 0.1s; }
.ui-delay-3 { transition-delay: 0.15s; }
.ui-delay-4 { transition-delay: 0.2s; }
.ui-delay-5 { transition-delay: 0.25s; }
.ui-delay-6 { transition-delay: 0.3s; }
.ui-delay-7 { transition-delay: 0.35s; }
.ui-delay-8 { transition-delay: 0.4s; }

/* شمارنده اعداد (counter animation) */
.ui-counter {
  display: inline-block;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.ui-counter.ui-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .ui-scroll-anim, .ui-scroll-fade-up, .ui-scroll-scale-in,
  .ui-scroll-slide-right, .ui-scroll-slide-left,
  .ui-counter {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---------- هدر: سایه و عمق هنگام اسکرول ---------- */
.header {
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(20, 18, 16, 0.95) !important;
}
.header.ui-scrolled {
  box-shadow: 0 4px 30px rgba(0,0,0,0.5), 0 1px 0 rgba(212,175,55,0.08);
}
.logo { 
  transition: transform 0.3s ease, filter 0.3s ease; 
  display: inline-block; 
  font-size: 24px !important;
  letter-spacing: 0 !important;
}
.logo:hover { 
  transform: scale(1.05); 
  filter: drop-shadow(0 0 20px rgba(212,175,55,0.4)); 
}

/* نوار جستجو - حرفه‌ای‌تر */
.search-wrap input {
  transition: box-shadow 0.3s ease, border-color 0.2s ease;
  border-color: var(--border-subtle) !important;
  border-radius: 50px !important;
  padding: 0 20px 0 52px !important;
  background: var(--bg-elevated) !important;
  height: 46px !important;
}
.search-wrap input:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 4px rgba(212,175,55,0.08), 0 0 20px rgba(212,175,55,0.05);
}
.search-btn {
  border-radius: 50% !important;
  width: 50px !important;
  height: 46px !important;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.search-btn:hover { filter: brightness(1.12); }
.search-btn:active { transform: scale(0.92); }

.header-btn {
  position: relative;
  transition: background 0.2s ease, transform 0.15s ease, color 0.2s ease;
  border-radius: 10px !important;
}
.header-btn:active { transform: scale(0.94); }
.header-btn svg { 
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); 
}
.header-btn:hover svg { transform: translateY(-2px) scale(1.08); }

.cart-badge .badge {
  min-width: 22px;
  width: auto;
  height: 20px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 800;
  line-height: 20px;
  border-radius: 10px;
  top: -6px;
  right: -8px;
  box-shadow: 0 0 0 2px var(--bg-card);
  animation: pulse-gold 2.4s ease-in-out infinite;
  background: var(--gold) !important;
  color: var(--bg-deep) !important;
}

/* ---------- توپ بار (gold premium) ---------- */
.topbar {
  background: linear-gradient(135deg, #0a0906 0%, #1a1510 50%, #0a0906 100%) !important;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary) !important;
  font-size: 12px;
}
.topbar a {
  color: var(--text-muted) !important;
  transition: color 0.2s ease;
}
.topbar a:hover { color: var(--gold) !important; opacity: 1 !important; }

/* ---------- سایدبار ---------- */
.sidebar-menu {
  border-color: var(--border-subtle) !important;
  border-radius: 12px !important;
  overflow: hidden;
}
.sidebar-item {
  transition: all 0.2s ease;
  padding: 13px 16px !important;
  border-bottom-color: var(--border-subtle) !important;
}
.sidebar-item:hover { 
  background: var(--gold-light) !important; 
  color: var(--gold) !important; 
  padding-right: 22px !important; 
}
.sidebar-item svg, .sidebar-item .arrow { 
  transition: transform 0.2s ease; 
}
.sidebar-item:hover .arrow { transform: translateX(-5px); }

/* ---------- بخش‌ها و کارت‌ها ---------- */
.section {
  background: var(--bg-card) !important;
  border-color: var(--border-subtle) !important;
  border-radius: 14px !important;
  padding: 24px !important;
  animation: fade-up 0.5s ease both;
  box-shadow: var(--shadow-card);
}

.section-title {
  font-size: 19px !important;
  font-weight: 700;
  color: var(--text-primary) !important;
}
.section-title-red { color: var(--gold) !important; }
.section-all {
  color: var(--gold) !important;
  font-size: 13px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}
.section-all:hover { 
  text-decoration: underline !important; 
  opacity: 0.85;
}

/* ---------- بخش‌ها با تاخیر ورود استagger ---------- */
.section:nth-child(2) { animation-delay: 0.04s; }
.section:nth-child(3) { animation-delay: 0.08s; }
.section:nth-child(4) { animation-delay: 0.12s; }
.section:nth-child(5) { animation-delay: 0.16s; }
.section:nth-child(6) { animation-delay: 0.20s; }

/* ---------- بنر اصلی (hero) ---------- */
.hero-banner {
  border-radius: 14px !important;
  min-height: 320px !important;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1510 0%, #2b2313 40%, #141210 100%) !important;
  border: 1px solid var(--border-gold) !important;
}
.hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(212,175,55,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(212,175,55,0.05) 0%, transparent 50%);
  pointer-events: none;
}
.hero-banner.has-bg-img::before { display: none }
.hero-banner.has-bg-img .hero-content {
  z-index: 2;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.hero-banner.has-bg-img .hero-badge {
  background: rgba(212,175,55,0.2) !important;
  border-color: rgba(212,175,55,0.4) !important;
  color: var(--gold) !important;
  animation: gold-pulse 3s ease-in-out infinite;
}
.hero-banner.has-bg-img .hero-cta {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark)) !important;
  color: var(--bg-deep) !important;
}
.hero-banner-bg {
  animation: float 12s ease-in-out infinite;
  opacity: 0.06 !important;
}
.hero-badge {
  animation: gold-pulse 3s ease-in-out infinite;
  background: rgba(212,175,55,0.15) !important;
  border-color: rgba(212,175,55,0.3) !important;
  color: var(--gold) !important;
  backdrop-filter: blur(4px);
}
.hero-title {
  font-size: 34px !important;
  font-weight: 800;
  line-height: 1.3;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.hero-subtitle {
  font-size: 15px !important;
  opacity: 0.8;
}
.hero-cta {
  border-radius: 50px !important;
  padding: 12px 30px !important;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark)) !important;
  color: var(--bg-deep) !important;
  font-weight: 700 !important;
  position: relative;
  overflow: hidden;
}
.hero-cta::before {
  content: '';
  position: absolute; top: 0; bottom: 0; left: 0; width: 40%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: translateX(-120%) skewX(-20deg);
  pointer-events: none;
}
.hero-cta:hover::before { animation: shine 0.9s ease forwards; }
.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -6px rgba(212,175,55,0.4);
}
.hero-image {
  animation: float 5s ease-in-out infinite;
}
.hero-image img {
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

/* ---------- کارت‌های تبلیغاتی (promo) ---------- */
.promo-card {
  border-radius: 12px !important;
  border-color: var(--border-subtle) !important;
  transition: all 0.3s ease;
}
.promo-card:hover {
  border-color: var(--gold) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* ---------- کارت‌های محصول ---------- */
.product-card {
  border-color: var(--border-subtle) !important;
  border-radius: 12px !important;
  padding: 14px !important;
  background: var(--bg-card) !important;
  transition: all 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
  animation: fade-up 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  will-change: transform;
}
.product-card:hover {
  border-color: var(--gold) !important;
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.product-card:hover .product-img img { transform: scale(1.08); }

.products-grid .product-card:nth-child(1){animation-delay:0.02s}
.products-grid .product-card:nth-child(2){animation-delay:0.06s}
.products-grid .product-card:nth-child(3){animation-delay:0.10s}
.products-grid .product-card:nth-child(4){animation-delay:0.14s}
.products-grid .product-card:nth-child(5){animation-delay:0.18s}
.products-grid .product-card:nth-child(6){animation-delay:0.22s}
.products-grid .product-card:nth-child(7){animation-delay:0.26s}
.products-grid .product-card:nth-child(8){animation-delay:0.30s}
.products-grid .product-card:nth-child(9){animation-delay:0.34s}
.products-grid .product-card:nth-child(10){animation-delay:0.38s}
.products-grid .product-card:nth-child(n+11){animation-delay:0.40s}

.product-img {
  border-radius: 8px !important;
  overflow: hidden;
  background: var(--bg-elevated) !important;
}
.product-img img {
  width:100%;height:100%;object-fit:cover;
  transition: transform 0.5s ease;
}

.product-title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--text-primary) !important;
}
.product-rating {
  font-size: 12px;
  color: var(--text-muted) !important;
}
.stars { color: var(--gold) !important; }

.product-price {
  font-size: 17px !important;
  font-weight: 800 !important;
  color: var(--text-primary) !important;
}
.product-price small { color: var(--text-muted) !important; font-weight: 400 !important; }
.product-price-old { color: var(--text-dim) !important; font-size: 12px; }
.product-discount {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark)) !important;
  color: var(--bg-deep) !important;
  animation: pulse-gold 2.8s ease-in-out infinite;
}

/* بج‌ها */
.product-badge { font-weight: 600 !important; }
.badge-red { background: var(--gold-light) !important; color: var(--gold) !important; }
.badge-green { background: rgba(0, 166, 80, 0.12) !important; color: #00e676 !important; }
.badge-blue { background: rgba(0, 89, 160, 0.15) !important; color: #42a5f5 !important; }
.badge-orange { background: rgba(245, 166, 35, 0.12) !important; color: #ffa726 !important; }
.badge-gray { background: rgba(138, 130, 112, 0.15) !important; color: var(--text-muted) !important; }

/* ---------- دسته‌بندی‌ها ---------- */
.cat-card {
  border-radius: 12px !important;
  border-color: var(--border-subtle) !important;
  padding: 28px 12px 22px !important;
  transition: all 0.3s ease;
  background: var(--bg-card) !important;
}
.cat-card:hover {
  border-color: var(--gold) !important;
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.cat-card-icon { display: flex; align-items: center; justify-content: center; width: 80px; height: 80px; margin: 0 auto 12px; border-radius: 50%; }
.cat-card-icon svg { width: 80px; height: 80px; }
.cat-card-label { font-size: 13px; font-weight: 500; color: var(--text-secondary) !important; }

@media (max-width: 640px) {
  .cat-card { padding: 22px 10px 18px !important; }
  .cat-card-icon { width: 64px; height: 64px; }
  .cat-card-icon svg { width: 64px; height: 64px; }
}

/* ---------- فلش سیل (تایمر و بخش) ---------- */
.flash-label {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark)) !important;
  border-radius: 10px !important;
  padding: 8px 18px !important;
  animation: gold-pulse 2s ease-in-out infinite;
}
.timer-box {
  background: var(--bg-deep) !important;
  color: var(--gold) !important;
  border: 1px solid var(--border-gold);
  border-radius: 6px !important;
  min-width: 36px !important;
  padding: 5px 10px !important;
  font-size: 16px !important;
  font-weight: 800 !important;
}
.timer-sep { color: var(--text-dim) !important; }

/* ---------- بنرهای کوچک (مینی بنر) ---------- */
.mini-banner {
  border-radius: 12px !important;
  transition: all 0.3s ease !important;
}
.mini-banner:hover { 
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.mb-blue { background: linear-gradient(135deg, #0d2137, #1a3a5c) !important; }
.mb-green { background: linear-gradient(135deg, #0d2818, #1a4a2e) !important; }
.mb-purple { background: linear-gradient(135deg, #1a0d28, #3a1a5c) !important; }

.mini-banner-text strong { font-size: 17px !important; }
.mini-banner-text span { font-size: 13px; opacity: 0.8; }

/* ---------- برندها ---------- */
.brand-chip {
  border-radius: 12px !important;
  border-color: var(--border-subtle) !important;
  padding: 14px 24px !important;
  font-size: 14px !important;
  font-weight: 700;
  transition: all 0.3s ease;
  color: var(--text-muted) !important;
}
.brand-chip:hover {
  border-color: var(--gold) !important;
  color: var(--gold) !important;
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

/* ---------- محصولات ویژه / تخفیف دار (section overlay) ---------- */
.section-overlay {
  background: rgba(10, 9, 6, 0.88) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 14px !important;
}
.section-overlay-btn {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark)) !important;
  color: var(--bg-deep) !important;
  border-radius: 50px !important;
  padding: 10px 28px !important;
  transition: all 0.3s ease;
}
.section-overlay-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(212,175,55,0.3);
}

/* ---------- فوتر ---------- */
footer {
  background: linear-gradient(180deg, var(--bg-card) 0%, #0a0906 100%) !important;
  border-top: 1px solid var(--border-subtle) !important;
  padding: 48px 0 24px !important;
  margin-top: 48px !important;
}
.footer-col h4 {
  font-size: 15px !important;
  font-weight: 700;
  color: var(--text-primary) !important;
  margin-bottom: 16px !important;
  position: relative;
  padding-bottom: 8px;
}
.footer-col h4::after {
  content: '';
  position: absolute; bottom: 0; right: 0;
  width: 30px; height: 2px;
  background: var(--gold);
  border-radius: 2px;
}
.footer-col li a {
  font-size: 13px;
  color: var(--text-muted) !important;
  transition: all 0.2s ease;
  display: inline-block;
}
.footer-col li a:hover {
  color: var(--gold) !important;
  padding-right: 5px;
}
.trust-badge {
  border-radius: 10px !important;
  border-color: var(--border-subtle) !important;
  transition: all 0.3s ease;
  padding: 10px 16px !important;
}
.trust-badge:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  color: var(--gold) !important;
}
.trust-badge svg { stroke: var(--gold) !important; }
.footer-logo { color: var(--gold) !important; font-size: 20px !important; }

/* ---------- فرم‌ها ---------- */
.form-input {
  transition: all 0.25s ease;
  border-color: var(--border-subtle) !important;
  background: var(--bg-elevated) !important;
  color: var(--text-primary) !important;
}
.form-input:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 4px rgba(212,175,55,0.08);
  transform: translateY(-1px);
}
.form-btn {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark)) !important;
  color: var(--bg-deep) !important;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.form-btn::before {
  content: '';
  position: absolute; top: 0; bottom: 0; left: 0; width: 40%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: translateX(-120%) skewX(-20deg);
  pointer-events: none;
}
.form-btn:hover::before { animation: shine 0.9s ease forwards; }
.form-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212,175,55,0.3);
}
.form-btn:active {
  transform: translateY(0) scale(0.97);
}

/* ---------- دکمه‌های اکشن (سبد خرید، علاقه‌مندی و...) ---------- */
.buybox-cta, .checkout-btn, .empty-btn, .empty-cart-btn, .empty-favorites-btn,
.review-submit-btn, .recommend-btn.active, .fav-add-to-cart {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}
.buybox-cta::before, .checkout-btn::before {
  content: '';
  position: absolute; top: 0; bottom: 0; left: 0; width: 40%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.25), transparent);
  transform: translateX(-120%) skewX(-20deg);
  pointer-events: none;
}
.buybox-cta:hover::before, .checkout-btn:hover::before { animation: shine 0.9s ease forwards; }
.buybox-cta, .checkout-btn {
  border-radius: 10px !important;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark)) !important;
  color: var(--bg-deep) !important;
  font-weight: 700 !important;
}
.buybox-cta:hover, .checkout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212,175,55,0.35);
}
.buybox-cta:active, .checkout-btn:active {
  transform: translateY(0) scale(0.97);
}
.buybox-fav {
  transition: all 0.25s ease;
}
.buybox-fav:hover svg {
  animation: heart-beat 0.6s ease;
}
.buybox-fav.active svg {
  fill: var(--red, #d4af37);
}

/* ---------- دکمه بازگشت به بالا ---------- */
.ui-back-to-top {
  position: fixed; left: 24px; bottom: 24px; z-index: 500;
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark)) !important;
  color: var(--bg-deep) !important;
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4), 0 0 0 1px rgba(212,175,55,0.2);
  opacity: 0; transform: translateY(16px) scale(0.9); pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ui-back-to-top.ui-visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.ui-back-to-top:hover { 
  transform: translateY(-3px) scale(1.05); 
  box-shadow: 0 12px 40px rgba(212,175,55,0.3);
}
.ui-back-to-top:active { 
  transform: translateY(0) scale(0.95);
}
.ui-back-to-top svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2.2; }

/* ---------- Toast (سازگار با transitions.js) ---------- */
#fonevaToast {
  animation: toast-slide-in 0.3s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark)) !important;
  color: var(--bg-deep) !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
}
#fonevaToast.show {
  animation: toast-slide-in 0.3s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
#fonevaToast:not(.show) {
  animation: toast-slide-out 0.25s ease both;
}

/* ---------- اسکلتون بارگذاری ---------- */
.skel-card, .skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--border-subtle) 37%, var(--bg-elevated) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}

/* ---------- کارت‌های سفارش و پروفایل ---------- */
.order-card, .fav-card {
  transition: all 0.3s ease;
  border-color: var(--border-subtle) !important;
}
.order-card:hover, .fav-card:hover {
  border-color: var(--gold) !important;
  box-shadow: var(--shadow-hover);
}

/* ---------- صفحه لاگین ---------- */
.auth-header {
  background: linear-gradient(135deg, #0a0906, #1a1510) !important;
  border-bottom: 1px solid var(--border-gold);
}
.auth-logo { color: var(--gold) !important; }

/* ---------- بازخورد لمسی (موبایل) ---------- */
.ui-touch-active {
  transform: scale(0.97) !important;
  transition: transform 0.12s ease !important;
}

/* ---------- افکت ریپل ---------- */
.ui-ripple {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: rgba(255,255,255,0.3);
  transform: scale(0);
  animation: ui-ripple-anim 0.55s ease-out forwards;
}
@keyframes ui-ripple-anim {
  to { transform: scale(2.6); opacity: 0; }
}

/* ---------- المنت‌های مختلف ---------- */
.variant-chip.active {
  background: var(--gold-light) !important;
  border-color: var(--gold) !important;
  color: var(--gold) !important;
}
.variant-chip {
  transition: all 0.2s ease;
  cursor: pointer;
  user-select: none;
}
.variant-chip:active {
  transform: scale(0.96);
}

.info-badge svg { stroke: var(--gold) !important; }

/* ---------- استایل سبد خرید ---------- */
.cart-summary {
  border-color: var(--border-subtle) !important;
  border-radius: 14px !important;
}
.summary-total-value { color: var(--gold) !important; }

.cart-item {
  transition: background 0.2s ease;
}
.cart-item:hover {
  background: rgba(255,255,255,0.02);
}

.qty-btn {
  transition: all 0.15s ease;
  user-select: none;
}
.qty-btn:active {
  transform: scale(0.9);
}

.item-remove {
  transition: all 0.2s ease;
  border-radius: 6px;
  padding: 4px 8px !important;
}
.item-remove:hover {
  background: rgba(212,175,55,0.1);
  transform: scale(1.1);
}

/* ---------- استایل صفحه دسته‌بندی ---------- */
.browse-card {
  border-radius: 12px !important;
  transition: all 0.3s ease;
}
.browse-card:hover {
  border-color: var(--gold) !important;
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

/* ---------- بخش FAQ ---------- */
.faq-section {
  border-radius: 14px !important;
}
.faq-q:hover { color: var(--gold) !important; }
.faq-item {
  transition: border-color 0.3s ease;
}

/* ---------- نشان (Tag) سفارش ---------- */
.order-status {
  transition: all 0.3s ease;
}

/* ---------- progress bar سفارش ---------- */
.order-tracking-banner, .order-pending-banner, .order-processing-banner, .order-delivered-banner, .order-cancelled-banner {
  transition: all 0.3s ease;
}

.league-progress-bar-fill {
  background: linear-gradient(90deg, var(--gold), #f2e2a0, var(--gold-dark));
  background-size: 200% 100%;
  animation: shimmer-bg 2s linear infinite;
}

/* ---------- مودال پروفایل ---------- */
.modal-overlay {
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal-box {
  animation: fade-scale-in 0.25s ease both;
}

/* ---------- tab ها ---------- */
.tab-btn {
  transition: all 0.2s ease;
  position: relative;
}
.tab-btn::after {
  content: '';
  position: absolute; bottom: -2px; right: 0;
  width: 0; height: 3px;
  background: var(--gold);
  border-radius: 3px 3px 0 0;
  transition: width 0.25s ease;
}
.tab-btn.active::after {
  width: 100%;
}

/* ---------- breadcrumb ---------- */
.breadcrumb a {
  transition: color 0.2s ease;
}
.breadcrumb a:hover {
  color: var(--gold) !important;
}

/* ---------- لینک‌ها ---------- */
a {
  transition: color 0.2s ease;
}

/* ---------- دکمه ادامه خرید ---------- */
.continue-shopping {
  transition: all 0.25s ease;
}

/* ---------- سوشال مدیا دکمه‌ها ---------- */
.social-btn {
  transition: all 0.25s ease;
}
.social-btn:active {
  transform: scale(0.95);
}

/* ---------- progress bar مسیر ---------- */
.order-progress-bar {
  background: linear-gradient(90deg, var(--gold), var(--gold-dark));
}

/* ---------- counter number انیمیشن ---------- */
.stat-number {
  display: inline-block;
}

/* ---------- استایل پاسخگوی پیشرفته برای دکمه‌ها ---------- */
button, .btn, [role="button"] {
  cursor: pointer;
  user-select: none;
}

input[type="checkbox"] {
  accent-color: var(--gold);
  cursor: pointer;
}

select {
  cursor: pointer;
}

/* ---------- استایل hover برای address card ---------- */
.address-option {
  transition: all 0.2s ease;
}

/* ---------- انیمیشن سبد خالی ---------- */
.empty-cart-icon, .empty-favorites-icon, .empty-state-icon {
  animation: float 4s ease-in-out infinite;
}

/* ---------- انیمیشن اسپینر داخلی ---------- */
.spinner, .foneva-loading-spinner {
  border-width: 3px;
}

/* ---------- بهبود hover روی trust badge ---------- */
.trust-badge {
  position: relative;
  overflow: hidden;
}

/* ---------- انیمیشن لوگو ---------- */
.logo {
  position: relative;
}

/* ---------- استایل badge محصولات (شبیه انیمیت) ---------- */
.product-badge {
  transition: all 0.2s ease;
}

/* ---------- گالری محصول ---------- */
.gallery-thumb {
  transition: all 0.2s ease;
}
.gallery-main {
  transition: background 0.3s ease;
}

/* ---------- بخش نظرات ---------- */
.review-item {
  transition: all 0.2s ease;
}
.review-item:hover {
  background: rgba(255,255,255,0.02);
}

.review-submit-btn {
  transition: all 0.25s ease;
}
.review-submit-btn:active {
  transform: scale(0.97);
}

/* ---------- انیمیشن star input ---------- */
.star-input .star {
  transition: all 0.15s ease;
  font-size: 26px;
}
.star-input .star:hover {
  transform: scale(1.2);
}

/* ---------- استایل ریزالت ---------- */
.rating-score {
  font-weight: 700;
}

/* ---------- استایل بخش درباره ما ---------- */
.about-hero {
  position: relative;
  overflow: hidden;
}
.about-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(212,175,55,0.06) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 20%, rgba(212,175,55,0.04) 0%, transparent 50%);
  pointer-events: none;
}

.stat-card {
  transition: all 0.3s ease;
}
.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold) !important;
  box-shadow: var(--shadow-hover);
}
.stat-card:hover .stat-number {
  animation: glow-pulse 1s ease-in-out infinite;
}

/* ---------- انیمیشن team card ---------- */
.team-card {
  transition: all 0.3s ease;
}
.team-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.team-avatar {
  transition: all 0.3s ease;
}
.team-card:hover .team-avatar {
  transform: scale(1.1);
}

/* ---------- انیمیشن value card ---------- */
.value-card {
  transition: all 0.3s ease;
}
.value-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.value-icon {
  transition: transform 0.3s ease;
}
.value-card:hover .value-icon {
  transform: scale(1.15);
}

/* ---------- انیمیشن feature item ---------- */
.feature-item {
  transition: all 0.3s ease;
}
.feature-item:hover {
  border-color: var(--gold) !important;
  transform: translateX(-3px);
}

/* ---------- انیمیشن اطلاعات تماس ---------- */
.info-card {
  transition: all 0.3s ease;
}
.info-card:hover {
  transform: translateX(-3px);
  border-color: var(--gold) !important;
}
.info-icon {
  transition: all 0.3s ease;
}
.info-card:hover .info-icon {
  transform: scale(1.1);
  background: var(--gold) !important;
  color: var(--bg-deep) !important;
}

/* ---------- address card ---------- */
.address-card {
  transition: all 0.3s ease;
}
.address-card:hover {
  border-color: var(--gold) !important;
  box-shadow: var(--shadow-hover);
}

/* ---------- discount card ---------- */
.discount-card {
  transition: all 0.3s ease;
}
.discount-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* ---------- استایل درخت دسته‌بندی ---------- */
.tree-top-btn {
  transition: all 0.2s ease;
}
.tree-child {
  transition: all 0.15s ease;
}

/* ---------- استایل زیردسته ---------- */
.subcat-chip {
  transition: all 0.2s ease;
}
.subcat-chip:hover {
  transform: translateY(-2px);
}

/* ---------- sort select ---------- */
.sort-select {
  transition: all 0.2s ease;
}
.sort-select:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px rgba(212,175,55,0.08);
}

/* ---------- badge cart/علاقه‌مندی ---------- */
.badge {
  transition: all 0.2s ease;
}

/* ---------- سبک لودینگ ---------- */
.foneva-loading-overlay {
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.foneva-loading-spinner {
  border-width: 3px;
}

/* ---------- انیمیشن آیکون modal ---------- */
.foneva-modal-icon {
  transition: all 0.3s ease;
}

/* ---------- استایل hover برای دکمه‌های modal ---------- */
.foneva-modal-btn {
  transition: all 0.25s ease;
}

/* ==========================================================================
   بهبودهای اختصاصی برای صفحه محصول (product.html)
   ========================================================================== */
.product-top {
  transition: all 0.3s ease;
}

.buy-box {
  transition: all 0.3s ease;
  position: relative;
}

.buybox-stock {
  transition: all 0.3s ease;
  animation: fade-up 0.4s ease both;
}

.buybox-notify-form {
  animation: fade-up 0.4s ease both;
}

/* ---------- badge محصول در صفحه محصول ---------- */
.gallery-badge {
  transition: all 0.2s ease;
  animation: gold-pulse 3s ease-in-out infinite;
}

/* ---------- بخش مشخصات ---------- */
.spec-table td {
  transition: background 0.2s ease;
}
.spec-table tr:hover td {
  background: rgba(255,255,255,0.02);
}

/* ---------- بخش توضیحات ---------- */
.desc-text {
  line-height: 2.2;
}

/* ---------- لینک برند ---------- */
.brand-link {
  transition: all 0.2s ease;
}
.brand-link:hover {
  color: var(--gold) !important;
}

/* ---------- استایل سبد خالی در cart ---------- */
.empty-cart-title, .empty-favorites-title {
  color: var(--text-primary) !important;
}

/* ---------- استانواع دکمه social login ---------- */
.social-btn {
  font-size: 24px !important;
}

/* ---------- section overlay محافظ ---------- */
.section-overlay-icon {
  animation: float 4s ease-in-out infinite;
}

/* ---------- انیمیشن blog card ---------- */
.blog-card {
  transition: all 0.3s ease;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.blog-card:hover div:first-child {
  transform: scale(1.05);
}

/* ==========================================================================
   بهبودهای اینپوت و فرم پیشرفته
   ========================================================================== */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 4px rgba(212,175,55,0.08), 0 0 20px rgba(212,175,55,0.03);
  outline: none;
}

/* ---------- استایل hover جدول ---------- */
table tr {
  transition: background 0.15s ease;
}

/* ---------- استایل بخش league (باشگاه مشتریان) ---------- */
.league-hero-card {
  position: relative;
  overflow: hidden;
}
.league-hero-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(212,175,55,0.08) 0%, transparent 60%);
  pointer-events: none;
}

.league-level-card {
  transition: all 0.3s ease;
}
.league-level-card:hover {
  transform: translateX(-3px);
}

.league-perk-item {
  transition: all 0.2s ease;
}
.league-perk-item:hover {
  border-color: var(--gold) !important;
  background: var(--gold-light) !important;
}

.birthday-offer-card {
  transition: all 0.3s ease;
}
.birthday-offer-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* ---------- دکمه پاک کردن همه علاقه‌مندی‌ها ---------- */
.clear-favorites-btn {
  transition: all 0.25s ease;
}

/* ==========================================================================
   بهبود ریسپانسیو - Ultra-small screens (<360px)
   ========================================================================== */
@media (max-width: 359px) {
  .products-grid { grid-template-columns: 1fr 1fr !important; gap: 6px !important; }
  .cats-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .browse-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .header-actions { gap: 2px !important; }
  .header-btn { min-width: 28px !important; padding: 4px !important; }
  .header-btn svg { width: 18px !important; height: 18px !important; }
  .logo { font-size: 16px !important; }
  .section { padding: 12px !important; }
  .product-card { padding: 8px !important; }
  .hero-title { font-size: 18px !important; }
  .hero-subtitle { font-size: 12px !important; }
  .hero-cta { padding: 8px 18px !important; font-size: 12px !important; }
  .topbar-inner { font-size: 10px !important; }
  .topbar-links { gap: 6px !important; }
}

/* ---------- Product page (<1000px) ---------- */
@media (max-width: 1000px) {
  .product-top { grid-template-columns: 1fr !important; }
  .gallery-thumbs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .spec-table { font-size: 12px; }
  .spec-table td:first-child { width: 140px; }
}
@media (max-width: 600px) {
  .product-top { padding: 12px !important; }
  .gallery-main { font-size: 100px; aspect-ratio: 1; }
  .gallery-thumb { width: 48px; height: 48px; font-size: 20px; }
  .product-name { font-size: 16px !important; }
  .buy-box { padding: 14px !important; }
  .buybox-price { font-size: 18px !important; }
  .review-summary { gap: 16px !important; }
  .review-score-num { font-size: 28px !important; }
  .review-form-box { padding: 14px !important; }
  .spec-table td { padding: 8px 6px !important; }
  .spec-table td:first-child { width: 110px; }
  .review-bar-row { font-size: 11px; }
}
@media (max-width: 420px) {
  .product-name { font-size: 14px !important; }
  .rating-row { flex-wrap: wrap; gap: 6px; }
  .info-badges { flex-direction: column; gap: 6px; }
  .info-badge { font-size: 11px; padding: 4px 8px; }
  .buybox-old-price { font-size: 12px; }
  .buybox-discount-badge { font-size: 11px; }
  .buybox-price { font-size: 16px !important; }
  .buybox-price small { font-size: 11px; }
  .variant-chip { padding: 6px 12px; font-size: 12px; }
  .spec-quick-row { font-size: 12px; }
  .review-item-text { font-size: 12px; }
}

/* ---------- Categories page ---------- */
@media (max-width: 640px) {
  .cat-content-head { flex-direction: column; align-items: flex-start !important; }
  .sort-select { width: 100%; }
  .tree-top-btn { padding: 10px 12px !important; font-size: 12px !important; }
  .tree-child { padding: 7px 12px 7px 12px !important; font-size: 12px !important; }
  .subcat-chip { padding: 7px 12px !important; font-size: 12px !important; }
}
@media (max-width: 420px) {
  .browse-card { padding: 16px 10px !important; }
  .browse-card-icon { width: 30px; height: 30px; }
  .browse-card-icon svg { width: 30px; height: 30px; }
  .browse-card-label { font-size: 12px !important; }
}

/* ---------- Cart page ---------- */
@media (max-width: 480px) {
  .cart-item { grid-template-columns: 50px 1fr !important; row-gap: 6px; column-gap: 10px; padding: 10px !important; }
  .item-image { width: 50px; height: 50px; font-size: 28px; }
  .item-name { font-size: 12px !important; }
  .item-price-main { font-size: 14px !important; }
  .item-price-old { font-size: 11px !important; }
  .item-quantity { width: 100%; }
  .qty-input { flex: 1; }
  .item-actions { grid-column: 1/-1; text-align: left; }
  .summary-title { font-size: 14px; }
  .summary-total-value { font-size: 17px !important; }
  .shipping-section { padding: 14px !important; }
  .address-option { padding: 12px !important; }
  .address-option-body { font-size: 12px !important; }
  .discount-code-row { flex-direction: column; }
  .discount-code-row input { width: 100%; }
}

/* ---------- Profile page ---------- */
@media (max-width: 640px) {
  .profile-sidebar .sidebar-user { padding: 14px !important; }
  .sidebar-avatar { width: 44px; height: 44px; font-size: 18px; }
  .sidebar-name { font-size: 13px !important; }
  .panel-title { font-size: 15px !important; }
  .order-card-head { flex-direction: column; align-items: flex-start !important; }
  .order-status { align-self: flex-start; }
  .order-card-foot { flex-direction: column; gap: 6px; align-items: flex-start !important; font-size: 11px; }
  .order-tracking-banner, .order-pending-banner, .order-processing-banner, .order-delivered-banner, .order-cancelled-banner {
    flex-direction: column; text-align: center; font-size: 11px; padding: 8px 12px !important;
  }
  .address-card { padding: 12px !important; }
  .league-hero-card { padding: 24px 16px !important; }
  .league-hero-icon { font-size: 48px !important; }
  .league-hero-name { font-size: 18px !important; }
  .league-level-card { padding: 10px 12px !important; }
  .league-level-icon { font-size: 24px !important; }
  .league-perk-item { padding: 8px 10px !important; }
  .birthday-offer-card { flex-direction: column; text-align: center; }
  .form-grid { grid-template-columns: 1fr !important; }
  .modal-box { max-width: 100% !important; margin: 0 10px; }
  .modal-body { padding: 14px !important; }
}
@media (max-width: 420px) {
  .profile-content { padding: 14px !important; }
  .sidebar-item { font-size: 12px !important; padding: 10px 10px !important; }
}

/* ---------- Contact page ---------- */
@media (max-width: 600px) {
  .contact-form-box { padding: 18px !important; }
  .info-card { padding: 14px !important; }
  .info-icon { width: 36px; height: 36px; font-size: 16px; }
  .info-text strong { font-size: 13px; }
  .info-text span { font-size: 12px; }
  .faq-section { padding: 18px !important; }
  .faq-q { font-size: 13px !important; }
  .faq-a { font-size: 12px !important; }
}
@media (max-width: 420px) {
  .page-title { font-size: 22px !important; }
  .page-subtitle { font-size: 13px !important; }
}

/* ---------- About page ---------- */
@media (max-width: 640px) {
  .about-hero { padding: 24px 16px !important; }
  .about-hero-title { font-size: 24px !important; }
  .about-hero-text { font-size: 13px !important; }
  .about-hero-icon { font-size: 60px !important; }
  .stat-number { font-size: 24px !important; }
  .stat-card { padding: 16px !important; }
  .section { padding: 20px !important; }
  .section-text { font-size: 13px !important; }
  .value-card { padding: 14px !important; }
  .team-card { padding: 16px !important; }
  .team-avatar { width: 56px; height: 56px; font-size: 22px; }
}

/* ---------- Auth page ---------- */
@media (max-width: 420px) {
  .auth-logo { font-size: 26px !important; }
  .auth-subtitle { font-size: 13px !important; }
  .tab-btn { font-size: 13px !important; padding: 11px !important; }
  .social-login { gap: 8px; }
  .social-btn { font-size: 16px !important; padding: 8px !important; }
  .birth-date-row { gap: 4px; }
  .birth-date-row .form-select { font-size: 12px !important; padding: 8px 4px !important; }
}

/* ---------- Favorites page ---------- */
@media (max-width: 480px) {
  .fav-card { padding: 8px !important; }
  .fav-remove-btn { width: 26px; height: 26px; top: 6px; left: 6px; }
  .fav-remove-btn svg { width: 12px; height: 12px; }
  .fav-add-to-cart { font-size: 11px !important; padding: 6px !important; }
  .clear-favorites-btn { font-size: 11px !important; padding: 6px 10px !important; }
}

/* ==========================================================================
   Responsive Fixes — all pages
   ========================================================================== */
@media (max-width: 900px) {
  .header-inner { flex-wrap: wrap; row-gap: 10px; }
  .logo { order: 1; }
  .header-actions { order: 2; margin-right: 0; margin-left: auto; }
  .search-wrap { order: 3; flex: 1 1 100%; max-width: 100%; }
  .hero-grid { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .cats-grid { grid-template-columns: repeat(4, 1fr) !important; }
  .banner-row { grid-template-columns: 1fr !important; }
  .footer-top { grid-template-columns: 1fr 1fr !important; }
  .hero-title { font-size: 26px !important; }
}

@media (max-width: 760px) {
  .header-inner { padding: 10px 12px !important; gap: 8px; }
  .header-btn { font-size: 0 !important; padding: 8px !important; gap: 0 !important; min-width: 36px !important; }
  .header-btn svg { width: 22px !important; height: 22px !important; }
  .search-wrap input { height: 42px !important; font-size: 13px !important; padding: 0 12px 0 44px !important; }
  .search-btn { width: 44px !important; height: 42px !important; }
  .topbar-inner { flex-wrap: wrap; gap: 6px; font-size: 11px; row-gap: 4px; }
  .topbar-links { gap: 10px; flex-wrap: wrap; }
  
  .search-wrap {
    flex: 0 0 auto; width: 44px; max-width: 44px; height: 42px;
    overflow: hidden; transition: width 0.25s ease, max-width 0.25s ease;
  }
  .search-wrap input { opacity: 0; pointer-events: none; transition: opacity 0.15s ease; }
  .search-wrap .search-btn { right: 0; left: auto; border-radius: 50% !important; }
  .search-wrap.ui-search-expanded {
    width: 100%; max-width: 100%; overflow: visible;
  }
  .search-wrap.ui-search-expanded input { opacity: 1; pointer-events: auto; }
  .search-wrap.ui-search-expanded .search-btn { right: auto; left: 0; border-radius: 50% !important; }

  .main-content { padding: 10px !important; }
  .hero-grid { gap: 10px; }
  .hero-banner { padding: 0 !important; min-height: 200px !important; }
  .hero-title { font-size: 22px !important; }
  .hero-subtitle { font-size: 13px !important; }
  .hero-image { align-self: center; font-size: 56px; }
  .hero-image img { max-width: 150px; max-height: 130px; }
  .section { padding: 16px !important; }
  .section-title { font-size: 16px !important; }
  .products-grid { gap: 8px !important; }
  .footer-top { grid-template-columns: 1fr !important; gap: 24px; }
  .trust-badges { flex-wrap: wrap; }
}

@media (max-width: 420px) {
  .header-btn { min-width: 32px !important; padding: 6px !important; }
  .header-btn svg { width: 20px !important; height: 20px !important; }
  .logo { font-size: 19px !important; }
  .products-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .cats-grid, .browse-grid { grid-template-columns: repeat(3, 1fr) !important; }
}

/* ---------- Fix inline grids that don't collapse ---------- */
@media (max-width: 640px) {
  .faq-grid { grid-template-columns: 1fr !important; }
  .blog-grid { grid-template-columns: 1fr !important; }
}

/* ---------- General touch improvements ---------- */
@media (hover: none) and (pointer: coarse) {
  .header-btn, .sidebar-item, .product-card, .cat-card, .brand-chip,
  .mini-banner, .promo-card, .hero-cta, .buybox-cta, .checkout-btn,
  .form-btn, .section-all, .subcat-chip, .tree-top-btn {
    cursor: default !important;
  }
  .product-card:hover, .cat-card:hover, .brand-chip:hover,
  .mini-banner:hover, .promo-card:hover {
    transform: none !important;
  }
  .product-card:active, .cat-card:active { transform: translateY(-1px) !important; }
  input, select, textarea, button { font-size: 16px !important; }
}
@media (max-width: 600px) {
  input, select, textarea { font-size: 16px !important; }
}
