:root {
  --bg: #f4f6fa;
  --bg-elevated: #ffffff;
  --bg-glass: rgba(244, 246, 250, 0.72);
  --ink: #0c1222;
  --muted: #5c6678;
  --muted-soft: #8b95a8;
  --accent: #e85d3bff;
  --accent-hover: #d14d2eff;
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --accent-dark: #101828;
  --accent-badge-text: #9a3412;
  --bg-product-img: #e2e8f0;
  --line: rgba(15, 23, 42, 0.08);
  --line-strong: rgba(15, 23, 42, 0.12);
  --bg-gradient-1: rgba(232, 93, 59, 0.12);
  --bg-gradient-2: rgba(56, 189, 248, 0.1);
  --bg-gradient-3: rgba(99, 102, 241, 0.06);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.12);
  --blur: saturate(160%) blur(18px);
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --topbar-offset: 84px;
}

/* Smooth transition when changing theme */
html.theme-transitioning,
html.theme-transitioning *,
html.theme-transitioning *::before,
html.theme-transitioning *::after {
  transition: background-color 0.4s var(--ease-out),
              color 0.4s var(--ease-out),
              border-color 0.4s var(--ease-out),
              box-shadow 0.4s var(--ease-out),
              background-image 0.4s var(--ease-out) !important;
  transition-delay: 0s !important;
}

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

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

html.nav-locked,
body.nav-locked {
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

body {
  font-family: "Outfit", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 90% 60% at 8% -10%, var(--bg-gradient-1), transparent),
    radial-gradient(ellipse 70% 50% at 95% 5%, var(--bg-gradient-2), transparent),
    radial-gradient(ellipse 50% 40% at 50% 100%, var(--bg-gradient-3), transparent);
  background-attachment: fixed;
  line-height: 1.5;
}

body.nav-locked {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
}

img {
  width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
}

section {
  width: min(1180px, 92%);
  margin: 0 auto;
  padding: clamp(44px, 6vw, 72px) 0;
}

.hidden {
  display: none !important;
}

.logo-mark {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--accent), #fb923c);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 45%, transparent);
  flex-shrink: 0;
}

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: var(--bg-glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 4%;
}

main {
  padding-top: calc(var(--topbar-offset) + env(safe-area-inset-top, 0));
}

.demo-notice {
  width: min(1180px, 92%);
  margin: 22px auto 0;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-radius: 18px;
  background: linear-gradient(100deg, var(--accent-soft), color-mix(in srgb, var(--bg-elevated) 88%, transparent));
  box-shadow: var(--shadow-sm);
}
.demo-notice-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; border-radius: 12px; color: var(--accent); background: var(--bg-elevated); font-size: 1.2rem; }
.demo-notice div:nth-child(2) { display: grid; gap: 2px; flex: 1; }
.demo-notice strong { font-size: .9rem; }
.demo-notice span { color: var(--muted); font-size: .8rem; }
.demo-notice a { color: var(--accent-badge-text); font-size: .82rem; font-weight: 700; white-space: nowrap; }
.demo-payment-note { margin-top: 10px; color: var(--muted); font-size: .78rem; text-align: center; }
.demo-payment-note i { color: var(--accent); margin-right: 4px; }
@media (max-width: 620px) { .demo-notice { align-items: flex-start; flex-wrap: wrap; } .demo-notice a { margin-left: 52px; } }


.demo-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 9px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  color: var(--accent-badge-text);
}

.theme-btn {
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease-out), border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
  color: var(--ink);
  font-size: 1.15rem;
}

.theme-btn:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.theme-btn i {
  transition: transform 0.3s var(--ease-out);
}

.theme-btn:hover i {
  transform: rotate(20deg) scale(1.1);
}

.theme-btn .icon-sun {
  display: none;
}

.theme-btn .icon-moon {
  display: block;
}

[data-theme="dark"] .theme-btn .icon-sun {
  display: block;
}

[data-theme="dark"] .theme-btn .icon-moon {
  display: none;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-weight: 800;
  font-size: 1.22rem;
  letter-spacing: -0.03em;
  transition: opacity 0.2s var(--ease);
}

.logo:hover {
  opacity: 0.85;
}

.logo .logo-mark {
  margin-top: 1px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.site-nav a:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 5%, transparent);
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  color: var(--ink);
}

