/* =========================================================
   SmartCore — Complete page styles (Bootstrap + app theme)
   ========================================================= */

/* ---------- Shared page primitives ---------- */
.page {
  max-width: 1200px;
  margin: 0 auto;
}
.page-wide { max-width: 1280px; margin: 0 auto; }

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.page-header p.lead {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0.35rem 0 0;
  max-width: 36rem;
}

.page-hero {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.75rem;
  color: #fff;
  background: linear-gradient(135deg, #030712 0%, #111827 55%, #3a2a00 100%);
  border: 1px solid rgba(255, 197, 37, 0.28);
}
.page-hero .glow {
  position: absolute;
  top: -4rem;
  right: -3rem;
  width: 16rem;
  height: 16rem;
  background: rgba(255, 197, 37, 0.14);
  border-radius: 999px;
  filter: blur(40px);
  pointer-events: none;
}
.page-hero .eyebrow,
.page-hero .section-title,
.page-hero h1,
.page-hero h2 { color: #fff; }
.page-hero .section-title span,
.page-hero h1 span,
.page-hero h2 span { color: var(--primary); }
.page-hero p { color: #d1d5db; margin: 0.5rem 0 0; font-size: 0.9rem; }
.page-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.75rem;
  font-weight: 700;
  color: #e5e7eb;
}
.page-hero-meta .dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: var(--primary);
  display: inline-block;
  margin-right: 0.4rem;
  animation: pulseDot 1.5s ease infinite;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: rgba(255, 197, 37, 0.18);
  color: var(--primary);
  border: 1px solid rgba(255, 197, 37, 0.35);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 0.4rem;
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.status-pill.pending {
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-color: var(--primary-light);
}
.status-pill.ok,
.status-pill.active {
  background: var(--success-soft);
  color: var(--success);
  border-color: #a7f3d0;
}
.status-pill.danger {
  background: var(--error-soft);
  color: var(--error);
}

[data-theme="dark"] .status-pill.pending {
  background: rgba(255,197,37,0.12);
  color: var(--primary);
}
[data-theme="dark"] .status-pill.ok,
[data-theme="dark"] .status-pill.active {
  background: rgba(16,185,120,0.12);
  color: #34d399;
}

/* ---------- Product card ---------- */
.product-card {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 0.9rem;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  transition: box-shadow .25s ease, border-color .25s ease, transform .25s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  box-shadow: 0 10px 22px rgba(0,0,0,.07);
  border-color: var(--primary-light);
  transform: translateY(-2px);
}
.product-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg-muted);
  overflow: hidden;
}
.product-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.product-card:hover .product-card-media img { transform: scale(1.05); }
.product-card-body {
  padding: 0.7rem 0.8rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}
.product-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary-dark);
}
.product-card-meta .rating { color: var(--primary); }
.product-card-title {
  font-size: 0.8rem;
  font-weight: 900;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
}
.product-card-title a { color: inherit; }
.product-card-title a:hover { color: var(--primary-dark); }
.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.45rem;
  gap: 0.35rem;
}
.product-card-price {
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--text);
}
.product-old-price {
  color: #f87171;
  text-decoration: line-through;
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0.9;
}
.product-card-badges {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: flex-end;
  z-index: 2;
}
.wishlist-btn {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 0.85rem;
  background: rgba(255,255,255,0.9);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px) scale(0.92);
  transition: opacity .2s ease, visibility .2s ease, transform .2s ease, background .2s ease, color .2s ease;
}
.product-card:hover .wishlist-btn,
.product-card:focus-within .wishlist-btn,
.wishlist-btn.active,
.wishlist-card .wishlist-btn {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.wishlist-btn:hover,
.wishlist-btn.active {
  background: var(--error);
  color: #fff;
}

.btn-add {
  width: 2.1rem;
  height: 2.1rem;
  border: 0;
  border-radius: 0.75rem;
  background: var(--primary);
  color: var(--text-on-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(255,197,37,.28);
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
.btn-add:hover { background: var(--primary-dark); }
.btn-add:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-add.in-cart {
  background: #16a34a;
  box-shadow: 0 6px 16px rgba(22,163,74,.28);
}
.btn-add.in-cart:hover { background: #15803d; }
.btn-contact {
  width: 2.1rem;
  height: 2.1rem;
  border: 0;
  border-radius: 0.75rem;
  background: #111827;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(17,24,39,.2);
  transition: background .2s ease, transform .2s ease;
}
.btn-contact:hover {
  background: var(--primary-dark);
  color: #fff;
}

/* ---------- Protocol / list cards ---------- */
.protocol-card {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 1rem;
  padding: 1.15rem 1.25rem;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.protocol-card:hover {
  border-color: var(--primary-light);
  box-shadow: 0 8px 20px rgba(0,0,0,.06);
}
.protocol-card-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.protocol-card-main {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}
.protocol-card-main h3 {
  font-size: 0.95rem;
  font-weight: 900;
  margin: 0;
  color: var(--text);
}
.protocol-id {
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

/* ---------- Tech cards ---------- */
.tech-card {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 1.25rem;
  overflow: hidden;
  height: 100%;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  transition: box-shadow .25s ease, border-color .25s ease;
}
.tech-card:hover {
  box-shadow: 0 14px 32px rgba(0,0,0,.1);
  border-color: var(--primary-light);
}
.tech-card-media {
  position: relative;
  height: 220px;
  overflow: hidden;
}
.tech-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  transition: filter .4s ease, transform .5s ease;
}
.tech-card:hover .tech-card-media img {
  filter: grayscale(0);
  transform: scale(1.04);
}
.tech-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(17,24,39,.85), rgba(17,24,39,.25), transparent);
}
.tech-card-body { padding: 1.25rem; }
.tech-card-role {
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary-dark);
  margin-bottom: 0.35rem;
}
.tech-card-body h3 {
  font-size: 1.15rem;
  font-weight: 900;
  margin: 0 0 0.5rem;
}
.tech-card-body p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tech-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-top: 1px solid var(--border-light);
  padding-top: 0.9rem;
}

/* ---------- Shop layout ---------- */
.shop-page {
  max-width: 1400px;
}
.shop-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
.shop-filters {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 1.15rem;
  padding: 1.15rem;
}
.shop-filters-inner { min-height: 0; }
.shop-filters h3 {
  font-size: 1rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.shop-filters h3 i { color: var(--primary); }
.shop-main {
  min-width: 0;
  min-height: 0;
}
.brand-list {
  max-height: 12rem;
  overflow-y: auto;
  padding-right: 0.25rem;
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .shop-layout {
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: start;
  }
  .shop-filters {
    position: sticky;
    top: calc(var(--topbar-height) + 0.75rem);
    max-height: calc(100vh - var(--topbar-height) - 1.5rem);
    overflow-y: auto;
  }
}

@media (min-width: 992px) {
  .shop-layout {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
    height: auto;
    max-height: none;
  }
  .shop-filters {
    position: sticky;
    top: calc(var(--topbar-height) + 0.75rem);
    height: auto;
    max-height: calc(100vh - var(--topbar-height) - 1.5rem);
    overflow-y: auto;
    display: block;
  }
  .shop-filters-inner {
    overflow: visible;
    height: auto;
    padding-right: 0;
  }
  .shop-main {
    height: auto;
    overflow: visible;
    padding-right: 0;
  }
  .brand-list { max-height: 12rem; overflow-y: auto; }
}

.filter-block { margin-bottom: 1.25rem; }

/* Home section product picker */
.home-pinned-picker { background: var(--bs-body-bg, #fff); }
.home-pinned-row { cursor: pointer; transition: background 0.12s; }
.home-pinned-row:hover { background: var(--bs-light, #f8f9fa); }
.home-pinned-row.is-checked { background: #fffbea; }
.filter-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.55rem;
}
.shop-search {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  position: static;
  background: transparent;
  padding-bottom: 0;
}
.shop-search .search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.shop-search .search-wrap i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}
.shop-search input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-weight: 700;
}
.shop-search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(255,197,37,.18);
}
.shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
@media (min-width: 768px) {
  .shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; }
}
@media (min-width: 1100px) {
  .shop-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
}
.shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
  padding: 0.65rem 0.85rem;
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 0.85rem;
}
.shop-entries-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}
.shop-toolbar-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
}
.shop-entries-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin: 0;
}
.shop-entries-label .form-select {
  width: auto;
  min-width: 4.25rem;
  border-radius: 999px;
  font-weight: 800;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}
.shop-view-toggle {
  display: inline-flex;
  gap: 0.3rem;
}
.shop-view-toggle .btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text-on-primary);
}
.shop-grid.shop-list {
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
.shop-grid.shop-list .product-card {
  flex-direction: row;
  align-items: stretch;
  border-radius: 0.9rem;
}
.shop-grid.shop-list .product-card-media {
  width: 7.5rem;
  min-width: 7.5rem;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
}
@media (min-width: 576px) {
  .shop-grid.shop-list .product-card-media {
    width: 9.5rem;
    min-width: 9.5rem;
  }
}
.shop-grid.shop-list .product-card-body {
  flex: 1;
  justify-content: center;
  padding: 0.75rem 1rem;
}
.shop-grid.shop-list .product-card-title {
  font-size: 0.95rem;
}
.shop-grid.shop-list .product-card-footer {
  margin-top: 0.5rem;
  padding-top: 0.35rem;
}
.shop-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}
.shop-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1.75rem;
}
.shop-pagination a {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-muted);
}
.shop-pagination a.active {
  background: var(--primary);
  color: var(--text-on-primary);
  border-color: var(--primary);
}
.brand-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.45rem;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}
.brand-check input { accent-color: var(--primary); }
.rating-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: var(--bg-muted);
  border: 1px solid var(--border-light);
  border-radius: 0.85rem;
  padding: 0.55rem 0.75rem;
}
.rating-row .stars { display: flex; gap: 0.15rem; }
.rating-row button {
  border: 0;
  background: transparent;
  color: #d1d5db;
  padding: 0.15rem;
}
.rating-row button.on { color: var(--primary); }

/* ---------- Package cards (installations) ---------- */
.package-card {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 1.15rem;
  padding: 1.25rem;
  height: 100%;
  position: relative;
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.package-card:hover {
  border-color: var(--primary-light);
  box-shadow: 0 12px 28px rgba(0,0,0,.08);
}
.package-card .pkg-icon {
  position: absolute;
  top: 0;
  right: 0;
  width: 3.25rem;
  height: 3.25rem;
  border-bottom-left-radius: 1rem;
  background: var(--primary-soft);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}
.package-card:hover .pkg-icon {
  background: var(--primary);
  color: var(--text-on-primary);
}
.package-card .pkg-level {
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary-dark);
  margin-bottom: 0.4rem;
}
.package-card h3 {
  font-size: 1.05rem;
  font-weight: 900;
  max-width: 80%;
  margin-bottom: 1rem;
}
.package-card .pkg-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.package-card .pkg-row strong {
  color: var(--text);
  font-size: 1rem;
}

