@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #ED2C0C;
  --primary-hover: #d4270b;
  --primary-light: #FFF0ED;
  --primary-bg: #FFF7F5;
  --dark: #0F0908;
  --dark-80: #3F3836;
  --dark-60: #6F6664;
  --dark-40: #9F9896;
  --dark-20: #CFCBCA;
  --white: #FFFFFF;
  --gray-50: #FAFAFA;
  --gray-100: #F5F5F5;
  --gray-200: #EEEEEE;
  --gray-300: #E0E0E0;
  --gray-400: #BDBDBD;
  --gray-500: #9E9E9E;
  --gray-600: #757575;
  --success: #22C55E;
  --success-bg: #F0FDF4;
  --warning: #F59E0B;
  --warning-bg: #FFFBEB;
  --error: #EF4444;
  --error-bg: #FEF2F2;
  --info: #3B82F6;
  --info-bg: #EFF6FF;

  --shadow-xs: 0 1px 2px rgba(15,9,8,0.04);
  --shadow-sm: 0 1px 3px rgba(15,9,8,0.06), 0 1px 2px rgba(15,9,8,0.04);
  --shadow-md: 0 4px 6px rgba(15,9,8,0.06), 0 2px 4px rgba(15,9,8,0.04);
  --shadow-lg: 0 10px 15px rgba(15,9,8,0.06), 0 4px 6px rgba(15,9,8,0.04);
  --shadow-xl: 0 20px 25px rgba(15,9,8,0.08), 0 8px 10px rgba(15,9,8,0.04);

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  --header-height: 64px;
  --mobile-nav-height: 64px;
  --max-width: 1280px;
  --font: 'Plus Jakarta Sans', -apple-system, system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--dark);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: var(--font); font-size: 15px; }
