/* ═══════════════════════════════════════════════════
   catalog.css  —  Catuleius Online Catalog
   Import order: root → base → layout → components
═══════════════════════════════════════════════════ */

/* ── TOKENS ─────────────────────────────────────── */
:root {

  --accent:       #0E1A26;
  --accent-dark:  #081019;
  --accent-light: #33475B;
  --mint:         #1FCF8C;
  --amber:        #FF9142;
  --gradient:     linear-gradient(135deg,#0E1A26 0%,#16232F 55%,#33475B 100%);
  --gradient-btn: linear-gradient(135deg,#0E1A26 0%,#16232F 100%);
  --bg:           #f4f6fb;
  --surface:      #ffffff;
  --card:         #ffffff;
  --card-hover:   #F2F4F7;
  --border:       rgba(14,26,38,0.12);
  --border-focus: rgba(14,26,38,0.4);
  --text:         #0E1A26;
  --text-muted:   #5B6B7A;
  --text-ph:      rgba(91,107,122,0.75);
  --text-dim:     #d1d5db;
  --green:        #16a34a;
  --green-dark:   #15803d;
  --green-bright: #22c55e;
  --green-bg:     rgba(22,163,74,0.08);
  --red:          #dc2626;
  --red-bg:       rgba(220,38,38,0.08);
  --discount:        #e11d48;
  --discount-dark:   #be123c;
  --discount-light:  #fb7185;
  --discount-gradient: linear-gradient(135deg,#be123c 0%,#e11d48 55%,#fb7185 100%);
  --radius:       16px;
  --radius-sm:    11px;
  --radius-xs:    8px;
  --font:            'Inter', 'Tajawal', sans-serif;
  --font-display:    'Manrope', 'Tajawal', sans-serif;
  --font-ar:         'Tajawal', sans-serif;

}

/* ── BASE ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
/*body {*/
/*  background: var(--bg); color: var(--text);*/
/*  font-family: var(--font);*/
/*  min-height: 100dvh; overflow-x: hidden; line-height: 1.5;*/
/*}*/

body {
  background: #f8fafc;
  color: var(--text);
  font-family: var(--font);
  min-height: 100dvh; overflow-x: hidden; line-height: 1.5;
  overflow-x: hidden;
  line-height: 1.5;
}
[dir="rtl"] body,
[dir="rtl"] input,
[dir="rtl"] select,
[dir="rtl"] button,
[dir="rtl"] textarea { font-family: var(--font-ar); }

/* background subtle pattern */
/*body::before {*/
/*  content: ''; position: fixed; inset: 0; z-index: 0;*/
/*  background-image:*/
/*    linear-gradient(rgba(14,26,38,0.04) 1px, transparent 1px),*/
/*    linear-gradient(90deg, rgba(14,26,38,0.04) 1px, transparent 1px);*/
/*  background-size: 48px 48px; pointer-events: none;*/
/*}*/
/*body::after {*/
/*  content: ''; position: fixed; top: -200px; left: 50%;*/
/*  transform: translateX(-50%); width: 600px; height: 400px;*/
/*  background: radial-gradient(ellipse, rgba(14,26,38,0.06) 0%, transparent 70%);*/
/*  pointer-events: none; z-index: 0;*/
/*}*/

body {
  background: linear-gradient(135deg, #f5f7fa 0%, #f8f9fc 100%);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background: radial-gradient(circle at 20% 50%, rgba(14, 26, 38, 0.03) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(14, 165, 233, 0.03) 0%, transparent 60%);
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(14, 26, 38, 0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: rgb(144 143 143 / 82%); border-radius: 4px; }

/* ── HEADER ──────────────────────────────────────── */
header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 12px rgba(14,26,38,0.07);
}
.hd-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; gap: 10px;
  height: 58px; padding: 0 14px;
}
@media(min-width:640px)  { .hd-inner { height: 64px; padding: 0 24px; } }
@media(min-width:1024px) { .hd-inner { padding: 0 40px; } }

.brand { display: flex; align-items: center; gap: 9px; flex-shrink: 0; overflow: hidden; max-width: 260px; }
.brand-logo {
  width: 40px; height: 40px; flex-shrink: 0;
  background: var(--gradient); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 17px; color: #fff;
  box-shadow: 0 3px 14px rgba(14,26,38,0.45);
  overflow: hidden; /* clips img to rounded square */
}
/* Logo image inside brand-logo */
.brand-logo-img {
  width: 100%; height: 100%; object-fit: contain; display: block;
}
.brand-name { font-family: var(--font-display); font-size: 18px; font-weight: 800; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.3px; }
@media(min-width:640px) { .brand-name { font-size: 20px; } }
/* Brand text stack */
.brand-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

/* Sub-line: phone · address — plain text, same muted color, NOT a blue link */
.brand-info {
  font-size: 11px; color: var(--text-muted);
  display: flex; align-items: flex-start; gap: 4px;
  flex-wrap: wrap; overflow: visible; line-height: 1.4;
}
.brand-info a,
.hd-contact {
  color: var(--text-muted) !important;
  text-decoration: none !important;
  font-size: inherit;
}
.hd-dot  { opacity: .35; font-size: 10px; flex-shrink: 0; margin-top: 1px; }
.hd-addr { word-break: break-word; }

/* ── PHONE BUTTON — gradient green pill ─────────── */
.hd-phone-btn {
  display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 55%, var(--green-bright) 100%);
  border: none; border-radius: 999px;
  padding: 0 16px 0 11px; height: 38px;
  color: #fff; font-family: var(--font); font-size: 13px; font-weight: 700;
  letter-spacing: .1px; white-space: nowrap; text-decoration: none;
  box-shadow: 0 3px 14px rgba(34,197,94,.45), 0 0 0 1px rgba(34,197,94,.15);
  margin-inline-start: auto;
  transition: filter .18s, transform .18s, box-shadow .18s;
  cursor: pointer;
}
.hd-phone-btn svg { flex-shrink: 0; }
.hd-phone-btn:hover  { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 6px 22px rgba(34,197,94,.6); }
.hd-phone-btn:active { transform: scale(.97); }
/* phone label — hidden on very small screens, shown ≥ 400px */
.hd-phone-lbl { display: none; }
@media(min-width:400px) { .hd-phone-lbl { display: inline; } }
.hd-phone-btn + .lang-dd { margin-inline-start: 8px; }

/* ── LANGUAGE DROPDOWN ───────────────────────────── */
.lang-dd {
  position: relative; flex-shrink: 0;
  margin-inline-start: auto; /* fallback when no phone btn */
}
.lang-dd-btn {
  display: flex; align-items: center; gap: 5px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-xs); padding: 7px 10px;
  color: var(--text); font-family: var(--font); font-size: 12px; font-weight: 700;
  letter-spacing: .4px; cursor: pointer; transition: border-color .18s, background .18s;
  white-space: nowrap;
}
.lang-dd-btn:hover { border-color: var(--border-focus); background: var(--card-hover); }
.lang-dd-btn svg   { color: var(--text-muted); transition: transform .2s; }
.lang-dd.open .lang-dd-btn svg { transform: rotate(180deg); }
.lang-dd-globe { color: var(--accent-light); }

.lang-dd-menu {
  position: absolute; inset-inline-end: 0; top: calc(100% + 6px);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
  box-shadow: 0 12px 36px rgba(0,0,0,.55);
  min-width: 110px; z-index: 200;
  opacity: 0; transform: translateY(-6px) scale(.97);
  pointer-events: none;
  transition: opacity .18s, transform .18s;
}
.lang-dd.open .lang-dd-menu { opacity: 1; transform: none; pointer-events: all; }
.lang-dd-item {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 14px; font-size: 13px; font-weight: 500;
  color: var(--text-muted); cursor: pointer;
  transition: background .15s, color .15s;
}
.lang-dd-item:hover   { background: var(--card); color: var(--text); }
.lang-dd-item.active  { color: var(--accent-light); font-weight: 700; }
.lang-dd-item.active::after { content: '✓'; margin-inline-start: auto; font-size: 11px; }
.lang-dd-flag { font-size: 16px; line-height: 1; }

/* keep old .lang-sw/.lang-btn for any edge-case fallback */
.lang-sw { display: none; }
.lang-btn { display: none; }

/* ── SALE BANNER (store-wide, shown only when every
   discounted product shares one discount_label) ──── */
.sale-banner {
  position: relative;
  overflow: hidden;
  background: var(--discount-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 0;
  max-height: 0;
  transition: height .3s ease, max-height .3s ease;
}
.sale-banner.visible {
  height: 40px;
  max-height: 40px;
}
@media(min-width:640px) { .sale-banner.visible { height: 44px; max-height: 44px; } }

/* Soft diagonal sheen sweeping across the bar — a calm, modern
   alternative to the old left-scrolling marquee ticker. */
.sale-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.30) 50%, transparent 65%);
  background-size: 220% 100%;
  animation: saleSheen 3.4s ease-in-out infinite;
  pointer-events: none;
}

