/* ============================================================
   LUXE — Premium Minimalist E-Commerce
   Main Stylesheet
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  /* Palette — soft blush surfaces, deep plum text, and rose accents */
  --color-bg: #FFF1F4;
  --color-surface: #FFFBFC;
  --color-surface-alt: #FBE6EC;
  --color-surface-2: #F5DDE3;
  --color-text: #33242A;
  --color-text-soft: #59464D;
  --color-text-muted: #79676D;
  --color-border: #F0D5DC;
  --color-border-strong: #D7ADB8;
  --color-black: #302329;
  --color-white: #ffffff;

  /* Accent */
  --accent: #9B5B70;
  --accent-soft: #F5E1E7;
  --accent-strong: #7D3D52;

  /* Status */
  --success: #1f9d55;
  --success-soft: #e6f4ec;
  --danger: #d64545;
  --danger-soft: #fdecec;
  --warning: #c98a1a;
  --warning-soft: #fbf2e0;
  --info: #2b6cb0;
  --info-soft: #e8f1fa;

  /* Typography */
  --font-sans: "Inter", "Helvetica Neue", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Inter", "Helvetica Neue", -apple-system, sans-serif;
  --font-mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, monospace;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 999px;

  /* Shadow */
  --shadow-xs: 0 1px 2px rgba(10, 10, 10, 0.05);
  --shadow-sm: 0 2px 8px rgba(10, 10, 10, 0.06);
  --shadow-md: 0 6px 20px rgba(10, 10, 10, 0.08);
  --shadow-lg: 0 14px 40px rgba(10, 10, 10, 0.12);
  --shadow-xl: 0 24px 60px rgba(10, 10, 10, 0.16);

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Layout */
  --container-max: 1320px;
  --container-narrow: 880px;
  --header-h: 72px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 0.15s;
  --dur: 0.28s;
  --dur-slow: 0.5s;
}

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

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

/* ---------- Motion ---------- */
@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

body:not(.db-loading) > header,
body:not(.db-loading) > main,
body:not(.db-loading) > footer {
  animation: pageEnter 0.7s var(--ease) both;
}

body:not(.db-loading) > main {
  animation-delay: 0.08s;
}

body:not(.db-loading) > footer {
  animation-delay: 0.16s;
}

.product-card,
.category-card,
.benefit-card,
.review-card,
.order-card,
.cart-item,
.wishlist-item,
.checkout-section {
  animation: revealUp 0.55s var(--ease) both;
}

.product-card:nth-child(2),
.category-card:nth-child(2),
.benefit-card:nth-child(2),
.review-card:nth-child(2) {
  animation-delay: 0.06s;
}

.product-card:nth-child(3),
.category-card:nth-child(3),
.benefit-card:nth-child(3),
.review-card:nth-child(3) {
  animation-delay: 0.12s;
}

.product-card:nth-child(4),
.category-card:nth-child(4),
.benefit-card:nth-child(4),
.review-card:nth-child(4) {
  animation-delay: 0.18s;
}

.product-card,
.category-card,
.review-card {
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.product-card:hover,
.category-card:hover,
.review-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

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

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

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

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

ul,
ol {
  list-style: none;
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
}
h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
}
h3 {
  font-size: 1.3rem;
}
h4 {
  font-size: 1.05rem;
}

p {
  color: var(--color-text-soft);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-strong);
}

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

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
}
.container-narrow {
  max-width: var(--container-narrow);
}
.section {
  padding-block: var(--space-20);
}
.section-sm {
  padding-block: var(--space-12);
}
.section-tight {
  padding-block: var(--space-10);
}

