/* ========================================
   CSS Custom Properties (Design Tokens)
   ======================================== */
:root {
  --royal-jade: #4A7856;
  --dark-jade: #2E5D34;
  --light-jade: #6A9F7E;
  --jade-lighter: #e8f4f5;
  
  --gold: #C9A24D;
  --gold-soft: #D6B35A;
  --dark-gold: #B8933A;
  
  --royal-purple: #5D3A6C;
  --royal-bg: #F8F5F0;
  
  --text-dark: #1A1A1A;
  --text-light: #FFFFFF;
  --text-muted: #6b7280;
  
  --shadow-royal: 0 4px 20px rgba(74, 120, 86, 0.15);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
  
  --radius-xl: 20px;
  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 6px;
  --radius-full: 9999px;
  
  --space-3xl: 48px;
  --space-2xl: 40px;
  --space-xl: 32px;
  --space-lg: 24px;
  --space-md: 16px;
  --space-sm: 12px;
  --space-xs: 8px;
  --space-2xs: 4px;
}

/* ========================================
   Reset & Base
   ======================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: 'Vazirmatn', 'Noto Naskh Arabic', sans-serif;
  background: var(--royal-bg);
  color: var(--text-dark);
  line-height: 1.8;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.8) 0%, transparent 20%),
    radial-gradient(circle at 90% 80%, rgba(74, 120, 86, 0.1) 0%, transparent 20%);
}

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ========================================
   Header - ساختار ۳ ردیفه
   ======================================== */
.site-header {
  background: linear-gradient(135deg, var(--dark-jade) 0%, var(--royal-jade) 50%, var(--light-jade) 100%);
  color: var(--text-light);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
  border-bottom: 2px solid var(--gold);
}

.header-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.header-row--top {
  padding: var(--space-sm) 0;
  justify-content: space-between;
  position: relative;
}

.header-row--search {
  padding: 0 0 var(--space-sm) 0;
  display: flex;
}

.header-row--nav {
  padding: var(--space-xs) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
}

/* ========================================
   Hamburger Menu Button
   ======================================== */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-xs);
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10;
}

.hamburger-line {
  width: 22px;
  height: 2px;
  background: var(--text-light);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================================
   Logo - با انیمیشن fade in/out مجزا
   ======================================== */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  cursor: pointer;
  transition: opacity 0.3s ease;
  width: 220px;
  height: 54px;
}

.logo:hover {
  opacity: 0.9;
}

.logo-icon-wrapper {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon {
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo:hover .logo-icon {
  transform: translateY(-2px) scale(1.05);
  filter: drop-shadow(0 6px 15px rgba(201, 162, 77, 0.6));
}

.logo-text-wrapper {
  position: relative;
  width: 160px;
  height: 44px;
  overflow: hidden;
}

.logo-text-slider {
  position: absolute;
  top: 0;
  right: 0;
  height: 56px;
}

.logo-main-item {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(45deg, #FFD700, #C9A24D, #D4AF37);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  line-height: 1.2;
  white-space: nowrap;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  opacity: 0;
}

.logo-main-item--brand {
  animation: logoFadeBrand 8s ease-in-out infinite;
}

.logo-main-item--full {
  font-size: 1rem;
  animation: logoFadeFull 8s ease-in-out infinite;
}

.logo-subtitle {
  position: absolute;
  bottom: 0;
  right: 0;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.9);
  font-family: 'Noto Naskh Arabic', serif;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

@keyframes logoFadeBrand {
  0% { opacity: 0; }
  10% { opacity: 1; }
  35% { opacity: 1; }
  45% { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes logoFadeFull {
  0% { opacity: 0; }
  45% { opacity: 0; }
  55% { opacity: 1; }
  80% { opacity: 1; }
  90% { opacity: 0; }
  100% { opacity: 0; }
}

/* ========================================
   Gold Price Badge
   ======================================== */
.gold-price-badge {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(212, 175, 55, 0.3);
  white-space: nowrap;
  transition: all 0.3s ease;
  flex-shrink: 0;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.gold-price-badge:hover {
  background: rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 215, 0, 0.6);
}

.gold-price-label {
  font-size: 0.65rem;
  font-weight: 500;
  opacity: 0.7;
  letter-spacing: 0.5px;
}

.gold-price-value {
  font-size: 1rem;
  font-weight: 800;
  color: #FFD700;
  direction: ltr;
  letter-spacing: 0.5px;
  text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
  transition: all 0.3s ease;
}

.gold-price-unit {
  font-size: 0.6rem;
  opacity: 0.6;
  font-weight: 400;
  margin-right: 3px;
}

/* ========================================
   Header Actions
   ======================================== */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex-shrink: 0;
}

.action-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--text-light);
  transition: all 0.2s ease;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.action-btn--search {
  display: none;
}

.cart-count,
.cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--gold);
  color: var(--dark-jade);
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 2px solid var(--dark-jade);
}

/* ========================================
   Search Bar
   ======================================== */
.header-search-wrapper {
  flex: 1;
  position: relative;
}

.header-search-input {
  width: 100%;
  padding: 10px 18px;
  padding-left: 45px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.header-search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.header-search-input:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 15px rgba(201, 162, 77, 0.3);
}

.header-search-submit {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-2xs);
  border-radius: 50%;
  transition: all 0.2s ease;
  display: flex;
}