/* ---------- Forms / auth ---------- */
.layout-auth .app-shell-auth,
.layout-auth .app-main {
  min-height: 100vh;
  min-height: 100dvh;
}
.layout-auth .app-content-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 1.25rem;
  background:
    radial-gradient(80% 60% at 100% 0%, rgba(255, 197, 37, 0.12), transparent 55%),
    radial-gradient(70% 50% at 0% 100%, rgba(36, 48, 65, 0.08), transparent 50%),
    var(--bg);
}
.auth-page {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.auth-back-home {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem 0.45rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.06);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.auth-back-home i {
  font-size: 0.75rem;
  color: var(--primary-dark);
}
.auth-back-home:hover {
  color: var(--text);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.1);
}
.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 0;
  min-height: min(640px, calc(100vh - 4.5rem));
  width: 100%;
  max-width: none;
  margin: 0;
  border: 1px solid var(--border-light);
  border-radius: 1.35rem;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 18px 50px rgba(17, 24, 39, 0.08);
  animation: auth-rise 0.55s ease both;
}
.auth-shell-simple {
  grid-template-columns: 1fr;
  max-width: 28rem;
  margin: 0 auto;
  min-height: auto;
}
.auth-page-simple {
  justify-content: center;
}
.auth-simple-logo img {
  height: 2.5rem;
  width: auto;
  display: block;
}
@keyframes auth-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.auth-panel {
  position: relative;
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-panel-brand {
  background:
    radial-gradient(120% 90% at 10% 0%, rgba(255, 197, 37, 0.35), transparent 55%),
    linear-gradient(155deg, #141820 0%, #1c2430 48%, #243041 100%);
  color: #f8fafc;
  min-height: 100%;
  overflow: hidden;
}
.auth-brand-glow {
  position: absolute;
  inset: auto -20% -30% auto;
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, rgba(255, 197, 37, 0.28), transparent 65%);
  pointer-events: none;
  animation: auth-glow 6s ease-in-out infinite alternate;
}
@keyframes auth-glow {
  from { transform: translate(0, 0) scale(1); opacity: 0.85; }
  to { transform: translate(-8%, -6%) scale(1.08); opacity: 1; }
}
.auth-brand-content {
  position: relative;
  z-index: 1;
  max-width: 22rem;
}
.auth-brand-logo {
  display: inline-flex;
  margin-bottom: 1.5rem;
  transition: transform 0.25s ease;
}
.auth-brand-logo:hover { transform: translateY(-2px); }
.auth-brand-logo img {
  height: 2.75rem;
  width: auto;
  max-width: 11rem;
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.35));
}
.auth-brand-eyebrow {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 197, 37, 0.95);
}
.auth-brand-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fff;
}
.auth-brand-copy {
  margin: 0 0 1.35rem;
  color: rgba(248, 250, 252, 0.72);
  font-size: 0.95rem;
  line-height: 1.55;
  font-weight: 500;
}
.auth-brand-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}
.auth-brand-list li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.88rem;
  font-weight: 650;
  color: rgba(248, 250, 252, 0.88);
}
.auth-brand-list i {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 0.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 197, 37, 0.16);
  color: #ffc525;
  font-size: 0.78rem;
  flex-shrink: 0;
}
.auth-panel-form {
  background: var(--card);
  padding: 2rem 1.85rem 2.15rem;
}
.auth-form-card {
  width: 100%;
  max-width: 24rem;
  margin: 0 auto;
  animation: auth-form-in 0.45s ease 0.08s both;
}
@keyframes auth-form-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  padding: 0.3rem;
  margin-bottom: 1.35rem;
  border-radius: 999px;
  background: var(--bg-muted);
  border: 1px solid var(--border-light);
}
.auth-tab {
  text-align: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.55rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.auth-tab:hover {
  color: var(--text);
}
.auth-tab.active {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 2px 10px rgba(17, 24, 39, 0.08);
}
.auth-form-title {
  margin: 0 0 0.35rem;
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text);
}
.auth-form-lead {
  margin: 0 0 1.15rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  font-weight: 500;
}
.auth-form .form-control {
  border-radius: 0.75rem;
  padding: 0.7rem 0.9rem;
  border-color: var(--border);
  background: var(--bg);
  font-weight: 600;
}
.auth-form .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 197, 37, 0.28);
}
.auth-forgot-link {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted);
  text-decoration: none;
}
.auth-forgot-link:hover {
  color: var(--primary-dark);
}
.auth-switch {
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
}
.auth-switch a {
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 197, 37, 0.55);
}
.auth-switch a:hover {
  color: var(--primary-dark);
}
.auth-reset-hint {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.75rem;
  background: var(--bg-muted);
  border: 1px dashed var(--border);
  word-break: break-all;
}
.auth-reset-hint a {
  color: var(--primary-dark);
  font-weight: 700;
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .auth-panel-form {
    order: -1;
    padding: 1.5rem 1.25rem 1.75rem;
  }
  .auth-panel-brand {
    padding: 1.35rem 1.25rem 1.4rem;
  }
  .auth-brand-logo {
    margin-bottom: 0.85rem;
  }
  .auth-brand-logo img {
    height: 2.15rem;
  }
  .auth-brand-title {
    font-size: 1.35rem;
  }
  .auth-brand-copy {
    margin-bottom: 0;
    font-size: 0.88rem;
  }
  .auth-brand-list {
    display: none;
  }
}

/* Legacy auth selectors (kept for any leftover markup) */
.auth-wrap {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 0;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 1.25rem;
  padding: 1.75rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
}
.auth-card h1 {
  font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: 0.35rem;
}

/* ---------- Track ---------- */
.track-search-card {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 1.15rem;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 16px rgba(0,0,0,.04);
}
.track-search-input {
  font-size: 0.9rem;
}
.track-search-input::placeholder {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  opacity: 0.65;
}
.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 6.5rem;
  flex: 1;
}
.timeline-step .node {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  border: 2px solid var(--border);
  background: var(--card);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  z-index: 1;
}
.timeline-step.done .node {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text-on-primary);
}
.timeline-step.current .node {
  background: #111827;
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 0 4px rgba(255,197,37,.2);
}
.timeline-step span {
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--text-muted);
}
.timeline-step.current span { color: var(--primary-dark); }
.timeline-step.done span { color: var(--text); }

/* ---------- Cart / checkout ---------- */
.summary-card {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 1.15rem;
  padding: 1.25rem;
  position: sticky;
  top: calc(var(--topbar-height) + 1rem);
}
.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.55rem;
  color: var(--text-muted);
}
.summary-row.total {
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 900;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
}
.cart-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 1rem;
  margin-bottom: 0.75rem;
}
.cart-item img {
  width: 5rem;
  height: 5rem;
  object-fit: cover;
  border-radius: 0.75rem;
  background: var(--bg-muted);
}

/* ---------- About / FAQ / misc ---------- */
.faq-item {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 0.9rem;
  margin-bottom: 0.65rem;
  overflow: hidden;
}
.faq-item button {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 1rem 1.1rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-item .faq-content {
  padding: 0 1.1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.faq-item.open .faq-content { padding-bottom: 1rem; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
@media (min-width: 768px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 1rem;
  padding: 1rem;
}
.stat-card .value {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary-dark);
}
.stat-card .label {
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.faq-page {
  max-width: 44rem;
  margin: 0 auto;
}
.faq-page-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.faq-page .faq-item {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 0.9rem;
  overflow: hidden;
}
.faq-page .faq-item button {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 1rem 1.15rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-page-cta {
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 1rem;
}

.legal-page {
  max-width: 44rem;
  margin: 0 auto;
}
.legal-content section {
  margin-bottom: 1.5rem;
}
.legal-content h2 {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.legal-content p {
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 0;
}

.collections-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
@media (min-width: 576px) {
  .collections-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
  }
}
@media (min-width: 992px) {
  .collections-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.9rem;
  }
}

.collection-tile {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 6.5rem;
  padding: 1rem 0.75rem;
  border-radius: 0.85rem;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border-light);
  background: var(--card);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.collection-tile-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.collection-tile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.18;
  filter: grayscale(0.35) saturate(0.7);
  transform: scale(1.04);
  transition: opacity 0.25s ease, transform 0.35s ease, filter 0.25s ease;
}
.collection-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(248, 250, 252, 0.88) 100%);
  pointer-events: none;
}
[data-theme="dark"] .collection-tile::after {
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.55) 0%, rgba(17, 24, 39, 0.78) 100%);
}
.collection-tile-caption {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.2rem;
  width: 100%;
}
.collection-tile-name {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.25;
  color: var(--text);
}
.collection-tile-count {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.collection-tile:hover {
  border-color: rgba(17, 24, 39, 0.22);
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.08);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}
.collection-tile:hover .collection-tile-media img {
  opacity: 0.28;
  filter: grayscale(0.1) saturate(1);
  transform: scale(1.08);
}
.collection-tile:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Home sections */
.home-section { margin-bottom: 2.5rem; }
.partner-bar {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-top: 4px solid var(--primary);
  border-radius: 1rem;
  padding: 1rem;
  text-align: center;
  margin: -1.5rem auto 2rem;
  max-width: 1100px;
  position: relative;
  z-index: 2;
}
.partner-bar p {
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary-dark);
  margin-bottom: 0.65rem;
}
.partner-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 2rem;
  font-weight: 900;
  color: var(--text);
  opacity: 0.55;
}
.cta-band {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #0b1220 0%, #111827 52%, #1a2332 100%);
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 1rem;
  padding: 2.75rem 1.5rem;
  text-align: center;
  margin: 2.5rem 0 0;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
}
.cta-band-glow {
  position: absolute;
  inset: -20% auto auto -10%;
  width: min(22rem, 70vw);
  height: min(22rem, 70vw);
  background: radial-gradient(circle, rgba(251, 191, 36, 0.22) 0%, transparent 68%);
  pointer-events: none;
}
.cta-band-inner {
  position: relative;
  z-index: 1;
  max-width: 36rem;
  margin: 0 auto;
}
.cta-band-eyebrow {
  display: inline-block;
  margin-bottom: 0.85rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fbbf24;
}
.cta-band h2 {
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  font-weight: 900;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 0.85rem;
}
.cta-band-accent {
  display: block;
  margin-top: 0.15rem;
  background: linear-gradient(90deg, #fde68a 0%, #fbbf24 55%, #f59e0b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cta-band-lead {
  color: rgba(226, 232, 240, 0.82);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.35rem;
}
.cta-band-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
}
.cta-band-actions .btn-primary {
  min-width: 9.5rem;
  box-shadow: 0 8px 24px rgba(251, 191, 36, 0.28);
}
.cta-band-actions .btn-outline-light {
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}
.cta-band-actions .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}
@media (min-width: 768px) {
  .cta-band { padding: 3.5rem 2.5rem; }
}
@media (min-width: 992px) {
  .cta-band { padding: 4rem 3rem; }
}
.home-testimonials {
  padding: 2.25rem 0.35rem 1.75rem;
  margin-top: 0.85rem;
  margin-bottom: 3rem;
}
@media (min-width: 768px) {
  .home-testimonials {
    padding: 2.85rem 0.5rem 2.25rem;
  }
}

/* Dark mode card text fixes */
[data-theme="dark"] .product-card,
[data-theme="dark"] .protocol-card,
[data-theme="dark"] .tech-card,
[data-theme="dark"] .package-card,
[data-theme="dark"] .shop-filters,
[data-theme="dark"] .auth-card,
[data-theme="dark"] .auth-shell,
[data-theme="dark"] .auth-panel-form,
[data-theme="dark"] .auth-tab.active,
[data-theme="dark"] .summary-card,
[data-theme="dark"] .track-search-card,
[data-theme="dark"] .faq-item,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .cart-item,
[data-theme="dark"] .account-panel,
[data-theme="dark"] .account-stat,
[data-theme="dark"] .account-order,
[data-theme="dark"] .account-page .card,
[data-theme="dark"] .profile-quick-link,
[data-theme="dark"] .profile-theme-row {
  background: var(--card);
  border-color: var(--border);
  color: var(--text);
}

