/* ==================================================================
   AlvandBaft — Design System v1
   RTL-first, awwwards-inspired, CSS-variable driven (panel-controlled)
   ================================================================== */

/* ---------- Reset & Tokens ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #2f3fb9;
  --primary-600: #26319b;
  --primary-soft: rgba(47, 63, 185, .10);
  --accent: #f97316;
  --dark: #141a38;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef0f3;
  --text: #101728;
  --text-2: #5a6478;
  --line: #e5e8ee;
  --danger: #e11d48;
  --success: #16a34a;
  --warning: #d97706;
  --info: #2563eb;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-1: 0 1px 2px rgba(11, 17, 32, .05), 0 4px 16px -8px rgba(11, 17, 32, .12);
  --shadow-2: 0 8px 32px -12px rgba(11, 17, 32, .22);
  --shadow-primary: 0 10px 30px -10px rgba(47, 63, 185, .45);
  --header-h: 72px;
  --font: "Vazirmatn", "IRANSansX", "IRANSans", "Segoe UI", Tahoma, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

[data-theme="dark"] {
  --bg: #101739;
  --surface: #141d42;
  --surface-2: #1a2450;
  --text: #e8ecf4;
  --text-2: #93a0b8;
  --line: #26305c;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px -8px rgba(0, 0, 0, .5);
  --shadow-2: 0 12px 40px -12px rgba(0, 0, 0, .65);
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
::selection { background: var(--primary); color: #fff; }

/* numerals stay latin inside prices handled by fa_digits — keep tabular */
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { line-height: 1.4; font-weight: 800; }
.display-1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 900; letter-spacing: -.02em; }
.display-2 { font-size: clamp(1.5rem, 3.4vw, 2.4rem); font-weight: 900; letter-spacing: -.01em; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .8rem; font-weight: 700; color: var(--primary);
  background: var(--primary-soft); border-radius: 999px; padding: .3rem 1rem;
  margin-bottom: 1rem;
}
.muted { color: var(--text-2); }
.small { font-size: .85rem; }

/* ---------- Layout ---------- */
.container { width: min(1240px, 92%); margin-inline: auto; }
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1.5rem; margin-bottom: 2.2rem; flex-wrap: wrap;
}
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.flex { display: flex; gap: 1rem; }
.between { justify-content: space-between; }
.center { align-items: center; }
.wrap { flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .72rem 1.6rem; border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: .95rem; line-height: 1.6;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s, color .2s, border-color .2s;
  white-space: nowrap; user-select: none;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-600)); color: #fff; box-shadow: var(--shadow-primary); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 38px -12px rgba(47, 63, 185, .55); }