.sale-banner-track {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  padding: 0 16px;
}

.sale-banner-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sale-banner-item svg { flex-shrink: 0; animation: saleSpark 2.5s ease-in-out infinite; }
@media(min-width:640px) { .sale-banner-item { font-size: 14px; gap: 10px; } }

@keyframes saleSheen {
  0%   { background-position: 220% 0; }
  100% { background-position: -220% 0; }
}
@keyframes saleSpark {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .55; transform: scale(.85); }
}
@media (prefers-reduced-motion: reduce) {
  .sale-banner::before { animation: none; }
  .sale-banner-item svg { animation: none; }
}

/* ── CONTROLS STRIP ──────────────────────────────── */
/* ── CONTROLS STRIP ──────────────────────────────── */
.ctrl-strip {
  position: sticky;
  top: 70px;
  z-index: 90;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 16px 14px 12px;
}

@media (min-width: 640px) {
  .ctrl-strip {
    top: 64px;
    padding: 20px 24px 16px;
  }
}

@media (min-width: 1024px) {
  .ctrl-strip {
    padding: 20px 40px 16px;
  }
}

.ctrl-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Search wrapper - enhanced */
.srch-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.srch-icon {
  position: absolute;
  inset-inline-start: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  z-index: 1;
}

.srch-input {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 13px 16px 13px 42px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  outline: none;
  transition: all 0.2s ease;
}

[dir="rtl"] .srch-input {
  padding: 13px 42px 13px 16px;
}

.srch-input::placeholder {
  color: var(--text-ph);
  font-weight: 400;
}

.srch-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(14, 26, 38, 0.1);
  background: #ffffff;
}

/* Category dropdown - enhanced */
.cat-wrap {
  position: relative;
  flex-shrink: 0;
}

.cat-sel {
  appearance: none;
  -webkit-appearance: none;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 13px 36px 13px 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 170px;
}

[dir="rtl"] .cat-sel {
  padding: 13px 16px 13px 36px;
}

.cat-sel:hover {
  border-color: rgba(14, 26, 38, 0.3);
}

.cat-sel:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(14, 26, 38, 0.1);
}

.cat-sel option {
  background: var(--surface);
  color: var(--text);
  padding: 10px;
  font-weight: normal;
}

.cat-chev {
  position: absolute;
  inset-inline-end: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.cat-wrap:hover .cat-chev {
  color: var(--accent);
}

/* Category pills row - premium style */
.pills-row {
  max-width: 1400px;
  margin: 16px auto 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.pill {
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 40px;
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  white-space: nowrap;
  font-family: inherit;
  letter-spacing: -0.2px;
}

.pill:hover {
  color: var(--accent);
  border-color: rgba(14, 26, 38, 0.4);
  background: rgba(14, 26, 38, 0.04);
  transform: translateY(-1px);
}

.pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(14, 26, 38, 0.25);
}

.pill.active:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(14, 26, 38, 0.3);
}
/* ── MAIN WRAP ───────────────────────────────────── */
.pw { position: relative; z-index: 1; max-width: 1400px; margin: 0 auto; padding: 18px 14px 130px; }
@media(min-width:640px)  { .pw { padding: 22px 24px 130px; } }
@media(min-width:1024px) { .pw { padding: 28px 40px 130px; } }

/* ── PAGE TITLE ROW ──────────────────────────────── */
.pg-title-row {
  display: flex; align-items: center;
  justify-content: space-between; gap: 12px;
  margin-bottom: 4px;
}

.pg-title {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 800; letter-spacing: -.5px; margin-bottom: 0;
  color: var(--text);
  line-height: 1.2;
}
@media(min-width:640px) { .pg-title { font-size: 28px; } }

