:root {
  --hm-color-night: #0F0F0F;
  --hm-color-night-2: #1A1A1A;
  --hm-color-brass: #C9A96E;        /* Gold/caramel accent */
  --hm-color-brass-strong: #B8924A;
  --hm-color-brass-soft: #FAF5EC;
  --hm-color-accent: #C9A96E;
  --hm-color-accent-soft: #FAF5EC;
  --hm-color-danger: #ef4444;
  --hm-color-danger-soft: #fef2f2;
  --hm-color-page: #FAFAFA;          /* Near white */
  --hm-color-surface: #FFFFFF;
  --hm-color-surface-muted: #F5F5F5;
  --hm-color-border: #EBEBEB;
  --hm-color-border-strong: #D4D4D4;
  --hm-color-text: #111111;
  --hm-color-muted: #888888;
  --hm-focus-ring: 0 0 0 3px rgba(201, 169, 110, 0.2);
  --hm-shadow-button: 0 2px 8px rgba(0, 0, 0, 0.08);
  --hm-shadow-button-hover: 0 8px 24px rgba(0, 0, 0, 0.14);
  --hm-shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.06);
  --hm-radius-button: 10px;
  --hm-button-min-height: 44px;
  --hm-bottom-nav-h: 64px;
  --hm-safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html {
  scroll-behavior: smooth;
  max-width: 100%;
}

body {
  background: var(--hm-color-page);
  color: var(--hm-color-text);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-width: 320px;
  max-width: 100%;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.hm-menu-open {
  overflow: hidden;
}

img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

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

/* ============================================================
   BUTTONS  — flat, editorial, no shadows
   ============================================================ */
.hm-btn,
button.hm-btn,
a.hm-btn,
.btn-primary,
.btn-secondary {
  min-height: var(--hm-button-min-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  cursor: pointer;
  text-decoration: none;
}

.hm-btn:active,
.btn-primary:active,
.btn-secondary:active {
  opacity: 0.85;
}

.hm-btn:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #C9A96E;
  outline-offset: 2px;
}

.hm-btn:disabled,
.btn-primary:disabled,
.btn-secondary:disabled,
button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
  pointer-events: none;
}

.hm-btn-primary,
.btn-primary {
  background: #1D3B2E !important;
  color: #FFFFFF !important;
  border: 1px solid #1D3B2E !important;
}

.hm-btn-primary:hover,
.btn-primary:hover {
  background: #142A20 !important;
  border-color: #142A20 !important;
}

.hm-btn-secondary {
  background: #F0F5F2 !important;
  color: #1D3B2E !important;
  border: 1px solid #C5D8CB !important;
}

.hm-btn-secondary:hover {
  background: #E2ECE6 !important;
  border-color: #A9C5B2 !important;
}

.hm-btn-outline {
  background: transparent !important;
  border: 1px solid #D8D8D8 !important;
  color: #111111 !important;
}

.hm-btn-outline:hover {
  border-color: #111111 !important;
  background: #F5F5F5 !important;
}

.hm-btn-ghost,
.btn-secondary {
  background: #F5F5F5 !important;
  color: #333333 !important;
  border: 1px solid #EBEBEB !important;
}

.hm-btn-ghost:hover,
.btn-secondary:hover {
  background: #EBEBEB !important;
  color: #111111 !important;
}

.hm-btn-danger,
button.text-rose-600,
button.text-rose-500,
button.text-rose-400 {
  color: var(--hm-color-danger) !important;
}

.hm-btn-danger:hover,
button.text-rose-600:hover,
button.text-rose-500:hover,
button.text-rose-400:hover {
  background: var(--hm-color-danger-soft) !important;
  color: #b91c1c !important;
}

/* ============================================================
   TAILWIND OVERRIDES
   ============================================================ */
.bg-slate-50 {
  background-color: var(--hm-color-page) !important;
}

.bg-white,
.modal-box {
  background-color: var(--hm-color-surface) !important;
}

.border-slate-200,
.border-slate-300 {
  border-color: var(--hm-color-border) !important;
}

/* Amber overrides → gold accent */
.text-amber-400,
.text-amber-500,
.text-amber-600,
.text-amber-700 {
  color: var(--hm-color-brass) !important;
}

