/* ============================================================================
 * Taheri Plastic & Crockery — Storefront Stylesheet
 * ----------------------------------------------------------------------------
 * A modern glassmorphic design system.
 *   - Warm terracotta + teal brand palette on a soft gradient backdrop.
 *   - Frosted translucent "glass" surfaces (backdrop-filter: blur).
 *   - Light + dark themes driven by [data-theme] on <html>.
 *   - Mobile-first & fully responsive.
 * All colours/spacing are CSS custom properties so theming stays in one place.
 * ==========================================================================*/

/* ── Design tokens ─────────────────────────────────────────────────────── */
:root {
  /* Brand */
  --brand: #ec6a35;          /* terracotta — a touch more vivid */
  --brand-600: #d5541f;
  --brand-700: #b24417;
  --accent: #10bca8;         /* teal */
  --accent-600: #0a9a8b;
  --gold: #e2a83a;

  /* Semantic */
  --success: #15a34a;
  --danger: #e5484d;
  --warning: #e08700;
  --info: #3b82f6;

  /* Light theme surfaces & text */
  --bg-1: #fcf6f1;
  --bg-2: #f8eee5;
  --bg-3: #edf7f4;
  --text: #221b17;
  --text-soft: #675a51;
  --text-muted: #9c8d82;
  --border: rgba(120, 90, 70, 0.13);

  /* Glass */
  --glass-bg: rgba(255, 255, 255, 0.58);
  --glass-bg-strong: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(255, 255, 255, 0.7);
  --glass-blur: 20px;

  /* Brand gradients (reusable) */
  --grad-brand: linear-gradient(135deg, var(--brand), var(--brand-600));
  --grad-accent: linear-gradient(135deg, var(--accent), var(--accent-600));
  --grad-hero: linear-gradient(120deg, var(--brand), var(--gold) 55%, var(--accent));

  /* Elevation — layered, soft, contemporary */
  --shadow-sm: 0 1px 2px rgba(90, 60, 40, 0.05), 0 2px 8px rgba(90, 60, 40, 0.07);
  --shadow-md: 0 4px 12px rgba(90, 60, 40, 0.07), 0 14px 34px rgba(90, 60, 40, 0.12);
  --shadow-lg: 0 8px 22px rgba(70, 45, 30, 0.12), 0 30px 70px rgba(70, 45, 30, 0.22);
  --ring: 0 0 0 3px rgba(236, 106, 53, 0.26);

  /* Geometry */
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;
  --radius-pill: 999px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.5, 1);
  --dur: 0.28s;

  --nav-h: 70px;
  --maxw: 1240px;
}

/* Dark theme overrides */
[data-theme='dark'] {
  --bg-1: #14100d;
  --bg-2: #1b1511;
  --bg-3: #0d1817;
  --text: #f5efe9;
  --text-soft: #c8bcb2;
  --text-muted: #97897e;
  --border: rgba(255, 235, 220, 0.11);

  --glass-bg: rgba(42, 33, 27, 0.52);
  --glass-bg-strong: rgba(46, 36, 29, 0.8);
  --glass-border: rgba(255, 240, 225, 0.09);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 10px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.4), 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 26px rgba(0, 0, 0, 0.5), 0 34px 74px rgba(0, 0, 0, 0.62);
  --ring: 0 0 0 3px rgba(236, 106, 53, 0.36);
}

/* ── Reset & base ──────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

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

body {
  font-family: 'Plus Jakarta Sans', 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  background:
    radial-gradient(1100px 700px at 6% -10%, rgba(236, 106, 53, 0.26), transparent 58%),
    radial-gradient(1000px 720px at 102% -4%, rgba(16, 188, 168, 0.22), transparent 54%),
    radial-gradient(760px 760px at 96% 108%, rgba(226, 168, 58, 0.14), transparent 60%),
    radial-gradient(820px 820px at 20% 120%, rgba(16, 188, 168, 0.1), transparent 60%),
    linear-gradient(160deg, var(--bg-1), var(--bg-2) 45%, var(--bg-3));
  background-attachment: fixed;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

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

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

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

button {
  cursor: pointer;
  border: none;
  background: none;
}

h1,
h2,
h3 {
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.01em;
}

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--radius-sm);
}

::selection {
  background: color-mix(in srgb, var(--brand) 26%, transparent);
  color: var(--text);
}

/* Refined thin scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--text-muted) 45%, transparent) transparent;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--text-muted) 42%, transparent);
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  background-clip: content-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--brand) 55%, transparent);
  background-clip: content-box;
}

/* Utility */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden {
  display: none !important;
}

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

/* ── Glass surface primitive ───────────────────────────────────────────── */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
}

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.62rem 1.15rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.94rem;
  line-height: 1;
  white-space: nowrap;
  transition: transform var(--dur) var(--ease-spring), box-shadow var(--dur) var(--ease),
    background var(--dur) var(--ease), border-color var(--dur) var(--ease), opacity var(--dur), filter var(--dur);
  border: 1px solid transparent;
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn--primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-600));
  color: #fff;
  box-shadow: 0 8px 22px rgba(207, 90, 38, 0.35);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(207, 90, 38, 0.45);
}

.btn--accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-600));
  color: #fff;
  box-shadow: 0 8px 22px rgba(13, 148, 136, 0.32);
}

.btn--accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(10, 154, 139, 0.42);
}