.menu-toggle .icon-close {
  display: none;
}

.menu-toggle.nav-open .icon-menu {
  display: none;
}

.menu-toggle.nav-open .icon-close {
  display: block;
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(8, 12, 22, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.topbar-end {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.auth-status {
  font-size: 0.875rem;
  color: var(--muted);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

.auth-btn,
.cart-btn {
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease-out), border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.auth-btn:hover,
.cart-btn:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cart-btn i {
  font-size: 1.15rem;
  opacity: 0.85;
}

#cartCount {
  min-width: 1.35em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  padding-top: clamp(32px, 5vw, 56px);
}

.hero-text .tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--accent-badge-text);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(2.125rem, 4.8vw, 3.65rem);
  margin-bottom: 14px;
  max-width: 14ch;
}

.hero-text > p {
  color: var(--muted);
  max-width: 46ch;
  font-size: 1.0625rem;
}

.hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.hero-image-container {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
}

.hero-image-container::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    145deg,
    transparent 45%,
    rgba(232, 93, 59, 0.08),
    transparent 75%
  );
  pointer-events: none;
}

.hero-image-container img {
  min-height: 320px;
  border-radius: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  background: linear-gradient(135deg, var(--accent), #ea580c);
  color: #fff;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9375rem;
  border: none;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 12px 32px color-mix(in srgb, var(--accent) 35%, transparent);
  transition: transform 0.2s var(--ease-out), filter 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.btn:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px color-mix(in srgb, var(--accent) 42%, transparent);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}

.btn-outline:hover {
  background: rgba(15, 23, 42, 0.04);
  border-color: var(--muted-soft);
}

.btn-dark {
  background: linear-gradient(135deg, #1e293b, var(--accent-dark));
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.25);
}

.marquee {
  width: 100%;
  max-width: none;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-elevated) 65%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  mask-image: linear-gradient(90deg, transparent 0%, #000 4%, #000 96%, transparent 100%);
  padding: 18px 0;
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: clamp(32px, 5vw, 56px);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9375rem;
  animation: slide 28s linear infinite;
}

.marquee-track i {
  margin-right: 8px;
  vertical-align: -2px;
  color: var(--accent);
}

.categories h2,
.products-wrap h2,
.about h2,
.testimonial-wrap h2,
.newsletter h2 {
  margin-bottom: 10px;
  font-size: clamp(1.65rem, 3vw, 2.1rem);
}

.categories > h2 + .cat-grid,
.products-wrap > h2 + .products,
.about > h2 + .about-grid {
  margin-top: 28px;
}

.section-head {
  margin-bottom: 22px;
}

.section-head h2 {
  margin-bottom: 6px;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.cat-grid article {
  position: relative;
  background: var(--bg-elevated);
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out),
    border-color 0.2s var(--ease);
}

.cat-grid article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.cat-grid article img {
  aspect-ratio: 4 / 5;
}

.cat-grid h3 {
  margin-top: 12px;
  font-size: 1.0625rem;
  font-weight: 700;
}

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

.product {
  position: relative;
  background: var(--bg-elevated);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
  opacity: 0;
  transform: translateY(16px);
}

.product.visible {
  opacity: 1;
  transform: translateY(0);
}

.product:hover {
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.product-img-wrap {
  position: relative;
  overflow: hidden;
  background: var(--bg-product-img);
}

.product-img-wrap img {
  aspect-ratio: 1;
  border-radius: 0;
  transition: transform 0.55s var(--ease-out);
}

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

.category-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-sm);
}

.product-details {
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

.product-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.product h3 {
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.rating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #b45309;
}

.rating i {
  font-size: 1rem;
  color: #f59e0b;
}

.rating .reviews {
  font-weight: 500;
  color: var(--muted-soft);
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

.price {
  font-weight: 800;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.add {
  border: none;
  background: linear-gradient(135deg, #1e293b, var(--accent-dark));
  color: #fff;
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.8125rem;
  font-family: inherit;
  white-space: nowrap;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease),
    opacity 0.2s var(--ease);
}

.add:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
}

.banner {
  text-align: center;
  border-radius: var(--radius-lg);
  padding: clamp(40px, 6vw, 56px);
  border: 1px solid transparent;
  background:
    linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.5),
        rgba(255, 255, 255, 0.2)
      ),
    linear-gradient(120deg, #fff7ed, #fce7f3, #e0f2fe);
  box-shadow: var(--shadow-lg);
}

.banner-content h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 8px;
}