.bg-amber-50,
.bg-amber-100 {
  background-color: var(--hm-color-brass-soft) !important;
}

.border-amber-100,
.border-amber-200,
.border-amber-300,
.border-amber-400,
.border-amber-500 {
  border-color: rgba(201, 169, 110, 0.25) !important;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-input,
input,
select,
textarea {
  border-color: var(--hm-color-border);
  min-height: 44px;
  font-size: 15px;
  width: 100%;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.form-input:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--hm-color-brass) !important;
  box-shadow: var(--hm-focus-ring) !important;
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
.nav-link {
  position: relative;
  padding-bottom: 4px;
  color: #555555;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #111111 !important;
  font-weight: 600 !important;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 1.5px;
  background: #111111;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 999px;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 75%;
}

footer.bg-slate-950 {
  background:
    radial-gradient(circle at 20% 0%, rgba(201, 169, 110, 0.08), transparent 30%),
    linear-gradient(135deg, #0A0A0A 0%, #141414 50%, #0A0A0A 100%) !important;
}

/* Header */
header.hm-site-header {
  background: rgba(255, 255, 255, 0.97) !important;
  border-bottom: 1px solid rgba(235, 235, 235, 0.9) !important;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04) !important;
}

/* Hero section */
.hero-bg, .hm-hero-section {
  background:
    linear-gradient(180deg, rgba(250, 248, 244, 0.55) 0%, rgba(255, 255, 255, 0.85) 100%),
    url('../img/nursery_hero_bg.png') no-repeat center center / cover !important;
}

@media (min-width: 1024px) {
  .hero-bg, .hm-hero-section {
    background-position: center 30% !important;
  }
}

/* Hero heading — entrance animation */
.hm-hero-heading {
  opacity: 0;
  transform: translateY(16px);
  animation: hm-hero-fade-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.15s;
}

@keyframes hm-hero-fade-in {
  to { opacity: 1; transform: translateY(0); }
}

/* Hero CTA — clean dark pill */
.hm-hero-cta {
  background: #111111;
  color: #FFFFFF;
  border: none;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.25s ease, transform 0.25s ease;
}

.hm-hero-cta:hover {
  background: #333333;
  transform: translateY(-1px);
}

/* Hero icon buttons — brand colored circles */
.hm-hero-icon-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
  text-decoration: none;
  flex-shrink: 0;
}

.hm-hero-icon-btn:hover {
  transform: scale(1.08);
  opacity: 0.88;
}

/* WhatsApp — green */
#heroWhatsappBtn.hm-hero-icon-btn {
  background: #25D366;
  color: #FFFFFF;
}

/* Instagram — gradient */
#heroInstagramBtn.hm-hero-icon-btn {
  background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: #FFFFFF;
}

/* ============================================================
   CARDS
   ============================================================ */
.card-lift,
.bg-white.border {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.card-lift {
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.card-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08) !important;
}

/* ============================================================
   CATEGORY CARDS  — editorial row layout
   ============================================================ */
.hm-category-card {
  position: relative;
  background: #FFFFFF;
  border: 1px solid #E8E8E8;
  border-radius: 10px;
  padding: 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
}

.hm-category-card:hover {
  border-color: #C0C0C0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.hm-category-card .hm-cat-icon-wrap {
  transition: background 0.2s ease;
}

.hm-category-card:hover .hm-cat-icon-wrap {
  background: #111111 !important;
  color: #FFFFFF !important;
}

/* Unified category variants */
.hm-category-besik .hm-cat-icon-wrap,
.hm-category-yatak .hm-cat-icon-wrap,
.hm-category-rattan .hm-cat-icon-wrap,
.hm-category-dolap .hm-cat-icon-wrap,
.hm-category-sifonyer .hm-cat-icon-wrap,
.hm-category-odatakimi .hm-cat-icon-wrap,
.hm-category-ranza .hm-cat-icon-wrap {
  background-color: #F2F2F2;
  color: #333333;
}