.btn--ghost {
  background: var(--glass-bg);
  border-color: var(--glass-border);
  color: var(--text);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

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

.btn--danger {
  background: transparent;
  border-color: var(--danger);
  color: var(--danger);
}

.btn--danger:hover {
  background: var(--danger);
  color: #fff;
}

.btn--block {
  width: 100%;
}

.btn--sm {
  padding: 0.42rem 0.8rem;
  font-size: 0.85rem;
}

.btn--lg {
  padding: 0.85rem 1.6rem;
  font-size: 1.02rem;
}

/* Icon-only round button */
.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-pill);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 1.15rem;
  transition: transform var(--dur) var(--ease-spring), border-color var(--dur), background var(--dur), color var(--dur);
}

.icon-btn:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 10%, var(--glass-bg));
}

/* ── Navbar ────────────────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem clamp(16px, 4vw, 32px);
  background: var(--glass-bg-strong);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.brand__logo {
  font-size: 1.6rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.brand__name {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand__name small {
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 600;
}

.brand__name b {
  font-size: 0.98rem;
  font-weight: 700;
}

.nav-search {
  flex: 1;
  max-width: 460px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.35rem 0.35rem 0.9rem;
  border-radius: var(--radius-pill);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}

.nav-search input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-size: 0.92rem;
}

.nav-search input::placeholder {
  color: var(--text-muted);
}

.nav-search button {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--brand), var(--brand-600));
  color: #fff;
  display: grid;
  place-items: center;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

/* Cart button live badge */
.cart-btn {
  position: relative;
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--brand);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 2px solid var(--glass-bg-strong);
  transform: scale(0);
  transition: transform var(--dur) var(--ease);
}

.cart-badge.show {
  transform: scale(1);
}

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero {
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(1.5rem, 3vw, 2.5rem);
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(1.6rem, 4vw, 3rem);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.hero__inner::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(16, 188, 168, 0.16), transparent 60%),
    radial-gradient(560px 320px at 0% 100%, rgba(236, 106, 53, 0.14), transparent 60%);
}

.hero__inner > * {
  position: relative;
  z-index: 1;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  background: rgba(20, 184, 166, 0.14);
  color: var(--accent-600);
  font-weight: 600;
  font-size: 0.82rem;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.3rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

.hero h1 .grad {
  background: linear-gradient(120deg, var(--brand), var(--gold) 45%, var(--accent), var(--brand) 90%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradShift 8s var(--ease) infinite;
}

@keyframes gradShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero p {
  color: var(--text-soft);
  font-size: clamp(0.98rem, 2vw, 1.1rem);
  max-width: 44ch;
  margin-bottom: 1.6rem;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.hero__stats {
  display: flex;
  gap: 1.6rem;
  margin-top: 2rem;
}

.hero__stats div b {
  display: block;
  font-size: 1.5rem;
  color: var(--brand);
}

.hero__stats div span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.hero__art {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(226, 112, 58, 0.2), rgba(20, 184, 166, 0.2));
  display: grid;
  place-items: center;
  overflow: hidden;
}

.hero__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__float {
  position: absolute;
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.85rem;
  animation: floaty 5s var(--ease) infinite;
}

.hero__float--1 {
  top: 12%;
  left: -6%;
}

.hero__float--2 {
  bottom: 10%;
  right: -4%;
  animation-delay: 1.4s;
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ── Section headings ──────────────────────────────────────────────────── */
.section {
  padding: clamp(1.5rem, 3vw, 2.5rem) 0;
}

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
  flex-wrap: wrap;
}

.section__head h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.section__head p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ── Toolbar: chips + sort + price ─────────────────────────────────────── */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

.chips {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  flex: 1;
  min-width: 0;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.chip {
  flex-shrink: 0;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-pill);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-soft);
  transition: all var(--dur) var(--ease);
}

.chip:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.chip.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-600));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(207, 90, 38, 0.32);
}

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

.toolbar__group label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.select,
.input {
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  border: 1px solid var(--border);
  outline: none;
  font-size: 0.88rem;
  transition: border-color var(--dur), box-shadow var(--dur);
}

.select:focus,
.input:focus {
  border-color: var(--brand);
  box-shadow: var(--ring);
}

.price-input {
  width: 92px;
}

/* ── Product grid ──────────────────────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: clamp(1rem, 2.5vw, 1.6rem);
}

.product-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--dur) var(--ease-spring), box-shadow var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
  animation: rise var(--dur) var(--ease) both;
}

.product-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--brand) 45%, var(--glass-border));
}

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

.product-card__media {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-2);
}

.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.product-card:hover .product-card__media img {
  transform: scale(1.07);
}

.badge {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  padding: 0.28rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-700));
  box-shadow: var(--shadow-sm);
}

.badge--stock {
  left: auto;
  right: 0.7rem;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
}

.product-card__body {
  padding: 0.9rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.product-card__cat {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-600);
  font-weight: 600;
}

.product-card__name {
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

.product-card__name:hover {
  color: var(--brand);
}

.rating {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.stars {
  --pct: 0%;
  position: relative;
  display: inline-block;
  font-size: 0.92rem;
  line-height: 1;
  letter-spacing: 1px;
  color: rgba(150, 130, 110, 0.4);
}

.stars::before {
  content: '★★★★★';
}

.stars > span {
  position: absolute;
  inset: 0;
  width: var(--pct);
  overflow: hidden;
  color: var(--gold);
  white-space: nowrap;
}

.stars > span::before {
  content: '★★★★★';
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: auto;
}

.price {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
}

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

.discount-pct {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--success);
}

.product-card__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.7rem;
}

/* ── Skeleton loaders ──────────────────────────────────────────────────── */
.skeleton {
  border-radius: var(--radius);
  overflow: hidden;
}