.banner-content p {
  color: var(--muted);
}

.mega-wrap {
  padding-top: clamp(52px, 7vw, 80px);
}

.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-bottom: 22px;
  padding: 16px 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.catalog-search-wrap {
  flex: 1 1 220px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-elevated) 90%, transparent);
  min-height: 46px;
}

.catalog-search-wrap i {
  font-size: 1.15rem;
  color: var(--muted-soft);
}

.catalog-search-wrap input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.9375rem;
  padding: 10px 0;
  outline: none;
}

.catalog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-elevated) 80%, transparent);
  padding: 8px 16px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.filter-chip:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.filter-chip.is-active {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  color: var(--accent-badge-text);
}

.catalog-sort-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.catalog-sort-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.catalog-sort-wrap select {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-elevated) 80%, transparent);
  padding: 8px 32px 8px 12px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235c6678' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color 0.2s var(--ease);
}

.catalog-sort-wrap select:hover,
.catalog-sort-wrap select:focus {
  border-color: var(--line-strong);
}

.catalog-count {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 500;
}

@media (min-width: 720px) {
  .catalog-count {
    flex: 0 0 auto;
    margin-left: auto;
    text-align: right;
  }
}

.catalog-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: clamp(36px, 6vw, 52px) 20px;
  border-radius: var(--radius);
  border: 1px dashed var(--line-strong);
  background: color-mix(in srgb, var(--bg-elevated) 60%, transparent);
  color: var(--muted);
}

.catalog-empty i {
  font-size: 2.25rem;
  color: var(--muted-soft);
  margin-bottom: 12px;
  display: block;
}

.catalog-empty p {
  margin-bottom: 16px;
  font-weight: 500;
}

.catalog-empty .btn-outline {
  margin-top: 0;
}

.support {
  scroll-margin-top: 88px;
}

