*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #D31E24;
  --primary-dark: #B0181E;
  --primary-light: #FFF0F0;
  --header-red: #D31E24;
  --brand-red: #D31E24;
  --primary-glow: rgba(211, 30, 36, 0.28);
  --accent: #6366F1;
  --accent-soft: #EEF2FF;
  --bg: #F4F6FA;
  --bg-soft: #EEF1F7;
  --surface: #FFFFFF;
  --text: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --border: rgba(15, 23, 42, 0.08);
  --border-light: #F1F5F9;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 48px -12px rgba(15, 23, 42, 0.18);
  --shadow-card: 0 4px 20px rgba(15, 23, 42, 0.06);
  --radius: 14px;
  --radius-lg: 18px;
  --radius-xl: 28px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --nav-h: 72px;
  --header-h: 72px;
  --promo-h: 40px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --page-max: 1280px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --gradient-primary: linear-gradient(135deg, #D31E24 0%, #E8353B 50%, #F04A50 100%);
  --gradient-dark: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  --gradient-hero: linear-gradient(135deg, rgba(15,23,42,0.15) 0%, rgba(15,23,42,0.82) 100%);
}

html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }

body {
  font-family: var(--font);
  background: #F5F5F5;
  color: var(--text);
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom));
  line-height: 1.5;
}

.mobile-only { display: flex; }
.desktop-only { display: none !important; }

/* ── Promo bar ── */
.promo-bar {
  background: #000;
  color: #fff;
  text-align: center;
  padding: 10px 44px 10px 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.promo-bar.hidden { display: none; }

.promo-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  animation: promoShine 4s ease-in-out infinite;
}

@keyframes promoShine {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}

.promo-text {
  position: relative;
  z-index: 1;
  flex: 1;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 639px) {
  .promo-bar {
    font-size: 11px;
    padding: 8px 40px 8px 10px;
  }

  .promo-text {
    white-space: normal;
    text-overflow: unset;
    overflow: visible;
  }
}

.promo-close-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: var(--transition);
}

.promo-close-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.4);
}

/* ── Header ── */
.store-header {
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-red);
  box-shadow: 0 4px 16px rgba(211, 30, 36, 0.35);
}

.header-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  width: 100%;
}

.header-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

.header-brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #fff;
  min-width: 0;
  max-width: 46%;
}

.header-brand.has-logo {
  max-width: 52%;
}

.header-brand.has-logo .header-brand-text {
  display: flex;
}

.header-brand.has-logo .header-logo-img {
  width: auto;
  max-width: 52px;
  height: 38px;
  max-height: 38px;
  object-fit: contain;
  object-position: left center;
  flex-shrink: 0;
}

.header-brand:not(.has-logo) .header-logo-img {
  display: none !important;
}

.header-brand:not(.has-logo) .header-brand-text {
  display: flex;
}

.header-logo-img {
  width: auto;
  height: 48px;
  max-height: 48px;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
  border: none;
  filter: none;
  flex-shrink: 0;
}

.header-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  align-items: center;
}

.header-store-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.1;
  max-width: 100%;
  text-align: center;
}

.header-tagline {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.02em;
  margin-top: 2px;
  line-height: 1.15;
  max-width: 100%;
  text-align: center;
}

.header-search-wrap {
  flex: 1;
  min-width: 0;
}

