/* ==========================================================================
   Superium — core stylesheet
   --------------------------------------------------------------------------
   Component structure follows the Novira package; every value is a token
   assigned in superium-palettes.css. Nothing here hard-codes a brand colour.

   RTL rule: logical properties only (margin-inline, inset-inline, padding-
   block ...). There are no physical left/right declarations in this file.

   Contents
     01 Font face + base
     02 Layout: container, section, grid helpers
     03 Buttons
     04 Forms
     05 Badges, chips, pills
     06 Header  (mobile bar, desktop rows, search, location, actions)
     07 Cart dropdown + user dropdown
     08 Nav row + mega menu
     09 Mobile drawer
     10 Category displays
     11 Product card + quantity stepper
     12 Section rails / swiper
     13 Banners
     14 Breadcrumb
     15 Footer
     16 FAB + support widget
     17 Toast, modal, bottom sheet
     18 Empty state, skeleton
     19 Utilities
   ========================================================================== */

/* 01 — Font face + base ==================================================== */

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn/Vazirmatn[wght].woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Dana';
  src: url('../fonts/Dana/Dana-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Dana';
  src: url('../fonts/Dana/Dana-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Dana';
  src: url('../fonts/Dana/Dana-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Dana';
  src: url('../fonts/Dana/Dana-ExtraLight.ttf') format('truetype');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

/* Rokh — display face for headings. Variable, wght 50–900. */
@font-face {
  font-family: 'Rokh';
  src: url('../fonts/Rokh/Rokh[wght].woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body.sp-page {
  margin: 0;
  font-family: var(--sp-font);
  font-size: 14px;
  line-height: 1.75;
  color: var(--sp-text);
  background: var(--sp-bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

*::selection {
  background-color: var(--sp-primary);
  color: var(--sp-on-primary);
}

img,
svg,
video {
  max-inline-size: 100%;
  block-size: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

:where(h1, h2, h3, h4, h5, h6) {
  margin: 0;
  font-family: var(--sp-font-display);
  font-weight: 700;
  line-height: 1.45;
}

/* Named heading-like elements that are not <h*> tags. */
.sp-section-title,
.sp-hero-title,
.sp-product-heading,
.sp-auth-title,
.sp-deal-title,
.sp-store-name,
.sp-logo-text b,
.sp-filter-title,
.sp-empty-title,
.sp-modal-title,
.sp-footer-col-title {
  font-family: var(--sp-font-display);
}

:where(p) {
  margin: 0;
}

[x-cloak] {
  display: none !important;
}

/* Visible focus for keyboard users only. */
:focus-visible {
  outline: 2px solid var(--sp-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.sp-skip-link {
  position: absolute;
  inset-block-start: -100px;
  inset-inline-start: 16px;
  z-index: 2000;
  padding: 10px 18px;
  background: var(--sp-primary);
  color: var(--sp-on-primary);
  border-radius: 0 0 var(--sp-radius) var(--sp-radius);
  transition: inset-block-start var(--sp-dur) var(--sp-ease);
}

.sp-skip-link:focus {
  inset-block-start: 0;
}

.sp-sr-only {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 02 — Layout ============================================================== */

.sp-container {
  inline-size: 100%;
  max-inline-size: var(--sp-container);
  margin-inline: auto;
  padding-inline: var(--sp-gutter);
}

@media (min-width: 1280px) {
  .sp-container {
    padding-inline: 20px;
  }
}

.sp-main {
  display: block;
  min-block-size: 40vh;
}

.sp-section {
  margin-block: var(--sp-section-y);
}

.sp-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-block-end: 16px;
}

.sp-section-title {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--sp-text);
  margin: 0;
}

.sp-section-sub {
  font-size: 0.8125rem;
  color: var(--sp-muted);
  margin-block-start: 2px;
}

.sp-section-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--sp-primary);
  transition: gap var(--sp-dur) var(--sp-ease);
}

.sp-section-more:hover {
  gap: 8px;
}

/* The chevron points toward the start edge in RTL. */
.sp-section-more svg {
  inline-size: 16px;
  block-size: 16px;
}

.sp-card {
  background: var(--sp-surface);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-lg);
  box-shadow: var(--sp-shadow);
}

.sp-card-pad {
  padding: 16px;
}

@media (min-width: 768px) {
  .sp-card-pad {
    padding: 20px;
  }
}

/* 03 — Buttons ============================================================= */

.sp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.4;
  border: 1px solid transparent;
  border-radius: var(--sp-radius);
  cursor: pointer;
  background: none;
  transition: background-color var(--sp-dur) var(--sp-ease),
    border-color var(--sp-dur) var(--sp-ease),
    color var(--sp-dur) var(--sp-ease), transform var(--sp-dur) var(--sp-ease);
}

.sp-btn:active {
  transform: translateY(1px);
}

.sp-btn:disabled,
.sp-btn[aria-disabled='true'] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.sp-btn svg {
  inline-size: 18px;
  block-size: 18px;
  flex-shrink: 0;
}

.sp-btn--primary {
  background: var(--sp-primary);
  color: var(--sp-on-primary);
}

.sp-btn--primary:hover {
  background: var(--sp-primary-strong);
}

.sp-btn--outline {
  border-color: var(--sp-primary);
  color: var(--sp-primary);
}

.sp-btn--outline:hover {
  background: var(--sp-primary-soft);
}

.sp-btn--soft {
  background: var(--sp-primary-soft);
  color: var(--sp-primary);
}

.sp-btn--soft:hover {
  background: var(--sp-primary);
  color: var(--sp-on-primary);
}

.sp-btn--ghost {
  border-color: var(--sp-border);
  color: var(--sp-text-soft);
  background: var(--sp-surface);
}

.sp-btn--ghost:hover {
  border-color: var(--sp-border-strong);
  color: var(--sp-text);
}

.sp-btn--accent {
  background: var(--sp-accent);
  color: #fff;
}

.sp-btn--danger {
  background: transparent;
  border-color: var(--sp-border);
  color: var(--sp-danger);
}

.sp-btn--danger:hover {
  border-color: var(--sp-danger);
  background: color-mix(in srgb, var(--sp-danger) 8%, transparent);
}

.sp-btn--sm {
  padding: 7px 14px;
  font-size: 0.8125rem;
}

.sp-btn--lg {
  padding: 14px 28px;
  font-size: 0.9375rem;
}

.sp-btn--block {
  inline-size: 100%;
}

.sp-btn--icon {
  padding: 9px;
  inline-size: 40px;
  block-size: 40px;
}

/* 04 — Forms =============================================================== */

.sp-field {
  display: block;
  margin-block-end: 16px;
}

.sp-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--sp-text-soft);
  margin-block-end: 6px;
}

.sp-label .sp-req {
  color: var(--sp-danger);
  margin-inline-start: 2px;
}

.sp-input,
.sp-select,
.sp-textarea {
  inline-size: 100%;
  padding: 11px 14px;
  font: inherit;
  font-size: 0.875rem;
  color: var(--sp-text);
  background: var(--sp-surface);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
  transition: border-color var(--sp-dur) var(--sp-ease),
    box-shadow var(--sp-dur) var(--sp-ease);
}

.sp-input::placeholder,
.sp-textarea::placeholder {
  color: var(--sp-muted);
}

.sp-input:focus,
.sp-select:focus,
.sp-textarea:focus {
  outline: none;
  border-color: var(--sp-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sp-primary) 18%, transparent);
}

.sp-textarea {
  min-block-size: 110px;
  resize: vertical;
  line-height: 1.9;
}

.sp-select {
  appearance: none;
  padding-inline-end: 38px;
  /* Caret drawn with a gradient so no physical positioning is needed. */
  background-image: linear-gradient(45deg, transparent 50%, var(--sp-muted) 50%),
    linear-gradient(135deg, var(--sp-muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% + 2px),
    calc(100% - 15px) calc(50% + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

html[dir='rtl'] .sp-select {
  background-position: 15px calc(50% + 2px), 20px calc(50% + 2px);
}

.sp-input--invalid,
.sp-textarea--invalid {
  border-color: var(--sp-danger);
}

.sp-error {
  display: block;
  font-size: 0.75rem;
  color: var(--sp-danger);
  margin-block-start: 5px;
}

.sp-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--sp-muted);
  margin-block-start: 5px;
}

/* Check / radio ----------------------------------------------------------- */

.sp-check {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font-size: 0.8125rem;
  color: var(--sp-text-soft);
  padding-block: 5px;
}

.sp-check input {
  inline-size: 17px;
  block-size: 17px;
  accent-color: var(--sp-primary);
  flex-shrink: 0;
  cursor: pointer;
  margin: 0;
}

/* Selectable option row — used for payment banks, delivery slots, addresses. */
.sp-option {
  display: flex;
  align-items: center;
  gap: 12px;
  inline-size: 100%;
  padding: 14px 16px;
  text-align: start;
  background: var(--sp-surface);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
  cursor: pointer;
  transition: border-color var(--sp-dur) var(--sp-ease),
    background-color var(--sp-dur) var(--sp-ease);
}

.sp-option:hover {
  border-color: var(--sp-border-strong);
}

.sp-option.is-active {
  border-color: var(--sp-text);
  box-shadow: inset 0 0 0 1px var(--sp-text);
}

.sp-option-dot {
  inline-size: 18px;
  block-size: 18px;
  border: 2px solid var(--sp-border-strong);
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  transition: border-color var(--sp-dur) var(--sp-ease);
}

.sp-option.is-active .sp-option-dot {
  border-color: var(--sp-text);
}

.sp-option.is-active .sp-option-dot::after {
  content: '';
  inline-size: 9px;
  block-size: 9px;
  border-radius: 50%;
  background: var(--sp-text);
}

.sp-option-body {
  flex: 1;
  min-inline-size: 0;
}

.sp-option-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--sp-text);
}