.hm-category-besik .hm-cat-link,
.hm-category-yatak .hm-cat-link,
.hm-category-rattan .hm-cat-link,
.hm-category-dolap .hm-cat-link,
.hm-category-sifonyer .hm-cat-link,
.hm-category-odatakimi .hm-cat-link,
.hm-category-ranza .hm-cat-link { color: #777777; }

@media (max-width: 639px) {
  .hm-category-card {
    padding: 14px 10px;
    border-radius: 8px;
  }
  .hm-category-card .hm-cat-icon-wrap {
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
    border-radius: 8px;
  }
  .hm-category-card .hm-cat-icon-wrap svg {
    width: 20px;
    height: 20px;
  }
  .hm-category-card h3 {
    font-size: 12px !important;
  }
  .hm-category-card p {
    font-size: 10px !important;
  }
}

/* ============================================================
   HERO BUTTONS  — flat, no lift animation
   ============================================================ */
.hm-btn-hero-primary {
  background: #111111 !important;
  color: #FFFFFF !important;
  border: 1px solid #111111 !important;
  min-height: 48px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  transition: background 0.18s ease;
  cursor: pointer;
  text-decoration: none;
}

.hm-btn-hero-primary:hover {
  background: #2a2a2a !important;
}

.hm-btn-hero-secondary {
  background: transparent !important;
  border: 1px solid #D8D8D8 !important;
  color: #111111 !important;
  min-height: 48px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  transition: border-color 0.18s ease, background 0.18s ease;
  cursor: pointer;
  text-decoration: none;
}

.hm-btn-hero-secondary:hover {
  background: #F5F5F5 !important;
  border-color: #B8B8B8 !important;
}

@media (max-width: 639px) {
  .hm-btn-hero-primary,
  .hm-btn-hero-secondary {
    min-height: 44px;
    font-size: 0.875rem !important;
  }
}

/* ============================================================
   FILTER BUTTONS  — pill style, clean active state
   ============================================================ */
.filter-btn {
  border-radius: 999px !important;
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.01em;
  border: 1px solid #E0E0E0 !important;
  background: #FFFFFF !important;
  color: #555555 !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease !important;
  white-space: nowrap;
  padding: 0.45rem 1rem !important;
  min-height: 36px !important;
}

.filter-btn:hover {
  background: #F5F5F5 !important;
  border-color: #C0C0C0 !important;
  color: #111111 !important;
}

.filter-btn.active {
  background: #111111 !important;
  color: #FFFFFF !important;
  border-color: #111111 !important;
}

/* ============================================================
   ADMIN SHARED UI
   ============================================================ */
.fade-in {
  animation: fadeIn 0.22s ease-out;
}

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

.nav-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 0.625rem;
  color: #475569;
  font-size: 0.875rem;
  transition: background 0.15s;
  text-align: left;
  cursor: pointer;
  border: none;
  background: none;
}

