/* ============================================
   Storemare - Women's Fashion 2026
   Elegant • Calm • Professional
   ============================================ */

:root {
  --color-bg: #FAF9F7;
  --color-bg-alt: #F3F0EB;
  --color-cream: #F8F6F3;
  --color-blush: #E8DED5;
  --color-sage: #8B9A7D;
  --color-sage-light: #B5C4A8;
  --color-charcoal: #2C2C2C;
  --color-charcoal-soft: #4A4A4A;
  --color-text: #2C2C2C;
  --color-text-muted: #6B6B6B;
  --color-gold: #B8A88A;
  --color-gold-light: #D4C9B4;
  --color-white: #FFFFFF;
  --color-border: #E5E0D9;
  --font-heading: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Outfit', 'Segoe UI', sans-serif;
  --shadow-soft: 0 4px 24px rgba(44, 44, 44, 0.06);
  --shadow-card: 0 8px 32px rgba(44, 44, 44, 0.08);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

/* اتجاه الصفحة حسب اللغة: العربي = RTL ، الإنجليزي = LTR */
html[dir="rtl"] { direction: rtl; }
html[dir="ltr"] { direction: ltr; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  direction: inherit;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

a:hover { opacity: 0.85; }

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.25;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

.text-muted { color: var(--color-text-muted); }

/* Layout */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  min-width: 0;
}

@media (min-width: 768px) {
  .container { padding: 0 40px; }
}

main {
  min-width: 0;
  overflow-x: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
  animation: contentFadeIn 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

main.content-fade-out {
  animation: contentFadeOut 0.3s cubic-bezier(0.55, 0.09, 0.68, 0.53) forwards;
}

main.content-fade-in {
  animation: contentFadeIn 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes contentFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes contentFadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-4px);
  }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 249, 247, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--transition);
}

.site-header.scrolled { box-shadow: var(--shadow-soft); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 16px;
  min-width: 0;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--color-charcoal);
  flex-shrink: 1;
  min-width: 0;
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-actions-group .cart-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  transition: background var(--transition);
}

.header-actions-group .cart-link:hover {
  background: var(--color-bg-alt);
}

.nav-main {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-main a {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--color-charcoal-soft);
  position: relative;
}

.nav-main a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  right: 0;
  width: 0;
  height: 1px;
  background: var(--color-sage);
  transition: width var(--transition);
}

[dir="ltr"] .nav-main a::after { right: auto; left: 0; }

.nav-main a:hover::after,
.nav-main a.active::after { width: 100%; }

.nav-main a:hover,
.nav-main a.active { color: var(--color-charcoal); }

/* زر تبديل اللغة — بجانب السلة، تصميم كبسولة عصري */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  background: var(--color-bg-alt);
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
  border: 1px solid var(--color-border);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  border-radius: 999px;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.lang-btn:hover {
  color: var(--color-charcoal);
}

.lang-btn.active {
  background: var(--color-white);
  color: var(--color-charcoal);
  box-shadow: 0 1px 4px rgba(44, 44, 44, 0.1);
}

.header-actions-group .lang-switcher {
  flex-shrink: 0;
}

@media (max-width: 991px) {
  .lang-switcher { padding: 3px; }
  .lang-btn { min-width: 32px; height: 32px; font-size: 0.75rem; }
}

.cart-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--color-charcoal-soft);
}

.cart-link svg { width: 22px; height: 22px; }
.cart-count {
  background: var(--color-sage);
  color: var(--color-white);
  font-size: 0.75rem;
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Hero */
.hero {
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(165deg, var(--color-cream) 0%, var(--color-blush) 50%, var(--color-bg-alt) 100%);
  padding: 80px 24px 100px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse 80% 50% at 50% 100%, rgba(184, 168, 138, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-tag {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-sage);
  margin-bottom: 16px;
}

.hero h1 {
  margin-bottom: 20px;
  color: var(--color-charcoal);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero p {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  max-width: 480px;
  margin: 0 auto 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--color-charcoal);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-charcoal-soft);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.btn-outline {
  background: transparent;
  color: var(--color-charcoal);
  border: 1.5px solid var(--color-border);
}

.btn-outline:hover {
  border-color: var(--color-sage);
  color: var(--color-sage);
}

.btn-ghost {
  background: transparent;
  color: var(--color-charcoal-soft);
}

.btn-ghost:hover { color: var(--color-charcoal); }

.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
}

/* Sections */
.section {
  padding: 80px 0;
}

.section-alt { background: var(--color-bg-alt); }

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-tag {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-sage);
  margin-bottom: 12px;
}