.sp-option-meta {
  font-size: 0.75rem;
  color: var(--sp-muted);
  margin-block-start: 2px;
}

.sp-option-icon {
  inline-size: 26px;
  block-size: 26px;
  color: var(--sp-text-soft);
  flex-shrink: 0;
}

/* 05 — Badges, chips, pills =============================================== */

.sp-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.6;
  border-radius: var(--sp-radius-sm);
  background: var(--sp-surface-2);
  color: var(--sp-text-soft);
}

.sp-badge--discount {
  background: var(--sp-danger);
  color: #fff;
  border-radius: var(--sp-radius-pill);
  padding-inline: 7px;
}

.sp-badge--success {
  background: var(--sp-accent-soft);
  color: var(--sp-accent);
}

.sp-badge--warning {
  background: color-mix(in srgb, var(--sp-warning) 16%, transparent);
  color: var(--sp-warning);
}

.sp-badge--info {
  background: color-mix(in srgb, var(--sp-info) 12%, transparent);
  color: var(--sp-info);
}

.sp-badge--brand {
  background: var(--sp-primary-soft);
  color: var(--sp-primary);
}

/* "کالابرگ" style stamp used on subsidised goods in the reference UX. */
.sp-badge--stamp {
  flex-direction: column;
  gap: 0;
  padding: 3px 5px;
  font-size: 0.5625rem;
  line-height: 1.25;
  background: var(--sp-text-soft);
  color: var(--sp-surface);
  border-radius: 5px;
}

.sp-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--sp-text-soft);
  background: var(--sp-surface);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--sp-dur) var(--sp-ease);
}

.sp-chip:hover {
  border-color: var(--sp-primary);
  color: var(--sp-primary);
}

.sp-chip.is-active {
  background: var(--sp-primary);
  border-color: var(--sp-primary);
  color: var(--sp-on-primary);
}

.sp-chip-row {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-block: 4px;
  scrollbar-width: none;
}

.sp-chip-row::-webkit-scrollbar {
  display: none;
}

/* 06 — Header ============================================================== */

.sp-header {
  background: var(--sp-surface);
  position: sticky;
  inset-block-start: 0;
  z-index: 500;
  isolation: isolate;
  box-shadow: var(--sp-shadow);
}

.sp-header .sp-container {
  position: relative;
}

.sp-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-block: 12px;
  inline-size: 100%;
}

.sp-header-row--top {
  gap: 16px;
}

/* Logo -------------------------------------------------------------------- */

.sp-logo {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.sp-logo-mark {
  inline-size: 34px;
  block-size: 34px;
  flex-shrink: 0;
  color: var(--sp-primary);
}

.sp-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.sp-logo-text b {
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--sp-primary);
  letter-spacing: -0.01em;
}

.sp-logo-text span {
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--sp-muted);
}

/* Search ------------------------------------------------------------------ */

.sp-search {
  flex: 1;
  min-inline-size: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  background: var(--sp-bg);
  border: 1px solid transparent;
  border-radius: var(--sp-radius);
  transition: border-color var(--sp-dur) var(--sp-ease),
    background-color var(--sp-dur) var(--sp-ease);
}

.sp-search:focus-within {
  background: var(--sp-surface);
  border-color: var(--sp-primary);
}

.sp-search svg {
  inline-size: 19px;
  block-size: 19px;
  color: var(--sp-muted);
  flex-shrink: 0;
}

.sp-search input {
  flex: 1;
  min-inline-size: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.875rem;
  color: var(--sp-text);
}

.sp-search input:focus {
  outline: none;
}

/* Location picker --------------------------------------------------------- */

.sp-location {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  max-inline-size: 260px;
  font-size: 0.8125rem;
  color: var(--sp-text-soft);
  background: var(--sp-bg);
  border-radius: var(--sp-radius);
  cursor: pointer;
  flex-shrink: 0;
}

.sp-location svg {
  inline-size: 17px;
  block-size: 17px;
  color: var(--sp-primary);
  flex-shrink: 0;
}