.header-search-wrap .search-bar-h {
  height: 40px;
  padding: 0 12px 0 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-search-wrap .search-bar-h input {
  font-size: 13px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.header-menu-btn {
  display: flex !important;
}

/* Mobile: menu + logo + cart/more on top, centered search below */
@media (max-width: 991px) {
  .header-row {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    grid-template-rows: auto auto;
    gap: 10px 10px;
    padding: 10px 12px 12px;
    align-items: center;
  }

  .header-brand {
    grid-column: 2;
    grid-row: 1;
    max-width: 100% !important;
    width: 100%;
    justify-content: center;
    gap: 10px;
    display: flex !important;
  }

  .header-brand .header-brand-text {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .header-brand:not(.has-logo) {
    display: flex !important;
  }

  .header-brand.has-logo {
    max-width: 100% !important;
  }

  .header-brand.has-logo .header-logo-img {
    width: auto;
    max-width: 48px;
    height: 36px;
    max-height: 36px;
    object-fit: contain;
    object-position: center;
  }

  .header-store-name {
    font-size: 18px;
    letter-spacing: 0.05em;
    text-align: center;
    max-width: 100%;
  }

  .header-tagline {
    font-size: 10px;
    font-weight: 700;
    margin-top: 2px;
    text-align: center;
    max-width: 100%;
    letter-spacing: 0.03em;
  }

  .header-search-wrap {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-width: 0;
  }

  .header-search-wrap .search-bar-h {
    height: 42px;
    width: min(100%, 680px);
    margin: 0 auto;
  }

  .header-actions {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
    gap: 6px;
  }

  .header-menu-left-btn {
    grid-column: 1;
    grid-row: 1;
  }

  .header-more-btn {
    display: flex !important;
  }

  .header-icon-btn {
    width: 46px;
    height: 46px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 12px;
  }

  .header-actions .header-icon-btn svg {
    width: 24px;
    height: 24px;
  }
}

.header-icon-btn {
  background: transparent;
  border: none;
  color: #fff;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 10px;
  transition: var(--transition);
  flex-shrink: 0;
}

.header-icon-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.header-desktop-nav { display: none; align-items: center; gap: 4px; }

.header-nav-link {
  background: transparent;
  border: none;
  color: #fff;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.header-nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
}

.header-nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.cart-wrap-h {
  position: relative;
  display: inline-flex;
}

.cart-btn {
  position: relative;
}

.cart-badge-h {
  position: absolute;
  top: -6px;
  right: -6px;
  background: linear-gradient(135deg, #1D4ED8 0%, #2563EB 50%, #3B82F6 100%);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
  z-index: 2;
  pointer-events: none;
}

.search-wrap-h { display: none; }

/* ── Mobile sidebar (3-dot menu) ── */
.store-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 400;
  backdrop-filter: blur(3px);
}

.store-sidebar-overlay.open {
  display: block;
}

.store-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(300px, 88vw);
  background: var(--surface);
  box-shadow: -8px 0 32px rgba(15, 23, 42, 0.2);
  display: flex;
  flex-direction: column;
  z-index: 401;
  animation: sidebarSlideIn 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

@keyframes sidebarSlideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.store-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--header-red);
  color: #fff;
}

.store-sidebar-head strong {
  font-size: 16px;
  font-weight: 700;
}

.store-sidebar-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.store-sidebar-nav {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.store-sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
  font-family: var(--font);
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
}

.store-sidebar-link:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.store-sidebar-link-icon {
  font-size: 22px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-radius: 10px;
  flex-shrink: 0;
}

.store-sidebar-link-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.store-sidebar-link-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.store-sidebar-link-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Subpages (categories / brands) ── */
.store-subpage {
  padding: 0 0 24px;
}

.store-subpage.hidden {
  display: none !important;
}

#home-page.hidden {
  display: none !important;
}

.subpage-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 8px;
}

.subpage-back {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  color: var(--text);
  flex-shrink: 0;
}

.subpage-head .section-title {
  margin: 0;
}

.subpage-head .section-title::after {
  display: none;
}

.subpage-head .section-sub {
  margin-top: 4px;
}

.btn-view-all {
  font-size: 12px;
  padding: 8px 14px;
}

#cat-grid-full,
#brand-grid-full {
  padding: 8px 16px 24px;
}

.search-bar-h {
  display: flex;
  align-items: center;
  background: #fff;
  border: none;
  border-radius: 999px;
  padding: 0 16px 0 18px;
  gap: 10px;
  height: 46px;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.search-bar-h:focus-within {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12), 0 0 0 3px rgba(255, 255, 255, 0.35);
}