.section-header h2 {
  color: var(--color-charcoal);
  margin-bottom: 12px;
}

.section-header p {
  color: var(--color-text-muted);
  max-width: 520px;
  margin: 0 auto;
}

/* Category cards */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (min-width: 640px) {
  .categories-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}

@media (min-width: 1024px) {
  .categories-grid { grid-template-columns: repeat(6, 1fr); }
}

.category-card {
  position: relative;
  aspect-ratio: 3/4;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-blush);
}

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.category-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(44, 44, 44, 0.5) 0%, transparent 50%);
  display: flex;
  align-items: flex-end;
  padding: 24px;
}

.category-card h3 {
  color: var(--color-white);
  font-size: 1.25rem;
  font-weight: 500;
}

.category-card-link {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 1;
  text-decoration: none;
  color: inherit;
}

.category-card-main .category-card-overlay h3 { font-size: 1.35rem; }

@media (min-width: 640px) {
  .category-card-main { grid-column: span 1; }
}

/* صفحة التصنيفات: أقسام رئيسية */
.category-main-block {
  margin-bottom: 56px;
}

.category-main-block:last-child { margin-bottom: 0; }

.category-main-title {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.category-main-title a {
  color: var(--color-charcoal);
}

.category-main-title a:hover { color: var(--color-sage); }

.category-main-desc {
  color: var(--color-text-muted);
  margin-bottom: 24px;
  font-size: 0.95rem;
}

/* مبدّل القسم: كبسولة أنيقة مع مؤشر انزلاق ذهبي */
.section-switcher {
  display: inline-flex;
  position: relative;
  background: #EDE9E3;
  border-radius: 999px;
  padding: 6px;
  gap: 0;
  border: 1px solid rgba(232, 222, 213, 0.8);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.section-switcher-indicator {
  position: absolute;
  top: 6px;
  bottom: 6px;
  width: calc(50% - 6px);
  left: 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-gold-light) 0%, var(--color-gold) 50%, #A89878 100%);
  box-shadow: 0 2px 12px rgba(184, 168, 138, 0.35), 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: left 0.4s cubic-bezier(0.34, 1.2, 0.64, 1);
  pointer-events: none;
  z-index: 0;
}

[dir="rtl"] .section-switcher[data-active="women"] .section-switcher-indicator {
  left: calc(50% + 3px);
}

[dir="rtl"] .section-switcher[data-active="men"] .section-switcher-indicator {
  left: 6px;
}

[dir="ltr"] .section-switcher[data-active="women"] .section-switcher-indicator {
  left: 6px;
}

[dir="ltr"] .section-switcher[data-active="men"] .section-switcher-indicator {
  left: calc(50% + 3px);
}

.section-switcher-btn {
  position: relative;
  z-index: 1;
  padding: 12px 28px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.2s ease;
  white-space: nowrap;
}

.section-switcher-btn:hover {
  color: var(--color-charcoal);
}

.section-switcher-btn:active {
  transform: scale(0.98);
}

.section-switcher-btn.active {
  color: var(--color-charcoal);
}

.section-switcher-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

/* محتوى مبدّل القسم: انتقال سلس بين حريمي و رجالي */
.section-content-wrapper {
  position: relative;
  min-height: 120px;
}

.content-section {
  opacity: 0;
  visibility: hidden;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.content-section.active {
  opacity: 1;
  visibility: visible;
  position: relative;
  pointer-events: auto;
}

/* Product grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (min-width: 640px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}

@media (min-width: 1024px) {
  .products-grid { grid-template-columns: repeat(4, 1fr); gap: 28px; }
}

/* ========== Product card — boutique, minimal, luxury ========== */
.product-card {
  background: #FAF8F5;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(44, 44, 44, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(232, 228, 223, 0.6);
}

.product-card:hover {
  box-shadow: 0 12px 40px rgba(44, 44, 44, 0.1), 0 4px 12px rgba(0, 0, 0, 0.06);
  transform: translateY(-6px);
}

.product-card-image-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.product-card-image {
  position: relative;
  aspect-ratio: 3/4;
  background: #F3F0EB;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.product-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  z-index: 2;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover .product-badge {
  transform: scale(1.02);
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.14);
}

.product-badge--discount {
  background: linear-gradient(135deg, #8B9A7D 0%, #7A8A6C 100%);
  color: #fff;
}

.product-badge--featured {
  background: linear-gradient(135deg, var(--color-gold-light) 0%, var(--color-gold) 100%);
  color: #2C2C2C;
}

[dir="ltr"] .product-badge { right: auto; left: 14px; }

.product-card-body {
  padding: 18px 20px 14px;
  flex: 1;
}

.product-card-title {
  font-size: 1.05rem;
  font-weight: 500;
  margin: 0 0 10px 0;
  color: var(--color-charcoal);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.product-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.product-card-title a:hover {
  color: var(--color-sage);
}

.product-card-price {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.product-card-price .current-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-charcoal);
  letter-spacing: -0.02em;
}

.product-card-price .old-price {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  text-decoration: line-through;
  font-weight: 500;
}

.product-card-actions {
  padding: 0 20px 20px;
  margin-top: 2px;
}

.product-card-add-form {
  width: 100%;
}

.product-card-add-btn {
  width: 100%;
  padding: 14px 20px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #2C2C2C 0%, #3d3d3d 100%);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.3s ease, background 0.3s ease;
  box-shadow: 0 4px 14px rgba(44, 44, 44, 0.25);
}

.product-card-add-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(44, 44, 44, 0.3);
  background: linear-gradient(135deg, #3d3d3d 0%, #2C2C2C 100%);
}

.product-card-add-btn:active {
  transform: translateY(0);
}

/* رمز الريال بجانب السعر */
.price-with-symbol {
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  white-space: nowrap;
}

.price-symbol {
  height: 1.15em;
  width: auto;
  vertical-align: middle;
  display: inline-block;
  object-fit: contain;
}

.price-symbol-muted {
  opacity: 0.7;
}

.price .price-symbol { height: 1.05em; }
.product-info .price-symbol { height: 1.35em; }
.cart-summary .price-symbol,
.checkout-order .price-symbol { height: 1.2em; }

/* Product single */
.product-single {
  display: grid;
  gap: 40px;
  padding: 60px 0 80px;
}

@media (min-width: 1024px) {
  .product-single {
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 60px;
  }
}

.product-gallery {
  position: sticky;
  top: 100px;
}

.product-gallery-main {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-cream);
  margin-bottom: 16px;
}

.product-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-gallery-thumbs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.product-gallery-thumbs a {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color var(--transition);
}

.product-gallery-thumbs a:hover,
.product-gallery-thumbs a.active { border-color: var(--color-sage); }

.product-gallery-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info h1 {
  margin-bottom: 12px;
  color: var(--color-charcoal);
}

.product-info .price-block {
  margin-bottom: 24px;
}

.product-info .price-block .current-price { font-size: 1.5rem; font-weight: 600; }
.product-info .price-block .old-price { font-size: 1.1rem; margin-right: 12px; }

[dir="ltr"] .product-info .price-block .old-price { margin-right: 0; margin-left: 12px; }

.product-info .description {
  color: var(--color-text-muted);
  margin-bottom: 28px;
  line-height: 1.7;
}

.product-form .form-group {
  margin-bottom: 20px;
}

.product-form label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--color-charcoal);
}