.sp-location-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Header actions ---------------------------------------------------------- */

.sp-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-inline-start: auto;
}

.sp-header-divider {
  inline-size: 1px;
  block-size: 24px;
  background: var(--sp-border);
  flex-shrink: 0;
}

.sp-icon-btn {
  display: grid;
  place-items: center;
  inline-size: 40px;
  block-size: 40px;
  border: none;
  background: none;
  border-radius: var(--sp-radius);
  color: var(--sp-text-soft);
  cursor: pointer;
  position: relative;
  transition: background-color var(--sp-dur) var(--sp-ease);
}

.sp-icon-btn:hover {
  background: var(--sp-bg);
}

.sp-icon-btn svg {
  inline-size: 22px;
  block-size: 22px;
}

.sp-cart-badge {
  position: absolute;
  inset-block-start: 3px;
  inset-inline-end: 3px;
  min-inline-size: 17px;
  block-size: 17px;
  padding-inline: 4px;
  display: grid;
  place-items: center;
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--sp-on-primary);
  background: var(--sp-primary);
  border-radius: var(--sp-radius-pill);
}

.sp-hamburger {
  display: grid;
  place-items: center;
  inline-size: 40px;
  block-size: 40px;
  border: none;
  background: none;
  color: var(--sp-text-soft);
  cursor: pointer;
  flex-shrink: 0;
}

.sp-hamburger svg {
  inline-size: 24px;
  block-size: 24px;
}

/* Mobile bar -------------------------------------------------------------- */

.sp-mobile-bar {
  display: none;
}

/* Search band ------------------------------------------------------------
   On small screens the search field is lifted out of the sticky header and
   placed in its own full-width row directly beneath it. That keeps the
   sticky bar to one compact line (menu · logo · cart) and gives the field
   the full width it needs to be usable on a phone. */

.sp-search-band {
  display: none;
  padding-block: 10px;
  background: var(--sp-surface);
  border-block-end: 1px solid var(--sp-border);
}

@media (max-width: 767px) {
  .sp-header .sp-mobile-bar {
    display: flex;
  }

  /* Push the cart to the end edge now that the search no longer fills the row. */
  .sp-mobile-bar .sp-logo {
    flex: 1;
    min-inline-size: 0;
  }

  .sp-header .sp-header-row--top,
  .sp-header .sp-location,
  .sp-header .sp-nav-row {
    display: none !important;
  }

  .sp-search-band {
    display: block;
  }
}

/* 07 — Cart + user dropdowns ============================================== */

.sp-dropdown-wrap {
  position: relative;
}

.sp-dropdown-panel {
  position: absolute;
  inset-block-start: calc(100% + 10px);
  inset-inline-end: 0;
  inline-size: 320px;
  max-inline-size: calc(100vw - 32px);
  background: var(--sp-surface);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-lg);
  box-shadow: var(--sp-shadow-lg);
  z-index: 600;
  overflow: hidden;
}

.sp-dropdown-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  border-block-end: 1px solid var(--sp-border);
}

.sp-dropdown-head-title {
  font-size: 0.875rem;
  font-weight: 700;
}

.sp-dropdown-head-count {
  font-size: 0.75rem;
  color: var(--sp-muted);
}

.sp-dropdown-body {
  max-block-size: 320px;
  overflow-y: auto;
  padding: 8px;
}

.sp-dropdown-foot {
  padding: 14px 16px;
  border-block-start: 1px solid var(--sp-border);
  background: var(--sp-surface-2);
}

.sp-dropdown-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  margin-block-end: 12px;
}

.sp-dropdown-total b {
  font-size: 0.9375rem;
}

/* Mini cart line ---------------------------------------------------------- */

.sp-mini-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border-radius: var(--sp-radius);
  transition: background-color var(--sp-dur) var(--sp-ease);
}

.sp-mini-item:hover {
  background: var(--sp-surface-2);
}

.sp-mini-item-thumb {
  inline-size: 50px;
  block-size: 50px;
  object-fit: contain;
  border-radius: var(--sp-radius-sm);
  background: var(--sp-surface-2);
  flex-shrink: 0;
}

.sp-mini-item-info {
  flex: 1;
  min-inline-size: 0;
}

.sp-mini-item-title {
  font-size: 0.75rem;
  color: var(--sp-text-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sp-mini-item-price {
  font-size: 0.8125rem;
  font-weight: 700;
  margin-block-start: 3px;
}

/* User dropdown ----------------------------------------------------------- */

.sp-user-trigger {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--sp-text-soft);
  background: none;
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
  cursor: pointer;
  transition: border-color var(--sp-dur) var(--sp-ease);
}

.sp-user-trigger:hover {
  border-color: var(--sp-border-strong);
}

.sp-user-trigger svg {
  inline-size: 19px;
  block-size: 19px;
}

.sp-user-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 16px;
  border-block-end: 1px solid var(--sp-border);
}

.sp-user-avatar {
  inline-size: 42px;
  block-size: 42px;
  border-radius: 50%;
  background: var(--sp-primary-soft);
  color: var(--sp-primary);
  display: grid;
  place-items: center;
  font-weight: 800;
  flex-shrink: 0;
}

.sp-user-name {
  font-size: 0.875rem;
  font-weight: 700;
}

.sp-user-phone {
  font-size: 0.75rem;
  color: var(--sp-muted);
}

.sp-menu {
  padding: 8px;
}

.sp-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  font-size: 0.8125rem;
  color: var(--sp-text-soft);
  border-radius: var(--sp-radius);
  transition: background-color var(--sp-dur) var(--sp-ease),
    color var(--sp-dur) var(--sp-ease);
}

.sp-menu-item:hover {
  background: var(--sp-surface-2);
  color: var(--sp-text);
}

.sp-menu-item.is-active {
  background: var(--sp-primary-soft);
  color: var(--sp-primary);
  font-weight: 700;
}

.sp-menu-item svg {
  inline-size: 19px;
  block-size: 19px;
  flex-shrink: 0;
}

.sp-menu-item--logout {
  color: var(--sp-danger);
}

.sp-menu-heading {
  padding: 8px 12px 4px;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--sp-muted);
}

/* Demo switcher — hop between the three homepages from any page. */
.sp-dropdown-panel--sm {
  inline-size: 230px;
}

.sp-home-dot {
  inline-size: 16px;
  block-size: 16px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--sp-border-strong);
}

/* Each swatch shows that demo's own primary, not the current palette. */
.sp-home-dot--fresh {
  background: #f2600c;
}

.sp-home-dot--aqua {
  background: #0e7490;
}

.sp-home-dot--graphite {
  background: linear-gradient(135deg, #0f1115 50%, #a3e635 50%);
}

/* The switcher is desktop-only; the drawer carries the same list on mobile. */
@media (max-width: 900px) {
  .sp-homes {
    display: none;
  }
}

.sp-menu-item-extra {
  margin-inline-start: auto;
  font-size: 0.6875rem;
  color: var(--sp-muted);
}

/* 08 — Nav row + mega menu ================================================ */

.sp-nav-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-block: 10px;
  border-block-start: 1px solid var(--sp-border);
}