.grid {
  display: grid;
  gap: var(--space-6);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 14px 26px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  transition: transform var(--dur) var(--ease), background var(--dur-fast),
    color var(--dur-fast), border-color var(--dur-fast), box-shadow var(--dur);
  border: 1.5px solid transparent;
  white-space: nowrap;
  user-select: none;
}
.btn:active {
  transform: scale(0.97);
}
.btn-primary {
  background: var(--color-black);
  color: #fff;
}
.btn-primary:hover {
  background: #2a2a2a;
  box-shadow: var(--shadow-md);
}
.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover {
  background: var(--accent-strong);
}
.btn-outline {
  background: transparent;
  border-color: var(--color-border-strong);
  color: var(--color-text);
}
.btn-outline:hover {
  border-color: var(--color-text);
  background: var(--color-surface-alt);
}
.btn-ghost {
  background: transparent;
  color: var(--color-text);
  padding-inline: var(--space-4);
}
.btn-ghost:hover {
  background: var(--color-surface-alt);
}
.btn-light {
  background: #fff;
  color: var(--color-black);
  border-color: rgba(255, 255, 255, 0.2);
}
.btn-block {
  width: 100%;
}
.btn-sm {
  padding: 9px 18px;
  font-size: 0.82rem;
}
.btn-lg {
  padding: 17px 34px;
  font-size: 1rem;
}
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.announcement-bar {
  position: sticky;
  top: 0;
  z-index: 120;
  background: linear-gradient(90deg, rgba(15, 15, 15, 0.97), rgba(28, 28, 28, 0.97));
  color: #f5f1ea;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  line-height: 1;
  margin: 0;
  padding: 0;
}
.announcement-inner {
  max-width: 1480px;
  margin: 0 auto;
  padding: 6px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
}
.announcement-text {
  position: relative;
  display: inline-block;
  white-space: nowrap;
  letter-spacing: 0.02em;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  animation: announcement-scroll 7s ease-in-out infinite alternate;
}
@keyframes announcement-scroll {
  0% { transform: translateX(18px); opacity: 0.82; }
  50% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(-18px); opacity: 0.82; }
}
@media (prefers-reduced-motion: reduce) {
  .announcement-text { animation: none; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #F2B8C6;
  border-bottom: 1px solid var(--color-border);
  margin-top: 0;
  top: 0;
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: var(--space-8);
}
.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-black);
  display: flex;
  align-items: center;
  gap: 6px;
}
.logo .dot {
  color: var(--accent);
}
.nav-main {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  margin-left: var(--space-6);
}
.nav-main a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-soft);
  transition: color var(--dur-fast);
  position: relative;
}
.nav-main a:hover,
.nav-main a.active {
  color: var(--color-text);
}
.nav-main a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -24px;
  height: 2px;
  background: var(--color-black);
}

.header-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.tool-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-soft);
  transition: background var(--dur-fast), color var(--dur-fast);
  position: relative;
}
.tool-btn:hover {
  background: var(--color-surface-alt);
  color: var(--color-text);
}
.tool-btn svg {
  width: 21px;
  height: 21px;
}
.tool-btn .badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: var(--radius-full);
  background: var(--color-black);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.tool-btn .badge.accent {
  background: var(--accent);
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search-input {
  width: 240px;
  height: 42px;
  padding: 0 14px 0 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-surface-alt);
  font-size: 0.86rem;
  transition: width var(--dur) var(--ease), border-color var(--dur-fast),
    background var(--dur-fast);
}
.search-input:focus {
  outline: none;
  width: 300px;
  border-color: var(--color-text);
  background: #fff;
}
.search-wrap svg {
  position: absolute;
  left: 12px;
  width: 18px;
  height: 18px;
  color: var(--color-text-muted);
  pointer-events: none;
}

.menu-toggle {
  display: none;
}

/* Mobile drawer */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 10, 10, 0.4);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur), visibility var(--dur);
}
.mobile-nav.open {
  opacity: 1;
  visibility: visible;
}
.mobile-nav-panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(86%, 340px);
  background: #fff;
  padding: var(--space-8);
  transform: translateX(-100%);
  transition: transform var(--dur-slow) var(--ease);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  overflow-y: auto;
}
.mobile-nav.open .mobile-nav-panel {
  transform: translateX(0);
}
.mobile-nav-panel .logo {
  margin-bottom: var(--space-6);
}
.mobile-nav a {
  font-size: 1.1rem;
  font-weight: 500;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mobile-nav-close {
  align-self: flex-end;
  font-size: 1.4rem;
  color: var(--color-text-muted);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--color-surface-alt);
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: var(--space-12);
  min-height: clamp(480px, 72vh, 680px);
  padding-block: var(--space-16);
}
.hero-content {
  max-width: 520px;
}
.hero-content .eyebrow {
  margin-bottom: var(--space-5);
  display: inline-block;
}
.hero h1 {
  margin-bottom: var(--space-5);
}
.hero p {
  font-size: 1.08rem;
  margin-bottom: var(--space-8);
  max-width: 460px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.hero-actions .btn {
  position: relative;
  min-height: 54px;
  padding-inline: 24px;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 10px 24px rgba(10, 10, 10, 0.08);
}
.hero-actions .btn::after {
  content: "→";
  margin-left: 8px;
  font-size: 1.1em;
  line-height: 1;
  transition: transform var(--dur) var(--ease);
}
.hero-actions .btn:hover::after {
  transform: translateX(4px);
}
.hero-actions .btn-primary {
  background: var(--accent);
  color: var(--color-black);
  border-color: var(--accent);
  box-shadow: 0 12px 28px rgba(169, 138, 74, 0.24);
}
.hero-actions .btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.32), transparent 75%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease);
}
.hero-actions .btn-primary:hover {
  background: #d7bb7d;
  color: var(--color-black);
  box-shadow: 0 16px 34px rgba(169, 138, 74, 0.3);
  transform: translateY(-3px);
}
.hero-actions .btn-primary:hover::before {
  transform: translateX(120%);
}
.hero-actions .btn-outline {
  background: rgba(255, 255, 255, 0.52);
  border-color: rgba(10, 10, 10, 0.18);
  backdrop-filter: blur(10px);
}
.hero-actions .btn-outline:hover {
  background: #fff;
  border-color: var(--color-text);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.hero-media {
  position: relative;
  height: 100%;
  min-height: 420px;
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(0, 0, 0, 0.1), transparent 40%);
}