.product-form select,
.product-form input[type="number"] {
  width: 100%;
  max-width: 120px;
  padding: 12px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 16px; /* prevents zoom on focus in iOS */
  background: var(--color-white);
  transition: border-color var(--transition);
}

@media (max-width: 480px) {
  .product-form select,
  .product-form input[type="number"] {
    max-width: 100%;
  }

  .product-form .btn-primary { max-width: 100%; }
}

.product-form select:focus,
.product-form input:focus {
  outline: none;
  border-color: var(--color-sage);
}

.product-form .btn-primary {
  width: 100%;
  max-width: 320px;
  padding: 16px 24px;
  font-size: 1rem;
  margin-top: 8px;
}

/* Cart */
.cart-page {
  padding: 60px 0 80px;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
}

.cart-table th {
  text-align: right;
  padding: 16px 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
}

[dir="ltr"] .cart-table th { text-align: left; }

.cart-table td {
  padding: 24px 0;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.cart-item-image {
  width: 100px;
  height: 120px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-cream);
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-details {
  min-width: 0;
  flex: 1;
}

.cart-item-details h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.cart-item-details .meta { font-size: 0.9rem; color: var(--color-text-muted); }

.cart-qty {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.cart-qty button {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--color-bg-alt);
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--color-charcoal);
  transition: background var(--transition);
}

