/* ============================================
   Cart Shop - Customer Storefront
   Modern, elegant, mobile-first
   ============================================ */

:root {
  --bg: #faf7f4;
  --surface: #ffffff;
  --surface-2: #f4efe9;
  --border: #ebe3da;
  --text: #3a3230;
  --text-muted: #8a7d76;
  --text-subtle: #b3a89f;
  /* الأساس الدافئ: بنّي مُحمَّر راقٍ بدل الأسود */
  --ink: #5c4438;
  --ink-soft: #7a5c4c;
  --gold: #c9a227;
  --gold-soft: #f7f0d8;
  /* لمسة وردية مرجانية دافئة */
  --accent: #c25e5e;
  --accent-hover: #a84a4a;
  --accent-soft: #f9ecec;
  --success: #4a9478;
  --warning: #d4a04a;
  --danger: #c25151;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 3px rgba(92,68,56,0.05);
  --shadow: 0 6px 22px rgba(92,68,56,0.08);
  --shadow-lg: 0 24px 60px rgba(92,68,56,0.13);
  --header-height: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html, body {
  font-family: 'IBM Plex Sans Arabic', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ============================================
   Top Bar
   ============================================ */

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px);
  background: rgba(255,255,255,0.92);
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.4px;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
  box-shadow: 0 4px 12px rgba(255,59,48,0.25);
}

.topbar-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.topbar-search input {
  width: 100%;
  padding: 10px 40px 10px 16px;
  background: var(--surface-2);
  border: 0;
  border-radius: 100px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  transition: all 0.2s;
}

.topbar-search input:focus {
  outline: none;
  background: var(--surface);
  box-shadow: 0 0 0 2px var(--accent);
}

.topbar-search .icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.topbar-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 100px;
  background: transparent;
  border: 0;
  color: var(--text);
  font-size: 20px;
  transition: background 0.15s;
}

.topbar-btn:hover { background: var(--surface-2); }

.topbar-btn .cart-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  border-radius: 100px;
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border: 2px solid var(--surface);
}

.topbar-login {
  padding: 8px 18px;
  border-radius: 100px;
  background: var(--accent);
  color: white;
  font-weight: 600;
  font-size: 14px;
  border: 0;
}

.topbar-login:hover { background: var(--accent-hover); }

/* ============================================
   Container
   ============================================ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

@media (max-width: 640px) {
  .container { padding: 16px; }
  .topbar-inner { padding: 0 16px; gap: 10px; }
  .topbar-search { display: none; }
}

/* ============================================
   Hero
   ============================================ */

.hero {
  background: linear-gradient(135deg, #ff3b30, #ff6b35);
  border-radius: var(--radius-lg);
  padding: 40px;
  color: white;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.hero::before, .hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}

.hero::before { width: 240px; height: 240px; top: -80px; left: -80px; }
.hero::after { width: 160px; height: 160px; bottom: -60px; right: 30%; }

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
}

.hero h1 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.hero p {
  font-size: 16px;
  opacity: 0.95;
  margin-bottom: 24px;
}

@media (max-width: 640px) {
  .hero { padding: 24px; margin-bottom: 24px; }
  .hero h1 { font-size: 24px; }
  .hero p { font-size: 14px; }
}

/* ============================================
   Section
   ============================================ */

.section {
  margin-bottom: 36px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.section-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
}

/* ============================================
   Categories Strip
   ============================================ */

.categories-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0 14px;
  margin: 0 -16px;
  padding-right: 16px;
  padding-left: 16px;
  scrollbar-width: none; /* Firefox */
}
.categories-strip::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.category-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 10px;
  text-align: center;
  transition: all 0.2s;
  text-decoration: none;
  flex: 0 0 100px;
  scroll-snap-align: start;
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, var(--accent-soft) 100%);
  opacity: 0;
  transition: opacity 0.25s;
}

.category-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}
.category-card:hover::before { opacity: 1; }

.category-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: white;
  position: relative;
  z-index: 1;
  transition: transform 0.25s;
}
.category-card:hover .category-card-icon {
  transform: scale(1.08) rotate(-3deg);
}

.category-card-name {
  font-size: 13px;
  font-weight: 600;
  position: relative;
  z-index: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Categories strip wrapper - clean without side fades */
.categories-strip-wrap {
  position: relative;
}

/* ============================================
   Stores Grid
   ============================================ */

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

.store-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.25s;
  text-decoration: none;
  color: inherit;
}

.store-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.store-card-cover {
  position: relative;
  aspect-ratio: 2.5;
  background: linear-gradient(135deg, #f4f4f5, #e4e4e7);
  overflow: hidden;
}

.store-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.store-card-logo {
  position: absolute;
  bottom: -22px;
  right: 16px;
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: white;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  border: 3px solid white;
}

.store-card-logo img {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
}

.store-card-body {
  padding: 30px 16px 16px;
}

.store-card-name {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 4px;
}

.store-card-meta {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.store-card-features {
  display: flex;
  gap: 6px;
  font-size: 16px;
  margin-top: 10px;
}

.store-card-feature {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.store-card-feature.scan { background: var(--accent-soft); }

.store-card-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: var(--warning);
  color: white;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
}

/* ============================================
   Products Grid
   ============================================ */

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.2s;
  position: relative;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.product-card-image {
  aspect-ratio: 1;
  background: var(--surface-2);
  position: relative;
  overflow: hidden;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.product-card:hover .product-card-image img {
  transform: scale(1.05);
}

.product-card-image.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: var(--text-subtle);
}

.product-card-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--accent);
  color: white;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
}

.product-card-body {
  padding: 12px;
}