/* ── TRACK ORDER BUTTON (inline, title row) ──────── */
@keyframes trackPulse {
  0%   { box-shadow: 0 0 0 0 rgba(31,207,140,.45); }
  70%  { box-shadow: 0 0 0 8px rgba(31,207,140,0); }
  100% { box-shadow: 0 0 0 0 rgba(31,207,140,0); }
}
.track-btn {
  display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0;
  background: var(--ink, #0E1A26);
  border: 1px solid #0E1A26;
  border-radius: 20px;
  padding: 9px 16px;
  color: #ffffff;
  font-family: inherit; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all .2s;
  letter-spacing: .2px; white-space: nowrap;
  box-shadow: 0 0 12px rgba(14,26,38,.2);
  animation: trackPulse 2.4s ease-in-out infinite;
}
.track-btn:hover {
  color: #ffffff;
  background: #16232F;
  border-color: #16232F;
  box-shadow: 0 0 20px rgba(14,26,38,.3);
  animation: none;
}
.track-btn svg { flex-shrink: 0; }
.res-info { font-size: 12px; color: var(--text-muted); margin-bottom: 14px; }
.res-info b { color: var(--accent-light); }

/* ── PRODUCT GRID ────────────────────────────────── */
.grid { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media(min-width:480px)  { .grid { gap: 14px; } }
@media(min-width:860px)  { .grid { grid-template-columns: repeat(3, 1fr); } }
@media(min-width:1100px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media(min-width:1300px) { .grid { grid-template-columns: repeat(5, 1fr); } }

/* ── PRODUCT CARD ────────────────────────────────── */
/*.pc {*/
/*  background: var(--card); border: 1px solid var(--border);*/
/*  border-radius: 22px; overflow: hidden; cursor: pointer;*/
/*  transition: transform .22s cubic-bezier(.22,.68,0,1.2), box-shadow .22s, border-color .22s;*/
/*  display: flex; flex-direction: column;*/
/*  animation: fadeUp .35s ease both;*/
/*  box-shadow: 0 2px 10px rgba(14,26,38,.07);*/
/*}*/
/*@media(hover:hover) {*/
/*  .pc:hover {*/
/*    transform: translateY(-4px);*/
/*    box-shadow: 0 16px 40px rgba(14,26,38,.14), 0 0 0 1px rgba(14,26,38,.2);*/
/*    border-color: rgba(14,26,38,.3);*/
/*  }*/
/*}*/
/*@keyframes fadeUp { from { opacity:0; transform:translateY(18px); } to { opacity:1; transform:translateY(0); } }*/

/* ── PRODUCT CARD ────────────────────────────────── */
.pc {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  display: flex;
  flex-direction: column;
  animation: fadeUp 0.4s ease both;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

@media (hover: hover) {
  .pc:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 30px -12px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(14, 26, 38, 0.15);
    border-color: rgba(14, 26, 38, 0.2);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pc-img-wrap { position: relative; width: 100%; aspect-ratio: 1/1; background: var(--surface); overflow: hidden; }
.pc-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .38s ease; }
@media(hover:hover) { .pc:hover .pc-img { transform: scale(1.05); } }
.pc-img-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text-dim); }

/* av-badge: inline in the name row, not absolute over image */
.av-badge { display: inline-block; padding: 6px 8px; border-radius: 0px; font-size: 10px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; flex-shrink: 0; white-space: nowrap; margin-top: 2px; }
.b-ok { 
    text-align: center;
    background: var(--green-bg); color: var(--green); border: 0px solid rgba(22,163,74,.25); }
.b-no  { background: var(--red-bg);   color: var(--red);   border: 1px solid rgba(220,38,38,.25); }
/*.cat-chip {*/
/*  position: absolute; top: 7px; inset-inline-start: 7px;*/
/*  background: rgb(27 0 79 / 88%); backdrop-filter: blur(8px);*/
/*  border: 1px solid rgba(14,26,38,.12);*/
/*  padding: 2px 8px; border-radius: 999px;*/
/*  font-size: 9px; font-weight: 600; color: var(--text-muted);*/
/*  text-transform: uppercase; letter-spacing: .4px;*/
/*  max-width: calc(100% - 14px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;*/
/*}*/
.cat-chip {
    position: absolute;
    bottom: 7px;
    inset-inline-start: 7px;
    background: rgba(255,255,255,.78);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.9);
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: .4px;
    max-width: calc(100% - 14px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pc-body { padding: 10px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
@media(min-width:640px) { .pc-body { padding: 12px; } }
/* Name row: product name + availability badge side by side */
.pc-name-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.pc-name { font-size: 12px; font-weight: 600; color: var(--text); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: 1; min-width: 0; }
@media(min-width:400px) { .pc-name { font-size: 13px; } }
@media(min-width:640px) { .pc-name { font-size: 14px; } }
.pc-row { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-top: auto; }
.pc-price { font-size: 13px; font-weight: 800; color: var(--text); white-space: nowrap; }
@media(min-width:400px) { .pc-price { font-size: 14px; } }

/* ── DISCOUNT: corner ribbon on product image ────── */
.disc-ribbon {
  position: absolute;
  top: 28px;
  inset-inline-end: 7px;
  background: var(--discount-gradient);
  color: #fff;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .3px;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(225,29,72,.4);
  z-index: 2;
  max-width: calc(100% - 14px);
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── DISCOUNT: price block with strikethrough ────── */
.pc-price-block {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.pc-price-old {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: line-through;
  white-space: nowrap;
}
.pc-price.is-discounted { color: var(--discount); }

/* Modal price with strikethrough */
.mo-price-row { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; margin-bottom: 10px; }
.mo-price-old {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: line-through;
}
.mo-price.is-discounted {
  background: var(--discount-gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.mo-disc-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(225,29,72,0.09); color: var(--discount);
  border: 1px solid rgba(225,29,72,0.22);
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .3px;
  margin-bottom: 8px;
}

/* Cart item + checkout line discount styling */
.ci-price-old, .tr-item-price-old { text-decoration: line-through; color: var(--text-muted); margin-inline-end: 5px; }
.ci-price .is-discounted { color: var(--discount); font-weight: 700; }

.co-saved-row {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--green-bg);
  color: var(--green-dark);
  border: 1px solid rgba(22,163,74,.2);
  border-radius: var(--radius-sm);
  padding: 9px 13px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}
.var-chip { font-size: 9px; color: var(--text-muted); background: rgba(14,26,38,.06); border: 1px solid rgba(14,26,38,.12); padding: 2px 6px; border-radius: 5px; white-space: nowrap; }
.pc-add {
  width: 100%; background: var(--gradient-btn); color: #fff; border: none;
  border-radius: 12px; padding: 9px 10px;
  font-family: inherit; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all .18s;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  box-shadow: 0 3px 10px rgba(14,26,38,.25);
}
@media(min-width:640px) { .pc-add { font-size: 13px; padding: 10px 14px; } }
@media(hover:hover) { .pc-add:hover { filter: brightness(1.1); box-shadow: 0 4px 16px rgba(14,26,38,.4); } }
.pc-add:active   { transform: scale(.97); }
.pc-add:disabled { background: var(--text-dim); color: var(--text-muted); box-shadow: none; cursor: not-allowed; }
.pc-unavail { opacity: .72; }
.pc-unavail .pc-img { filter: grayscale(.45); }

/* ── SERVICE CARD ────────────────────────────────── */
/* Distinct teal/purple accent so services stand apart from physical products */
:root {
  --svc:        #7c3aed;
  --svc-dark:   #6d28d9;
  --svc-light:  #8b5cf6;
  --svc-bg:     rgba(124,58,237,0.07);
  --svc-border: rgba(124,58,237,0.18);
  --svc-gradient: linear-gradient(135deg,#6d28d9 0%,#7c3aed 55%,#8b5cf6 100%);
  --svc-btn:    linear-gradient(135deg,#6d28d9,#7c3aed);
}

.pc-service {
  border-color: var(--svc-border);
  background: linear-gradient(160deg, #faf8ff 0%, #ffffff 100%);
}
@media(hover:hover) {
  .pc-service:hover {
    box-shadow: 0 20px 30px -12px rgba(124,58,237,0.15), 0 0 0 1px rgba(124,58,237,0.25);
    border-color: rgba(124,58,237,0.3);
  }
}

/* Service placeholder image — purple tinted */
.pc-svc-ph, .mo-svc-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--svc-light);
  background: linear-gradient(135deg, rgba(124,58,237,0.05) 0%, rgba(139,92,246,0.08) 100%);
}

/* Service badge — purple pill with wrench icon */
.b-service {
  background: var(--svc-bg);
  color: var(--svc);
  border: 1px solid var(--svc-border);
  display: inline-flex; align-items: center; gap: 4px;
}

/* Service "Book" button — purple gradient */
.pc-book {
  background: var(--svc-btn) !important;
  box-shadow: 0 3px 10px rgba(124,58,237,0.28) !important;
}
@media(hover:hover) { .pc-book:hover { box-shadow: 0 4px 16px rgba(124,58,237,0.45) !important; } }

/* Modal service badge + category */
.mo-svc-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--svc-bg); color: var(--svc);
  border: 1px solid var(--svc-border);
  padding: 2px 9px; border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
}
.mo-cat-txt {
  font-size: 12px; color: var(--text-muted); margin-inline-start: 4px;
}

/* Modal "Book Service" quick-action button */
.mo-quick-service {
  background: var(--svc-btn) !important;
  box-shadow: 0 4px 14px rgba(124,58,237,0.32) !important;
}
@media(hover:hover) { .mo-quick-service:hover { box-shadow: 0 6px 20px rgba(124,58,237,0.45) !important; } }

/* ── EMPTY / LOADING ─────────────────────────────── */
.empty-st { grid-column: 1/-1; text-align: center; padding: 60px 20px; }
.empty-st svg { opacity: .1; margin-bottom: 14px; }
.empty-st h3  { font-size: 17px; margin-bottom: 5px; }
.empty-st p   { font-size: 13px; color: var(--text-muted); }
.empty-st .btn-retry {
  margin-top: 16px; display: inline-flex; align-items: center; gap: 6px;
  background: var(--gradient-btn); color: #fff; border: none;
  border-radius: var(--radius-sm); padding: 10px 18px;
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: filter .18s;
  box-shadow: 0 3px 10px rgba(14,26,38,.3);
}
.empty-st .btn-retry:hover { filter: brightness(1.1); }

.loading-st { grid-column: 1/-1; display: flex; align-items: center; justify-content: center; padding: 80px; }
.spinner { width: 32px; height: 32px; border: 2.5px solid rgba(14,26,38,.15); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── "LOAD MORE" BUTTON ──────────────────────────── */
.load-more-wrap { grid-column: 1/-1; text-align: center; padding: 10px 0 4px; }
/* ── "LOAD MORE" BUTTON - GRADIENT VERSION ──────────── */
.load-more-wrap {
  grid-column: 1/-1;
  text-align: center;
  padding: 28px 0 16px;
  position: relative;
}

/* Optional: Add a subtle separator line above */
.load-more-wrap::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  border-radius: 2px;
}

.btn-load-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent) 55%, var(--accent-light) 100%);
  border: none;
  border-radius: 50px;
  padding: 14px 36px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  box-shadow: 0 4px 14px rgba(14, 26, 38, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-load-more::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-load-more:hover::before {
  left: 100%;
}

.btn-load-more:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(14, 26, 38, 0.4);
  filter: brightness(1.05);
}

.btn-load-more:active {
  transform: translateY(1px);
  box-shadow: 0 2px 10px rgba(14, 26, 38, 0.3);
}

.btn-load-more:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
  filter: grayscale(0.1);
}

.btn-load-more svg {
  transition: transform 0.3s ease;
}

.btn-load-more:hover svg {
  transform: translateY(2px);
}

/* Icon animation for loading state */
.btn-load-more.loading svg {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ── PRODUCT MODAL ───────────────────────────────── */
.mo {
  position: fixed; inset: 0; background: rgba(0,0,0,.72);
  backdrop-filter: blur(10px); z-index: 200;
  display: flex; align-items: flex-end;
  opacity: 0; pointer-events: none; transition: opacity .28s;
}
.mo.open { opacity: 1; pointer-events: all; }
.mo-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  width: 100%; max-height: 92dvh; overflow-y: auto;
  padding: 18px 16px 28px;
  transform: translateY(28px);
  transition: transform .3s cubic-bezier(.22,.68,0,1.1); position: relative;
  box-shadow: 0 -8px 40px rgba(14,26,38,.1);
}
.mo.open .mo-box { transform: translateY(0); }
@media(min-width:640px) {
  .mo { align-items: center; justify-content: center; }
  .mo-box { border-radius: var(--radius) !important; max-width: 460px !important; width: 90% !important; padding: 22px 22px 28px; transform: scale(.95) translateY(12px); opacity: 0; transition: transform .3s cubic-bezier(.22,.68,0,1.1), opacity .25s ease; }
  .mo.open .mo-box { transform: none; opacity: 1; }
}
.mo-handle { width: 38px; height: 4px; background: rgba(14,26,38,.15); border-radius: 2px; margin: 0 auto 16px; }
@media(min-width:640px) { .mo-handle { display: none; } }
.mo-x {
  position: absolute; top: 13px; inset-inline-end: 13px;
  background: var(--card); border: 1px solid var(--border); border-radius: 7px;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-muted); transition: all .18s;
}
.mo-x:hover { color: var(--text); background: var(--card-hover); }
.mo-img-wrap { width: 100%; aspect-ratio: 16/9; background: var(--card); border-radius: 9px; overflow: hidden; margin-bottom: 14px; }
.mo-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mo-img-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text-dim); }
.mo-cat   { font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); margin-bottom: 5px; }
.mo-title { font-family: var(--font-display); font-size: 19px; font-weight: 700; margin-bottom: 7px; line-height: 1.25; color: var(--text); }
.mo-price { font-size: 22px; font-weight: 800; margin-bottom: 10px; color: var(--text); }
/* When showing discount markup, the outer #moPrice wraps a badge + price
   row instead of plain text — strip the inherited gradient-clip so the
   badge isn't clipped, and let the inner .mo-price.is-discounted span
   carry its own gradient text instead. */
