/*
Theme Name: Alia Solo Store
Author: Trae AI
Description: Modern Arabic WooCommerce theme (landing + store + cart + auth + dark/light).
Version: 1.0.0
Text Domain: alia-solo-store
*/

:root {
  --brand: #1f6f55;
  --brand-2: #d6a74a;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f0f3f7;
  --text: #0f172a;
  --muted: #64748b;
  --border: rgba(15, 23, 42, 0.10);
  --shadow: 0 10px 30px rgba(2, 6, 23, 0.08);
  --shadow-sm: 0 6px 18px rgba(2, 6, 23, 0.08);
  --radius: 18px;
  --radius-sm: 14px;
  --container: 1180px;
  --header-h: 76px;
}

body.theme-dark {
  --bg: #0b1220;
  --surface: #0f172a;
  --surface-2: #111c33;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: rgba(255, 255, 255, 0.10);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 10px 26px rgba(0, 0, 0, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Tajawal", system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  padding-top: var(--header-h);
}
body.rtl { direction: rtl; text-align: right; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.container {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease;
  user-select: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 70%, #000 30%));
  color: #fff;
  box-shadow: 0 14px 32px rgba(31, 111, 85, 0.22);
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost {
  background: color-mix(in srgb, var(--surface) 85%, transparent 15%);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { transform: translateY(-1px); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 80%, transparent 20%);
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 1000;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.70);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
body.theme-dark .site-header {
  background: rgba(15, 23, 42, 0.70);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.brand img { height: 42px; width: auto; object-fit: contain; }
.brand .brand-name {
  display: none;
  font-weight: 900;
  letter-spacing: 0.1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav a {
  font-weight: 800;
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.nav a:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 75%, transparent 25%);
  border-color: var(--border);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--surface) 88%, transparent 12%);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  position: relative;
}
.icon-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.header-cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}
.theme-icon-sun { display: none; }
body.theme-dark .theme-icon-moon { display: none; }
body.theme-dark .theme-icon-sun { display: inline-block; }

.mobile-toggle { display: none; }

.hero {
  padding: 64px 0 40px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 26px;
}
.hero h1 {
  margin: 14px 0 12px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
  font-weight: 900;
}
.hero p {
  margin: 0 0 18px;
  color: var(--muted);
  font-weight: 600;
  font-size: 16px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-card {
  background: radial-gradient(1200px 500px at 20% 10%, rgba(214, 167, 74, 0.18), transparent 55%),
    radial-gradient(1200px 500px at 80% 20%, rgba(31, 111, 85, 0.16), transparent 60%),
    color-mix(in srgb, var(--surface) 92%, transparent 8%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.hero-image {
  border-radius: calc(var(--radius) - 4px);
  overflow: hidden;
  border: 1px solid var(--border);
}

.section { padding: 40px 0; }
.section-title {
  margin: 0;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.1px;
}
.section-sub {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 600;
}

.grid {
  display: grid;
  gap: 14px;
}
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px;
}

.feature {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.feature .ico {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--brand) 12%, transparent 88%);
  color: var(--brand);
  flex: 0 0 auto;
}
.feature h3 { margin: 0 0 4px; font-size: 16px; font-weight: 900; }
.feature p { margin: 0; color: var(--muted); font-weight: 600; font-size: 14px; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 34px 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 16px;
}
.footer-title { margin: 0 0 10px; font-weight: 900; }
.footer-links a { color: var(--muted); font-weight: 700; display: inline-flex; padding: 8px 0; }
.footer-links a:hover { color: var(--text); }
.copyright { margin-top: 18px; color: var(--muted); font-weight: 700; font-size: 13px; }

/* WooCommerce */
.woocommerce ul.products li.product {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 12px;
  transition: transform 160ms ease;
}
.woocommerce ul.products li.product:hover { transform: translateY(-2px); }
.woocommerce ul.products li.product img {
  border-radius: calc(var(--radius) - 6px);
  background: radial-gradient(800px 260px at 30% 15%, rgba(214, 167, 74, 0.18), transparent 55%),
    radial-gradient(800px 260px at 70% 20%, rgba(31, 111, 85, 0.14), transparent 60%),
    var(--surface-2);
  border: 1px solid var(--border);
  padding: 12px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-weight: 900;
  color: var(--text);
  font-size: 15px !important;
}
.woocommerce ul.products li.product .price {
  color: var(--brand);
  font-weight: 900;
}
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
  background: var(--brand) !important;
  color: #fff !important;
  border-radius: 999px !important;
  font-weight: 900 !important;
  padding: 12px 14px !important;
  border: 1px solid transparent !important;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
  background: color-mix(in srgb, var(--brand) 75%, #000 25%) !important;
}

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr; }
  .nav { display: none; position: absolute; top: var(--header-h); left: 16px; right: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow); flex-direction: column; }
  .nav a { width: 100%; justify-content: flex-start; }
  .mobile-toggle { display: inline-flex; }
}