.header-search-submit:hover {
  color: var(--gold);
}

/* ========================================
   Search Results Dropdown
   ======================================== */
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  display: none;
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid rgba(201, 162, 77, 0.2);
}

.search-section {
  padding: var(--space-sm);
  border-bottom: 1px solid #f0f0f0;
}

.search-section:last-child {
  border-bottom: none;
}

.search-section-title {
  font-size: 0.8rem;
  color: var(--royal-jade);
  font-weight: 700;
  padding: var(--space-xs) var(--space-sm);
  background: #f8f8f8;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: var(--space-sm);
  text-decoration: none;
  color: #333;
  transition: all 0.2s;
  border-radius: var(--radius-lg);
  margin-bottom: 2px;
}

.search-item:hover {
  background: #f5f5f5;
  transform: translateX(-4px);
}

.search-item-img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, #f0f0f0, #e8e8e8);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

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

.search-item-img span {
  font-size: 1.6rem;
}

.search-item-info {
  flex: 1;
  min-width: 0;
}

.search-item-title {
  font-weight: 600;
  color: var(--dark-jade);
  margin-bottom: 2px;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-item-type {
  font-size: 0.7rem;
  color: #aaa;
  display: flex;
  align-items: center;
  gap: 4px;
}

.search-loading {
  text-align: center;
  padding: 30px;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.search-loading::before {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid var(--gold);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.search-empty {
  text-align: center;
  padding: 30px;
  color: #999;
  font-size: 0.9rem;
}

/* ========================================
   Desktop Navigation
   ======================================== */
.nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  color: rgba(255, 255, 255, 0.9);
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFD700;
}

.nav-link.active {
  background: rgba(255, 215, 0, 0.15);
  color: #FFD700;
}

.nav-item--dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--royal-jade);
  min-width: 200px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 100;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  padding: var(--space-xs) 0;
}

.nav-item--dropdown:hover .dropdown-menu {
  display: block;
  animation: fadeInDown 0.3s ease;
}

.dropdown-link {
  display: block;
  padding: 10px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.9);
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.dropdown-link:last-child {
  border-bottom: none;
}

.dropdown-link:hover {
  background: var(--light-jade);
  color: var(--gold);
  padding-right: 24px;
}

.dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: var(--space-2xs) 0;
}

/* ========================================
   Mobile Navigation
   ======================================== */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav {
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  height: 100vh;
  height: 100dvh;
  background: white;
  z-index: 1002;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
}

.mobile-nav.active {
  right: 0;
}

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  background: linear-gradient(135deg, var(--dark-jade), var(--royal-jade));
  color: white;
}

.mobile-nav-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  font-size: 1.3rem;
  cursor: pointer;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-nav-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.mobile-nav-list {
  flex: 1;
  padding: var(--space-sm) 0;
}

.mobile-nav-link {
  display: block;
  padding: 12px 20px;
  font-weight: 500;
  font-size: 0.95rem;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.2s ease;
}

.mobile-nav-link:hover {
  background: #f8f8f8;
  color: var(--dark-jade);
  padding-right: 24px;
}

.mobile-nav-link--parent {
  font-weight: 600;
  color: var(--dark-jade);
}

.mobile-subnav {
  display: none;
  padding: 0 20px var(--space-xs) 0;
  background: #fafafa;
}

.mobile-subnav a {
  display: block;
  padding: 8px 15px;
  font-size: 0.85rem;
  color: #666;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.mobile-subnav a:hover {
  background: var(--royal-bg);
  color: var(--dark-jade);
}

.mobile-nav-footer {
  padding: var(--space-lg);
  border-top: 1px solid #eee;
  text-align: center;
  background: #fafafa;
}

.mobile-nav-phone {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--dark-jade);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ========================================
   Cart Sidebar
   ======================================== */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  left: -400px;
  width: 380px;
  height: 100vh;
  background: linear-gradient(145deg, #fff9f0, #fff);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
  z-index: 1001;
  transition: left 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  border-left: 3px solid var(--gold);
}

