/* ============================================================
   TECHSTOP · THE MACHINE SHOP
   Restrained technical dark world: anodized panels, hairline
   borders, machined radii, instrument lettering. Monochrome
   steel by default with semantic states; dark + light themes.
   Fonts: JetBrains Mono (UI), Orbitron (wordmark), Cairo (Arabic).
   ============================================================ */

:root {
  --bg-primary: #0a0c0e;
  --bg-secondary: #0e1114;
  --bg-card: #14171b;
  --bg-card-hover: #1a1e23;
  --bg-input: #0c0f12;
  --border: #24282d;
  --border-strong: #4a525b;
  --border-active: #e8eaed;
  --text-primary: #e8eaed;
  --text-secondary: #9aa4ad;
  --text-muted: #78828c;
  --accent: #e8eaed;
  --accent-glow: rgba(232, 234, 237, 0.05);
  --used: #8a939c;
  --used-glow: rgba(138, 147, 156, 0.1);
  --danger: #e05b5b;
  --danger-glow: rgba(224, 91, 91, 0.12);
  --success: #e8eaed;
  --success-glow: rgba(232, 234, 237, 0.08);
  --warning: #d9c488;
  --warning-glow: rgba(217, 196, 136, 0.1);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --shadow-card: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 28px rgba(0, 0, 0, 0.22);
  --shadow-pop: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 12px 40px rgba(0, 0, 0, 0.45);

  --surface: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.02));
}

[data-theme="light"] {
  --bg-primary: #e9e7e2;
  --bg-secondary: #e0ded7;
  --bg-card: #f4f2ed;
  --bg-card-hover: #faf9f4;
  --bg-input: #ebe9e2;
  --border: #cfccc4;
  --border-strong: #b3afa5;
  --border-active: #262a2f;
  --text-primary: #1f2328;
  --text-secondary: #4f555d;
  --text-muted: #5c646d;
  --accent: #262a2f;
  --accent-glow: rgba(0, 0, 0, 0.05);
  --used: #5d666e;
  --used-glow: rgba(93, 102, 110, 0.12);
  --danger: #b3433f;
  --danger-glow: rgba(179, 67, 63, 0.1);
  --success: #262a2f;
  --success-glow: rgba(38, 42, 47, 0.08);
  --warning: #806228;
  --warning-glow: rgba(128, 98, 40, 0.12);

  --shadow-card: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 1px 2px rgba(0, 0, 0, 0.08), 0 10px 28px rgba(0, 0, 0, 0.08);
  --shadow-pop: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 12px 40px rgba(0, 0, 0, 0.14);

  --surface: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(0, 0, 0, 0.015));
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 17px; -webkit-font-smoothing: antialiased; }

body {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.7;
  min-height: 100vh;
}
[lang="ar"] body,
[lang="ar"] input,
[lang="ar"] select,
[lang="ar"] textarea,
[lang="ar"] button {
  font-family: 'Cairo', sans-serif;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font: inherit; }
input, select, textarea {
  font: inherit;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--border-active); }
img { max-width: 100%; display: block; }

:focus-visible { outline: 2px solid var(--border-active); outline-offset: 2px; border-radius: var(--radius-sm); }

::selection { background: var(--text-primary); color: var(--bg-primary); }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--radius-pill); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ---- Animations ---- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes fadeInOut { 0% { opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes bootSlide { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@keyframes bootPulse {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 var(--accent-glow); }
  50% { opacity: 0.85; transform: scale(0.97); box-shadow: 0 0 44px 10px var(--accent-glow); }
}
@keyframes spin { to { transform: rotate(360deg); } }

.layout { display: flex; flex-direction: column; min-height: 100vh; animation: fadeIn 0.3s ease; }
.layout-main { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 32px 24px; }

.stagger > * { animation: slideUp 0.4s ease both; }
.stagger > *:nth-child(1) { animation-delay: 0.02s; }
.stagger > *:nth-child(2) { animation-delay: 0.06s; }
.stagger > *:nth-child(3) { animation-delay: 0.10s; }
.stagger > *:nth-child(4) { animation-delay: 0.14s; }
.stagger > *:nth-child(5) { animation-delay: 0.18s; }
.stagger > *:nth-child(6) { animation-delay: 0.22s; }
.stagger > *:nth-child(7) { animation-delay: 0.26s; }
.stagger > *:nth-child(8) { animation-delay: 0.30s; }
.stagger > *:nth-child(9) { animation-delay: 0.34s; }
.stagger > *:nth-child(10) { animation-delay: 0.38s; }
.stagger > *:nth-child(n+11) { animation-delay: 0.42s; }

/* ---- Header ---- */
.header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 24px; height: 76px;
}
.header-logo {
  display: flex; align-items: center; gap: 14px;
  font-family: 'Orbitron', monospace;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text-primary);
}
.header-logo img { height: 44px; width: auto; border-radius: var(--radius-sm); }
.header-nav { display: flex; gap: 4px; align-items: center; }
.header-nav a {
  padding: 9px 16px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
}
.header-nav a:hover, .header-nav a.active {
  color: var(--text-primary);
  background: var(--bg-card);
  border-color: var(--border);
}
.header-search {
  flex: 1; max-width: 340px; position: relative; margin-inline-start: auto;
}
.header-search input {
  width: 100%; padding: 10px 16px 10px 40px;
  border: 1px solid var(--border); background: var(--bg-input);
  font-size: 0.82rem;
  color: var(--text-primary); outline: none;
  transition: border-color 0.2s;
  border-radius: var(--radius-sm);
}
.header-search input::placeholder { color: var(--text-muted); }
.header-search input:focus { border-color: var(--border-active); }
.header-search svg {
  position: absolute; inset-inline-start: 13px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted);
}
.header-actions { display: flex; align-items: center; gap: 6px; }
.header-btn {
  padding: 10px 14px; border: 1px solid transparent; background: none;
  font-size: 0.82rem; font-weight: 500;
  color: var(--text-secondary); transition: all 0.2s;
  display: flex; align-items: center; gap: 8px;
  border-radius: var(--radius-sm);
}
.header-btn:hover { color: var(--text-primary); background: var(--bg-card); border-color: var(--border); }