.sp-nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}

.sp-nav-links::-webkit-scrollbar {
  display: none;
}

.sp-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--sp-text-soft);
  white-space: nowrap;
  padding-block: 4px;
  transition: color var(--sp-dur) var(--sp-ease);
}

.sp-nav-link:hover {
  color: var(--sp-primary);
}

.sp-nav-link--hot {
  color: var(--sp-danger);
}

.sp-nav-mega-anchor {
  position: static;
}

.sp-mega-wrap {
  position: absolute;
  inset-inline: 0;
  inset-block-start: 100%;
  z-index: 550;
  padding-block-start: 4px;
}

.sp-mega {
  display: grid;
  grid-template-columns: 220px 1fr;
  background: var(--sp-surface);
  border: 1px solid var(--sp-border);
  border-radius: 0 0 var(--sp-radius-lg) var(--sp-radius-lg);
  box-shadow: var(--sp-shadow-lg);
  overflow: hidden;
  min-block-size: 300px;
}

.sp-mega-sidebar {
  background: var(--sp-surface-2);
  border-inline-end: 1px solid var(--sp-border);
  padding: 10px;
}

.sp-mega-cat {
  display: flex;
  align-items: center;
  gap: 9px;
  inline-size: 100%;
  padding: 9px 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--sp-text-soft);
  background: none;
  border: none;
  border-radius: var(--sp-radius);
  cursor: pointer;
  text-align: start;
  transition: all var(--sp-dur) var(--sp-ease);
}

.sp-mega-cat img {
  inline-size: 26px;
  block-size: 26px;
  object-fit: contain;
  flex-shrink: 0;
}

.sp-mega-cat:hover,
.sp-mega-cat.is-active {
  background: var(--sp-surface);
  color: var(--sp-primary);
  box-shadow: var(--sp-shadow);
}

.sp-mega-content {
  padding: 20px 24px;
}

.sp-mega-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px 24px;
}

.sp-mega-col-title {
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--sp-text);
  margin-block-end: 9px;
}

.sp-mega-col-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sp-mega-col-links a {
  font-size: 0.75rem;
  color: var(--sp-muted);
  transition: color var(--sp-dur) var(--sp-ease);
}

.sp-mega-col-links a:hover {
  color: var(--sp-primary);
}

/* 09 — Mobile drawer ====================================================== */

.sp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 900;
}

.sp-drawer {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  inline-size: 300px;
  max-inline-size: 85vw;
  background: var(--sp-surface);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sp-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px;
  border-block-end: 1px solid var(--sp-border);
}

.sp-drawer-body {
  padding: 12px;
  flex: 1;
}

.sp-drawer-foot {
  padding: 16px;
  border-block-start: 1px solid var(--sp-border);
}

/* 10 — Category displays ================================================== */

/* a. Round photo pills — used in the FRESH homepage rail. */
.sp-cat-rail {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-block: 4px 10px;
  scrollbar-width: none;
}

.sp-cat-rail::-webkit-scrollbar {
  display: none;
}

.sp-cat-pill {
  flex-shrink: 0;
  inline-size: 92px;
  text-align: center;
}

.sp-cat-pill-img {
  inline-size: 84px;
  block-size: 84px;
  margin-inline: auto;
  border-radius: 50%;
  object-fit: cover;
  background: var(--sp-surface);
  border: 2px solid var(--sp-border);
  transition: border-color var(--sp-dur) var(--sp-ease),
    transform var(--sp-dur) var(--sp-ease);
}

.sp-cat-pill:hover .sp-cat-pill-img {
  border-color: var(--sp-primary);
  transform: translateY(-3px);
}

.sp-cat-pill-label {
  display: block;
  margin-block-start: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--sp-text-soft);
}

/* a2. Category board — FRESH homepage. A photo well, the category's item
   count and its top sub-categories as chips. Every card carries its own
   accent on --sp-cat-tint (set inline by tools/components.py); the fallback
   below keeps the card correct if that variable is ever missing. */
.sp-cat-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

@media (min-width: 560px) {
  .sp-cat-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 820px) {
  .sp-cat-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .sp-cat-board {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Ten categories land as two clean rows of five. */
@media (min-width: 1280px) {
  .sp-cat-board {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.sp-cat-brick {
  --sp-cat-tint: var(--sp-primary);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  background: var(--sp-surface);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-lg);
  transition: border-color var(--sp-dur) var(--sp-ease),
    box-shadow var(--sp-dur) var(--sp-ease),
    transform var(--sp-dur) var(--sp-ease);
}

/* Tint halo behind the photo well. A radial gradient that fades out before
   the circle's edge, so the tint reads as a glow with no hard rim — and no
   colour function is needed to fade it. */
.sp-cat-brick::before {
  content: '';
  position: absolute;
  inset-block-start: -66px;
  inset-inline-start: -56px;
  inline-size: 180px;
  block-size: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--sp-cat-tint) 0%, transparent 72%);
  opacity: 0.2;
  pointer-events: none;
  transition: transform var(--sp-dur) var(--sp-ease),
    opacity var(--sp-dur) var(--sp-ease);
}

.sp-cat-brick:hover {
  border-color: var(--sp-border-strong);
  border-color: color-mix(in srgb, var(--sp-cat-tint) 40%, var(--sp-border));
  box-shadow: var(--sp-shadow-md);
  transform: translateY(-3px);
}

.sp-cat-brick:hover::before {
  transform: scale(1.18);
  opacity: 0.32;
}

.sp-cat-brick-main {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sp-cat-brick-art {
  flex: none;
  inline-size: 62px;
  block-size: 62px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--sp-surface);
  border: 1px solid var(--sp-border);
  box-shadow: 0 0 0 4px var(--sp-surface-2);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--sp-cat-tint) 12%, transparent);
  transition: transform var(--sp-dur) var(--sp-ease);
}

.sp-cat-brick-art img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

.sp-cat-brick:hover .sp-cat-brick-art {
  transform: scale(1.06);
}

.sp-cat-brick-text {
  min-inline-size: 0;
}

.sp-cat-brick-title {
  display: block;
  font-family: var(--sp-font-display);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--sp-text);
}

.sp-cat-brick-count {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--sp-muted);
}

.sp-cat-brick-go {
  margin-inline-start: auto;
  flex: none;
  display: flex;
  color: var(--sp-muted);
  transition: color var(--sp-dur) var(--sp-ease),
    transform var(--sp-dur) var(--sp-ease);
}

.sp-cat-brick:hover .sp-cat-brick-go {
  color: var(--sp-cat-tint);
  /* Toward the reading edge: RTL start is the left, so a negative X. */
  transform: translateX(-3px);
}