ul, ol { list-style: none; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ───── Typography ───── */
h1 { font-size: 32px; font-weight: 800; line-height: 1.2; letter-spacing: -0.5px; }
h2 { font-size: 24px; font-weight: 700; line-height: 1.3; letter-spacing: -0.3px; }
h3 { font-size: 20px; font-weight: 700; line-height: 1.3; }
h4 { font-size: 17px; font-weight: 600; line-height: 1.4; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-lg { font-size: 17px; }
.text-xl { font-size: 20px; }
.text-muted { color: var(--dark-60); }
.text-primary { color: var(--primary); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ───── Buttons ───── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  white-space: nowrap;
  line-height: 1.4;
}
.btn-primary {
  background: var(--primary);
  color: var(--white);
}
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
  background: var(--gray-100);
  color: var(--dark);
}
.btn-secondary:hover { background: var(--gray-200); }
.btn-outline {
  background: transparent;
  color: var(--dark);
  border: 1.5px solid var(--gray-300);
}
.btn-outline:hover { border-color: var(--dark); background: var(--gray-50); }
.btn-outline-primary {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline-primary:hover { background: var(--primary); color: var(--white); }
.btn-white {
  background: var(--white);
  color: var(--dark);
  border: 1.5px solid var(--gray-300);
}
.btn-white:hover { border-color: var(--dark-40); box-shadow: var(--shadow-sm); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-icon.sm { width: 32px; height: 32px; }

/* ───── Form Controls ───── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--dark-80);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--dark);
  background: var(--white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(237,44,12,0.1); }
.form-control::placeholder { color: var(--dark-40); }
.form-control.error { border-color: var(--error); }
.form-error { font-size: 13px; color: var(--error); margin-top: 4px; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236F6664' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

/* ───── Cards ───── */
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-body { padding: 16px; }

/* ───── Badges ───── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-full);
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-error { background: var(--error-bg); color: var(--error); }

/* ───── Layout helpers ───── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }
.hidden { display: none !important; }
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }

/* ───── Spacing ───── */
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.p-16 { padding: 16px; }
.p-20 { padding: 20px; }
.p-24 { padding: 24px; }
.py-8 { padding-top: 8px; padding-bottom: 8px; }
.py-16 { padding-top: 16px; padding-bottom: 16px; }
.px-16 { padding-left: 16px; padding-right: 16px; }

/* ───── Header ───── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  height: var(--header-height);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}
.header-logo { flex-shrink: 0; }
.header-logo img { height: 44px; width: auto; }
.header-search {
  flex: 1;
  max-width: 520px;
  position: relative;
}
.header-search input {
  width: 100%;
  padding: 10px 16px 10px 44px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-full);
  font-size: 14px;
  background: var(--gray-50);
  outline: none;
  transition: all 0.15s ease;
}
.header-search input:focus {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(237,44,12,0.08);
}
.header-search i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--dark-40);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.header-categories-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-full);
  background: var(--white);
  cursor: pointer;
  transition: all 0.15s ease;
}
.header-categories-btn:hover {
  border-color: var(--dark-40);
  background: var(--gray-50);
}
.header-categories-btn i { font-size: 18px; }

.cart-btn {
  position: relative;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  transition: background 0.15s ease;
}
.cart-btn:hover { background: var(--gray-100); }
.cart-btn i { font-size: 22px; color: var(--dark); }
.cart-badge {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 18px;
  height: 18px;
  background: var(--primary);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.cart-badge:empty { display: none; }

.user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--gray-300);
  font-size: 14px;
  font-weight: 500;
  color: var(--dark);
  background: var(--white);
  cursor: pointer;
  transition: all 0.15s ease;
}
.user-btn:hover { border-color: var(--dark-40); background: var(--gray-50); }
.user-btn i { font-size: 20px; }

.user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  z-index: 200;
  display: none;
}
.user-menu.show { display: block; }
.user-menu a, .user-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--dark);
  border-radius: var(--radius-sm);
  transition: background 0.1s ease;
}
.user-menu a:hover, .user-menu button:hover { background: var(--gray-100); }
.user-menu .divider { height: 1px; background: var(--gray-200); margin: 6px 0; }
.user-menu i { font-size: 18px; color: var(--dark-60); }

/* ───── Mobile header ───── */
.mobile-header {
  display: none;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 10px 16px;
}
.mobile-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.mobile-header-top .header-logo img { height: 36px; }
.mobile-search {
  position: relative;
}
.mobile-search input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-full);
  font-size: 14px;
  background: var(--gray-50);
  outline: none;
}
.mobile-search input:focus { border-color: var(--primary); background: var(--white); }
.mobile-search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--dark-40);
}

/* ───── Mobile bottom nav ───── */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  padding: 6px 0;
  padding-bottom: max(6px, env(safe-area-inset-bottom));
}
.mobile-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
}
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 500;
  color: var(--dark-60);
  text-decoration: none;
  transition: color 0.15s ease;
  position: relative;
}
.mobile-nav-item.active, .mobile-nav-item:hover { color: var(--primary); }
.mobile-nav-item i { font-size: 22px; }
.mobile-nav-badge {
  position: absolute;
  top: 0;
  right: 4px;
  min-width: 16px;
  height: 16px;
  background: var(--primary);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

/* ───── Footer ───── */
.app-footer {
  background: var(--dark);
  color: var(--white);
  padding: 48px 0 24px;
  margin-top: 64px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand img { height: 40px; margin-bottom: 16px; }
.footer-brand p { color: rgba(255,255,255,0.6); font-size: 14px; line-height: 1.6; }
.footer-col h4 { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 16px; color: rgba(255,255,255,0.4); }
.footer-col a { display: block; padding: 4px 0; font-size: 14px; color: rgba(255,255,255,0.7); transition: color 0.15s ease; }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.6);
  transition: all 0.15s ease;
}
.footer-social a:hover { background: var(--primary); color: var(--white); }
.footer-social a i { font-size: 18px; }

/* ───── Product Card ───── */
.product-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.product-card-img {
  width: 100%;
  aspect-ratio: 1;
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.product-card-img img { width: 75%; height: 75%; object-fit: contain; }
.product-card-img .placeholder-icon { font-size: 48px; color: var(--gray-400); }
.product-card-body {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-card .product-line {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 4px;
}
.product-card .product-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--dark);
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card .product-weight {
  font-size: 12px;
  color: var(--dark-40);
  margin-bottom: 8px;
}
.product-card .product-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}
.product-card .product-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--dark);
}
.product-card .product-price .currency { font-size: 13px; font-weight: 600; }
.product-add-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.product-add-btn:hover { background: var(--primary-hover); transform: scale(1.08); }
.product-add-btn i { font-size: 20px; }