/* Header tools (theme/lang) */
.header-tools {
  display: flex;
  align-items: center;
  gap: 2px;
}
.header-tool-btn {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid transparent;
  background: none;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-muted);
  opacity: 0.6;
  transition: all 0.2s;
  border-radius: var(--radius-sm);
  line-height: 1;
}
.header-tool-btn:hover { opacity: 1; color: var(--text-primary); border-color: var(--border); }

/* User dropdown */
.header-user-wrap { position: relative; }
.header-user-btn {
  padding: 10px 14px;
  border: 1px solid transparent;
  background: none;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.header-user-btn:hover {
  color: var(--text-primary);
  background: var(--bg-card);
  border-color: var(--border);
}
.header-dropdown {
  position: absolute;
  top: 100%;
  inset-inline-end: 0;
  min-width: 190px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-pop);
  border-radius: var(--radius);
  z-index: 200;
  margin-top: 6px;
  padding: 6px;
  overflow: hidden;
}
.header-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: all 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: start;
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.header-dropdown-item:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}
.header-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 5px 0;
}
.dropdown-badge {
  margin-inline-start: auto;
  background: var(--accent);
  color: var(--bg-primary);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
}
.order-indicators {
  margin-inline-start: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.order-ind {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.66rem;
  font-weight: 700;
  border: 1px solid;
  border-radius: var(--radius-pill);
}
.order-ind--pending { color: var(--warning); border-color: var(--warning); background: var(--warning-glow); }
.order-ind--active { color: var(--text-primary); border-color: var(--border-strong); background: var(--bg-card-hover); }

/* ---- Footer ---- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 0.78rem; color: var(--text-muted);
  min-height: 96px;
}
.footer-text { display: flex; flex-direction: column; gap: 6px; text-align: start; }
.footer-digitize { letter-spacing: 0.02em; }
.footer-logos { display: flex; align-items: center; gap: 20px; }
.footer-logos img { height: 72px; width: auto; opacity: 0.9; }
@media (max-width: 768px) {
  .footer { flex-direction: column; align-items: flex-start; gap: 14px; min-height: 0; }
  .footer-text { text-align: start; }
  .footer-logos img { height: 56px; }
}

/* ---- Condition Badge ---- */
.condition-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px;
  font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  border: 1px solid;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(6px);
}
.condition-badge--new { color: var(--text-primary); border-color: var(--border-strong); background: rgba(0, 0, 0, 0.35); }
.condition-badge--used { color: var(--used); border-color: var(--used); background: rgba(0, 0, 0, 0.35); }
[data-theme="light"] .condition-badge--new,
[data-theme="light"] .condition-badge--used { background: var(--bg-card); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px;
  font-weight: 600; font-size: 0.85rem;
  border: 1px solid; transition: all 0.2s;
  white-space: nowrap;
  color: var(--text-primary);
  background: var(--bg-card);
  border-color: var(--border-strong);
  border-radius: var(--radius-sm);
  letter-spacing: 0.01em;
}
.btn:hover { background: var(--bg-card-hover); border-color: var(--text-primary); }
.btn-primary { color: var(--bg-primary); background: var(--text-primary); border-color: var(--text-primary); box-shadow: var(--shadow-card); }
.btn-primary:hover { background: var(--border-active); border-color: var(--border-active); }
.btn-outline { color: var(--text-primary); border-color: var(--border-strong); background: transparent; }
.btn-outline:hover { border-color: var(--text-primary); background: var(--bg-card); }
.btn-danger { color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger-glow); }
.btn-success { color: var(--bg-primary); background: var(--text-primary); border-color: var(--text-primary); box-shadow: var(--shadow-card); }
.btn-success:hover { background: var(--border-active); }
.btn-sm { padding: 8px 16px; font-size: 0.78rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 14px 32px; font-size: 0.9rem; border-radius: var(--radius); }
.btn:disabled { opacity: 0.3; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn:active { transform: scale(0.98); }

/* ---- Forms ---- */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; color: var(--text-secondary); }
.form-input {
  width: 100%; padding: 12px 16px; border: 1px solid var(--border);
  font-size: 0.85rem; color: var(--text-primary); background: var(--bg-input);
  outline: none; transition: border-color 0.2s;
  border-radius: var(--radius-sm);
}
.form-input:focus { border-color: var(--border-active); }
.form-input:disabled { opacity: 0.5; }
.form-error { color: var(--danger); font-size: 0.78rem; margin-top: 4px; }
.form-textarea { min-height: 90px; resize: vertical; }

/* ---- Cards ---- */
.card {
  background: var(--surface), var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: all 0.25s ease;
}
.card:hover { border-color: var(--border-strong); background: var(--bg-card-hover); transform: translateY(-2px); }

/* ---- Product Card ---- */
.product-card { display: flex; flex-direction: column; overflow: hidden; }
.product-card-img {
  aspect-ratio: 4/3; background: var(--bg-primary);
  display: flex; align-items: center; justify-content: center;
  position: relative; border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.product-card-img img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .product-card-img img { transform: scale(1.03); }
.product-card-img .condition-badge { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 1; }
.product-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.product-card-category { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 6px; }
.product-card-name { font-size: 0.95rem; font-weight: 600; line-height: 1.4; margin-bottom: 10px; flex: 1; }
.product-card-pricing { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.product-card-price { font-size: 1.25rem; font-weight: 700; color: var(--text-primary); letter-spacing: 0.02em; }
.product-card-original { font-size: 0.78rem; color: var(--text-muted); text-decoration: line-through; }
.product-card-save { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; }
.product-card-stock { font-size: 0.76rem; color: var(--danger); margin-bottom: 12px; }
.product-card-stock.out { color: var(--danger); }

.product-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* Scroll Row */
.scroll-row-wrap { position: relative; }
.scroll-row { display: flex; gap: 20px; overflow-x: auto; scroll-behavior: smooth; padding: 4px 0; -webkit-overflow-scrolling: touch; }
.scroll-row::-webkit-scrollbar { display: none; }
.scroll-row .product-card { flex: 0 0 280px; min-width: 0; }
.scroll-row .product-card:hover { transform: translateY(-2px); }
.scroll-row-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 38px; height: 72px; display: flex; align-items: center; justify-content: center;
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text-muted);
  cursor: pointer; transition: all 0.25s; opacity: 0;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
}
.scroll-row-wrap:hover .scroll-row-btn { opacity: 0.75; }
.scroll-row-btn:hover { opacity: 1; color: var(--text-primary); border-color: var(--border-strong); background: var(--bg-card-hover); }
.scroll-row-btn--left { left: -40px; }
.scroll-row-btn--right { right: -40px; }