/* ---------- Shared extras ---------- */
.lead {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.55;
  margin: 0.35rem 0 0;
}
.accent,
.section-title .accent,
.section-title span.accent { color: var(--primary) !important; }
.bg-muted { background: var(--bg-muted) !important; }
/* ---------- Home hero (electronics / IoT) ---------- */
.home-hero-showcase {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: min(72vh, 38rem);
  margin: -1.5rem -1rem 1.75rem;
  display: block;
  color: #fff;
  background: #05070d;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
  width: calc(100% + 2rem);
  max-width: none;
  border-radius: 0;
}
.home-hero-showcase.is-dragging { cursor: grabbing; }
@media (max-width: 991.98px) {
  .home-hero-showcase {
    margin-left: -0.85rem;
    margin-right: -0.85rem;
    width: calc(100% + 1.7rem);
    min-height: min(68vh, 28rem);
  }
}
@media (min-width: 992px) {
  .home-hero-showcase {
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    width: calc(100% + 3rem);
    min-height: min(78vh, 42rem);
  }
}
@media (max-width: 575.98px) {
  .home-hero-showcase {
    min-height: min(64vh, 26rem);
  }
}
@media (min-width: 768px) and (max-width: 991.98px) {
  .home-hero-showcase {
    min-height: min(62vh, 34rem);
  }
}
.home-hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  perspective: 1400px;
  perspective-origin: 50% 50%;
  transform-style: preserve-3d;
}
.home-hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0;
  z-index: 0;
  transform: translate3d(0, 0, 0) scale(1);
  transform-origin: center center;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  transition:
    transform var(--hero-transition-duration, 1s) cubic-bezier(0.22, 1, 0.36, 1),
    opacity var(--hero-transition-duration, 0.85s) ease,
    clip-path var(--hero-transition-duration, 1s) cubic-bezier(0.22, 1, 0.36, 1),
    filter var(--hero-transition-duration, 0.85s) ease;
  will-change: transform, opacity, clip-path, filter;
  pointer-events: none;
  clip-path: inset(0 0 0 0);
}
.home-hero-photo.is-active {
  opacity: 1;
  z-index: 2;
  transform: translate3d(0, 0, 0) rotateY(0deg) rotateX(0deg) scale(1);
  filter: none;
  clip-path: inset(0 0 0 0);
}
/* Push 3D (legacy) */
.home-hero-photo.is-exit-left {
  opacity: 0;
  z-index: 1;
  transform: translate3d(-48%, 0, -200px) rotateY(52deg) scale(0.9);
}
.home-hero-photo.is-exit-right {
  opacity: 0;
  z-index: 1;
  transform: translate3d(48%, 0, -200px) rotateY(-52deg) scale(0.9);
}
.home-hero-photo.is-enter-left,
.home-hero-photo.fx-enter-push {
  opacity: 0;
  z-index: 1;
  transform: translate3d(-48%, 0, -200px) rotateY(52deg) scale(0.9);
  transition: none;
}
.home-hero-photo.is-enter-right {
  opacity: 0;
  z-index: 1;
  transform: translate3d(48%, 0, -200px) rotateY(-52deg) scale(0.9);
  transition: none;
}
/* Fade */
.home-hero-photo.fx-exit-fade { opacity: 0; z-index: 1; transform: scale(1.04); }
.home-hero-photo.fx-enter-fade { opacity: 0; z-index: 1; transform: scale(0.96); transition: none; }
/* Wipe */
.home-hero-photo.fx-exit-wipe { opacity: 1; z-index: 1; clip-path: inset(0 100% 0 0); }
.home-hero-photo.fx-enter-wipe { opacity: 1; z-index: 1; clip-path: inset(0 0 0 100%); transition: none; }
/* Peel off */
.home-hero-photo.fx-exit-peel {
  opacity: 0;
  z-index: 1;
  transform: rotate(-8deg) translate3d(-18%, -8%, 0) scale(0.92);
  clip-path: polygon(0 0, 70% 0, 100% 100%, 0 100%);
}
.home-hero-photo.fx-enter-peel {
  opacity: 0;
  z-index: 1;
  transform: rotate(10deg) translate3d(20%, 10%, 0);
  clip-path: polygon(30% 0, 100% 0, 100% 100%, 0 100%);
  transition: none;
}
/* Crush */
.home-hero-photo.fx-exit-crush { opacity: 0; z-index: 1; transform: scaleY(0.08) scaleX(1.15); }
.home-hero-photo.fx-enter-crush { opacity: 0; z-index: 1; transform: scaleY(0.08) scaleX(1.15); transition: none; }
/* Airplane */
.home-hero-photo.fx-exit-airplane {
  opacity: 0;
  z-index: 1;
  transform: translate3d(-70%, -20%, 0) rotate(-28deg) scale(0.7);
}
.home-hero-photo.fx-enter-airplane {
  opacity: 0;
  z-index: 1;
  transform: translate3d(80%, 25%, 0) rotate(32deg) scale(0.65);
  transition: none;
}
/* Page curl */
.home-hero-photo.fx-exit-pagecurl {
  opacity: 0;
  z-index: 1;
  transform: perspective(1200px) rotateY(-95deg) translateX(-20%);
  transform-origin: left center;
}
.home-hero-photo.fx-enter-pagecurl {
  opacity: 0;
  z-index: 1;
  transform: perspective(1200px) rotateY(95deg) translateX(20%);
  transform-origin: right center;
  transition: none;
}
/* Blinds */
.home-hero-photo.fx-exit-blinds {
  opacity: 0;
  z-index: 1;
  clip-path: polygon(0 0, 100% 0, 100% 8%, 0 8%, 0 16%, 100% 16%, 100% 24%, 0 24%, 0 32%, 100% 32%, 100% 40%, 0 40%, 0 48%, 100% 48%, 100% 56%, 0 56%, 0 64%, 100% 64%, 100% 72%, 0 72%, 0 80%, 100% 80%, 100% 88%, 0 88%, 0 96%, 100% 96%, 100% 100%, 0 100%);
  transform: scaleX(0.2);
}
.home-hero-photo.fx-enter-blinds {
  opacity: 0;
  z-index: 1;
  transform: scaleX(0.15);
  transition: none;
}
/* Dissolve */
.home-hero-photo.fx-exit-dissolve { opacity: 0; z-index: 1; filter: blur(18px) saturate(0.2); transform: scale(1.08); }
.home-hero-photo.fx-enter-dissolve { opacity: 0; z-index: 1; filter: blur(18px); transform: scale(1.1); transition: none; }
/* Flip */
.home-hero-photo.fx-exit-flip { opacity: 0; z-index: 1; transform: perspective(1400px) rotateX(90deg); }
.home-hero-photo.fx-enter-flip { opacity: 0; z-index: 1; transform: perspective(1400px) rotateX(-90deg); transition: none; }
/* Zoom */
.home-hero-photo.fx-exit-zoom { opacity: 0; z-index: 1; transform: scale(1.45); }
.home-hero-photo.fx-enter-zoom { opacity: 0; z-index: 1; transform: scale(0.55); transition: none; }
/* Cube */
.home-hero-photo.fx-exit-cube {
  opacity: 0;
  z-index: 1;
  transform: perspective(1600px) translateZ(-220px) rotateY(-90deg);
}
.home-hero-photo.fx-enter-cube {
  opacity: 0;
  z-index: 1;
  transform: perspective(1600px) translateZ(-220px) rotateY(90deg);
  transition: none;
}
.home-hero-showcase.is-dragging .home-hero-photo {
  transition: none;
}
.home-hero-shade {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(3, 7, 18, 0.32) 0%, rgba(3, 7, 18, 0.48) 45%, rgba(3, 7, 18, 0.8) 100%),
    radial-gradient(ellipse 70% 55% at 50% 50%, rgba(3, 7, 18, 0.12), rgba(3, 7, 18, 0.5));
}
.home-hero-grid {
  position: absolute;
  inset: 0;
  z-index: 4;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 197, 37, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 197, 37, 0.14) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 65% 55% at 50% 50%, #000 15%, transparent 78%);
  animation: heroGridPulse 6s ease-in-out infinite;
  pointer-events: none;
}
.home-hero-copy {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(36rem, calc(100% - 2rem));
  margin: 0;
  padding: 1.5rem 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}