.search-bar-h input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  background: transparent;
  min-width: 0;
}

.search-bar-h input::placeholder {
  color: #9CA3AF;
}

.search-bar-h .search-icon-right {
  color: #111827;
  flex-shrink: 0;
}

/* ── Main ── */
.store-main {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
}

/* ── Hero ── */
.hero-section { padding: 20px 16px 0; }

.hero-slider {
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #0F172A;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,0.08);
}

.hero-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide {
  min-width: 100%;
  height: 220px;
  display: flex;
  align-items: flex-end;
  padding: 28px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.hero-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
}

.hero-slide-content {
  position: relative;
  z-index: 1;
  color: #fff;
  max-width: 420px;
}

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-slide-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
  line-height: 1.15;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.hero-shop-btn {
  background: #fff;
  color: var(--text);
  border: none;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font);
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.hero-shop-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 14px 0 4px;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--border);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: var(--transition);
}

.hero-dot.active {
  background: var(--gradient-primary);
  width: 28px;
  box-shadow: 0 2px 8px var(--primary-glow);
}

/* ── Trust strip ── */
.trust-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 24px 16px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.trust-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: rgba(225, 29, 72, 0.15);
}

.trust-icon {
  font-size: 22px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  border-radius: 12px;
  flex-shrink: 0;
}

.trust-item strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.trust-item small {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Sections ── */
.store-section { padding: 12px 0 28px; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 16px 14px;
  gap: 12px;
}

.section-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 99px;
  margin-top: 8px;
}

.section-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
  line-height: 1.4;
}

.prod-count-label { font-size: inherit; }

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--primary-glow);
  filter: brightness(1.05);
}

.btn-outline {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* ── Categories ── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 0 16px;
}

.cat-grid-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
}

.cat-grid-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(15, 23, 42, 0.14);
}

.cat-grid-item.active {
  border-color: var(--text);
  box-shadow: var(--shadow);
}

.cat-grid-img {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  background: var(--border-light);
}

.cat-grid-img.has-photo { padding: 0; }

.cat-grid-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cat-grid-label {
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  padding: 10px 6px;
  color: var(--text-secondary);
  line-height: 1.3;
}

.cat-grid-item.active .cat-grid-label { color: var(--text); font-weight: 700; }

/* ── Brands ── */
.brand-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 0 16px 4px;
  scrollbar-width: none;
}

.brand-row::-webkit-scrollbar { display: none; }

.brand-chip {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  width: 80px;
}

.brand-chip-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  padding: 6px;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
}

.brand-chip:hover .brand-chip-circle {
  border-color: var(--primary);
  box-shadow: 0 8px 24px var(--primary-glow);
  transform: scale(1.08);
}

.brand-chip.active .brand-chip-circle {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.brand-chip-circle.has-photo { padding: 4px; overflow: hidden; }

.brand-chip-photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.brand-chip-name {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80px;
}

/* ── Products (compact — categories/brands/hero unchanged) ── */
.products-wrap { padding: 0 16px; }

.products-load-more {
  text-align: center;
  padding: 16px 16px 32px;
}

.products-load-sentinel {
  width: 100%;
  height: 1px;
  margin: 0;
}

.products-load-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
}

.fs-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(211, 30, 36, 0.18);
  border-top-color: var(--brand-red);
  border-radius: 50%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.fs-spinner.is-active {
  opacity: 1;
  visibility: visible;
  animation: fsSpin 0.7s linear infinite;
}

@keyframes fsSpin {
  to { transform: rotate(360deg); }
}

.products-load-status {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  font-weight: 500;
}

.products-load-more.is-loading .products-load-status {
  color: var(--brand-red);
  font-weight: 600;
}

.products-grid-h {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.prod-card-h {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}

.prod-card-h:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
  border-color: rgba(225, 29, 72, 0.12);
}

.prod-img-wrap {
  position: relative;
  overflow: hidden;
}

.prod-img-h {
  width: 100%;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #FAFBFC 0%, #fff 100%);
  font-size: 24px;
}