/* ---- Filter Sidebar ---- */
.filter-sidebar { width: 260px; flex-shrink: 0; }
.filter-section { margin-bottom: 28px; }
.filter-title { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-muted); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.filter-options { display: flex; flex-direction: column; gap: 4px; }
.filter-option {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; cursor: pointer;
  font-size: 0.82rem; transition: all 0.15s;
  border: 1px solid transparent; color: var(--text-secondary);
  border-radius: var(--radius-sm);
}
.filter-option:hover { border-color: var(--border); color: var(--text-primary); }
.filter-option input[type="checkbox"], .filter-option input[type="radio"] { accent-color: var(--text-primary); }
.filter-option.active { color: var(--text-primary); border-color: var(--border); background: var(--bg-card); }
.filter-range { display: flex; gap: 8px; align-items: center; }
.filter-range input { width: 100%; padding: 8px 12px; border: 1px solid var(--border); font-size: 0.82rem; background: var(--bg-input); color: var(--text-primary); border-radius: var(--radius-sm); }
.filter-clear { font-size: 0.78rem; color: var(--text-muted); background: none; border: none; padding: 4px 0; cursor: pointer; }
.filter-clear:hover { color: var(--text-primary); }

/* ---- Product Detail ---- */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.product-detail-img {
  aspect-ratio: 4/3; background: var(--bg-primary); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.product-detail-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.product-detail-img .condition-badge { position: absolute; top: 16px; inset-inline-start: 16px; z-index: 1; }
.product-detail-info { display: flex; flex-direction: column; gap: 20px; }
.product-detail-category { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.16em; }
.product-detail-name { font-size: 1.75rem; font-weight: 700; line-height: 1.2; }
.product-detail-desc { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.8; }
.product-detail-pricing { display: flex; align-items: baseline; gap: 14px; padding: 20px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.product-detail-price { font-size: 2.25rem; font-weight: 700; color: var(--text-primary); letter-spacing: 0.02em; }
.product-detail-original { font-size: 1.1rem; color: var(--text-muted); text-decoration: line-through; }
.product-detail-save { font-size: 0.82rem; color: var(--text-muted); font-weight: 500; }
.product-detail-stock { font-size: 0.85rem; }
.product-detail-stock.in-stock { color: var(--text-primary); }
.product-detail-stock.out-of-stock { color: var(--danger); }
.product-detail-stock.low-stock { color: var(--warning); }

.specs-table { width: 100%; border-collapse: collapse; }
.specs-table td { padding: 10px 14px; font-size: 0.82rem; border-bottom: 1px solid var(--border); }
.specs-table td:first-child { color: var(--text-muted); width: 40%; }

.condition-report {
  border: 1px solid var(--border); padding: 20px; display: flex; flex-direction: column; gap: 10px;
  background: var(--surface), var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  position: relative;
}
.condition-report::before {
  content: ''; position: absolute; top: 0; inset-inline: 20px; height: 1px;
  background: var(--border-strong);
}
.condition-report h4 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--text-muted); }
.condition-report-row { display: flex; justify-content: space-between; font-size: 0.82rem; }
.condition-report-label { color: var(--text-muted); }
.condition-report-value { color: var(--text-primary); font-weight: 500; }

.warranty-info {
  border: 1px solid var(--border); padding: 14px 18px; font-size: 0.82rem;
  color: var(--text-secondary); display: flex; align-items: center; gap: 10px;
  background: var(--bg-card); border-radius: var(--radius-sm);
}