@media (max-width: 575.98px) {
  .home-hero-copy {
    width: min(100%, calc(100% - 1.4rem));
    padding: 1.1rem 0.85rem;
  }
  .home-hero-ctas {
    flex-wrap: wrap;
    justify-content: center;
  }
  .home-hero-ctas .btn {
    width: 100%;
    justify-content: center;
  }
}
.home-hero-brand {
  display: none;
}
.home-hero-owner {
  margin: 0 0 0.95rem;
  max-width: 36ch;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #c4c9d4;
}
.home-hero-owner a {
  color: var(--primary);
  text-decoration: none;
}
.home-hero-owner a:hover { text-decoration: underline; }
.home-hero-slide-text {
  display: none;
  width: 100%;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.home-hero-slide-text.is-active {
  display: flex;
}
.home-hero-slide-text.is-active .home-hero-eyebrow,
.home-hero-slide-text.is-active .home-hero-title,
.home-hero-slide-text.is-active .home-hero-lead,
.home-hero-slide-text.is-active .home-hero-ctas {
  animation-duration: 0.75s;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  animation-fill-mode: both;
}
.home-hero-slide-text.is-active .home-hero-eyebrow { animation-delay: 0.02s; }
.home-hero-slide-text.is-active .home-hero-title { animation-delay: 0.1s; }
.home-hero-slide-text.is-active .home-hero-lead { animation-delay: 0.2s; }
.home-hero-slide-text.is-active .home-hero-ctas { animation-delay: 0.3s; }

.home-hero-slide-text.text-anim-appear .home-hero-eyebrow,
.home-hero-slide-text.text-anim-appear .home-hero-title,
.home-hero-slide-text.text-anim-appear .home-hero-lead,
.home-hero-slide-text.text-anim-appear .home-hero-ctas { animation-name: heroTextAppear; }

.home-hero-slide-text.text-anim-fly-left .home-hero-eyebrow,
.home-hero-slide-text.text-anim-fly-left .home-hero-title,
.home-hero-slide-text.text-anim-fly-left .home-hero-lead,
.home-hero-slide-text.text-anim-fly-left .home-hero-ctas { animation-name: heroInFromLeft; }

.home-hero-slide-text.text-anim-fly-right .home-hero-eyebrow,
.home-hero-slide-text.text-anim-fly-right .home-hero-title,
.home-hero-slide-text.text-anim-fly-right .home-hero-lead,
.home-hero-slide-text.text-anim-fly-right .home-hero-ctas { animation-name: heroInFromRight; }

.home-hero-slide-text.text-anim-fly-top .home-hero-eyebrow,
.home-hero-slide-text.text-anim-fly-top .home-hero-title,
.home-hero-slide-text.text-anim-fly-top .home-hero-lead,
.home-hero-slide-text.text-anim-fly-top .home-hero-ctas { animation-name: heroInFromTop; }

.home-hero-slide-text.text-anim-fly-bottom .home-hero-eyebrow,
.home-hero-slide-text.text-anim-fly-bottom .home-hero-title,
.home-hero-slide-text.text-anim-fly-bottom .home-hero-lead,
.home-hero-slide-text.text-anim-fly-bottom .home-hero-ctas { animation-name: heroInFromBottom; }

.home-hero-slide-text.text-anim-wheel .home-hero-eyebrow,
.home-hero-slide-text.text-anim-wheel .home-hero-title,
.home-hero-slide-text.text-anim-wheel .home-hero-lead,
.home-hero-slide-text.text-anim-wheel .home-hero-ctas { animation-name: heroTextWheel; }

.home-hero-slide-text.text-anim-bounce .home-hero-eyebrow,
.home-hero-slide-text.text-anim-bounce .home-hero-title,
.home-hero-slide-text.text-anim-bounce .home-hero-lead,
.home-hero-slide-text.text-anim-bounce .home-hero-ctas { animation-name: heroTextBounce; }

.home-hero-slide-text.text-anim-zoom .home-hero-eyebrow,
.home-hero-slide-text.text-anim-zoom .home-hero-title,
.home-hero-slide-text.text-anim-zoom .home-hero-lead,
.home-hero-slide-text.text-anim-zoom .home-hero-ctas { animation-name: heroTextZoom; }

.home-hero-slide-text.text-anim-swirl .home-hero-eyebrow,
.home-hero-slide-text.text-anim-swirl .home-hero-title,
.home-hero-slide-text.text-anim-swirl .home-hero-lead,
.home-hero-slide-text.text-anim-swirl .home-hero-ctas { animation-name: heroTextSwirl; }

.home-hero-slide-text.text-anim-float .home-hero-eyebrow,
.home-hero-slide-text.text-anim-float .home-hero-title,
.home-hero-slide-text.text-anim-float .home-hero-lead,
.home-hero-slide-text.text-anim-float .home-hero-ctas { animation-name: heroTextFloat; }

.home-hero-slide-text.text-anim-rise .home-hero-eyebrow,
.home-hero-slide-text.text-anim-rise .home-hero-title,
.home-hero-slide-text.text-anim-rise .home-hero-lead,
.home-hero-slide-text.text-anim-rise .home-hero-ctas { animation-name: heroRise; }
.home-hero-eyebrow {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
}
.home-hero-title {
  margin: 0 auto 0.65rem;
  max-width: 18ch;
  font-size: clamp(1.55rem, 4.2vw, 2.75rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: #fff;
  text-wrap: balance;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}
.home-hero-lead {
  margin: 0 auto 1.15rem;
  max-width: 34ch;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.5;
  color: #d8dce5;
  text-wrap: balance;
}
.home-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
  pointer-events: auto;
}
.home-hero-ctas .btn {
  font-weight: 800;
  letter-spacing: 0.02em;
  pointer-events: auto;
}
.home-hero-ctas .btn-outline-light:hover {
  color: var(--text-on-primary);
  background: rgba(255, 255, 255, 0.92);
  border-color: #fff;
}
.home-hero-nav {
  display: none;
}
@keyframes heroGridPulse {
  0%, 100% { opacity: 0.14; }
  50% { opacity: 0.24; }
}
@keyframes heroInFromLeft {
  from { opacity: 0; transform: translateX(-2.75rem); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes heroInFromRight {
  from { opacity: 0; transform: translateX(2.75rem); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes heroInFromTop {
  from { opacity: 0; transform: translateY(-2.25rem); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes heroInFromBottom {
  from { opacity: 0; transform: translateY(2.25rem); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes heroTextAppear {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes heroTextWheel {
  from { opacity: 0; transform: rotate(-120deg) scale(0.4); }
  to { opacity: 1; transform: rotate(0deg) scale(1); }
}
@keyframes heroTextBounce {
  0% { opacity: 0; transform: translateY(-2.5rem); }
  60% { opacity: 1; transform: translateY(0.35rem); }
  100% { transform: translateY(0); }
}
@keyframes heroTextZoom {
  from { opacity: 0; transform: scale(0.35); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes heroTextSwirl {
  from { opacity: 0; transform: rotate(35deg) scale(0.6) translateY(1.5rem); }
  to { opacity: 1; transform: rotate(0) scale(1) translateY(0); }
}
@keyframes heroTextFloat {
  from { opacity: 0; transform: translateY(1.5rem) scale(0.95); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
@keyframes heroRise {
  from { opacity: 0; transform: translateY(1.25rem); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .home-hero-photo {
    transition: opacity 0.25s ease !important;
    transform: none !important;
  }
  .home-hero-photo.is-active,
  .home-hero-photo.is-exit-left,
  .home-hero-photo.is-exit-right,
  .home-hero-photo.is-enter-left,
  .home-hero-photo.is-enter-right {
    transform: none !important;
  }
  .home-hero-grid,
  .home-hero-copy,
  .home-hero-slide-text.is-active .home-hero-eyebrow,
  .home-hero-slide-text.is-active .home-hero-title,
  .home-hero-slide-text.is-active .home-hero-lead,
  .home-hero-slide-text.is-active .home-hero-ctas {
    animation: none !important;
  }
}
.repair-band {
  background: #111827;
  border-radius: 1.15rem;
  padding: 2.5rem 1.5rem;
  color: #fff;
  overflow: hidden;
  position: relative;
}
.marketplace-stats-wrap {
  position: relative;
  margin-bottom: 1.25rem;
  min-height: 6.5rem;
  display: flex;
  align-items: center;
}
.marketplace-stats {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.25rem;
}
.marketplace-hardware {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1rem;
  perspective: 900px;
  transform-style: preserve-3d;
}
/* Mobile: icons sit behind Fast / Secure labels */
@media (max-width: 991.98px) {
  .marketplace-hardware {
    position: absolute;
    inset: -0.35rem 0;
    z-index: 0;
    justify-content: space-around;
    opacity: 0.38;
    pointer-events: none;
    min-height: 0;
  }
  .mcu-card,
  .esp32-card {
    padding: 0.45rem 0.5rem 0.35rem;
    background: linear-gradient(145deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02));
    box-shadow: 0 10px 18px rgba(0,0,0,0.25);
  }
  .mcu-chip { width: 4.6rem; height: 4.6rem; }
  .esp32-board { width: 6.75rem; }
  .mcu-label { font-size: 0.55rem; opacity: 0.85; }
  .marketplace-stats > div {
    text-shadow: 0 2px 10px rgba(0,0,0,0.65);
  }
}
.mcu-card,
.esp32-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 1rem;
  padding: 0.95rem 1rem 0.7rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  backdrop-filter: blur(6px);
  transform-style: preserve-3d;
  box-shadow:
    0 18px 30px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.08);
  will-change: transform;
}
.mcu-card {
  animation: mcu-float-3d 5.5s ease-in-out infinite;
}
.esp32-card {
  animation: esp32-float-3d 6.5s ease-in-out infinite;
  animation-delay: -1.8s;
}
.mcu-card:hover,
.esp32-card:hover {
  border-color: rgba(251,191,36,0.5);
  animation-play-state: paused;
}
.mcu-chip,
.esp32-board {
  display: block;
  transform: translateZ(28px);
  filter: drop-shadow(0 10px 14px rgba(0,0,0,0.35));
}
.mcu-chip {
  width: 6.5rem;
  height: 6.5rem;
}
.esp32-board {
  width: 9.5rem;
  height: auto;
}
.mcu-label {
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  transform: translateZ(18px);
}
@keyframes mcu-float-3d {
  0%   { transform: translate3d(0, 0, 0) rotateX(12deg) rotateY(-18deg) rotateZ(-2deg); }
  25%  { transform: translate3d(0, -10px, 16px) rotateX(6deg) rotateY(-6deg) rotateZ(1deg); }
  50%  { transform: translate3d(0, -4px, 8px) rotateX(14deg) rotateY(16deg) rotateZ(2deg); }
  75%  { transform: translate3d(0, -12px, 20px) rotateX(4deg) rotateY(8deg) rotateZ(-1deg); }
  100% { transform: translate3d(0, 0, 0) rotateX(12deg) rotateY(-18deg) rotateZ(-2deg); }
}
@keyframes esp32-float-3d {
  0%   { transform: translate3d(0, 8px, 0) rotateX(10deg) rotateY(18deg) rotateZ(2deg); }
  25%  { transform: translate3d(0, -6px, 18px) rotateX(6deg) rotateY(8deg) rotateZ(-1deg); }
  50%  { transform: translate3d(0, -12px, 10px) rotateX(14deg) rotateY(-14deg) rotateZ(-2deg); }
  75%  { transform: translate3d(0, -2px, 22px) rotateX(5deg) rotateY(-6deg) rotateZ(1deg); }
  100% { transform: translate3d(0, 8px, 0) rotateX(10deg) rotateY(18deg) rotateZ(2deg); }
}
@media (min-width: 992px) {
  .marketplace-row {
    position: relative;
  }
  .marketplace-stats-wrap {
    position: static;
    min-height: 0;
    margin-bottom: 1.5rem;
  }
  .marketplace-hardware {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: min(42%, 22rem);
    min-height: 12.5rem;
    justify-content: flex-end;
    gap: 1.25rem 1.5rem;
    z-index: 1;
    opacity: 1;
    pointer-events: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mcu-card,
  .esp32-card {
    animation: none;
    transform: none;
  }
}
.soft-band {
  background: var(--primary-soft);
  border-radius: 1.15rem;
  padding: 2rem 1.25rem;
}
.product-gallery-main {
  position: relative;
  width: 100%;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 1rem;
  overflow: hidden;
}
.product-purchase-card {
  border: 1px solid var(--border-light);
  border-radius: 1rem;
  padding: 1rem 1.15rem;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.03), rgba(15, 23, 42, 0.01));
}
.product-purchase-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--border-light);
}
.product-purchase-row:first-child {
  border-top: 0;
  padding-top: 0;
}
.product-purchase-history[hidden] {
  display: none !important;
}
.product-media-image-layer,
.product-media-video-layer {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--bg-muted, #f3f4f6);
}
@media (min-width: 992px) {
  .product-media-image-layer,
  .product-media-video-layer {
    aspect-ratio: 16 / 10;
  }
  .product-gallery-main {
    max-width: 30rem;
  }
}
.product-zoom-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
  background: var(--bg-muted, #f3f4f6);
}
.product-zoom-viewport.is-dragging {
  cursor: grabbing;
}
.product-gallery-img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  transform-origin: center center;
  will-change: transform;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.product-gallery-flash {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 5;
}
.product-gallery-main.has-video .product-gallery-flash {
  left: 3.5rem;
}
.product-video-cam-btn,
.product-view-cam-btn {
  position: absolute;
  top: 0.75rem;
  z-index: 6;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.product-video-cam-btn {
  left: 0.75rem;
}
.product-view-cam-btn {
  right: 0.75rem;
}
.product-gallery-main:hover .product-video-cam-btn,
.product-gallery-main:hover .product-view-cam-btn,
.product-gallery-main:focus-within .product-video-cam-btn,
.product-gallery-main:focus-within .product-view-cam-btn,
.product-video-cam-btn:focus-visible,
.product-view-cam-btn:focus-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
@media (hover: none) {
  .product-video-cam-btn,
  .product-view-cam-btn {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
}
.product-video-cam-btn:hover,
.product-view-cam-btn:hover {
  background: rgba(15, 23, 42, 0.95);
}
.product-video-back {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 4;
}
.product-video-frame {
  position: absolute;
  inset: 0.75rem;
  background: #0b1220;
  border-radius: 0.65rem;
  overflow: hidden;
}
.product-inline-video,
.product-inline-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
}
.product-thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.45rem;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}
.product-thumb {
  aspect-ratio: 1;
  border: 2px solid transparent;
  border-radius: 0.65rem;
  overflow: hidden;
  opacity: 0.55;
  padding: 0;
  background: var(--bg-muted);
}
.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--card);
}
.product-thumb.active { opacity: 1; border-color: var(--primary); }

.product-image-viewer {
  position: fixed;
  inset: 0;
  z-index: 1080;
  background: rgba(8, 12, 20, 0.92);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  padding: 1rem;
}
.product-image-viewer[hidden] {
  display: none !important;
}
.product-image-viewer-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}
.product-image-viewer-toolbar .product-zoom-btn {
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.95);
  color: #111827;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  font-size: 0.85rem;
}
.product-image-viewer-toolbar .product-zoom-btn:hover {
  background: #fff;
}
.product-image-viewer-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border-radius: 0.85rem;
  background: #0b1220;
  cursor: grab;
  touch-action: none;
}
.product-image-viewer-stage.is-dragging {
  cursor: grabbing;
}
.product-viewer-img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  transform-origin: center center;
  will-change: transform;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.product-image-viewer-hint {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  text-align: center;
  margin: 0.65rem 0 0;
}
.product-tab-bar {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
  overflow-x: auto;
}
.product-tab {
  border: 0;
  background: transparent;
  padding: 0.85rem 1.1rem;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.product-tab.active {
  color: var(--primary-dark);
  border-bottom-color: var(--primary);
}
.tab-content { display: none; }
.tab-content.active { display: block; }
/* ---------- Messages / support chat ---------- */
.messages-page .messages-aside {
  padding: 1.25rem;
  border-radius: 1.15rem;
}
.messages-online-dot {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--success);
  margin-right: 0.35rem;
  vertical-align: middle;
}
.messages-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.messages-chip {
  border: 1px solid var(--border);
  background: var(--bg-muted);
  color: var(--text);
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.messages-chip:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}
.messages-panel {
  height: min(70vh, 40rem);
  min-height: 28rem;
  border-radius: 1.15rem;
}
.messages-panel-head {
  background: var(--card);
  color: var(--text);
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border-light);
}
.messages-avatar {
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1rem;
  flex-shrink: 0;
}
.messages-list {
  padding: 1rem;
  overflow-y: auto;
  background: var(--bg-muted);
}
.messages-composer {
  display: flex;
  gap: 0.65rem;
  padding: 0.9rem 1rem;
  border-top: 1px solid var(--border-light);
  background: var(--card);
}
.messages-typing {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0 1rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-muted);
}
.messages-typing span {
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--text-muted);
  animation: msg-dot 1s infinite ease-in-out;
}
.messages-typing span:nth-child(2) { animation-delay: 0.15s; }
.messages-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes msg-dot {
  0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}
.msg-row {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.msg-row.is-user { justify-content: flex-end; }
.msg-avatar {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.55rem;
  background: var(--primary);
  color: var(--text-on-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  flex-shrink: 0;
}
.msg-bubble {
  max-width: 85%;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.msg-user {
  background: var(--primary);
  color: var(--text-on-primary);
  border-bottom-right-radius: 0.25rem;
}
.msg-bot {
  background: var(--card);
  border: 1px solid var(--border-light);
  color: var(--text);
  border-bottom-left-radius: 0.25rem;
}
.msg-time {
  display: block;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.45;
}
[data-theme="dark"] .messages-chip {
  background: var(--bg-secondary);
}
[data-theme="dark"] .msg-bot {
  background: var(--bg-secondary);
}

/* ---------- Shop AI (guided shopping assistant) ---------- */
html:has(body.layout-shop-ai) {
  height: 100%;
  overflow: hidden;
}
body.layout-shop-ai {
  overflow: hidden;
  overscroll-behavior: none;
  height: 100%;
}
body.layout-shop-ai.shop-ai-chats-open {
  overflow: hidden;
}
.layout-shop-ai .app-shell {
  /* Override .app-shell { min-height: 100vh } — that wins over max-height and clips the composer */
  min-height: 0 !important;
  height: 100dvh;
  height: 100svh;
  max-height: 100dvh;
  max-height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.layout-shop-ai .app-topbar {
  flex-shrink: 0;
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative;
  z-index: 30;
}
.layout-shop-ai .app-main {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.layout-shop-ai .app-content-shop-ai {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: none;
  overflow: hidden;
  padding: 0.75rem 0.85rem 0.85rem !important;
  display: flex;
  flex-direction: column;
}
.layout-shop-ai.shop-ai-vv .app-shell {
  min-height: 0 !important;
  height: var(--shop-ai-vv-h, 100svh);
  max-height: var(--shop-ai-vv-h, 100svh);
}
.layout-shop-ai.shop-ai-vv .app-main {
  height: auto;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.layout-shop-ai.shop-ai-keyboard #shop-ai-suggest-row {
  display: none;
}
.shop-ai-app {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  overflow: hidden;
  position: relative;
}
.shop-ai-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem 0.75rem;
  flex-shrink: 0;
}
.shop-ai-top-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem 0.75rem;
  flex: 1 1 auto;
  min-width: 0;
}
.shop-ai-tools-toggle {
  display: none;
}
.shop-ai-stage-head-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}
.shop-ai-top-main {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  min-width: 0;
}
.shop-ai-badge {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #1c2430, #111827);
  color: var(--primary);
  flex-shrink: 0;
  font-size: 1rem;
}
.shop-ai-title {
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.15;
}
.shop-ai-lead { display: none; }
.shop-ai-modes-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  flex: 1 1 auto;
  min-width: 0;
  justify-content: center;
}
.shop-ai-modes-caption {
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: 0.15rem;
}
.shop-ai-mode-ico {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.shop-ai-mode-ico i { font-size: 0.78rem; color: var(--primary-dark); }
.shop-ai-mode-ico:hover,
.shop-ai-mode-ico.is-active {
  border-color: var(--primary);
  background: var(--primary-soft);
}
@media (max-width: 767.98px) {
  .shop-ai-modes-caption { display: none; }
  .shop-ai-mode-ico span { display: none; }
  .shop-ai-mode-ico {
    width: 2.15rem;
    height: 2.15rem;
    padding: 0;
    justify-content: center;
  }
  .shop-ai-top-main { display: none; }
  .shop-ai-top {
    display: none;
    padding: 0.55rem 0.65rem;
    gap: 0.45rem;
    position: absolute;
    top: 0.35rem;
    left: 0.35rem;
    right: 0.35rem;
    z-index: 28;
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: 0.95rem;
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.14);
  }
  .shop-ai-top.is-tools-open {
    display: flex;
  }
  .shop-ai-top-tools {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
  }
  .shop-ai-top-tools.is-open {
    display: flex;
  }
  .shop-ai-modes-bar {
    justify-content: flex-start;
    width: 100%;
  }
  .shop-ai-top-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .layout-shop-ai .app-content-shop-ai {
    padding: 0 !important;
  }
  .shop-ai-app {
    gap: 0;
    height: 100%;
    max-height: 100%;
  }
  .shop-ai-layout {
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
    gap: 0;
    display: flex;
    flex-direction: column;
  }
  .shop-ai-stage {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    box-shadow: none;
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    max-height: 100%;
  }
  .shop-ai-tools-toggle {
    display: inline-flex;
    width: 1.85rem;
    height: 1.85rem;
    margin: 0;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-muted);
    color: var(--text-muted);
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    padding: 0;
    flex-shrink: 0;
    box-shadow: none;
  }
  .shop-ai-tools-toggle.is-open,
  .shop-ai-tools-toggle:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--text);
  }
  .shop-ai-stage-head {
    padding: 0.45rem 0.65rem;
  }
  .shop-ai-live-label,
  .shop-ai-lang-pill {
    font-size: 0.58rem;
  }
  .shop-ai-mode-tag {
    font-size: 0.55rem;
    padding: 0.1rem 0.35rem;
  }
  .shop-ai-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 0.55rem 0.65rem;
    gap: 0.5rem;
  }
  .shop-ai-footer-tools {
    flex: 0 0 auto;
    padding: 0.4rem 0.65rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
    position: relative;
    z-index: 5;
    background: var(--card);
  }
  .shop-ai-suggest-row {
    margin-bottom: 0.35rem;
    padding-bottom: 0.15rem;
  }
  .shop-ai-chip {
    padding: 0.28rem 0.55rem;
    font-size: 0.68rem;
  }
  .shop-ai-composer textarea {
    min-height: 2.75rem;
    max-height: 5rem;
    font-size: 16px; /* avoid iOS zoom */
    padding: 0.65rem 3rem 0.65rem 0.8rem;
    border-radius: 0.95rem;
    line-height: 1.35;
  }
  .shop-ai-send-btn {
    width: 2.25rem;
    height: 2.25rem;
    right: 0.3rem;
    bottom: 0.3rem;
  }
}
.shop-ai-top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.shop-ai-chats-toggle {
  display: none;
  width: 2.15rem;
  height: 2.15rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  padding: 0;
}
.shop-ai-chats-toggle[aria-expanded="true"],
.shop-ai-chats-toggle:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.shop-ai-chats-close {
  display: none;
  width: 1.75rem;
  height: 1.75rem;
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  color: var(--text-muted);
  align-items: center;
  justify-content: center;
}
.shop-ai-chats-backdrop {
  display: none;
}
.shop-ai-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-shrink: 0;
}
.shop-ai-lang .form-select {
  min-width: 8.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.78rem;
}
.shop-ai-offline {
  flex: 1;
  text-align: center;
  padding: 2.5rem 1.25rem;
  border-radius: 1.15rem;
  border: 1px dashed var(--border);
  background: var(--card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.shop-ai-offline-icon {
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 0.85rem;
  border-radius: 0.9rem;
  display: grid;
  place-items: center;
  background: var(--bg-muted);
  color: var(--text-muted);
  font-size: 1.15rem;
}
.shop-ai-offline h2 {
  font-weight: 900;
  margin-bottom: 0.45rem;
  font-size: 1.2rem;
}
.shop-ai-offline p {
  color: var(--text-muted);
  max-width: 28rem;
  margin: 0 auto 1.1rem;
  font-size: 0.9rem;
}
.shop-ai-offline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
}
.shop-ai-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(220px, 270px) minmax(0, 1fr);
  gap: 0.85rem;
  align-items: stretch;
  overflow: hidden;
}
@media (max-width: 991.98px) {
  .shop-ai-layout {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr);
    position: relative;
  }
  .shop-ai-chats-toggle {
    display: inline-flex;
  }
  .shop-ai-chats-close {
    display: inline-flex;
  }
  .shop-ai-side {
    display: none;
    position: absolute;
    top: 0.35rem;
    left: 0.35rem;
    right: 0.35rem;
    z-index: 40;
    max-height: min(62vh, 26rem);
    padding: 0.7rem;
    box-shadow: 0 16px 40px rgba(17, 24, 39, 0.18);
  }
  .shop-ai-side.is-open {
    display: flex;
  }
  .shop-ai-chats-backdrop {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 35;
    background: rgba(17, 24, 39, 0.28);
    border-radius: 1.05rem;
  }
  .shop-ai-chats-backdrop[hidden] {
    display: none !important;
  }
  .shop-ai-chat-list {
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    gap: 0.35rem;
  }
  .shop-ai-chat-item {
    flex: 0 0 auto;
    max-width: none;
    background: var(--bg);
    border-color: var(--border-light);
  }
  .shop-ai-login-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.65rem;
  }
  .shop-ai-shop-link { display: none; }
  .shop-ai-lead { display: none; }
  .shop-ai-clear-label { display: none; }
  #shop-ai-clear { width: 2.15rem; height: 2.15rem; padding: 0; justify-content: center; }
  #shop-ai-clear .me-1 { margin: 0 !important; }
}
@media (max-width: 575.98px) {
  .shop-ai-top.is-tools-open {
    gap: 0.4rem;
  }
  .shop-ai-modes-bar {
    width: 100%;
    justify-content: flex-start;
  }
  .shop-ai-top-actions {
    margin-left: 0;
    justify-content: flex-start;
  }
  .shop-ai-lang .form-select {
    min-width: 6.5rem;
  }
}
.shop-ai-side {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 1.05rem;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  box-shadow: 0 8px 28px rgba(17, 24, 39, 0.04);
  overflow: hidden;
  min-height: 0;
}
@media (max-width: 991.98px) {
  .shop-ai-side {
    display: none;
    position: absolute;
    top: 0.35rem;
    left: 0.35rem;
    right: 0.35rem;
    z-index: 40;
    max-height: min(62vh, 26rem);
    padding: 0.7rem;
    box-shadow: 0 16px 40px rgba(17, 24, 39, 0.18);
  }
  .shop-ai-side.is-open {
    display: flex;
  }
}
.shop-ai-side-label {
  display: block;
  margin: 0;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.shop-ai-login-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.75rem;
  border-radius: 0.85rem;
  background: var(--bg);
  border: 1px dashed var(--border);
}
.shop-ai-login-card p {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--text-muted);
  line-height: 1.4;
}
.shop-ai-chat-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.shop-ai-empty {
  margin: 0.5rem 0;
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--text-muted);
}
.shop-ai-chat-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 0.7rem;
  border: 1px solid transparent;
}
.shop-ai-chat-item.is-active {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.shop-ai-chat-open {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0.5rem 0.45rem;
  font-size: 0.78rem;
  font-weight: 750;
  border-radius: 0.65rem;
}
.shop-ai-chat-open span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shop-ai-chat-open i {
  color: var(--text-muted);
  font-size: 0.72rem;
  flex-shrink: 0;
}
.shop-ai-chat-actions { display: flex; gap: 0.1rem; }
.shop-ai-chat-act {
  width: 1.7rem;
  height: 1.7rem;
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
}
.shop-ai-chat-act:hover { background: var(--bg-muted); color: var(--text); }
.shop-ai-chat-act.danger:hover { color: #b91c1c; background: rgba(185, 28, 28, 0.08); }
.shop-ai-shop-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--text);
  text-decoration: none;
  padding: 0.35rem 0.1rem;
  flex-shrink: 0;
}
.shop-ai-shop-link:hover { color: var(--primary-dark); }
.shop-ai-stage {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 1.05rem;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(17, 24, 39, 0.06);
}
.shop-ai-stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.95rem;
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(180deg, rgba(255, 197, 37, 0.08), transparent);
  flex-shrink: 0;
}
.shop-ai-live-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
  flex-shrink: 0;
}
.shop-ai-live-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.shop-ai-lang-pill {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--text);
  white-space: nowrap;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shop-ai-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background:
    radial-gradient(60% 40% at 100% 0%, rgba(255, 197, 37, 0.06), transparent 55%),
    var(--bg);
  -webkit-overflow-scrolling: touch;
}
.shop-ai-msg {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  max-width: min(100%, 36rem);
  flex-shrink: 0;
}
.shop-ai-msg.is-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.shop-ai-avatar {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 0.55rem;
  background: #111827;
  color: var(--primary);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 0.75rem;
  position: sticky;
  top: 0.15rem;
}
.shop-ai-bubble {
  border-radius: 0.95rem;
  padding: 0.65rem 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
  min-width: 0;
  flex: 1 1 auto;
}
.shop-ai-bubble p { margin: 0; white-space: pre-wrap; }
.shop-ai-bubble .shop-ai-rich {
  white-space: normal;
}
.shop-ai-rich p {
  margin: 0 0 0.55rem;
  white-space: pre-wrap;
}
.shop-ai-rich p:last-child { margin-bottom: 0; }
.shop-ai-rich .shop-ai-h {
  font-weight: 900;
  margin: 0.2rem 0 0.45rem;
  color: var(--primary-dark, #b45309);
}
.shop-ai-rich .shop-ai-h1 { font-size: 1.05rem; }
.shop-ai-rich .shop-ai-h2 { font-size: 0.98rem; }
.shop-ai-rich .shop-ai-h3 { font-size: 0.92rem; }
.shop-ai-rich .shop-ai-strong {
  color: var(--primary-dark, #b45309);
  font-weight: 900;
}
.shop-ai-rich .shop-ai-em {
  color: #0f766e;
  font-style: italic;
  font-weight: 700;
}
.shop-ai-rich .shop-ai-code {
  display: inline-block;
  padding: 0.08rem 0.35rem;
  border-radius: 0.35rem;
  background: rgba(15, 23, 42, 0.06);
  color: #7c3aed;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82em;
  font-weight: 700;
}
.shop-ai-rich .shop-ai-ul,
.shop-ai-rich .shop-ai-ol {
  margin: 0.25rem 0 0.65rem;
  padding-left: 1.2rem;
}
.shop-ai-rich .shop-ai-ul { list-style: none; padding-left: 0; }
.shop-ai-rich .shop-ai-ul li {
  position: relative;
  padding-left: 1.15rem;
  margin-bottom: 0.35rem;
}
.shop-ai-rich .shop-ai-ul li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.55em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--primary, #f59e0b);
}
.shop-ai-rich .shop-ai-ol {
  list-style: none;
  counter-reset: shopai;
  padding-left: 0;
}
.shop-ai-rich .shop-ai-ol li {
  counter-increment: shopai;
  position: relative;
  padding-left: 1.7rem;
  margin-bottom: 0.4rem;
}
.shop-ai-rich .shop-ai-ol li::before {
  content: counter(shopai);
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
}
.shop-ai-rich a.shop-ai-md-link,
.shop-ai-rich a.shop-ai-product-link {
  color: #2563eb;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-color: rgba(37, 99, 235, 0.35);
}
.shop-ai-rich a.shop-ai-product-link {
  color: #b45309;
  background: rgba(245, 158, 11, 0.12);
  border-radius: 0.35rem;
  padding: 0.05rem 0.3rem;
  text-decoration: none;
}
.shop-ai-rich a.shop-ai-product-link:hover,
.shop-ai-rich a.shop-ai-md-link:hover {
  filter: brightness(1.05);
  text-decoration: underline;
}
.shop-ai-bubble time {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.5;
}
.shop-ai-bubble.is-bot {
  background: var(--card);
  border: 1px solid var(--border-light);
  color: var(--text);
  border-bottom-left-radius: 0.28rem;
}
.shop-ai-bubble.is-user {
  background: #111827;
  color: #fff;
  border-bottom-right-radius: 0.28rem;
}
.shop-ai-typing {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0 0.95rem 0.65rem;
  flex-shrink: 0;
}
.shop-ai-typing.hidden { display: none; }
.shop-ai-typing-bubble {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.9rem;
  border-radius: 0.95rem;
  border-bottom-left-radius: 0.28rem;
  background: var(--card);
  border: 1px solid var(--border-light);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}
.shop-ai-typing-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
}
.shop-ai-wave-dots {
  display: inline-flex;
  align-items: flex-end;
  gap: 0.28rem;
  height: 1rem;
}
.shop-ai-wave-dots i {
  display: block;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: linear-gradient(180deg, #f59e0b, #ea580c);
  animation: shopAiWave 1.05s ease-in-out infinite;
}
.shop-ai-wave-dots i:nth-child(2) {
  animation-delay: 0.15s;
  background: linear-gradient(180deg, #38bdf8, #2563eb);
}
.shop-ai-wave-dots i:nth-child(3) {
  animation-delay: 0.3s;
  background: linear-gradient(180deg, #34d399, #059669);
}
@keyframes shopAiWave {
  0%, 60%, 100% {
    transform: translateY(0) scale(0.9);
    opacity: 0.45;
  }
  30% {
    transform: translateY(-0.45rem) scale(1.15);
    opacity: 1;
  }
}
[data-theme="dark"] .shop-ai-rich .shop-ai-code {
  background: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .shop-ai-rich a.shop-ai-product-link {
  background: rgba(245, 158, 11, 0.18);
}
.shop-ai-mode-tag {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: var(--bg-muted);
}
.shop-ai-footer-tools {
  flex-shrink: 0;
  border-top: 1px solid var(--border-light);
  background: var(--card);
  padding: 0.55rem 0.75rem 0.7rem;
}
.shop-ai-suggest-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}
.shop-ai-chip {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 999px;
  padding: 0.32rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1.2;
  white-space: nowrap;
}
@media (max-width: 991.98px) {
  .shop-ai-suggest-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    gap: 0.4rem;
    margin-bottom: 0.45rem;
    padding: 0.1rem 0.15rem 0.35rem;
    scrollbar-width: thin;
  }
  .shop-ai-suggest-row::-webkit-scrollbar {
    height: 3px;
  }
  .shop-ai-suggest-row::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 999px;
  }
  .shop-ai-chip {
    flex: 0 0 auto;
  }
}
.shop-ai-chip:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.shop-ai-composer {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.shop-ai-input-wrap {
  position: relative;
  display: flex;
  align-items: flex-end;
}
.shop-ai-composer textarea {
  border-radius: 1rem;
  resize: none;
  min-height: 3.1rem;
  max-height: 6rem;
  font-weight: 600;
  font-size: 0.9rem;
  border-color: var(--border);
  background: var(--bg);
  padding: 0.7rem 3.1rem 0.7rem 0.85rem;
  width: 100%;
}
.shop-ai-composer textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 197, 37, 0.25);
}
.shop-ai-send-btn {
  position: absolute;
  right: 0.4rem;
  bottom: 0.4rem;
  width: 2.35rem;
  height: 2.35rem;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #111827;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(255, 197, 37, 0.35);
}
.shop-ai-send-btn:hover { filter: brightness(0.96); }
.shop-ai-composer-bar { display: none; }
[data-theme="dark"] .shop-ai-side,
[data-theme="dark"] .shop-ai-stage,
[data-theme="dark"] .shop-ai-bubble.is-bot {
  background: var(--card);
  border-color: var(--border);
}