/* ---------- Section header ---------- */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6);
  margin-bottom: var(--space-10);
}
.section-head .eyebrow {
  margin-bottom: var(--space-2);
}
.section-head h2 {
  margin: 0;
}
.section-head a {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--color-text);
  border-bottom: 1.5px solid var(--color-text);
  padding-bottom: 2px;
  transition: color var(--dur-fast), border-color var(--dur-fast);
}
.section-head a:hover {
  color: var(--accent-strong);
  border-color: var(--accent);
}

/* ---------- Product Grid / Cards ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur);
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.product-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--color-surface-alt);
  overflow: hidden;
  border-radius: var(--radius-lg);
}
.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease);
}
.product-card:hover .product-media img {
  transform: scale(1.05);
}
.product-badges {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}
.badge {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 9px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}
.badge-sale {
  background: var(--color-black);
  color: #fff;
}
.badge-new {
  background: var(--accent);
  color: #fff;
}
.badge-out {
  background: var(--color-surface-2);
  color: var(--color-text-muted);
}

.product-wish {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-soft);
  z-index: 2;
  transition: transform var(--dur-fast), color var(--dur-fast),
    background var(--dur-fast);
  opacity: 0;
}
.product-card:hover .product-wish {
  opacity: 1;
}
.product-wish:hover {
  transform: scale(1.1);
  color: var(--danger);
}
.product-wish.active {
  color: var(--danger);
  opacity: 1;
}
.product-wish svg {
  width: 19px;
  height: 19px;
}
.product-wish.active svg {
  fill: var(--danger);
}

.product-quick-add {
  position: absolute;
  left: var(--space-3);
  right: var(--space-3);
  bottom: var(--space-3);
  z-index: 2;
  transform: translateY(120%);
  opacity: 0;
  transition: transform var(--dur) var(--ease), opacity var(--dur);
}
.product-card:hover .product-quick-add {
  transform: translateY(0);
  opacity: 1;
}

.product-body {
  padding: var(--space-4) var(--space-3) var(--space-2);
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--color-bg);
}
.product-brand {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}
.product-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-rating {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}
.stars {
  display: inline-flex;
  color: var(--accent);
  letter-spacing: 1px;
}
.product-price {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin-top: 2px;
}
.price-now {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-text);
}
.price-was {
  font-size: 0.86rem;
  color: var(--color-text-muted);
  text-decoration: line-through;
}

/* ---------- Categories showcase ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}
.category-card {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: var(--space-5);
  color: #fff;
  background: var(--color-surface-2);
}
.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease);
}
.category-card:hover img {
  transform: scale(1.06);
}
.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent 55%);
}
.category-card h3 {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: 1.2rem;
}
.category-card span {
  position: relative;
  z-index: 1;
  font-size: 0.8rem;
  opacity: 0.85;
  display: block;
  margin-top: 2px;
}

/* ---------- Promo banner ---------- */
.promo-banner {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--color-black);
  color: #fff;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: 360px;
}
.promo-banner-content {
  padding: var(--space-12);
  padding-top: var(--space-16);
}
.promo-banner-content .eyebrow {
  color: var(--accent);
  display: inline-block;
  margin-top: var(--space-4);
}
.promo-banner-content h2 {
  color: #fff;
  margin: var(--space-3) 0 var(--space-4);
}
.promo-banner-content p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--space-6);
  max-width: 380px;
}
.promo-banner-media {
  height: 100%;
  min-height: 360px;
}
.promo-banner-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Benefits ---------- */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}
.benefit {
  text-align: center;
  padding: var(--space-6);
}
.benefit .icon {
  width: 52px;
  height: 52px;
  margin: 0 auto var(--space-4);
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  color: var(--accent-strong);
  display: flex;
  align-items: center;
  justify-content: center;
}
.benefit .icon svg {
  width: 24px;
  height: 24px;
}
.benefit h4 {
  margin-bottom: 4px;
}
.benefit p {
  font-size: 0.85rem;
}