.product-card-name {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 6px;
  min-height: 36px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-prices {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 10px;
}

.product-card-price {
  font-weight: 700;
  font-size: 15px;
  color: var(--accent);
  font-family: 'Space Grotesk', sans-serif;
}

.product-card-compare {
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.product-card-add {
  width: 100%;
  padding: 8px;
  background: var(--surface-2);
  border: 0;
  border-radius: 100px;
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.product-card-add:hover {
  background: var(--accent);
  color: white;
}

.product-card-add.in-cart {
  background: var(--accent);
  color: white;
}

/* Product card with qty controls */
.qty-controls {
  display: flex;
  align-items: center;
  background: var(--accent);
  color: white;
  border-radius: 100px;
  padding: 4px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 100px;
  background: rgba(255,255,255,0.2);
  border: 0;
  color: white;
  font-size: 14px;
  font-weight: 700;
}

.qty-btn:hover { background: rgba(255,255,255,0.3); }

.qty-value {
  flex: 1;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
}

/* ============================================
   Forms & Inputs
   ============================================ */

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  transition: all 0.15s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,59,48,0.1);
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-group { margin-bottom: 16px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text);
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.15s;
  text-decoration: none;
}

.btn:hover { background: var(--surface-2); }

.btn-primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(255,59,48,0.2);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-block { width: 100%; }

/* ============================================
   Alerts
   ============================================ */

.alert {
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 14px;
  border-right: 4px solid;
}

.alert-success { background: rgba(34,197,94,0.08); border-color: var(--success); color: #166534; }
.alert-danger { background: rgba(239,68,68,0.08); border-color: var(--danger); color: #991b1b; }
.alert-warning { background: rgba(245,158,11,0.08); border-color: var(--warning); color: #854d0e; }
.alert-info { background: rgba(59,130,246,0.08); border-color: #3b82f6; color: #1e40af; }

/* ============================================
   Cards
   ============================================ */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.card-body { padding: 20px; }

/* ============================================
   Empty State
   ============================================ */

.empty {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-title {
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 8px;
}

.empty-desc {
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ============================================
   Auth Page
   ============================================ */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background-image:
    radial-gradient(circle at 0% 0%, rgba(255,59,48,0.08) 0%, transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(255,107,53,0.06) 0%, transparent 50%);
}

.auth-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 40px;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 26px;
}

.auth-logo-icon {
  width: 44px;
  height: 44px;
  background: var(--accent);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 22px;
}

.auth-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.auth-subtitle {
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ============================================
   Store Page
   ============================================ */

.store-banner {
  height: 240px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #ff3b30, #ff6b35);
  position: relative;
  overflow: hidden;
  margin-bottom: 70px;
}

.store-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.store-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
}

.store-info {
  position: absolute;
  bottom: -50px;
  right: 20px;
  left: 20px;
  display: flex;
  align-items: end;
  gap: 20px;
}

.store-logo-big {
  width: 100px;
  height: 100px;
  border-radius: 24px;
  background: var(--surface);
  border: 4px solid var(--surface);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  flex-shrink: 0;
}

.store-logo-big img { width: 100%; height: 100%; border-radius: 20px; object-fit: cover; }

.store-info-text {
  background: var(--surface);
  padding: 16px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  flex: 1;
}

@media (max-width: 640px) {
  .store-banner { height: 180px; margin-bottom: 90px; }
  .store-info { flex-direction: column; align-items: flex-start; bottom: -120px; }
  .store-logo-big { width: 80px; height: 80px; }
  .store-info-text { width: 100%; }
}

/* ============================================
   Cart Page
   ============================================ */

.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.cart-item img {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--surface-2);
}

@media (max-width: 640px) {
  .cart-item { grid-template-columns: 60px 1fr; gap: 12px; }
  .cart-item img { width: 60px; height: 60px; }
  .cart-item .cart-item-controls { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
}

/* ============================================
   Sticky Cart (Mobile)
   ============================================ */

.sticky-cart {
  position: sticky;
  top: 80px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  padding: 12px 0 0;
  border-top: 1px solid var(--border);
  margin-top: 8px;
  font-size: 16px;
  font-weight: 700;
}

.summary-total .amount { color: var(--accent); font-family: 'Space Grotesk', sans-serif; }

/* ============================================
   Order Type Selector
   ============================================ */

.order-types {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.order-type {
  padding: 16px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
}

.order-type:hover { border-color: var(--accent); }

.order-type.selected {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.order-type-icon { font-size: 32px; margin-bottom: 8px; }
.order-type-label { font-weight: 700; font-size: 14px; }
.order-type-desc { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ============================================
   Mobile bottom nav (optional)
   ============================================ */

.bottom-nav {
  display: none;
}

@media (max-width: 640px) {
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 6px 4px calc(8px + env(safe-area-inset-bottom, 0px));
    z-index: 40;
    align-items: stretch;
    box-shadow: 0 -4px 20px rgba(92,68,56,0.06);
  }
  .bottom-nav-item {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
    padding: 4px 2px;
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.15s;
    white-space: nowrap;
  }
  .bottom-nav-item.active { color: var(--accent); }
  .bottom-nav-item .icon { font-size: 22px; line-height: 1; }
  /* زر التسوق الذاتي: أكبر، بالوسط، داخل حدود الشريط */
  .scan-go-item { justify-content: flex-end; }
  .scan-go-icon {
    background: linear-gradient(135deg, var(--accent), var(--ink2));
    color: #fff;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0 !important;
    line-height: 0;
    box-shadow: 0 4px 14px rgba(194,94,94,0.4);
    margin-bottom: 1px;
  }
  .scan-go-icon svg {
    width: 25px;
    height: 25px;
    display: block;
  }
  .scan-go-label { font-size: 10.5px; }
  body { padding-bottom: 86px; }
}

/* Footer */
.footer {
  margin-top: 60px;
  padding: 40px 20px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.3s ease; }

/* Skeleton loader */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-subtle); }

/* ===== Phone Input Component ===== */
.phone-input-wrap {
  display: flex;
  gap: 6px;
  align-items: stretch;
}
.phone-input-wrap .phone-country {
  flex: 0 0 110px;
  direction: ltr;
  text-align: left;
  font-size: 13px;
  padding: 11px 8px;
  background: var(--surface, white);
}
.phone-input-wrap .phone-number {
  flex: 1;
  direction: ltr;
  text-align: left;
  font-feature-settings: 'tnum';
}

/* ===== Mobile Polish (≤640px) ===== */
@media (max-width: 640px) {
  /* Auth pages */
  .auth-page { padding: 16px; }
  .auth-card { padding: 24px 20px; border-radius: 16px; }
  .auth-title { font-size: 22px; }

  /* Forms */
  .form-input, input[type="text"], input[type="email"], input[type="tel"], input[type="password"] {
    font-size: 16px; /* prevent iOS zoom */
    padding: 12px 14px;
  }

  /* Phone input mobile */
  .phone-input-wrap .phone-country {
    flex: 0 0 95px;
    font-size: 12px;
    padding: 12px 6px;
  }

  /* Cards */
  .card { border-radius: 14px; }
  .product-card { border-radius: 12px; }

  /* Tighter spacing */
  .container { padding: 0 14px; }

  /* Better buttons */
  .btn-primary, .btn { min-height: 44px; }

  /* Bottom nav doesn't overlap content */
  body { padding-bottom: 80px; }

  /* Modals */
  .modal { padding: 14px; }
  .modal-content { border-radius: 16px 16px 0 0; max-height: 90vh; }
}

/* ===== Touch-friendly tap targets ===== */
@media (hover: none) {
  .btn, button, a, .nav-item {
    -webkit-tap-highlight-color: rgba(255, 59, 48, 0.1);
  }
}

/* ============================================
   v2.3 — تحسينات جمالية راقية (Premium polish)
   ============================================ */

:root {
  --accent-grad: linear-gradient(135deg, #ff3b30 0%, #ff6b35 100%);
  --premium-shadow: 0 8px 30px rgba(255,59,48,0.12);
  --glass: rgba(255,255,255,0.7);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* خلفية متدرّجة ناعمة للصفحة */
body {
  background:
    radial-gradient(1200px 400px at 100% -5%, rgba(255,107,53,0.05), transparent),
    radial-gradient(900px 350px at -10% 5%, rgba(255,59,48,0.04), transparent),
    var(--bg);
}

/* Hero أكثر فخامة */
.hero {
  background: var(--accent-grad) !important;
  box-shadow: var(--premium-shadow);
  position: relative;
  overflow: hidden;
  border-radius: 24px;
}
.hero h1 { letter-spacing: -0.02em; font-weight: 800; }

/* بطاقات المتاجر — حركة رفع راقية */
.store-card {
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease) !important;
  border-radius: 18px !important;
  overflow: hidden;
}
.store-card:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 18px 40px rgba(0,0,0,0.12) !important;
}
.store-card-cover img {
  transition: transform 0.6s var(--ease);
}
.store-card:hover .store-card-cover img {
  transform: scale(1.06);
}
.store-card-logo {
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
  transition: transform 0.3s var(--ease);
}
.store-card:hover .store-card-logo {
  transform: scale(1.08) rotate(-3deg);
}

/* عناوين الأقسام — خط سفلي متدرّج */
.section-title {
  position: relative;
  font-weight: 800 !important;
  letter-spacing: -0.01em;
}

/* أزرار التصنيفات — حبوب أنيقة */
.category-pill, .category-chip, .category-item {
  transition: all 0.3s var(--ease);
}
.category-pill:hover, .category-chip:hover, .category-item:hover {
  transform: translateY(-3px);
}

/* الأزرار الأساسية — تدرّج + توهج */
.btn-primary, .add-to-cart, .checkout-btn {
  background: var(--accent-grad) !important;
  border: none !important;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease) !important;
}
.btn-primary:hover, .add-to-cart:hover, .checkout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(255,59,48,0.32) !important;
}
.btn-primary:active, .add-to-cart:active { transform: translateY(0) scale(0.98); }

/* بطاقات المنتجات */
.product-card {
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
  border-radius: 16px;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(0,0,0,0.1);
}
.product-card img { transition: transform 0.5s var(--ease); }
.product-card:hover img { transform: scale(1.05); }

/* شريط علوي — زجاجي أنعم */
.topbar {
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
}

/* مبدّل اللغة وأزرار الشريط */
.topbar-btn {
  transition: all 0.25s var(--ease);
  border-radius: 12px;
}
.topbar-btn:hover {
  background: var(--accent-soft);
  transform: scale(1.05);
}

/* السلة العائمة والشارات — نبض لطيف */
.cart-badge {
  animation: badgePop 0.3s var(--ease);
  box-shadow: 0 2px 8px rgba(255,59,48,0.4);
}
@keyframes badgePop {
  0% { transform: scale(0); }
  70% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* شريط التنقّل السفلي — زجاجي */
.bottom-nav {
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(255,255,255,0.88) !important;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.bottom-nav-item { transition: all 0.25s var(--ease); }
.bottom-nav-item.active { color: var(--accent); }
.bottom-nav-item.active .icon { transform: translateY(-2px) scale(1.1); }

/* ظهور تدريجي للبطاقات عند التحميل */
.stores-grid > *, .products-grid > * {
  animation: fadeUp 0.5s var(--ease) backwards;
}
.stores-grid > *:nth-child(2) { animation-delay: 0.05s; }
.stores-grid > *:nth-child(3) { animation-delay: 0.1s; }
.stores-grid > *:nth-child(4) { animation-delay: 0.15s; }
.stores-grid > *:nth-child(5) { animation-delay: 0.2s; }
.stores-grid > *:nth-child(6) { animation-delay: 0.25s; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* تمرير أنعم */
html { scroll-behavior: smooth; }

/* شريط تمرير رفيع أنيق */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.25); }

/* بطاقات الميزات (هدية/شراء جماعي) في الهيرو */
.quick-actions a, .hero-actions a {
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.quick-actions a:hover, .hero-actions a:hover {
  transform: translateY(-3px) scale(1.02);
}

/* تحسين الحقول */
input, select, textarea {
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
input:focus, select:focus, textarea:focus {
  box-shadow: 0 0 0 4px rgba(255,59,48,0.08);
}

/* دعم الوضع الليلي للمتجر (إن فُعّل لاحقاً) */
@media (prefers-color-scheme: dark) {
  body[data-allow-dark="1"] {
    --bg: #0a0a0b;
    --surface: #18181b;
    --surface-2: #27272a;
    --border: #27272a;
    --text: #fafafa;
    --text-muted: #a1a1aa;
  }
}

/* زر المعاينة السريعة يظهر عند المرور */
.product-card:hover .qv-btn { opacity: 1 !important; }
@media (hover: none) { .qv-btn { opacity: 1 !important; } }

/* أزرار تنقّل شريط الفئات (للكمبيوتر) + سحب بالماوس */
.categories-strip { cursor: grab; }
.categories-strip:active { cursor: grabbing; }
.cat-nav {
  display: none;
  position: absolute;
  top: 28px;
  z-index: 5;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  transition: opacity 0.2s, transform 0.2s;
}
.cat-nav:hover { transform: scale(1.08); color: var(--accent); border-color: var(--accent); }
.cat-nav-prev { right: -6px; }
.cat-nav-next { left: -6px; }
/* في الوضع LTR نعكس */
html[dir="ltr"] .cat-nav-prev { left: -6px; right: auto; }
html[dir="ltr"] .cat-nav-next { right: -6px; left: auto; }

/* أزرار التنقّل تظهر فقط على الشاشات الكبيرة (اللمس يكفي على الجوال) */
@media (max-width: 768px) {
  .cat-nav { display: none !important; }
  .categories-strip { cursor: auto; }
}

/* ============================================
   v2.6 — طابع البراندات الفاخر
   ============================================ */

/* هيرو فاخر بتدرّج داكن أنيق */
.hero {
  background: linear-gradient(125deg, #1a1a2e 0%, #16213e 45%, #0f3460 100%) !important;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  top: -50%; right: -10%;
  width: 60%; height: 200%;
  background: radial-gradient(circle, rgba(255,59,48,0.18), transparent 70%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero h1 {
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #fff, #e0e0ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* بطاقات المتاجر بطابع راقٍ */
.store-card-logo {
  border: 2px solid rgba(255,255,255,0.9);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

/* عناوين الأقسام بخط جانبي أنيق */
.section-title {
  position: relative;
  padding-inline-start: 2px;
}

/* بطاقة المنتج: إطار ناعم وظل راقٍ عند المرور */
.product-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
}
.product-card:hover {
  border-color: rgba(255,59,48,0.25);
}

/* شارة الخصم بطابع فاخر */
.product-card-badge {
  font-weight: 800;
  letter-spacing: 0.02em;
  backdrop-filter: blur(4px);
}

/* شريط الماركات: تأثير دائري أنيق */
.section a[href*="brand.php"] > div:first-child {
  transition: transform 0.3s var(--ease, ease), box-shadow 0.3s var(--ease, ease);
}
.section a[href*="brand.php"]:hover > div:first-child {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
}

/* ============================================
   v2.9 — الهوية الفاخرة (Luxury Identity)
   طبقة نهائية تطغى على ما سبق
   ============================================ */

body {
  background:
    radial-gradient(900px 320px at 100% -8%, rgba(201,162,39,0.04), transparent),
    var(--bg);
  color: var(--text);
}

/* العناوين بخط Tajawal الأنيق */
.section-title, .hero h1, h1, h2.section-title {
  font-family: 'Tajawal', 'IBM Plex Sans Arabic', sans-serif;
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* الهيرو: فحمي عميق راقٍ بلمسة ذهبية بدل الأحمر الصريح */
.hero {
  background: linear-gradient(135deg, #5c4438 0%, #7a5c4c 55%, #9a7560 100%) !important;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: 0 18px 50px rgba(20,20,26,0.25);
}
.hero::after {
  content: '';
  position: absolute;
  top: -40%; inset-inline-end: -8%;
  width: 50%; height: 180%;
  background: radial-gradient(circle, rgba(201,162,39,0.16), transparent 68%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero h1 {
  color: #fff;
  font-weight: 900;
}
.hero p { color: rgba(255,255,255,0.78); }

/* خط ذهبي رفيع أسفل عناوين الأقسام */
.section-title {
  position: relative;
  display: inline-block;
  padding-bottom: 6px;
}
.section-title::after {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  bottom: 0;
  width: 36px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}

/* الأزرار الأساسية: حبر داكن أنيق، الأحمر للـ CTA الحرج فقط */
.btn-primary {
  background: var(--ink) !important;
  border: none !important;
  color: #fff !important;
  font-weight: 700;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn-primary:hover {
  background: var(--ink-soft) !important;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(20,20,26,0.22) !important;
}
/* زر الشراء/الدفع: أحمر (لفت الانتباه) */
.checkout-btn, .add-to-cart, .btn-buy {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover)) !important;
  color: #fff !important;
  border: none !important;
}

/* بطاقات المنتجات: أنيقة بحدود ناعمة وظل راقٍ */
.product-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 40px rgba(20,20,26,0.12);
  border-color: rgba(201,162,39,0.4);
}
.product-card img { transition: transform 0.6s var(--ease); }
.product-card:hover img { transform: scale(1.05); }

/* السعر بخط واضح */
.product-card-price, .product-price {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: var(--ink);
}

/* شارة الأصالة والذهبي */
.badge-authentic {
  background: linear-gradient(135deg, var(--gold), #b8901f);
  color: #fff;
}

/* الشريط العلوي زجاجي أنيق */
.topbar {
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  background: rgba(255,255,255,0.85);
  border-bottom: 1px solid var(--border);
}

/* بطاقات المتاجر/الماركات: رُقي */
.store-card, .brand-card {
  border-radius: 18px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.store-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 44px rgba(20,20,26,0.13);
}

/* مساحات أكبر بين الأقسام */
.section { margin-bottom: 36px; }

/* شريط تمرير رفيع */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(20,20,26,0.18); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(20,20,26,0.3); }

html { scroll-behavior: smooth; }

/* ظهور تدريجي أنيق */
@keyframes luxFade { from { opacity:0; transform: translateY(14px);} to {opacity:1; transform:none;} }
.products-grid > *, .stores-grid > * { animation: luxFade 0.5s var(--ease) backwards; }
.products-grid > *:nth-child(2), .stores-grid > *:nth-child(2){animation-delay:.04s}
.products-grid > *:nth-child(3), .stores-grid > *:nth-child(3){animation-delay:.08s}
.products-grid > *:nth-child(4), .stores-grid > *:nth-child(4){animation-delay:.12s}
.products-grid > *:nth-child(5), .stores-grid > *:nth-child(5){animation-delay:.16s}
.products-grid > *:nth-child(6), .stores-grid > *:nth-child(6){animation-delay:.2s}

/* قائمة النقاط الثلاث في الهيدر */
.topbar-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(92,68,56,0.16);
  min-width: 180px;
  padding: 6px;
  z-index: 2000;
  animation: luxFade 0.2s var(--ease);
}
.topbar-dropdown a,
.topbar-dropdown button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  border: 0;
  background: none;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 9px;
  cursor: pointer;
  text-align: start;
  transition: background 0.15s;
}
.topbar-dropdown a:hover,
.topbar-dropdown button:hover { background: var(--surface-2); }

/* ============================================
   v3.5 - Unified modern identity
   ============================================ */
:root {
  --bg: #f4f7fa;
  --surface: #ffffff;
  --surface-2: #edf2f6;
  --border: #dce4ec;
  --text: #172033;
  --text-muted: #667085;
  --text-subtle: #7d8998;
  --ink: #12233d;
  --ink2: #1f3a5a;
  --ink-soft: #284868;
  --accent: #0f766e;
  --accent-hover: #0b5f59;
  --accent-soft: #e5f4f2;
  --gold: #d7a43b;
  --gold-soft: #fbf3df;
  --success: #15745f;
  --warning: #a76b0b;
  --danger: #b54747;
  --accent-grad: linear-gradient(135deg, #12233d 0%, #1f4d62 52%, #0f766e 100%);
  --shadow-sm: 0 3px 12px rgba(18,35,61,0.05);
  --shadow: 0 12px 32px rgba(18,35,61,0.09);
  --shadow-lg: 0 28px 70px rgba(18,35,61,0.14);
}

html { scroll-padding-top: 86px; }
body {
  background:
    radial-gradient(900px 360px at 96% -8%, rgba(15,118,110,0.09), transparent 64%),
    radial-gradient(800px 300px at -8% 12%, rgba(215,164,59,0.07), transparent 62%),
    var(--bg);
}
a, button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible {
  outline: 3px solid rgba(15,118,110,0.34);
  outline-offset: 3px;
}

.topbar {
  background: rgba(255,255,255,0.9);
  border-bottom-color: rgba(220,228,236,0.92);
  box-shadow: 0 6px 24px rgba(18,35,61,0.04);
}
.brand { color: var(--ink); font-weight: 800; }
.brand-icon,
.auth-logo-icon {
  background: linear-gradient(145deg, #f2c766, var(--gold)) !important;
  color: var(--ink) !important;
  box-shadow: 0 10px 24px rgba(167,107,11,0.22) !important;
  border: 1px solid rgba(255,255,255,0.75);
}
.brand-icon svg,
.auth-logo-icon svg { display: block; }
.topbar-search input {
  min-height: 44px;
  background: #f1f5f8;
  border: 1px solid transparent;
}
.topbar-search input:hover { border-color: var(--border); }
.topbar-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(15,118,110,0.11);
}
.topbar-btn { color: var(--ink2); }
.topbar-btn:hover { background: var(--accent-soft); color: var(--accent); }
.topbar-login {
  background: var(--accent-grad);
  color: #fff;
  min-height: 42px;
  padding-inline: 20px;
  box-shadow: 0 9px 22px rgba(15,118,110,0.18);
}
.topbar-login:hover { background: linear-gradient(135deg, var(--ink2), var(--accent)); }
.cart-badge,
.topbar-btn .cart-badge {
  background: var(--accent);
  box-shadow: 0 3px 10px rgba(15,118,110,0.28);
}

.container { padding-top: 28px; }
.hero {
  min-height: 330px;
  display: flex;
  align-items: center;
  padding: clamp(32px, 6vw, 72px);
  background:
    radial-gradient(circle at 12% 16%, rgba(242,199,102,0.25), transparent 24%),
    radial-gradient(circle at 90% 70%, rgba(30,188,173,0.2), transparent 32%),
    var(--accent-grad) !important;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 30px 70px rgba(18,35,61,0.24);
}
.hero::before {
  width: 360px;
  height: 360px;
  top: -180px;
  left: -90px;
  border: 1px solid rgba(255,255,255,0.12);
  background: transparent;
}
.hero::after {
  width: 480px;
  height: 480px;
  inset-inline-end: -140px;
  top: -90px;
  background: radial-gradient(circle, rgba(15,118,110,0.44), transparent 66%);
}
.hero-content { max-width: 720px; }
.hero h1 {
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.14;
  margin-bottom: 16px;
  -webkit-text-fill-color: initial;
  background: none;
}
.hero p {
  max-width: 620px;
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.9;
  color: rgba(255,255,255,0.84);
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 7px 13px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 100px;
  background: rgba(255,255,255,0.1);
  color: #f9df9c;
  font-size: 12px;
  font-weight: 700;
}
.hero-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.hero-trust-row span {
  padding: 8px 12px;
  border-radius: 100px;
  background: rgba(255,255,255,0.09);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.9);
  font-size: 12px;
  font-weight: 600;
}

/* Campaigns */
.campaign-section { margin-bottom: 34px; }
.campaign-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 16px;
}
.campaign-card {
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: 220px;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 24px;
  background:
    radial-gradient(circle at 16% 18%, rgba(242,199,102,0.24), transparent 28%),
    linear-gradient(135deg, #12233d, #0f766e);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 18px 38px rgba(18,35,61,0.16);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.campaign-card:nth-child(3n + 2) {
  background:
    radial-gradient(circle at 85% 15%, rgba(242,199,102,0.22), transparent 26%),
    linear-gradient(135deg, #3a2730, #8c554e);
}
.campaign-card:nth-child(3n + 3) {
  background:
    radial-gradient(circle at 18% 20%, rgba(242,199,102,0.28), transparent 28%),
    linear-gradient(135deg, #30263f, #745b7e);
}
.campaign-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(18,35,61,0.23);
}
.campaign-card-image {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.campaign-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(12,22,38,0.9), rgba(12,22,38,0.48) 68%, rgba(12,22,38,0.2));
}
[dir="rtl"] .campaign-card::after {
  background: linear-gradient(270deg, rgba(12,22,38,0.9), rgba(12,22,38,0.48) 68%, rgba(12,22,38,0.2));
}
.campaign-card-glow {
  position: absolute;
  z-index: -1;
  width: 250px;
  height: 250px;
  inset-inline-end: -70px;
  top: -70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242,199,102,0.3), transparent 68%);
}
.campaign-card-content {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 28px;
}
.campaign-card-badge {
  display: inline-flex;
  padding: 5px 13px;
  margin-bottom: 12px;
  border-radius: 100px;
  background: #0f8f85;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.campaign-card h3 {
  margin: 0 0 7px;
  color: #fff;
  font-family: 'Tajawal', sans-serif;
  font-size: clamp(21px, 2.2vw, 27px);
  font-weight: 800;
}
.campaign-card p {
  max-width: 46ch;
  margin: 0;
  color: rgba(255,255,255,0.82);
  font-size: 13px;
  line-height: 1.7;
}
.campaign-card-date {
  margin-top: 11px;
  color: rgba(255,255,255,0.65);
  font-size: 11px;
}
.campaign-card-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 17px;
  color: #f7d985;
  font-size: 12px;
  font-weight: 800;
}

/* Outfit builder */
.outfit-builder { max-width: 980px; padding-top: 22px; margin-inline: auto; }
.outfit-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 5vw, 46px);
  margin-bottom: 20px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 15% 10%, rgba(242,199,102,0.26), transparent 30%),
    linear-gradient(135deg, var(--ink), var(--accent));
  color: #fff;
  text-align: center;
  box-shadow: 0 22px 48px rgba(18,35,61,0.18);
}
.outfit-hero-icon {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 18px;
  background: rgba(255,255,255,0.1);
  font-size: 28px;
}
.outfit-hero h1 { margin: 0 0 8px; color: #fff; font-size: clamp(28px, 4vw, 42px); }
.outfit-hero p { max-width: 640px; margin: auto; color: rgba(255,255,255,0.78); line-height: 1.8; }
.outfit-progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 auto 20px;
}
.outfit-progress span {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-muted);
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}
.outfit-progress span.is-active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.outfit-preview-panel {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
  padding: 18px;
  background: linear-gradient(135deg, #fff, var(--surface-2));
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
}
.outfit-persona-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.outfit-persona {
  border: 1.5px solid var(--border);
  background: var(--surface);
  border-radius: 14px;
  min-height: 48px;
  font-family: inherit;
  font-weight: 800;
  cursor: pointer;
}
.outfit-persona.is-selected { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.outfit-avatar-wrap { display: grid; justify-items: center; gap: 10px; }
.outfit-avatar {
  width: 180px;
  min-height: 265px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0;
  transform: none;
  filter: drop-shadow(0 18px 24px rgba(15, 23, 42, .14));
}
.outfit-avatar-head {
  width: 58px; height: 62px; border-radius: 48% 48% 46% 46%;
  background: linear-gradient(135deg, #f0c09a, #d79a72);
  border: 3px solid rgba(255,255,255,.7);
  box-shadow: inset 0 8px 0 rgba(61,43,35,.18);
}
.outfit-avatar-body {
  width: 122px; height: 132px; border-radius: 48px 48px 30px 30px;
  margin-top: -2px;
  background: linear-gradient(135deg, #dfe8f5, #b9c7db);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; border: 4px solid rgba(255,255,255,.78);
}
.outfit-avatar-legs {
  position: relative;
  width: 104px; height: 88px;
  background: transparent;
}
.outfit-avatar-legs::before,
.outfit-avatar-legs::after {
  content: '';
  position: absolute;
  top: 0;
  width: 43px;
  height: 84px;
  border-radius: 0 0 22px 22px;
  background: linear-gradient(135deg, #2f3a4b, #172033);
}
.outfit-avatar-legs::before { right: 6px; }
.outfit-avatar-legs::after { left: 6px; }
.outfit-avatar.is-woman .outfit-avatar-body { width: 130px; height: 154px; border-radius: 58px 58px 46px 46px; background: linear-gradient(135deg, #f4bfd0, #b985a7); }
.outfit-avatar.is-kid { width: 145px; min-height: 230px; transform: scale(.9); }
.outfit-avatar.is-kid .outfit-avatar-body { width: 104px; height: 116px; background: linear-gradient(135deg, #ffe0ad, #f4a261); }
.outfit-worn-item { color: rgba(255,255,255,.92); font-size: 12px; font-weight: 800; text-align: center; padding: 8px; }
.outfit-worn-item img { width: 100%; height: 100%; object-fit: cover; }
.outfit-preview-caption { color: var(--text-muted); font-size: 12px; text-align: center; }
.outfit-step {
  padding: clamp(18px, 3vw, 28px);
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.outfit-step[hidden] { display: none; }
.outfit-step-title { margin-bottom: 5px; color: var(--ink); font-size: 18px; font-weight: 800; }
.outfit-step-copy { margin-bottom: 18px; color: var(--text-muted); font-size: 13px; line-height: 1.7; }
.outfit-source-note {
  display: none;
  padding: 11px 13px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: #fff8e8;
  color: #7c5310;
  font-size: 12px;
  line-height: 1.7;
}
.outfit-source-note.is-visible { display: block; }
.outfit-items,
.outfit-suggestion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 12px;
}
.outfit-item {
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 2px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  text-align: start;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.outfit-item:hover { transform: translateY(-3px); border-color: rgba(15,118,110,0.55); }
.outfit-item:focus-visible { outline: 3px solid rgba(15,118,110,0.22); outline-offset: 3px; }
.outfit-item.is-selected { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 12px 26px rgba(15,118,110,0.15); }
.outfit-item-media,
.outfit-suggestion-media {
  aspect-ratio: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
}
.outfit-item-media img,
.outfit-suggestion-media img { width: 100%; height: 100%; object-fit: cover; }
.outfit-item-body { padding: 11px; }
.outfit-item-name { min-height: 38px; font-size: 13px; font-weight: 700; line-height: 1.45; }
.outfit-item-source {
  width: fit-content;
  margin-top: 7px;
  padding: 3px 8px;
  border-radius: 100px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-size: 9px;
  font-weight: 800;
}
.outfit-item-price { margin-top: 5px; color: var(--accent); font-size: 12px; font-weight: 800; }
.outfit-pref-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.outfit-subtitle { margin: 16px 0 10px; color: var(--ink); font-size: 14px; font-weight: 800; }
.outfit-category-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 10px; }
.outfit-category-option {
  min-height: 78px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  border-radius: 16px;
  padding: 12px;
  text-align: start;
  font-family: inherit;
  cursor: pointer;
  transition: all .18s ease;
}
.outfit-category-option strong { display: block; color: var(--ink); font-size: 14px; }
.outfit-category-option small { display: block; color: var(--text-muted); margin-top: 5px; line-height: 1.5; }
.outfit-category-option:hover,
.outfit-category-option.is-selected { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); box-shadow: 0 10px 22px rgba(15,118,110,.12); }
.outfit-pref {
  min-height: 66px;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
}
.outfit-pref.is-selected { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-hover); }
.outfit-submit { margin-top: 16px; min-height: 52px; }
.outfit-note {
  display: none;
  padding: 15px 17px;
  margin-bottom: 18px;
  border: 1px solid rgba(167,107,11,0.28);
  border-radius: 15px;
  background: linear-gradient(135deg, #fff8e8, #fff);
  color: #634515;
  font-size: 13px;
  line-height: 1.8;
}
.outfit-note.is-visible { display: block; }
.outfit-personalized {
  display: none;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 14px;
  margin: -7px 0 18px;
  border-radius: 13px;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.7;
}
.outfit-personalized::before {
  content: '✦';
  color: var(--accent);
  font-weight: 900;
}
.outfit-personalized.is-visible { display: flex; }
.outfit-group { margin-bottom: 24px; }
.outfit-group-title { margin-bottom: 10px; color: var(--ink); font-size: 15px; font-weight: 800; }
.outfit-suggestion {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  text-align: start;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.outfit-suggestion:hover,
.outfit-suggestion.is-selected { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow-sm); }
.outfit-suggestion.is-selected { outline: 3px solid rgba(194,94,94,.12); }
.outfit-suggestion-body { padding: 10px; }
.outfit-suggestion-name { min-height: 36px; font-size: 12px; font-weight: 700; line-height: 1.5; }
.outfit-suggestion-meta { margin-top: 4px; color: var(--text-muted); font-size: 10px; }
.outfit-suggestion-reason {
  min-height: 52px;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.65;
}
.outfit-suggestion-price { margin-top: 5px; color: var(--accent); font-size: 12px; font-weight: 800; }
.outfit-suggestion-link {
  display: inline-flex;
  margin-top: 9px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}
.outfit-preview-actions { margin-top: 14px; }
.outfit-generated-preview {
  display: grid;
  gap: 10px;
  justify-items: center;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-2);
}
.outfit-generated-preview[hidden] { display: none; }
.outfit-generated-preview img,
.outfit-generated-preview canvas {
  width: min(100%, 360px);
  height: auto;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
  display: block;
}
.outfit-generated-preview img[hidden],
.outfit-generated-preview canvas[hidden] { display: none; }
.outfit-generated-preview p {
  max-width: 520px;
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}
.outfit-status { grid-column: 1 / -1; padding: 34px 16px; color: var(--text-muted); text-align: center; line-height: 1.8; }
.outfit-status.is-error { color: var(--danger); }

.section { margin-bottom: 48px; }
.section-title { color: var(--ink); }
.section-title::after { background: linear-gradient(90deg, var(--accent), var(--gold)); }
.section-link { color: var(--accent); }
.card,
.store-card,
.product-card,
.sticky-cart {
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.store-card,
.product-card { border-radius: 20px !important; }
.store-card:hover,
.product-card:hover {
  border-color: rgba(15,118,110,0.38);
  box-shadow: var(--shadow);
}
.store-card-feature { background: #f0f4f7; color: var(--ink2); }
.store-card-feature.scan { background: var(--accent-soft); color: var(--accent); }
.product-card-price,
.product-price { color: var(--accent); }
.product-card-badge {
  background: var(--ink);
  box-shadow: 0 5px 16px rgba(18,35,61,0.2);
}
.category-card {
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}
.category-card:hover { border-color: rgba(15,118,110,0.45); }

/* Home category, store and brand layout */
.muted-link {
  color: var(--text-muted) !important;
  font-size: 12px;
}
.home-category-rail {
  gap: 14px;
  padding-top: 2px;
  padding-bottom: 12px;
}
.home-category-card {
  flex: 0 0 86px;
  width: 86px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
.home-category-card::before { display: none; }
.home-category-card:hover {
  border-color: transparent;
  box-shadow: none;
}
.home-category-card .category-card-icon {
  width: 74px;
  height: 74px;
  border: 3px solid #fff;
  border-radius: 50%;
  margin-bottom: 8px;
  background:
    radial-gradient(circle at 30% 22%, rgba(255,255,255,0.35), transparent 33%),
    var(--category-color, var(--accent));
  box-shadow: 0 8px 20px rgba(92,68,56,0.13);
  color: #fff;
}
.home-category-card:hover .category-card-icon {
  transform: translateY(-3px) scale(1.04);
}
.category-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.home-category-card .category-card-name {
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
}
.home-store-list {
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
  gap: 14px;
}
.home-store-list .store-card {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  min-height: 126px;
  padding: 8px;
  direction: inherit;
  border-radius: 24px !important;
}
.home-store-list .store-card:hover {
  transform: translateY(-2px);
}
.home-store-list .store-card-cover {
  height: 110px;
  min-height: 110px;
  aspect-ratio: auto;
  border-radius: 20px;
}
.home-store-list .store-card-logo {
  top: 9px;
  right: 9px;
  bottom: auto;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border-width: 2px;
  font-size: 22px;
}
.home-store-list .store-card-logo img { border-radius: 12px; }
.home-store-list .store-card-body {
  min-width: 0;
  padding: 12px 14px 10px 8px;
  direction: inherit;
  text-align: start;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.home-store-list .store-card-name {
  font-size: 19px;
  line-height: 1.35;
  margin-bottom: 5px;
}
.home-store-list .store-card-meta {
  display: block;
  font-size: 13px;
  margin-bottom: 0;
}
.home-store-list .store-card-features {
  margin-top: 9px;
  justify-content: flex-start;
}
.home-store-list .store-card-feature {
  width: 30px;
  height: 30px;
  border-radius: 10px;
}
.home-brand-rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scrollbar-width: none;
}
.home-brand-rail::-webkit-scrollbar { display: none; }
.home-brand-card {
  flex: 0 0 86px;
  width: 86px;
  color: inherit;
  text-align: center;
  text-decoration: none;
}
.home-brand-logo {
  position: relative;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 7px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.home-brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.home-brand-logo span:not(.home-brand-verified) { font-size: 28px; }
.home-brand-verified {
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 19px;
  height: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #1d4ed8;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}
.home-brand-name {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .home-store-list {
    grid-template-columns: 1fr;
  }
  .home-store-list .store-card {
    grid-template-columns: 124px minmax(0, 1fr);
    min-height: 118px;
  }
  .home-store-list .store-card-cover {
    height: 102px;
    min-height: 102px;
  }
  .home-store-list .store-card-name { font-size: 18px; }
}

.btn {
  min-height: 46px;
  border-radius: 13px;
}
.btn-primary,
.add-to-cart,
.checkout-btn,
.btn-buy {
  background: linear-gradient(135deg, var(--ink), var(--accent)) !important;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(15,118,110,0.2) !important;
}
.btn-primary:hover,
.add-to-cart:hover,
.checkout-btn:hover,
.btn-buy:hover {
  background: linear-gradient(135deg, var(--ink2), var(--accent-hover)) !important;
  box-shadow: 0 14px 30px rgba(15,118,110,0.28) !important;
}
.btn:disabled,
button:disabled {
  cursor: not-allowed !important;
  opacity: 0.55;
  transform: none !important;
  box-shadow: none !important;
}
.form-input,
.form-select,
.form-textarea {
  min-height: 48px;
  background: #fbfcfd;
  border-color: #d7e0e9;
}
.form-input:hover,
.form-select:hover,
.form-textarea:hover { border-color: #b9c7d6; }
.form-input:focus,
.form-select:focus,
.form-textarea:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(15,118,110,0.11);
}
.alert { border-right-width: 4px; }
.alert-success { background: #ecfdf5; color: #065f46; border-color: #34a584; }
.alert-danger { background: #fff1f1; color: #8f3030; border-color: #d96767; }
.alert-warning { background: #fff8e8; color: #7c5310; border-color: #d7a43b; }

/* Customer login and registration */
.customer-auth-body { padding: 0 !important; background: #eef3f7; }
.customer-auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 0.92fr) minmax(520px, 1.08fr);
}
.customer-auth-form-panel,
.customer-auth-card,
.customer-auth-form,
.customer-auth-form .form-group,
.customer-auth-form .phone-input-wrap {
  min-width: 0;
}
.customer-auth-showcase {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(34px, 5vw, 68px);
  color: #fff;
  background:
    radial-gradient(circle at 14% 12%, rgba(242,199,102,0.27), transparent 26%),
    radial-gradient(circle at 88% 78%, rgba(29,190,174,0.27), transparent 34%),
    var(--accent-grad);
}
.customer-auth-showcase::before,
.customer-auth-showcase::after {
  content: '';
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.11);
}
.customer-auth-showcase::before { width: 460px; height: 460px; top: -220px; left: -180px; }
.customer-auth-showcase::after { width: 340px; height: 340px; bottom: -170px; right: -90px; }
.customer-auth-brand,
.customer-auth-mobile-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  color: inherit;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 24px;
  font-weight: 800;
}
.customer-auth-brand-mark {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(145deg, #f2c766, var(--gold));
  color: var(--ink);
  box-shadow: 0 14px 34px rgba(0,0,0,0.22);
}
.customer-auth-copy { max-width: 590px; }
.customer-auth-eyebrow {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 7px 13px;
  border-radius: 100px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.14);
  color: #f8dc97;
  font-size: 12px;
  font-weight: 700;
}
.customer-auth-copy h1 {
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1.15;
  margin-bottom: 18px;
  color: #fff;
}
.customer-auth-copy > p {
  max-width: 560px;
  color: rgba(255,255,255,0.78);
  font-size: 17px;
  line-height: 1.9;
}
.customer-auth-benefits {
  display: grid;
  gap: 12px;
  margin-top: 28px;
  color: rgba(255,255,255,0.9);
  font-size: 14px;
}
.customer-auth-benefits div { display: flex; align-items: center; gap: 10px; }
.customer-auth-benefits span {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(242,199,102,0.18);
  border: 1px solid rgba(242,199,102,0.28);
  color: #f8dc97;
}
.customer-auth-note { color: rgba(255,255,255,0.58); font-size: 12px; }
.customer-auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px;
  background:
    radial-gradient(circle at 88% 10%, rgba(15,118,110,0.09), transparent 28%),
    linear-gradient(145deg, #f8fafc, #edf3f7);
}
.customer-auth-card {
  width: 100%;
  max-width: 520px;
  padding: 44px;
  border: 1px solid rgba(214,224,233,0.9);
  border-radius: 30px;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 30px 80px rgba(18,35,61,0.13);
}
.customer-auth-mobile-brand { display: none; color: var(--ink); margin-bottom: 26px; }
.customer-auth-mobile-brand .customer-auth-brand-mark { width: 44px; height: 44px; }
.customer-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  margin-bottom: 30px;
  border-radius: 15px;
  background: #edf2f6;
}
.customer-auth-tabs a {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}
.customer-auth-tabs a.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 5px 16px rgba(18,35,61,0.08);
}
.customer-auth-heading h1 {
  color: var(--ink);
  font-size: 32px;
  margin-bottom: 7px;
}
.customer-auth-heading p { color: var(--text-muted); margin-bottom: 26px; }
.customer-auth-form .form-label { color: #344054; }
.field-optional {
  margin-inline-start: 6px;
  color: var(--text-subtle);
  font-size: 11px;
  font-weight: 500;
}
.password-field { position: relative; }
.password-field .form-input { padding-inline-end: 72px; }
.password-field button {
  position: absolute;
  inset-inline-end: 8px;
  top: 50%;
  transform: translateY(-50%);
  min-height: 36px;
  padding: 0 11px;
  border: 0;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
}
.customer-auth-submit { min-height: 54px; margin-top: 8px; }
.customer-auth-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
}
.customer-auth-footer a { color: var(--accent); font-weight: 700; }

.outfit-cart-entry {
  min-height: 68px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 15px;
  background: linear-gradient(135deg, var(--ink), #1f4d62 58%, var(--accent));
  color: #fff;
  text-align: start;
  box-shadow: 0 12px 28px rgba(18,35,61,0.16);
}
.outfit-cart-entry:hover { transform: translateY(-1px); box-shadow: 0 16px 34px rgba(18,35,61,0.2); }
.outfit-cart-entry-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255,255,255,0.12);
  color: #f8dc97;
  font-size: 20px;
}
.outfit-cart-entry strong { display: block; font-size: 13px; }
.outfit-cart-entry small { display: block; margin-top: 2px; color: rgba(255,255,255,0.7); font-size: 10px; line-height: 1.5; }
.outfit-cart-entry-empty { max-width: 430px; margin: 18px auto 0; }

/* Top audience navigation */
.topbar-audience {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.topbar-audience::-webkit-scrollbar { display: none; }
.topbar-audience a {
  flex: 0 0 auto;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(194,94,94,0.12);
  color: var(--ink2);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(116,74,74,0.06);
  transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}
.topbar-audience a:hover {
  transform: translateY(-1px);
  border-color: rgba(194,94,94,0.35);
}
.topbar-audience a.active {
  background: linear-gradient(135deg, var(--accent), var(--ink2));
  color: #fff;
  border-color: transparent;
}

/* Audience gate */
.audience-gate { margin-top: 18px; }
.audience-gate-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.audience-chip {
  min-height: 86px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 18px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.audience-chip input { display: none; }
.audience-chip:hover,
.audience-chip.is-selected {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 14px 30px rgba(15,118,110,.12);
}
.audience-chip-icon { font-size: 28px; line-height: 1; }
.audience-chip strong { font-size: 13px; text-align: center; }
.audience-apply { min-height: 86px; border-radius: 18px; }

@media (max-width: 900px) {
  .audience-gate-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .topbar-audience { padding: 0 14px 10px; gap: 7px; }
  .topbar-audience a { padding: 7px 11px; font-size: 12px; min-height: 34px; }
}
@media (max-width: 520px) {
  .audience-gate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .audience-chip, .audience-apply { min-height: 76px; border-radius: 15px; }
  .audience-chip-icon { font-size: 24px; }
}

/* Purchase-flow clarity */
.purchase-confidence {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: -4px 0 18px;
}
.purchase-confidence div {
  padding: 10px;
  border-radius: 12px;
  background: #f4f7fa;
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-align: center;
  font-size: 11px;
  font-weight: 600;
}
.variant-required-note {
  color: var(--text-muted);
  font-size: 12px;
  margin: -8px 0 14px;
}
.free-delivery-progress {
  height: 7px;
  overflow: hidden;
  margin-top: 8px;
  border-radius: 100px;
  background: rgba(167,107,11,0.13);
}
.free-delivery-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), #efc766);
}
.otype-opt.is-disabled {
  opacity: 0.5;
  cursor: not-allowed !important;
  background: #f3f4f6 !important;
  border-color: #e5e7eb !important;
}
.option-unavailable {
  margin-top: 4px;
  color: var(--danger);
  font-size: 10px;
  font-weight: 600;
}
.checkout-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}
.checkout-total-note {
  padding: 9px 11px;
  margin-top: 8px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-size: 11px;
  line-height: 1.6;
}
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 980px) {
  body.customer-auth-body {
    width: 100%;
    overflow-x: hidden;
  }
  .customer-auth-shell {
    display: block;
    width: 100%;
    min-height: 100dvh;
    grid-template-columns: 1fr;
    overflow-x: hidden;
  }
  .customer-auth-showcase { display: none; }
  .customer-auth-mobile-brand { display: inline-flex; }
  .customer-auth-form-panel {
    width: 100%;
    min-height: 100dvh;
  }
}
@media (max-width: 640px) {
  .customer-auth-body { overflow-x: hidden; }
  .container { padding: 18px 14px 0; }
  .hero { min-height: 0; padding: 28px 22px; border-radius: 22px; }
  .hero h1 { font-size: 30px; }
  .hero-trust-row { gap: 7px; }
  .hero-trust-row span { font-size: 10px; }
  .section { margin-bottom: 36px; }
  .customer-auth-form-panel {
    align-items: flex-start;
    min-height: 100dvh;
    padding: 14px 12px max(14px, env(safe-area-inset-bottom));
  }
  .customer-auth-card {
    width: 100%;
    max-width: 100%;
    padding: 26px 16px;
    border-radius: 22px;
    overflow: hidden;
  }
  .customer-auth-tabs { margin-bottom: 22px; }
  .customer-auth-form .phone-input-wrap {
    display: flex !important;
    width: 100%;
    max-width: 100%;
    gap: 6px;
  }
  .customer-auth-form .phone-input-wrap .phone-country {
    flex: 0 0 88px !important;
    max-width: 88px;
  }
  .customer-auth-form .phone-input-wrap .phone-number {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
  }
  .customer-auth-heading h1 { font-size: 27px; }
  .customer-auth-footer { flex-direction: column; text-align: center; }
  .purchase-confidence { grid-template-columns: 1fr; }
  .campaign-section {
    width: calc(100% + 28px);
    margin-inline: -14px;
    overflow: hidden;
  }
  .campaign-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 2px 14px 10px;
    scroll-padding-inline: 14px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .campaign-grid::-webkit-scrollbar { display: none; }
  .campaign-card {
    flex: 0 0 min(86vw, 360px);
    min-height: 205px;
    scroll-snap-align: center;
    border-radius: 20px;
  }
  .campaign-card-content { padding: 22px; }
  .campaign-card p { font-size: 12px; }
  .outfit-builder { padding-inline: 0; }
  .outfit-hero { border-radius: 22px; }
  .outfit-progress span { padding: 9px 4px; font-size: 10px; }
  .outfit-preview-panel { grid-template-columns: 1fr; padding: 16px; }
  .outfit-avatar { transform: scale(.92); min-height: 230px; }
  .outfit-step { padding: 17px; border-radius: 18px; }
  .outfit-pref-grid { grid-template-columns: 1fr; }
  .outfit-persona-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .outfit-pref { min-height: 50px; }
  .outfit-items,
  .outfit-suggestion-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
}
@media (max-width: 360px) {
  .customer-auth-card { padding-inline: 14px; }
  .customer-auth-form .phone-input-wrap .phone-country {
    flex-basis: 82px !important;
    max-width: 82px;
    padding-inline: 6px !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   v3.15.1 - Compact mobile header and account drawer
   ============================================ */
.mobile-menu-toggle,
.mobile-sidebar,
.mobile-sidebar-backdrop {
  display: none;
}

.pwa-install-banner {
  position: fixed;
  z-index: 2100;
  inset-inline: 20px;
  bottom: 24px;
  width: min(430px, calc(100% - 40px));
  min-height: 76px;
  margin-inline: auto;
  padding: 12px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto 34px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--accent);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(18,35,61,0.2);
  animation: pwaBannerIn .32s var(--ease) both;
}
.pwa-install-icon {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  object-fit: contain;
}
.pwa-install-copy { min-width: 0; }
.pwa-install-copy strong,
.pwa-install-copy span,
.pwa-install-copy small { display: block; }
.pwa-install-copy strong { color: var(--ink); font-size: 14px; }
.pwa-install-copy span { color: var(--text-muted); font-size: 11px; line-height: 1.55; }
.pwa-install-copy small {
  margin-top: 4px;
  color: var(--accent-hover);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.55;
}
.pwa-install-action {
  min-height: 40px;
  padding: 8px 15px;
  border: 0;
  border-radius: 999px;
  background: var(--accent-grad);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.pwa-install-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
}
@keyframes pwaBannerIn {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 640px) {
  .topbar {
    padding-top: env(safe-area-inset-top, 0px);
  }
  .topbar-inner {
    height: 58px;
    padding-inline: 12px;
    gap: 6px;
  }
  .brand {
    flex: 0 1 auto;
    min-width: 0;
    gap: 7px;
    font-size: 18px;
    line-height: 1;
    white-space: nowrap;
  }
  .brand-icon {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }
  .brand > span { white-space: nowrap; }
  .topbar-actions {
    flex: 0 0 auto;
    margin-inline-start: auto;
    gap: 2px;
  }
  .topbar-actions .topbar-btn {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }
  .topbar-language,
  .topbar-login,
  .topbar-secondary-action {
    display: none !important;
  }
  .mobile-menu-toggle { display: flex; }
  .mobile-menu-toggle span {
    font-size: 23px;
    line-height: 1;
    transform: translateY(-1px);
  }
  .topbar-audience { display: none; }

  .mobile-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2390;
    display: block;
    visibility: hidden;
    opacity: 0;
    background: rgba(18,35,61,.48);
    backdrop-filter: blur(2px);
    transition: opacity .22s ease, visibility .22s ease;
  }
  .mobile-sidebar-backdrop.is-open {
    visibility: visible;
    opacity: 1;
  }
  .mobile-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    z-index: 2400;
    width: min(84vw, 320px);
    padding: max(16px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: var(--surface);
    box-shadow: 0 0 52px rgba(18,35,61,.22);
    visibility: hidden;
    transition: transform .25s var(--ease), visibility .25s ease;
  }
  [dir="rtl"] .mobile-sidebar {
    right: 0;
    transform: translateX(105%);
  }
  [dir="ltr"] .mobile-sidebar {
    left: 0;
    transform: translateX(-105%);
  }
  .mobile-sidebar.is-open {
    visibility: visible;
    transform: translateX(0);
  }
  body.mobile-sidebar-open { overflow: hidden; }
  .mobile-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
  }
  .mobile-sidebar-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--ink);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 19px;
    font-weight: 800;
  }
  .mobile-sidebar-brand-icon {
    width: 38px;
    height: 38px;
    overflow: hidden;
    border-radius: 11px;
  }
  .mobile-sidebar-brand-icon img { width: 100%; height: 100%; object-fit: contain; }
  .mobile-sidebar-close {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: var(--surface-2);
    color: var(--ink2);
    font-size: 26px;
    line-height: 1;
  }
  .mobile-sidebar-welcome {
    display: grid;
    gap: 4px;
    margin: 18px 0 14px;
    padding: 16px;
    border-radius: 15px;
    background: var(--accent-soft);
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.65;
  }
  .mobile-sidebar-welcome strong { color: var(--ink); font-size: 15px; }
  .mobile-sidebar-nav { display: grid; gap: 7px; }
  .mobile-sidebar-nav a,
  .mobile-sidebar-language {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 13px;
    border: 1px solid var(--border);
    border-radius: 13px;
    color: var(--ink2);
    font-size: 13px;
    font-weight: 700;
  }
  .mobile-sidebar-auth { display: grid; gap: 9px; }
  .mobile-sidebar-primary,
  .mobile-sidebar-secondary {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    font-size: 14px;
    font-weight: 800;
  }
  .mobile-sidebar-primary { background: var(--accent-grad); color: #fff; }
  .mobile-sidebar-secondary {
    border: 1px solid var(--accent);
    background: var(--surface);
    color: var(--accent);
  }
  .mobile-sidebar-language { margin-top: auto; }

  .pwa-install-banner {
    inset-inline: 10px;
    bottom: calc(78px + env(safe-area-inset-bottom, 0px));
    width: calc(100% - 20px);
    grid-template-columns: 42px minmax(0, 1fr) auto 32px;
    gap: 8px;
    padding: 10px;
    border-radius: 15px;
  }
  .pwa-install-icon { width: 42px; height: 42px; border-radius: 11px; }
  .pwa-install-action { min-height: 38px; padding-inline: 13px; }
  .pwa-install-close { width: 32px; height: 32px; }
}

@media (max-width: 360px) {
  .topbar-inner { padding-inline: 9px; gap: 3px; }
  .brand { gap: 5px; font-size: 16px; }
  .brand-icon { flex-basis: 30px; width: 30px; height: 30px; }
  .topbar-actions .topbar-btn { width: 36px; height: 36px; }
  .pwa-install-banner {
    grid-template-columns: 38px minmax(0, 1fr) auto 30px;
    gap: 6px;
  }
  .pwa-install-icon { width: 38px; height: 38px; }
  .pwa-install-copy span { display: none; }
  .pwa-install-action { min-height: 36px; padding-inline: 11px; }
}

/* v3.15.2: one storefront card in both home and “view all”, with full LTR support. */
.home-store-list .store-card-logo {
  right: auto;
  inset-inline-start: 9px;
}

/* Display the supplied logo as-is; no colored tile behind the header mark. */
.brand-icon {
  overflow: hidden;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
.brand-icon img { display: block; }

/* Branded hand-off after the native PWA splash. JS enables it only in app mode. */
body.app-is-launching { overflow: hidden; }
.app-launch-screen {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
      radial-gradient(circle at 50% 37%, rgba(194,94,94,.12), transparent 32%),
      var(--bg);
    color: var(--ink);
    text-align: center;
    opacity: 1;
    transition: opacity .38s ease, visibility .38s ease;
}
  body.app-is-launching .app-launch-screen { display: flex; }
  .app-launch-screen.is-leaving { opacity: 0; visibility: hidden; }
  .app-launch-mark {
    position: relative;
    width: 112px;
    height: 112px;
    margin-bottom: 18px;
    overflow: visible;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 20px 50px rgba(92,68,56,.16);
    animation: appLaunchFloat 1.45s var(--ease) infinite alternate;
  }
  .app-launch-mark img { width: 100%; height: 100%; object-fit: contain; padding: 7px; border-radius: inherit; }
  .app-launch-mark i {
    position: absolute;
    inset-inline-start: -14px;
    height: 5px;
    border-radius: 999px;
    background: var(--accent);
    opacity: .76;
    animation: appLaunchTrail 1.1s ease-in-out infinite;
  }
  .app-launch-mark i:nth-of-type(1) { top: 34px; width: 22px; }
  .app-launch-mark i:nth-of-type(2) { top: 53px; width: 31px; animation-delay: .12s; }
  .app-launch-mark i:nth-of-type(3) { top: 72px; width: 17px; animation-delay: .24s; }
  .app-launch-screen strong { font-family: 'Space Grotesk', sans-serif; font-size: 27px; letter-spacing: -.5px; }
  .app-launch-screen > span { margin-top: 2px; color: var(--text-muted); font-size: 13px; }
  .app-launch-dots { display: flex; gap: 7px; margin-top: 24px; }
  .app-launch-dots b {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    animation: appLaunchDot .9s ease-in-out infinite alternate;
  }
  .app-launch-dots b:nth-child(2) { animation-delay: .16s; }
  .app-launch-dots b:nth-child(3) { animation-delay: .32s; }
@keyframes appLaunchFloat { to { transform: translateY(-8px) scale(1.015); } }
@keyframes appLaunchTrail { 50% { transform: translateX(-5px); opacity: .35; } }
@keyframes appLaunchDot { to { transform: translateY(-6px); opacity: .35; } }

/* Outfit preview: baby was selectable but had no matching visual state. */
.outfit-avatar.is-baby {
  width: 126px;
  min-height: 190px;
  transform: scale(.82);
}
.outfit-avatar.is-baby .outfit-avatar-head { width: 62px; height: 54px; }
.outfit-avatar.is-baby .outfit-avatar-body {
  width: 112px;
  height: 92px;
  border-radius: 46px;
  background: linear-gradient(135deg, #d8eef2, #9fcbd1);
}
.outfit-avatar.is-baby .outfit-avatar-legs { width: 84px; height: 42px; }
.outfit-avatar.is-baby .outfit-avatar-legs::before,
.outfit-avatar.is-baby .outfit-avatar-legs::after { width: 35px; height: 40px; }

@media (max-width: 360px) {
  .outfit-items,
  .outfit-suggestion-grid { grid-template-columns: 1fr; }
}