.sp-cat-brick-tags {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-block-start: auto;
}

.sp-cat-tag {
  padding: 3px 10px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--sp-text-soft);
  background: var(--sp-surface-2);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-pill);
  transition: color var(--sp-dur) var(--sp-ease),
    background-color var(--sp-dur) var(--sp-ease),
    border-color var(--sp-dur) var(--sp-ease);
}

.sp-cat-tag:hover {
  color: var(--sp-cat-tint);
  background: var(--sp-primary-soft);
  background: color-mix(in srgb, var(--sp-cat-tint) 10%, transparent);
  border-color: var(--sp-border-strong);
  border-color: color-mix(in srgb, var(--sp-cat-tint) 35%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  .sp-cat-brick,
  .sp-cat-brick::before,
  .sp-cat-brick-art,
  .sp-cat-brick-go {
    transition: none;
  }

  .sp-cat-brick:hover,
  .sp-cat-brick:hover::before,
  .sp-cat-brick:hover .sp-cat-brick-art,
  .sp-cat-brick:hover .sp-cat-brick-go {
    transform: none;
  }
}

/* b. Square cards — AQUA homepage grid. */
.sp-cat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 640px) {
  .sp-cat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .sp-cat-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.sp-cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 12px;
  background: var(--sp-surface);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-lg);
  transition: border-color var(--sp-dur) var(--sp-ease),
    box-shadow var(--sp-dur) var(--sp-ease),
    transform var(--sp-dur) var(--sp-ease);
}

.sp-cat-card:hover {
  border-color: var(--sp-primary);
  box-shadow: var(--sp-shadow-md);
  transform: translateY(-3px);
}

.sp-cat-card img {
  inline-size: 100%;
  max-inline-size: 96px;
  aspect-ratio: 1;
  object-fit: contain;
}

.sp-cat-card span {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--sp-text);
  text-align: center;
}

/* c. Monochrome tiles — GRAPHITE homepage, colourise on hover. */
.sp-cat-tile {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--sp-radius-lg);
  background: var(--sp-surface-2);
  border: 1px solid var(--sp-border);
  aspect-ratio: 4 / 3;
}

.sp-cat-tile img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  transition: filter 0.4s var(--sp-ease), transform 0.4s var(--sp-ease);
}

.sp-cat-tile:hover img {
  filter: grayscale(0);
  transform: scale(1.05);
}

.sp-cat-tile-label {
  position: absolute;
  inset-block-end: 0;
  inset-inline: 0;
  padding: 22px 14px 12px;
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}

/* d. Numbered index — GRAPHITE homepage. A directory of shelves: two columns
   of hairline-separated rows, so the section never reads as another grid of
   photo cards. The thumbs keep the monochrome-until-hover treatment. */
.sp-cat-index {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: var(--sp-surface);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-lg);
  overflow: hidden;
}

.sp-cat-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  border-block-start: 1px solid var(--sp-border);
  transition: background-color var(--sp-dur) var(--sp-ease);
}

.sp-cat-row:first-child {
  border-block-start: 0;
}

.sp-cat-row:hover {
  background: var(--sp-surface-2);
}

@media (min-width: 760px) {
  .sp-cat-index {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Row-wise flow: odd children fill the start column, even ones the end
     column, so the first two rows sit on the top edge and every even row
     carries the vertical divider. */
  .sp-cat-row:nth-child(2) {
    border-block-start: 0;
  }

  .sp-cat-row:nth-child(even) {
    border-inline-start: 1px solid var(--sp-border);
  }
}

.sp-cat-row-num {
  flex: none;
  font-family: var(--sp-font-display);
  font-size: 0.8125rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--sp-muted);
  transition: color var(--sp-dur) var(--sp-ease);
}

.sp-cat-row:hover .sp-cat-row-num {
  color: var(--sp-primary);
}

.sp-cat-row-thumb {
  flex: none;
  inline-size: 54px;
  block-size: 54px;
  overflow: hidden;
  border-radius: var(--sp-radius);
  background: var(--sp-surface-2);
  border: 1px solid var(--sp-border);
}

.sp-cat-row-thumb img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  transition: filter 0.4s var(--sp-ease), transform 0.4s var(--sp-ease);
}

.sp-cat-row:hover .sp-cat-row-thumb img {
  transform: scale(1.06);
}

.sp-cat-row-text {
  flex: 0 1 auto;
  min-inline-size: 0;
}

/* Dotted leader between the shelf name and its count, the way a printed
   index runs a line out to the page number. */
.sp-cat-row-lead {
  flex: 1 1 auto;
  min-inline-size: 16px;
  align-self: center;
  margin-block-start: 6px;
  border-block-end: 1px dotted var(--sp-border-strong);
}

.sp-cat-row-text b {
  display: block;
  font-family: var(--sp-font-display);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--sp-text);
}

.sp-cat-row-subs {
  display: block;
  font-size: 0.6875rem;
  color: var(--sp-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-cat-row-count {
  flex: none;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--sp-text-soft);
}

.sp-cat-row-go {
  flex: none;
  display: flex;
  color: var(--sp-muted);
  transition: color var(--sp-dur) var(--sp-ease),
    transform var(--sp-dur) var(--sp-ease);
}

.sp-cat-row:hover .sp-cat-row-go {
  color: var(--sp-primary);
  transform: translateX(-3px);
}

@media (prefers-reduced-motion: reduce) {
  .sp-cat-row-thumb img,
  .sp-cat-row-go {
    transition: none;
  }

  .sp-cat-row:hover .sp-cat-row-thumb img,
  .sp-cat-row:hover .sp-cat-row-go {
    transform: none;
  }
}

/* 11 — Product card ======================================================= */

.sp-product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 640px) {
  .sp-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .sp-product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .sp-product-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.sp-product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 12px;
  background: var(--sp-surface);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-lg);
  transition: border-color var(--sp-dur) var(--sp-ease),
    box-shadow var(--sp-dur) var(--sp-ease);
}

.sp-product-card:hover {
  border-color: var(--sp-border-strong);
  box-shadow: var(--sp-shadow-md);
}

.sp-product-img-wrap {
  position: relative;
  aspect-ratio: 1;
  margin-block-end: 10px;
  border-radius: var(--sp-radius);
  overflow: hidden;
  background: #fff;
}

.sp-product-photo {
  inline-size: 100%;
  block-size: 100%;
  object-fit: contain;
  transition: transform 0.35s var(--sp-ease);
}

.sp-product-card:hover .sp-product-photo {
  transform: scale(1.05);
}

/* Corner slots: discount at start, wishlist at end. */
.sp-product-flags {
  position: absolute;
  inset-block-start: 6px;
  inset-inline-start: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}

