﻿:root {
  --color-bg: #0e0e0f;
  --page-bg: linear-gradient(180deg, #1c1d1f 0%, #1c1d1f 65%, #0e0e0f 100%);
  --color-surface: #1c1d1f;
  --color-text: #f4f2ef;
  --color-text-muted: rgba(244, 242, 239, 0.62);
  --color-primary: #e71b80;
  --color-primary-dark: #9c0f5c;
  --color-primary-light: rgba(231, 27, 128, 0.14);
  --gradient-brand: linear-gradient(120deg, #9c0f5c, #e71b80 60%);
  --color-border: rgba(244, 242, 239, 0.16);
  --color-danger: #f87171;
  --color-danger-bg: rgba(248, 113, 113, 0.12);
  --color-danger-border: rgba(248, 113, 113, 0.35);
  --color-success: #4ade80;
  --color-dark: #141416;
  --color-invert-bg: #f4f2ef;
  --color-invert-text: #141416;
  --color-header-bg: rgba(28, 29, 31, 0.72);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg: #0e0e0f;
    --color-surface: #1c1d1f;
    --color-text: #f4f2ef;
    --color-text-muted: rgba(244, 242, 239, 0.62);
    --color-primary: #e71b80;
    --color-primary-dark: #9c0f5c;
    --color-primary-light: rgba(231, 27, 128, 0.14);
    --color-border: rgba(244, 242, 239, 0.16);
    --color-danger: #f87171;
    --color-danger-bg: rgba(248, 113, 113, 0.12);
    --color-danger-border: rgba(248, 113, 113, 0.35);
    --color-success: #4ade80;
    --color-invert-bg: #f4f2ef;
    --color-invert-text: #141416;
    --color-header-bg: rgba(28, 29, 31, 0.72);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --color-bg: #0e0e0f;
  --color-surface: #1c1d1f;
  --color-text: #f4f2ef;
  --color-text-muted: rgba(244, 242, 239, 0.62);
  --color-primary: #e71b80;
  --color-primary-dark: #9c0f5c;
  --color-primary-light: rgba(231, 27, 128, 0.14);
  --color-border: rgba(244, 242, 239, 0.16);
  --color-danger: #f87171;
  --color-danger-bg: rgba(248, 113, 113, 0.12);
  --color-danger-border: rgba(248, 113, 113, 0.35);
  --color-success: #4ade80;
  --color-invert-bg: #f4f2ef;
  --color-invert-text: #141416;
  --color-header-bg: rgba(28, 29, 31, 0.72);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --color-bg: #f4f2ef;
  --page-bg: var(--color-bg);
  --color-surface: #ffffff;
  --color-text: #141416;
  --color-text-muted: rgba(20, 20, 22, 0.62);
  --color-primary: #e71b80;
  --color-primary-dark: #9c0f5c;
  --color-primary-light: rgba(231, 27, 128, 0.1);
  --color-border: rgba(20, 20, 22, 0.12);
  --color-danger: #dc2626;
  --color-danger-bg: #fef2f2;
  --color-danger-border: #fecaca;
  --color-success: #16a34a;
  --color-invert-bg: #141416;
  --color-invert-text: #f4f2ef;
  --color-header-bg: rgba(255, 255, 255, 0.85);
  --shadow-sm: 0 1px 2px rgba(20, 20, 30, 0.06);
  --shadow-md: 0 8px 24px rgba(20, 20, 30, 0.08);
  --shadow-lg: 0 20px 40px rgba(20, 20, 30, 0.14);
  color-scheme: light;
}

:root[data-theme="ocean"] {
  --color-bg: #eaf6fb;
  --page-bg: linear-gradient(160deg, #e0f7fa 0%, #b3e5fc 45%, #4fc3f7 100%);
  --color-surface: #ffffff;
  --color-text: #0b2f3a;
  --color-text-muted: #4a6b76;
  --color-primary: #0284c7;
  --color-primary-dark: #075985;
  --color-primary-light: #e0f2fe;
  --gradient-brand: linear-gradient(135deg, #0ea5e9 0%, #0369a1 100%);
  --color-border: #bae6fd;
  --color-danger: #dc2626;
  --color-danger-bg: #fef2f2;
  --color-danger-border: #fecaca;
  --color-success: #16a34a;
  --color-dark: #0b2f3a;
  --color-invert-bg: #0b2f3a;
  --color-invert-text: #ffffff;
  --color-header-bg: rgba(255, 255, 255, 0.7);
  --shadow-sm: 0 1px 2px rgba(11, 47, 58, 0.08);
  --shadow-md: 0 8px 24px rgba(11, 47, 58, 0.12);
  --shadow-lg: 0 20px 40px rgba(11, 47, 58, 0.18);
  color-scheme: light;
}

:root[data-theme="sunset"] {
  --color-bg: #fff3ea;
  --page-bg: linear-gradient(160deg, #fff1e6 0%, #fed7aa 45%, #fb923c 100%);
  --color-surface: #ffffff;
  --color-text: #3a1f0b;
  --color-text-muted: #8a5a3a;
  --color-primary: #ea580c;
  --color-primary-dark: #c2410c;
  --color-primary-light: #ffedd5;
  --gradient-brand: linear-gradient(135deg, #f97316 0%, #db2777 100%);
  --color-border: #fed7aa;
  --color-danger: #dc2626;
  --color-danger-bg: #fef2f2;
  --color-danger-border: #fecaca;
  --color-success: #16a34a;
  --color-dark: #3a1f0b;
  --color-invert-bg: #3a1f0b;
  --color-invert-text: #ffffff;
  --color-header-bg: rgba(255, 255, 255, 0.7);
  --shadow-sm: 0 1px 2px rgba(58, 31, 11, 0.08);
  --shadow-md: 0 8px 24px rgba(58, 31, 11, 0.12);
  --shadow-lg: 0 20px 40px rgba(58, 31, 11, 0.18);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--page-bg);
  background-attachment: fixed;
  color: var(--color-text);
  transition: background 0.15s ease, color 0.15s ease;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4,
.logo,
.product-card__name,
.section-title {
  font-family: "Fraunces", serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}

body > main {
  flex: 1 0 auto;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  background: var(--color-header-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  row-gap: 10px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-accent {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 4px 12px rgba(91, 61, 240, 0.35);
}

.brand-mark svg {
  width: 19px;
  height: 19px;
}

.brand-mark--sm {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  box-shadow: none;
}

.brand-mark--sm svg {
  width: 15px;
  height: 15px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px 24px;
}

.nav-toggle {
  display: none;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  position: relative;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2px;
  margin: -1px 0 0 -9px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease, background 0.25s ease;
}

.nav-toggle span::before {
  transform: translateY(-6px);
}

.nav-toggle span::after {
  transform: translateY(6px);
}

.nav-toggle.open span {
  background: transparent;
}

.nav-toggle.open span::before {
  transform: translateY(0) rotate(45deg);
}

.nav-toggle.open span::after {
  transform: translateY(0) rotate(-45deg);
}

@media (max-width: 720px) {
  .site-header .container {
    position: relative;
  }

  .nav-toggle {
    display: flex;
  }

  .header-actions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    padding: 16px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.3s ease, opacity 0.25s ease;
  }

  .header-actions.open {
    max-height: 400px;
    opacity: 1;
    pointer-events: auto;
  }

  .theme-toggle {
    width: 100%;
  }

  .account-menu {
    flex-wrap: wrap;
  }
}

.theme-toggle {
  height: 40px;
  padding: 0 30px 0 14px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background-color: var(--color-surface);
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--color-text-muted) 50%),
    linear-gradient(135deg, var(--color-text-muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) center, calc(100% - 12px) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.theme-toggle:hover {
  background-color: var(--color-primary-light);
  border-color: var(--color-primary);
  transform: translateY(-1px);
}

.account-menu {
  display: flex;
  align-items: center;
  gap: 14px;
}

.account-greeting {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.account-link {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.account-link:hover {
  color: var(--color-primary-dark);
}

.account-logout {
  color: var(--color-text-muted);
}

.cart-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.cart-link:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  transform: translateY(-1px);
}

.cart-badge {
  background: var(--gradient-brand);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 999px;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

/* Layout */
main {
  padding: 0 0 80px;
}

.page-title {
  font-size: 1.85rem;
  font-weight: 800;
  margin: 0 0 28px;
  letter-spacing: -0.03em;
}

/* Hero */
.hero {
  background: var(--gradient-brand);
  color: #fff;
  padding: 72px 0;
  margin-bottom: 48px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.18), transparent 55%);
  pointer-events: none;
}

.hero__eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.16);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero__title {
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 16px;
  max-width: 640px;
}

.hero__subtitle {
  font-size: 1.05rem;
  opacity: 0.92;
  max-width: 520px;
  line-height: 1.6;
  margin: 0 0 28px;
}

.hero .btn-primary {
  background: #fff;
  color: var(--color-primary-dark);
}

.hero .btn-primary:hover {
  background: #f2f0fe;
}

/* Category filter pills */
.category-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.category-pill {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.category-pill:hover {
  border-color: var(--color-primary);
  color: var(--color-text);
}

.category-pill.is-active {
  background: var(--color-invert-bg);
  border-color: var(--color-invert-bg);
  color: var(--color-invert-text);
}

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
}

.product-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: transparent;
}

.product-card__image-wrap {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--color-bg);
}

.product-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.product-card:hover .product-card__image {
  transform: scale(1.06);
}

.product-card__quick-add {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: none;
  background: #fff;
  color: var(--color-primary);
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.product-card:hover .product-card__quick-add {
  opacity: 1;
  transform: translateY(0);
}

.product-card__quick-add:hover {
  background: var(--color-primary);
  color: #fff;
}

.product-card__quick-add.is-added {
  background: var(--color-success);
  color: #fff;
  opacity: 1;
  transform: translateY(0);
}

.product-card__body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.product-card__category {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
  font-weight: 700;
}

.product-card__name {
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.product-card__price {
  margin-top: auto;
  font-weight: 800;
  color: var(--color-text);
  font-size: 1.08rem;
  padding-top: 6px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 13px 24px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(91, 61, 240, 0.28);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-bg);
}

.btn-block {
  width: 100%;
}

.btn-danger {
  background: var(--color-danger);
  color: #fff;
}

.btn-danger:hover {
  opacity: 0.9;
}

.btn-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.product-main {
  padding-top: 32px;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.breadcrumb a:hover {
  color: var(--color-primary);
}

.breadcrumb .sep {
  margin: 0 6px;
  opacity: 0.6;
}

/* Product detail */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.product-detail__image {
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.product-detail__category {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary);
  font-weight: 700;
}

.product-detail__name {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 8px 0 14px;
}

.product-detail__price {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 18px;
}

.product-detail__description {
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 26px;
}

.stock-note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 14px;
}

.quantity-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.quantity-row label {
  font-weight: 600;
  font-size: 0.9rem;
}

.quantity-input {
  width: 64px;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  font-size: 1rem;
  text-align: center;
}

.trust-badges {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

.trust-badge {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.trust-badge__icon {
  font-size: 1.3rem;
}

/* Cart page */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}

.cart-items {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 8px 24px;
}

.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--color-border);
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item__image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

.cart-item__name {
  font-weight: 600;
}

.cart-item__unit-price {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin-top: 2px;
}

.cart-item__qty {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qty-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.15s ease;
}

.qty-btn:hover {
  background: var(--color-bg);
}

.cart-item__remove {
  color: var(--color-danger);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.cart-summary {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: sticky;
  top: 92px;
}

.cart-summary__title {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 16px;
}

.cart-summary__row {
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
  color: var(--color-text-muted);
  padding: 6px 0;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.15rem;
  font-weight: 800;
  padding: 14px 0;
  margin: 8px 0 18px;
  border-top: 1px solid var(--color-border);
}

.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--color-text-muted);
}

.empty-state p {
  margin-bottom: 20px;
  font-size: 1.05rem;
}

.email-field {
  margin-bottom: 18px;
  width: 100%;
}

.email-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.email-field input {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  font-size: 0.95rem;
}

.email-field input:focus,
.quantity-input:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

.error-banner {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border: 1px solid var(--color-danger-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--color-invert-bg);
  color: var(--color-invert-text);
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Result pages */
.result-page {
  text-align: center;
  padding: 80px 20px;
  max-width: 480px;
  margin: 0 auto;
}

.result-icon {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.result-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.result-text {
  color: var(--color-text-muted);
  margin-bottom: 26px;
  line-height: 1.6;
}

/* Auth forms */
.auth-page {
  max-width: 420px;
  margin: 48px auto;
  padding: 0 20px;
}

.auth-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.auth-card__title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.auth-card__subtitle {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.form-field {
  margin-bottom: 16px;
}

.form-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  font-size: 0.95rem;
  font-family: inherit;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

.auth-card__footer {
  text-align: center;
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin-top: 18px;
}

.auth-card__footer a {
  color: var(--color-primary);
  font-weight: 600;
}

/* Admin panel */
.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
}

.admin-tab {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 4px;
  margin-bottom: -1px;
  color: var(--color-text-muted);
  border-bottom: 2px solid transparent;
}

.admin-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.admin-tab + .admin-tab {
  margin-left: 12px;
}

.admin-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 32px;
  align-items: start;
}

.admin-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.admin-panel__title {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 18px;
}

/* Billing */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}

.stat-card__label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.stat-card__value {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.billing-chart-panel {
  margin-bottom: 20px;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  height: 180px;
  padding-top: 8px;
}

.bar-chart__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  min-width: 0;
}

.bar-chart__value {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-bottom: 6px;
  white-space: nowrap;
}

.bar-chart__bar {
  width: 100%;
  max-width: 48px;
  background: var(--color-primary);
  border-radius: 6px 6px 0 0;
  transition: height 0.2s ease;
}

.bar-chart__label {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-top: 8px;
  text-transform: capitalize;
}

.admin-table-wrap {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.admin-table th {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.admin-table__actions {
  display: flex;
  gap: 10px;
}

.link-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-primary);
  padding: 0;
  font-family: inherit;
}

.link-btn.danger {
  color: var(--color-danger);
}

.link-btn:hover {
  text-decoration: underline;
}

.bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-primary-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 12px 18px;
  margin-bottom: 12px;
}

.bulk-bar__count {
  font-size: 0.88rem;
  font-weight: 600;
}

.admin-table th:first-child,
.admin-table td:first-child {
  width: 1%;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.access-denied {
  text-align: center;
  padding: 80px 20px;
  color: var(--color-text-muted);
}

.danger-zone {
  max-width: 520px;
  border-color: var(--color-danger-border);
}

.danger-zone__text {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 18px;
}

/* Order history */
.order-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 640px;
}

.order-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
}

.order-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 14px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}

.order-card__id {
  font-weight: 700;
}

.order-card__date {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin-top: 2px;
}

.order-card__total {
  font-weight: 800;
  font-size: 1.1rem;
}

.order-card__items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
}