/* ---------- Newsletter ---------- */
.newsletter {
  background: var(--color-surface-alt);
  border-radius: var(--radius-xl);
  padding: var(--space-16);
  text-align: center;
}
.newsletter h2 {
  margin-bottom: var(--space-3);
}
.newsletter p {
  max-width: 460px;
  margin: 0 auto var(--space-8);
}
.newsletter-form {
  display: flex;
  gap: var(--space-2);
  max-width: 460px;
  margin: 0 auto;
}
.newsletter-form input {
  flex: 1;
  height: 52px;
  padding: 0 20px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: #fff;
  font-size: 0.92rem;
}
.newsletter-form input:focus {
  outline: none;
  border-color: var(--color-text);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-black);
  color: rgba(255, 255, 255, 0.7);
  padding-top: var(--space-20);
  margin-top: var(--space-20);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: var(--space-10);
  padding-bottom: var(--space-12);
}
.footer-brand .logo {
  color: #fff;
  margin-bottom: var(--space-4);
}
.footer-brand p {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9rem;
  max-width: 280px;
}
.footer-col h5 {
  color: #fff;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: var(--space-4);
}
.footer-col a {
  display: block;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  padding: 6px 0;
  transition: color var(--dur-fast);
}
.footer-col a:hover {
  color: #fff;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-block: var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
}
.social-row {
  display: flex;
  gap: var(--space-3);
}
.social-row a {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  transition: all var(--dur-fast);
}
.social-row a:hover {
  background: #fff;
  color: var(--color-black);
  border-color: #fff;
}
.social-row svg {
  width: 17px;
  height: 17px;
}

/* ---------- Forms ---------- */
.form-group {
  margin-bottom: var(--space-5);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-text);
}
.input,
.textarea,
.select {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: 0.92rem;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast),
    background var(--dur-fast);
}
.textarea {
  height: auto;
  padding: 12px 16px;
  resize: vertical;
  min-height: 110px;
  line-height: 1.5;
}
.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--color-text);
  box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.06);
}
.input::placeholder {
  color: var(--color-text-muted);
}
.input-error {
  border-color: var(--danger) !important;
}
.field-error {
  color: var(--danger);
  font-size: 0.78rem;
  margin-top: 6px;
  display: none;
}
.field-error.show {
  display: block;
}

/* ---------- Auth pages ---------- */
.auth-wrap {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-12) var(--space-6);
  background: var(--color-surface-alt);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: var(--radius-xl);
  padding: var(--space-10);
  box-shadow: var(--shadow-lg);
}
.auth-card h1 {
  font-size: 1.7rem;
  text-align: center;
  margin-bottom: var(--space-2);
}
.auth-card .sub {
  text-align: center;
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
  font-size: 0.92rem;
}
.auth-alt {
  text-align: center;
  margin-top: var(--space-6);
  font-size: 0.88rem;
  color: var(--color-text-muted);
}
.auth-alt a {
  color: var(--color-text);
  font-weight: 600;
  border-bottom: 1px solid var(--color-text);
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-6) 0;
  color: var(--color-text-muted);
  font-size: 0.78rem;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  padding: var(--space-5) 0;
}
.breadcrumb a:hover {
  color: var(--color-text);
}
.breadcrumb span {
  color: var(--color-text-muted);
}