.mo-price.mo-price-has-disc {
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: initial;
  background-clip: initial;
  margin-bottom: 0;
}

.var-lbl  { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--text-muted); margin-bottom: 7px; }
.var-list { display: flex; flex-direction: column; gap: 7px; margin-bottom: 10px; }
.var-row  { display: flex; align-items: center; justify-content: space-between; background: var(--card); border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; cursor: pointer; transition: all .15s; }
.var-row:hover { border-color: rgba(14,26,38,.3); background: var(--card-hover); }
.var-row.sel   { border-color: var(--accent); background: rgba(14,26,38,.07); }
.vr-name  { font-size: 13px; font-weight: 500; color: var(--text); }
.vr-extra { font-size: 13px; font-weight: 600; color: var(--accent); }
.vr-price-old  { font-size: 11.5px; font-weight: 600; color: var(--text-muted); text-decoration: line-through; }
.vr-price-disc { font-size: 13px; font-weight: 700; color: var(--discount); }

.qty-row  { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.qty-lbl  { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--text-muted); flex: 1; }
.qty-ctrl { display: flex; align-items: center; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.qty-b    { background: none; border: none; padding: 9px 15px; cursor: pointer; color: var(--text); font-size: 17px; line-height: 1; transition: background .15s; font-family: inherit; }
.qty-b:hover { background: var(--card-hover); }
.qty-d    { padding: 9px 11px; font-size: 15px; font-weight: 700; min-width: 34px; text-align: center; border-inline: 1px solid var(--border); color: var(--text); }

/* Quick Order — primary action, one click straight to checkout */
.mo-quick {
  width: 100%; background: var(--gradient-btn); color: #fff; border: none;
  border-radius: var(--radius-sm); padding: 13px; font-family: inherit;
  font-size: 14px; font-weight: 700; cursor: pointer; transition: all .18s;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  box-shadow: 0 4px 14px rgba(14,26,38,.3);
  margin-bottom: 9px;
}
.mo-quick:hover  { filter: brightness(1.1); }
.mo-quick:active { transform: scale(.98); }

/* Add to Order — secondary action, keeps the modal-close/keep-browsing
   flow for people who want to order more than one item */
.mo-add {
  width: 100%; background: transparent; color: var(--text); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px; font-family: inherit;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: all .18s;
  display: flex; align-items: center; justify-content: center; gap: 7px;
}
.mo-add:hover  { background: var(--card-hover); border-color: var(--border-focus); }
.mo-add:active { transform: scale(.98); }

/* ── PRODUCT SHARE BUTTON — small icon in the opposite corner
   from the close (×) button, mirrors its size/shape exactly ── */
.mo-share {
  position: absolute; top: 13px; inset-inline-start: 13px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 7px; width: 28px; height: 28px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); cursor: pointer; transition: all .18s;
  z-index: 1;
}
.mo-share:hover { color: var(--text); background: var(--card-hover); border-color: var(--border-focus); }
.mo-share:active { transform: scale(.94); }
.mo-share.share-copied { background: var(--green-bg); border-color: var(--green); color: var(--green); }

/* ── ORDER BAR ───────────────────────────────────── */
.order-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 150;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  transform: translateY(100%);
  transition: transform .32s cubic-bezier(.22,.68,0,1.1);
  box-shadow: 0 -4px 24px rgba(14,26,38,.1);
}
.order-bar.visible { transform: translateY(0); }
@media(min-width:640px)  { .order-bar { padding: 12px 24px; } }
@media(min-width:1024px) { .order-bar { padding: 12px 40px; } }

.ob-inner   { max-width: 1400px; margin: 0 auto; display: flex; align-items: center; gap: 10px; }
.ob-summary { flex: 1; min-width: 0; }
.ob-count   { font-size: 11px; color: var(--text-muted); margin-bottom: 1px; }
.ob-count b { color: var(--accent); }
.ob-total   { font-size: 18px; font-weight: 800; color: var(--text); white-space: nowrap; }
.ob-preview { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ob-clear {
  background: none; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 9px 11px; color: var(--text-muted); cursor: pointer; transition: all .18s;
  font-family: inherit; font-size: 12px; flex-shrink: 0; white-space: nowrap;
}
.ob-clear:hover { color: var(--red); border-color: rgba(220,38,38,.3); }
.ob-btn {
  background: var(--gradient-btn); color: #fff; border: none;
  border-radius: var(--radius-sm); padding: 11px 18px;
  font-family: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all .18s; white-space: nowrap;
  box-shadow: 0 3px 12px rgba(14,26,38,.3);
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
}
.ob-btn:hover { filter: brightness(1.1); }

/* ── CHECKOUT MODAL ──────────────────────────────── */
.co {
  position: fixed; inset: 0; background: rgba(30,40,70,.45);
  backdrop-filter: blur(10px); z-index: 300;
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .28s;
}
.co.open { opacity: 1; pointer-events: all; }
.co-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  width: 100%; max-width: 520px; max-height: 92dvh; overflow-y: auto;
  padding: 18px 16px 32px;
  transform: translateY(28px);
  transition: transform .3s cubic-bezier(.22,.68,0,1.1); position: relative;
  box-shadow: 0 -8px 40px rgba(14,26,38,.1);
}
.co.open .co-box { transform: translateY(0); }
@media(min-width:640px) {
  .co { align-items: center; }
  .co-box { border-radius: var(--radius) !important; padding: 24px; transform: scale(.95) translateY(12px); opacity: 0; transition: transform .3s cubic-bezier(.22,.68,0,1.1), opacity .25s ease; }
  .co.open .co-box { transform: none; opacity: 1; }
}
.co-hd    { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.co-title { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--text); }
.co-x {
  background: var(--card); border: 1px solid var(--border); border-radius: 7px;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-muted); transition: all .18s;
}
.co-x:hover { color: var(--text); background: var(--card-hover); }