.order-card__items li {
  display: flex;
  justify-content: space-between;
  color: var(--color-text-muted);
}

/* Admin orders tab */
.order-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.order-status.is-paid {
  color: var(--color-success);
  background: color-mix(in srgb, var(--color-success) 15%, transparent);
}

.order-status.is-pending {
  color: var(--color-text-muted);
  background: var(--color-border);
}

.order-detail-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  padding: 6px 0;
}

@media (max-width: 900px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: 40px 0;
  margin-top: 40px;
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.site-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.05rem;
}

.site-footer__note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.site-footer__social {
  display: flex;
  gap: 12px;
}

.site-footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.site-footer__social a:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  transform: translateY(-2px);
}

.site-footer__social svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 900px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }

  .cart-summary {
    position: static;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 52px 0;
  }

  .product-detail {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .trust-badges {
    grid-template-columns: 1fr;
  }

  .cart-item {
    grid-template-columns: 60px 1fr;
    grid-template-rows: auto auto;
  }

  .cart-item__qty,
  .cart-item__remove {
    grid-column: 2;
  }

  .container {
    padding: 0 16px;
  }

  .site-header .container {
    height: auto;
    padding: 12px 16px;
  }

  .logo {
    font-size: 1.1rem;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .theme-toggle {
    height: 36px;
    padding: 0 26px 0 10px;
    font-size: 0.78rem;
  }

  .account-menu {
    flex-wrap: wrap;
    row-gap: 6px;
    gap: 6px 10px;
    font-size: 0.82rem;
  }

  .cart-link {
    padding: 7px 12px;
    font-size: 0.85rem;
  }

  .page-title {
    font-size: 1.5rem;
  }

  .auth-card {
    padding: 22px;
  }

  .invoice {
    margin: 16px auto;
    padding: 24px 18px;
  }

  .invoice__header {
    flex-direction: column;
    gap: 10px;
  }

  .invoice__meta {
    text-align: left;
  }

  .admin-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-tab {
    white-space: nowrap;
  }

  .bar-chart {
    gap: 10px;
  }
}

@media (max-width: 400px) {
  .account-greeting {
    display: none;
  }
}

/* Invoice / comprobante */
.invoice {
  max-width: 720px;
  margin: 32px auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
}

.invoice__actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.invoice__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
}

.invoice__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.3rem;
}

.invoice__meta {
  text-align: right;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.invoice__customer {
  margin-bottom: 24px;
  font-size: 0.92rem;
}

.invoice__customer strong {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.invoice__items {
  margin-bottom: 20px;
}

.invoice__total {
  display: flex;
  justify-content: space-between;
  font-size: 1.2rem;
  font-weight: 800;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.invoice__note {
  margin-top: 24px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  text-align: center;
}

@media print {
  .no-print {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .invoice {
    margin: 0;
    max-width: none;
    border: none;
    padding: 0;
  }
}