.skeleton .sk {
  background: linear-gradient(
    100deg,
    rgba(150, 130, 110, 0.1) 30%,
    rgba(150, 130, 110, 0.22) 50%,
    rgba(150, 130, 110, 0.1) 70%
  );
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
}

.skeleton .sk--media { aspect-ratio: 1; }
.skeleton .sk--line { height: 14px; border-radius: 6px; margin: 0.6rem 1rem; }
.skeleton .sk--line.short { width: 55%; }

@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* Load more / empty */
.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-state .emoji {
  font-size: 3rem;
  margin-bottom: 0.6rem;
}

/* ── Overlay + panels (modals, cart, drawers) ──────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(30, 18, 10, 0.42);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur) var(--ease), visibility var(--dur);
}

.overlay.open {
  opacity: 1;
  visibility: visible;
}

/* Modal (centered) */
.modal {
  position: fixed;
  z-index: 210;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  pointer-events: none;
}

.modal__card {
  width: min(760px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--radius-lg);
  background: var(--glass-bg-strong);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
  transform: translateY(24px) scale(0.97);
  opacity: 0;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
  pointer-events: auto;
}

.modal.open .modal__card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal--sm .modal__card {
  width: min(440px, 100%);
}

.modal__head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  background: linear-gradient(var(--glass-bg-strong), rgba(0, 0, 0, 0));
  border-bottom: 1px solid var(--border);
}

.modal__head h3 {
  font-size: 1.15rem;
}

.modal__body {
  padding: 1.4rem;
}

/* Slide-in cart / drawer */
.drawer {
  position: fixed;
  z-index: 210;
  top: 0;
  right: 0;
  height: 100%;
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-left: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform var(--dur) var(--ease);
}

.drawer.open {
  transform: translateX(0);
}

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.3rem;
  border-bottom: 1px solid var(--border);
}

.drawer__head h3 {
  font-size: 1.15rem;
}

.drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.3rem;
}

.drawer__foot {
  padding: 1.1rem 1.3rem;
  border-top: 1px solid var(--border);
  background: var(--glass-bg);
}

/* ── Cart line items ───────────────────────────────────────────────────── */
.cart-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 0.8rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.cart-item__img {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-2);
}

.cart-item__name {
  font-size: 0.9rem;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cart-item__price {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.qty {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.qty button {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--glass-bg);
  border: 1px solid var(--border);
  font-weight: 700;
  display: grid;
  place-items: center;
  transition: border-color var(--dur), color var(--dur);
}

.qty button:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.qty span {
  min-width: 22px;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
}

.cart-item__right {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
}

.cart-item__total {
  font-weight: 700;
}

.link-danger {
  color: var(--danger);
  font-size: 0.78rem;
  background: none;
}

.link-danger:hover {
  text-decoration: underline;
}

/* Coupon + summary rows */
.coupon-row {
  display: flex;
  gap: 0.5rem;
  margin: 0.8rem 0;
}

.coupon-row .input {
  flex: 1;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  padding: 0.28rem 0;
  color: var(--text-soft);
}

.summary-row.total {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  border-top: 1px dashed var(--border);
  margin-top: 0.5rem;
  padding-top: 0.7rem;
}

.summary-row .free {
  color: var(--success);
  font-weight: 600;
}

/* ── Forms ─────────────────────────────────────────────────────────────── */
.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 0.35rem;
}

.field .input,
.field .select,
.field textarea {
  width: 100%;
}

.field textarea {
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  border: 1px solid var(--border);
  outline: none;
  resize: vertical;
  min-height: 84px;
}

.field textarea:focus {
  border-color: var(--brand);
  box-shadow: var(--ring);
}

.field .error {
  color: var(--danger);
  font-size: 0.76rem;
  margin-top: 0.25rem;
  min-height: 1em;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}

/* Tabs (auth modal) */
.tabs {
  display: flex;
  gap: 0.4rem;
  padding: 0.3rem;
  border-radius: var(--radius-pill);
  background: var(--glass-bg);
  border: 1px solid var(--border);
  margin-bottom: 1.4rem;
}

.tab {
  flex: 1;
  padding: 0.55rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-soft);
  transition: all var(--dur) var(--ease);
}

.tab.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-600));
  color: #fff;
  box-shadow: var(--shadow-sm);
}

/* ── Product detail modal ──────────────────────────────────────────────── */
.pd {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
}

.pd__gallery-main {
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-2);
}

.pd__gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd__thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
}

.pd__thumb {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
}

.pd__thumb.active {
  border-color: var(--brand);
}

.pd__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd h3 {
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
}

.pd__price {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin: 0.6rem 0;
}

.pd__desc {
  color: var(--text-soft);
  font-size: 0.92rem;
  margin: 0.8rem 0;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  margin: 0.8rem 0;
}

.spec-table td {
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--border);
}

.spec-table td:first-child {
  color: var(--text-muted);
  text-transform: capitalize;
  width: 45%;
}

.spec-table td:last-child {
  font-weight: 600;
}