.btn-accent { background: var(--accent); color: #1f1300; }
.btn-accent:hover { transform: translateY(-2px); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.btn-dark { background: var(--dark); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { transform: translateY(-2px); }
.btn-sm { padding: .4rem 1rem; font-size: .85rem; }
.btn-lg { padding: .95rem 2.2rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* ---------- Forms ---------- */
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: .45rem; }
.field .hint { font-size: .78rem; color: var(--text-2); margin-top: .35rem; }
.input, .select, .textarea {
  width: 100%; background: var(--surface); color: var(--text);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: .72rem 1rem; font-size: .95rem; transition: border-color .2s, box-shadow .2s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
.textarea { min-height: 110px; resize: vertical; }
.checkbox { display: inline-flex; align-items: center; gap: .55rem; cursor: pointer; font-size: .9rem; }
.checkbox input { width: 1.1rem; height: 1.1rem; accent-color: var(--primary); }

/* ---------- Badges & alerts ---------- */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .75rem; font-weight: 700; border-radius: 999px; padding: .18rem .7rem;
}
.badge-success { background: rgba(22, 163, 74, .12); color: var(--success); }
.badge-danger { background: rgba(225, 29, 72, .1); color: var(--danger); }
.badge-warning { background: rgba(217, 119, 6, .12); color: var(--warning); }
.badge-info { background: rgba(37, 99, 235, .1); color: var(--info); }
.badge-neutral { background: var(--surface-2); color: var(--text-2); }

.alert {
  border-radius: var(--radius-sm); padding: .85rem 1.2rem; margin-bottom: 1rem;
  font-size: .92rem; font-weight: 600; display: flex; gap: .6rem; align-items: center;
  border: 1px solid transparent;
}
.alert-success { background: rgba(22, 163, 74, .1); color: var(--success); border-color: rgba(22, 163, 74, .25); }
.alert-error { background: rgba(225, 29, 72, .08); color: var(--danger); border-color: rgba(225, 29, 72, .25); }
.alert-info { background: var(--primary-soft); color: var(--primary); border-color: rgba(47, 63, 185, .3); }

/* ==================================================================
   HEADER
   ================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: var(--header-h); display: flex; align-items: center; gap: 1.5rem;
}
.brand { display: flex; align-items: center; gap: .7rem; font-weight: 900; font-size: 1.2rem; }
.brand img { height: 38px; width: auto; }
.brand .brand-mark {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #0e9488);
  color: #fff; display: grid; place-items: center; font-size: 1.05rem; font-weight: 900;
  box-shadow: var(--shadow-primary);
}
.main-nav { display: flex; gap: .35rem; margin-inline-start: .5rem; }
.main-nav a {
  padding: .5rem .95rem; border-radius: 999px; font-weight: 600; font-size: .93rem;
  color: var(--text-2); transition: color .2s, background .2s;
}
.main-nav a:hover, .main-nav a.is-active { color: var(--primary); background: var(--primary-soft); }
.header-actions { margin-inline-start: auto; display: flex; align-items: center; gap: .6rem; }

.icon-btn {
  position: relative; width: 44px; height: 44px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  display: grid; place-items: center; transition: border-color .2s, color .2s, transform .2s;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.icon-btn .count {
  position: absolute; top: -6px; inset-inline-end: -6px; min-width: 20px; height: 20px;
  background: var(--accent); color: #1f1300; border-radius: 999px;
  font-size: .7rem; font-weight: 800; display: grid; place-items: center; padding-inline: 4px;
}

.search-form { position: relative; width: min(360px, 30vw); }
.search-form .input { padding-inline-start: 2.8rem; border-radius: 999px; background: var(--surface-2); border-color: transparent; }
.search-form .input:focus { background: var(--surface); }
.search-form svg { position: absolute; inset-inline-start: 1rem; top: 50%; translate: 0 -50%; color: var(--text-2); }

.nav-toggle { display: none; }
.mobile-nav { display:none; }

/* mini cart drawer */
.cart-drawer {
  position: fixed; inset-block: 0; inset-inline-end: 0; width: min(420px, 94vw); z-index: 90;
  background: var(--surface); box-shadow: var(--shadow-2);
  transform: translateX(110%); visibility:hidden; transition: transform .4s var(--ease);
  display: flex; flex-direction: column;
}
[dir="rtl"] .cart-drawer { transform: translateX(-110%); }
.cart-drawer.open { transform: translateX(0); visibility:visible; }
.cart-drawer-head { padding: 1.2rem 1.4rem; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.cart-drawer-body { flex: 1; overflow-y: auto; padding: 1.2rem 1.4rem; display: flex; flex-direction: column; gap: 1rem; }
.cart-drawer-foot { padding: 1.2rem 1.4rem; border-top: 1px solid var(--line); }
.cart-line { display: flex; gap: .9rem; align-items: center; }
.cart-line img { width: 64px; height: 64px; border-radius: var(--radius-sm); object-fit: cover; background: var(--surface-2); }
.cart-line .t { font-weight: 700; font-size: .9rem; }
.cart-line .p { color: var(--primary); font-weight: 800; font-size: .88rem; }

.overlay { position: fixed; inset: 0; background: rgba(8, 12, 24, .5); backdrop-filter: blur(2px); z-index: 80; opacity: 0; pointer-events: none; transition: opacity .3s; }
.overlay.show { opacity: 1; pointer-events: auto; }

/* ==================================================================
   HERO
   ================================================================== */
.hero {
  position: relative; overflow: hidden;
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-bg::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(46rem 24rem at 85% -10%, var(--primary-soft), transparent 65%),
    radial-gradient(34rem 20rem at 8% 110%, rgba(245, 158, 11, .12), transparent 60%);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: radial-gradient(rgba(90, 100, 120, .16) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}
.hero .container { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.hero-title { margin-bottom: 1.1rem; }
.hero-sub { color: var(--text-2); font-size: 1.08rem; max-width: 34rem; margin-bottom: 2rem; }
.hero-cta { display: flex; gap: .9rem; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 2.2rem; margin-top: 2.6rem; flex-wrap: wrap; }
.hero-stat b { font-size: 1.5rem; font-weight: 900; color: var(--primary); display: block; }
.hero-stat span { font-size: .82rem; color: var(--text-2); }
.hero-art {
  position: relative; border-radius: 28px; overflow: hidden;
  box-shadow: var(--shadow-2); aspect-ratio: 4/3.4;
  background: linear-gradient(150deg, var(--primary), #232f8f 55%, var(--dark));
}
.hero-art img { width: 100%; height: 100%; object-fit: cover; opacity: .92; }
.hero-chip {
  position: absolute; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-2);
  padding: .7rem 1.1rem; font-size: .82rem; font-weight: 700; display: flex; gap: .6rem; align-items: center;
  animation: float 5s ease-in-out infinite;
}
.hero-chip.one { top: 1.2rem; inset-inline-start: 1.2rem; }
.hero-chip.two { bottom: 1.4rem; inset-inline-end: 1.2rem; animation-delay: 1.6s; }
@keyframes float { 50% { transform: translateY(-10px); } }

/* ==================================================================
   CARDS / PRODUCTS
   ================================================================== */
.product-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .3s;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-2); border-color: transparent; }
.product-card .thumb { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--surface-2); }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.product-card:hover .thumb img { transform: scale(1.06); }
.product-card .thumb .flags { position: absolute; top: .8rem; inset-inline-start: .8rem; display: flex; flex-direction: column; gap: .4rem; }
.product-card .body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.product-card .cat { font-size: .75rem; color: var(--text-2); font-weight: 600; }
.product-card .title { font-weight: 800; font-size: .98rem; }
.product-card .title a::after { content: ""; position: absolute; inset: 0; }
.product-card .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding-top: .6rem; }
.price-now { color: var(--primary); font-weight: 900; font-size: 1.02rem; }
.price-was { color: var(--text-2); text-decoration: line-through; font-size: .8rem; }
.price-unit { font-size: .72rem; color: var(--text-2); font-weight: 600; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.card-hover:hover { box-shadow: var(--shadow-2); transform: translateY(-3px); }
.card-hover { transition: transform .3s var(--ease), box-shadow .3s var(--ease); }

/* trust strip */
.trust-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.trust-item { display: flex; gap: .9rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; }
.trust-item .ic { width: 46px; height: 46px; border-radius: 14px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex-shrink: 0; }
.trust-item b { font-size: .92rem; display: block; }
.trust-item span { font-size: .78rem; color: var(--text-2); }

/* category circle cards */
.cat-card { text-align: center; padding: 1.4rem .8rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .3s var(--ease), box-shadow .3s; }
.cat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-2); }
.cat-card img { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; margin: 0 auto .8rem; background: var(--surface-2); }
.cat-card b { font-size: .92rem; }

/* ==================================================================
   SHOP
   ================================================================== */
.shop-layout { display: grid; grid-template-columns: 280px 1fr; gap: 2rem; align-items: start; }
.filter-panel { position: sticky; top: calc(var(--header-h) + 1rem); display: flex; flex-direction: column; gap: 1.1rem; }
.filter-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.filter-group h4 { font-size: .9rem; margin-bottom: .8rem; }
.filter-list { display: flex; flex-direction: column; gap: .45rem; }
.filter-list a { display: flex; justify-content: space-between; font-size: .9rem; color: var(--text-2); padding: .3rem .5rem; border-radius: 8px; }
.filter-list a:hover, .filter-list a.is-active { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.shop-toolbar { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.shop-toolbar .sort { margin-inline-start: auto; display: flex; gap: .4rem; }
.shop-toolbar .sort a { padding: .45rem 1rem; border-radius: 999px; font-size: .85rem; font-weight: 600; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); }
.shop-toolbar .sort a.is-active { background: var(--dark); color: #fff; border-color: var(--dark); }

/* pagination */
.pagination { display: flex; gap: .4rem; justify-content: center; margin-top: 2.5rem; }
.pagination a, .pagination span {
  min-width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  font-weight: 700; font-size: .9rem; padding-inline: .7rem;
}
.pagination .current { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .disabled { opacity: .4; }

/* ==================================================================
   PRODUCT PAGE
   ================================================================== */
.product-layout { display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: start; }
.gallery-main { border-radius: 24px; overflow: hidden; background: var(--surface-2); aspect-ratio: 1; border: 1px solid var(--line); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: .6rem; margin-top: .7rem; }
.gallery-thumbs img { aspect-ratio: 1; object-fit: cover; border-radius: 12px; border: 2px solid transparent; cursor: pointer; background: var(--surface-2); transition: border-color .2s; }
.gallery-thumbs img.is-active, .gallery-thumbs img:hover { border-color: var(--primary); }

.buybox { position: sticky; top: calc(var(--header-h) + 1rem); display: flex; flex-direction: column; gap: 1.1rem; }
.buybox .price-row { display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; }
.buybox .price-row .now { font-size: 1.7rem; font-weight: 900; color: var(--primary); }
.spec-table { width: 100%; font-size: .9rem; border-collapse: collapse; }
.spec-table td { padding: .55rem .2rem; border-bottom: 1px dashed var(--line); }
.spec-table td:first-child { color: var(--text-2); width: 40%; }
.size-box { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.qty-box { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty-box button { width: 42px; height: 42px; background: transparent; border: none; font-size: 1.15rem; font-weight: 800; color: var(--primary); }
.qty-box input { width: 52px; text-align: center; border: none; background: transparent; font-weight: 800; font-size: 1rem; color: var(--text); }

.tabs { display: flex; gap: .4rem; border-bottom: 2px solid var(--line); margin-bottom: 1.4rem; overflow-x: auto; }
.tabs button { padding: .7rem 1.4rem; border: none; background: none; font-weight: 700; color: var(--text-2); border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs button.is-active { color: var(--primary); border-color: var(--primary); }

/* ==================================================================
   CART / CHECKOUT / AUTH
   ================================================================== */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { text-align: start; font-size: .8rem; color: var(--text-2); padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
.cart-table td { padding: 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.summary-card { position: sticky; top: calc(var(--header-h) + 1rem); }
.summary-row { display: flex; justify-content: space-between; padding: .55rem 0; font-size: .95rem; }
.summary-row.total { border-top: 2px solid var(--line); margin-top: .6rem; padding-top: 1rem; font-weight: 900; font-size: 1.15rem; color: var(--primary); }

.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 2rem; position: relative; overflow: hidden; }
.auth-wrap::before { content: ""; position: absolute; inset: 0; background: radial-gradient(40rem 22rem at 80% 0%, var(--primary-soft), transparent 60%), radial-gradient(30rem 18rem at 10% 100%, rgba(245, 158, 11, .1), transparent 60%); }
.auth-card { position: relative; width: min(440px, 94vw); background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: 2.4rem; box-shadow: var(--shadow-2); text-align: center; }
.otp-inputs { display: flex; gap: .5rem; direction: ltr; justify-content: center; margin-block: 1.2rem; }
.otp-inputs input {
  width: 52px; height: 58px; text-align: center; font-size: 1.35rem; font-weight: 900;
  border: 2px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
.otp-inputs input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.stepper { display: flex; gap: .5rem; justify-content: center; margin-bottom: 1.6rem; }
.stepper span { width: 34px; height: 5px; border-radius: 99px; background: var(--surface-2); transition: background .3s; }
.stepper span.on { background: var(--primary); }

/* ==================================================================
   ACCOUNT
   ================================================================== */
.account-layout { display: grid; grid-template-columns: 280px 1fr; gap: 2rem; align-items: start; }
.account-nav { position: sticky; top: calc(var(--header-h) + 1rem); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.account-nav .who { padding: 1.4rem; text-align: center; border-bottom: 1px solid var(--line); background: linear-gradient(160deg, var(--primary-soft), transparent); }
.avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; margin: 0 auto .6rem; border: 3px solid var(--surface); box-shadow: var(--shadow-1); background: var(--surface-2); }
.account-nav a { display: flex; align-items: center; gap: .7rem; padding: .85rem 1.4rem; font-weight: 600; font-size: .92rem; color: var(--text-2); border-inline-start: 3px solid transparent; }
.account-nav a:hover { color: var(--primary); background: var(--primary-soft); }
.account-nav a.is-active { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.8rem; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; }
.stat-card b { font-size: 1.45rem; font-weight: 900; display: block; }
.stat-card span { font-size: .8rem; color: var(--text-2); }
.stat-card .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; margin-bottom: .7rem; background: var(--primary-soft); color: var(--primary); }

/* ==================================================================
   FOOTER
   ================================================================== */
.site-footer { background: var(--dark); color: #cbd5e1; margin-top: 4rem; }
.footer-top { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 2.5rem; padding-block: 3.5rem 2.5rem; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.site-footer a { color: #94a3b8; font-size: .9rem; transition: color .2s; display: inline-block; padding-block: .22rem; }
.site-footer a:hover { color: #fff; }
.footer-about { font-size: .9rem; line-height: 2; }
.footer-contact li { display: flex; gap: .6rem; align-items: center; font-size: .88rem; padding-block: .3rem; }
.socials { display: flex; gap: .6rem; margin-top: 1rem; }
.socials a { width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .07); display: grid; place-items: center; transition: background .2s, transform .2s; }
.socials a:hover { background: var(--primary); transform: translateY(-2px); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding-block: 1.3rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; font-size: .82rem; color: #64748b; }
.newsletter-box { display: flex; gap: .5rem; margin-top: 1rem; }
.newsletter-box .input { background: rgba(255, 255, 255, .07); border-color: transparent; color: #fff; }
.newsletter-box .input::placeholder { color: #64748b; }

/* ==================================================================
   ADMIN PANEL
   ================================================================== */
.admin-shell { display: grid; grid-template-columns: 262px 1fr; min-height: 100vh; background: var(--bg); }
.admin-sidebar { background: var(--dark); color: #cbd5e1; position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 1.4rem 1rem; display: flex; flex-direction: column; gap: .3rem; }
.admin-sidebar .side-brand { display: flex; align-items: center; gap: .7rem; color: #fff; font-weight: 900; padding: .4rem .6rem 1.4rem; }
.admin-sidebar .side-label { font-size: .7rem; font-weight: 800; color: #64748b; letter-spacing: .08em; padding: 1rem .8rem .4rem; }
.admin-sidebar a { display: flex; align-items: center; gap: .7rem; padding: .62rem .8rem; border-radius: 12px; font-size: .9rem; font-weight: 600; color: #94a3b8; transition: background .2s, color .2s; }
.admin-sidebar a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.admin-sidebar a.is-active { background: var(--primary); color: #fff; box-shadow: var(--shadow-primary); }
.admin-main { padding: 1.8rem 2.2rem; max-width: 1400px; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; }
.admin-topbar h1 { font-size: 1.35rem; }
.data-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-1); }
.data-table th { text-align: start; font-size: .78rem; color: var(--text-2); background: var(--surface-2); padding: .8rem 1rem; white-space: nowrap; }
.data-table td { padding: .85rem 1rem; border-top: 1px solid var(--line); font-size: .9rem; vertical-align: middle; }
.data-table tr:hover td { background: color-mix(in srgb, var(--primary-soft) 40%, transparent); }
.table-actions { display: flex; gap: .4rem; justify-content: flex-end; }
.switch { position: relative; width: 42px; height: 24px; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--line); transition: .25s; cursor: pointer; }
.switch i::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; top: 3px; inset-inline-start: 3px; transition: .25s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked + i { background: var(--primary); }
.switch input:checked + i::after { transform: translateX(-18px); }

/* settings form */
.settings-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem 1.4rem; }
.settings-grid .full { grid-column: 1 / -1; }
.color-input { display: flex; gap: .7rem; align-items: center; }
.color-input input[type="color"] { width: 52px; height: 42px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 3px; cursor: pointer; }

/* ==================================================================
   MISC
   ================================================================== */
.breadcrumb { display: flex; gap: .5rem; align-items: center; font-size: .83rem; color: var(--text-2); margin-bottom: 1.4rem; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { opacity: .5; }

.empty-state { text-align: center; padding: 4rem 1rem; color: var(--text-2); }
.empty-state .ic { width: 84px; height: 84px; border-radius: 26px; background: var(--surface-2); display: grid; place-items: center; margin: 0 auto 1.2rem; font-size: 2rem; }

.marquee { overflow: hidden; border-block: 1px solid var(--line); background: var(--surface); padding-block: .9rem; }
.marquee-track { display: flex; gap: 3.5rem; white-space: nowrap; animation: marquee 28s linear infinite; width: max-content; }
.marquee-track span { font-weight: 800; font-size: .95rem; color: var(--text-2); display: flex; gap: .6rem; align-items: center; }
@keyframes marquee { to { transform: translateX(50%); } }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* flash messages fixed */
.flash-wrap { position: fixed; top: 1rem; inset-inline-start: 50%; translate: -50% 0; z-index: 200; width: min(480px, 92vw); display: flex; flex-direction: column; gap: .5rem; }
.flash-wrap .alert { box-shadow: var(--shadow-2); margin: 0; animation: slideDown .4s var(--ease); }
@keyframes slideDown { from { opacity: 0; transform: translateY(-14px); } }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .hero .container { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .product-layout { grid-template-columns: 1fr; gap: 2rem; }
  .buybox { position: static; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .trust-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .main-nav, .search-form { display: none; }
  .nav-toggle { display: grid; }
  .mobile-nav {
    position: fixed; inset: 0; z-index: 95; background: var(--surface);
    padding: 5.5rem 1.6rem 2rem; visibility:hidden; transform: translateX(105%); transition: transform .4s var(--ease);
    display: flex; flex-direction: column; gap: .4rem; overflow-y: auto;
  }
  .mobile-nav.open { transform: none; visibility:visible; }
  .mobile-nav a { padding: .9rem 1rem; border-radius: 14px; font-weight: 700; font-size: 1.05rem; }
  .mobile-nav a.is-active { background: var(--primary-soft); color: var(--primary); }
  .shop-layout { grid-template-columns: 1fr; }
  .filter-panel { position: static; }
  .account-layout { grid-template-columns: 1fr; }
  .account-nav { position: static; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: 262px; z-index: 100; transform: translateX(105%); transition: transform .35s var(--ease); }
  .admin-sidebar.open { transform: none; }
  .admin-main { padding: 1.2rem; }
  .settings-grid { grid-template-columns: 1fr; }
  .data-table { display: block; overflow-x: auto; }
}
@media (max-width: 560px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .trust-strip { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .otp-inputs input { width: 44px; height: 52px; }
  .section { padding-block: 2.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Accessibility: skip link (issue #14) ---------- */
.skip-link {
  position: absolute; right: 1rem; top: -999px; z-index: 200;
  background: var(--dark); color: #fff; padding: .6rem 1.1rem;
  border-radius: var(--radius-sm); text-decoration: none;
  transition: top .2s ease;
}
.skip-link:focus-visible, .skip-link:focus {
  top: .6rem; outline: 2px solid var(--accent); outline-offset: 2px;
}

/* ---------- WhatsApp floating button (issue #17) ---------- */
.wa-float {
  position: fixed; bottom: 1.4rem; left: 1.4rem; z-index: 150;
  width: 56px; height: 56px; display: grid; place-items: center;
  background: #25d366; color: #fff; border-radius: 50%;
  box-shadow: 0 8px 24px -6px rgba(37, 211, 102, .6);
  transition: transform .2s ease;
}
.wa-float:hover { transform: scale(1.07); }
.wa-float:focus-visible { outline: 2px solid var(--dark); outline-offset: 3px; }

/* ---------- Trust symbols / enamad (issue #17) ---------- */
.trust-symbols { margin-top: 1rem; display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.trust-symbols img { max-height: 72px; width: auto; }

/* ---------- Footer contact icons alignment ---------- */
.footer-contact li { display: flex; gap: .55rem; align-items: flex-start; }
.footer-contact svg { flex-shrink: 0; margin-top: .15rem; }

/* ---------- Gallery CLS guard (issue #8) ---------- */
.gallery-main img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery-thumbs img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.product-card .thumb img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.hero-art img { width: 100%; height: auto; }
.brand img { height: 40px; width: auto; }

.checkout-layout{display:grid;grid-template-columns:1.2fr .8fr;gap:2rem;align-items:start}button:disabled{opacity:.55;cursor:not-allowed}@media(max-width:760px){.checkout-layout{grid-template-columns:1fr}}

.settings-layout{display:grid;grid-template-columns:250px 1fr;gap:1.5rem;align-items:start}@media(max-width:760px){.settings-layout{grid-template-columns:1fr}}

.site-footer .muted,.footer-bottom{color:#b2bdd0} .mobile-nav [data-close]{position:absolute;top:1rem;left:1rem} .header-actions{flex-wrap:wrap}

.footer-heading{font-size:1.05rem;margin-bottom:1.2rem;color:#fff}

@media(max-width:560px){.header-inner{height:auto;min-height:var(--header-h);padding-block:.8rem;flex-wrap:wrap;gap:.6rem}.header-inner>.brand{font-size:1rem;white-space:nowrap;flex:1}.header-actions{flex-wrap:nowrap;gap:.35rem}.header-actions>.btn{font-size:.75rem;padding:.5rem .65rem}.header-actions>.icon-btn,.header-inner>.nav-toggle{width:34px;height:36px}.brand .brand-mark{flex-shrink:0;width:32px;height:34px}.header-inner>.brand span:last-child{max-width:110px}.header-inner>.nav-toggle{order:0}}