.cart-qty button:hover { background: var(--color-blush); }

.cart-qty span,
.cart-qty input.qty-input {
  min-width: 44px;
  text-align: center;
  font-weight: 500;
}

.cart-qty input.qty-input {
  background: transparent;
  -moz-appearance: textfield;
}

.cart-qty input.qty-input::-webkit-outer-spin-button,
.cart-qty input.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cart-remove {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 0;
}

.cart-remove:hover { color: #c00; }

.cart-summary {
  background: var(--color-cream);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-top: 40px;
  max-width: 400px;
  margin-right: 0;
  margin-left: auto;
}

[dir="ltr"] .cart-summary { margin-left: 0; margin-right: auto; }

.cart-summary .row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 1rem;
}

.cart-summary .row.total {
  font-size: 1.25rem;
  font-weight: 600;
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid var(--color-border);
}

.cart-summary .btn-primary { width: 100%; margin-top: 8px; }

/* Checkout */
.checkout-page {
  padding: 60px 0 80px;
}

/* على الهاتف فقط: مسافة جانبية أوضح + زر تأكيد ثاني أسفل النموذج */
.checkout-submit-mobile {
  display: none;
}

@media (max-width: 767px) {
  .checkout-page.container {
    padding-left: 20px;
    padding-right: 20px;
  }
  .page-header .container {
    padding-left: 20px;
    padding-right: 20px;
  }
  .checkout-submit-mobile {
    display: block;
    padding: 12px 0 16px;
    margin-top: 0;
  }
  .checkout-submit-mobile .btn {
    width: 100%;
    padding: 16px;
  }
}

.checkout-grid {
  display: grid;
  gap: 48px;
}

@media (min-width: 1024px) {
  .checkout-grid { grid-template-columns: 1fr 400px; }
}

.checkout-form .form-group {
  margin-bottom: 20px;
}

.checkout-form label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--color-charcoal);
}

.checkout-form input,
.checkout-form textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 16px; /* prevents zoom on focus in iOS */
  background: var(--color-white);
  transition: border-color var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

.checkout-form input:focus,
.checkout-form textarea:focus {
  outline: none;
  border-color: var(--color-sage);
}

.checkout-form textarea { min-height: 100px; resize: vertical; }

.checkout-order {
  background: var(--color-cream);
  border-radius: var(--radius-lg);
  padding: 32px;
  height: fit-content;
  position: sticky;
  top: 100px;
}

.checkout-order h3 { margin-bottom: 24px; }

.checkout-order .item {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
}

.checkout-order .item:last-of-type { border-bottom: none; }

.checkout-order .item-img {
  width: 64px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--color-blush);
  flex-shrink: 0;
}

.checkout-order .item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.checkout-order .item-details { flex: 1; }
.checkout-order .item-details .name { font-weight: 500; margin-bottom: 4px; }
.checkout-order .item-details .meta { font-size: 0.85rem; color: var(--color-text-muted); }

.checkout-order .totals { margin-top: 24px; }
.checkout-order .totals .row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 1rem;
}

.checkout-order .totals .row.grand {
  font-size: 1.25rem;
  font-weight: 600;
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid var(--color-border);
}