.co-items    { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.ci          { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 11px; display: flex; gap: 9px; align-items: flex-start; }
.ci-info     { flex: 1; min-width: 0; }
.ci-name     { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-var      { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.ci-price    { font-size: 13px; font-weight: 700; color: var(--accent); margin-top: 3px; }
.ci-rm       { background: none; border: none; color: var(--text-dim); cursor: pointer; padding: 2px; transition: color .15s; flex-shrink: 0; }
.ci-rm:hover { color: var(--red); }

.co-total-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; padding: 11px 13px; background: var(--card); border-radius: var(--radius-sm); border: 1px solid var(--border); }
.co-total-lbl { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.co-total-val { font-size: 20px; font-weight: 800; color: var(--text); }

.sec-lbl { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--text-muted); margin-bottom: 11px; display: flex; align-items: center; gap: 7px; }
.sec-lbl::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── FORM FIELDS ─────────────────────────────────── */
.co-form  { display: flex; flex-direction: column; gap: 10px; }
.fi-g     { display: flex; flex-direction: column; gap: 4px; }
.fi-l     { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); }
.fi-i {
  background: #F2F4F7; border: 1px solid var(--border);
  border-radius: var(--radius-xs); padding: 12px 13px;
  color: var(--text); font-family: inherit; font-size: 14px;
  outline: none; transition: border-color .18s, background .18s, box-shadow .18s; -webkit-appearance: none;
}
.fi-i:focus { border-color: var(--border-focus); background: #fff; box-shadow: 0 0 0 3px rgba(14,26,38,.1); }
.fi-i::placeholder { color: var(--text-ph); }

/* ── Select dropdown wrapper (wilaya / daira) ────── */
.fi-sel-wrap { position: relative; display: flex; align-items: center; }
.fi-sel-wrap .fi-sel { width: 100%; padding-right: 32px; cursor: pointer; appearance: none; -webkit-appearance: none; }
.fi-sel-wrap .fi-sel:disabled { opacity: .5; cursor: not-allowed; background: #f0f2f8; }
.fi-sel-chev { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--text-muted); display: flex; }
[dir="rtl"] .fi-sel-wrap .fi-sel { padding-right: 13px; padding-left: 32px; }
[dir="rtl"] .fi-sel-chev { right: auto; left: 11px; }

.fi-row       { display: flex; gap: 8px; }
.fi-row .fi-g { flex: 1; min-width: 0; }
.pl-btn {
  width: 100%; background: var(--gradient-btn); color: #fff; border: none;
  border-radius: var(--radius-sm); padding: 13px; font-family: inherit;
  font-size: 14px; font-weight: 700; cursor: pointer; transition: all .18s;
  box-shadow: 0 3px 12px rgba(14,26,38,.3); margin-top: 4px;
}
.pl-btn:hover    { filter: brightness(1.1); }
.pl-btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }

/* ── ORDER SUCCESS ───────────────────────────────── */
.ord-ok   { text-align: center; padding: 20px 0 8px; }
.ok-icon  { width: 56px; height: 56px; background: var(--green-bg); border: 1px solid rgba(22,163,74,.3); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.ok-title { font-size: 18px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.ok-ref   { font-size: 12px; color: var(--text-muted); }
.ok-ref b { color: var(--accent); }

/* ── TOAST ───────────────────────────────────────── */
.toast {
  position: fixed; bottom: 80px; left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--surface); border: 1px solid var(--border);
  padding: 10px 16px; border-radius: 9px; font-size: 13px; font-weight: 500;
  box-shadow: 0 8px 28px rgba(14,26,38,.12);
  opacity: 0; transition: all .28s; z-index: 9999;
  white-space: nowrap; max-width: calc(100vw - 28px); overflow: hidden; text-overflow: ellipsis; pointer-events: none;
}
.toast.show    { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { border-color: rgba(22,163,74,.35);   color: var(--green); }
.toast.error   { border-color: rgba(220,38,38,.35);   color: var(--red); }
.toast.info    { border-color: rgba(14,26,38,.3);    color: var(--accent); }
/* ── FOOTER ──────────────────────────────────────── */
.cat-footer {
  margin-top: 48px;
  padding: 24px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.cat-footer-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: inherit;
  transition: opacity .18s;
}
.cat-footer-logo:hover { opacity: .8; }
.cat-footer-img {
  width: 36px; height: 36px;
  border-radius: 9px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}
.cat-footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.cat-footer-name  { font-size: 15px; font-weight: 700; color: var(--text); }
.cat-footer-tag   { font-size: 11px; color: var(--text-muted); }
.cat-footer-copy  { font-size: 11px; color: var(--text-dim); line-height: 1.5; }

/* ── TRACK ORDER MODAL ────────────────────────────── */
.tr { position: fixed; inset: 0; z-index: 600; display: flex; align-items: flex-end; justify-content: center; background: rgba(0,0,0,0); pointer-events: none; transition: background .28s; }
.tr.open { background: rgba(30,40,70,.4); pointer-events: all; }
.tr-box {
  background: var(--surface); border-radius: 18px 18px 0 0;
  width: 100%; max-width: 520px; max-height: 80dvh; overflow-y: auto;
  padding: 18px 16px 36px;
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.22,.68,0,1.1);
  box-shadow: 0 -8px 40px rgba(14,26,38,.1);
}
.tr.open .tr-box { transform: translateY(0); }
@media(min-width:640px) {
  .tr { align-items: center; }
  .tr-box { border-radius: var(--radius) !important; padding: 24px; transform: scale(.95) translateY(12px); opacity: 0; max-height: 70dvh; transition: transform .3s cubic-bezier(.22,.68,0,1.1), opacity .25s ease; }
  .tr.open .tr-box { transform: none; opacity: 1; }
}
.tr-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.tr-title { font-size: 17px; font-weight: 700; color: var(--text); }
.tr-x {
  background: var(--card); border: 1px solid var(--border); border-radius: 7px;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-muted); transition: all .18s;
}
.tr-x:hover { color: var(--text); background: var(--card-hover); }
.tr-inp-row { display: flex; gap: 8px; margin-bottom: 14px; }
.tr-inp {
  flex: 1;
  background: #F2F4F7; border: 1px solid var(--border);
  border-radius: var(--radius-xs); padding: 12px 13px;
  color: var(--text); font-family: inherit; font-size: 14px;
  outline: none; transition: border-color .18s; -webkit-appearance: none;
}
.tr-inp::placeholder { color: var(--text-ph); }
.tr-inp:focus { border-color: var(--border-focus); }
.tr-go {
  background: var(--gradient-btn); color: #fff; border: none;
  border-radius: var(--radius-xs); padding: 11px 16px;
  font-family: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: filter .18s; white-space: nowrap;
}
.tr-go:hover { filter: brightness(1.1); }
.tr-go:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.tr-result { min-height: 60px; }
.tr-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px;
}
.tr-ref  { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 10px; }
.tr-row  { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.tr-row:last-child { border-bottom: none; }
.tr-lbl  { color: var(--text-muted); font-size: 12px; }
.tr-val  { color: var(--text); font-weight: 600; }
.tr-status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 700;
}
.trs-pending   { background: rgba(234,179,8,.1);  color: #ca8a04; border: 1px solid rgba(234,179,8,.25); }
.trs-confirmed { background: rgba(22,163,74,.1);  color: #16a34a; border: 1px solid rgba(22,163,74,.25); }
.trs-cancelled { background: rgba(220,38,38,.1);  color: #dc2626; border: 1px solid rgba(220,38,38,.25); }
.trs-processing{ background: rgba(14,26,38,.1);  color: var(--accent); border: 1px solid rgba(14,26,38,.25); }
.tr-empty { text-align: center; padding: 24px 0; color: var(--text-muted); font-size: 13px; }

/* ═══════════════════════════════════════════════════════════
   catalog.css — TRACK FEATURE ADDITIONS
   Append these rules to the bottom of your existing catalog.css
   (or paste after the last .tr-* block around line 664)
═══════════════════════════════════════════════════════════ */

/* Multiple-orders count label */
.tr-orders-count {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* Space between multiple cards */
.tr-card + .tr-card {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 2px solid var(--border);
}

/* Items section inside a card */
.tr-items-section {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.tr-items-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 6px;
}

.tr-item-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 4px 0;
  font-size: 12.5px;
  border-bottom: 1px dashed var(--border);
}

.tr-item-row:last-child {
  border-bottom: none;
}

.tr-item-name {
  color: var(--text);
  flex: 1;
  padding-right: 8px;
  line-height: 1.3;
}

.tr-var {
  color: var(--text-muted);
  font-size: 11px;
}

.tr-item-qty-price {
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
  font-size: 12px;
}

/* ── ORDER SUCCESS — improved ─────────────────────── */
.ord-ok   { text-align: center; padding: 20px 0 8px; }
.ok-icon  { width: 56px; height: 56px; background: var(--green-bg); border: 1px solid rgba(22,163,74,.3); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.ok-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.ok-ref-box {
  background: #F2F4F7; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 16px; margin: 12px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.ok-ref-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: .7px; color: var(--text-muted); margin-bottom: 3px; }
.ok-ref-val { font-size: 18px; font-weight: 800; color: var(--accent); letter-spacing: 1px; }
.ok-copy-btn {
  background: var(--card-hover); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 12px; font-family: inherit;
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  cursor: pointer; transition: all .18s; white-space: nowrap; flex-shrink: 0;
}
.ok-copy-btn:hover { color: var(--accent); border-color: var(--border-focus); }
.ok-copy-btn.copied { color: var(--green); border-color: rgba(22,163,74,.4); }
.ok-sub  { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin-top: 8px; }
.ok-track-link {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 14px; padding: 9px 18px;
  background: rgba(14,26,38,.08); border: 1px solid rgba(14,26,38,.2);
  border-radius: 20px; color: var(--accent);
  font-size: 12px; font-weight: 600; cursor: pointer; transition: all .18s;
}
.ok-track-link:hover { background: rgba(14,26,38,.14); }

/* Searchable Select Styles */
.searchable-select {
    position: relative;
    width: 100%;
}
.searchable-select-input {
    width: 100%; background: #F2F4F7; border: 1px solid var(--border);
    border-radius: var(--radius-xs); padding: 12px 13px;
    color: var(--text); font-family: inherit; font-size: 14px;
    outline: none; transition: all .18s;
}
.searchable-select-input:focus {
    border-color: var(--border-focus); background: #fff;
    box-shadow: 0 0 0 3px rgba(14,26,38,.1);
}
.searchable-select-dropdown {
    position: absolute; top: 100%; left: 0; right: 0;
    max-height: 260px; overflow-y: auto;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-xs); box-shadow: 0 8px 24px rgba(0,0,0,.15);
    z-index: 1000; display: none;
}
.searchable-select-dropdown option {
    display: block; padding: 10px 13px; cursor: pointer;
    font-size: 13px; color: var(--text);
}
.searchable-select-dropdown option:hover { background: var(--card-hover); }
.searchable-select-dropdown optgroup {
    font-weight: 700; color: var(--accent);
    padding: 8px 13px; background: rgba(14,26,38,.05);
}
.searchable-select-dropdown optgroup option {
    padding-left: 26px; font-weight: normal;
}

/* ── SEARCHABLE SELECT STYLES (added) ───────────────────── */
.searchable-select {
    position: relative;
    width: 100%;
}
.searchable-select-input {
    width: 100%;
    background: #F2F4F7;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    padding: 12px 13px;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color .18s, background .18s;
    cursor: text;
}
.searchable-select-input:focus {
    border-color: var(--border-focus);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(14,26,38,.1);
}
.searchable-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 260px;
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
    z-index: 1000;
    display: none;
}
.searchable-select-dropdown option {
    display: block;
    padding: 10px 13px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text);
}
.searchable-select-dropdown option:hover {
    background: var(--card-hover);
}
.searchable-select-dropdown optgroup {
    font-weight: 700;
    color: var(--accent);
    padding: 8px 13px;
    background: rgba(14,26,38,.05);
}
.searchable-select-dropdown optgroup option {
    padding-left: 26px;
    font-weight: normal;
}
.hidden-select {
    display: none;
}
.fi-sel-search-wrap {
    margin-bottom: 10px;
}

/* Multi-order header in track modal */
.tr-multi-header {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    padding: 8px 0 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
}

/* ═══════════════════════════════════════════════════════════
   ENHANCED CHECKOUT MODAL STYLES - Professional UI
═══════════════════════════════════════════════════════════ */

/* 2-column layout for form fields */
.fi-row-2col {
    display: flex;
    gap: 12px;
    margin-bottom: 0;
}

.fi-row-2col .fi-g {
    flex: 1;
    min-width: 0;
}

/* Enhanced select wrapper */
.fi-sel-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.fi-sel-wrap .fi-sel {
    width: 100%;
    padding: 13px 36px 13px 16px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.fi-sel-wrap .fi-sel:hover:not(:disabled) {
    border-color: var(--accent-light);
}

.fi-sel-wrap .fi-sel:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(14,26,38,0.1);
    outline: none;
}

.fi-sel-wrap .fi-sel:disabled {
    background: #f5f7fb;
    cursor: not-allowed;
    opacity: 0.7;
}

.fi-sel-chev {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

[dir="rtl"] .fi-sel-chev {
    right: auto;
    left: 14px;
}

/* Enhanced text input */
.fi-i {
    background: #F2F4F7;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 13px 16px;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    outline: none;
    transition: all 0.2s ease;
    width: 100%;
}

.fi-i:hover:not(:disabled) {
    border-color: var(--accent-light);
}

.fi-i:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(14,26,38,0.1);
    background: #ffffff;
}

.fi-i::placeholder {
    color: var(--text-ph);
    font-weight: 400;
}

/* Textarea specific */
.fi-ta {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    line-height: 1.5;
}

/* Form group spacing */
.fi-g {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

/* Labels */
.fi-l {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.fi-l::before {
    content: '';
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    display: inline-block;
}

/* Total card - redesigned */
.co-total-card {
    background: linear-gradient(135deg, #F2F4F7 0%, #F2F4F7 100%);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(14,26,38,0.05);
}

.co-total-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.co-total-lbl {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.co-total-val {
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
}

/* Actions container */
.co-actions {
    margin-top: 8px;
}

/* Place order button - enhanced */
.pl-btn {
    width: 100%;
    background: var(--gradient-btn);
    color: #fff;
    border: none;
    border-radius: 14px;
    padding: 16px 20px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(14,26,38,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.pl-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.pl-btn:hover::before {
    width: 300px;
    height: 300px;
}

.pl-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(14,26,38,0.4);
}

.pl-btn:active {
    transform: translateY(1px);
}

.pl-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    filter: none;
    transform: none;
}

.pl-btn svg {
    width: 18px;
    height: 18px;
}

/* Cart items - enhanced */
.co-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 4px;
}

/* Custom scrollbar for cart items */
.co-items::-webkit-scrollbar {
    width: 5px;
}

.co-items::-webkit-scrollbar-track {
    background: var(--border);
    border-radius: 10px;
}

.co-items::-webkit-scrollbar-thumb {
    background: var(--accent-light);
    border-radius: 10px;
}

.ci {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    transition: all 0.2s ease;
}

.ci:hover {
    border-color: rgba(14,26,38,0.3);
    box-shadow: 0 2px 8px rgba(14,26,38,0.08);
}

.ci-thumb {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 10px;
    object-fit: cover;
    background: var(--card);
    border: 1px solid var(--border);
}

.ci-thumb-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
}
.ci-thumb-ph svg { width: 22px; height: 22px; }

.ci-info {
    flex: 1;
    min-width: 0;
}

.ci-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    line-height: 1.3;
}

.ci-var {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 500;
}

.ci-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    background: rgba(14,26,38,0.08);
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
}

.ci-rm {
    background: rgba(220,38,38,0.08);
    border: none;
    border-radius: 10px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--red);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.ci-rm:hover {
    background: rgba(220,38,38,0.15);
    transform: scale(1.05);
}

.ci-rm svg {
    width: 14px;
    height: 14px;
}

/* Section label enhanced */
.sec-lbl {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin: 20px 0 16px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sec-lbl::before {
    content: '';
    width: 4px;
    height: 18px;
    background: var(--accent);
    border-radius: 4px;
    display: inline-block;
}

.sec-lbl::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border) 0%, transparent 100%);
}