.sp-product-wish {
  position: absolute;
  inset-block-start: 6px;
  inset-inline-end: 6px;
  z-index: 2;
  display: grid;
  place-items: center;
  inline-size: 30px;
  block-size: 30px;
  border: none;
  border-radius: 50%;
  background: var(--sp-surface);
  color: var(--sp-muted);
  cursor: pointer;
  box-shadow: var(--sp-shadow);
  transition: color var(--sp-dur) var(--sp-ease);
}

.sp-product-wish:hover,
.sp-product-wish.is-active {
  color: var(--sp-danger);
}

.sp-product-wish svg {
  inline-size: 17px;
  block-size: 17px;
}

.sp-product-title {
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.8;
  color: var(--sp-text-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-block-size: 2.9em;
  margin-block-end: 8px;
}

.sp-product-foot {
  margin-block-start: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}

.sp-product-prices {
  min-inline-size: 0;
}

.sp-product-price-old {
  font-size: 0.75rem;
  color: var(--sp-muted);
  text-decoration: line-through;
}

.sp-product-price {
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--sp-text);
  white-space: nowrap;
}

.sp-product-price small {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--sp-muted);
}

.sp-product-price-from {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--sp-muted);
}

.sp-product-rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.75rem;
  color: var(--sp-muted);
}

.sp-product-rating svg {
  inline-size: 14px;
  block-size: 14px;
  color: var(--sp-warning);
}

/* Quantity stepper -------------------------------------------------------- */

.sp-qty {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: var(--sp-surface);
  border: 1px solid var(--sp-primary);
  border-radius: var(--sp-radius);
  flex-shrink: 0;
}

.sp-qty button {
  display: grid;
  place-items: center;
  inline-size: 28px;
  block-size: 28px;
  border: none;
  background: none;
  color: var(--sp-primary);
  border-radius: var(--sp-radius-sm);
  cursor: pointer;
  transition: background-color var(--sp-dur) var(--sp-ease);
}

.sp-qty button:hover {
  background: var(--sp-primary-soft);
}

.sp-qty button svg {
  inline-size: 16px;
  block-size: 16px;
}

.sp-qty-val {
  min-inline-size: 26px;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--sp-text);
}

/* Collapsed state: a single round + button. */
.sp-qty-add {
  display: grid;
  place-items: center;
  inline-size: 34px;
  block-size: 34px;
  border: 1px solid var(--sp-primary);
  border-radius: var(--sp-radius);
  background: var(--sp-surface);
  color: var(--sp-primary);
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color var(--sp-dur) var(--sp-ease),
    color var(--sp-dur) var(--sp-ease);
}

.sp-qty-add:hover {
  background: var(--sp-primary);
  color: var(--sp-on-primary);
}

.sp-qty-add svg {
  inline-size: 18px;
  block-size: 18px;
}

/* Out of stock ------------------------------------------------------------ */

.sp-product-card.is-out .sp-product-photo {
  filter: grayscale(1);
  opacity: 0.55;
}

.sp-out-label {
  position: absolute;
  inset-block-end: 8px;
  inset-inline: 8px;
  padding: 4px;
  text-align: center;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--sp-surface);
  background: rgba(0, 0, 0, 0.62);
  border-radius: var(--sp-radius-sm);
}

/* 12 — Section rails ====================================================== */
/*
   Patterns are drawn with gradients rather than image files: they cost
   nothing to ship, scale to any size, and read from --sp-* so each palette
   tints its own. Kept at 5–8% contrast — texture, not decoration.
*/

.sp-rail {
  position: relative;
  padding: 18px 16px 16px;
  border-radius: var(--sp-radius-lg);
  border: 1px solid var(--sp-border);
  background-color: var(--sp-surface);
  /* Fine dot grid. */
  background-image: radial-gradient(
    circle at 1px 1px,
    color-mix(in srgb, var(--sp-text) 8%, transparent) 1px,
    transparent 0
  );
  background-size: 18px 18px;
}

.sp-rail .swiper {
  overflow: visible;
  clip-path: inset(-40px 0 -40px 0);
}

.sp-rail-nav {
  display: grid;
  place-items: center;
  inline-size: 34px;
  block-size: 34px;
  border: 1px solid var(--sp-border);
  border-radius: 50%;
  background: var(--sp-surface);
  color: var(--sp-text-soft);
  cursor: pointer;
  transition: all var(--sp-dur) var(--sp-ease);
}

.sp-rail-nav:hover {
  border-color: var(--sp-primary);
  color: var(--sp-primary);
}

.sp-rail-nav svg {
  inline-size: 18px;
  block-size: 18px;
}

.sp-rail-nav.swiper-button-disabled {
  opacity: 0.4;
  cursor: default;
}

/* Coloured promo rail (the "amazing offers" strip). */
.sp-rail--promo {
  border-color: transparent;
  background-color: var(--sp-primary);
  /* Diagonal hatch + a corner glow, both in the on-primary colour so the
     pattern follows whatever the palette makes "primary". */
  background-image: repeating-linear-gradient(
      -45deg,
      color-mix(in srgb, var(--sp-on-primary) 9%, transparent) 0 2px,
      transparent 2px 12px
    ),
    radial-gradient(
      110% 130% at 100% 0%,
      color-mix(in srgb, var(--sp-on-primary) 16%, transparent),
      transparent 60%
    );
  background-size: auto, 100% 100%;
}

.sp-rail--promo .sp-section-title,
.sp-rail--promo .sp-section-more {
  color: var(--sp-on-primary);
}

/* The subtitle sat at --sp-muted, which is unreadable on the brand block. */
.sp-rail--promo .sp-section-sub {
  color: color-mix(in srgb, var(--sp-on-primary) 78%, transparent);
}

.sp-rail--promo .sp-product-card {
  border-color: transparent;
}

/* 13 — Banners ============================================================ */

.sp-banner {
  display: block;
  overflow: hidden;
  border-radius: var(--sp-radius-lg);
  background: var(--sp-surface-2);
}

.sp-banner img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--sp-ease);
}

.sp-banner:hover img {
  transform: scale(1.03);
}

.sp-banner-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.sp-banner-grid-3 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

@media (min-width: 768px) {
  .sp-banner-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* 14 — Breadcrumb ========================================================= */

.sp-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding-block: 14px;
  font-size: 0.75rem;
  color: var(--sp-muted);
}

.sp-breadcrumb a:hover {
  color: var(--sp-primary);
}

.sp-breadcrumb-sep {
  opacity: 0.55;
}


/* Address primitives ------------------------------------------------------
   Shared by the checkout flow and the account area, so they live in core —
   a page that shows an address must not have to load the checkout stylesheet
   to render one. */

.sp-address-icon {
  display: grid;
  place-items: center;
  inline-size: 40px;
  block-size: 40px;
  flex-shrink: 0;
  color: var(--sp-primary);
  background: var(--sp-primary-soft);
  border-radius: var(--sp-radius);
}

.sp-address-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--sp-text);
}

.sp-address-text {
  margin-block-start: 3px;
  font-size: 0.75rem;
  line-height: 1.9;
  color: var(--sp-muted);
}