/* ---- Cart Page ---- */
.cart-layout { display: grid; grid-template-columns: 1fr 380px; gap: 28px; align-items: start; }
.cart-items { display: flex; flex-direction: column; gap: 14px; }
.cart-item { display: flex; gap: 20px; padding: 20px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); }
.cart-item-img { width: 120px; height: 85px; background: var(--bg-primary); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; border-radius: var(--radius-sm); overflow: hidden; }
.cart-item-body { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.cart-item-name { font-weight: 600; font-size: 0.9rem; }
.cart-item-name:hover { color: var(--text-secondary); }
.cart-item-meta { font-size: 0.78rem; color: var(--text-muted); display: flex; gap: 10px; align-items: center; }
.cart-item-actions { display: flex; align-items: center; gap: 14px; margin-top: auto; }
.cart-item-qty { display: flex; align-items: center; gap: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.cart-item-qty button { width: 36px; height: 36px; border: none; background: var(--bg-primary); font-size: 1rem; font-weight: 600; color: var(--text-primary); transition: all 0.15s; display: flex; align-items: center; justify-content: center; }
.cart-item-qty button:hover { background: var(--bg-card-hover); }
.cart-item-qty span { width: 44px; text-align: center; font-size: 0.85rem; font-weight: 600; background: var(--bg-input); padding: 4px 0; border-inline: 1px solid var(--border); }
.cart-item-remove { font-size: 0.78rem; color: var(--danger); background: none; border: none; padding: 6px 10px; display: flex; align-items: center; gap: 6px; border-radius: var(--radius-sm); }
.cart-item-remove:hover { background: var(--danger-glow); }
.cart-item-total { font-weight: 700; font-size: 1.05rem; color: var(--text-primary); white-space: nowrap; align-self: center; }

.cart-summary { background: var(--surface), var(--bg-card); border: 1px solid var(--border); padding: 28px; position: sticky; top: 100px; border-radius: var(--radius); box-shadow: var(--shadow-card); }
.cart-summary h3 { font-size: 1.05rem; margin-bottom: 20px; }
.cart-summary-row { display: flex; justify-content: space-between; font-size: 0.82rem; padding: 10px 0; border-bottom: 1px solid var(--border); }
.cart-summary-total { display: flex; justify-content: space-between; font-size: 1.05rem; font-weight: 700; padding: 18px 0; color: var(--text-primary); }
.cart-summary .btn { margin-top: 10px; }
.cart-empty { text-align: center; padding: 100px 20px; color: var(--text-muted); }
.cart-empty h2 { font-size: 1.3rem; margin-bottom: 10px; color: var(--text-primary); }

/* ---- Checkout ---- */
.checkout-layout { display: grid; grid-template-columns: 1fr 420px; gap: 28px; align-items: start; }
.checkout-form { background: var(--surface), var(--bg-card); border: 1px solid var(--border); padding: 28px; border-radius: var(--radius); box-shadow: var(--shadow-card); }
.checkout-form h2 { font-size: 1.1rem; margin-bottom: 24px; }

/* ---- Auth Pages ---- */
.auth-page { max-width: 460px; margin: 48px auto; }
.auth-card { padding: 36px; background: var(--surface), var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.auth-card h1 { font-size: 1.3rem; margin-bottom: 4px; }
.auth-card p { color: var(--text-secondary); font-size: 0.82rem; margin-bottom: 28px; }
.auth-link { font-size: 0.82rem; text-align: center; margin-top: 20px; }
.auth-link a { color: var(--text-primary); font-weight: 600; }
.auth-link a:hover { text-decoration: underline; }

/* ---- Orders ---- */
.orders-list { display: flex; flex-direction: column; gap: 14px; }
.order-card { background: var(--surface), var(--bg-card); border: 1px solid var(--border); padding: 24px; transition: border-color 0.2s; border-radius: var(--radius); box-shadow: var(--shadow-card); }
.order-card:hover { border-color: var(--border-strong); }
.order-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; flex-wrap: wrap; gap: 8px; }
.order-id { font-size: 0.78rem; color: var(--text-muted); }
.order-date { font-size: 0.78rem; color: var(--text-secondary); }
.order-status { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; border: 1px solid; border-radius: var(--radius-pill); }
.order-status--pending { color: var(--warning); border-color: var(--warning); }
.order-status--confirmed { color: var(--text-primary); border-color: var(--border-strong); }
.order-status--cancelled { color: var(--danger); border-color: var(--danger); }
.order-card-items { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.order-card-item { font-size: 0.82rem; display: flex; justify-content: space-between; }
.order-card-total { font-size: 1rem; font-weight: 700; text-align: end; color: var(--text-primary); }
.order-card-actions { display: flex; gap: 10px; margin-top: 14px; }

/* ---- Order Confirmation ---- */
.confirmation { max-width: 640px; margin: 48px auto; text-align: center; }
.confirmation-icon { width: 72px; height: 72px; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; border: 2px solid; border-radius: var(--radius); animation: scaleIn 0.3s ease; }
.confirmation-icon.pending { border-color: var(--warning); color: var(--warning); }
.confirmation-icon.confirmed { border-color: var(--text-primary); color: var(--text-primary); }
.confirmation-icon.cancelled { border-color: var(--danger); color: var(--danger); }
.confirmation h1 { font-size: 1.7rem; margin-bottom: 8px; }
.confirmation p { color: var(--text-secondary); font-size: 0.82rem; margin-bottom: 28px; }

/* ---- Account Page ---- */
.account-layout { display: grid; grid-template-columns: 1fr 2.5fr; gap: 28px; align-items: start; }
.account-sidebar { background: var(--surface), var(--bg-card); border: 1px solid var(--border); padding: 28px; border-radius: var(--radius); box-shadow: var(--shadow-card); }
.account-sidebar h2 { font-size: 1rem; margin-bottom: 20px; }
.account-field { margin-bottom: 14px; }
.account-field-label { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 2px; }
.account-field-value { font-size: 0.85rem; }

/* ---- Home Page ---- */
.home-layout { }
.home-body { display: flex; gap: 24px; align-items: flex-start; }
.home-content { flex: 1; min-width: 0; }

/* Hero Carousel */
.hero-carousel {
  position: relative; margin-bottom: 24px; overflow: hidden;
  height: 380px; border: 1px solid var(--border); background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.hero-carousel::after {
  content: ''; position: absolute; top: 0; inset-inline: 0; height: 1px;
  background: linear-gradient(90deg, var(--border-strong), transparent 40%);
  pointer-events: none;
}
.hero-carousel-slide { position: relative; height: 100%; }
.hero-carousel-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-carousel-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 10, 12, 0.9) 0%, rgba(8, 10, 12, 0.55) 45%, rgba(8, 10, 12, 0.25) 100%);
}
.hero-carousel-content { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: center; padding: 60px 80px; }
.hero-carousel-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.5rem; font-weight: 800; line-height: 1.08;
  letter-spacing: 0.02em; margin-bottom: 12px; color: #fff; max-width: 600px;
}
.hero-carousel-subtitle { font-size: 0.95rem; color: rgba(255,255,255,0.78); max-width: 500px; margin-bottom: 24px; }
.hero-carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  background: rgba(20, 23, 27, 0.6); border: 1px solid rgba(255,255,255,0.18);
  color: #fff; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s; border-radius: var(--radius-sm);
  backdrop-filter: blur(6px);
}
.hero-carousel-arrow:hover { background: rgba(30, 34, 40, 0.85); border-color: rgba(255,255,255,0.4); }
.hero-carousel-arrow--left { left: 16px; }
.hero-carousel-arrow--right { right: 16px; }
.hero-carousel-dots { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 2; display: flex; gap: 8px; }
.hero-carousel-dot { width: 22px; height: 4px; border-radius: var(--radius-pill); border: none; background: rgba(255,255,255,0.35); cursor: pointer; transition: all 0.2s; padding: 0; }
.hero-carousel-dot.active { background: #fff; width: 34px; }

/* Stripe Banner */
.stripe-banner { position: relative; height: 160px; overflow: hidden; margin: 40px 0; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); }.stripe-banner-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.stripe-banner-overlay { position: absolute; inset: 0; background: linear-gradient(to right, rgba(8, 10, 12, 0.78) 0%, rgba(8, 10, 12, 0.3) 100%); }
.stripe-banner-content { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: center; padding: 28px 36px; }
.stripe-banner-title { font-size: 1.3rem; font-weight: 700; color: #fff; margin-bottom: 4px; }
.stripe-banner-subtitle { font-size: 0.85rem; color: rgba(255,255,255,0.7); margin-bottom: 10px; }
.stripe-banner .btn-outline { color: #fff; border-color: rgba(255,255,255,0.4); border-radius: var(--radius-sm); }
.stripe-banner .btn-outline:hover { border-color: #fff; background: rgba(255,255,255,0.1); }

/* ---- Dashboard ---- */
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.section-title { font-size: 1.2rem; font-weight: 700; }
.section-link { font-size: 0.82rem; color: var(--text-secondary); font-weight: 500; }
.section-link:hover { color: var(--text-primary); }

.categories-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.category-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  padding: 16px 18px;
  background: var(--surface), var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: all 0.2s ease; cursor: pointer;
}
.category-card:hover { border-color: var(--border-strong); background: var(--bg-card-hover); transform: translateY(-2px); }
.category-card svg { color: var(--text-primary); opacity: 0.85; }
.category-card-name { font-size: 0.74rem; font-weight: 700; text-align: start; text-transform: uppercase; letter-spacing: 0.08em; }

/* ---- Dashboard (admin) ---- */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin-bottom: 40px; }
.dash-stat { background: var(--surface), var(--bg-card); border: 1px solid var(--border); padding: 24px; display: flex; flex-direction: column; gap: 10px; transition: all 0.25s ease; border-radius: var(--radius); box-shadow: var(--shadow-card); }
.dash-stat:hover { border-color: var(--border-strong); }
.dash-stat-header { display: flex; align-items: center; justify-content: space-between; }
.dash-stat-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-muted); }
.dash-stat-value { font-size: 2rem; font-weight: 800; color: var(--text-primary); letter-spacing: 0.02em; }
.dash-stat-desc { font-size: 0.78rem; color: var(--text-secondary); }