/* Modal box improvements */
.co-box {
    background: var(--surface);
    border: none;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -20px 40px rgba(0,0,0,0.1);
}

@media(min-width:640px) {
    .co-box {
        border-radius: 24px !important;
        box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    }
}

/* Order success screen improvements */
.ord-ok {
    text-align: center;
    padding: 24px 0 16px;
}

.ok-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--green-bg) 0%, rgba(22,163,74,0.12) 100%);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 20px rgba(22,163,74,0.2);
}

.ok-icon svg {
    width: 32px;
    height: 32px;
}

.ok-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text);
}

.ok-ref-box {
    background: linear-gradient(135deg, #F2F4F7 0%, #EBEEF1 100%);
    border: 1px solid rgba(14,26,38,0.2);
    border-radius: 16px;
    padding: 16px 20px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ok-ref-lbl {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.ok-ref-val {
    font-size: 20px;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 0.5px;
    font-family: monospace;
}

.ok-copy-btn {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 40px;
    padding: 8px 18px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ok-copy-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(14,26,38,0.05);
}

.ok-copy-btn.copied {
    color: var(--green);
    border-color: var(--green);
    background: rgba(22,163,74,0.08);
}

.ok-sub {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-top: 12px;
}

.ok-track-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 12px 24px;
    background: rgba(14,26,38,0.08);
    border: 1px solid rgba(14,26,38,0.2);
    border-radius: 40px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ok-track-link:hover {
    background: rgba(14,26,38,0.14);
    transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════
   SHIPPING / DELIVERY UI
═══════════════════════════════════════════════════════════ */

/* Hint shown in place of the delivery options before a wilaya
   is picked, while rates are loading, or when delivery isn't
   available for the chosen wilaya. */
.delivery-hint {
    font-size: 12.5px;
    color: var(--text-muted);
    background: var(--card-hover);
    border: 1px dashed var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    text-align: center;
}
.delivery-hint-warn {
    color: var(--red);
    background: var(--red-bg);
    border-color: rgba(220,38,38,0.25);
    border-style: solid;
}

.delivery-box {
    display: flex;
    flex-direction: row;
    gap: 8px;
}

.dv-opt {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 5px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 10px 8px;
    cursor: pointer;
    transition: all 0.18s ease;
    position: relative;
}
.dv-opt:hover { border-color: var(--accent-light); }
.dv-opt.active {
    border-color: var(--accent);
    background: rgba(14,26,38,0.05);
    box-shadow: 0 0 0 3px rgba(14,26,38,0.08);
}
.dv-opt input[type="radio"] {
    position: absolute;
    top: 8px;
    inset-inline-end: 8px;
    accent-color: var(--accent);
    width: 14px;
    height: 14px;
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
}
.dv-opt-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 9px;
    background: rgba(14,26,38,0.08);
    color: var(--accent);
    transition: background .18s ease, color .18s ease;
}
.dv-opt.active .dv-opt-icon {
    background: var(--accent);
    color: #fff;
}
.dv-opt-lbl {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.25;
}
.dv-opt-price {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
}
.dv-opt-free {
    color: var(--green-dark);
}

/* Subtotal / shipping / grand total breakdown card in checkout */
.co-line-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    padding: 4px 0;
}
.co-line-val { font-weight: 600; color: var(--text); }
.co-grand-row {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
}

/* Shipping breakdown on the order-confirmation screen */
.ok-breakdown {
    background: var(--card-hover);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
    margin: 16px 0;
    text-align: left;
}
[dir="rtl"] .ok-breakdown { text-align: right; }
.ok-bd-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
    padding: 4px 0;
}
.ok-bd-row span:last-child { font-weight: 600; color: var(--text); }
.ok-bd-total {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
    font-weight: 700;
}
.ok-bd-total span:last-child {
    color: var(--accent);
    font-size: 15px;
    font-weight: 800;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    /* Wilaya / Commune stay in the same row even on small screens —
       just tighten the gap and inner padding so both fit comfortably. */
    .fi-row-2col {
        gap: 8px;
    }
    .fi-row-2col .fi-sel-wrap .fi-sel {
        padding-left: 10px;
        padding-right: 28px;
        font-size: 13px;
    }

    .co-total-val {
        font-size: 24px;
    }
    
    .co-total-card {
        padding: 12px 16px;
    }
    
    .pl-btn {
        padding: 14px 18px;
        font-size: 14px;
    }
    
    .ci {
        padding: 12px;
    }
}

/* ═══════════════════════════════════════════════════════════
   TRACK ORDER MODAL - APPLE STYLE SYSTEM ICONS
═══════════════════════════════════════════════════════════ */

/* Track modal container */
.tr {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  pointer-events: none;
  transition: background 0.3s ease;
}

.tr.open {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  pointer-events: all;
}

/* Track modal box */
.tr-box {
  background: var(--surface);
  border-radius: 28px 28px 0 0;
  width: 100%;
  max-width: 560px;
  max-height: 85dvh;
  overflow-y: auto;
  padding: 20px 20px 32px;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.1);
}