.nav-item:hover { background: #f8fafc; }

.nav-item.active {
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 600;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.show { display: flex; }

.modal-box {
  background: #fff;
  border-radius: 1rem;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.tab-btn {
  padding: 0.35rem 0.95rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: all 0.15s;
  cursor: pointer;
  border: none;
  background: none;
}

.tab-btn.active-tab {
  background: #111111;
  color: #fff;
}

.tab-btn:not(.active-tab) { color: #64748b; }
.tab-btn:not(.active-tab):hover { background: #f1f5f9; }

.spec-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* ============================================================
   PRODUCTS PAGE
   ============================================================ */
.hm-products-hero {
  background:
    radial-gradient(circle at 12% 0%, rgba(201, 169, 110, 0.06), transparent 25%),
    linear-gradient(180deg, #FFFFFF 0%, #FAFAFA 100%) !important;
}

.hm-products-toolbar {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.hm-products-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.hm-swipe-hint {
  display: none;
  color: #888888;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.hm-product-grid {
  align-items: stretch;
}

/* ============================================================
   PRODUCT CARDS  — sharp, editorial, zero noise
   ============================================================ */
.hm-product-card,
.card-lift {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #E8E8E8 !important;
  border-radius: 8px !important;
  background: #FFFFFF !important;
  box-shadow: none !important;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease !important;
}

.hm-product-card:hover,
.card-lift:hover {
  border-color: #B8B8B8 !important;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06) !important;
}

.hm-product-card img,
.card-lift img {
  transition: transform 0.5s ease !important;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hm-product-card:hover img,
.card-lift:hover img {
  transform: scale(1.04) !important;
}

.hm-product-link {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.hm-aspect-4-3 {
  aspect-ratio: 4 / 3;
}

.hm-product-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #F8F8F8 !important;
  aspect-ratio: 4 / 3;
  min-height: auto;
  border-bottom: 1px solid #F0F0F0;
}

.hm-product-icon {
  position: relative;
  z-index: 1;
  width: 4.5rem;
  height: 4.5rem;
  color: currentColor;
  opacity: 0.55;
  transition: transform 250ms cubic-bezier(0.16, 1, 0.3, 1), opacity 250ms ease;
}

.hm-product-card:hover .hm-product-icon,
.card-lift:hover .hm-product-icon {
  opacity: 0.8;
  transform: scale(1.06) rotate(-2deg);
}

.hm-product-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.9rem 0.9rem 0.75rem;
}

.hm-product-meta {
  min-height: 1rem;
  overflow: hidden;
  color: #BBBBBB !important;
  font-size: 0.62rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.10em !important;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.hm-product-title {
  display: -webkit-box;
  min-height: 2.4rem;
  margin: 0;
  overflow: hidden;
  color: #111111 !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  letter-spacing: -0.01em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 0.15s ease;
}

.hm-product-card:hover .hm-product-title,
.card-lift:hover h3 {
  color: #111111 !important;
}

.hm-product-price {
  margin-top: auto;
  color: #111111 !important;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hm-product-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  width: calc(100% - 1.8rem);
  margin: 0 0.9rem 0.9rem;
  padding: 0.55rem 1rem !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em;
  text-decoration: none !important;
  border-radius: 6px !important;
  border: 1px solid #1D3B2E !important;
  background: #1D3B2E !important;
  color: #FFFFFF !important;
  box-shadow: none !important;
  transition: background 0.15s ease, border-color 0.15s ease !important;
}

.hm-product-cart:hover {
  background: #142A20 !important;
  border-color: #142A20 !important;
}

.hm-product-cart-static {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 6px;
  background: #1D3B2E;
  color: #FFFFFF;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid #1D3B2E;
  transition: background 0.15s ease;
}

.card-lift:hover .hm-product-cart-static {
  background: #142A20;
  border-color: #142A20;
}

.hm-product-badge,
.hm-product-stock {
  position: absolute;
  z-index: 2;
  top: 0;
  border-radius: 0;
  padding: 0.22rem 0.55rem;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hm-product-badge {
  left: 0;
  background: #111111 !important;
  color: #FFFFFF !important;
}

.hm-product-stock {
  right: 0;
  background: rgba(0, 0, 0, 0.04);
  border: none;
  color: #888888;
  font-weight: 600;
}

.hm-product-stock-low {
  background: #111111 !important;
  color: #FFFFFF !important;
}

.hm-product-stock-out {
  background: #111111 !important;
  color: #FFFFFF !important;
}

.hm-product-card-out .hm-product-link img,
.hm-product-card-out .hm-product-media {
  opacity: 0.45;
  filter: grayscale(40%);
}

.hm-product-cart-disabled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  width: calc(100% - 1.8rem);
  margin: 0 0.9rem 0.9rem;
  padding: 0.55rem 1rem !important;
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  border-radius: 6px !important;
  border: 1px solid #EBEBEB !important;
  background: #F8F8F8 !important;
  color: #BBBBBB !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  user-select: none;
}

/* Tone backgrounds — used by category icons on product cards */
.hm-tone-slate  { color: #666666; background: #F5F5F5; }
.hm-tone-blue   { color: #2563eb; background: #EFF6FF; }
.hm-tone-orange { color: #c2410c; background: #FFF7ED; }
.hm-tone-violet { color: #7c3aed; background: #F5F3FF; }
.hm-tone-emerald{ color: #047857; background: #ECFDF5; }
.hm-tone-rose   { color: #be123c; background: #FFF1F2; }
.hm-tone-amber  { color: #b45309; background: #FFFBEB; }
.hm-tone-yellow { color: #a16207; background: #FEFCE8; }
.hm-tone-indigo { color: #4f46e5; background: #EEF2FF; }
.hm-tone-teal   { color: #0f766e; background: #F0FDFA; }
.hm-tone-red    { color: #dc2626; background: #FEF2F2; }
.hm-tone-cyan   { color: #0891b2; background: #ECFEFF; }
.hm-tone-stone  { color: #78716c; background: #FAFAF9; }
.hm-tone-pink   { color: #db2777; background: #FDF2F8; }

.hm-product-sections {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hm-product-section { min-width: 0; }

.hm-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.hm-section-heading h2 {
  margin: 0;
  color: #111111;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.2;
}

.hm-section-heading p {
  margin-top: 0.18rem;
  color: #888888;
  font-size: 0.8rem;
  line-height: 1.35;
}

.hm-section-heading span {
  flex-shrink: 0;
  color: #C9A96E;
  font-size: 0.74rem;
  font-weight: 700;
}

.hm-product-rail {
  display: grid;
  grid-auto-columns: minmax(188px, 72vw);
  grid-auto-flow: column;
  gap: 0.75rem;
  margin-inline: -1rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 0.1rem 1rem 0.65rem;
  scroll-padding-left: 1rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  scroll-behavior: smooth;
  mask-image: linear-gradient(to right, transparent, #000 24px, #000 calc(100% - 24px), transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 24px, #000 calc(100% - 24px), transparent);
}

.hm-product-rail.active-drag {
  cursor: grabbing;
  user-select: none;
  scroll-snap-type: none !important;
}

.hm-product-rail::-webkit-scrollbar { display: none; }
.hm-product-rail .hm-product-card { scroll-snap-align: start; }

/* ============================================================
   CART BADGE
   ============================================================ */
.cart-badge {
  background: #111111 !important;
  color: #ffffff !important;
  border: none;
  flex-shrink: 0;
  font-size: 0.65rem !important;
  width: 18px !important;
  height: 18px !important;
  border-radius: 999px !important;
  transition: transform 200ms ease;
}

.cart-badge.hm-badge-pop {
  animation: hmBadgePop 350ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes hmBadgePop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* ============================================================
   TOAST
   ============================================================ */
#toast {
  background: #111111 !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24) !important;
  z-index: 600 !important;
}

.hm-auth-message {
  border-radius: 10px;
  border: 1px solid var(--hm-color-border);
  padding: 0.8rem 1rem;
  color: #444444;
  background: #FAFAFA;
  font-size: 0.9rem;
  font-weight: 500;
}

.hm-auth-message-success {
  border-color: rgba(16, 185, 129, 0.2);
  color: #047857;
  background: #F0FDF4;
}

.hm-auth-message-error {
  border-color: rgba(220, 38, 38, 0.18);
  color: #b91c1c;
  background: #FFF1F2;
}

/* ============================================================
   HEADER COMPONENTS
   ============================================================ */
.hm-site-header {
  isolation: isolate;
  background: rgba(255, 255, 255, 0.97) !important;
  backdrop-filter: blur(20px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(140%) !important;
  border-bottom: 1px solid rgba(235, 235, 235, 0.9) !important;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04) !important;
}

.hm-header-shell {
  gap: 0.75rem;
}

.hm-brand { min-width: 0; }

.hm-brand-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hm-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.hm-cart-trigger {
  min-height: 38px !important;
  padding-inline: 0.8rem !important;
  padding-block: 0 !important;
  flex-shrink: 0;
  border-radius: 6px !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  background: transparent !important;
  border: 1px solid #D8D8D8 !important;
  color: #333333 !important;
  transition: border-color 0.15s ease, background 0.15s ease !important;
  box-shadow: none !important;
}

.hm-cart-trigger:hover {
  border-color: #B0B0B0 !important;
  background: #F5F5F5 !important;
}

.hm-mobile-toggle {
  min-width: 40px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  background: rgba(0, 0, 0, 0.02) !important;
  position: relative;
  color: #111111 !important;
  transition: all 0.2s ease;
}

@media (min-width: 768px) {
  .hm-mobile-toggle {
    display: none !important;
  }
}

.hm-mobile-toggle:hover {
  background: rgba(0, 0, 0, 0.05) !important;
}

.hm-mobile-toggle:active {
  transform: scale(0.95);
}

/* Hamburger → X morphing */
.hm-mobile-toggle .hm-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 18px;
  height: 18px;
  gap: 4px;
}

.hm-mobile-toggle .hm-hamburger span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 250ms ease, opacity 200ms ease;
  transform-origin: center;
}

.hm-mobile-toggle[aria-expanded="true"] .hm-hamburger span:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}
.hm-mobile-toggle[aria-expanded="true"] .hm-hamburger span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hm-mobile-toggle[aria-expanded="true"] .hm-hamburger span:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

/* Mobile menu */
.hm-mobile-menu { display: none; }

#specsTable {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

#specsTable table { min-width: 520px; }

/* ============================================================
   MOBILE BOTTOM NAV BAR
   ============================================================ */
.hm-bottom-nav { display: none; }

/* ============================================================
   STICKY ADD-TO-CART BAR (product detail – mobile)
   ============================================================ */
.hm-sticky-cart-bar { display: none; }

/* ============================================================
   FILTER WRAPPER
   ============================================================ */
.hm-filter-wrapper {
  position: relative;
  width: 100%;
}

.hm-filter-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  scroll-behavior: smooth;
}

.hm-filter-arrow {
  transform: translateY(-50%) scale(0.85);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s, color 0.2s;
  user-select: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
}

.hm-filter-arrow:hover {
  background-color: #ffffff;
  color: #111111;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.hm-filter-arrow.opacity-100 {
  transform: translateY(-50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.hm-filter-arrow:active { transform: translateY(-50%) scale(0.93); }

/* ============================================================
   TOUCH-FRIENDLY
   ============================================================ */
@media (hover: none) {
  .hm-btn:hover,
  .btn-primary:hover,
  .btn-secondary:hover {
    transform: none;
  }

  .card-lift:hover {
    transform: none;
    box-shadow: none !important;
  }
}

/* ============================================================
   ★ MOBILE OVERRIDES (max-width: 767px)
   ============================================================ */
@media (max-width: 767px) {

  .py-20 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }

  .py-16 {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }

  /* Header */
  .hm-header-shell { min-height: 54px; }
  .hm-brand-text { font-size: 0.95rem; }

  .hm-cart-trigger {
    padding-inline: 0.75rem !important;
    font-size: 0.875rem !important;
  }

  .hm-cart-label { display: none; }

  /* Mobile menu — Clean & Sleek Editorial Layout */
  .hm-mobile-menu {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    gap: 0 !important;
    position: fixed !important;
    top: 54px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: calc(100vh - 54px) !important;
    min-height: 0 !important;
    max-height: none !important;
    z-index: 200 !important;
    padding: 1.5rem 1.5rem calc(var(--hm-bottom-nav-h, 64px) + 2rem) !important;

    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;

    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box !important;

    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(-8px) !important;
    transition: opacity 250ms cubic-bezier(0.16, 1, 0.3, 1), transform 250ms cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  .hm-site-header { z-index: 210 !important; }

  .hm-mobile-menu.hm-menu-visible {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
  }

  .hm-mobile-menu a {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    font-size: 1.2rem !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em !important;
    color: #111111 !important;
    text-decoration: none !important;
    padding: 1rem 0.5rem !important;
    border-radius: 0 !important;
    border-bottom: 1px solid #EBEBEB !important;
    background: transparent !important;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;

    opacity: 0 !important;
    transform: translateY(10px) !important;
    transition: opacity 250ms cubic-bezier(0.16, 1, 0.3, 1), transform 250ms cubic-bezier(0.16, 1, 0.3, 1), padding 150ms ease, color 150ms ease !important;
  }

  .hm-mobile-menu a::after {
    content: '→';
    font-size: 1.1rem;
    color: #CCCCCC;
    font-weight: 400;
    transition: transform 0.2s ease, color 0.2s ease;
  }

  .hm-mobile-menu.hm-menu-visible a {
    opacity: 1 !important;
    transform: translateY(0) !important;
  }

  /* Staggered delays */
  .hm-mobile-menu.hm-menu-visible a:nth-child(1) { transition-delay: 30ms, 30ms, 0s !important; }
  .hm-mobile-menu.hm-menu-visible a:nth-child(2) { transition-delay: 60ms, 60ms, 0s !important; }
  .hm-mobile-menu.hm-menu-visible a:nth-child(3) { transition-delay: 90ms, 90ms, 0s !important; }
  .hm-mobile-menu.hm-menu-visible a:nth-child(4) { transition-delay: 120ms, 120ms, 0s !important; }
  .hm-mobile-menu.hm-menu-visible a:nth-child(5) { transition-delay: 150ms, 150ms, 0s !important; }
  .hm-mobile-menu.hm-menu-visible a:nth-child(6) { transition-delay: 180ms, 180ms, 0s !important; }

  .hm-mobile-menu a:hover,
  .hm-mobile-menu a:focus {
    color: #111111 !important;
    background: transparent !important;
    padding-left: 0.85rem !important;
    outline: none;
  }

  .hm-mobile-menu a:hover::after {
    color: #111111;
    transform: translateX(4px);
  }

  .hm-mobile-menu a:active {
    opacity: 0.7 !important;
  }

  .hm-mobile-menu a.text-amber-400,
  .hm-mobile-menu a.active {
    color: #111111 !important;
    font-weight: 700 !important;
    background: transparent !important;
  }

  /* Hide bottom nav when mobile menu is open */
  body.hm-menu-open .hm-bottom-nav {
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 200ms ease, transform 200ms ease;
  }

  /* Bottom Navigation Bar */
  .hm-bottom-nav {
    transition: opacity 200ms ease, transform 200ms ease;
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: calc(var(--hm-bottom-nav-h) + var(--hm-safe-bottom));
    padding-bottom: var(--hm-safe-bottom);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(235, 235, 235, 0.9);
    align-items: center;
    justify-content: space-around;
    box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.04);
  }

  .hm-bottom-nav a,
  .hm-bottom-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 1;
    min-height: 52px;
    padding: 6px 0;
    color: #BBBBBB;
    font-size: 10px;
    font-weight: 600;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 150ms ease;
    -webkit-tap-highlight-color: transparent;
    position: relative;
  }

  .hm-bottom-nav a:active,
  .hm-bottom-nav button:active {
    color: #111111;
  }

  .hm-bottom-nav .hm-bnav-active {
    color: #111111;
  }

  .hm-bottom-nav svg {
    width: 22px;
    height: 22px;
  }

  .hm-bnav-badge {
    position: absolute;
    top: 4px;
    right: 50%;
    transform: translateX(14px);
    min-width: 15px;
    height: 15px;
    border-radius: 999px;
    background: #111111;
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
    pointer-events: none;
    transition: transform 200ms ease;
  }

  .hm-bnav-badge:empty,
  .hm-bnav-badge[data-count="0"] { display: none; }

  body {
    padding-bottom: calc(var(--hm-bottom-nav-h) + var(--hm-safe-bottom));
  }

  #toast {
    left: 12px !important;
    right: 12px !important;
    bottom: calc(var(--hm-bottom-nav-h) + var(--hm-safe-bottom) + 12px) !important;
    width: auto;
  }

  #_scrollTopBtn {
    bottom: calc(var(--hm-bottom-nav-h) + var(--hm-safe-bottom) + 12px) !important;
  }

  /* Hero */
  .hero-bg { min-height: auto !important; }
  .hero-bg h1 {
    font-size: 2.1rem !important;
    line-height: 1.1 !important;
  }

  .hm-products-hero > div {
    padding-top: 1.25rem !important;
    padding-bottom: 1.25rem !important;
  }

  .hm-products-hero nav {
    margin-bottom: 0.35rem !important;
    font-size: 0.78rem !important;
  }

  .hm-products-hero h1 {
    font-size: 1.65rem !important;
    line-height: 1.12 !important;
  }

  .hm-products-hero p {
    max-width: 19rem;
    font-size: 0.9rem !important;
    line-height: 1.45;
  }

  .hm-products-toolbar > div {
    padding-top: 0.7rem !important;
    padding-bottom: 0.65rem !important;
  }

  .hm-products-controls {
    gap: 0.5rem !important;
    margin-bottom: 0.6rem !important;
  }

  .hm-products-controls input,
  .hm-products-controls select {
    min-height: 42px;
    border-radius: 10px !important;
    background: #ffffff !important;
  }

  .hm-products-controls select {
    max-width: 9rem;
    padding-left: 0.65rem !important;
    padding-right: 0.65rem !important;
  }

  .hm-products-main { padding-top: 1.25rem !important; }

  .hm-products-summary {
    align-items: flex-start;
    margin-bottom: 1rem;
  }

  .hm-swipe-hint {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    border-radius: 999px;
    background: #F0F0F0;
    padding: 0.2rem 0.6rem;
    color: #888888;
  }

  /* Product grid */
  #featuredGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  #featuredGrid .card-lift > div:first-child {
    aspect-ratio: 4 / 3;
    min-height: auto;
  }

  .hm-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.65rem !important;
  }

  .hm-product-grid .hm-product-media {
    aspect-ratio: 4 / 3;
    min-height: auto;
  }

  .hm-product-card {
    border-radius: 6px;
  }

  .hm-product-card:hover { transform: none; }

  .hm-product-media {
    aspect-ratio: 4 / 3;
    min-height: auto;
  }

  .hm-product-icon {
    width: 3.75rem;
    height: 3.75rem;
  }

  .hm-product-body {
    gap: 0.3rem;
    padding: 0.7rem 0.7rem 0.55rem;
  }

  .hm-product-meta { font-size: 0.62rem; }

  .hm-product-title {
    min-height: 2.2rem;
    font-size: 0.84rem;
    line-height: 1.3;
  }

  .hm-product-price { font-size: 0.95rem; }

  .hm-product-cart {
    min-height: 38px;
    width: calc(100% - 1.4rem);
    margin: 0 0.7rem 0.7rem;
    border-radius: 5px !important;
    font-size: 0.78rem !important;
  }

  .hm-product-badge,
  .hm-product-stock {
    top: 0.5rem;
    padding: 0.22rem 0.42rem;
    font-size: 0.58rem;
  }

  .hm-product-badge { left: 0.5rem; }
  .hm-product-stock { right: 0.5rem; }

  .hm-product-rail { grid-auto-columns: minmax(170px, 72vw); }

  /* Filter chips */
  .hm-filter-btns {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    margin-inline: -1rem;
    padding: 0 1rem 6px;
    gap: 7px;
    cursor: grab;
    mask-image: linear-gradient(to right, transparent, #000 24px, #000 calc(100% - 24px), transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 24px, #000 calc(100% - 24px), transparent);
  }
  .hm-filter-btns.active-drag {
    cursor: grabbing;
    user-select: none;
  }
  .hm-filter-btns::-webkit-scrollbar { display: none; }
  .hm-filter-btns .filter-btn {
    flex-shrink: 0;
    min-height: 36px;
    white-space: nowrap;
  }

  .hm-sticky-cart-bar { display: none !important; }

  .hm-sticky-cart-bar .hm-sticky-price {
    font-weight: 700;
    font-size: 1.1rem;
    color: #111111;
    white-space: nowrap;
  }

  .hm-sticky-cart-bar .hm-sticky-btn {
    flex: 1;
    min-height: 46px;
    background: #111111;
    color: #FFFFFF;
    border: none;
    border-radius: 10px;
    font-weight: 650;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
    transition: background 180ms ease;
  }

  .hm-sticky-cart-bar .hm-sticky-btn:active { background: #000000; }

  body.hm-has-sticky-cart {
    padding-bottom: calc(var(--hm-bottom-nav-h) + var(--hm-safe-bottom) + 68px);
  }

  #mainImage {
    border-radius: 14px !important;
    min-height: auto !important;
  }

  #specsTable table { min-width: 100% !important; }

  .grid-cols-2.sm\:grid-cols-3 .card-lift { padding: 1rem !important; }

  footer { padding-bottom: 1rem !important; }
}

/* ============================================================
   ★ SMALL MOBILE (max-width: 374px)
   ============================================================ */
@media (max-width: 374px) {
  .hm-bottom-nav { --hm-bottom-nav-h: 56px; }
  .hm-bottom-nav svg { width: 20px; height: 20px; }
  .hm-bottom-nav a,
  .hm-bottom-nav button { font-size: 9px; }

  .hm-product-grid { grid-template-columns: 1fr !important; }
  .hm-product-grid .hm-product-media { aspect-ratio: 4 / 3; min-height: auto; }
  .hm-product-rail { grid-auto-columns: minmax(168px, 82vw); }
}

/* ============================================================
   SMALL MOBILE (max-width: 639px) – extra
   ============================================================ */
@media (max-width: 639px) {
  .hm-cart-trigger { min-width: 42px; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