/* ---- Admin Layout ---- */
.admin-layout { display: flex; gap: 28px; align-items: flex-start; }
.admin-sidebar { width: 220px; flex-shrink: 0; background: var(--surface), var(--bg-card); border: 1px solid var(--border); padding: 20px; position: sticky; top: 100px; border-radius: var(--radius); box-shadow: var(--shadow-card); }
.admin-sidebar-title { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em; color: var(--text-muted); margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.admin-sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.admin-sidebar-link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-size: 0.82rem; color: var(--text-secondary); transition: all 0.15s; border: 1px solid transparent; border-radius: var(--radius-sm); }
.admin-sidebar-link:hover { color: var(--text-primary); border-color: var(--border); }
.admin-sidebar-link.active { color: var(--text-primary); border-color: var(--border-strong); background: var(--bg-card-hover); }
.admin-content { flex: 1; min-width: 0; }
.admin-filter-select { padding: 8px 14px; border: 1px solid var(--border); font-size: 0.78rem; background: var(--bg-input); color: var(--text-primary); border-radius: var(--radius-sm); }

/* ---- Admin Table ---- */
.admin-table { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface), var(--bg-card); box-shadow: var(--shadow-card); }
.admin-table table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.admin-table th { text-align: start; padding: 13px 16px; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
.admin-table td { padding: 13px 16px; border-bottom: 1px solid var(--border); color: var(--text-primary); }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg-card-hover); }
.admin-table tr.row-expanded td { background: var(--bg-card-hover); }
.admin-table tr.row-on-sale td { background: var(--warning-glow); }
.admin-table-id { font-weight: 600; color: var(--text-muted); font-size: 0.78rem; }
.admin-table-date { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; }
.admin-table-muted { color: var(--text-secondary); }
.admin-table-actions { display: flex; gap: 6px; }

.order-customer-cell { display: flex; flex-direction: column; gap: 2px; min-width: 140px; }
.order-customer-name { font-weight: 600; }
.order-detail-row td { background: var(--bg-input); }
.order-detail-panel { padding: 20px 24px; }
.order-detail-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 32px; }
.order-detail-col h4 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-muted); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.order-detail-item { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; font-size: 0.82rem; }
.order-detail-item span:last-child { text-align: end; }
@media (max-width: 768px) {
  .order-detail-grid { grid-template-columns: 1fr; gap: 20px; }
}

/* ---- Admin Form ---- */
.admin-form { background: var(--surface), var(--bg-card); border: 1px solid var(--border); padding: 24px; margin-bottom: 24px; border-radius: var(--radius); box-shadow: var(--shadow-card); }
.admin-form-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.admin-form-header h3 { font-size: 1rem; font-weight: 700; }
.admin-form-close { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; border-radius: var(--radius-sm); }
.admin-form-close:hover { color: var(--text-primary); }
.admin-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.admin-form-actions { display: flex; gap: 10px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }

.home-sections-list { display: flex; flex-direction: column; gap: 6px; max-width: 460px; }
.home-section-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-input); }
.home-section-check { flex: 1; }
.home-section-order { display: flex; gap: 4px; }
.home-section-cat-badge { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 1px 8px; }

/* ---- Page Header ---- */
.page-header { margin-bottom: 28px; }
.page-header h1 { font-size: 1.7rem; font-weight: 700; }
.page-header p { color: var(--text-secondary); font-size: 0.82rem; margin-top: 4px; }

/* ---- Product List Layout ---- */
.product-list-layout { display: flex; gap: 28px; }
.product-list-content { flex: 1; min-width: 0; }
.product-list-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.product-list-count { font-size: 0.82rem; color: var(--text-secondary); }
.product-list-sort select { padding: 8px 14px; border: 1px solid var(--border); font-size: 0.78rem; background: var(--bg-input); color: var(--text-primary); border-radius: var(--radius-sm); }

/* ---- Alerts ---- */
.alert { padding: 14px 18px; font-size: 0.82rem; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; border: 1px solid; border-radius: var(--radius-sm); }
.alert-success { border-color: var(--border-strong); color: var(--text-primary); background: var(--bg-card); }
.alert-error { border-color: var(--danger); color: var(--danger); background: var(--danger-glow); }