.pd__buy {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 1rem;
}
.pd__buy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}
.pd__buy-actions {
  display: flex;
  gap: 0.6rem;
}
.pd__buy-actions .btn { flex: 1; }

/* Reviews */
.reviews {
  margin-top: 1.6rem;
  border-top: 1px solid var(--border);
  padding-top: 1.2rem;
}

.review {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}

.review__head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
}

.review__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.review__meta b {
  font-size: 0.9rem;
}

.review__meta .verified {
  font-size: 0.72rem;
  color: var(--success);
  font-weight: 600;
}

.review__title {
  font-weight: 600;
  font-size: 0.92rem;
  margin: 0.2rem 0;
}

.review__comment {
  font-size: 0.88rem;
  color: var(--text-soft);
}

/* Star picker (add review) */
.star-picker {
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 0.2rem;
  font-size: 1.6rem;
}

.star-picker input {
  display: none;
}

.star-picker label {
  color: rgba(150, 130, 110, 0.4);
  cursor: pointer;
  transition: color 0.15s;
}

.star-picker label:hover,
.star-picker label:hover ~ label,
.star-picker input:checked ~ label {
  color: var(--gold);
}

/* ── Account dashboard ─────────────────────────────────────────────────── */
.account-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}

.account-panel {
  display: grid;
  gap: 1rem;
}

.card {
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
}

.card h4 {
  font-size: 1.02rem;
  margin-bottom: 0.8rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.stat {
  border-radius: var(--radius);
  padding: 1.1rem;
  text-align: center;
}

.stat b {
  display: block;
  font-size: 1.7rem;
  color: var(--brand);
}

.stat span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Order list */
.order {
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  align-items: center;
  justify-content: space-between;
}

.order__num {
  font-weight: 700;
  font-size: 0.94rem;
}

.order__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.pill {
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: capitalize;
}

.pill--pending { background: rgba(217, 119, 6, 0.16); color: var(--warning); }
.pill--confirmed { background: rgba(37, 99, 235, 0.16); color: var(--info); }
.pill--shipped { background: rgba(20, 184, 166, 0.16); color: var(--accent-600); }
.pill--delivered { background: rgba(22, 163, 74, 0.16); color: var(--success); }
.pill--cancelled,
.pill--refunded,
.pill--returned { background: rgba(220, 38, 38, 0.14); color: var(--danger); }

/* Tracking timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 0.6rem;
}

.tl-step {
  display: flex;
  gap: 0.8rem;
  position: relative;
  padding-bottom: 1.1rem;
}

.tl-step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 24px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.tl-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--glass-bg);
  border: 2px solid var(--border);
  font-size: 0.7rem;
  z-index: 1;
}

.tl-step.done .tl-dot {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.tl-label b {
  font-size: 0.9rem;
}

.tl-label span {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* Referral share box */
.share-box {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.code-chip {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(20, 184, 166, 0.14);
  color: var(--accent-600);
}

/* Checkout steps */
.checkout-summary {
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-top: 1rem;
}

.pay-methods {
  display: grid;
  gap: 0.6rem;
  margin: 0.5rem 0 1rem;
}

.pay-method {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: border-color var(--dur), background var(--dur);
}

.pay-method:has(input:checked) {
  border-color: var(--brand);
  background: rgba(226, 112, 58, 0.08);
}

.pay-method input {
  accent-color: var(--brand);
}

.order-confirm {
  text-align: center;
  padding: 1rem;
}

.order-confirm .tick {
  width: 76px;
  height: 76px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--success), var(--accent-600));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 2.4rem;
  animation: pop 0.5s var(--ease);
}

@keyframes pop {
  0% { transform: scale(0); }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* ── Toasts ────────────────────────────────────────────────────────────── */
.toasts {
  position: fixed;
  z-index: 300;
  bottom: 1.2rem;
  right: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: min(360px, calc(100vw - 2rem));
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius);
  background: var(--glass-bg-strong);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  font-weight: 500;
  animation: toastIn var(--dur) var(--ease);
  border-left: 4px solid var(--info);
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }

.toast.leaving {
  animation: toastOut var(--dur) var(--ease) forwards;
}

@keyframes toastIn {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes toastOut {
  to { transform: translateX(120%); opacity: 0; }
}

/* ── Footer ────────────────────────────────────────────────────────────── */
.footer {
  margin-top: 3rem;
  padding: 2.5rem 0 2rem;
  border-top: 1px solid var(--border);
  background: var(--glass-bg);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 2rem;
}

.footer h5 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.footer a {
  display: block;
  color: var(--text-soft);
  font-size: 0.9rem;
  padding: 0.2rem 0;
  transition: color var(--dur);
}

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

.footer__bottom {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ── Reveal-on-scroll ──────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* ── Multi-page layout (router views) ──────────────────────────────────── */
/* Navbar text link ("Shop") */
.nav-link {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
  text-decoration: none;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: color 0.18s ease, background 0.18s ease;
}
.nav-link:hover { color: var(--brand); background: var(--glass-bg); }

/* Every routed page gets breathing room below the fixed navbar */
.page { padding-block: clamp(1.4rem, 3vw, 2.6rem); }
.page > h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 1rem; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 1rem;
  transition: color 0.18s ease;
}
.back-link:hover { color: var(--brand); }

/* Auth page — centered card */
.auth-page { display: flex; justify-content: center; }
.auth-card {
  width: 100%;
  max-width: 440px;
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.6rem 1.8rem;
}
.auth-card .tabs { margin-bottom: 1.2rem; }

/* Cart page — items + sticky summary */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.4rem;
  align-items: start;
}
.cart-side {
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  position: sticky;
  top: 90px;
}
.cart-side h3 { font-size: 1.05rem; margin-bottom: 0.9rem; }