.checkout-order .btn-primary { width: 100%; margin-top: 24px; padding: 16px; }

/* Success page: توسيط المحتوى عمودياً في منتصف الشاشة */
.success-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 48px 24px 80px;
  text-align: center;
}

.success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  background: var(--color-sage);
  color: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.success-page h1 { margin-bottom: 12px; }
.success-page .order-number {
  font-size: 1.1rem;
  color: var(--color-sage);
  font-weight: 600;
  margin-bottom: 32px;
}

.success-page .btn { margin: 0 8px; }

@media (max-width: 480px) {
  .success-page { padding: 32px 16px 60px; }
  .success-page .btn {
    display: block;
    margin: 8px 0;
    width: 100%;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Footer */
.site-footer {
  background: var(--color-charcoal);
  color: var(--color-blush);
  margin-top: 80px;
  position: relative;
}

/* Desktop footer */
.footer-desktop {
  display: none;
  padding: 60px 0 32px;
  padding-bottom: calc(32px + env(safe-area-inset-bottom, 0));
}

@media (min-width: 992px) {
  .footer-desktop { display: block; }
  .footer-mobile { display: none !important; }
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 48px;
}

@media (min-width: 640px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 40px; }
}

@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 2fr repeat(3, 1fr); }
}

.footer-brand .logo {
  color: var(--color-white);
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 0.95rem;
  color: var(--color-blush);
  opacity: 0.9;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-white);
  margin-bottom: 20px;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 12px; }
.footer-col a {
  color: var(--color-blush);
  opacity: 0.9;
  font-size: 0.95rem;
}

.footer-col a:hover { opacity: 1; }

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-blush);
  opacity: 0.8;
}

/* ========== Mobile-only collapsible footer ========== */
.footer-mobile {
  display: block;
  border-radius: 24px 24px 0 0;
  overflow: hidden;
  background: #2C2C2C;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
}

.footer-mobile-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 18px 24px;
  min-height: 56px;
  background: transparent;
  border: none;
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.25s ease;
  -webkit-tap-highlight-color: transparent;
  text-align: right;
}

.footer-mobile-toggle:hover,
.footer-mobile-toggle:focus {
  background: rgba(255, 255, 255, 0.06);
}

.footer-mobile-toggle:active {
  background: rgba(255, 255, 255, 0.08);
}

.footer-mobile-toggle-logo {
  letter-spacing: 0.02em;
}

.footer-mobile-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gold-light);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  margin-right: 12px;
}

.footer-mobile.is-open .footer-mobile-toggle-icon {
  transform: rotate(180deg);
}

.footer-mobile-panel {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
}

.footer-mobile.is-open .footer-mobile-panel {
  max-height: 720px;
  opacity: 1;
}

.footer-mobile-inner {
  padding: 0 24px 24px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0));
}

.footer-mobile-desc {
  font-size: 0.95rem;
  color: var(--color-blush);
  opacity: 0.92;
  line-height: 1.6;
  margin: 0 0 28px 0;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-mobile-block {
  margin-bottom: 28px;
}

.footer-mobile-block h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-gold-light);
  margin: 0 0 14px 0;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.footer-mobile-block ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-mobile-block li {
  margin-bottom: 12px;
}

.footer-mobile-block a {
  display: block;
  padding: 10px 0;
  color: var(--color-blush);
  font-size: 1rem;
  opacity: 0.95;
  text-decoration: none;
  transition: opacity 0.2s ease, color 0.2s ease;
  min-height: 44px;
  line-height: 24px;
  box-sizing: border-box;
}

.footer-mobile-block a:hover,
.footer-mobile-block a:focus {
  opacity: 1;
  color: var(--color-gold-light);
}

.footer-mobile-social ul {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-mobile-social li { margin-bottom: 0; }

.footer-mobile-social a {
  padding: 10px 0;
  min-height: 44px;
}

.footer-mobile-bottom {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-blush);
  opacity: 0.75;
}

/* Utilities */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 32px; }

.text-center { text-align: center; }