.shop-pagination a.disabled { opacity: 0.35; pointer-events: none; }
.device-btn.btn-primary { color: var(--text-on-primary); }

/* ---------- Admin / dashboard panels ---------- */
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}
.admin-tabs a {
  padding: 0.55rem 0.9rem;
  border-radius: 0.75rem;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-muted);
  text-decoration: none;
}
.admin-tabs a.active {
  background: #111827;
  color: #fff;
  border-color: #111827;
}
.panel {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 1rem;
  padding: 1.15rem;
  margin-bottom: 1rem;
}
.panel h3 {
  font-size: 0.85rem;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

/* Utility leftovers used by JS templates (dashboard/admin/repair) */
.fw-black { font-weight: 900 !important; }
.tracking-wide { letter-spacing: 0.08em; }
.tracking-widest { letter-spacing: 0.16em; }
.rounded-pill { border-radius: 9999px !important; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.max-w-7xl { max-width: 80rem; margin-left: auto; margin-right: auto; }
.max-w-4xl { max-width: 56rem; margin-left: auto; margin-right: auto; }
.max-w-3xl { max-width: 48rem; margin-left: auto; margin-right: auto; }
.max-w-sm { max-width: 24rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (min-width: 768px) {
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:flex-row { flex-direction: row; }
  .md\:block { display: block; }
  .md\:flex-col { flex-direction: column; }
}
@media (min-width: 992px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:col-span-1 { grid-column: span 1 / span 1; }
  .lg\:col-span-2 { grid-column: span 2 / span 2; }
}
.w-full { width: 100%; }
.w-8 { width: 2rem; }
.w-10 { width: 2.5rem; }
.w-12 { width: 3rem; }
.w-16 { width: 4rem; }
.w-24 { width: 6rem; }
.h-8 { height: 2rem; }
.h-10 { height: 2.5rem; }
.h-12 { height: 3rem; }
.h-16 { height: 4rem; }
.h-24 { height: 6rem; }
.min-h-\[60vh\] { min-height: 60vh; }
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-\[8px\] { font-size: 8px; }
.text-\[9px\] { font-size: 9px; }
.text-\[10px\] { font-size: 10px; }
.text-\[11px\] { font-size: 11px; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.uppercase { text-transform: uppercase; }
.font-medium { font-weight: 500; }
.font-bold { font-weight: 700; }
.font-extrabold, .font-black { font-weight: 900; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }
.top-24 { top: 6rem; }
.shrink-0 { flex-shrink: 0; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }
.rounded-\[20px\] { border-radius: 20px; }
.rounded-\[24px\] { border-radius: 24px; }
.rounded-\[28px\] { border-radius: 28px; }
.rounded-\[40px\] { border-radius: 40px; }
.border { border: 1px solid var(--border); }
.border-b { border-bottom: 1px solid var(--border); }
.border-t { border-top: 1px solid var(--border); }
.border-0 { border: 0; }
.shadow-sm { box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.shadow-xl, .shadow-2xl { box-shadow: 0 12px 28px rgba(0,0,0,.1); }
.bg-white { background: var(--card) !important; }
.bg-gray-50, .bg-gray-50\/30, .bg-gray-50\/50 { background: var(--bg-muted) !important; }
.bg-gray-100 { background: var(--bg-muted) !important; }
.bg-gray-900, .bg-gray-950 { background: #111827 !important; color: #fff; }
.bg-amber-50, .bg-amber-50\/50, .bg-amber-50\/70 { background: var(--primary-soft) !important; }
.bg-amber-100 { background: var(--primary-light) !important; }
.bg-emerald-50 { background: var(--success-soft) !important; }
.bg-rose-50 { background: var(--error-soft) !important; }
.bg-indigo-50 { background: var(--info-soft) !important; }
.text-white { color: #fff !important; }
.text-gray-900 { color: var(--text) !important; }
.text-gray-700, .text-gray-600 { color: var(--text-muted) !important; }
.text-gray-500, .text-gray-400, .text-gray-300 { color: var(--text-muted) !important; }
.text-amber-600, .text-amber-500, .text-amber-400, .text-amber-700 { color: var(--primary-dark) !important; }
.text-emerald-600, .text-emerald-700, .text-green-400 { color: var(--success) !important; }
.text-rose-500, .text-rose-600 { color: var(--error) !important; }
.text-indigo-600, .text-cyan-600 { color: var(--info) !important; }
.border-gray-100, .border-gray-50, .border-gray-200 { border-color: var(--border-light) !important; }
.border-amber-100, .border-amber-200 { border-color: var(--primary-light) !important; }
.border-emerald-200 { border-color: #a7f3d0 !important; }
.border-rose-200 { border-color: #fecaca !important; }
.hover\:bg-gray-100:hover { background: var(--bg-muted) !important; }
.hover\:text-amber-600:hover { color: var(--primary-dark) !important; }
.hover\:bg-amber-600:hover { background: var(--primary) !important; color: var(--text-on-primary) !important; }
.transition { transition: 0.2s ease; }
.inline-block { display: inline-block; }
.inline-flex { display: inline-flex; }
.block { display: block; }
.table-auto { table-layout: auto; }
.cursor-pointer { cursor: pointer; }
.self-center { align-self: center; }
.mr-2 { margin-right: 0.5rem; }
.ml-auto { margin-left: auto; }
.pl-12 { padding-left: 3rem; }
.pr-4 { padding-right: 1rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pb-4 { padding-bottom: 1rem; }
.pb-6 { padding-bottom: 1.5rem; }
.aspect-square { aspect-ratio: 1 / 1; }
.object-cover { object-fit: cover; }
.opacity-50 { opacity: 0.5; }
.disabled\:opacity-50:disabled { opacity: 0.5; }
.no-print {}
@media print {
  .no-print { display: none !important; }
}

/* ---------- Customer account area ---------- */
.account-page {
  padding-bottom: 1.5rem;
}
.account-page-header {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.85rem 1.25rem;
  margin: 0 0 1.35rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.account-page-heading {
  width: 100%;
  text-align: center;
}
.account-page-title {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
  text-align: center;
}
.account-page-lead {
  margin: 0.35rem auto 0;
  max-width: 40rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.45;
  text-align: center;
}
.account-page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.account-main {
  min-width: 0;
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
}
.account-page .shop-grid {
  max-width: none;
}
.account-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}
@media (min-width: 768px) {
  .account-stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.account-stat {
  padding: 1rem 1.05rem;
  border-radius: 1rem;
  text-align: center;
}
.account-stat .filter-label {
  text-align: center;
}
.account-stat-value {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-align: center;
}
.account-page > .account-page-header + *,
.account-main > .h6,
.account-main > h2,
.account-panel > .h6,
.account-panel > h2,
.account-page .section-title {
  text-align: center;
}
.account-page #orders-count,
.account-page #history-count,
.account-page #ticket-count,
.account-page #wishlist-count-header {
  text-align: center;
  width: 100%;
}
.account-page .empty-state {
  text-align: center;
}
.account-sidebar {
  display: none;
}
.account-menu {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.account-menu-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.75rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
}
.account-menu-link i {
  width: 1.1rem;
  text-align: center;
  color: var(--text-muted);
}
.account-menu-link:hover {
  background: var(--bg-muted);
  color: var(--text);
}
.account-menu-link.active {
  background: var(--primary-soft);
  color: var(--primary-ink);
}
.account-menu-link.active i { color: var(--primary-dark); }
.account-menu-link.text-danger { color: var(--error); }
.account-panel {
  padding: 1.15rem;
  border-radius: 1.15rem;
}
.profile-theme-row .form-check-input {
  width: 2.6rem;
  height: 1.35rem;
  cursor: pointer;
}
.profile-theme-row .form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}
.profile-settings-stack {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.profile-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  background: var(--bg-muted);
  cursor: pointer;
}
.profile-setting-row strong {
  display: block;
  font-size: 0.9rem;
}
.profile-setting-row small {
  font-size: 0.78rem;
}
.profile-setting-row .form-check-input {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  flex-shrink: 0;
  cursor: pointer;
}
.profile-quick-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}
@media (min-width: 576px) {
  .profile-quick-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.profile-quick-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
}
.profile-quick-link i {
  color: var(--primary-dark);
  width: 1rem;
  text-align: center;
}
.profile-quick-link:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.account-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.account-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border-light);
  border-radius: 0.85rem;
  text-decoration: none;
  color: inherit;
  background: var(--bg-muted);
}
.account-list-item:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.account-order {
  padding: 1rem;
  border-radius: 1rem;
}
.ticket-bubble {
  border-radius: 0.85rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #f8fafc;
}
.ticket-bubble.is-staff {
  background: #eff6ff;
  border-color: rgba(37, 99, 235, 0.18);
}
.ticket-bubble.is-user {
  background: #f8fafc;
}
.account-category-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1rem;
}
@media (min-width: 576px) {
  .account-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 992px) {
  .account-category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.account-category-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 1.1rem;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.account-category-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
}
.account-category-media {
  height: 8.5rem;
  background: var(--bg-muted);
  overflow: hidden;
}
.account-category-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.account-category-fallback {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: var(--primary-dark);
}
.account-category-body {
  padding: 0.9rem 1rem 1.05rem;
}
.account-category-body h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 900;
}
.account-category-body p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 700;
}
.account-dropdown {
  min-width: 14rem;
}
[data-theme="dark"] .account-list-item {
  background: var(--bg-secondary);
}

[data-theme="dark"] .account-page-header {
  border-bottom-color: var(--border);
}

[data-theme="dark"] .account-menu-link:hover {
  background: var(--bg-muted);
}

[data-theme="dark"] .account-menu-link.active {
  background: var(--primary-soft);
  color: var(--primary);
}

[data-theme="dark"] .account-menu-link.active i {
  color: var(--primary);
}

[data-theme="dark"] .profile-setting-row {
  background: var(--bg-muted);
  border-color: var(--border);
}

[data-theme="dark"] .profile-setting-row:hover {
  border-color: var(--primary);
}

[data-theme="dark"] .profile-quick-link:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--text);
}

[data-theme="dark"] .profile-quick-link i {
  color: var(--primary);
}

[data-theme="dark"] .account-list-item:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}

