/* ============================================================
   THEME: Clean Arctic (القطبى النقى)
   White minimalist — Shopify-inspired, clean, trustworthy
   ============================================================ */

/* --- ROOT VARIABLES --- */
.theme-arctic {
  --bg-primary: #f8f9fa;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.8);
  --bg-elevated: #f0f2f5;
  --border-subtle: #e5e7eb;
  --border-glass: rgba(37, 99, 235, 0.08);
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --accent-blue: #2563eb;
  --accent-blue-light: #3b82f6;
  --accent-blue-dim: rgba(37, 99, 235, 0.08);
  --accent-green: #10b981;
  --accent-green-dim: rgba(16, 185, 129, 0.08);
  --accent-red: #ef4444;
  --accent-gold: #d4a017;
  --accent-gold-dim: rgba(212, 160, 23, 0.08);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.08), 0 4px 10px rgba(0, 0, 0, 0.04);
  --shadow-nav: 0 1px 3px rgba(0, 0, 0, 0.04);
  --hero-gradient: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 50%, #f8fafc 100%);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition-fast: 0.15s ease;
  --transition-medium: 0.25s ease;
  --transition-slow: 0.4s ease;
}

/* --- BODY --- */
.theme-arctic body,
body.theme-arctic {
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  transition: background var(--transition-medium), color var(--transition-medium);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- NAV --- */
.theme-arctic nav {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-nav);
  transition: background var(--transition-medium);
}

.theme-arctic nav h1 {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.5px;
}

.theme-arctic nav h1 span {
  color: var(--accent-gold);
}

.theme-arctic nav a {
  color: var(--text-secondary);
  text-decoration: none;
  margin-left: 20px;
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.theme-arctic nav a:hover {
  color: var(--accent-blue);
}

/* --- THEME SWITCHER --- */
.theme-arctic .theme-switcher {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-left: 20px;
}

.theme-arctic .theme-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0;
  outline: none;
}

.theme-arctic .theme-btn:hover {
  transform: scale(1.2);
}

.theme-arctic .theme-btn.active {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.theme-arctic .theme-btn-midnight { background: #0a0a12; border-color: #d4a017; }
.theme-arctic .theme-btn-arctic { background: #f8f9fa; border-color: #2563eb; }
.theme-arctic .theme-btn-neon { background: #ff0055; border-color: #00ff88; }

/* --- HERO SECTION --- */
.theme-arctic .hero {
  background: var(--hero-gradient);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  margin-bottom: 32px;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.theme-arctic .hero h2 {
  font-size: 34px;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.theme-arctic .hero p {
  color: var(--text-secondary);
  font-size: 16px;
}

.theme-arctic .hero .highlight {
  color: var(--accent-gold);
}

/* --- STATS CARDS --- */
.theme-arctic .stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.theme-arctic .stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  transition: all var(--transition-medium);
  box-shadow: var(--shadow-card);
}

.theme-arctic .stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-blue);
}

.theme-arctic .stat-card .num {
  font-size: 30px;
  font-weight: 700;
  color: var(--accent-blue);
}

.theme-arctic .stat-card .label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --- PRODUCT GRID --- */
.theme-arctic .products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

/* --- PRODUCT CARDS --- */
.theme-arctic .product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-medium);
  box-shadow: var(--shadow-card);
}

.theme-arctic .product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-blue);
}

.theme-arctic .product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--bg-elevated);
}

.theme-arctic .product-card .body {
  padding: 16px;
}

.theme-arctic .product-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
  color: var(--text-primary);
}

.theme-arctic .product-card:hover h3 {
  color: var(--accent-blue);
}

.theme-arctic .product-card .price {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-gold);
}

.theme-arctic .product-card .compare {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 8px;
}

.theme-arctic .product-card .category {
  display: inline-block;
  background: var(--accent-blue-dim);
  color: var(--accent-blue);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 4px;
  margin-top: 8px;
  font-weight: 500;
}

.theme-arctic .product-card .stock {
  font-size: 12px;
  color: var(--accent-green);
  font-weight: 500;
  margin-top: 4px;
}

.theme-arctic .product-card .btn {
  display: block;
  background: var(--accent-blue);
  color: #ffffff;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  margin-top: 12px;
  transition: all var(--transition-fast);
}

.theme-arctic .product-card .btn:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* --- PRODUCT DETAIL PAGE --- */
.theme-arctic .product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.theme-arctic .product-detail img {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-medium);
}

.theme-arctic .product-detail img:hover {
  transform: scale(1.015);
}

.theme-arctic .product-detail .product-name {
  font-size: 24px;
  margin: 12px 0 8px;
  color: var(--text-primary);
  font-weight: 700;
}

.theme-arctic .product-detail .product-price {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 8px;
}

.theme-arctic .product-detail .product-description {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
  font-size: 15px;
}

.theme-arctic .product-detail .features-section {
  list-style: none;
  padding: 0;
}

.theme-arctic .product-detail .features-section li {
  padding: 6px 0;
  color: var(--text-primary);
  font-size: 14px;
}

.theme-arctic .product-detail .pipeline-status {
  margin-top: 24px;
  padding: 16px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.theme-arctic .product-detail .pipeline-status h3 {
  font-size: 14px;
  color: var(--accent-gold);
  margin-bottom: 8px;
}

.theme-arctic .product-detail .back-link {
  display: inline-block;
  margin-top: 24px;
  color: var(--accent-blue);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.theme-arctic .product-detail .back-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* --- BUTTONS --- */
.theme-arctic .btn-primary {
  display: inline-block;
  background: var(--accent-blue);
  color: #ffffff;
  padding: 10px 24px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.theme-arctic .btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.theme-arctic .btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--accent-blue);
  padding: 10px 24px;
  border-radius: 8px;
  border: 1px solid var(--accent-blue);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.theme-arctic .btn-secondary:hover {
  background: var(--accent-blue-dim);
  border-color: #1d4ed8;
}

/* --- CATEGORY BADGES --- */
.theme-arctic .category-badge {
  display: inline-block;
  background: var(--accent-blue-dim);
  color: var(--accent-blue);
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 4px;
  font-weight: 500;
}

/* --- FOOTER --- */
.theme-arctic .footer {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
  font-size: 12px;
  border-top: 1px solid var(--border-subtle);
  margin-top: 48px;
}

/* --- DASHBOARD CARDS --- */
.theme-arctic .dashboard-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-medium);
}

.theme-arctic .dashboard-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-blue);
}

.theme-arctic .dashboard-card h3 {
  font-size: 16px;
  margin-bottom: 16px;
  color: var(--text-primary);
  font-weight: 600;
}

.theme-arctic .dashboard-card .item-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.theme-arctic .dashboard-card .item-row:last-child {
  border-bottom: none;
}

/* --- API REFERENCE BOX --- */
.theme-arctic .api-ref {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.theme-arctic .api-ref code {
  display: block;
  font-size: 13px;
  color: var(--accent-green);
}

.theme-arctic .api-ref .comment {
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 8px;
  font-style: italic;
}

/* --- EMPTY STATE --- */
.theme-arctic .empty-state {
  text-align: center;
  padding: 64px 0;
  color: var(--text-muted);
}

.theme-arctic .empty-state code {
  background: var(--bg-elevated);
  padding: 12px 16px;
  border-radius: 8px;
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

/* --- RESPONSIVE --- */
@media (max-width: 600px) {
  .theme-arctic .hero h2 { font-size: 24px; }
  .theme-arctic .products-grid { grid-template-columns: 1fr 1fr; }
  .theme-arctic .product-detail { grid-template-columns: 1fr; }
}