/* Alerts */
.alert {
  padding: 16px 20px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.alert-success { background: rgba(139, 154, 125, 0.15); color: #5a6a4a; border: 1px solid var(--color-sage-light); }
.alert-error { background: rgba(200, 0, 0, 0.08); color: #a00; border: 1px solid rgba(200,0,0,0.2); }
.alert-info { background: rgba(184, 168, 138, 0.15); color: var(--color-charcoal-soft); border: 1px solid var(--color-gold-light); }

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 48px;
  flex-wrap: wrap;
  padding: 0 8px;
}

@media (max-width: 480px) {
  .pagination { gap: 4px; margin-top: 32px; }
  .pagination a,
  .pagination span { min-width: 40px; height: 40px; padding: 0 10px; font-size: 0.9rem; }
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  border: 1.5px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-charcoal);
  transition: all var(--transition);
}

.pagination a:hover {
  border-color: var(--color-sage);
  color: var(--color-sage);
}

.pagination .active span {
  background: var(--color-charcoal);
  border-color: var(--color-charcoal);
  color: var(--color-white);
}

.pagination .disabled span {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Page title */
.page-header {
  padding: 48px 0 32px;
  text-align: center;
  background: linear-gradient(180deg, var(--color-cream) 0%, var(--color-bg) 100%);
}

.page-header h1 { margin-bottom: 8px; }
.page-header p { color: var(--color-text-muted); }

/* Filter sidebar (shop) */
.shop-layout {
  display: grid;
  gap: 32px;
  padding: 40px 0 60px;
}

@media (min-width: 1024px) {
  .shop-layout { grid-template-columns: 240px 1fr; }
}

.shop-sidebar {
  background: var(--color-cream);
  border-radius: var(--radius-lg);
  padding: 24px;
  height: fit-content;
  position: sticky;
  top: 100px;
}

.shop-sidebar h3 {
  font-size: 1rem;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.shop-sidebar ul { list-style: none; padding: 0; margin: 0; }
.shop-sidebar li { margin-bottom: 10px; }
.shop-sidebar a {
  font-size: 0.95rem;
  color: var(--color-charcoal-soft);
}

.shop-sidebar a:hover,
.shop-sidebar a.active { color: var(--color-sage); }

.shop-sidebar-main { margin-bottom: 16px; }
.shop-sidebar-main > a { font-weight: 500; color: var(--color-charcoal); }
.shop-sidebar-sub {
  margin-top: 8px;
  padding-right: 16px;
  border-right: 2px solid var(--color-border);
  margin-right: 4px;
}

[dir="ltr"] .shop-sidebar-sub {
  padding-right: 0;
  padding-left: 16px;
  border-right: none;
  border-left: 2px solid var(--color-border);
  margin-right: 0;
  margin-left: 4px;
}

.shop-sidebar-sub li { margin-bottom: 6px; }
.shop-sidebar-sub a { font-size: 0.9rem; }
.shop-sidebar-list { list-style: none; padding: 0; margin: 0; }

.shop-sidebar-divider {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
  list-style: none;
}

.shop-sidebar-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-charcoal);
}

/* Shop filters (sizes, colors, price) */
.shop-filters {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.shop-filter-block {
  margin-bottom: 16px;
}

.shop-filter-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-charcoal);
  margin-bottom: 10px;
}

.shop-filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.shop-filter-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--color-charcoal-soft);
  cursor: pointer;
}

.shop-filter-check input { accent-color: var(--color-sage); }

/* Price range slider (خط أعداد السعر) - محسّن */
.shop-filter-block-price .shop-filter-title { margin-bottom: 6px; }

.price-range-values {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-charcoal);
  margin-bottom: 12px;
  padding: 8px 12px;
  background: var(--color-cream);
  border-radius: var(--radius);
  display: inline-block;
}

.price-range-slider {
  position: relative;
  height: 36px;
  max-width: 100%;
}

/* المسار الخلفي (رمادي) */
.price-range-slider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 8px;
  background: var(--color-border);
  border-radius: 4px;
  pointer-events: none;
}