.product-card.out-of-stock .product-card-img img,
.product-card.out-of-stock .product-card-img .placeholder-icon { filter: grayscale(100%); opacity: 0.6; }
.product-card.out-of-stock:hover { transform: none; box-shadow: none; }
.out-of-stock-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--dark-80);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  z-index: 2;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.product-add-btn:disabled,
.product-add-btn.disabled {
  background: var(--gray-300);
  cursor: not-allowed;
  pointer-events: none;
}
.product-add-btn:disabled:hover,
.product-add-btn.disabled:hover { transform: none; }

.product-qty-control {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.product-qty-control button {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--primary);
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  transition: background 0.1s ease;
}
.product-qty-control button:hover { background: var(--primary-light); }
.product-qty-control span {
  min-width: 28px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
}

/* ───── Category pill/icon ───── */
.category-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0;
  scrollbar-width: none;
}
.category-scroll::-webkit-scrollbar { display: none; }
.category-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 80px;
  padding: 12px 8px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  scroll-snap-align: start;
  text-align: center;
}
.category-pill:hover { background: var(--primary-light); }
.category-pill.active { background: var(--primary); color: var(--white); }
.category-pill .cat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: all 0.15s ease;
}
.category-pill.active .cat-icon { background: rgba(255,255,255,0.2); color: var(--white); }
.category-pill .cat-name { font-size: 12px; font-weight: 600; line-height: 1.2; }

/* ───── Section ───── */
.section { padding: 32px 0; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-header h2 { font-size: 22px; }
.section-header a {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
}
.section-header a:hover { text-decoration: underline; }
.section-header a i { font-size: 16px; }

/* ───── Banner/Hero ───── */
.hero-banner {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--primary);
  color: var(--white);
}
.hero-slider { position: relative; }
.hero-slide {
  display: none;
  padding: 48px 40px;
  min-height: 280px;
  position: relative;
}
.hero-slide.active { display: flex; }
.hero-slide-content { position: relative; z-index: 2; max-width: 50%; }
.hero-slide-content .hero-tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(255,255,255,0.2);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}
.hero-slide-content h1 {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 12px;
}
.hero-slide-content p {
  font-size: 15px;
  opacity: 0.85;
  margin-bottom: 20px;
  line-height: 1.5;
}
.hero-slide-content .btn {
  background: var(--white);
  color: var(--primary);
  font-weight: 700;
}
.hero-slide-content .btn:hover { background: var(--gray-100); }
.hero-slide-img {
  position: absolute;
  right: 40px;
  bottom: 0;
  height: 100%;
  width: 40%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.hero-slide-img img { max-height: 90%; object-fit: contain; }
.hero-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 16px;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}
.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all 0.2s ease;
}
.hero-dot.active { width: 24px; background: var(--white); }
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
}
.hero-arrow:hover { background: rgba(255,255,255,0.4); }
.hero-arrow.prev { left: 16px; }
.hero-arrow.next { right: 16px; }
.hero-arrow i { font-size: 20px; }

/* ───── Horizontal product scroll ───── */
.products-scroll-wrap { position: relative; }
.products-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0 8px;
  scrollbar-width: none;
}
.products-scroll::-webkit-scrollbar { display: none; }
.products-scroll.auto-scroll { scroll-snap-type: none; }
.products-scroll .product-card {
  min-width: 180px;
  max-width: 200px;
  scroll-snap-align: start;
  flex-shrink: 0;
}
.scroll-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--white);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.scroll-arrow:hover { box-shadow: var(--shadow-lg); }
.scroll-arrow.prev { left: -16px; }
.scroll-arrow.next { right: -16px; }
.scroll-arrow i { font-size: 18px; color: var(--dark); }