.prod-img-h img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 6px;
  display: block;
  image-rendering: auto;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: none !important;
}

.prod-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 3;
  background: linear-gradient(135deg, #10B981, #059669);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.prod-badge.out { background: var(--text-muted); }

.prod-body-h {
  padding: 8px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.prod-name-h {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.prod-meta {
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 2px;
}

.prod-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 6px;
  gap: 6px;
  min-width: 0;
}

.prod-price-h {
  font-size: 12px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
  flex-shrink: 0;
  min-width: 0;
}

.prod-add-btn {
  flex-shrink: 0;
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  transition: var(--transition);
  white-space: nowrap;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.prod-add-btn:hover {
  transform: scale(1.04);
  filter: brightness(1.05);
}
.prod-add-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.prod-qty-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--primary-light);
  border-radius: 999px;
  padding: 2px 4px;
  flex-shrink: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.prod-qty-row .qty-btn {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 50%;
  font-size: 15px;
  padding: 0;
  line-height: 1;
  border: none;
  background: #fff;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.prod-qty-row .qty-val {
  min-width: 20px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.prod-add-btn.added { background: #10B981; }

/* Skeleton loading */
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  grid-column: 1 / -1;
}

.skeleton-card {
  height: 150px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--border-light) 25%, var(--border) 50%, var(--border-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Bottom nav ── */
.bottom-nav-h {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: 10px 8px calc(10px + var(--safe-bottom));
  z-index: 90;
  box-shadow: 0 -8px 32px rgba(15,23,42,0.08);
}

.nav-h-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font);
  padding: 6px 8px;
  min-width: 0;
  flex: 1;
  max-width: 88px;
  transition: var(--transition);
  border-radius: 14px;
}

.nav-icon-cart {
  position: relative;
}

.nav-cart-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--header-red);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  display: none;
}

.nav-cart-badge.show {
  display: block;
}

.nav-h-item.active .nav-cart-badge {
  background: #fff;
  color: var(--header-red);
}

.nav-h-item.active {
  color: #fff;
  background: var(--header-red);
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  transition: var(--transition);
}

.nav-h-item.active .nav-icon svg {
  stroke: #fff;
}

/* ── PWA install popup ── */
body.pwa-modal-open {
  overflow: hidden;
}

.pwa-install-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
}

.pwa-install-modal.hidden {
  display: none;
}

.pwa-install-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
}

.pwa-install-popup {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 360px;
  background: #fff;
  border-radius: 20px;
  padding: 28px 22px 22px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  animation: pwaPopupIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes pwaPopupIn {
  from { transform: translateY(20px) scale(0.96); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.pwa-install-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--border-light);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-secondary);
}

.pwa-install-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.pwa-install-logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.pwa-install-heading {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
}

.pwa-install-desc {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-muted);
}

.pwa-ios-steps {
  margin: 0 0 18px;
  padding: 12px 14px 12px 30px;
  text-align: left;
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}

.pwa-ios-steps.hidden {
  display: none;
}

.pwa-ios-steps li {
  margin: 0 0 8px;
}

.pwa-ios-steps li:last-child {
  margin-bottom: 0;
}

.pwa-install-btn {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, #D31E24 0%, #B91C1C 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(211, 30, 36, 0.35);
}

.pwa-install-btn:hover {
  filter: brightness(1.05);
}

.pwa-install-later {
  display: block;
  width: 100%;
  margin-top: 10px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  padding: 8px;
}

/* ── Auth ── */
#shop-view.hidden { display: none !important; }

#account-view {
  display: none;
  padding: 24px 16px 48px;
  min-height: 60vh;
}

#account-view.active { display: block; padding-bottom: calc(var(--nav-h) + 16px + var(--safe-bottom)); }

/* ── Mobile cart page ── */
.cart-page-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 85;
  background: var(--bg);
  overflow-y: auto;
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom));
}

.cart-page-overlay.open { display: block; }