/* ---------- Shop layout ---------- */
.shop-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--space-8);
  align-items: start;
  padding-top: var(--space-6);
}
.filters {
  position: sticky;
  top: calc(var(--header-h) + var(--space-4));
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.filter-group {
  padding-block: var(--space-5);
  border-bottom: 1px solid var(--color-border);
}
.filter-group:last-child {
  border-bottom: none;
}
.filter-group h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-3);
}
.filter-option {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 6px 0;
  font-size: 0.88rem;
  color: var(--color-text-soft);
  cursor: pointer;
}
.filter-option input {
  width: 17px;
  height: 17px;
  accent-color: var(--color-black);
}
.filter-option:hover {
  color: var(--color-text);
}
.price-range {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}
.price-range input {
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  font-size: 0.84rem;
}

.shop-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
  gap: var(--space-4);
  flex-wrap: wrap;
}
.shop-toolbar .result-count {
  font-size: 0.86rem;
  color: var(--color-text-muted);
}
.toolbar-right {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}
.select {
  height: 42px;
  border-radius: var(--radius-full);
  padding-inline: 16px;
  background: #fff;
  cursor: pointer;
}

.filter-toggle {
  display: none;
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: var(--space-10);
}
.pagination button {
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--color-text-soft);
  transition: all var(--dur-fast);
}
.pagination button:hover:not([disabled]) {
  border-color: var(--color-text);
  color: var(--color-text);
}
.pagination button.active {
  background: var(--color-black);
  color: #fff;
  border-color: var(--color-black);
}
.pagination button[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---------- Product detail ---------- */
.product-detail {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-12);
  padding-top: var(--space-6);
}
.gallery {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: var(--space-4);
}
.gallery-thumbs {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.thumb {
  width: 88px;
  height: 88px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  background: var(--color-surface-alt);
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumb.active {
  border-color: var(--color-black);
}
.gallery-main {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--color-surface-alt);
}
.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd-info .eyebrow {
  margin-bottom: var(--space-3);
}
.pd-info h1 {
  font-size: 2rem;
  margin-bottom: var(--space-3);
}
.pd-rating {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  font-size: 0.88rem;
  color: var(--color-text-muted);
}
.pd-price {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}
.pd-price .price-now {
  font-size: 1.8rem;
}
.pd-price .save {
  font-size: 0.82rem;
  color: var(--success);
  font-weight: 600;
}
.pd-short {
  margin-bottom: var(--space-6);
  line-height: 1.7;
}
.pd-divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--space-6) 0;
}
.variant-block {
  margin-bottom: var(--space-5);
}
.variant-block .label-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}
.variant-block label {
  margin: 0;
}
.variant-options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.variant-chip {
  min-width: 46px;
  height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border);
  background: #fff;
  font-size: 0.86rem;
  font-weight: 500;
  transition: all var(--dur-fast);
}
.variant-chip:hover {
  border-color: var(--color-text);
}
.variant-chip.active {
  border-color: var(--color-black);
  background: var(--color-black);
  color: #fff;
}
.variant-chip.color-chip {
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  border-radius: var(--radius-full);
  position: relative;
}
.variant-chip.color-chip.active::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1.5px solid var(--color-black);
  border-radius: var(--radius-full);
}

.qty-selector {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.qty-selector button {
  width: 44px;
  height: 48px;
  font-size: 1.2rem;
  color: var(--color-text-soft);
  transition: background var(--dur-fast);
}
.qty-selector button:hover {
  background: var(--color-surface-alt);
}
.qty-selector input {
  width: 52px;
  height: 48px;
  text-align: center;
  border: none;
  background: transparent;
  font-weight: 600;
  font-size: 1rem;
}
.qty-selector input::-webkit-outer-spin-button,
.qty-selector input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.pd-actions {
  display: flex;
  gap: var(--space-3);
  margin: var(--space-6) 0;
}
.pd-actions .btn-primary {
  flex: 1;
}
.pd-info-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-6);
}
.pd-info-list li {
  display: flex;
  gap: var(--space-3);
  font-size: 0.88rem;
  color: var(--color-text-soft);
}
.pd-info-list svg {
  width: 20px;
  height: 20px;
  color: var(--accent-strong);
  flex-shrink: 0;
  margin-top: 1px;
}

.stock-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-full);
}
.stock-in {
  background: var(--success-soft);
  color: var(--success);
}
.stock-low {
  background: var(--warning-soft);
  color: var(--warning);
}
.stock-out {
  background: var(--danger-soft);
  color: var(--danger);
}