/* Checkout page — form + summary */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.4rem;
  align-items: start;
  margin-top: 1rem;
}
.checkout-main { border-radius: var(--radius); padding: 1.3rem; }
.checkout-summary { position: sticky; top: 90px; }

/* Account page — horizontal sub-nav of routed tabs */
.account-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1.3rem;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 0.9rem;
}
.account-nav__link {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-pill);
  transition: color 0.18s ease, background 0.18s ease;
}
.account-nav__link:hover { color: var(--brand); }
.account-nav__link.active { color: #fff; background: var(--grad-brand); }

/* Disabled routed buttons (e.g. Checkout with empty cart) */
.btn.disabled { opacity: 0.5; pointer-events: none; }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__art { order: -1; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
  .cart-side, .checkout-summary { position: static; }
}

@media (max-width: 760px) {
  .nav-search { display: none; }
  .nav-search.mobile-show {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0.6rem;
    max-width: none;
  }
  .brand__name small { display: none; }
  .pd { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .form-grid { grid-template-columns: 1fr; }
  .hero__float { display: none; }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .toasts { left: 1rem; right: 1rem; bottom: 1rem; max-width: none; }
  .section__head { align-items: flex-start; }
}

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

/* ══════════════════════════════════════════════════════════════════════════
 * V2 — full-width contained navbar, shop sidebar + grid/list, drawers,
 * cart alignment, richer homepage, account sidebar, auth split, pw-eye.
 * Appended last so these rules win ties over the originals above.
 * ════════════════════════════════════════════════════════════════════════ */

body.no-scroll { overflow: hidden; }

/* ── Navbar: full-width bar, content contained to --maxw ─────────────────── */
.navbar { padding-inline: 0; gap: 0; }
.navbar__inner {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.navbar__inner .brand { order: 1; }
/* Centered primary nav — margin-inline:auto absorbs the free space either side. */
.nav-menu { order: 2; display: flex; align-items: center; justify-content: center; gap: 0.15rem; margin-inline: auto; }
.nav-actions { order: 4; }
.menu-btn { order: 0; }

/* Search is icon-only at every width → clicking opens a top-centered overlay. */
.menu-btn { display: none; }
.search-toggle { display: inline-flex; }

/* Single shared badge style for cart + wishlist icons */
.nav-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--brand);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 2px solid var(--glass-bg-strong);
  transform: scale(0);
  transition: transform var(--dur) var(--ease);
}
.nav-badge.show { transform: scale(1); }
.wish-link .nav-badge { background: var(--danger); }
.wish-link { color: var(--danger); }

/* ── Search overlay: top-centered panel toggled by the search icon ───────── */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 220;
  display: flex;
  justify-content: center;
  padding: clamp(1rem, 4vh, 2.2rem) 1rem;
  transform: translateY(-130%);
  transition: transform var(--dur) var(--ease);
  pointer-events: none;
}
.search-overlay.open { transform: translateY(0); pointer-events: auto; }
.search-overlay__form {
  width: min(640px, 100%);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.55rem 0.5rem 1rem;
  border-radius: var(--radius-pill);
  background: var(--glass-bg-strong);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
}
.search-overlay__icon { font-size: 1.1rem; color: var(--text-muted); flex-shrink: 0; }
.search-overlay__form input {
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  outline: none;
  font-size: 1rem;
  color: var(--text);
}
.search-overlay__form input::placeholder { color: var(--text-muted); }
.search-overlay__form .btn { flex-shrink: 0; }
.search-overlay__form .icon-btn { flex-shrink: 0; }

/* ── Drawers: left-slide variant (menu, mobile filters) ─────────────────── */
.drawer--left {
  left: 0;
  right: auto;
  border-left: none;
  border-right: 1px solid var(--glass-border);
  transform: translateX(-100%);
}
.drawer--left.open { transform: translateX(0); }

.menu-drawer-nav { display: flex; flex-direction: column; gap: 0.2rem; }
.menu-drawer-nav a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 0.9rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--text-soft);
  transition: background 0.18s, color 0.18s;
}
.menu-drawer-nav a:hover { background: var(--glass-bg); color: var(--brand); }

/* Cart drawer footer summary */
.drawer-summary { margin-bottom: 0.8rem; }
.ship-hint { font-size: 0.78rem; color: var(--accent-600); font-weight: 600; padding: 0.2rem 0 0.4rem; }
#cartDrawerBody .cart-item { grid-template-columns: 72px 1fr auto; }
#cartDrawerBody .cart-item__img { width: 72px; height: 72px; }

/* ── Shop layout: left filter sidebar + main ────────────────────────────── */
.shop-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.4rem;
  align-items: start;
}
.shop-main { min-width: 0; }