.tr.open .tr-box {
  transform: translateY(0);
}

@media (min-width: 640px) {
  .tr {
    align-items: center;
  }
  .tr-box {
    border-radius: 28px !important;
    padding: 24px;
    transform: scale(0.96) translateY(20px);
    opacity: 0;
    max-height: 80dvh;
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1), opacity 0.25s ease;
  }
  .tr.open .tr-box {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* Header */
.tr-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.tr-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tr-x {
  background: rgba(0, 0, 0, 0.05);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.tr-x:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--text);
  transform: scale(1.02);
}

/* Search input row */
.tr-inp-row {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.tr-inp {
  flex: 1;
  background: #f5f5f7;
  border: none;
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: all 0.2s ease;
}

.tr-inp:focus {
  background: #fff;
  box-shadow: 0 0 0 4px rgba(14, 26, 38, 0.15);
}

.tr-inp::placeholder {
  color: #8e8e93;
  font-weight: 400;
}

.tr-go {
  background: var(--gradient-btn);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tr-go:hover {
  opacity: 0.9;
  transform: scale(0.98);
}

.tr-go:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Results area */
.tr-result {
  min-height: 100px;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Order card */
.tr-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
  transition: all 0.2s ease;
}

.tr-card:hover {
  border-color: rgba(14, 26, 38, 0.2);
  background: var(--card-hover);
}

/* Order reference */
.tr-ref {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tr-ref strong {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

/* Status pill - clean style */
.tr-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.trs-processing {
  background: rgba(14, 26, 38, 0.1);
  color: var(--accent);
}

.trs-confirmed {
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
}

.trs-cancelled {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

/* Info rows */
.tr-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.tr-row:last-child {
  border-bottom: none;
}

.tr-lbl {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

.tr-val {
  color: var(--text);
  font-weight: 500;
}

.tr-total-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
}

/* Items section */
.tr-items-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.tr-items-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 10px;
}

.tr-item-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px dashed var(--border);
}

.tr-item-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.tr-item-name {
  color: var(--text);
  flex: 1;
  padding-right: 12px;
  line-height: 1.4;
  font-weight: 500;
}

.tr-var {
  color: var(--text-muted);
  font-size: 11px;
  display: block;
  margin-top: 2px;
}

.tr-item-qty-price {
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
  font-size: 12px;
}

/* Empty state */
.tr-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 14px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 16px;
}

/* Multi-order header */
.tr-multi-header {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 0 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}

/* ── PHONE BUTTON — responsive (icon only on mobile) ── */
.hd-phone-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 55%, var(--green-bright) 100%);
  border: none;
  border-radius: 999px;
  padding: 0;
  width: 38px;
  height: 38px;
  color: #fff;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1px;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 3px 14px rgba(34,197,94,.45), 0 0 0 1px rgba(34,197,94,.15);
  margin-inline-start: auto;
  transition: filter .18s, transform .18s, box-shadow .18s;
  cursor: pointer;
}

/* Phone label - hidden on mobile, shown on tablet/desktop */
.hd-phone-lbl {
  display: none;
}