/* ---- Empty State ---- */
.empty-state { text-align: center; padding: 80px 20px; color: var(--text-muted); }
.empty-state h3 { font-size: 1.15rem; color: var(--text-primary); margin-bottom: 8px; }

/* ---- Loading ---- */
.loading { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 80px; color: var(--text-muted); font-size: 0.82rem; }
.loading::before {
  content: ''; width: 16px; height: 16px;
  border: 2px solid var(--border); border-top-color: var(--text-primary);
  border-radius: 50%; animation: spin 0.8s linear infinite; flex-shrink: 0;
}
.loading-pulse { animation: pulse 1.5s ease infinite; }

/* ---- Login hint box ---- */
.login-hint { margin-top: 24px; padding: 20px; border: 1px solid var(--border); background: var(--bg-input); border-radius: var(--radius); }
.login-hint h4 { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 10px; }
.login-hint-item { display: flex; justify-content: space-between; font-size: 0.78rem; padding: 6px 0; color: var(--text-secondary); }
.login-hint-item span:first-child { color: var(--text-muted); }
.login-hint-item span:last-child { color: var(--text-primary); }

/* ---- Quick actions ---- */
.quick-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---- RTL overrides ---- */
[dir="rtl"] { direction: rtl; text-align: start; }
[dir="rtl"] .header-search input { padding: 10px 40px 10px 16px; }
[dir="rtl"] .scroll-row-btn svg,
[dir="rtl"] .pagination-btn svg,
[dir="rtl"] .back-link svg { transform: scaleX(-1); }
[dir="rtl"] .product-card { text-align: start; }
[dir="rtl"] .order-card { text-align: start; }
[dir="rtl"] .confirmation-icon { margin: 0 auto 20px; }
[dir="rtl"] .header-nav a { letter-spacing: 0; }
[dir="rtl"] .auth-page { text-align: start; }
[dir="rtl"] .auth-page h1 { text-align: start; }
[dir="rtl"] .empty-state { text-align: center; }
[dir="rtl"] .product-detail { text-align: start; }
[dir="rtl"] .product-detail-info { text-align: start; }
[dir="rtl"] .checkout-form { text-align: start; }
[dir="rtl"] .page-header { text-align: start; }
[dir="rtl"] .cart-empty { text-align: center; }
[dir="rtl"] .confirmation { text-align: center; }
[dir="rtl"] .footer { text-align: center; }
[dir="rtl"] .maintenance-name,
[dir="rtl"] .maintenance-status,
[dir="rtl"] .maintenance-message { letter-spacing: 0; }
[dir="rtl"] .maintenance-message { font-family: 'Cairo', sans-serif; }
[dir="rtl"] .dash-stat { text-align: start; }
[dir="rtl"] .admin-sidebar { text-align: start; }
[dir="rtl"] .admin-table th { text-align: start; }
[dir="rtl"] .specs-table td { text-align: start; }
[dir="rtl"] .cart-summary { text-align: start; }
[dir="rtl"] .condition-report { text-align: start; }
[dir="rtl"] .account-sidebar { text-align: start; }
[dir="rtl"] .category-card-name { text-align: start; }
[dir="rtl"] .warranty-info { text-align: start; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .product-detail { grid-template-columns: 1fr; }
  .cart-layout { grid-template-columns: 1fr; }
  .checkout-layout { grid-template-columns: 1fr; }
  .account-layout { grid-template-columns: 1fr; }
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; position: static; }
  .admin-form-grid { grid-template-columns: 1fr; }
  .product-list-layout { flex-direction: column; }
  .filter-sidebar { width: 100%; }
  .header-nav { display: none; }
  .header-search { max-width: none; }
  .hero-carousel { height: 280px; }
  .hero-carousel-title { font-size: 1.5rem; }
  .hero-carousel-content { padding: 32px 40px; }
  .home-body { flex-direction: column; }
  .stripe-banner { height: 130px; }
  .categories-grid { gap: 10px; }
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .scroll-row-btn { display: none; }
  .hero-carousel-arrow { display: none; }
}

@media (max-width: 480px) {
  .dashboard-grid { grid-template-columns: 1fr; }
}

/* ---- TechStop.Web (Blazor) additions ---- */
.page-container { animation: fadeIn 0.3s ease; }
.page-container > h1 { font-size: 1.7rem; font-weight: 700; }
.page-container h2 { font-size: 1.1rem; font-weight: 700; }
.page-container h3 { font-size: 1rem; font-weight: 700; }

.input-inline { width: 100%; }
.select-input { padding: 8px 14px; border: 1px solid var(--border); font-size: 0.78rem; background: var(--bg-input); color: var(--text-primary); border-radius: var(--radius-sm); }

/* Payments / orders extras */
.order-items-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.order-items-table td { padding: 8px 0; border-bottom: 1px solid var(--border); }
.order-items-table td:last-child { text-align: end; }
.proof-upload { margin-top: 12px; }
.proof-upload input[type="file"] { display: block; margin-bottom: 10px; }

/* Utility */
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; gap: 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 768px) { .grid-2 { grid-template-columns: 1fr; } }

/* Blazor error UI */
#blazor-error-ui {
    background: var(--bg-secondary); bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.2);
    display: none; left: 0; padding: 0.6rem 1.25rem 0.7rem 1.25rem; position: fixed; width: 100%; z-index: 1000;
    font-size: 0.8rem; color: var(--danger);
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }

/* ---- Home page sections ---- */
.home-section { margin: 48px 0; }
.home-section > h2 { font-size: 0.95rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em; color: var(--text-secondary); margin-bottom: 20px; display: flex; align-items: center; gap: 12px; }
.home-section > h2::before { content: '//'; color: var(--text-primary); opacity: 0.8; font-size: 0.8rem; flex-shrink: 0; }
.home-section > h2 svg { width: 18px; height: 18px; color: var(--text-primary); opacity: 0.85; flex-shrink: 0; }
.home-section-title-icon { color: var(--text-primary); opacity: 0.85; flex-shrink: 0; }
.home-section > h2 a { font-size: 0.8rem; margin-inline-start: auto; font-weight: 500; color: var(--text-secondary); }
.home-section > h2 a:hover { color: var(--text-primary); }