.shop-side {
  border-radius: var(--radius);
  padding: 1.2rem;
  position: sticky;
  top: 90px;
  align-self: start;
}
.filter-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.filter-head h3 { font-size: 1.05rem; }
.filter-close { display: none; width: 32px; height: 32px; border-radius: 8px; font-size: 1rem; }
.filter-group { margin-bottom: 1.2rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--border); }
.filter-group:last-of-type { border-bottom: none; }
.filter-group h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.7rem;
}
.filter-cats { display: flex; flex-direction: column; gap: 0.15rem; }
.filter-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-soft);
  text-align: left;
  width: 100%;
  background: none;
  transition: background 0.18s, color 0.18s;
}
.filter-cat:hover { background: var(--glass-bg); color: var(--brand); }
.filter-cat.active { background: var(--grad-brand); color: #fff; }
.filter-cat em { font-style: normal; font-size: 0.76rem; opacity: 0.7; }
.price-range { display: flex; align-items: center; gap: 0.5rem; }
.price-range .input { width: 100%; min-width: 0; }

/* Shop toolbar: count + view toggle + sort */
.shop-toolbar {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius);
  margin-bottom: 1.2rem;
}
.shop-count { font-size: 0.86rem; color: var(--text-muted); font-weight: 600; }
.shop-toolbar__right { display: flex; align-items: center; gap: 0.6rem; margin-left: auto; }
.sort-label { font-size: 0.82rem; color: var(--text-muted); }
.filter-toggle { display: none; }
.view-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
  background: var(--glass-bg);
}
.view-btn {
  width: 36px;
  height: 32px;
  display: grid;
  place-items: center;
  font-size: 1rem;
  color: var(--text-muted);
  background: none;
  transition: background 0.18s, color 0.18s;
}
.view-btn.active { background: var(--grad-brand); color: #fff; }

/* ── Product grid: 4 desktop / 3 tablet / 2 mobile ──────────────────────── */
.product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.product-grid--row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1200px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1200px) { .product-grid--row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 680px)  { .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px)  { .product-grid--row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Product card: heart button + hidden desc (shown in list view) */
.pc-media-link { display: block; width: 100%; height: 100%; }
.product-card__desc { display: none; }
.wish-btn {
  position: absolute;
  bottom: 0.6rem;
  right: 0.6rem;
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--danger);
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease-spring), background 0.2s, color 0.2s;
}
.wish-btn:hover { transform: scale(1.14); }
.wish-btn.active { background: var(--danger); color: #fff; border-color: transparent; }
.wish-btn--lg { position: static; width: 52px; height: 52px; font-size: 1.4rem; flex-shrink: 0; }

/* List view: horizontal cards */
.product-grid--list { grid-template-columns: 1fr; gap: 1rem; }
.product-grid--list .product-card { flex-direction: row; align-items: stretch; }
.product-grid--list .product-card__media { width: clamp(140px, 26%, 230px); aspect-ratio: 1; flex-shrink: 0; }
.product-grid--list .product-card__body { padding: 1rem 1.2rem; }
.product-grid--list .product-card__name { -webkit-line-clamp: 1; min-height: 0; }
.product-grid--list .product-card__desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.86rem;
  color: var(--text-soft);
}
.product-grid--list .product-card__actions { max-width: 340px; }
@media (max-width: 520px) {
  .product-grid--list .product-card { flex-direction: column; }
  .product-grid--list .product-card__media { width: 100%; }
}

/* ── Cart line item: properly aligned, roomier ──────────────────────────── */
.cart-item {
  grid-template-columns: 92px 1fr auto;
  gap: 1rem;
  padding: 1rem 0;
  align-items: center;
}
.cart-item__imglink { display: block; }
.cart-item__img { width: 92px; height: 92px; }
.cart-item__mid { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.cart-item__mid .qty { margin-top: 0.2rem; }
@media (max-width: 420px) {
  .cart-item { grid-template-columns: 64px 1fr; }
  .cart-item__img { width: 64px; height: 64px; }
  .cart-item__right { grid-column: 2; flex-direction: row; align-items: center; justify-content: space-between; }
}

/* ── Homepage: trust bar, category grid, brand story, newsletter ────────── */
.trust-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1.2rem 1.4rem;
  border-radius: var(--radius-lg);
}
.trust-item { display: flex; align-items: center; gap: 0.8rem; }
.trust-item__icon { font-size: 1.6rem; line-height: 1; }
.trust-item b { display: block; font-size: 0.9rem; }
.trust-item span { font-size: 0.76rem; color: var(--text-muted); }
@media (max-width: 760px) { .trust-bar { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .trust-bar { grid-template-columns: 1fr; } }

.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
@media (max-width: 900px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .cat-grid { grid-template-columns: 1fr 1fr; } }
.cat-card {
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s var(--ease);
}
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.cat-card__media { aspect-ratio: 3 / 2; overflow: hidden; background: var(--bg-2); }
.cat-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.cat-card:hover .cat-card__media img { transform: scale(1.07); }
.cat-card__body { padding: 0.85rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.cat-card__body b { font-size: 0.92rem; }
.cat-card__body span { font-size: 0.76rem; color: var(--accent-600); font-weight: 600; white-space: nowrap; }

.brand-story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.brand-story__media img { width: 100%; height: 100%; object-fit: cover; min-height: 280px; }
.brand-story__body {
  padding: clamp(1.4rem, 4vw, 2.6rem);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  justify-content: center;
}
.brand-story__body h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
.brand-story__body p { color: var(--text-soft); font-size: 0.94rem; }
.chips-static { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.4rem; }
.value-chip {
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  font-size: 0.82rem;
  font-weight: 600;
}
@media (max-width: 760px) { .brand-story { grid-template-columns: 1fr; } }

.newsletter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.4rem;
  flex-wrap: wrap;
  padding: clamp(1.4rem, 4vw, 2.2rem);
  border-radius: var(--radius-lg);
}
.newsletter h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); }
.newsletter p { color: var(--text-soft); font-size: 0.9rem; }
.newsletter__field { display: flex; gap: 0.5rem; flex: 1; min-width: 260px; max-width: 440px; }
.newsletter__field .input { flex: 1; }
@media (max-width: 600px) { .newsletter__field { max-width: none; width: 100%; } }