/* Tabs */
.pd-tabs {
  margin-top: var(--space-16);
}
.tab-head {
  display: flex;
  gap: var(--space-2);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-6);
}
.tab-head button {
  padding: var(--space-4) var(--space-5);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--dur-fast);
}
.tab-head button.active {
  color: var(--color-text);
  border-color: var(--color-black);
}
.tab-panel {
  display: none;
  line-height: 1.8;
  max-width: 720px;
}
.tab-panel.active {
  display: block;
  animation: fadeIn var(--dur) var(--ease);
}

/* Reviews */
.review-item {
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--color-border);
}
.review-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}
.review-author {
  font-weight: 600;
  font-size: 0.92rem;
}
.review-date {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}
.review-stars {
  color: var(--accent);
  margin-bottom: 4px;
}
.review-text {
  color: var(--color-text-soft);
  font-size: 0.9rem;
}
.review-form {
  margin-top: var(--space-8);
  max-width: 560px;
}

/* ---------- Cart ---------- */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--space-8);
  align-items: start;
  padding-top: var(--space-6);
}
.cart-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.cart-item {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: var(--space-4);
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  align-items: center;
  background: #fff;
}
.cart-item-media {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface-alt);
}
.cart-item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cart-item-info h4 {
  font-size: 0.95rem;
  margin-bottom: 4px;
}
.cart-item-variant {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}
.cart-item-price {
  font-weight: 600;
  font-size: 0.92rem;
}
.cart-item-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-3);
}
.cart-item-remove {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color var(--dur-fast);
}
.cart-item-remove:hover {
  color: var(--danger);
}
.cart-item-remove svg {
  width: 15px;
  height: 15px;
}

.cart-summary {
  position: sticky;
  top: calc(var(--header-h) + var(--space-4));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  background: #fff;
}
.cart-summary h3 {
  margin-bottom: var(--space-5);
}
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-3) 0;
  font-size: 0.92rem;
  color: var(--color-text-soft);
}
.summary-row.total {
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-3);
  padding-top: var(--space-5);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
}
.summary-row .discount {
  color: var(--success);
}

/* ---------- Checkout ---------- */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: var(--space-8);
  align-items: start;
  padding-top: var(--space-6);
}
.checkout-section {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-5);
  background: #fff;
}
.checkout-section h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.checkout-section .step-num {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  background: var(--color-black);
  color: #fff;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.delivery-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.delivery-option {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--dur-fast);
}
.delivery-option:hover {
  border-color: var(--color-text);
}
.delivery-option.selected {
  border-color: var(--color-black);
  background: var(--color-surface-alt);
}
.delivery-option input {
  margin-top: 3px;
  accent-color: var(--color-black);
}
.payment-method-icon {
  display: inline-flex;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
}
.payment-method-icon svg {
  width: 24px;
  height: 24px;
}
.payment-method-icon.whatsapp {
  color: #168a4a;
}
.delivery-option .d-title {
  font-weight: 600;
  font-size: 0.92rem;
}
.delivery-option .d-desc {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}
.delivery-option .d-price {
  margin-left: auto;
  font-weight: 600;
}

.coupon-row {
  display: flex;
  gap: var(--space-2);
}
.coupon-row .btn {
  height: 48px;
}

.order-summary-items {
  max-height: 320px;
  overflow-y: auto;
  margin-bottom: var(--space-5);
}
.summary-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
  align-items: center;
}
.summary-item img {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}
.summary-item .si-name {
  font-size: 0.86rem;
  font-weight: 500;
}
.summary-item .si-variant {
  font-size: 0.76rem;
  color: var(--color-text-muted);
}
.summary-item .si-price {
  font-size: 0.86rem;
  font-weight: 600;
}

/* ---------- Account ---------- */
.account-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--space-8);
  align-items: start;
  padding-top: var(--space-6);
}
.account-nav {
  position: sticky;
  top: calc(var(--header-h) + var(--space-4));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  background: #fff;
}
.account-nav a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  color: var(--color-text-soft);
  font-weight: 500;
  transition: all var(--dur-fast);
}
.account-nav a:hover {
  background: var(--color-surface-alt);
  color: var(--color-text);
}
.account-nav a.active {
  background: var(--color-black);
  color: #fff;
}
.account-nav a svg {
  width: 18px;
  height: 18px;
}
.account-panel {
  display: none;
}
.account-panel.active {
  display: block;
  animation: fadeIn var(--dur) var(--ease);
}
.panel-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  background: #fff;
  margin-bottom: var(--space-5);
}