/* Catalog toolbar */
.catalog-header { display: flex; align-items: baseline; gap: 14px; margin-bottom: 20px; }
.catalog-header h1 { font-size: 1.5rem; font-weight: 700; }
.catalog-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.catalog-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-btn { padding: 8px 14px; border: 1px solid var(--border); background: transparent; color: var(--text-secondary); font-size: 0.78rem; transition: all 0.15s; border-radius: var(--radius-sm); }
.filter-btn:hover { color: var(--text-primary); border-color: var(--border-strong); }
.filter-btn.active { color: var(--text-primary); border-color: var(--text-primary); background: var(--bg-card); }
.catalog-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Category chips */
.categories-row { display: flex; gap: 10px; flex-wrap: wrap; }
.category-chip { padding: 10px 18px; border: 1px solid var(--border); background: var(--bg-card); font-size: 0.8rem; color: var(--text-secondary); transition: all 0.2s; border-radius: var(--radius-sm); }
.category-chip:hover { color: var(--text-primary); border-color: var(--border-strong); background: var(--bg-card-hover); }

/* Tags */
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; }
.tag-chip { padding: 4px 12px; border: 1px solid var(--border); font-size: 0.7rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.08em; border-radius: var(--radius-sm); }

/* Product detail gallery */
.product-detail-gallery { display: flex; flex-direction: column; gap: 14px; }
.product-detail-main { position: relative; aspect-ratio: 4/3; background: var(--bg-primary); border: 1px solid var(--border); overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow-card); }
.product-detail-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.product-detail-badge { position: absolute; top: 16px; inset-inline-start: 16px; z-index: 1; }
.product-detail-thumbs { display: flex; gap: 10px; }
.thumb { width: 72px; height: 54px; border: 1px solid var(--border); background: var(--bg-primary); cursor: pointer; transition: all 0.15s; border-radius: var(--radius-sm); overflow: hidden; }
.thumb.active, .thumb:hover { border-color: var(--text-primary); }
.product-detail-info h1 { font-size: 1.75rem; font-weight: 700; line-height: 1.2; }
.product-detail-price { font-size: 2rem; font-weight: 700; letter-spacing: 0.02em; }
.price-main { font-size: 2rem; font-weight: 700; color: var(--text-primary); letter-spacing: 0.02em; }
.price-original { font-size: 1rem; color: var(--text-muted); text-decoration: line-through; margin-inline-start: 12px; font-weight: 400; }
.price-save { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; margin-inline-start: 8px; }
.price-lyd { font-size: 0.85rem; color: var(--text-secondary); font-weight: 400; margin-top: 4px; }
.product-detail-stock.out { color: var(--danger); }
.product-detail-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* Quantity picker */
.qty-picker { display: flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.qty-btn { width: 36px; height: 36px; border: none; background: var(--bg-primary); font-size: 1rem; font-weight: 600; color: var(--text-primary); transition: all 0.15s; display: flex; align-items: center; justify-content: center; }
.qty-btn:hover { background: var(--bg-card-hover); }
.qty-input { width: 44px; text-align: center; font-size: 0.85rem; font-weight: 600; background: var(--bg-input); padding: 4px 0; border: none; border-radius: 0; border-inline: 1px solid var(--border); -moz-appearance: textfield; }
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Cart item bits */
.cart-item-price { font-size: 0.9rem; font-weight: 600; }
.cart-total { font-weight: 700; font-size: 1.15rem; }
.cart-summary .flex-between { padding: 8px 0; font-size: 0.82rem; }
.btn-link-danger { font-size: 0.78rem; color: var(--danger); background: none; border: none; padding: 6px 10px; display: inline-flex; align-items: center; gap: 6px; border-radius: var(--radius-sm); }
.btn-link-danger:hover { background: var(--danger-glow); }

/* Checkout */
.checkout-section { margin-bottom: 28px; }
.checkout-section h3 { font-size: 0.82rem; margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-secondary); }
.payment-methods { display: flex; flex-direction: column; gap: 10px; }
.payment-method { text-align: start; padding: 16px 18px; border: 1px solid var(--border); background: transparent; color: var(--text-secondary); transition: all 0.15s; border-radius: var(--radius-sm); }
.payment-method:hover { border-color: var(--border-strong); color: var(--text-primary); }
.payment-method.active { border-color: var(--text-primary); color: var(--text-primary); background: var(--bg-card); }
.payment-method-name { font-size: 0.85rem; font-weight: 600; }

/* Auth switch */
.auth-switch { font-size: 0.82rem; text-align: center; margin-top: 20px; color: var(--text-secondary); }
.auth-switch a { color: var(--text-primary); font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; color: var(--text-secondary); }
.form-field .input-inline, .form-field .select-input { width: 100%; padding: 12px 16px; border: 1px solid var(--border); font-size: 0.85rem; border-radius: var(--radius-sm); }

/* Orders */
.order-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px; flex-wrap: wrap; }
.order-row-id { font-weight: 600; font-size: 0.9rem; }
.order-row-meta { display: flex; gap: 8px; align-items: center; }
.order-row-total { font-weight: 700; }
.status-badge { display: inline-flex; align-items: center; padding: 3px 12px; font-size: 0.64rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; border: 1px solid; border-radius: var(--radius-sm); }
.status-pending, .status-failed { color: var(--warning); border-color: var(--warning); }
.status-confirmed, .status-paid, .status-completed, .status-ontheway { color: var(--text-primary); border-color: var(--border-strong); }
.status-cancelled, .status-rejected { color: var(--danger); border-color: var(--danger); }
.order-actions { display: flex; gap: 10px; margin-top: 16px; }
.order-locked {
  display: flex; align-items: center; gap: 10px;
  margin-top: 16px; padding: 12px 16px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 0.82rem;
  background: var(--bg-input);
}
.order-locked svg { color: var(--text-primary); flex-shrink: 0; }
.profile-card { border: 1px solid var(--border); padding: 20px; background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow-card); }

