/* ==========================================================
   Souq Libya — Storefront Demo
   Design tokens + global styles
   ========================================================== */

:root {
  --c-primary: #1F3A8A;       /* deep navy */
  --c-primary-700: #142764;
  --c-accent: #F59E0B;        /* warm gold */
  --c-accent-600: #D97706;
  --c-success: #10B981;
  --c-danger: #DC2626;
  --c-text: #111827;
  --c-text-muted: #6B7280;
  --c-border: #E5E7EB;
  --c-border-strong: #D1D5DB;
  --c-bg: #F9FAFB;
  --c-surface: #FFFFFF;
  --c-soft: #F3F4F6;
  --c-rating: #FB923C;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 22px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.5;
}

html[dir="rtl"] body {
  font-family: 'Cairo', 'Tajawal', 'Segoe UI', sans-serif;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--c-primary); }

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

button {
  font-family: inherit;
  cursor: pointer;
  border: 0;
  background: transparent;
}

/* ===== Layout primitives ===== */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

.row { display: flex; }
.col { flex: 1; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.center { display: flex; align-items: center; justify-content: center; }
.between { display: flex; align-items: center; justify-content: space-between; }

/* ===== Top announcement bar ===== */
.topbar {
  background: var(--c-primary-700);
  color: #fff;
  font-size: 13px;
  padding: 8px 0;
}
.topbar .between { gap: 16px; flex-wrap: wrap; }
.topbar a { opacity: .85; }
.topbar a:hover { opacity: 1; color: #fff; }

/* ===== Main header ===== */
.header {
  background: var(--c-primary);
  color: #fff;
  padding: 12px 0;
}
.header .container {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 22px;
  color: #fff;
}
.brand-mark {
  width: 38px; height: 38px;
  background: var(--c-accent);
  border-radius: 10px;
  display: grid; place-items: center;
  color: #1F3A8A;
  font-weight: 900;
  font-size: 18px;
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
}

.search-bar {
  display: flex;
  background: #fff;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  align-items: stretch;
}
.search-bar select {
  border: 0;
  background: var(--c-soft);
  padding: 0 14px;
  font-size: 14px;
  color: var(--c-text-muted);
  outline: none;
}
.search-bar input {
  flex: 1;
  border: 0;
  padding: 12px 16px;
  font-size: 15px;
  outline: none;
  color: var(--c-text);
  font-family: inherit;
}
.search-bar button {
  background: var(--c-accent);
  color: #1F3A8A;
  font-weight: 700;
  padding: 0 22px;
}
.search-bar button:hover { background: var(--c-accent-600); color: #fff; }

.header-tools {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
}
.header-tools a, .header-tools button {
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cart-pill {
  background: rgba(255,255,255,.12);
  padding: 8px 14px;
  border-radius: 999px;
  position: relative;
}
.cart-count {
  background: var(--c-accent);
  color: #1F3A8A;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
}

.lang-toggle {
  background: rgba(255,255,255,.14);
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
}
.lang-toggle:hover { background: rgba(255,255,255,.22); }

/* ===== Category strip ===== */
.cat-strip {
  background: #fff;
  border-bottom: 1px solid var(--c-border);
  font-size: 14px;
  overflow-x: auto;
}
.cat-strip .container {
  display: flex;
  gap: 22px;
  padding: 12px 16px;
  white-space: nowrap;
}
.cat-strip a {
  color: var(--c-text);
  font-weight: 500;
  padding: 4px 0;
}
.cat-strip a:hover { color: var(--c-primary); }

/* ===== Hero ===== */
.hero {
  margin: 16px 0;
  background: linear-gradient(120deg, #1F3A8A 0%, #312E81 60%, #4F46E5 100%);
  border-radius: var(--r-lg);
  color: #fff;
  padding: 36px 28px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset-inline-end: -60px;
  top: -40px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(245,158,11,.4), transparent 60%);
  pointer-events: none;
}
.hero h1 { margin: 0 0 10px; font-size: 32px; line-height: 1.15; }
.hero p { margin: 0 0 18px; opacity: .9; max-width: 560px; }
.hero .btn { background: var(--c-accent); color: #1F3A8A; font-weight: 700; }
.hero-strip {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin-top: 20px;
}
.hero-card {
  background: rgba(255,255,255,.12);
  padding: 14px 16px;
  border-radius: var(--r-md);
  font-size: 14px;
  border: 1px solid rgba(255,255,255,.18);
}
.hero-card strong { display: block; font-size: 15px; margin-bottom: 4px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  background: var(--c-primary);
  color: #fff;
  transition: background .15s, transform .15s;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
.btn:hover { background: var(--c-primary-700); color: #fff; }
.btn-accent { background: var(--c-accent); color: #1F3A8A; }
.btn-accent:hover { background: var(--c-accent-600); color: #fff; }
.btn-outline { background: transparent; color: var(--c-primary); border: 1px solid var(--c-primary); }
.btn-outline:hover { background: var(--c-primary); color: #fff; }
.btn-danger { background: var(--c-danger); color: #fff; }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 14px 26px; font-size: 16px; }

/* ===== Cards / sections ===== */
.section {
  margin: 28px 0;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.section-head h2 { margin: 0; font-size: 20px; color: var(--c-text); }
.section-head a { color: var(--c-primary); font-weight: 600; font-size: 14px; }

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

/* ===== Category tiles ===== */
.cat-tiles {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
.cat-tile {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 18px 12px;
  text-align: center;
  transition: transform .15s, box-shadow .15s;
}
.cat-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.cat-tile-icon {
  width: 56px; height: 56px;
  margin: 0 auto 10px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 28px;
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
}
.cat-tile-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--c-text);
}

/* ===== Product grid ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.product-card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: box-shadow .15s, transform .15s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.product-img {
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
  display: grid;
  place-items: center;
  font-size: 64px;
  position: relative;
}
.product-badge {
  position: absolute;
  top: 8px;
  inset-inline-start: 8px;
  background: var(--c-danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}
.badge-handmade { background: #047857; }
.badge-libya { background: #DC2626; }
.badge-best { background: #F59E0B; color: #1F3A8A; }
.product-body { padding: 12px; flex: 1; display: flex; flex-direction: column; }
.product-title {
  font-size: 14px;
  color: var(--c-text);
  margin: 0 0 6px;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 38px;
}
.product-vendor {
  font-size: 12px;
  color: var(--c-text-muted);
  margin-bottom: 6px;
}
.product-rating {
  display: flex; align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--c-text-muted);
  margin-bottom: 8px;
}
.stars { color: var(--c-rating); letter-spacing: 1px; }
.product-price {
  font-weight: 700;
  font-size: 17px;
  color: var(--c-text);
}
.product-price .old {
  font-size: 13px;
  color: var(--c-text-muted);
  text-decoration: line-through;
  font-weight: 500;
  margin-inline-start: 6px;
}
.product-cta { margin-top: 10px; }

/* ===== Page-specific ===== */
/* Product Detail Page */
.pdp {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr 1fr;
  gap: 22px;
  margin: 22px 0;
}
.pdp-gallery {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 16px;
}
.pdp-img {
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #F3F4F6, #E5E7EB);
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  font-size: 140px;
}
.thumbs {
  display: flex; gap: 8px; margin-top: 12px;
}
.thumbs > div {
  width: 64px; height: 64px;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, #F3F4F6, #E5E7EB);
  display: grid; place-items: center;
  font-size: 28px;
  border: 2px solid transparent;
  cursor: pointer;
}
.thumbs > div.sel { border-color: var(--c-primary); }

.pdp-info h1 { font-size: 22px; margin: 0 0 8px; line-height: 1.3; }
.pdp-meta { font-size: 13px; color: var(--c-text-muted); margin-bottom: 8px; }
.pdp-rating-row { margin-bottom: 14px; font-size: 14px; }
.price-block {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 14px;
}
.price-now { font-size: 28px; font-weight: 700; color: var(--c-text); }
.price-old { color: var(--c-text-muted); text-decoration: line-through; font-size: 15px; margin-inline-start: 8px; }
.save-pct {
  display: inline-block;
  background: var(--c-danger); color: #fff;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
  margin-inline-start: 8px;
}

.variant-row { margin: 14px 0; }
.variant-row .label { font-size: 13px; color: var(--c-text-muted); margin-bottom: 6px; }
.variant-options { display: flex; gap: 8px; flex-wrap: wrap; }
.variant-options button {
  border: 1px solid var(--c-border-strong);
  background: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}
.variant-options button.sel {
  border-color: var(--c-primary);
  background: #EFF6FF;
  color: var(--c-primary);
  font-weight: 600;
}

.pdp-buy {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 18px;
  align-self: start;
  position: sticky;
  top: 16px;
}
.pdp-buy .deliver-to {
  font-size: 13px;
  color: var(--c-text-muted);
  margin-bottom: 6px;
}
.pdp-buy .eta {
  font-size: 14px;
  color: var(--c-success);
  font-weight: 600;
  margin-bottom: 12px;
}
.pdp-buy .stock {
  font-size: 13px;
  color: var(--c-success);
  margin-bottom: 14px;
}
.pdp-buy .qty {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
.qty-stepper {
  display: inline-flex;
  border: 1px solid var(--c-border-strong);
  border-radius: 6px;
  overflow: hidden;
}
.qty-stepper button {
  width: 32px; height: 32px;
  background: var(--c-soft);
  font-weight: 700;
}
.qty-stepper input {
  width: 40px;
  text-align: center;
  border: 0;
  outline: none;
  font-size: 14px;
}
.pdp-buy .secure-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--c-text-muted);
}
.pdp-buy .secure-list li {
  display: flex; gap: 8px;
  padding: 6px 0;
  border-top: 1px solid var(--c-border);
}

.pdp-tabs {
  margin-top: 30px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
}
.pdp-tabs .tabs {
  display: flex;
  border-bottom: 1px solid var(--c-border);
}
.pdp-tabs .tabs button {
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text-muted);
  border-bottom: 3px solid transparent;
}
.pdp-tabs .tabs button.sel {
  color: var(--c-primary);
  border-bottom-color: var(--c-primary);
}
.pdp-tabs .panel { padding: 22px; }
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.spec-table th {
  text-align: start;
  background: var(--c-soft);
  padding: 10px 14px;
  font-weight: 600;
  width: 180px;
  border-bottom: 1px solid var(--c-border);
}
.spec-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--c-border);
}

/* Reviews */
.review-summary {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  margin-bottom: 22px;
}
.review-big {
  text-align: center;
  background: var(--c-soft);
  border-radius: var(--r-md);
  padding: 20px;
}
.review-big .num { font-size: 48px; font-weight: 700; color: var(--c-text); }
.review-big .stars { font-size: 22px; }
.bar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; }
.bar .label { width: 50px; color: var(--c-text-muted); }
.bar .track { flex: 1; height: 8px; background: var(--c-soft); border-radius: 4px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--c-rating); }
.bar .count { width: 40px; color: var(--c-text-muted); text-align: end; }

.review {
  border-bottom: 1px solid var(--c-border);
  padding: 18px 0;
}
.review-head { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.review-head .avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #DBEAFE, #93C5FD);
  display: grid; place-items: center;
  font-weight: 700; color: var(--c-primary);
}
.review-head .verified {
  background: #ECFDF5;
  color: var(--c-success);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  margin-inline-start: 6px;
}
.review-title { margin: 8px 0 4px; font-weight: 700; font-size: 14px; }
.review-body { font-size: 14px; color: var(--c-text); }

/* ===== Cart ===== */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 22px;
  margin: 22px 0;
}
.cart-list .vendor-group {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  margin-bottom: 14px;
}
.vendor-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--c-border);
  font-size: 14px;
  background: var(--c-soft);
  border-top-left-radius: var(--r-md);
  border-top-right-radius: var(--r-md);
}
.cart-line {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--c-border);
  align-items: center;
}
.cart-line:last-child { border-bottom: 0; }
.cart-line .img {
  width: 96px; height: 96px;
  background: var(--c-soft);
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  font-size: 50px;
}
.cart-line h4 { margin: 0 0 6px; font-size: 14px; }
.cart-line .meta { font-size: 12px; color: var(--c-text-muted); margin-bottom: 8px; }
.cart-line .actions { display: flex; gap: 14px; font-size: 13px; }
.cart-line .actions button { color: var(--c-primary); font-weight: 600; }
.cart-line .price { font-weight: 700; font-size: 16px; }

.summary {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 18px;
  position: sticky;
  top: 16px;
  align-self: start;
}
.summary h3 { margin: 0 0 14px; font-size: 16px; }
.summary-row {
  display: flex; justify-content: space-between;
  font-size: 14px;
  padding: 6px 0;
}
.summary-total {
  display: flex; justify-content: space-between;
  font-size: 18px; font-weight: 700;
  padding: 14px 0 16px;
  border-top: 1px solid var(--c-border);
  margin-top: 8px;
}

/* ===== Checkout ===== */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 22px;
  margin: 22px 0;
}
.checkout-step {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  margin-bottom: 14px;
}
.checkout-step-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--c-border);
  font-size: 16px; font-weight: 600;
}
.step-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
}
.checkout-step-body { padding: 18px; }
.input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.field {
  display: flex; flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--c-text-muted);
}
.field input, .field select, .field textarea {
  padding: 10px 12px;
  border: 1px solid var(--c-border-strong);
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(31,58,138,.1);
}
.pay-options { display: grid; gap: 10px; }
.pay-option {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  cursor: pointer;
}
.pay-option input { margin-top: 4px; }
.pay-option .label { font-weight: 600; font-size: 14px; }
.pay-option .desc { font-size: 12px; color: var(--c-text-muted); }
.pay-option:has(input:checked) {
  border-color: var(--c-primary);
  background: #EFF6FF;
}