/* ---------- Orders table ---------- */
.order-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
  background: #fff;
}
.order-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
  gap: var(--space-3);
}
.order-card-head .oid {
  font-weight: 700;
  font-size: 0.95rem;
}
.order-card-head .odate {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}
.order-items-mini {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}
.order-items-mini img {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}
.order-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* ---------- Status pills ---------- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  text-transform: capitalize;
}
.status-pending {
  background: var(--warning-soft);
  color: var(--warning);
}
.status-confirmed,
.status-processing {
  background: var(--info-soft);
  color: var(--info);
}
.status-shipped {
  background: #ececf8;
  color: #4a4ac8;
}
.status-delivered {
  background: var(--success-soft);
  color: var(--success);
}
.status-cancelled,
.status-refunded {
  background: var(--danger-soft);
  color: var(--danger);
}
.status-paid {
  background: var(--success-soft);
  color: var(--success);
}
.status-unpaid {
  background: var(--warning-soft);
  color: var(--warning);
}

/* ---------- Empty state ---------- */
.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-6);
  max-width: 440px;
  margin: 0 auto;
}
.empty-state .icon {
  width: 72px;
  height: 72px;
  margin: 0 auto var(--space-5);
  border-radius: var(--radius-full);
  background: var(--color-surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
}
.empty-state .icon svg {
  width: 32px;
  height: 32px;
}
.empty-state h3 {
  margin-bottom: var(--space-2);
}
.empty-state p {
  margin-bottom: var(--space-6);
}

/* ---------- Skeleton ---------- */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-surface-alt) 25%,
    var(--color-surface-2) 50%,
    var(--color-surface-alt) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
.skel-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.skel-card .skel-media {
  aspect-ratio: 1 / 1;
}
.skel-card .skel-line {
  height: 12px;
  margin: 10px 12px;
}
.skel-card .skel-line.short {
  width: 50%;
}

/* ---------- Toast ---------- */
.toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  pointer-events: none;
}
.toast {
  background: var(--color-black);
  color: #fff;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 260px;
  max-width: 360px;
  pointer-events: auto;
  animation: toastIn var(--dur) var(--ease);
}
.toast.success {
  border-left: 3px solid var(--success);
}
.toast.error {
  border-left: 3px solid var(--danger);
}
.toast.info {
  border-left: 3px solid var(--info);
}
.toast.warning {
  border-left: 3px solid var(--warning);
}
.toast svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.toast.removing {
  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;
  }
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(10, 10, 10, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur), visibility var(--dur);
}
.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}
.modal {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  max-width: 440px;
  width: 100%;
  transform: scale(0.95);
  transition: transform var(--dur) var(--ease);
  text-align: center;
}
.modal-overlay.open .modal {
  transform: scale(1);
}
.modal .modal-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto var(--space-5);
  border-radius: var(--radius-full);
  background: var(--danger-soft);
  color: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal .modal-icon svg {
  width: 28px;
  height: 28px;
}
.modal h3 {
  margin-bottom: var(--space-2);
}
.modal p {
  margin-bottom: var(--space-6);
}
.modal-actions {
  display: flex;
  gap: var(--space-3);
}
.modal-actions .btn {
  flex: 1;
}