/* ── Product detail refinements ─────────────────────────────────────────── */
.pd__info { padding: clamp(1.2rem, 3vw, 1.8rem); border-radius: var(--radius); }
.pd__info h1 { font-size: clamp(1.4rem, 3vw, 2rem); margin: 0.3rem 0 0.4rem; }
.pd__rating { margin-bottom: 0.4rem; }
.pd__stock { font-size: 0.86rem; display: flex; align-items: center; gap: 0.45rem; margin: 0.5rem 0; }
.stock-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.stock-dot.in { background: var(--success); box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18); }
.stock-dot.out { background: var(--danger); box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18); }
.pd__assure {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-soft);
}
.pd__assure span { display: inline-flex; align-items: center; gap: 0.3rem; }
.reviews__title { font-size: 1.2rem; margin-bottom: 1rem; }
.review-form { margin-top: 1.2rem; padding: 1.2rem 1.3rem; border-radius: var(--radius); }
.review-form h3 { font-size: 1.05rem; margin-bottom: 0.8rem; }
.text-link { color: var(--brand); font-weight: 600; }
.text-link:hover { text-decoration: underline; }

/* ── Password field eye toggle ──────────────────────────────────────────── */
.pw-wrap { position: relative; }
.pw-wrap .input { width: 100%; padding-right: 2.6rem; }
.pw-eye {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 1rem;
  opacity: 0.65;
  background: none;
  transition: opacity 0.18s;
}
.pw-eye:hover, .pw-eye.active { opacity: 1; }

/* ── Auth split layout ──────────────────────────────────────────────────── */
.auth-page { display: flex; justify-content: center; }
.auth-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  max-width: 920px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.auth-aside {
  padding: clamp(1.8rem, 4vw, 2.8rem);
  background: var(--grad-hero);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  justify-content: center;
}
.auth-aside h2 { font-size: 1.7rem; }
.auth-aside p { opacity: 0.92; font-size: 0.92rem; }
.auth-benefits { list-style: none; padding: 0; margin-top: 0.6rem; display: flex; flex-direction: column; gap: 0.55rem; }
.auth-benefits li { font-size: 0.9rem; font-weight: 500; }
.auth-form-wrap { padding: clamp(1.6rem, 4vw, 2.4rem); }
.auth-heading { font-size: 1.3rem; }
.auth-sub { margin-bottom: 1.2rem; font-size: 0.88rem; }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 1rem; }
.auth-demo { font-size: 0.78rem; text-align: center; margin-top: 0.8rem; }
.check { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; color: var(--text-soft); cursor: pointer; }
.check input { accent-color: var(--brand); }
@media (max-width: 760px) { .auth-shell { grid-template-columns: 1fr; } }

/* ── Account: sidebar layout ────────────────────────────────────────────── */
.account-layout { display: grid; grid-template-columns: 260px 1fr; gap: 1.4rem; align-items: start; }
.account-side { border-radius: var(--radius); padding: 1.2rem; position: sticky; top: 90px; }
.account-user { display: flex; align-items: center; gap: 0.8rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; }
.account-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.05rem;
  flex-shrink: 0;
}
.account-user__meta { min-width: 0; }
.account-user__meta b { display: block; font-size: 0.95rem; }
.account-user__meta span { display: block; font-size: 0.76rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu { display: flex; flex-direction: column; gap: 0.2rem; }
.account-menu__link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-soft);
  text-align: left;
  width: 100%;
  background: none;
  transition: background 0.18s, color 0.18s;
}
.account-menu__link:hover { background: var(--glass-bg); color: var(--brand); }
.account-menu__link.active { background: var(--grad-brand); color: #fff; }
.account-menu__icon { width: 1.3em; text-align: center; }
.account-menu__logout { color: var(--danger); margin-top: 0.4rem; }
.account-title { font-size: clamp(1.3rem, 3vw, 1.7rem); margin-bottom: 1rem; }
.account-main { min-width: 0; }
.order__info { min-width: 0; }
.order__amt { display: flex; align-items: center; gap: 0.7rem; }
.order__actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.addr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.addr-card h4 { display: flex; align-items: center; gap: 0.5rem; }
.addr-lines { font-size: 0.85rem; margin: 0.2rem 0; }
.addr-actions { display: flex; gap: 0.5rem; margin-top: 0.8rem; }
@media (max-width: 900px) {
  .account-layout { grid-template-columns: 1fr; }
  /* Account menu becomes a left off-canvas drawer on small screens. */
  .account-menu-toggle { display: inline-flex; }
  .account-side {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: min(320px, 86vw);
    z-index: 210;
    transform: translateX(-100%);
    transition: transform var(--dur) var(--ease);
    border-radius: 0;
    overflow-y: auto;
  }
  .account-side.open { transform: translateX(0); }
  .account-side__close { display: grid; place-items: center; }
  .account-menu__logout { margin-top: 0.4rem; }
}

/* ── Checkout tidy ──────────────────────────────────────────────────────── */
.checkout-head { font-size: 1rem; margin: 1.3rem 0 0.8rem; }
.checkout-head:first-child { margin-top: 0; }
.checkout-lines { margin-bottom: 0.6rem; padding-bottom: 0.4rem; border-bottom: 1px dashed var(--border); }
.checkout-summary h4 { margin-bottom: 0.8rem; }

/* ── Responsive: navbar chrome + off-canvas filters ─────────────────────── */
@media (max-width: 960px) {
  .menu-btn { display: inline-flex; }
  .nav-menu { display: none; }
}
@media (max-width: 900px) {
  .shop-layout { grid-template-columns: 1fr; }
  .filter-toggle { display: inline-flex; }
  .shop-side {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: min(320px, 86vw);
    z-index: 210;
    transform: translateX(-100%);
    transition: transform var(--dur) var(--ease);
    border-radius: 0;
    overflow-y: auto;
  }
  .shop-side.open { transform: translateX(0); }
  .filter-close { display: grid; place-items: center; }
}
@media (max-width: 760px) {
  .search-toggle { display: inline-flex; }
  .account-btn { display: none; }
}

/* ══════════════════════════════════════════════════════════════════════════
 * Phase 2 — account chrome (mobile menu toggle, avatar upload), support UI.
 * Appended last so these win ties over earlier rules.
 * ════════════════════════════════════════════════════════════════════════ */

/* Account menu toggle + drawer head (toggle/close hidden on desktop) */
.account-menu-toggle { display: none; margin-bottom: 1rem; }
.account-side__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.account-side__close { display: none; width: 34px; height: 34px; border-radius: 8px; font-size: 1rem; flex-shrink: 0; }

/* Panel header shared by wishlist/support/account panels */
.account-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}