/* On tablets and desktop, show full button with text */
@media (min-width: 480px) {
  .hd-phone-btn {
    padding: 0 16px 0 11px;
    width: auto;
    gap: 7px;
  }
  
  .hd-phone-lbl {
    display: inline;
  }
}

/* Optional: For very small screens, make icon slightly smaller */
@media (max-width: 360px) {
  .hd-phone-btn {
    width: 34px;
    height: 34px;
  }
  
  .hd-phone-btn svg {
    width: 13px;
    height: 13px;
  }
}

.hd-phone-btn svg {
  flex-shrink: 0;
}

.hd-phone-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(34,197,94,.6);
}

.hd-phone-btn:active {
  transform: scale(.97);
}

.hd-phone-btn + .lang-dd {
  margin-inline-start: 8px;
}

/* ── HEADER responsive improvements ── */
.hd-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 58px;
  padding: 0 12px;
}

@media (min-width: 480px) {
  .hd-inner {
    gap: 10px;
    padding: 0 16px;
  }
}

@media (min-width: 640px) {
  .hd-inner {
    height: 64px;
    padding: 0 24px;
    gap: 12px;
  }
}

@media (min-width: 1024px) {
  .hd-inner {
    padding: 0 40px;
  }
}

/* Brand - ensure it doesn't overflow */
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 1;
  overflow: hidden;
  min-width: 0;
}

@media (min-width: 480px) {
  .brand {
    gap: 9px;
    max-width: 260px;
  }
}

.brand-logo {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background: var(--gradient);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  box-shadow: 0 3px 14px rgba(14,26,38,0.45);
  overflow: hidden;
}

@media (min-width: 480px) {
  .brand-logo {
    width: 40px;
    height: 40px;
    font-size: 17px;
  }
}

/* When a real store logo image is loaded, drop the dark fallback
   background/shadow entirely — that background is only meant for the
   plain-letter placeholder, not to sit behind an actual logo image. */
#bLogo.brand-logo-has-img,
.brand-logo.brand-logo-has-img {
  background: transparent;
  box-shadow: none;
}

.brand-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -.3px;
}

@media (min-width: 480px) {
  .brand-name {
    font-size: 18px;
  }
}

@media (min-width: 640px) {
  .brand-name {
    font-size: 20px;
  }
}

/* Brand info - hide on very small screens if needed */
.brand-info {
  font-size: 10px;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 4px;
  flex-wrap: wrap;
  overflow: visible;
  line-height: 1.3;
}

@media (max-width: 480px) {
  .brand-info {
    display: none; /* Hide address on very small screens */
  }
}

@media (min-width: 640px) {
  .brand-info {
    font-size: 11px;
  }
}






/* ═══════════════════════════════════════════════════
   MODERN PRODUCT CARD REDESIGN
═══════════════════════════════════════════════════ */

/* Grid spacing for the new cards — mobile always gets 2 columns,
   scaling up at wider breakpoints instead of auto-fill collapsing to 1. */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 20px 14px;
  max-width: 1400px;
  margin: 0 auto;
}
@media(min-width:480px)  { .grid { gap: 16px; } }
@media(min-width:640px)  { .grid { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
@media(min-width:960px)  { .grid { grid-template-columns: repeat(4, 1fr); gap: 20px; } }
@media(min-width:1280px) { .grid { grid-template-columns: repeat(5, 1fr); gap: 20px; } }

/* Base Card Container */
.pc {
  background: var(--surface);
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 20px; /* Modern rounded corners */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  position: relative;
  text-decoration: none;
  cursor: pointer;
}

/* Smooth hover lift effect */
.pc:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 28px -10px rgba(15, 23, 42, 0.16);
  border-color: rgba(14, 26, 38, 0.28);
}

.pc-unavail {
  opacity: 0.65;
  filter: grayscale(0.6);
}

/* Image Wrapper: 1:1 Aspect Ratio with zoom on hover */
.pc-img-wrap {
  position: relative;
  width: 100%;
  padding-top: 100%; 
  background: #ffffff;
  overflow: hidden;
  border-bottom: 1px solid rgba(15, 23, 42, 0.07);
}

.pc-img, .pc-img-ph {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.5s ease;
}

.pc:hover .pc-img {
  transform: scale(1.06);
}

/* No-image placeholder: a soft tinted surface with a centered icon
   badge, so the tile reads as an intentional "no photo yet" state
   rather than empty space — and gives the discount ribbon a clear
   surface to land on instead of floating over a blank void. */
.pc-img-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  background:
    radial-gradient(circle at 50% 42%, rgba(15,23,42,0.05) 0%, transparent 60%),
    linear-gradient(180deg, #f8fafc 0%, #eef1f6 100%);
}
.pc-img-ph::before {
  content: '';
  position: absolute;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.045);
}
.pc-img-ph svg { position: relative; }
.pc-svc-ph {
  background:
    radial-gradient(circle at 50% 42%, rgba(124,58,237,0.07) 0%, transparent 60%),
    linear-gradient(180deg, #faf8ff 0%, #f2ecfd 100%);
}
.pc-svc-ph::before { background: rgba(124, 58, 237, 0.09); }

/* ── FLOATING GLASSMORPHISM BADGES ── */
.cat-chip {
  position: absolute;
  left: 12px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  z-index: 2;
}

/* ── DISCOUNT RIBBON: hanging corner tag, distinct from the
   rounded pill category chip — die-cut sticker silhouette with
   a folded "tail" and a soft pulse so it reads as special. ──── */
.disc-ribbon {
  position: absolute;
  top: 0;
  inset-inline-end: 16px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--discount-gradient);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .3px;
  text-transform: uppercase;
  padding: 7px 11px 8px;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 6px 14px -2px rgba(225,29,72,.5);
  z-index: 3;
  max-width: calc(100% - 32px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  animation: ribbonPulse 2.6s ease-in-out infinite;
}
.disc-ribbon svg { flex-shrink: 0; }
.disc-ribbon-txt {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
/* folded paper tail beneath the tag for a die-cut sticker feel */
.disc-ribbon::after {
  content: '';
  position: absolute;
  bottom: -6px;
  inset-inline-end: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 0 0 6px 6px;
  border-color: transparent transparent var(--discount-dark) transparent;
  filter: brightness(.7);
}
[dir="rtl"] .disc-ribbon::after { border-width: 0 6px 6px 0; }
@keyframes ribbonPulse {
  0%, 100% { box-shadow: 0 6px 14px -2px rgba(225,29,72,.5); }
  50%      { box-shadow: 0 6px 18px -1px rgba(225,29,72,.75); }
}
@media (prefers-reduced-motion: reduce) { .disc-ribbon { animation: none; } }

/* Badge — service products only (physical "available" badge removed,
   the catalog only lists in-stock items so it added no information). */
.av-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.b-service {
  background: var(--svc-bg);
  color: var(--svc);
  border: 1px solid var(--svc-border);
}

/* ── ACTION BUTTONS ──
   Solid, filled by default — the button must look tappable at rest,
   not only after a hover/press state reveals its color. */
.pc-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: 1px solid transparent;
  padding: 12px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  margin-top: 4px;
  box-shadow: 0 2px 8px rgba(14, 26, 38, 0.22);
}

.pc-add:not(:disabled):hover {
  background: var(--accent-dark);
  box-shadow: 0 4px 14px rgba(14, 26, 38, 0.3);
}

.pc-add:not(:disabled):active {
  transform: scale(.97);
  box-shadow: 0 2px 6px rgba(14, 26, 38, 0.25);
}

.pc-add:disabled {
  opacity: 1;
  cursor: not-allowed;
  background: var(--bg);
  color: var(--text-muted);
  border-color: var(--border);
  box-shadow: none;
}

/* Service "Book" button — solid purple, same filled treatment as
   Add to Order so it's unmistakably a primary action, just carrying
   the service identity color instead of the blue accent. */
.pc-book {
  background: var(--svc-btn);
  color: #fff;
  border: 1px solid transparent;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.22);
}

.pc-book:not(:disabled):hover {
  filter: brightness(1.08);
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
}

.pc-book:not(:disabled):active {
  transform: scale(.97);
}