[data-theme="dark"] .account-order.card {
  box-shadow: none;
}

[data-theme="dark"] .ticket-bubble {
  background: var(--bg-muted);
  border-color: var(--border);
  color: var(--text);
}

[data-theme="dark"] .ticket-bubble.is-staff {
  background: var(--info-soft);
  border-color: rgba(59, 130, 246, 0.35);
}

[data-theme="dark"] .ticket-bubble.is-user {
  background: var(--bg-muted);
}

[data-theme="dark"] .account-page .empty-state {
  color: var(--text-muted);
}

[data-theme="dark"] .account-page .empty-state .section-title {
  color: var(--text);
}

[data-theme="dark"] .account-page .status-pill.pending {
  background: var(--warning-soft);
  color: #fcd34d;
}

[data-theme="dark"] .account-category-card:hover {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

/* ---------- Dark mode: storefront account, cart, checkout, contact ---------- */
[data-theme="dark"] .account-page,
[data-theme="dark"] .checkout-page,
[data-theme="dark"] .page-wide {
  color: var(--text);
}

[data-theme="dark"] .account-page .filter-label,
[data-theme="dark"] .checkout-page .filter-label,
[data-theme="dark"] .account-page label.filter-label {
  color: var(--primary);
}

[data-theme="dark"] .account-stat-value,
[data-theme="dark"] .account-page-title,
[data-theme="dark"] .account-page .section-title,
[data-theme="dark"] .checkout-page h2,
[data-theme="dark"] .checkout-page h3,
[data-theme="dark"] .checkout-option strong,
[data-theme="dark"] .checkout-step-text strong,
[data-theme="dark"] .cart-name,
[data-theme="dark"] .summary-row.total,
[data-theme="dark"] .orders-card .fw-black,
[data-theme="dark"] .account-order .fw-black {
  color: var(--text);
}

[data-theme="dark"] .cart-name:hover {
  color: var(--primary);
}

[data-theme="dark"] .checkout-sidebar,
[data-theme="dark"] .checkout-form,
[data-theme="dark"] .checkout-option,
[data-theme="dark"] .checkout-saved-address,
[data-theme="dark"] .orders-card,
[data-theme="dark"] .orders-table-wrap,
[data-theme="dark"] .account-page .card:not(.bg-transparent) {
  background: var(--card);
  border-color: var(--border);
  color: var(--text);
}

[data-theme="dark"] .checkout-step {
  background: var(--bg-muted);
  border-color: var(--border);
  color: var(--text-muted);
}

[data-theme="dark"] .checkout-step.active {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--text);
}