/* النطاق المحدد (أخضر واضح) */
.price-range-fill {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 8px;
  background: linear-gradient(90deg, var(--color-sage-light) 0%, var(--color-sage) 100%);
  border-radius: 4px;
  pointer-events: none;
  z-index: 1;
  transition: left 0.15s ease, width 0.15s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}

.price-range-input {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 36px;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  pointer-events: none;
}

.price-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-sage);
  border: 3px solid var(--color-white);
  box-shadow: 0 2px 8px rgba(44, 44, 44, 0.25);
  cursor: grab;
  pointer-events: auto;
  transition: transform 0.15s, box-shadow 0.15s;
}

.price-range-input::-webkit-slider-thumb:hover {
  transform: scale(1.08);
  box-shadow: 0 3px 12px rgba(44, 44, 44, 0.3);
}

.price-range-input::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-sage);
  border: 3px solid var(--color-white);
  box-shadow: 0 2px 8px rgba(44, 44, 44, 0.25);
  cursor: grab;
  pointer-events: auto;
  transition: transform 0.15s, box-shadow 0.15s;
}

.price-range-input::-moz-range-thumb:hover {
  transform: scale(1.08);
  box-shadow: 0 3px 12px rgba(44, 44, 44, 0.3);
}

/* مسار الـ input شفاف حتى يظهر الشريط الأخضر */
.price-range-input::-webkit-slider-runnable-track {
  height: 8px;
  background: transparent;
  border-radius: 4px;
}

.price-range-input::-moz-range-track {
  height: 8px;
  background: transparent;
  border-radius: 4px;
}

.price-range-min { z-index: 2; }
.price-range-max { z-index: 3; }

.shop-filter-price {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.shop-filter-input {
  width: 90px;
  padding: 8px 10px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.shop-filter-sep { color: var(--color-text-muted); }

.shop-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.shop-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  min-width: 0;
}

@media (max-width: 480px) {
  .shop-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .shop-toolbar form { min-width: 0; }
  .shop-toolbar .sort-select { width: 100%; max-width: 100%; }
}

.shop-toolbar .sort-select {
  padding: 10px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--color-white);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 80px 24px;
}

.empty-state .icon {
  font-size: 4rem;
  color: var(--color-border);
  margin-bottom: 24px;
}

.empty-state h2 { margin-bottom: 12px; }
.empty-state p {
  color: var(--color-text-muted);
  margin-bottom: 24px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   Mobile & Responsive
   ============================================ */

/* Hamburger & mobile nav */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 102;
  border-radius: var(--radius);
  transition: background var(--transition);
}

.nav-toggle:hover { background: var(--color-bg-alt); }

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-charcoal);
  border-radius: 1px;
  transition: transform var(--transition), opacity var(--transition);
}

body.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

body.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

body.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(44, 44, 44, 0.4);
  z-index: 98;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition), visibility var(--transition);
}

body.nav-open .nav-overlay { pointer-events: auto; }

@media (max-width: 991px) {
  .nav-toggle {
    display: flex;
    background: transparent !important;
    border-radius: 0;
  }

  .nav-toggle:hover,
  .nav-toggle:active,
  .nav-toggle:focus {
    background: transparent !important;
  }

  .nav-main {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 85vw);
    height: 100vh;
    background: var(--color-bg);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 80px 24px 24px;
    gap: 0;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
    z-index: 101;
    transform: translateX(100%);
    transition: transform var(--transition);
    overflow-y: auto;
  }

  [dir="ltr"] .nav-main {
    right: auto;
    left: 0;
    transform: translateX(-100%);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1);
  }

  body.nav-open .nav-main { transform: translateX(0); }

  .nav-main a {
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 1.05rem;
  }

  .nav-main a::after { display: none; }

  .nav-overlay {
    display: block;
  }

  body.nav-open .nav-overlay {
    opacity: 1;
    visibility: visible;
  }

  body.nav-open { overflow: hidden; }
}