/* Avatar can now hold an uploaded image */
.account-avatar { overflow: hidden; }
.account-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

.avatar-upload { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.avatar-upload__preview {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.4rem;
  background: var(--grad-brand);
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}
.avatar-upload__preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-upload__body { min-width: 0; }
.avatar-upload__body p { margin-bottom: 0.5rem; font-size: 0.86rem; }

/* ── Support tickets ─────────────────────────────────────────────────────── */
.support-form .field { margin-bottom: 0.9rem; }
.support-form textarea.input { resize: vertical; min-height: 84px; font-family: inherit; }

.support-list { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1.4rem; }
.support-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius);
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.support-row:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.support-row__main { min-width: 0; display: flex; flex-direction: column; gap: 0.2rem; }
.support-row__last {
  font-size: 0.84rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 46ch;
}
.support-row__meta { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }

/* Status pills */
.support-status { text-transform: capitalize; }
.support-status--open { background: rgba(52, 168, 83, 0.16); color: #1e7e34; }
.support-status--pending { background: rgba(236, 106, 53, 0.16); color: var(--brand-600); }
.support-status--resolved { background: rgba(66, 133, 244, 0.16); color: #2c6fd6; }
.support-status--closed { background: var(--glass-bg); color: var(--text-muted); }

/* Conversation thread */
.support-thread {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  max-height: 460px;
  overflow-y: auto;
  padding: 0.4rem;
  margin-bottom: 1.2rem;
}
.support-msg {
  max-width: 82%;
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
}
.support-msg--me { align-self: flex-end; background: var(--grad-brand); color: #fff; border-color: transparent; }
.support-msg--me .muted, .support-msg--me b { color: rgba(255, 255, 255, 0.92); }
.support-msg--agent { align-self: flex-start; background: var(--glass-bg); }
.support-msg__head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.8rem; margin-bottom: 0.3rem; font-size: 0.82rem; }
.support-msg__body { white-space: pre-wrap; word-wrap: break-word; line-height: 1.5; }
.support-msg__imgs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.support-msg__imgs img {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
}

@media (max-width: 520px) {
  .support-row__last { max-width: 22ch; }
  .support-msg { max-width: 92%; }
}

/* ── About page ──────────────────────────────────────────────────────────── */
.about-timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  padding: 1.6rem;
}
.about-milestone { position: relative; padding-left: 0.25rem; }
.about-milestone__year {
  display: inline-block;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--brand, var(--accent, #7c5cff));
  margin-bottom: 0.5rem;
}
.about-milestone p { color: var(--text-soft); font-size: 0.92rem; margin: 0; }

@media (max-width: 900px) { .about-timeline { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .about-timeline { grid-template-columns: 1fr; } }

/* ── Contact page ────────────────────────────────────────────────────────── */
.contact-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.3fr;
  gap: 1.5rem;
  align-items: start;
}
.contact-info { padding: 1.6rem; }
.contact-info h3, .contact-form-card h3 { margin: 0 0 1rem; }
.contact-info__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.1rem; }
.contact-info__list li { display: flex; gap: 0.85rem; align-items: flex-start; }
.contact-info__icon { font-size: 1.25rem; line-height: 1.4; flex: none; }
.contact-info__list b { display: block; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 0.15rem; }
.contact-info__list span, .contact-info__list a { color: var(--text-soft); font-size: 0.94rem; }
.contact-info__list a { text-decoration: none; }
.contact-info__list a:hover { text-decoration: underline; }
.contact-form-card { padding: 1.6rem; }

@media (max-width: 820px) { .contact-layout { grid-template-columns: 1fr; } }