/* ───── Value prop banner ───── */
.value-props {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 24px 0;
}
.value-prop {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--gray-50);
  border-radius: var(--radius-md);
}
.value-prop-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.value-prop-icon i { font-size: 22px; }
.value-prop-text h4 { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.value-prop-text p { font-size: 12px; color: var(--dark-60); }

/* ───── Cart sidebar ───── */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,9,8,0.4);
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.cart-overlay.open { opacity: 1; visibility: visible; }
.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  max-width: 100%;
  height: 100%;
  background: var(--white);
  z-index: 301;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}
.cart-sidebar.open { transform: translateX(0); }
.cart-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
}
.cart-sidebar-header h3 { font-size: 18px; }
.cart-sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}
.cart-sidebar-footer {
  border-top: 1px solid var(--gray-200);
  padding: 16px 20px;
}
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  text-align: center;
}
.cart-empty i { font-size: 56px; color: var(--gray-300); margin-bottom: 16px; }
.cart-empty h4 { margin-bottom: 8px; color: var(--dark-60); }
.cart-empty p { font-size: 14px; color: var(--dark-40); }

.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
}
.cart-item-img {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: contain; }
.cart-item-img i { font-size: 28px; color: var(--gray-400); }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 14px; font-weight: 500; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-item-price { font-size: 15px; font-weight: 700; }
.cart-item-actions { display: flex; align-items: center; gap: 4px; margin-top: 6px; }
.cart-item-remove { font-size: 12px; color: var(--dark-40); cursor: pointer; margin-left: 8px; }
.cart-item-remove:hover { color: var(--error); }

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 14px;
}
.cart-summary-row.total { font-size: 18px; font-weight: 800; padding-top: 12px; border-top: 1px solid var(--gray-200); margin-top: 8px; }
.delivery-note { font-size: 12px; color: var(--dark-40); margin-top: 4px; }
.free-delivery-badge { color: var(--success); font-weight: 600; }

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

/* ───── Breadcrumb ───── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 0;
  font-size: 14px;
  color: var(--dark-60);
}
.breadcrumb a { color: var(--dark-60); transition: color 0.1s; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb i { font-size: 14px; }
.breadcrumb .current { color: var(--dark); font-weight: 600; }

/* ───── Categories dropdown ───── */
.categories-dropdown {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-lg);
  z-index: 99;
  padding: 24px 0;
  display: none;
}
.categories-dropdown.show { display: block; }
.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.category-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.1s ease;
}
.category-link:hover { background: var(--primary-light); color: var(--primary); }
.category-link i { font-size: 22px; color: var(--dark-40); }
.category-link:hover i { color: var(--primary); }

/* ───── Search results ───── */
.search-results-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 400px;
  overflow-y: auto;
  z-index: 200;
  display: none;
}
.search-results-dropdown.show { display: block; }
.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.1s ease;
}
.search-result-item:hover { background: var(--gray-50); }
.search-result-item img { width: 40px; height: 40px; object-fit: contain; border-radius: var(--radius-xs); }
.search-result-item .sr-placeholder { width: 40px; height: 40px; background: var(--gray-100); border-radius: var(--radius-xs); display: flex; align-items: center; justify-content: center; }
.search-result-item .sr-placeholder i { font-size: 20px; color: var(--gray-400); }
.search-result-item .sr-info { flex: 1; }
.search-result-item .sr-name { font-size: 14px; font-weight: 500; }
.search-result-item .sr-price { font-size: 14px; font-weight: 700; color: var(--primary); }

/* ───── Toast ───── */
.toast-container {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--dark);
  color: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  font-weight: 500;
  animation: toast-in 0.3s ease;
  max-width: 320px;
}
.toast i { font-size: 20px; }
.toast.success i { color: var(--success); }
.toast.error i { color: var(--error); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ───── Loading skeleton ───── */
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ───── Auth pages ───── */
.auth-page {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  box-shadow: var(--shadow-sm);
}
.auth-card .auth-logo { text-align: center; margin-bottom: 32px; }
.auth-card .auth-logo img { height: 40px; margin: 0 auto; }
.auth-card h2 { text-align: center; margin-bottom: 8px; }
.auth-card .auth-subtitle { text-align: center; color: var(--dark-60); font-size: 14px; margin-bottom: 28px; }
.auth-card .auth-footer { text-align: center; margin-top: 24px; font-size: 14px; color: var(--dark-60); }
.auth-card .auth-footer a { color: var(--primary); font-weight: 600; }
.auth-card .auth-footer a:hover { text-decoration: underline; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: var(--dark-40);
  font-size: 13px;
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--gray-200); }

