/* ==========================================================================
   Shopping Website Builder — storefront + owner admin styles.
   Relies on app.css design tokens; adds --shop-accent theming per store.
   RTL-first via CSS logical properties. Light + dark via app.css vars.
   ========================================================================== */

.shop-scope {
  --shop-accent: var(--primary);
  --shop-accent-rgb: 37, 99, 235;
  --shop-accent-soft: rgba(var(--shop-accent-rgb), .12);
}

/* ---------- Generic bits ---------- */
.shop-container { width: min(1180px, 100% - 2rem); margin-inline: auto; }
.shop-container-narrow { width: min(880px, 100% - 2rem); }
.shop-muted { color: var(--muted); font-size: .88rem; }
.shop-danger { color: var(--danger, #dc2626); font-weight: 800; }
.shop-warn { color: var(--amber, #d97706); font-weight: 800; }

.shop-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); color: var(--text);
  padding: .6rem 1.1rem; font-weight: 700; font-size: .92rem;
  cursor: pointer; text-decoration: none; transition: all .16s ease;
  font-family: inherit;
}
.shop-btn:hover { transform: translateY(-1px); border-color: var(--border-strong); }
.shop-btn-primary {
  background: var(--shop-accent); border-color: var(--shop-accent); color: #fff;
  box-shadow: 0 6px 18px -8px rgba(var(--shop-accent-rgb), .65);
}
.shop-btn-primary:hover { filter: brightness(1.08); border-color: var(--shop-accent); }
.shop-btn-lg { padding: .8rem 1.6rem; font-size: 1rem; border-radius: 14px; }
.shop-btn-block { width: 100%; }
.shop-btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

.shop-alert {
  display: flex; align-items: center; gap: .55rem;
  border-radius: 12px; padding: .8rem 1rem; margin-block: 1rem;
  font-weight: 600; font-size: .92rem;
  border: 1px solid var(--border); background: var(--surface);
}
.shop-alert-ok { border-color: rgba(16,185,129,.35); color: var(--ok, #059669); background: rgba(16,185,129,.08); }
.shop-alert-err { border-color: rgba(220,38,38,.35); color: var(--danger, #dc2626); background: rgba(220,38,38,.07); }

.shop-empty {
  text-align: center; padding: 3.2rem 1rem; color: var(--muted);
  border: 1px dashed var(--border-strong); border-radius: 16px;
  display: flex; flex-direction: column; align-items: center; gap: .8rem;
}

.shop-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 1.4rem;
}

/* ---------- Storefront header ---------- */
.shop-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.shop-header-inner {
  display: flex; align-items: center; gap: 1rem;
  padding-block: .7rem; flex-wrap: nowrap;
}
.shop-brand {
  display: inline-flex; align-items: center; gap: .55rem;
  text-decoration: none; color: var(--text); font-size: 1.08rem;
  flex-shrink: 0; min-width: 0;
}
.shop-nav-burger { display: none; margin-inline-start: auto; flex-shrink: 0; }
.shop-header-drawer {
  display: flex; align-items: center; gap: 1rem;
  flex: 1; min-width: 0; flex-wrap: nowrap;
}
.shop-header-drawer > .nav-close { display: none; }
.shop-brand-mark {
  display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 12px; background: var(--shop-accent-soft); color: var(--shop-accent);
}
.shop-search {
  display: flex; align-items: center; gap: .5rem; flex: 1; min-width: 140px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: .45rem .95rem; color: var(--muted);
}
.shop-search input {
  flex: 1; border: 0; background: transparent; color: var(--text);
  font-family: inherit; font-size: .92rem; outline: none; min-width: 60px;
}
.shop-brand-logo {
  width: 40px; height: 40px; border-radius: 12px; object-fit: cover;
  border: 1px solid var(--border);
}
.shop-nav {
  display: flex; align-items: center; gap: .15rem; flex-wrap: nowrap; flex-shrink: 0;
}
.shop-nav a {
  text-decoration: none; color: var(--muted); font-weight: 700; font-size: .88rem;
  padding: .4rem .7rem; border-radius: 10px; transition: .15s;
}
.shop-nav a:hover, .shop-nav a:focus { color: var(--shop-accent); background: var(--shop-accent-soft); }
.shop-nav-admin { color: var(--shop-accent) !important; }
.shop-header-actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.shop-share-toggle {
  display: inline-flex; align-items: center; gap: .35rem;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text);
  padding: .45rem .75rem; font-weight: 700; font-size: .82rem;
  cursor: pointer; font-family: inherit; transition: .15s;
}
.shop-share-toggle:hover,
.shop-share-toggle[aria-pressed="true"] {
  border-color: var(--shop-accent); color: var(--shop-accent); background: var(--shop-accent-soft);
}
.shop-share-toggle-label { display: none; }
@media (min-width: 720px) { .shop-share-toggle-label { display: inline; } }
.shop-cart-btn {
  position: relative; display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--shop-accent); color: #fff; text-decoration: none;
  transition: transform .15s;
}
.shop-cart-btn:hover { transform: translateY(-2px); }
.shop-cart-count {
  position: absolute; top: -6px; inset-inline-end: -6px;
  min-width: 20px; height: 20px; border-radius: 999px;
  background: var(--danger, #dc2626); color: #fff;
  font-size: .72rem; font-weight: 800; display: grid; place-items: center;
  padding-inline: 4px; border: 2px solid var(--surface);
}

/* ---------- Hero / Slideshow ---------- */
.shop-hero { padding-block: 2.5rem 1.5rem; }
.shop-hero-inner {
  display: flex; align-items: center; gap: 2rem; justify-content: space-between;
  background:
    radial-gradient(900px 340px at 20% -40%, rgba(var(--shop-accent-rgb), .18), transparent 60%),
    var(--surface);
  border: 1px solid var(--border); border-radius: 24px; padding: 2.4rem 2.6rem;
}
.shop-hero-copy { max-width: 560px; display: flex; flex-direction: column; gap: .8rem; align-items: flex-start; }
.shop-hero-kicker {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--shop-accent-soft); color: var(--shop-accent);
  border-radius: 999px; padding: .35rem .9rem; font-size: .82rem; font-weight: 800;
}
.shop-hero h1 { margin: 0; font-size: clamp(1.7rem, 4vw, 2.6rem); line-height: 1.15; }
.shop-hero p { margin: 0; color: var(--muted); font-size: 1.02rem; }
.shop-hero-art { color: var(--shop-accent); opacity: .25; flex-shrink: 0; }

.shop-slideshow { position: relative; margin-block: 1.2rem 0; }
.shop-slides { position: relative; border-radius: 22px; overflow: hidden; min-height: clamp(240px, 38vw, 360px); }
.shop-slide {
  position: absolute; inset: 0; opacity: 0; pointer-events: none;
  transition: opacity .55s ease; color: #fff;
  display: flex; align-items: center;
}
.shop-slide.is-active { position: relative; opacity: 1; pointer-events: auto; }
.shop-slide-inner {
  padding-block: 2.6rem; max-width: 640px;
  display: flex; flex-direction: column; align-items: flex-start; gap: .85rem;
}
.shop-slide h1 { margin: 0; font-size: clamp(1.7rem, 4vw, 2.7rem); line-height: 1.15; color: #fff; }
.shop-slide p { margin: 0; color: rgba(255,255,255,.88); font-size: 1.05rem; }
.shop-slide .shop-btn-primary { background: #fff; color: var(--shop-accent); border-color: #fff; }
.shop-slide-dots {
  position: absolute; inset-inline: 0; bottom: .9rem;
  display: flex; justify-content: center; gap: .45rem; z-index: 2;
}
.shop-slide-dot {
  width: 9px; height: 9px; border-radius: 999px; border: 0; cursor: pointer;
  background: rgba(255,255,255,.45); padding: 0;
}
.shop-slide-dot.is-active { background: #fff; width: 22px; }

/* ---------- Category chips ---------- */
.shop-cats { padding-block: .4rem; }
.shop-cats-inner {
  display: flex; gap: .5rem; overflow-x: auto; padding-block: .5rem;
  scrollbar-width: thin;
}
.shop-cat-chip {
  display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap;
  border: 1px solid var(--border); border-radius: 999px;
  padding: .45rem 1rem; text-decoration: none; color: var(--muted);
  font-weight: 700; font-size: .88rem; background: var(--surface);
  transition: all .15s;
}
.shop-cat-chip small { opacity: .7; }
.shop-cat-chip:hover { color: var(--shop-accent); border-color: var(--shop-accent); }
.shop-cat-chip.active { background: var(--shop-accent); border-color: var(--shop-accent); color: #fff; }

/* ---------- Sections / grid / cards ---------- */
.shop-section { padding-block: 1.6rem 2.6rem; }
.shop-section-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap;
}
.shop-section-head h2 { margin: 0; display: inline-flex; align-items: center; gap: .5rem; }

.shop-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 1.1rem;
}
.shop-card {
  display: flex; flex-direction: column; overflow: hidden;
  --shop-card-radius: 18px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--shop-card-radius); transition: transform .18s, box-shadow .18s;
  /* Card clips media — do not give img its own conflicting radius */
  isolation: isolate;
}
.shop-card:hover { transform: translateY(-4px); box-shadow: 0 18px 34px -20px rgba(0,0,0,.35); }
.shop-card.is-out { opacity: .75; }
.shop-card-select {
  position: absolute; inset: 0; z-index: 3; cursor: pointer;
  display: none; align-items: flex-start; justify-content: flex-end;
  padding: .65rem; margin: 0;
}
.shop-card-select input { position: absolute; opacity: 0; pointer-events: none; }
.shop-card-select-mark {
  display: grid; place-items: center; width: 1.65rem; height: 1.65rem;
  border-radius: 999px; border: 2px solid #fff; background: rgba(15,23,42,.45);
  color: transparent; box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.shop-card.is-share-selected .shop-card-select-mark,
.shop-card-select input:checked + .shop-card-select-mark {
  background: var(--shop-accent); border-color: var(--shop-accent); color: #fff;
}
.shop-share-mode .shop-card { position: relative; }
.shop-share-mode .shop-card-select { display: flex; }
.shop-share-mode .shop-card.is-share-selected {
  outline: 2px solid var(--shop-accent); outline-offset: -2px;
}
.shop-share-mode .shop-card a,
.shop-share-mode .shop-card form,
.shop-share-mode .shop-card button { pointer-events: none; }
.shop-share-mode .shop-card-select,
.shop-share-mode .shop-card-select input { pointer-events: auto; }
.shop-card-media {
  position: relative; aspect-ratio: 1; display: block;
  background: var(--bg-soft); color: var(--muted);
  /* Card already clips — no own radius (avoids mismatched / double corners) */
  overflow: hidden;
  border-radius: 0;
  margin: 0;
  padding: 0;
  line-height: 0;
}
.shop-card-media img,
.shop-card-media svg,
.shop-card-media .byb-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0 !important;
  transition: transform .3s;
}
.shop-card-media:has(svg),
.shop-card-media:has(.byb-icon) {
  display: grid;
  place-items: center;
}
.shop-card-media:has(svg) svg,
.shop-card-media:has(.byb-icon) .byb-icon {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.shop-card:hover .shop-card-media img { transform: scale(1.05); }
.shop-badge {
  position: absolute; top: .7rem; inset-inline-start: .7rem;
  border-radius: 999px; padding: .25rem .7rem;
  font-size: .74rem; font-weight: 800; color: #fff;
}
.shop-badge-sale { background: var(--danger, #dc2626); }
.shop-badge-out { background: #64748b; top: auto; bottom: .7rem; }
.shop-card-body { display: flex; flex-direction: column; gap: .5rem; padding: .95rem 1rem 1.1rem; flex: 1; }
.shop-card-name {
  text-decoration: none; color: var(--text); font-weight: 700; font-size: .95rem;
  line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.shop-card-name:hover { color: var(--shop-accent); }
.shop-card-price { display: flex; align-items: baseline; gap: .5rem; margin-top: auto; }
.shop-price { color: var(--shop-accent); font-weight: 800; font-size: 1.02rem; }
.shop-price-lg { font-size: 1.35rem; }
.shop-price-old { color: var(--muted); font-size: .85rem; }

/* ---------- Product page ---------- */
.shop-breadcrumb {
  display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
  margin-bottom: 1.4rem; color: var(--muted); font-size: .88rem;
}
.shop-breadcrumb a { color: var(--muted); text-decoration: none; }
.shop-breadcrumb a:hover { color: var(--shop-accent); }
.shop-product-layout {
  display: grid; grid-template-columns: minmax(280px, 480px) 1fr;
  gap: 2.2rem; align-items: start;
}
.shop-product-media {
  position: relative; aspect-ratio: 1; display: grid; place-items: center;
  background: var(--bg-soft); color: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--shop-card-radius, 18px);
  overflow: hidden;
  isolation: isolate;
}
.shop-product-media img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 0 !important; display: block;
}
.shop-product-info { display: flex; flex-direction: column; gap: .7rem; }
.shop-product-info h1 { margin: 0; font-size: clamp(1.4rem, 3vw, 2rem); }
.shop-sku { margin: 0; color: var(--muted); font-size: .85rem; }
.shop-product-price { display: flex; align-items: baseline; gap: .8rem; }
.shop-stock-ok { display: inline-flex; align-items: center; gap: .4rem; color: var(--ok, #059669); font-weight: 700; margin: 0; }
.shop-stock-out { display: inline-flex; align-items: center; gap: .4rem; color: var(--danger, #dc2626); font-weight: 700; margin: 0; }
.shop-product-desc { color: var(--muted); line-height: 1.8; padding-block: .4rem; border-top: 1px solid var(--border); }
.shop-qty-form { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-top: .6rem; }
.shop-qty { display: flex; flex-direction: column; gap: .35rem; font-size: .85rem; font-weight: 700; }
.shop-qty input {
  width: 90px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface-2); color: var(--text); padding: .68rem .8rem;
  font-family: inherit; font-size: 1rem; font-weight: 700; text-align: center;
}
.shop-product-share { margin-top: .35rem; }
.shop-share-bar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  flex-wrap: wrap; padding: .85rem 1rem calc(.85rem + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(10px);
  box-shadow: 0 -8px 24px -12px rgba(0,0,0,.25);
}
.shop-share-bar-hint { margin: 0; font-size: .85rem; color: var(--muted); font-weight: 600; }
.shop-share-bar-count { font-size: .9rem; font-weight: 700; }
.shop-share-bar-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-inline-start: auto; }
body.shop-share-mode { padding-bottom: 4.5rem; }

/* ---------- Cart ---------- */
.shop-cart-table { display: flex; flex-direction: column; gap: .7rem; }
.shop-cart-row {
  display: grid; grid-template-columns: 64px 1fr 84px auto 40px;
  gap: .9rem; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: .8rem .95rem;
}
.shop-cart-thumb {
  width: 64px; height: 64px; border-radius: 10px; overflow: hidden;
  display: grid; place-items: center; background: var(--bg-soft); color: var(--muted);
}
.shop-cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.shop-cart-info { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.shop-cart-info a { color: var(--text); font-weight: 700; text-decoration: none; }
.shop-cart-info a:hover { color: var(--shop-accent); }
.shop-cart-qty {
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface-2); color: var(--text);
  padding: .5rem .4rem; text-align: center; font-family: inherit; font-weight: 700;
}
.shop-cart-line { white-space: nowrap; }
.shop-cart-remove {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  display: grid; place-items: center; padding: .4rem; border-radius: 8px;
}
.shop-cart-remove:hover { color: var(--danger, #dc2626); background: rgba(220,38,38,.08); }
.shop-inline-remove { display: none; }
.shop-cart-summary {
  margin-top: 1.2rem; display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 1.1rem 1.3rem;
}
.shop-cart-total { display: flex; align-items: baseline; gap: .8rem; font-weight: 700; }
.shop-totals { display: flex; flex-direction: column; gap: .35rem; }
.shop-cart-total-final { margin-top: .25rem; padding-top: .45rem; border-top: 1px dashed var(--border); }
.shop-cart-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.shop-auth-card { max-width: 460px; margin-inline: auto; }
.shop-auth-card h1 { margin: 0 0 .2rem; font-size: 1.35rem; }
.shop-auth-card form { display: flex; flex-direction: column; gap: .8rem; margin-top: 1rem; }
.shop-auth-switch { margin-top: 1rem; color: var(--muted); font-size: .9rem; }
.shop-auth-switch a { color: var(--shop-accent); font-weight: 700; text-decoration: none; }
.shop-powered a { color: inherit; text-decoration: none; }
.shop-powered a:hover { color: var(--shop-accent); text-decoration: underline; }
.shop-banner-edit {
  border: 1px solid var(--border); border-radius: 14px; padding: 1rem;
  margin-bottom: .9rem; background: var(--surface-2);
}
.shop-ready-note {
  background: var(--shop-accent-soft); border-radius: 14px; padding: 1rem 1.2rem;
  margin-block: .4rem 1rem; text-align: start;
}
.shop-ready-note p { margin: .25rem 0; }

/* ---------- Checkout ---------- */
.shop-checkout-layout {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.4rem; align-items: start;
}
.shop-payment {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--shop-accent-soft); border-radius: 12px;
  padding: .85rem 1rem; margin-block: 1rem; flex-wrap: wrap;
}
.shop-payment-label { font-weight: 700; font-size: .88rem; color: var(--muted); }
.shop-payment-cod { display: inline-flex; align-items: center; gap: .45rem; font-weight: 800; color: var(--shop-accent); }
.shop-order-summary h3 { margin: 0 0 .8rem; }
.shop-summary-list { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.shop-summary-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-bottom: .55rem; border-bottom: 1px dashed var(--border); font-size: .92rem;
}

/* ---------- Success ---------- */
.shop-success {
  text-align: center; padding: 3rem 1.4rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
}
.shop-success-icon { color: var(--ok, #059669); }
.shop-success h1 { margin: 0; }
.shop-success-no { font-size: 1.05rem; }
.shop-success-actions { display: flex; gap: .7rem; flex-wrap: wrap; justify-content: center; margin-top: 1rem; }

/* ---------- Footer ---------- */
.shop-footer {
  border-top: 1px solid var(--border); margin-top: 2rem;
  padding-block: 1.8rem; text-align: center; color: var(--muted);
}
.shop-footer p { margin: .25rem 0; }
.shop-footer-wa {
  display: inline-flex; align-items: center; gap: .45rem;
  color: #22c55e; text-decoration: none; font-weight: 700; margin-block: .4rem;
}
.shop-powered { font-size: .78rem; opacity: .7; }

/* ==========================================================================
   Template variants (body classes: shop-tpl-aswaq / shop-tpl-basra / shop-tpl-noor)
   ========================================================================== */

/* Aswaq — classic: default look, squared cards, compact hero */
.shop-tpl-aswaq .shop-hero-inner { border-radius: 16px; padding: 1.8rem 2rem; }
.shop-tpl-aswaq .shop-card { --shop-card-radius: 12px; }
.shop-tpl-aswaq .shop-card-media { aspect-ratio: 4 / 3; }

/* Basra Modern — bold: gradient hero, big radius, accent header line */
.shop-tpl-basra .shop-header { border-bottom: 3px solid var(--shop-accent); }
.shop-tpl-basra .shop-hero-inner {
  background:
    linear-gradient(135deg, rgba(var(--shop-accent-rgb), .92), rgba(var(--shop-accent-rgb), .62)),
    var(--surface);
  color: #fff; border: 0;
}
.shop-tpl-basra .shop-hero-inner p, .shop-tpl-basra .shop-hero-inner h1 { color: #fff; }
.shop-tpl-basra .shop-hero-kicker { background: rgba(255,255,255,.2); color: #fff; }
.shop-tpl-basra .shop-hero-art { color: #fff; opacity: .35; }
.shop-tpl-basra .shop-hero .shop-btn-primary { background: #fff; color: var(--shop-accent); border-color: #fff; }
.shop-tpl-basra .shop-card { --shop-card-radius: 22px; }
.shop-tpl-basra .shop-cat-chip { border-radius: 12px; }

/* Noor Minimal — airy: no hero art, hairline cards, generous whitespace */
.shop-tpl-noor .shop-hero-inner { background: transparent; border: 0; padding-inline: .4rem; }
.shop-tpl-noor .shop-hero-art { display: none; }
.shop-tpl-noor .shop-card { --shop-card-radius: 8px; box-shadow: none; }
.shop-tpl-noor .shop-card:hover { transform: none; box-shadow: none; border-color: var(--shop-accent); }
.shop-tpl-noor .shop-grid { gap: 1.6rem; }
.shop-tpl-noor .shop-section { padding-block: 2.4rem 3.2rem; }
.shop-tpl-noor .shop-cat-chip { border: 0; background: transparent; padding-inline: .4rem; }
.shop-tpl-noor .shop-cat-chip.active { background: transparent; color: var(--shop-accent); text-decoration: underline; text-underline-offset: 6px; }

/* ==========================================================================
   Owner admin
   ========================================================================== */
.shop-admin { display: flex; flex-direction: column; gap: 1.2rem; }
.shop-admin-cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: 1.2rem; align-items: start; }
.shop-filter-bar { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.shop-filter-bar input, .shop-filter-bar select {
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface-2); color: var(--text);
  padding: .5rem .8rem; font-family: inherit; font-size: .9rem;
}
.shop-thumb {
  width: 44px; height: 44px; border-radius: 8px; overflow: hidden;
  display: grid; place-items: center; background: var(--bg-soft); color: var(--muted);
}
.shop-thumb img { width: 100%; height: 100%; object-fit: cover; }
.shop-row-actions { white-space: nowrap; }
.shop-row-low { background: rgba(220,38,38,.05); }
.shop-form-panel { max-width: 860px; }
.shop-form-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.shop-form-thumb { width: 90px; height: 90px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }
.shop-low-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.shop-low-list li {
  display: flex; align-items: center; justify-content: space-between;
  padding: .55rem .8rem; border: 1px solid var(--border); border-radius: 10px;
}
.shop-kv { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.shop-kv li {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .5rem .2rem; border-bottom: 1px dashed var(--border); font-size: .93rem;
}
.shop-kv li span { color: var(--muted); }
.shop-h3 { margin: 1.1rem 0 .6rem; font-size: 1rem; }
.shop-order-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 1.6rem; align-items: start; }
.shop-transitions { display: flex; gap: .5rem; flex-wrap: wrap; }
.shop-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.shop-timeline li { display: flex; gap: .7rem; align-items: flex-start; }
.shop-timeline .shop-tl-dot {
  width: 10px; height: 10px; border-radius: 999px; background: var(--shop-accent);
  margin-top: .4rem; flex-shrink: 0; box-shadow: 0 0 0 4px var(--shop-accent-soft);
}
.shop-timeline small { display: block; color: var(--muted); }
.shop-pager { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: 1rem; }
.shop-inline-edit { display: inline-block; position: relative; }
.shop-inline-edit summary { list-style: none; cursor: pointer; display: inline-flex; }
.shop-inline-edit summary::-webkit-details-marker { display: none; }
.shop-inline-form {
  position: absolute; z-index: 30; inset-inline-end: 0; top: 110%;
  display: flex; flex-direction: column; gap: .5rem; min-width: 230px;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 12px; padding: .8rem; box-shadow: 0 16px 34px -18px rgba(0,0,0,.4);
}
.shop-inline-form input {
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface-2); color: var(--text);
  padding: .45rem .7rem; font-family: inherit; font-size: .88rem;
}

/* Status badges */
.badge.shop-st-new, .badge.shop-st-pending { background: var(--shop-accent-soft); color: var(--shop-accent); }
.badge.shop-st-confirmed { background: rgba(14,165,233,.14); color: #0284c7; }
.badge.shop-st-processing { background: rgba(217,119,6,.14); color: #b45309; }
.badge.shop-st-shipped { background: rgba(124,58,237,.14); color: #7c3aed; }
.badge.shop-st-delivered { background: rgba(5,150,105,.14); color: #059669; }
.badge.shop-st-cancelled { background: rgba(220,38,38,.12); color: #dc2626; }

/* ---------- Owner login ---------- */
.shop-login-page {
  min-height: 100vh; display: grid; place-items: center; padding: 1.4rem;
  background:
    radial-gradient(700px 380px at 80% -10%, rgba(var(--shop-accent-rgb), .16), transparent 60%),
    var(--bg);
}
.shop-login-card {
  width: min(400px, 100%); text-align: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 2.2rem 1.8rem;
  display: flex; flex-direction: column; gap: .55rem;
}
.shop-login-card h1 { margin: 0; font-size: 1.35rem; }
.shop-login-card form { display: flex; flex-direction: column; gap: .8rem; text-align: start; margin-top: .8rem; }
.shop-login-mark {
  width: 62px; height: 62px; margin-inline: auto;
  display: grid; place-items: center; border-radius: 18px;
  background: var(--shop-accent-soft); color: var(--shop-accent);
}
.shop-login-back {
  display: inline-flex; align-items: center; gap: .35rem; justify-content: center;
  color: var(--muted); text-decoration: none; font-size: .85rem; margin-top: .6rem;
}
.shop-login-back:hover { color: var(--shop-accent); }

/* ==========================================================================
   Wizard + ready screen
   ========================================================================== */
.shop-wizard-card { max-width: 760px; margin-inline: auto; }
.shop-step-title { margin: .2rem 0 1.2rem; font-size: 1.15rem; }
.shop-tpl-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .9rem; margin-block: .6rem 1.2rem; }
.shop-tpl-option {
  position: relative; display: flex; flex-direction: column; gap: .45rem;
  border: 2px solid var(--border); border-radius: 16px; padding: .9rem;
  cursor: pointer; transition: all .15s; background: var(--surface);
}
.shop-tpl-option:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.shop-tpl-option.active, .shop-tpl-option:has(input:checked) {
  border-color: var(--shop-accent, var(--primary));
  box-shadow: 0 8px 22px -14px rgba(var(--shop-accent-rgb, 37,99,235), .8);
}
.shop-tpl-option input { position: absolute; opacity: 0; pointer-events: none; }
.shop-tpl-option small { color: var(--muted); line-height: 1.5; }
.shop-tpl-preview {
  height: 74px; border-radius: 10px; background: var(--bg-soft);
  display: flex; flex-direction: column; gap: 5px; padding: 8px; overflow: hidden;
}
.shop-tpl-preview i { display: block; border-radius: 4px; background: var(--border-strong); }
.shop-tpl-preview-aswaq i:nth-child(1) { height: 10px; width: 55%; }
.shop-tpl-preview-aswaq i:nth-child(2) { height: 22px; background: var(--primary-soft); }
.shop-tpl-preview-aswaq i:nth-child(3) { height: 22px; background: var(--primary-soft); width: 70%; }
.shop-tpl-preview-basra i:nth-child(1) { height: 30px; background: linear-gradient(135deg, #2563eb, #0ea5e9); }
.shop-tpl-preview-basra i:nth-child(2) { height: 10px; width: 80%; }
.shop-tpl-preview-basra i:nth-child(3) { height: 14px; width: 45%; }
.shop-tpl-preview-noor { background: var(--surface); border: 1px solid var(--border); }
.shop-tpl-preview-noor i { background: var(--border); }
.shop-tpl-preview-noor i:nth-child(1) { height: 8px; width: 34%; margin-inline: auto; }
.shop-tpl-preview-noor i:nth-child(2) { height: 18px; width: 82%; margin-inline: auto; }
.shop-tpl-preview-noor i:nth-child(3) { height: 18px; width: 82%; margin-inline: auto; }

.shop-cat-row { margin-bottom: .4rem; }
.shop-check { display: flex; align-items: center; gap: .6rem; cursor: pointer; font-weight: 600; }
.shop-check input { width: 18px; height: 18px; accent-color: var(--primary); }
.shop-review li strong { display: inline-flex; align-items: center; gap: .5rem; }
.shop-swatch { display: inline-block; width: 18px; height: 18px; border-radius: 6px; border: 1px solid var(--border-strong); }

.shop-ready-card { text-align: center; }
.shop-trial-count {
  display: inline-flex; align-items: center; gap: .5rem; flex-wrap: wrap; justify-content: center;
  background: var(--amber-soft, rgba(217,119,6,.12)); color: var(--amber, #b45309);
  border-radius: 999px; padding: .5rem 1.1rem; font-weight: 700; margin-block: .6rem;
}
.shop-ready-links { display: flex; flex-direction: column; gap: .9rem; margin-block: 1.2rem; text-align: start; }
.shop-ready-link label { display: flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 700; margin-bottom: .35rem; color: var(--muted); }
.shop-copy-row { display: flex; gap: .5rem; }
.shop-copy-row input {
  flex: 1; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface-2); color: var(--text);
  padding: .55rem .8rem; font-size: .82rem; font-family: monospace; direction: ltr;
}
.shop-ready-actions { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .shop-admin-cols, .shop-order-grid, .shop-checkout-layout { grid-template-columns: 1fr; }
  .shop-product-layout { grid-template-columns: 1fr; gap: 1.4rem; }
  .shop-hero-art { display: none; }
  .shop-hero-inner { padding: 1.7rem 1.4rem; }
}
@media (max-width: 760px) {
  .shop-header-inner { gap: .65rem; }
  .shop-nav-burger { display: inline-flex; }
  .shop-header-drawer {
    position: fixed; top: 0; inset-inline-end: 0; bottom: 0;
    width: min(320px, 86vw); z-index: 80;
    background: var(--surface); border-inline-start: 1px solid var(--border);
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    padding: 1rem; gap: .65rem;
    transform: translateX(110%);
    transition: transform .28s cubic-bezier(.22,.8,.36,1);
    box-shadow: var(--shadow-lg, 0 16px 36px rgba(14, 23, 38, 0.12));
    overflow-y: auto; flex-wrap: nowrap;
  }
  [dir="rtl"] .shop-header-drawer { transform: translateX(-110%); }
  body.nav-open .shop-header-drawer { transform: translateX(0); }
  body.nav-open .shop-header .nav-backdrop { display: block; z-index: 70; }
  .shop-header-drawer > .nav-close { display: inline-flex; align-self: flex-end; margin-bottom: .25rem; }
  .shop-header-drawer .shop-nav {
    flex-direction: column; align-items: stretch; gap: .25rem; order: 1;
  }
  .shop-header-drawer .shop-nav a {
    width: 100%; padding: .65rem .85rem; border-radius: 10px;
  }
  .shop-header-drawer .shop-search {
    order: 2; flex: none; width: 100%; min-width: 0; border-radius: 12px;
  }
  .shop-header-drawer .shop-header-actions {
    order: 3; flex-direction: column; align-items: stretch; width: 100%; gap: .55rem;
  }
  .shop-header-drawer .shop-header-actions .chip,
  .shop-header-drawer .shop-header-actions .shop-share-toggle {
    width: 100%; justify-content: flex-start;
  }
  .shop-header-drawer .shop-cart-btn {
    width: 100%; height: auto; min-height: 42px; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  }
  .shop-brand strong {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    max-width: min(42vw, 12rem);
  }
}
@media (max-width: 640px) {
  .shop-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; }
  .shop-cart-row { grid-template-columns: 52px 1fr 64px; grid-template-rows: auto auto; }
  .shop-cart-line { grid-column: 2; text-align: end; }
  .shop-cart-remove { grid-column: 3; grid-row: 2; justify-self: end; }
  .shop-cart-thumb { width: 52px; height: 52px; }
  .shop-section { padding-block: 1.1rem 1.8rem; }
  .shop-success { padding: 2rem 1rem; }
}