.cart-page-panel {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.cart-page-head {
  position: sticky;
  top: 0;
  z-index: 2;
}

.cart-page-body {
  flex: 1;
  padding: 0 16px 16px;
}

.cart-page-items {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 4px 16px;
  box-shadow: var(--shadow-card);
}

.cart-page-empty {
  display: none;
  text-align: center;
  padding: 48px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.cart-page-empty.show { display: block; }

.cart-page-empty-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
}

.cart-page-empty p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 16px;
}

.cart-page-foot {
  padding: 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: calc(var(--nav-h) + var(--safe-bottom));
  z-index: 2;
}

.cart-page-foot.hidden { display: none; }

@media (min-width: 992px) {
  .cart-page-overlay { display: none !important; }
}

.auth-wrap {
  max-width: 440px;
  margin: 0 auto;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.auth-header { text-align: center; margin-bottom: 24px; }

.auth-icon {
  width: 64px;
  height: 64px;
  background: var(--primary-light);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 16px;
  box-shadow: inset 0 0 0 1px rgba(225, 29, 72, 0.1);
}

.auth-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.auth-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.5;
}

.auth-tabs-h {
  display: flex;
  background: var(--bg-soft);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 24px;
}

.auth-tab-h {
  flex: 1;
  border: none;
  background: transparent;
  padding: 11px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font);
  color: var(--text-muted);
  transition: var(--transition);
}

.auth-tab-h.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.auth-form-h { display: none; }
.auth-form-h.active { display: block; }

.form-grp { margin-bottom: 14px; }

.form-lbl {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-inp {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: var(--font);
  background: var(--surface);
  transition: var(--transition);
}

.form-inp:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.auth-btn-h { margin-top: 6px; }

.auth-err {
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  margin-top: 10px;
  min-height: 16px;
  text-align: center;
}

/* ── Cart ── */
.overlay-h {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: flex-end;
}

.overlay-h.open { display: flex; }

.cart-sheet-h {
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 -16px 48px rgba(15,23,42,0.12);
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.cart-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 20px 0;
}

.cart-title-h {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cart-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.cart-close-btn {
  background: var(--border-light);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-secondary);
  line-height: 1;
}

.cart-handle-h {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 99px;
  margin: 12px auto 0;
}

.cart-items-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.cart-item-img {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  background: var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  overflow: hidden;
}

.cart-item-img img { width: 100%; height: 100%; object-fit: contain; padding: 4px; background: #fff; }

.cart-item-info { flex: 1; min-width: 0; }

.cart-item-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 2px;
}

.cart-item-calc {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.cart-x {
  color: var(--text-muted);
  font-weight: 500;
  margin: 0 1px;
}

.cart-item-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.cart-qty-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
}

.qty-btn:hover { border-color: var(--primary); color: var(--primary); }

.qty-val {
  font-size: 13px;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}

.qty-inp {
  width: 44px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 6px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font);
  color: var(--text);
  padding: 0 4px;
  -moz-appearance: textfield;
}

.qty-inp::-webkit-outer-spin-button,
.qty-inp::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qty-inp:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  align-self: flex-start;
}

.cart-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.cart-empty-icon { font-size: 48px; margin-bottom: 12px; }

.cart-footer {
  padding: 16px 20px calc(16px + var(--safe-bottom));
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.cart-total-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--text-secondary);
}