.support-lead {
  color: var(--muted);
  max-width: 56ch;
  margin-bottom: 22px;
  font-size: 1rem;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.support-grid article {
  background: var(--bg-elevated);
  padding: clamp(22px, 3vw, 26px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 92px;
}

.support-grid h3 {
  font-size: 1.0625rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.support-grid h3 i {
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 400;
}

.support-grid p {
  color: var(--muted);
  font-size: 0.9375rem;
}

.newsletter-hint {
  margin-top: 14px;
  font-size: 0.8875rem;
  color: rgba(248, 250, 252, 0.65);
  min-height: 1.35em;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.section-head p {
  color: var(--muted);
  max-width: 40ch;
  font-size: 1rem;
}

.mega-products .product {
  min-height: 100%;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-strip article {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(22px, 3vw, 28px);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s var(--ease), transform 0.25s var(--ease-out),
    box-shadow 0.25s var(--ease-out);
}

.feature-strip article:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: transparent;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  color: var(--accent);
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 14px;
  background: var(--accent-soft);
}

.feature-strip h3 {
  font-size: 1.0625rem;
  margin-bottom: 6px;
}

.feature-strip p {
  color: var(--muted);
  font-size: 0.9375rem;
  margin-top: 0;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.about-grid div {
  background: var(--bg-elevated);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.about-grid h3 {
  font-size: 1.06rem;
  margin-bottom: 8px;
}

.about-grid p {
  color: var(--muted);
  font-size: 0.9375rem;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.testimonial-grid article {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(22px, 3vw, 28px);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.testimonial-grid article::before {
  content: '"';
  font-size: 3rem;
  line-height: 1;
  color: var(--accent-soft);
  font-family: Georgia, serif;
  position: absolute;
  top: 12px;
  right: 18px;
  opacity: 0.85;
}

.testimonial-grid p {
  color: var(--muted);
  font-size: 0.9625rem;
}

.testimonial-grid h4 {
  margin-top: 16px;
  font-size: 0.9375rem;
  font-weight: 700;
}

.newsletter {
  text-align: center;
  border-radius: var(--radius-lg);
  padding: clamp(48px, 7vw, 64px) 24px;
  background:
    radial-gradient(circle at 20% 20%, rgba(232, 93, 59, 0.15), transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(56, 189, 248, 0.12), transparent 40%),
    linear-gradient(160deg, #0f172a, #172554 50%, #0c1222);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-lg);
}

.newsletter h2 {
  color: #fff;
}

.newsletter > p {
  color: rgba(248, 250, 252, 0.72);
  margin-bottom: 20px;
  max-width: 46ch;
  margin-left: auto;
  margin-right: auto;
}

.newsletter-form {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.newsletter-form input {
  width: min(380px, 100%);
  padding: 13px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.5);
  color: #fff;
  font-family: inherit;
  font-size: 0.9375rem;
  outline: none;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.newsletter-form input::placeholder {
  color: rgba(248, 250, 252, 0.45);
}

.newsletter-form input:focus {
  border-color: rgba(232, 93, 59, 0.55);
  background: rgba(15, 23, 42, 0.65);
}

.newsletter-form .btn {
  margin-top: 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding: clamp(40px, 6vw, 56px) 4% 24px;
  background: color-mix(in srgb, var(--bg-elevated) 40%, transparent);
}

.footer-inner {
  max-width: min(920px, 92%);
  margin: 0 auto 28px;
  display: grid;
  grid-template-columns: 2fr repeat(2, 1fr);
  gap: clamp(24px, 4vw, 40px);
  align-items: start;
}

.footer-brand {
  padding-right: 16px;
}

.footer-brand-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer-brand strong {
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
}

.footer-brand p {
  color: var(--muted);
  font-size: 0.9375rem;
  margin-top: 10px;
  max-width: 32ch;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-heading {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-soft);
  margin-bottom: 4px;
}

.footer-col a {
  color: var(--muted);
  font-size: 0.9375rem;
  transition: color 0.15s var(--ease);
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-copy {
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted);
  padding-top: 24px;
  border-top: 1px solid var(--line);
  max-width: min(920px, 92%);
  margin: 0 auto;
}

.cart-drawer {
  border-left: 1px solid var(--line-strong);
  position: fixed;
  right: -420px;
  top: 0;
  height: 100vh;
  height: 100dvh;
  width: min(392px, 92vw);
  background: color-mix(in srgb, var(--bg-elevated) 96%, transparent);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-left: 1px solid var(--line);
  box-shadow: -12px 0 48px rgba(0, 0, 0, 0.2);
  transition: right 0.38s var(--ease-out);
  z-index: 60;
  display: flex;
  flex-direction: column;
}

.cart-drawer.open {
  right: 0;
}

.cart-head,
.cart-foot {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.cart-foot {
  border-top: 1px solid var(--line);
  border-bottom: none;
}

.cart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-head h3 {
  font-size: 1.0625rem;
}

.cart-head button,
.icon-btn {
  border: none;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  color: var(--ink);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: background 0.2s var(--ease);
}

.cart-head button:hover,
.icon-btn:hover {
  background: color-mix(in srgb, var(--ink) 10%, transparent);
}

.cart-items {
  padding: 16px;
  display: grid;
  gap: 12px;
  overflow: auto;
  flex: 1;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--bg-elevated) 80%, transparent);
  font-size: 0.9375rem;
}

.cart-item-meta {
  flex-shrink: 0;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.cart-item-name {
  text-align: left;
  flex: 1;
  min-width: 0;
}

.cart-item-qty {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}

.qty-btn:hover {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  border-color: var(--line-strong);
}

.qty-value {
  min-width: 24px;
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.item-remove {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  margin-left: 8px;
  padding: 4px;
  border-radius: 8px;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.item-remove:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.checkout {
  width: 100%;
}

.checkout.is-disabled,
.checkout:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
  filter: grayscale(0.2);
}

.cart-backdrop {
  position: fixed;
  inset: 0;
  z-index: 59;
  background: rgba(8, 12, 22, 0.35);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 28px 16px 20px;
  color: var(--muted);
}

.cart-empty i {
  font-size: 2.75rem;
  color: var(--muted-soft);
  margin-bottom: 12px;
  opacity: 0.85;
}

.cart-empty p {
  font-weight: 600;
  color: var(--ink);
}

.cart-empty-hint {
  margin-top: 6px !important;
  font-weight: 400 !important;
  font-size: 0.8875rem !important;
  color: var(--muted) !important;
}

.cart-empty-cta {
  margin-top: 16px !important;
}

.cart-item-name {
  text-align: left;
}

.cart-item-meta {
  flex-shrink: 0;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 22, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 80;
  padding: max(12px, env(safe-area-inset-top, 0)) 12px max(12px, env(safe-area-inset-bottom, 0));
  overflow-y: auto;
  animation: overlayIn 0.25s var(--ease-out);
}

@keyframes overlayIn {
  from {
    opacity: 0;
  }
}

.modal-card {
  width: min(440px, 100%);
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: color-mix(in srgb, var(--bg-elevated) 98%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(18px, 4vw, 26px);
  box-shadow: var(--shadow-lg);
  animation: cardIn 0.35s var(--ease-out);
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.modal-close {
  border: none;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  color: var(--ink);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s var(--ease);
}

.modal-close:hover {
  background: color-mix(in srgb, var(--ink) 10%, transparent);
}

.auth-message {
  min-height: 22px;
  font-size: 0.8875rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form input {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  width: 100%;
  font-family: inherit;
  font-size: 0.9375rem;
  background: color-mix(in srgb, var(--bg-elevated) 80%, transparent);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.auth-form input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.password-group {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 8px;
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.password-toggle:hover {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  color: var(--ink);
}

.auth-submit {
  width: 100%;
}

.auth-switch {
  margin-top: 12px;
  border: none;
  background: transparent;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
}

.auth-switch:hover {
  color: var(--accent-hover);
}

.payment-receiver {
  font-size: 0.925rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.payment-order-summary {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.payment-demo-hint {
  display: block;
  margin-top: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
}

.form-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.form-field input {
  width: 100%;
}

.auth-form-pay .form-field {
  margin: 0;
}

.auth-message-error {
  color: #b42318 !important;
  font-weight: 600;
}

#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: min(360px, calc(100% - 32px));
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  background: color-mix(in srgb, var(--bg-elevated) 95%, transparent);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.35s var(--ease-out), opacity 0.35s var(--ease-out);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast i {
  color: #16a34a;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.toast-error i {
  color: #dc2626;
}

.toast-neutral i {
  color: #2563eb;
}

@keyframes slide {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 1100px) {
  .products {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1350px) {
  :root {
    --topbar-offset: 128px;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-wrap: nowrap;
    gap: 10px;
  }

  .logo {
    flex: 0 1 auto;
    min-width: 0;
  }

  .menu-toggle {
    display: inline-flex;
    flex: 0 0 auto;
  }

  .topbar-end {
    width: auto;
    min-width: 0;
    margin-left: auto;
  }

  .top-actions {
    width: auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
  }

  .auth-status {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    max-width: min(220px, 34vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .site-nav {
    position: fixed;
    top: calc(var(--topbar-offset) + env(safe-area-inset-top, 0));
    left: 4%;
    right: 4%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px;
    background: color-mix(in srgb, var(--bg-elevated) 95%, transparent);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 55;
    transform-origin: top center;
    transform: scale(0.97) translateY(-6px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    max-height: calc(100dvh - var(--topbar-offset) - 16px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out),
      visibility 0.25s;
  }

  .site-nav.nav-open {
    visibility: visible;
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
  }

  .site-nav a {
    border-radius: 12px;
  }

  .products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .about-grid,
  .feature-strip,
  .testimonial-grid,
  .support-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: block;
  }

  .section-head p {
    margin-top: 10px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand-row {
    justify-content: center;
  }

  .footer-brand p {
    margin-left: auto;
    margin-right: auto;
  }

  .footer-col {
    align-items: center;
  }
}

@media (max-width: 700px) {
  .cat-grid,
  .products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  :root {
    --topbar-offset: 140px;
  }

  .topbar {
    gap: 10px;
  }

  .topbar-end {
    gap: 8px;
  }

  .top-actions {
    gap: 8px;
  }

  .auth-status {
    max-width: 42vw;
    padding-inline: 10px;
    font-size: 0.78rem;
  }

  .products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .top-actions .auth-btn {
    padding-inline: 12px;
  }

  #toast-container {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }
}

/* Dashboard Button */
.dashboard-btn {
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s var(--ease-out), border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.dashboard-btn:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

@media (max-width: 520px) {
  .dashboard-btn .btn-text {
    display: none;
  }
  .dashboard-btn {
    width: 42px;
    height: 42px;
    padding: 0;
    justify-content: center;
  }
}

/* Modals sizing overrides */
.modal-card-dashboard {
  max-width: min(680px, 95vw);
}

.modal-card-profile-edit {
  max-width: min(480px, 95vw);
}

.modal-card-receipt {
  max-width: min(440px, 95vw);
}

/* Dashboard Profile Layout */
.dashboard-profile-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  min-width: 150px;
}

.dashboard-profile-actions .btn,
.dashboard-profile-actions .edit-profile-btn {
  width: 100%;
  justify-content: center;
}

.dashboard-profile-section {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px;
  background: color-mix(in srgb, var(--bg-elevated) 90%, var(--accent-soft));
  border-radius: var(--radius);
  border: 1px solid var(--line);
  margin-bottom: 20px;
}

  .profile-avatar-wrap {
  position: relative;
  flex: 0 0 auto;
  }

  .profile-info {
  min-width: 0;
  flex: 1 1 180px;
}

  .profile-avatar {
  width: 84px;
  height: 84px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: auto;
}

.edit-profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-badge-text);
  padding: 10px 14px;
  border-radius: 999px;
  font: 700 .84rem inherit;
  cursor: pointer;
  white-space: nowrap;
}

.edit-profile-btn:hover {
  background: color-mix(in srgb, var(--accent) 22%, var(--bg-elevated));
}

button.is-loading {
  position: relative;
  pointer-events: none;
  color: transparent !important;
}

button.is-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: button-spin 0.7s linear infinite;
  color: var(--accent);
}

@keyframes button-spin {
  to { transform: rotate(360deg); }
}

.profile-upload-btn {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  border: 2px solid var(--bg-elevated);
  cursor: pointer;
  font-size: .72rem;
}

.checkout-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 520px) {
  .checkout-contact-grid { grid-template-columns: 1fr; gap: 0; }
  .dashboard-profile-section { align-items: flex-start; flex-wrap: wrap; }
  .edit-profile-btn { margin-left: 0; width: 100%; justify-content: center; }
}

.profile-info h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.profile-info p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.profile-status-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  color: var(--muted);
}

/* Orders List Layout */
.dashboard-orders-section h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.orders-list {
  max-height: 280px;
  overflow-y: auto;
  display: grid;
  gap: 10px;
  padding-right: 4px;
}

.orders-list::-webkit-scrollbar {
  width: 6px;
}

.orders-list::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 999px;
}

.order-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--bg-elevated) 80%, transparent);
  font-size: 0.875rem;
}

.order-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.order-date {
  font-weight: 600;
}

.order-meta {
  color: var(--muted);
  font-size: 0.8125rem;
}

.order-actions-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.order-status-badge {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.order-status-badge.completed {
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
}

.order-status-badge.pending {
  background: rgba(217, 119, 6, 0.12);
  color: #d97706;
}

.order-status-badge.failed {
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
}

.view-receipt-btn {
  border: 1px solid var(--line-strong);
  background: var(--bg-elevated);
  color: var(--ink);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  transition: background 0.2s var(--ease);
}

.view-receipt-btn:hover {
  background: color-mix(in srgb, var(--ink) 5%, transparent);
}

.no-orders-hint {
  text-align: center;
  padding: 32px;
  color: var(--muted);
  font-size: 0.9rem;
}

.no-orders-hint i {
  display: block;
  font-size: 2rem;
  margin-bottom: 8px;
  color: var(--muted-soft);
}

/* Premium Receipt Styling */
.receipt-body {
  font-family: 'Courier New', Courier, monospace;
  background: #fdfdfd;
  color: #111827;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.02);
  margin-bottom: 20px;
  position: relative;
}

[data-theme="dark"] .receipt-body {
  background: #fafafa; /* Keep receipt light for paper style, but adapt container borders */
  border-color: #374151;
}

.receipt-header {
  text-align: center;
  margin-bottom: 16px;
}

.receipt-header h4 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0;
}

.receipt-header p {
  font-size: 0.8rem;
  color: #6b7280;
  margin: 2px 0 0 0;
}

.receipt-divider {
  border-top: 1px dashed #9ca3af;
  margin: 12px 0;
}

.receipt-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  font-size: 0.8rem;
  margin-bottom: 14px;
}

.receipt-meta-label {
  color: #4b5563;
}

.receipt-meta-val {
  text-align: right;
  font-weight: 700;
  word-break: break-all;
}

.receipt-table-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  font-weight: 700;
  font-size: 0.8rem;
  padding-bottom: 6px;
  border-bottom: 1px solid #d1d5db;
  margin-bottom: 8px;
}

.receipt-items-list {
  display: grid;
  gap: 6px;
  font-size: 0.8rem;
}

.receipt-item-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  align-items: center;
}

.receipt-item-row .qty {
  text-align: center;
}

.receipt-item-row .price-val {
  text-align: right;
}

.receipt-total-row {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  font-size: 1rem;
  margin-top: 14px;
  padding-top: 8px;
  border-top: 1px solid #d1d5db;
}

.receipt-footer-note {
  text-align: center;
  font-size: 0.72rem;
  color: #6b7280;
  margin-top: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.receipt-actions {
  display: flex;
  justify-content: flex-end;
}

.print-btn {
  font-size: 0.85rem;
  padding: 8px 16px;
}

/* Responsive safety rails */
img,
video,
canvas,
svg {
  max-width: 100%;
}

.modal {
  padding: 12px;
  align-items: flex-start;
  overflow-y: auto;
}

.modal-card {
  width: min(100%, 680px);
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

@media (max-width: 700px) {
  main {
    padding-inline: 0;
  }

  .section,
  .hero,
  .demo-notice,
  .footer-inner {
    width: min(94%, 1180px);
  }

  .hero {
    gap: 24px;
  }

  .section-head h2 {
    font-size: clamp(1.35rem, 5vw, 1.8rem);
  }

  .product-card,
  .cat-grid article {
    min-width: 0;
  }

  .product-card h3,
  .cat-grid h3 {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 420px) {
  .topbar {
    padding-inline: 3%;
  }

  .auth-status {
    max-width: 36vw;
  }

  .modal {
    padding: 8px;
  }

  .modal-card {
    max-height: calc(100dvh - 16px);
    border-radius: 18px;
  }

  .checkout-contact-grid {
    gap: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .product {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .product:hover .product-img-wrap img {
    transform: none;
  }
}

/* Dark theme specific overrides for premium visuals */
[data-theme="dark"] .banner {
  background:
    linear-gradient(135deg, rgba(21, 28, 44, 0.6), rgba(21, 28, 44, 0.3)),
    linear-gradient(120deg, #1e1b4b, #311042, #0b0f19);
  border-color: var(--line);
}

/* Mobile layout refinements: keep shared controls and content inside the viewport. */
@media (max-width: 700px) {
  .topbar {
    padding: 10px max(12px, env(safe-area-inset-right)) 10px max(12px, env(safe-area-inset-left));
    gap: 8px;
  }

  .logo {
    gap: 7px;
    font-size: clamp(.98rem, 4.4vw, 1.12rem);
    white-space: nowrap;
    flex: 1 1 auto;
    min-width: 0;
  }

  .logo .demo-badge {
    margin-left: 2px;
    padding-inline: 6px;
    font-size: .56rem;
  }

  .menu-toggle,
  .theme-btn,
  .dashboard-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }

  .menu-toggle { order: 3; }
  .topbar-end { order: 2; margin-left: auto; }
  .top-actions { gap: 6px; }
  .auth-status { max-width: 25vw; padding: 7px 9px; font-size: .72rem; }
  .top-actions .auth-btn { padding: 8px 10px; font-size: .78rem; }
  .cart-btn { padding: 8px 10px; gap: 5px; }

  .site-nav {
    top: calc(60px + env(safe-area-inset-top, 0));
    left: 12px;
    right: 12px;
  }

  .demo-notice { width: calc(100% - 24px); margin-top: 16px; padding: 12px; }
  .demo-notice a { margin-left: 50px; }

  .hero,
  section { width: calc(100% - 24px); }
  .hero h1 { font-size: clamp(2rem, 10vw, 2.7rem); }
  .hero-btns > * { flex: 1 1 100%; }
  .hero-image-container img { min-height: 220px; object-fit: cover; }

  .products { gap: 12px; }
  .product-details { padding: 12px; gap: 9px; }
  .product-header { gap: 6px; }
  .product h3 { font-size: .9rem; overflow-wrap: anywhere; }
  .rating { gap: 4px; font-size: .73rem; }
  .rating .reviews { font-size: .68rem; }
  .price-row {
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
  }
  .price { font-size: .98rem; }
  .add { width: 100%; min-height: 40px; padding: 9px 10px; }

  .catalog-toolbar { align-items: stretch; padding: 12px; gap: 10px; }
  .catalog-search-wrap, .catalog-sort-wrap { width: 100%; flex-basis: 100%; }
  .catalog-sort-wrap { justify-content: space-between; }
  .catalog-sort-wrap select { flex: 1; min-width: 0; }
  .catalog-filters { width: 100%; }
  .filter-chip { flex: 1 1 auto; min-height: 40px; padding-inline: 10px; }

  .newsletter-form { flex-direction: column; }
  .newsletter-form input, .newsletter-form .btn { width: 100%; }
  .footer-inner { width: calc(100% - 24px); }

  .cart-drawer { width: min(100vw, 392px); }
  .cart-item { gap: 8px; }
  .cart-item-meta { flex-wrap: wrap; justify-content: flex-end; }

  .modal { padding: max(8px, env(safe-area-inset-top, 0)) 8px max(8px, env(safe-area-inset-bottom, 0)); }
  .modal-card { width: 100%; max-width: 100%; padding: 16px; }
  .modal-head h3 { min-width: 0; font-size: 1.05rem; overflow-wrap: anywhere; }
  .dashboard-profile-section { padding: 12px; gap: 12px; }
  .profile-info { flex-basis: calc(100% - 96px); }
  .profile-info p { overflow-wrap: anywhere; }
  .order-item { align-items: stretch; flex-direction: column; gap: 10px; }
  .order-actions-wrap { justify-content: space-between; flex-wrap: wrap; gap: 8px; }
  .receipt-table-header, .receipt-item-row { grid-template-columns: minmax(0, 2fr) 32px minmax(0, 1fr); }
  .receipt-body { padding: 14px 10px; overflow-x: auto; }
  .receipt-actions, .receipt-actions .btn { width: 100%; }
}

@media (max-width: 360px) {
  .logo { font-size: .95rem; }
  .logo .demo-badge { display: none; }
  .auth-status { display: none; }
  .top-actions .auth-btn { padding-inline: 8px; }
  .theme-btn, .dashboard-btn, .menu-toggle { width: 38px; min-width: 38px; height: 38px; }
  .cart-btn { padding-inline: 8px; }
  /* Keep account access available as the compact dashboard icon on phones. */
  .top-actions .auth-btn { display: none; }
  .top-actions .dashboard-btn { display: inline-flex; align-items: center; justify-content: center; }
  .products { gap: 8px; }
  .product-details { padding: 10px; }
  .product h3 { font-size: .82rem; }
  .price { font-size: .9rem; }
}

/* Keep the mobile header predictable: menu left, brand center, cart/auth right. */
@media (max-width: 520px) {
  .topbar {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .menu-toggle {
    order: 1;
    flex: 0 0 40px;
    position: relative;
    z-index: 2;
  }

  .logo {
    order: 2;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .topbar-end {
    order: 3;
    flex: 0 0 auto;
    margin-left: 0;
  }

  .top-actions {
    flex-wrap: nowrap;
    gap: 6px;
  }

  .auth-status,
  .dashboard-btn,
  .theme-btn {
    display: none;
  }

  .top-actions .auth-btn {
    white-space: nowrap;
  }

  .cart-btn {
    position: relative;
    z-index: 2;
  }
}

/* Keep account access in the compact mobile header. */
@media (max-width: 600px) {
  .topbar { gap: 8px; }
  .menu-toggle { order: 1; flex: 0 0 auto; }
  .logo { order: 2; min-width: 0; flex: 1 1 auto; justify-content: center; }
  .topbar-end { order: 3; margin-left: 0; }
  .top-actions .auth-btn { display: none; }
  .top-actions .dashboard-btn {
    display: inline-flex;
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0;
    align-items: center;
    justify-content: center;
  }
  .top-actions .dashboard-btn .btn-text { display: none; }
}