[data-theme="dark"] .checkout-step.done {
  background: var(--success-soft);
  border-color: rgba(16, 185, 120, 0.35);
  color: var(--text);
}

[data-theme="dark"] .checkout-step-icon {
  background: var(--card);
  border-color: var(--border);
  color: var(--text);
}

[data-theme="dark"] .checkout-option:has(input:checked) {
  background: var(--primary-soft);
  border-color: var(--primary);
}

[data-theme="dark"] .cart-shipping-box {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--text);
}

[data-theme="dark"] .cart-shipping-box .small,
[data-theme="dark"] .summary-row,
[data-theme="dark"] .checkout-step-text small,
[data-theme="dark"] .checkout-option small,
[data-theme="dark"] .account-page-lead,
[data-theme="dark"] .account-page .text-muted,
[data-theme="dark"] .cart-sku {
  color: var(--text-muted);
}

[data-theme="dark"] .orders-filter {
  background: var(--card);
  border-color: var(--border);
  color: var(--text-muted);
}

[data-theme="dark"] .orders-filter.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text-on-primary);
}

[data-theme="dark"] .orders-view-toggle .btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text-on-primary);
}

[data-theme="dark"] .orders-table thead th {
  background: var(--bg-muted);
  color: var(--text-muted);
  border-color: var(--border);
}