.sp-address-person {
  margin-block-start: 6px;
  font-size: 0.6875rem;
  color: var(--sp-muted);
}

/* Out-of-range notice — used on the address pages, so it belongs in core
   alongside the address card it explains. */

.sp-out-of-range {
  display: flex;
  align-items: center;
  gap: 10px;
  /* Always stands clear of whatever precedes it — it is a note about the list
     above, not part of it. */
  margin-block-start: 14px;
  padding: 12px 14px;
  border: 1px dashed var(--sp-danger);
  border-radius: var(--sp-radius);
  background: color-mix(in srgb, var(--sp-danger) 6%, transparent);
}

.sp-out-of-range > svg {
  inline-size: 18px;
  block-size: 18px;
  flex-shrink: 0;
  color: var(--sp-danger);
}

.sp-out-of-range > div {
  min-inline-size: 0;
}

/* Title and body read as one sentence rather than two stacked lines. */
.sp-out-of-range b {
  margin-inline-end: 5px;
  font-size: 0.8125rem;
  color: var(--sp-danger);
}

.sp-out-of-range span {
  font-size: 0.75rem;
  line-height: 1.95;
  color: var(--sp-text-soft);
}

/* Address cards ----------------------------------------------------------- */

.sp-address-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

@media (min-width: 760px) {
  .sp-address-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.sp-address-card {
  display: flex;
  flex-direction: column;
  padding: 18px;
  background: var(--sp-surface);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-lg);
  box-shadow: var(--sp-shadow);
  transition: border-color var(--sp-dur) var(--sp-ease),
    box-shadow var(--sp-dur) var(--sp-ease);
}

.sp-address-card:hover {
  border-color: var(--sp-border-strong);
  box-shadow: var(--sp-shadow-md);
}

/* The default address is marked with a brand edge rather than a full tint,
   so a grid of cards stays calm. */
.sp-address-card.is-default {
  border-color: var(--sp-primary);
  box-shadow: inset 4px 0 0 var(--sp-primary), var(--sp-shadow);
}

.sp-address-card.is-out {
  border-style: dashed;
  border-color: var(--sp-border-strong);
  box-shadow: none;
}

.sp-address-card.is-out .sp-address-text,
.sp-address-card.is-out .sp-address-person {
  opacity: 0.75;
}

.sp-address-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-block-end: 12px;
}

.sp-address-card-head b {
  font-family: var(--sp-font-display);
  font-size: 0.9375rem;
  color: var(--sp-text);
}

/* Push badges to the end of the head row. */
.sp-address-card-head .sp-badge {
  margin-inline-start: auto;
}

.sp-address-card-head .sp-badge ~ .sp-badge {
  margin-inline-start: 0;
}

.sp-address-card .sp-address-text {
  margin-block-end: 10px;
  font-size: 0.8125rem;
  line-height: 2.05;
  color: var(--sp-text-soft);
}

.sp-address-card .sp-address-person {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  font-size: 0.75rem;
  color: var(--sp-muted);
  background: var(--sp-surface-2);
  border-radius: var(--sp-radius);
}

.sp-address-card .sp-address-person svg {
  inline-size: 15px;
  block-size: 15px;
  flex-shrink: 0;
}

.sp-address-card-foot {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-block-start: auto;
  padding-block-start: 14px;
}

/* The delete action sits apart from the two edit actions. */
.sp-address-card-foot .sp-btn--danger {
  margin-inline-start: auto;
}


/* Shared page primitives --------------------------------------------------
   Hero typography, accordions, the success mark and the two-up form row are
   used across the homepages, the checkout flow AND the account area. They
   live here so no page has to load an unrelated stylesheet to render them. */

.sp-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--sp-primary);
  background: var(--sp-primary-soft);
  border-radius: var(--sp-radius-pill);
  margin-block-end: 14px;
}

.sp-hero-eyebrow svg {
  inline-size: 15px;
  block-size: 15px;
}

.sp-hero-title {
  font-size: clamp(1.75rem, 4.4vw, 3rem);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--sp-text);
}

.sp-hero-title em {
  font-style: normal;
  color: var(--sp-primary);
}

.sp-hero-title--xl {
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.25;
}

.sp-hero-lead {
  margin-block-start: 14px;
  max-inline-size: 46ch;
  font-size: 0.9375rem;
  line-height: 2.1;
  color: var(--sp-text-soft);
}

.sp-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-block-start: 24px;
}

.sp-accordion-head {
  display: flex;
  align-items: center;
  gap: 10px;
  inline-size: 100%;
  padding: 16px 18px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--sp-text);
  text-align: start;
  background: none;
  border: none;
  cursor: pointer;
}

.sp-accordion-head > svg:first-child {
  color: var(--sp-primary);
  flex-shrink: 0;
}

.sp-accordion-chevron {
  margin-inline-start: auto;
  display: inline-grid;
  place-items: center;
  color: var(--sp-muted);
  transition: transform var(--sp-dur) var(--sp-ease);
}

.sp-accordion-chevron.is-open {
  transform: rotate(180deg);
}

.sp-accordion-body {
  padding: 0 18px 18px;
}

.sp-success-mark {
  display: grid;
  place-items: center;
  inline-size: 72px;
  block-size: 72px;
  color: #fff;
  background: var(--sp-accent);
  border-radius: 50%;
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--sp-accent) 18%, transparent);
}

.sp-form-row {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

/* 15 — Footer ============================================================= */

.sp-footer {
  margin-block-start: var(--sp-section-y);
  background: var(--sp-surface);
  border-block-start: 1px solid var(--sp-border);
}

.sp-footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-block: 22px;
  border-block-end: 1px solid var(--sp-border);
}

.sp-footer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding-block: 28px;
}

@media (min-width: 768px) {
  .sp-footer-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .sp-footer-grid {
    grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)) 1.2fr;
  }
}

.sp-footer-col-title {
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--sp-text);
  margin-block-end: 12px;
}