.user-type-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.user-type-option {
  padding: 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.user-type-option:hover { border-color: var(--dark-20); }
.user-type-option.selected { border-color: var(--primary); background: var(--primary-light); }
.user-type-option i { font-size: 28px; color: var(--dark-40); margin-bottom: 8px; display: block; }
.user-type-option.selected i { color: var(--primary); }
.user-type-option h4 { font-size: 14px; margin-bottom: 2px; }
.user-type-option p { font-size: 12px; color: var(--dark-60); }

/* ───── Responsive ───── */
@media (max-width: 1024px) {
  .products-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .value-props { grid-template-columns: repeat(2, 1fr); }
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-slide { padding: 32px 28px; min-height: 240px; }
  .hero-slide-content h1 { font-size: 28px; }
}

@media (max-width: 768px) {
  .app-header { display: none; }
  .mobile-header { display: block; }
  .mobile-nav { display: block; }
  body { padding-bottom: var(--mobile-nav-height); }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .value-props { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-slide { padding: 24px 20px; min-height: 200px; }
  .hero-slide-content { max-width: 65%; }
  .hero-slide-content h1 { font-size: 22px; }
  .hero-slide-content p { font-size: 13px; }
  .hero-slide-img { width: 35%; right: 10px; }
  .hero-arrow { display: none; }
  .section-header h2 { font-size: 18px; }
  .cart-sidebar { width: 100%; }
  h1 { font-size: 24px; }
  h2 { font-size: 20px; }
  .container { padding: 0 16px; }
  .scroll-arrow { display: none; }
  .products-scroll .product-card { min-width: 155px; max-width: 170px; }
  .auth-card { padding: 28px 20px; border: none; box-shadow: none; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .breadcrumb { font-size: 13px; padding: 12px 0; }
}

@media (max-width: 480px) {
  .hero-slide-content { max-width: 100%; }
  .hero-slide-img { display: none; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .product-card-body { padding: 8px; }
  .product-card .product-price { font-size: 16px; }
  .product-add-btn { width: 32px; height: 32px; }
  .product-add-btn i { font-size: 18px; }
  .value-prop { padding: 12px; }
  body { padding-bottom: 120px; }
}

/* Floating Cart Bar (mobile) */
.floating-cart-bar {
  display: none;
  position: fixed;
  bottom: 70px;
  left: 12px;
  right: 12px;
  background: var(--primary);
  color: #fff;
  padding: 12px 16px;
  border-radius: 14px;
  align-items: center;
  justify-content: space-between;
  z-index: 999;
  box-shadow: 0 4px 20px rgba(237, 44, 12, 0.35);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  gap: 8px;
}
.fcb-count { opacity: 0.9; font-weight: 400; }
.fcb-total { flex: 1; text-align: center; font-size: 16px; }
.fcb-btn { background: rgba(255,255,255,0.2); padding: 6px 14px; border-radius: 8px; font-size: 13px; white-space: nowrap; }
@media (min-width: 769px) { .floating-cart-bar { display: none !important; } }

/* Reorder Card */
.reorder-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #f8f4f0 0%, #fff 100%);
  border: 1px solid var(--gray-100);
  border-radius: 14px;
  padding: 16px 20px;
  gap: 16px;
}
.reorder-info h3 { margin: 0 0 4px; font-size: 15px; color: var(--dark); }
.reorder-info p { margin: 0; font-size: 13px; color: var(--gray-400); }
@media (max-width: 480px) {
  .reorder-card { flex-direction: column; align-items: stretch; text-align: center; }
  .reorder-card .btn { width: 100%; }
}