/* ---------- Loader ---------- */
.spinner {
  width: 22px;
  height: 22px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: var(--radius-full);
  animation: spin 0.7s linear infinite;
}
.spinner.dark {
  border-color: var(--color-surface-2);
  border-top-color: var(--color-text);
}
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: radial-gradient(circle at top, #f8f4ee 0%, #ffffff 45%, #f2f2f2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.page-loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  text-align: center;
}
.page-loader-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  color: var(--color-black);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 1.2rem;
  font-weight: 700;
}
.page-loader-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--color-black);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}
.page-loader-text {
  font-size: 1rem;
}
.page-loader-subtitle {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.page-loader .spinner {
  width: 34px;
  height: 34px;
  border-color: var(--color-surface-2);
  border-top-color: var(--color-black);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Animations ---------- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.fade-in {
  animation: fadeIn var(--dur) var(--ease);
}
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-slow) var(--ease),
    transform var(--dur-slow) var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Helpers ---------- */
.flex {
  display: flex;
}
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.gap-2 {
  gap: var(--space-2);
}
.gap-3 {
  gap: var(--space-3);
}
.gap-4 {
  gap: var(--space-4);
}
.items-center {
  align-items: center;
}
.justify-center {
  justify-content: center;
}
.wrap {
  flex-wrap: wrap;
}
.mt-4 {
  margin-top: var(--space-4);
}
.mt-6 {
  margin-top: var(--space-6);
}
.mt-8 {
  margin-top: var(--space-8);
}
.mb-4 {
  margin-bottom: var(--space-4);
}
.mb-6 {
  margin-bottom: var(--space-6);
}
.mb-8 {
  margin-bottom: var(--space-8);
}
.hidden {
  display: none !important;
}
.w-full {
  width: 100%;
}

/* ---------- Image loading ---------- */
img.lazy-img {
  opacity: 0;
  transition: opacity var(--dur);
}
img.lazy-img.loaded {
  opacity: 1;
}

/* ---------- Page transitions ---------- */
main {
  animation: fadeIn var(--dur) var(--ease);
}

/* ============================================================
   ORDERS PAGE
   ============================================================ */
.order-filter-bar {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}
.order-filter-bar .select-input {
  min-width: 180px;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fff;
  font-size: 0.9rem;
  font-family: var(--font-sans);
  color: var(--color-text);
  cursor: pointer;
}
.orders-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.order-card {
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.order-card:hover {
  box-shadow: var(--shadow-md);
}
.order-card-head .order-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.order-id {
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--color-text);
}
.order-date {
  font-size: 0.82rem;
}
.order-statuses {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.order-card-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.order-thumbs {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}
.order-thumb {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--color-border);
  background: var(--color-surface-alt);
}
.order-thumb-more {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--color-surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
}
.order-summary-mini {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.order-total {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
}

/* Order detail modal */
.order-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-5);
  flex-wrap: wrap;
  gap: var(--space-3);
}
.order-detail-head h2 {
  margin: 4px 0;
  font-size: 1.5rem;
}
.order-detail-section {
  margin-bottom: var(--space-6);
}
.order-detail-section h3 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}
.order-detail-text {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--color-text-soft);
}
.order-items-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.order-item-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.order-item-img {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--color-surface-alt);
  flex-shrink: 0;
}
.order-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.order-item-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.order-item-price {
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
}
.order-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}
.order-totals {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  background: var(--color-surface-alt);
  border-radius: var(--radius-md);
}
.total-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
  color: var(--color-text-soft);
}
.total-row.total-final {
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border-strong);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
}
.order-timeline {
  margin-bottom: var(--space-4);
}
.timeline {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding-bottom: var(--space-2);
}
.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  min-width: 80px;
  flex: 1;
}
.timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: var(--radius-full);
  background: var(--color-surface-2);
  border: 2px solid var(--color-border-strong);
  transition: all var(--dur) var(--ease);
}
.timeline-step.done .timeline-dot {
  background: var(--success);
  border-color: var(--success);
  box-shadow: 0 0 0 4px var(--success-soft);
}
.timeline-label {
  font-size: 0.74rem;
  color: var(--color-text-muted);
  text-align: center;
}
.timeline-step.done .timeline-label {
  color: var(--color-text);
  font-weight: 600;
}

/* ============================================================
   WISHLIST PAGE
   ============================================================ */
.wishlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-5);
}
.wishlist-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
  display: flex;
  flex-direction: column;
}
.wishlist-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.wishlist-item-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--color-surface-alt);
  overflow: hidden;
}
.wishlist-item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.wishlist-item:hover .wishlist-item-media img {
  transform: scale(1.04);
}
.wishlist-item-remove {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--danger);
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.wishlist-item-remove:hover {
  background: var(--danger);
  color: #fff;
  transform: scale(1.08);
}
.wishlist-item-remove svg {
  width: 18px;
  height: 18px;
}
.wishlist-item-body {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
}
.wishlist-item-brand {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}
.wishlist-item-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wishlist-item-price {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
}
.wishlist-item-price .was {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--color-text-muted);
  text-decoration: line-through;
  margin-left: var(--space-2);
}
.wishlist-item-actions {
  padding: 0 var(--space-4) var(--space-4);
  display: flex;
  gap: var(--space-2);
}
.wishlist-item-actions .btn {
  flex: 1;
}
.wishlist-item.sold-out .wishlist-item-media::after {
  content: "Sold Out";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.45);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}
.wishlist-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
  gap: var(--space-3);
}
.wishlist-toolbar .count {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}