/* ===== Auth ===== */
.auth-layout {
  display: grid; place-items: center;
  padding: 40px 16px;
}
.auth-card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 32px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-md);
}
.auth-tabs {
  display: flex; gap: 4px;
  background: var(--c-soft);
  padding: 4px;
  border-radius: 8px;
  margin-bottom: 22px;
}
.auth-tabs button {
  flex: 1;
  padding: 8px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  color: var(--c-text-muted);
}
.auth-tabs button.sel {
  background: #fff;
  color: var(--c-text);
  box-shadow: var(--shadow-sm);
}

/* ===== Account / Dashboards ===== */
.dash-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 22px;
  margin: 22px 0;
}
.dash-side {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 12px;
  height: fit-content;
}
.dash-side a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--c-text);
}
.dash-side a:hover { background: var(--c-soft); }
.dash-side a.sel { background: var(--c-primary); color: #fff; }
.dash-side .group {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--c-text-muted);
  padding: 14px 12px 6px;
  letter-spacing: .04em;
}
.dash-content {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 22px;
}
.dash-content h1 { margin: 0 0 20px; font-size: 22px; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.kpi {
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 14px;
  background: linear-gradient(180deg, #fff 0%, #F9FAFB 100%);
}
.kpi-label { font-size: 12px; color: var(--c-text-muted); text-transform: uppercase; letter-spacing: .03em; }
.kpi-value { font-size: 24px; font-weight: 700; margin: 6px 0 0; }
.kpi-trend { font-size: 12px; margin-top: 4px; }
.kpi-trend.up { color: var(--c-success); }
.kpi-trend.down { color: var(--c-danger); }

.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.tbl th {
  text-align: start;
  padding: 10px 12px;
  background: var(--c-soft);
  font-size: 12px;
  text-transform: uppercase;
  color: var(--c-text-muted);
  letter-spacing: .03em;
  border-bottom: 1px solid var(--c-border);
}
.tbl td {
  padding: 12px;
  border-bottom: 1px solid var(--c-border);
}
.pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.pill-success { background: #ECFDF5; color: #047857; }
.pill-warn { background: #FEF3C7; color: #92400E; }
.pill-info { background: #DBEAFE; color: #1E40AF; }
.pill-danger { background: #FEE2E2; color: #991B1B; }
.pill-muted { background: var(--c-soft); color: var(--c-text-muted); }

/* ===== Banner ===== */
.banner-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}
.mini-banner {
  border-radius: var(--r-md);
  padding: 22px;
  color: #fff;
  position: relative;
  overflow: hidden;
  min-height: 140px;
}
.mini-banner h3 { margin: 0 0 6px; font-size: 18px; }
.mini-banner p { margin: 0 0 12px; opacity: .9; font-size: 13px; }
.mini-banner.bg-1 { background: linear-gradient(135deg, #047857 0%, #10B981 100%); }
.mini-banner.bg-2 { background: linear-gradient(135deg, #BE185D 0%, #EC4899 100%); }
.mini-banner.bg-3 { background: linear-gradient(135deg, #B45309 0%, #F59E0B 100%); }

/* ===== Footer ===== */
.footer {
  background: #1F3A8A;
  color: #fff;
  margin-top: 48px;
  padding: 36px 0 16px;
  font-size: 14px;
}
.footer .container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 22px;
}
.footer h4 { margin: 0 0 12px; font-size: 14px; opacity: .85; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 8px; opacity: .8; }
.footer li a:hover { opacity: 1; color: var(--c-accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  margin-top: 24px;
  padding-top: 16px;
  text-align: center;
  font-size: 12px;
  opacity: .7;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 22px;
  inset-inline-end: 22px;
  background: #111827;
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 100;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); }
  .cat-tiles { grid-template-columns: repeat(4, 1fr); }
  .pdp { grid-template-columns: 1fr; }
  .pdp-buy { position: static; }
  .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
  .dash-layout { grid-template-columns: 1fr; }
  .footer .container { grid-template-columns: 1fr 1fr; }
  .banner-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-tiles { grid-template-columns: repeat(3, 1fr); }
  .header .container { grid-template-columns: 1fr; }
  .header-tools { justify-content: center; }
  .hero h1 { font-size: 22px; }
  .hero-strip { grid-template-columns: 1fr; }
  .review-summary { grid-template-columns: 1fr; }
  .input-grid { grid-template-columns: 1fr; }
  .footer .container { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
}

/* ===== RTL adjustments ===== */
html[dir="rtl"] .stars { letter-spacing: 0; direction: ltr; display: inline-block; }
html[dir="rtl"] .price-old, html[dir="rtl"] .product-price .old { direction: ltr; }