.sp-footer-links {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.sp-footer-links a {
  font-size: 0.8125rem;
  color: var(--sp-muted);
  transition: color var(--sp-dur) var(--sp-ease);
}

.sp-footer-links a:hover {
  color: var(--sp-primary);
}

.sp-footer-about {
  font-size: 0.8125rem;
  line-height: 2;
  color: var(--sp-muted);
}

.sp-footer-services {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding-block: 24px;
  border-block-end: 1px solid var(--sp-border);
}

@media (min-width: 768px) {
  .sp-footer-services {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.sp-service {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.sp-service svg {
  inline-size: 34px;
  block-size: 34px;
  color: var(--sp-text-soft);
}

.sp-service span {
  font-size: 0.75rem;
  color: var(--sp-muted);
}

.sp-footer-apps {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sp-footer-app-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--sp-text-soft);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
  transition: border-color var(--sp-dur) var(--sp-ease);
}

.sp-footer-app-btn:hover {
  border-color: var(--sp-primary);
  color: var(--sp-primary);
}

.sp-footer-app-btn svg {
  inline-size: 20px;
  block-size: 20px;
}

.sp-footer-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.sp-footer-badge {
  inline-size: 66px;
  block-size: 66px;
  display: grid;
  place-items: center;
  padding: 8px;
  font-size: 0.5625rem;
  text-align: center;
  color: var(--sp-muted);
  background: var(--sp-surface-2);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
}

.sp-footer-social {
  display: flex;
  gap: 10px;
}

.sp-footer-social a {
  display: grid;
  place-items: center;
  inline-size: 36px;
  block-size: 36px;
  border: 1px solid var(--sp-border);
  border-radius: 50%;
  color: var(--sp-muted);
  transition: all var(--sp-dur) var(--sp-ease);
}

.sp-footer-social a:hover {
  border-color: var(--sp-primary);
  color: var(--sp-primary);
}

.sp-footer-social svg {
  inline-size: 18px;
  block-size: 18px;
}

.sp-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-block: 18px;
  border-block-start: 1px solid var(--sp-border);
  font-size: 0.75rem;
  color: var(--sp-muted);
}

.sp-footer-back-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--sp-primary);
  background: none;
  border: none;
  cursor: pointer;
}

.sp-footer-seo {
  padding-block: 20px;
  font-size: 0.75rem;
  line-height: 2.1;
  color: var(--sp-muted);
  border-block-start: 1px solid var(--sp-border);
}

/* 16 — FAB + support widget =============================================== */

.sp-fabs {
  position: fixed;
  inset-block-end: 20px;
  inset-inline-end: 20px;
  z-index: 700;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sp-fab {
  display: grid;
  place-items: center;
  inline-size: 46px;
  block-size: 46px;
  border: 1px solid var(--sp-border);
  border-radius: 50%;
  background: var(--sp-surface);
  color: var(--sp-text-soft);
  box-shadow: var(--sp-shadow-md);
  cursor: pointer;
  transition: all var(--sp-dur) var(--sp-ease);
}

.sp-fab:hover {
  color: var(--sp-primary);
  border-color: var(--sp-primary);
  transform: translateY(-2px);
}

.sp-fab svg {
  inline-size: 22px;
  block-size: 22px;
}

.sp-fab--support {
  background: var(--sp-primary);
  border-color: var(--sp-primary);
  color: var(--sp-on-primary);
}

.sp-fab--support:hover {
  background: var(--sp-primary-strong);
  color: var(--sp-on-primary);
}

.sp-support-panel {
  position: fixed;
  inset-block-end: 78px;
  inset-inline-end: 20px;
  inline-size: 300px;
  max-inline-size: calc(100vw - 40px);
  z-index: 700;
  background: var(--sp-surface);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-lg);
  box-shadow: var(--sp-shadow-lg);
  overflow: hidden;
}

.sp-support-head {
  padding: 14px 16px;
  background: var(--sp-primary);
  color: var(--sp-on-primary);
}

.sp-support-head b {
  display: block;
  font-size: 0.875rem;
}

.sp-support-head span {
  font-size: 0.75rem;
  opacity: 0.85;
}

.sp-support-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* 17 — Toast, modal, bottom sheet ========================================= */

.sp-toast {
  position: fixed;
  inset-block-end: 24px;
  inset-inline-start: 50%;
  transform: translateX(50%);
  z-index: 1200;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 20px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  background: #1f2937;
  border-radius: var(--sp-radius-pill);
  box-shadow: var(--sp-shadow-lg);
}

html[dir='rtl'] .sp-toast {
  transform: translateX(50%);
}

.sp-toast svg {
  inline-size: 18px;
  block-size: 18px;
  color: var(--sp-success);
}

.sp-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.5);
  overflow-y: auto;
}

.sp-modal {
  inline-size: 100%;
  max-inline-size: 420px;
  background: var(--sp-surface);
  border-radius: var(--sp-radius-xl);
  box-shadow: var(--sp-shadow-lg);
  overflow: hidden;
}

.sp-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px;
  border-block-end: 1px solid var(--sp-border);
}

.sp-modal-title {
  font-size: 0.9375rem;
  font-weight: 800;
}

.sp-modal-body {
  padding: 18px;
}

.sp-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-block-start: 1px solid var(--sp-border);
}

.sp-modal-close {
  display: grid;
  place-items: center;
  inline-size: 34px;
  block-size: 34px;
  border: none;
  border-radius: 50%;
  background: var(--sp-surface-2);
  color: var(--sp-text-soft);
  cursor: pointer;
}

.sp-modal-close svg {
  inline-size: 18px;
  block-size: 18px;
}

/* Bottom sheet — mobile sort/filter. */
.sp-sheet {
  position: fixed;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: 1100;
  max-block-size: 80vh;
  overflow-y: auto;
  background: var(--sp-surface);
  border-radius: var(--sp-radius-xl) var(--sp-radius-xl) 0 0;
  box-shadow: var(--sp-shadow-lg);
}

.sp-sheet-grip {
  inline-size: 40px;
  block-size: 4px;
  margin: 10px auto;
  border-radius: var(--sp-radius-pill);
  background: var(--sp-border-strong);
}

/* 18 — Empty state, skeleton ============================================== */

.sp-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 56px 20px;
  text-align: center;
}

.sp-empty svg {
  inline-size: 76px;
  block-size: 76px;
  color: var(--sp-border-strong);
}

.sp-empty-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--sp-text);
}

.sp-empty-text {
  font-size: 0.8125rem;
  color: var(--sp-muted);
  max-inline-size: 340px;
}

.sp-skeleton {
  background: linear-gradient(
    90deg,
    var(--sp-surface-2) 25%,
    var(--sp-border) 37%,
    var(--sp-surface-2) 63%
  );
  background-size: 400% 100%;
  animation: sp-shimmer 1.4s ease infinite;
  border-radius: var(--sp-radius-sm);
}

@keyframes sp-shimmer {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

/* 19 — Utilities ========================================================== */

.sp-divider {
  block-size: 1px;
  background: var(--sp-border);
  border: none;
  margin-block: 16px;
}

.sp-muted {
  color: var(--sp-muted);
}

.sp-soft {
  color: var(--sp-text-soft);
}

.sp-strong {
  font-weight: 800;
}

.sp-price-strike {
  text-decoration: line-through;
  color: var(--sp-muted);
}

.sp-nowrap {
  white-space: nowrap;
}

.sp-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sp-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sp-scroll-x {
  overflow-x: auto;
  scrollbar-width: thin;
}

/* Sticky column used by cart / checkout summaries. */
.sp-sticky {
  position: sticky;
  inset-block-start: calc(var(--sp-header-h) + 16px);
}

/* Two-column page shell: content + aside. */
.sp-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

@media (min-width: 1024px) {
  .sp-shell {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .sp-shell--start {
    grid-template-columns: 264px minmax(0, 1fr);
  }
}