[data-theme="dark"] .status-pill.warn {
  background: var(--warning-soft);
  color: #fcd34d;
}

[data-theme="dark"] .status-pill.bad,
[data-theme="dark"] .status-pill.danger {
  background: var(--error-soft);
  color: #fca5a5;
}

[data-theme="dark"] .status-pill:not(.pending):not(.ok):not(.active):not(.warn):not(.bad):not(.danger) {
  background: var(--bg-muted);
  color: var(--text);
  border-color: var(--border);
}

[data-theme="dark"] .pay-fields {
  background: var(--bg-muted) !important;
  border-color: var(--border) !important;
  color: var(--text);
}

[data-theme="dark"] .checkout-review .review-block {
  border-bottom-color: var(--border);
  color: var(--text);
}

[data-theme="dark"] .faq-item button {
  color: var(--text);
}

[data-theme="dark"] .faq-item .faq-content {
  color: var(--text-muted);
}

[data-theme="dark"] .track-search-card,
[data-theme="dark"] .track-search-input {
  background: var(--card);
  border-color: var(--border);
  color: var(--text);
}

[data-theme="dark"] .timeline-step span {
  color: var(--text-muted);
}

[data-theme="dark"] .timeline-step.current span,
[data-theme="dark"] .timeline-step.done span {
  color: var(--text);
}

[data-theme="dark"] .home-pinned-row.is-checked {
  background: var(--primary-soft);
}

[data-theme="dark"] .home-pinned-picker {
  background: var(--card);
}

[data-theme="dark"] .text-amber-600,
[data-theme="dark"] .text-amber-500,
[data-theme="dark"] .text-amber-400,
[data-theme="dark"] .text-amber-700 {
  color: var(--primary) !important;
}

/* ---------- Orders + Checkout ---------- */
.orders-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.orders-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  flex: 1;
}
.orders-filter {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.orders-filter.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text-on-primary);
}
.orders-view-toggle {
  display: inline-flex;
  gap: 0.35rem;
}
.orders-view-toggle .btn.active {
  background: var(--secondary);
  color: #fff;
  border-color: var(--secondary);
}
.orders-table-wrap {
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
  background: var(--card);
}
.orders-table {
  margin: 0;
}
.orders-table thead th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--bg-muted);
  border-bottom-color: var(--border);
}
.orders-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}
@media (min-width: 768px) {
  .orders-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.orders-card {
  padding: 1rem;
  border-radius: 1rem;
}
.status-pill.warn {
  background: var(--warning-soft);
  color: #92400e;
}
.status-pill.bad {
  background: var(--error-soft);
  color: var(--error);
}

.checkout-page { max-width: 1100px; margin: 0 auto; }
.checkout-sidebar {
  position: sticky;
  top: calc(var(--topbar-height) + 0.75rem);
}
.checkout-steps-vertical {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.checkout-step {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg-muted);
  border-radius: 0.9rem;
  padding: 0.75rem 0.85rem;
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  text-align: left;
  color: var(--text-muted);
  cursor: pointer;
}
.checkout-step-icon {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}
.checkout-step-icon .step-num {
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 900;
}
.checkout-step-icon .step-tick {
  display: none;
  font-size: 0.7rem;
}
.checkout-step-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.checkout-step-text strong {
  font-size: 0.72rem;
  font-weight: 900;
  color: inherit;
}
.checkout-step-text small {
  font-size: 0.65rem;
  line-height: 1.3;
  color: var(--text-muted);
}
.checkout-option {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  background: var(--bg-muted);
  cursor: pointer;
  margin: 0;
}
.checkout-option strong {
  font-size: 0.82rem;
}
.checkout-option small {
  font-size: 0.7rem;
}
.pay-fields {
  margin-top: 0.85rem;
  border-radius: 0.9rem !important;
  font-size: 0.88rem;
}
.pay-fields .h6,
.pay-fields h3 {
  font-size: 0.78rem !important;
}
.pay-fields .filter-label {
  font-size: 0.65rem;
}
.pay-fields .form-control {
  font-size: 0.88rem;
}
.checkout-pay-select {
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 0.75rem;
  padding: 0.65rem 0.9rem;
}
.cart-shipping-box {
  padding: 0.75rem 0.85rem;
  border-radius: 0.85rem;
  border: 1px solid var(--primary);
  background: var(--primary-soft);
}
.cart-shipping-box .small {
  font-size: 0.75rem;
}
.checkout-step.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--text);
}
.checkout-step.active .checkout-step-icon {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text-on-primary);
}
.checkout-step.done {
  color: var(--text);
  border-color: #86efac;
  background: var(--success-soft);
}
.checkout-step.done .checkout-step-icon {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}
.checkout-step.done .step-num { display: none; }
.checkout-step.done .step-tick { display: inline-block; }
.checkout-step:disabled {
  opacity: 0.55;
  cursor: default;
}
@media (max-width: 991.98px) {
  .checkout-sidebar { position: static; }
  .checkout-steps-vertical {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .checkout-step-text small { display: none; }
}
.checkout-option-grid {
  display: grid;
  gap: 0.65rem;
}
.checkout-option:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.checkout-option input { margin-top: 0.2rem; }
.checkout-saved-address {
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  border: 1px dashed var(--primary);
  background: var(--primary-soft);
}
.checkout-review .review-block {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}
.checkout-review .review-block:last-child { border-bottom: 0; }
.invoice-brand {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: flex-start;
}
.invoice-brand-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
}
.invoice-logo-wrap {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
}
.invoice-logo {
  height: 2.75rem;
  width: auto;
  max-width: 8.5rem;
  object-fit: contain;
  display: block;
}
.invoice-store-info {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.invoice-store-name {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1.2;
}
.invoice-store-info a {
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 700;
}
.invoice-order-list .table th,
.invoice-order-list .table td {
  font-size: 0.9rem;
}
@media print {
  .no-print, .app-topbar, .app-footer, .app-sidebar, .sidebar-toggle-btn { display: none !important; }
  .invoice-sheet, .card { box-shadow: none !important; border: 0 !important; }
  .invoice-logo-wrap { background: transparent !important; border: 0 !important; }
}

/* Admin products: full-bleed list + card/table */
.admin-body .app-content:has(.admin-products-fit) {
  max-width: none;
  width: 100%;
  padding-left: 0.65rem;
  padding-right: 0.65rem;
}
@media (min-width: 992px) {
  .admin-body .app-content:has(.admin-products-fit) {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }
}
.admin-product-card-img {
  aspect-ratio: 1;
  height: auto;
  background: var(--bg-muted, #f3f4f6);
}
.admin-products-table-el th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.admin-products-table-el td {
  vertical-align: middle;
}
.admin-richtext-editor {
  min-height: 12rem;
  border: 1px solid var(--border, #dee2e6);
  border-radius: 0.5rem;
}
.admin-richtext-editor .ql-editor {
  min-height: 16rem;
}
.admin-richtext-editor .ql-toolbar {
  flex-wrap: wrap;
}
.admin-gallery-keep {
  cursor: pointer;
  background: var(--bg-muted, #f8f9fa);
}
.richtext-content {
  line-height: 1.65;
  color: var(--text-muted, #64748b);
}
.richtext-content h2,
.richtext-content h3,
.richtext-content h4 {
  color: var(--text, #0f172a);
  font-weight: 800;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}
.richtext-content ul,
.richtext-content ol {
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
}
.richtext-content p {
  margin-bottom: 0.75rem;
}
.richtext-content a {
  font-weight: 700;
}
.richtext-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 0.75rem 0;
  display: inline-block;
}
.richtext-content [style*="text-align: center"] img,
.richtext-content [style*="text-align:center"] img {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.richtext-content blockquote {
  border-left: 3px solid #c9a227;
  padding-left: 0.85rem;
  margin: 0.75rem 0;
  color: var(--text, #0f172a);
}
.richtext-content table {
  width: 100%;
  margin: 0.75rem 0;
  border-collapse: collapse;
}
.richtext-content th,
.richtext-content td {
  border: 1px solid var(--border, #dee2e6);
  padding: 0.4rem 0.6rem;
  text-align: left;
}

/* Admin dashboard */
.dash-stat {
  display: block;
  transition: transform .15s ease, box-shadow .15s ease;
  color: inherit;
}
.dash-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
  color: inherit;
}
.dash-stat-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: .75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-muted, #f1f5f9);
  color: var(--text-muted, #64748b);
  flex-shrink: 0;
}
.dash-stat--revenue .dash-stat-icon { background: rgba(253, 126, 20, .12); color: #fd7e14; }
.dash-stat--orders .dash-stat-icon { background: rgba(13, 110, 253, .12); color: #0d6efd; }
.dash-stat--pending .dash-stat-icon { background: rgba(111, 66, 193, .12); color: #6f42c1; }
.dash-stat--avg .dash-stat-icon { background: rgba(25, 135, 84, .12); color: #198754; }
.dash-stat--products .dash-stat-icon { background: rgba(32, 201, 151, .12); color: #20c997; }
.dash-stat--low .dash-stat-icon { background: rgba(220, 53, 69, .12); color: #dc3545; }
.dash-stat--users .dash-stat-icon { background: rgba(13, 202, 240, .12); color: #0dcaf0; }
.dash-stat--sellers .dash-stat-icon { background: rgba(102, 16, 242, .12); color: #6610f2; }
.dash-panel h3 { letter-spacing: -.01em; }
.dash-chart-wrap {
  position: relative;
  height: 260px;
}
.dash-chart-wrap--sm {
  height: 220px;
}
.dash-list li:last-child {
  border-bottom: 0 !important;
}
[data-theme="dark"] .dash-stat:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}

.cart-tax-toggle {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 0.75rem;
  background: var(--bg-muted, #f8fafc);
}
.cart-tax-toggle .form-check-input {
  width: 2.5rem;
  height: 1.25rem;
  cursor: pointer;
  flex-shrink: 0;
}