.cart-total-box strong {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.checkout-btn-h { margin-bottom: 8px; }

.continue-btn-h { width: 100%; }

/* ── Footer ── */
.store-footer {
  background: var(--gradient-dark);
  color: rgba(255,255,255,0.85);
  padding: 40px 16px calc(40px + var(--nav-h));
  margin-top: 32px;
  position: relative;
  overflow: hidden;
}

.store-footer::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(circle, rgba(225, 29, 72, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.footer-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-left {
  flex: 1;
  min-width: 200px;
}

.footer-brand strong {
  font-size: 16px;
  color: #fff;
}

.footer-brand p {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  margin-top: 4px;
}

.footer-links {
  display: flex;
  gap: 16px;
  margin: 20px 0 0;
  flex-wrap: wrap;
}

.footer-links button {
  background: none;
  border: none;
  color: rgba(255,255,255,0.75);
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  padding: 0;
}

.footer-links button:hover { color: #fff; }

.footer-contact {
  flex-shrink: 0;
  text-align: right;
  max-width: 320px;
  margin-left: auto;
}

.footer-contact-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.55);
  margin-bottom: 10px;
}

.footer-address-line {
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  line-height: 1.6;
  margin: 0 0 4px;
}

.footer-copy {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* ── Toast ── */
.toast-h {
  position: fixed;
  bottom: calc(var(--nav-h) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--gradient-dark);
  color: #fff;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  z-index: 300;
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
}

.toast-h.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.empty-h {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

.empty-h div { font-size: 40px; margin-bottom: 10px; }

/* ── Mobile product cards ── */
@media (max-width: 639px) {
  .products-wrap { padding: 0 10px; }

  .products-grid-h,
  .skeleton-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .prod-card-h {
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
  }

  .prod-card-h:hover {
    transform: none;
  }

  .prod-img-h {
    height: auto;
    aspect-ratio: 1;
    max-height: 92px;
    font-size: 22px;
  }

  .prod-img-h img {
    padding: 4px;
  }

  .prod-badge {
    top: 4px;
    left: 4px;
    font-size: 7px;
    padding: 1px 5px;
  }

  .prod-body-h {
    padding: 7px 8px 9px;
  }

  .prod-name-h {
    font-size: 11px;
    line-height: 1.25;
  }

  .prod-meta {
    font-size: 9px;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .prod-price-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding-top: 6px;
    margin-top: 2px;
  }

  .prod-price-h {
    font-size: 12px;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .prod-add-btn {
    width: auto;
    min-width: 48px;
    padding: 5px 10px;
    font-size: 10px;
    border-radius: 8px;
    box-shadow: none;
  }

  .prod-qty-row {
    display: inline-flex;
    width: auto;
    flex-shrink: 0;
    justify-content: center;
    align-items: center;
    gap: 2px;
    padding: 2px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid rgba(211, 30, 36, 0.18);
  }

  .prod-qty-row .qty-btn {
    width: 26px;
    height: 26px;
    min-width: 26px;
    font-size: 15px;
    border-radius: 6px;
    background: var(--primary-light);
    box-shadow: none;
  }

  .prod-qty-row .qty-val {
    flex: 0 0 20px;
    min-width: 20px;
    font-size: 12px;
  }

  .skeleton-card {
    height: 168px;
  }
}

/* ── Tablet ── */
@media (min-width: 640px) {
  .trust-strip { grid-template-columns: repeat(4, 1fr); }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .products-grid-h, .skeleton-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .prod-img-h { height: 100px; }
  .hero-slide { height: 260px; }
  .hero-slide-title { font-size: 28px; }
}

/* ── Desktop ── */
@media (min-width: 992px) {
  body { padding-bottom: 0; }
  .mobile-only { display: none !important; }
  .desktop-only { display: flex !important; }

  .promo-bar { font-size: 13px; }

  .header-row { padding: 10px 24px; gap: 14px; }
  .header-brand { max-width: 280px; display: flex !important; }
  .header-brand .header-brand-text {
    display: flex !important;
  }
  .header-brand.has-logo { max-width: 300px; }
  .header-brand.has-logo .header-logo-img { height: 44px; max-height: 44px; max-width: 64px; }
  .header-store-name { font-size: 22px; letter-spacing: 0.05em; }
  .header-tagline { font-size: 12px; font-weight: 700; }
  .header-search-wrap .search-bar-h { height: 44px; max-width: 560px; margin: 0 auto; }
  .header-search-wrap .search-bar-h input { font-size: 14px; }
  .header-icon-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
  }

  .hero-section { padding: 24px 24px 0; }
  .hero-slide { height: 340px; padding: 40px; }
  .hero-slide-title { font-size: 36px; }

  .trust-strip { padding: 24px; gap: 16px; }
  .section-head { padding: 0 24px 16px; }
  .section-title { font-size: 24px; }

  .cat-grid {
    grid-template-columns: repeat(6, 1fr);
    padding: 0 24px;
    gap: 16px;
  }

  .brand-row { padding: 0 24px 8px; gap: 16px; }
  .brand-chip { width: 96px; }
  .brand-chip-circle { width: 84px; height: 84px; }

  .products-wrap { padding: 0 24px; }
  .products-grid-h, .skeleton-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
  }

  .prod-img-h { height: 110px; }
  .prod-name-h { font-size: 12px; }
  .prod-price-h { font-size: 13px; }
  .prod-add-btn { padding: 6px 10px; font-size: 11px; }

  .store-footer { padding-bottom: 32px; }

  .overlay-h.open { align-items: stretch; justify-content: flex-end; }

  .cart-sheet-h {
    width: 440px;
    max-height: 100vh;
    border-radius: 0;
    animation: slideInRight 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  @keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
  }

  .toast-h { bottom: 24px; }
}

@media (min-width: 1200px) {
  .products-grid-h, .skeleton-grid { grid-template-columns: repeat(6, 1fr); }
  .prod-img-h { height: 120px; }
  .hero-slide { height: 380px; }
}

/* ── Checkout ── */
.checkout-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 250;
  background: var(--bg);
  overflow-y: auto;
}

.checkout-overlay.open { display: block; }

.checkout-panel {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.checkout-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: var(--shadow-sm);
}

.checkout-back {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  color: var(--text);
}

.checkout-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.checkout-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.checkout-body {
  flex: 1;
  padding: 16px;
}

.checkout-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
}

.checkout-section-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.checkout-section-title .optional {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 12px;
}

.checkout-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.checkout-item:last-child { border-bottom: none; }

.checkout-item-img {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  background: var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  font-size: 28px;
}

.checkout-item-img img { width: 100%; height: 100%; object-fit: contain; padding: 4px; background: #fff; }

.checkout-item-info { flex: 1; min-width: 0; }

.checkout-item-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 4px;
}

.checkout-item-unit {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.checkout-item-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.checkout-item-calc {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.checkout-x {
  color: var(--text-muted);
  font-weight: 500;
  margin: 0 2px;
}

.checkout-item-line {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
}

.checkout-note {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  font-family: var(--font);
  font-size: 14px;
  resize: vertical;
  min-height: 80px;
}

.checkout-note:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.checkout-summary-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.checkout-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--text-secondary);
  padding: 4px 0;
}

.checkout-total-row {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 16px;
  color: var(--text);
}

.checkout-total-row strong {
  font-size: 20px;
  color: var(--primary);
}

.checkout-foot {
  padding: 16px;
  padding-bottom: calc(16px + var(--safe-bottom) + var(--nav-h));
  background: var(--surface);
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
}

.checkout-place-btn { margin-bottom: 10px; }

.checkout-cancel-btn {
  margin-bottom: 10px;
  background: transparent;
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.35);
  border-radius: 999px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
}

.checkout-cancel-btn:hover {
  background: rgba(220, 38, 38, 0.06);
  border-color: rgba(220, 38, 38, 0.55);
}

.checkout-place-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.checkout-secure {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
}

.checkout-success {
  position: absolute;
  inset: 0;
  background: var(--surface);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  text-align: center;
}

.checkout-success-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #D1FAE5, #A7F3D0);
  color: #059669;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.25);
}

.checkout-success h3 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
}

.checkout-success p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.checkout-success .btn-primary,
.checkout-success .checkout-continue-shop {
  width: 100%;
  max-width: 280px;
  margin-bottom: 10px;
}

@media (min-width: 992px) {
  .checkout-foot { padding-bottom: 16px; }
  .checkout-panel { box-shadow: var(--shadow-lg); margin-top: 0; }
}