/* Mobile: container & spacing */
@media (max-width: 480px) {
  .container { padding: 0 16px; }

  .hero {
    min-height: 70vh;
    padding: 48px 16px 64px;
  }

  .hero h1 { font-size: 1.75rem; }
  .hero p { font-size: 1rem; }

  .section { padding: 48px 0; }
  .section-header { margin-bottom: 32px; }

  .page-header { padding: 32px 0 24px; }
  .page-header h1 { font-size: 1.5rem; }

  .products-grid { gap: 12px; }
  .product-card-body { padding: 14px; }
  .product-card-body h3 { font-size: 0.95rem; }
  .product-card-body .current-price { font-size: 1rem; }

  .categories-grid { gap: 12px; }
  .category-card-overlay { padding: 16px; }
  .category-card h3 { font-size: 1.1rem; }

  .empty-state { padding: 48px 16px; }
  .empty-state .icon { font-size: 3rem; }
}

/* Product card: compact on mobile */
@media (max-width: 991px) {
  .product-card-add-btn {
    padding: 12px 16px;
    font-size: 0.9rem;
  }
}

/* Cart: card layout on mobile instead of table */
@media (max-width: 767px) {
  .cart-page { padding: 32px 0 48px; }

  .cart-table,
  .cart-table thead,
  .cart-table tbody,
  .cart-table tr,
  .cart-table th,
  .cart-table td {
    display: block;
  }

  .cart-table thead { display: none; }

  .cart-table tr {
    padding: 20px 0;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 16px;
    min-width: 0;
  }

  .cart-table td:first-child > div {
    min-width: 0;
    flex-wrap: wrap;
  }

  .cart-table td {
    padding: 10px 0;
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .cart-table td::before {
    content: attr(data-label);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-muted);
    flex-shrink: 0;
  }

  .cart-table td:first-child {
    display: block;
    padding-bottom: 12px;
  }

  .cart-table td:first-child::before,
  .cart-table td[data-label=""]::before { display: none; }

  .cart-table td[data-label=""] { justify-content: flex-end; }

  .cart-item-image {
    width: 80px;
    height: 96px;
  }

  .cart-summary {
    max-width: 100%;
    margin-top: 24px;
    padding: 24px;
  }

  .cart-qty-form {
    flex-wrap: wrap;
  }

  .cart-table .cart-item-image {
    margin-bottom: 8px;
  }
}

/* Checkout mobile */
@media (max-width: 767px) {
  .checkout-page { padding: 32px 0 48px; }
  .checkout-order {
    position: static;
    order: -1;
  }
}

/* Shop layout mobile */
@media (max-width: 1023px) {
  .shop-sidebar { position: static; }
}

/* Shop categories: horizontal scroll on phone only */
@media (max-width: 767px) {
  .shop-layout {
    padding-top: 20px;
    padding-bottom: 40px;
  }

  .shop-sidebar {
    padding: 16px 0 20px;
    background: transparent;
    border-radius: 0;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 20px;
  }

  .shop-sidebar h3 {
    font-size: 0.9rem;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: none;
    font-weight: 600;
    color: var(--color-charcoal);
  }

  .shop-sidebar-list {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 6px;
    margin: 0 -4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .shop-sidebar-list::-webkit-scrollbar {
    display: none;
  }

  .shop-sidebar-list li {
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .shop-sidebar-list a {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--color-cream);
    border: 1.5px solid var(--color-border);
    color: var(--color-charcoal-soft);
    font-size: 0.9rem;
    white-space: nowrap;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
  }

  .shop-sidebar-list a:hover {
    background: var(--color-white);
    border-color: var(--color-sage-light);
    color: var(--color-sage);
  }

  .shop-sidebar-list a.active {
    background: var(--color-sage);
    border-color: var(--color-sage);
    color: var(--color-white);
  }
}

/* Sticky header height on mobile */
@media (max-width: 991px) {
  .header-inner { height: 64px; }
  .logo { font-size: 1.5rem; }
}

/* Prevent horizontal overflow */
html {
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
}

/* Smooth scroll on iOS */
.nav-main,
.site-footer,
.cart-table {
  -webkit-overflow-scrolling: touch;
}

/* Touch-friendly tap targets */
@media (max-width: 991px) {
  .btn { min-height: 44px; }
  .cart-qty button { min-width: 44px; min-height: 44px; }
  .product-card-add-btn { min-height: 44px; }
}