/* Pagination */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 40px; }
.pagination-btn { min-width: 36px; height: 36px; padding: 0 10px; border: 1px solid var(--border); background: transparent; color: var(--text-secondary); font-size: 0.82rem; transition: all 0.15s; border-radius: var(--radius-sm); }
.pagination-btn:hover { color: var(--text-primary); border-color: var(--border-strong); }
.pagination-btn.active { color: var(--text-primary); border-color: var(--text-primary); background: var(--bg-card); }
.pagination-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* RTL + responsive for additions */
@media (max-width: 768px) {
  .product-detail { grid-template-columns: 1fr; }
  .catalog-toolbar { flex-direction: column; align-items: flex-start; }
  .order-row { flex-direction: column; align-items: flex-start; }
}

/* ---- Boot / loading screen ---- */
.app-boot {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  background:
    radial-gradient(circle at 50% 38%, var(--accent-glow), transparent 60%),
    var(--bg-primary);
}
.app-boot-logo {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  animation: bootPulse 1.6s ease-in-out infinite;
}
.app-boot-name {
  font-family: 'Orbitron', monospace;
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-primary);
}
.app-boot-tag {
  font-size: 0.68rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--text-muted);
  animation: pulse 1.6s ease-in-out infinite;
}
.app-boot-bar {
  width: 220px;
  height: 2px;
  background: var(--bg-card);
  overflow: hidden;
  position: relative;
  border-radius: var(--radius-pill);
}
.app-boot-bar span {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--text-primary), transparent);
  animation: bootSlide 1.2s linear infinite;
}

/* ---- Scroll rows (home page carousels) ---- */
.scroll-row-btn { opacity: 0.7; }
.scroll-row-wrap:hover .scroll-row-btn { opacity: 1; }
.scroll-row-btn--left { left: -18px; right: auto; }
.scroll-row-btn--right { right: -18px; left: auto; }
[dir="rtl"] .scroll-row-btn--left { left: auto; right: -18px; }
[dir="rtl"] .scroll-row-btn--right { right: auto; left: -18px; }
.home-section .flex-between { margin-bottom: 20px; }

/* ---- Categories horizontal scroll ---- */
.categories-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.categories-row::-webkit-scrollbar { display: none; }

/* ---- Filter sidebar (Amazon-style) ---- */
.filter-sidebar { position: sticky; top: 100px; max-height: calc(100vh - 120px); overflow-y: auto; padding-inline-end: 4px; }
.filter-option { width: 100%; text-align: start; background: none; border: 1px solid transparent; }
.filter-option:hover { border-color: var(--border); }
.filter-option.active { border-color: var(--border); background: var(--bg-card); }

@media (max-width: 768px) {
  .scroll-row-btn { display: none; }
  .scroll-row-btn--left { left: -6px; right: auto; }
  .scroll-row-btn--right { right: -6px; left: auto; }
  [dir="rtl"] .scroll-row-btn--left { left: auto; right: -6px; }
  [dir="rtl"] .scroll-row-btn--right { right: auto; left: -6px; }
  .filter-sidebar { position: static; max-height: none; overflow: visible; }
}

/* ---- Mobile header (wrap search to its own row) ---- */
@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; height: auto; gap: 10px; padding: 8px 12px; }
  .header-tools { gap: 0; }
  .header-logo img { height: 32px; }
  .header-logo { font-size: 1rem; gap: 10px; }
  .header-search { order: 5; flex-basis: 100%; max-width: none; margin: 0 0 6px; padding-inline-start: 4px; }
  .header-actions { margin-inline-start: auto; }
}

/* ---- Categories: drawer slots (one-row scrollable) ---- */
.categories-scroll { display: flex; flex-wrap: nowrap; gap: 12px; overflow-x: auto; scrollbar-width: none; padding: 8px 0; -webkit-overflow-scrolling: touch; }
.categories-scroll::-webkit-scrollbar { display: none; }
.categories-scroll .category-card { flex: 0 0 auto; min-width: 150px; }

/* ---- Maintenance page (mirror of the boot screen) ---- */
.maintenance-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  background:
    radial-gradient(circle at 50% 38%, var(--danger-glow), transparent 60%),
    var(--bg-primary);
  text-align: center;
}
.maintenance-logo {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  animation: bootPulse 1.6s ease-in-out infinite;
}
.maintenance-name {
  font-family: 'Orbitron', monospace;
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-primary);
}
.maintenance-status {
  font-size: 0.68rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--danger);
  animation: pulse 1.6s ease-in-out infinite;
}
.maintenance-message {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--text-primary);
  max-width: 480px;
  padding: 0 20px;
}
.maintenance-bar {
  width: 220px;
  height: 2px;
  background: var(--bg-card);
  overflow: hidden;
  position: relative;
  border-radius: var(--radius-pill);
}
.maintenance-bar span {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--danger), transparent);
  animation: bootSlide 1.2s linear infinite;
}

/* ---- BIG RED BUTTON (admin maintenance) ---- */
.big-red-wrap {
  background: var(--surface), var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 40px 32px;
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  text-align: center;
}
.big-red-state {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em;
}
.big-red-dot { width: 10px; height: 10px; border-radius: 50%; transition: background 0.3s; }
.big-red-state.on { color: var(--danger); }
.big-red-state.on .big-red-dot { background: var(--danger); box-shadow: 0 0 0 4px var(--danger-glow); animation: pulse 1.6s ease-in-out infinite; }
.big-red-state.off { color: var(--text-secondary); }
.big-red-state.off .big-red-dot { background: var(--text-muted); }
.big-red-button {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 26px 52px;
  background: var(--danger); border: 1px solid var(--danger);
  color: #fff; border-radius: var(--radius);
  font-size: 1.05rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 12px 40px rgba(224, 91, 91, 0.35);
  transition: all 0.2s ease;
}
.big-red-button:hover { background: #f06a6a; border-color: #f06a6a; transform: translateY(-2px); }
.big-red-button:active { transform: scale(0.97); }
.big-red-button:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.big-red-button .big-red-label { font-family: 'JetBrains Mono', monospace; }
.big-red-button svg { flex-shrink: 0; }
.big-red-note { max-width: 360px; line-height: 1.6; }
@media (max-width: 480px) {
  .big-red-button { width: 100%; padding: 22px 20px; font-size: 0.95rem; }
}