.cart-sidebar.active {
  left: 0;
}

.cart-sidebar-header {
  padding: 25px 20px;
  background: linear-gradient(145deg, var(--dark-jade), var(--royal-jade));
  color: white;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  border-bottom: 3px solid var(--gold);
}

.cart-sidebar-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 1.2rem;
  font-weight: 700;
}

.cart-sidebar-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cart-sidebar-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.cart-timer {
  text-align: center;
  padding: 8px 12px;
  background: linear-gradient(145deg, #fff3e0, #ffe4cc);
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark-jade);
  border: 1px solid var(--gold-soft);
  box-shadow: 0 2px 8px rgba(201, 162, 77, 0.2);
  animation: pulse 2s infinite;
}

.cart-timer.expired {
  background: linear-gradient(145deg, #ffe0e0, #ffcccc);
  color: #c0392b;
  border-color: #c0392b;
  animation: none;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

.cart-sidebar-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.cart-item {
  display: flex;
  gap: 15px;
  padding: 15px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(201, 162, 77, 0.2);
  transition: all 0.3s ease;
  position: relative;
  animation: slideIn 0.3s ease;
}

.cart-item:hover {
  box-shadow: 0 8px 25px rgba(74, 120, 86, 0.1);
  border-color: var(--gold);
}

.cart-item-image {
  width: 70px;
  height: 70px;
  border-radius: 12px;
  background: linear-gradient(145deg, #f0f0f0, #e0e0e0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  border: 2px solid var(--gold-soft);
  overflow: hidden;
  flex-shrink: 0;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.cart-item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.cart-item-name {
  font-weight: 700;
  color: var(--dark-jade);
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quantity-control {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(74, 120, 86, 0.05);
  border-radius: 30px;
  padding: 4px;
}

.quantity-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: white;
  color: var(--dark-jade);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.quantity-btn:hover {
  background: var(--gold);
  color: var(--dark-jade);
  transform: scale(1.05);
}

.quantity-number {
  font-weight: 700;
  color: var(--dark-jade);
  min-width: 30px;
  text-align: center;
}

.remove-item-btn {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1.2rem;
  padding: 5px;
}

.remove-item-btn:hover {
  color: #c0392b;
  transform: scale(1.1);
}

.cart-empty-state {
  text-align: center;
  padding: 50px 20px;
}

.cart-empty-state .empty-icon {
  font-size: 4rem;
  margin-bottom: 15px;
  animation: gentleFloat 3s infinite ease-in-out;
}

@keyframes gentleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.cart-empty-state p {
  color: #666;
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.cart-empty-state .empty-sub {
  font-size: 0.9rem;
  color: #999;
}

.cart-sidebar-footer {
  padding: 20px;
  border-top: 2px solid rgba(201, 162, 77, 0.2);
  background: rgba(255, 255, 255, 0.95);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  font-size: 1.1rem;
  color: var(--dark-jade);
  font-weight: 600;
}

.cart-total-price {
  font-size: 1.3rem;
  color: var(--gold);
  font-weight: 700;
}

.cart-actions {
  display: flex;
  gap: 10px;
}

.btn-clear-cart {
  flex: 1;
  padding: 12px;
  border: 2px solid rgba(192, 57, 43, 0.2);
  background: white;
  color: #c0392b;
  border-radius: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-clear-cart:hover {
  background: #c0392b;
  color: white;
  border-color: #c0392b;
}

.btn-checkout {
  flex: 2;
  padding: 12px;
  background: linear-gradient(145deg, var(--royal-jade), var(--dark-jade));
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-checkout:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(74, 120, 86, 0.3);
}

.cart-loading {
  text-align: center;
  padding: 30px;
}

.cart-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(201, 162, 77, 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ========================================
   Cart Sidebar - Responsive
   ======================================== */
@media (max-width: 991px) {
  .cart-sidebar {
    width: 340px;
    left: -340px;
  }
  
  .cart-item-image {
    width: 60px;
    height: 60px;
    font-size: 1.6rem;
  }
  
  .cart-item-name {
    font-size: 0.9rem;
  }
  
  .cart-sidebar-header {
    padding: 20px 16px;
  }
  
  .cart-sidebar-items {
    padding: 15px;
    gap: 12px;
  }
  
  .cart-sidebar-footer {
    padding: 15px;
  }
}

@media (max-width: 767px) {
  .cart-sidebar {
    width: 100%;
    left: -100%;
    border-left: none;
  }
  
  .cart-sidebar.active {
    left: 0;
  }
  
  .cart-item {
    padding: 12px;
    gap: 12px;
  }
  
  .cart-item-image {
    width: 55px;
    height: 55px;
    font-size: 1.4rem;
  }
  
  .cart-item-name {
    font-size: 0.85rem;
  }
  
  .cart-sidebar-title {
    font-size: 1.1rem;
  }
  
  .cart-total {
    font-size: 1rem;
  }
  
  .cart-total-price {
    font-size: 1.1rem;
  }
  
  .quantity-btn {
    width: 26px;
    height: 26px;
  }
  
  .quantity-number {
    min-width: 25px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .cart-actions {
    flex-direction: column;
  }
  
  .btn-clear-cart,
  .btn-checkout {
    width: 100%;
    padding: 14px;
  }
  
  .cart-sidebar-header {
    padding: 16px 12px;
  }
  
  .cart-sidebar-items {
    padding: 10px;
    gap: 10px;
  }
  
  .cart-sidebar-footer {
    padding: 12px;
  }
  
  .cart-item {
    padding: 10px;
    gap: 10px;
  }
  
  .cart-item-image {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
  }
  
  .cart-empty-state {
    padding: 30px 15px;
  }
  
  .cart-empty-state .empty-icon {
    font-size: 3rem;
  }
}

/* ========================================
   Main Content
   ======================================== */
.site-main {
  flex: 1 0 auto;
  padding: var(--space-xl) 0;
  width: 100%;
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
  background: linear-gradient(135deg, var(--dark-jade) 0%, var(--royal-jade) 100%);
  color: var(--text-light);
  padding: var(--space-2xl) 0 var(--space-md);
  border-top: 3px solid var(--gold);
  position: relative;
  width: 100%;
  flex-shrink: 0;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-section {
  padding: var(--space-xs);
}

.footer-title {
  font-size: 1.1rem;
  margin-bottom: var(--space-md);
  color: var(--gold);
  font-weight: 600;
  position: relative;
  padding-bottom: 8px;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 40px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

.footer-desc {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.8;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 4px;
  padding-right: 12px;
  position: relative;
}

.footer-links li::before {
  content: '›';
  position: absolute;
  right: 0;
  color: var(--gold);
  font-weight: bold;
}

.footer-link {
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
  font-size: 0.85rem;
}

.footer-link:hover {
  color: var(--gold);
  padding-right: 4px;
}

.footer-social {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  transition: all 0.3s ease;
}

.footer-social-link:hover {
  background: var(--gold);
  color: var(--dark-jade);
  transform: translateY(-3px);
}

.footer-contact {
  list-style: none;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.8;
}

.footer-contact-icon {
  flex-shrink: 0;
  width: 20px;
  text-align: center;
  margin-top: 2px;
}

.footer-contact-item a {
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.3s ease;
}

.footer-contact-item a:hover {
  color: var(--gold);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
}

.footer-copyright {
  color: rgba(255, 255, 255, 0.7);
}

.footer-policy {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.footer-policy a {
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.3s ease;
}

.footer-policy a:hover {
  color: var(--gold);
}

.divider {
  color: rgba(255, 255, 255, 0.3);
}

/* ========================================
   404 Page
   ======================================== */
.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
}

.error-page__icon {
  margin-bottom: var(--space-xl);
}

.error-page__title {
  font-size: 1.8rem;
  color: var(--dark-jade);
  margin-bottom: var(--space-md);
}

.error-page__description {
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
}

.error-page__actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
}

.btn--primary {
  background: var(--gold);
  color: var(--dark-jade);
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-weight: 600;
  display: inline-block;
}

.btn--secondary {
  background: var(--dark-jade);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-weight: 600;
  display: inline-block;
}

/* ========================================
   Full-width Page Override
   ======================================== */
.site-main--full {
  padding: 0;
}

.site-main--full > .container {
  max-width: 100%;
  padding: 0;
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ========================================
   Responsive - Tablet (768px - 991px)
   ======================================== */
@media (max-width: 991px) {
  .container {
    padding: 0 var(--space-sm);
  }
  
  .logo {
    width: 200px;
  }
  
  .logo-text-wrapper {
    width: 140px;
  }
  
  .logo-main-item {
    font-size: 1.4rem;
    height: 26px;
  }
  
  .logo-main-item--full {
    font-size: 0.9rem;
    height: 26px;
  }
  
  .gold-price-badge {
    padding: 5px 12px;
  }
  
  .gold-price-value {
    font-size: 0.9rem;
  }
  
  .nav-link {
    padding: 6px 10px;
    font-size: 0.85rem;
  }
  
  .footer-inner {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }
}

/* ========================================
   Responsive - Mobile (تا 767px)
   ======================================== */
@media (max-width: 767px) {
  .container {
    padding: 0 var(--space-sm);
  }
  
  .hamburger {
    display: flex;
  }
  
  .action-btn--search {
    display: flex;
  }
  
  .header-row--search {
    display: none;
  }
  
  .header-row--nav {
    display: none;
  }
  
  .header-row--top {
    padding: var(--space-xs) 0;
    gap: var(--space-xs);
    flex-wrap: nowrap;
    justify-content: flex-start;
  }
  
  .gold-price-badge {
    position: static;
    transform: none;
    margin: 0 auto;
    padding: 4px 8px;
    gap: 3px;
  }
  
  .gold-price-label {
    display: none;
  }
  
  .gold-price-value {
    font-size: 0.8rem;
  }
  
  .gold-price-unit {
    font-size: 0.55rem;
  }
  
  .logo {
    width: auto;
    height: 44px;
    flex-shrink: 1;
    min-width: 0;
  }
  
  .logo-icon-wrapper {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
  }
  
  .logo-icon {
    width: 34px;
    height: 34px;
  }
  
  .logo-text-wrapper {
    width: auto;
    height: 34px;
    min-width: 0;
  }
  
  .logo-text-slider {
    height: 44px;
  }
  
  .logo-main-item {
    font-size: 1.1rem;
    height: 22px;
  }
  
  .logo-main-item--full {
    font-size: 0.7rem;
    height: 22px;
  }
  
  .logo-subtitle {
    font-size: 0.5rem;
  }
  
  .header-actions {
    gap: 4px;
    flex-shrink: 0;
    margin-right: auto;
  }
  
  .action-btn {
    width: 34px;
    height: 34px;
  }
  
  .action-btn svg {
    width: 18px;
    height: 18px;
  }
  
  .cart-count,
  .cart-badge {
    min-width: 16px;
    height: 16px;
    font-size: 0.55rem;
    top: -1px;
    right: -1px;
  }
  
  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    text-align: center;
  }
  
  .footer-title::after {
    right: 50%;
    transform: translateX(50%);
  }
  
  .footer-links li {
    padding-right: 0;
  }
  
  .footer-links li::before {
    display: none;
  }
  
  .footer-social {
    justify-content: center;
  }
  
  .footer-contact-item {
    justify-content: center;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }
  
  .footer-policy {
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* ========================================
   Responsive - Small Mobile (تا 400px)
   ======================================== */
@media (max-width: 400px) {
  .logo {
    width: auto;
  }
  
  .logo-text-wrapper {
    display: none;
  }
  
  .gold-price-badge {
    padding: 3px 6px;
  }
  
  .gold-price-value {
    font-size: 0.75rem;
  }
  
  .action-btn {
    width: 30px;
    height: 30px;
  }
  
  .action-btn svg {
    width: 16px;
    height: 16px;
  }
}

.cart-item-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed rgba(0,0,0,0.06);
}

.cart-item-unit-price {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.cart-item-total-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--royal-jade);
}
.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.cart-item-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--royal-jade);
    white-space: nowrap;
    margin-right: auto;
}

/* ── Confirm Dialog ── */
.cart-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.cart-confirm-overlay.active { opacity: 1; }

.cart-confirm-box {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    text-align: center;
    max-width: 380px;
    width: 90%;
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
}

.cart-confirm-icon { font-size: 3rem; margin-bottom: var(--space-sm); }

.cart-confirm-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark-jade);
    margin-bottom: var(--space-xs);
}

.cart-confirm-message {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: var(--space-lg);
}

.cart-confirm-actions {
    display: flex;
    gap: var(--space-sm);
}

.cart-confirm-btn {
    flex: 1;
    padding: 12px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: all 0.3s;
}

.cart-confirm-btn--cancel {
    background: #f3f4f6;
    color: var(--text-muted);
}

.cart-confirm-btn--cancel:hover { background: #e5e7eb; }

.cart-confirm-btn--confirm {
    background: #dc2626;
    color: white;
}

.cart-confirm-btn--confirm:hover { background: #b91c1c; }

/* ── Cart Item Actions ── */
.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.cart-item-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--royal-jade);
    white-space: nowrap;
    margin: 4px 0;
}

.remove-item-btn {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px 8px;
    border-radius: 50%;
    transition: all 0.2s;
}

.remove-item-btn:hover {
    color: #dc2626;
    background: rgba(220,38,38,0.06);
}