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

:root {
  --grad-a: #6366f1;
  --grad-b: #a855f7;
  --brand-gradient: linear-gradient(135deg, var(--grad-a), var(--grad-b));

  --bg: #fafafa;
  --bg-elevated: #ffffff;
  --bg-muted: #f0f1f5;
  --text: #17181c;
  --text-muted: #667085;
  --border: #e6e8ee;
  --accent: #6366f1;
  --accent-strong: #4f46e5;
  --accent-tint: rgba(99, 102, 241, 0.11);
  --danger: #dc2626;
  --success: #059669;
  --header-bg: rgba(250, 250, 250, 0.82);
  --ring: rgba(99, 102, 241, 0.28);
  --shadow-sm: 0 1px 2px rgba(23, 24, 40, 0.06);
  --shadow-md: 0 10px 30px -12px rgba(23, 24, 40, 0.18);
  --shadow-lg: 0 24px 60px -18px rgba(23, 24, 40, 0.25);
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-accent: Georgia, "Times New Roman", serif;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0e0f13;
  --bg-elevated: #16181f;
  --bg-muted: #1d202a;
  --text: #f2f3f7;
  --text-muted: #9aa1b2;
  --border: #262a36;
  --accent-tint: rgba(129, 140, 248, 0.16);
  --header-bg: rgba(14, 15, 19, 0.78);
  --ring: rgba(139, 140, 248, 0.32);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 30px -12px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 24px 60px -18px rgba(0, 0, 0, 0.65);
  color-scheme: dark;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.35s ease, color 0.35s ease;
}

body.locked { overflow: hidden; }

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; padding: 0; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.container { max-width: 1120px; margin-inline: auto; padding-inline: 1.25rem; }

.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 200;
  background: var(--bg-elevated); border: 1px solid var(--border);
  padding: 0.6rem 1rem; border-radius: var(--r-sm); transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; }

.icon { flex-shrink: 0; vertical-align: middle; }

.only-light { display: inline-flex; }
.only-dark { display: none; }
[data-theme="dark"] .only-light { display: none; }
[data-theme="dark"] .only-dark { display: inline-flex; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 2rem; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 700; letter-spacing: -0.02em; font-size: 1.15rem; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; }
.brand-name em {
  font-family: var(--font-accent); font-style: italic; font-weight: 500; margin-left: 2px;
  background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.site-nav { display: flex; gap: 1.4rem; margin-left: auto; }
.site-nav a { color: var(--text-muted); font-weight: 500; font-size: 0.95rem; transition: color 0.2s ease; }
.site-nav a:hover { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 0.4rem; }

.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px; color: var(--text-muted);
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.icon-btn:hover { background: var(--bg-muted); color: var(--text); }
.icon-btn:active { transform: scale(0.92); }

.cart-badge {
  position: absolute; top: 2px; right: 0;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--brand-gradient); color: #fff;
  font-size: 0.68rem; font-weight: 700; line-height: 18px; text-align: center;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.45);
}
.cart-badge.bump { animation: bump 0.45s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.45); } 100% { transform: scale(1); } }

.hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding: clamp(4rem, 10vw, 7rem) 0 clamp(2.5rem, 5vw, 3.5rem);
  text-align: center;
}
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%;
  filter: blur(90px); opacity: 0.45; pointer-events: none;
}
.hero::before {
  width: 480px; height: 480px; left: 50%; top: -220px; transform: translateX(-80%);
  background: radial-gradient(circle, rgba(99, 102, 241, 0.55), transparent 70%);
}
.hero::after {
  width: 420px; height: 420px; left: 50%; top: -160px; transform: translateX(8%);
  background: radial-gradient(circle, rgba(168, 85, 247, 0.5), transparent 70%);
}
[data-theme="dark"] .hero::before, [data-theme="dark"] .hero::after { opacity: 0.32; }

.eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--accent-strong); background: var(--accent-tint);
  border: 1px solid rgba(99, 102, 241, 0.3); padding: 0.32rem 0.95rem; border-radius: 999px;
}
[data-theme="dark"] .eyebrow { color: #a5b4fc; border-color: rgba(129, 140, 248, 0.35); }

.hero h1 {
  margin: 1.2rem 0 0;
  font-size: clamp(2.4rem, 6vw, 3.8rem); line-height: 1.05; letter-spacing: -0.03em; font-weight: 800;
}
.hero h1 em {
  font-family: var(--font-accent); font-weight: 400;
  background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { max-width: 34rem; margin: 1.1rem auto 0; color: var(--text-muted); font-size: 1.08rem; }
.hero-actions { display: flex; justify-content: center; align-items: center; gap: 0.8rem; margin-top: 2rem; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.72rem 1.4rem; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  border: 1px solid transparent; user-select: none;
  transition: transform 0.18s ease, box-shadow 0.25s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn.primary { background: var(--brand-gradient); color: #fff; box-shadow: 0 8px 22px -8px rgba(99, 102, 241, 0.6); }
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -10px rgba(99, 102, 241, 0.65); }
.btn.primary:active { transform: translateY(0) scale(0.97); }
.btn.ghost { background: var(--bg-elevated); border-color: var(--border); color: var(--text); box-shadow: var(--shadow-sm); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent-strong); transform: translateY(-2px); }
[data-theme="dark"] .btn.ghost:hover { color: #a5b4fc; }
.btn.small { padding: 0.42rem 0.85rem; font-size: 0.84rem; }
.btn.block { width: 100%; }
.btn[disabled], .btn.is-loading { opacity: 0.65; pointer-events: none; }
.btn.is-loading::after {
  content: ""; width: 1em; height: 1em; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-block: 1rem 4rem; }
.feature {
  display: flex; gap: 0.9rem; align-items: flex-start;
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 1.1rem 1.2rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feature-icon {
  display: inline-flex; width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px;
  background: var(--accent-tint); color: var(--accent-strong);
  align-items: center; justify-content: center;
}
[data-theme="dark"] .feature-icon { color: #a5b4fc; }
.feature strong { display: block; font-size: 0.95rem; }
.feature small { color: var(--text-muted); font-size: 0.82rem; line-height: 1.45; display: block; margin-top: 2px; }

.shop { padding-bottom: 5rem; scroll-margin-top: 80px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.8rem; }
.section-head h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.02em; }
.chips { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.chip {
  padding: 0.45rem 1rem; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg-elevated); color: var(--text-muted); font-size: 0.86rem; font-weight: 600;
  transition: all 0.22s ease;
}
.chip:hover { border-color: var(--accent); color: var(--accent-strong); transform: translateY(-1px); }
.chip.active { background: var(--brand-gradient); border-color: transparent; color: #fff; box-shadow: 0 6px 16px -6px rgba(99, 102, 241, 0.55); }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.4rem; }
.card {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--r-xl);
  overflow: hidden; cursor: pointer; animation: fadeUp 0.5s ease backwards;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.card:hover, .card:focus-visible { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(99, 102, 241, 0.45); }
.card-art { aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-muted); }
.card-art img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); user-select: none; }
.card:hover .card-art img, .card:focus-visible .card-art img { transform: scale(1.08); }
.card-body { padding: 1.05rem 1.15rem 1.2rem; }
.card-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem; }
.card-name { margin: 0; font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge {
  flex-shrink: 0; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  color: #fff; background: var(--brand-gradient); padding: 0.22rem 0.55rem; border-radius: 999px;
}
.card-meta { margin: 0.15rem 0 0; font-size: 0.8rem; color: var(--text-muted); text-transform: capitalize; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 0.9rem; }
.price { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; }
.add-btn { color: var(--accent-strong); background: var(--accent-tint); border-radius: 999px; }
.add-btn:hover { background: var(--brand-gradient); color: #fff; box-shadow: 0 6px 16px -6px rgba(99, 102, 241, 0.55); }
[data-theme="dark"] .add-btn { color: #a5b4fc; }

.modal-wrap {
  position: fixed; inset: 0; z-index: 110;
  display: grid; place-items: center; padding: 1.25rem;
  background: rgba(10, 11, 16, 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity 0.28s ease;
}
.modal-wrap.open { opacity: 1; }
.modal-wrap[hidden] { display: none; }
.modal {
  position: relative; width: min(760px, 100%); max-height: min(88vh, 720px); overflow: auto;
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--r-xl);
  display: grid; grid-template-columns: 1fr 1fr; box-shadow: var(--shadow-lg);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}
.modal-wrap.open .modal { transform: none; }
.modal-close { position: absolute; top: 0.8rem; right: 0.8rem; z-index: 2; background: var(--bg-elevated); box-shadow: var(--shadow-md); }
.modal-art { min-height: 320px; }
.modal-art img { width: 100%; height: 100%; object-fit: cover; }
.modal-info { padding: 2rem 2rem 2.2rem; display: flex; flex-direction: column; }
.eyebrow-sm { margin: 0; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent-strong); }
[data-theme="dark"] .eyebrow-sm { color: #a5b4fc; }
.modal-info h2 { margin: 0.5rem 0 0.6rem; font-size: 1.6rem; letter-spacing: -0.02em; line-height: 1.15; }
.modal-desc { color: var(--text-muted); font-size: 0.95rem; margin: 0 0 1.6rem; }
.modal-buy {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-top: auto; padding-top: 1.2rem; border-top: 1px solid var(--border);
}
[data-modal-add] { margin-top: 1.2rem; }
.checkout-btn { margin-top: 0.9rem; }
.price-lg { font-size: 1.55rem; font-weight: 800; letter-spacing: -0.02em; }
.stock-note { margin: 0.9rem 0 0; font-size: 0.8rem; color: var(--text-muted); text-align: center; }

.stepper {
  display: inline-flex; align-items: center;
  border: 1px solid var(--border); border-radius: 999px; overflow: hidden; background: var(--bg-elevated);
}
.stepper button, .stepper .stepper-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; color: var(--text-muted);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.stepper button:hover, .stepper .stepper-btn:hover { background: var(--bg-muted); color: var(--text); }
.stepper output, .stepper-val { min-width: 2ch; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.stepper.sm button { width: 28px; height: 28px; }
.stepper.sm output { min-width: 2ch; text-align: center; font-size: 0.88rem; font-weight: 700; }

.scrim {
  position: fixed; inset: 0; z-index: 104;
  background: rgba(10, 11, 16, 0.5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  opacity: 0; transition: opacity 0.3s ease;
}
.scrim.open { opacity: 1; }
.scrim[hidden] { display: none; }

.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 105;
  width: min(430px, 100vw); display: flex; flex-direction: column;
  background: var(--bg-elevated); border-left: 1px solid var(--border); box-shadow: var(--shadow-lg);
  transform: translateX(105%); transition: transform 0.38s cubic-bezier(0.32, 0.72, 0.24, 1);
}
.cart-drawer.open { transform: none; }
.cart-drawer[hidden] { display: none; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.05rem 1.25rem; border-bottom: 1px solid var(--border);
}
.drawer-head h2 { margin: 0; font-size: 1.05rem; display: flex; align-items: center; gap: 0.55rem; }
.count-pill {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: var(--accent-tint); color: var(--accent-strong);
  font-size: 0.75rem; font-weight: 700; display: inline-grid; place-items: center;
}
[data-theme="dark"] .count-pill { color: #a5b4fc; }
.cart-items {
  flex: 1; overflow-y: auto; padding: 1rem 1.25rem;
  display: flex; flex-direction: column; gap: 1rem; scrollbar-width: thin;
}
.cart-row {
  display: grid; grid-template-columns: 72px 1fr auto; gap: 0.9rem; align-items: center;
  padding-bottom: 1rem; border-bottom: 1px dashed var(--border); animation: fadeUp 0.35s ease backwards;
}
.cart-thumb { width: 72px; height: 58px; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); }
.cart-row-name { margin: 0; font-weight: 600; font-size: 0.92rem; }
.cart-row-price { margin: 0 0 0.4rem; font-size: 0.8rem; color: var(--text-muted); }
.row-actions { display: flex; align-items: center; gap: 0.8rem; }
.link-danger { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.78rem; color: var(--text-muted); transition: color 0.2s ease; }
.link-danger:hover { color: var(--danger); }
.cart-line-total { font-weight: 700; font-size: 0.95rem; }

.drawer-foot { border-top: 1px solid var(--border); padding: 1.15rem 1.25rem 1.35rem; }
.totals p { display: flex; justify-content: space-between; margin: 0.2rem 0; font-size: 0.9rem; color: var(--text-muted); }
.totals p.grand {
  color: var(--text); font-weight: 700; font-size: 1rem;
  margin-top: 0.5rem; padding-top: 0.55rem; border-top: 1px solid var(--border);
}
.signin-note {
  display: flex; align-items: flex-start; gap: 0.5rem;
  margin: 0.9rem 0 0; font-size: 0.84rem; color: var(--text-muted);
  background: var(--accent-tint); border: 1px dashed rgba(99, 102, 241, 0.5);
  padding: 0.6rem 0.8rem; border-radius: var(--r-sm);
}
.signin-note a { color: var(--accent-strong); font-weight: 700; text-decoration: underline; }
[data-theme="dark"] .signin-note a { color: #a5b4fc; }
.signin-note.shake { animation: shake 0.4s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

.empty-cart, .empty-state, .load-error {
  text-align: center; padding: 3rem 1rem; color: var(--text-muted);
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
}
.empty-cart h3, .empty-state h3, .load-error h3 { margin: 0.7rem 0 0; color: var(--text); font-size: 1.05rem; }
.empty-cart p, .empty-state p, .load-error p { margin: 0.2rem 0 0; font-size: 0.88rem; }
.empty-cart .btn, .empty-state .btn, .load-error .btn { margin-top: 1.1rem; }
.empty-state { grid-column: 1 / -1; }

.success-view { text-align: center; padding: 2.5rem 1rem; }
.success-ring {
  display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%;
  background: var(--brand-gradient); color: #fff;
  box-shadow: 0 14px 34px -10px rgba(99, 102, 241, 0.65);
  animation: pop 0.5s cubic-bezier(0.3, 1.6, 0.5, 1);
}
@keyframes pop { from { transform: scale(0.4); opacity: 0; } }
.success-view h3 { margin: 1rem 0 0.3rem; }
.success-view p { color: var(--text-muted); font-size: 0.92rem; margin: 0 0 1.4rem; }
.success-actions { display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; }

.toast-region {
  position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 130;
  display: flex; flex-direction: column; gap: 0.6rem; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 0.65rem;
  background: var(--bg-elevated); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: var(--r-md); box-shadow: var(--shadow-lg); padding: 0.8rem 1.05rem; max-width: 340px;
  opacity: 0; transform: translateY(12px) scale(0.98);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}
.toast.show { opacity: 1; transform: none; }
.toast.hide { opacity: 0; transform: translateY(8px) scale(0.98); }
.toast p { margin: 0; font-size: 0.88rem; font-weight: 500; }
.toast-icon { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; color: #fff; }
.toast-success { border-left-color: var(--success); }
.toast-success .toast-icon { background: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-error .toast-icon { background: var(--danger); }
.toast-info { border-left-color: var(--accent); }
.toast-info .toast-icon { background: var(--accent); }

.account-page { min-height: calc(100vh - 200px); padding-block: 3rem 4rem; }
.account-page[data-pending] { display: grid; place-items: center; }
.account-page[data-pending] section[hidden] { display: none; }
.account-page[data-pending]::after {
  content: ""; width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

.auth-card {
  max-width: 430px; margin-inline: auto;
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--r-xl);
  padding: 2rem; box-shadow: var(--shadow-md); animation: fadeUp 0.5s ease backwards;
}
.auth-title { margin: 0 0 1.4rem; font-size: 1.45rem; letter-spacing: -0.02em; text-align: center; }
.tabs { display: flex; background: var(--bg-muted); border-radius: 12px; padding: 4px; margin-bottom: 1.5rem; }
.tab {
  flex: 1; padding: 0.55rem; border-radius: 9px;
  font-weight: 600; font-size: 0.9rem; color: var(--text-muted);
  transition: all 0.25s ease;
}
.tab.active { background: var(--bg-elevated); color: var(--text); box-shadow: var(--shadow-sm); }

.field { margin-bottom: 1.05rem; }
.field label { display: block; font-size: 0.84rem; font-weight: 600; margin-bottom: 0.35rem; }
.field input {
  width: 100%; padding: 0.78rem 1rem; border-radius: 12px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.35s ease;
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.field input::placeholder { color: var(--text-muted); opacity: 0.65; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 3rem; }
.reveal-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; }
.form-hint { margin: 0.3rem 0 0; font-size: 0.76rem; color: var(--text-muted); }
.form-error {
  display: flex; align-items: flex-start; gap: 0.5rem;
  margin: 0 0 1rem; padding: 0.65rem 0.8rem; border-radius: var(--r-sm);
  background: rgba(220, 38, 38, 0.08); border: 1px solid rgba(220, 38, 38, 0.3);
  color: var(--danger); font-size: 0.84rem; animation: shake 0.4s ease;
}
.form-error[hidden] { display: none; }

.dash-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.avatar {
  display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--brand-gradient); color: #fff; font-size: 1.5rem; font-weight: 800;
  box-shadow: 0 10px 24px -8px rgba(99, 102, 241, 0.6);
}
.dash-id { margin-right: auto; }
.dash-id h1 { margin: 0; font-size: 1.4rem; letter-spacing: -0.02em; }
.dash-id p { margin: 0; color: var(--text-muted); font-size: 0.9rem; }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 2.2rem; }
.stat-card {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 1.15rem 1.25rem; transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-card strong { display: block; font-size: 1.55rem; letter-spacing: -0.02em; }
.stat-card span { color: var(--text-muted); font-size: 0.82rem; }

.orders-head h2 { font-size: 1.25rem; margin: 0 0 1rem; letter-spacing: -0.01em; }
.orders { display: flex; flex-direction: column; gap: 0.9rem; }
.order-card {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 1.1rem 1.3rem; animation: fadeUp 0.45s ease backwards;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.order-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.order-head { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; }
.order-ref { font-weight: 700; letter-spacing: 0.02em; }
.order-date { color: var(--text-muted); font-size: 0.82rem; margin-left: 0.6rem; }
.status-pill {
  font-size: 0.72rem; font-weight: 700; text-transform: capitalize; letter-spacing: 0.04em;
  color: var(--success); background: rgba(5, 150, 105, 0.1); border: 1px solid rgba(5, 150, 105, 0.3);
  padding: 0.18rem 0.6rem; border-radius: 999px;
}
.order-items { list-style: none; margin: 0.8rem 0; padding: 0.8rem 0 0; border-top: 1px dashed var(--border); }
.order-items li { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.88rem; color: var(--text-muted); padding: 0.18rem 0; }
.order-total {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--border); padding-top: 0.7rem;
  font-size: 0.9rem; color: var(--text-muted);
}
.order-total strong { color: var(--text); font-size: 1.02rem; }

.site-footer { border-top: 1px solid var(--border); padding: 1.6rem 0; margin-top: 2rem; }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  color: var(--text-muted); font-size: 0.85rem;
}
.footer-inner p { margin: 0; }
.footer-inner nav { display: flex; gap: 1.2rem; }
.footer-inner a:hover { color: var(--text); }

.skeleton-card { border-radius: var(--r-xl); border: 1px solid var(--border); overflow: hidden; }
.skeleton-art { aspect-ratio: 4 / 3; }
.skeleton-line { height: 14px; margin: 1rem 1.15rem; border-radius: 7px; width: 60%; }
.skeleton-line.short { width: 40%; }
.skeleton-art, .skeleton-line {
  background: linear-gradient(100deg, var(--bg-muted) 40%, var(--bg-elevated) 50%, var(--bg-muted) 60%);
  background-size: 200% 100%; animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.noscript-note {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 300;
  background: var(--bg-elevated); border: 1px solid var(--border);
  padding: 1rem; border-radius: var(--r-md); text-align: center;
}

@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (max-width: 860px) {
  .features { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .header-inner { gap: 1rem; height: 62px; }
  .site-nav { display: none; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.9rem; }
  .card-body { padding: 0.85rem 0.95rem 1rem; }
  .modal-wrap { padding: 0; align-items: end; }
  .modal { grid-template-columns: 1fr; width: 100%; max-height: 92vh; border-radius: var(--r-xl) var(--r-xl) 0 0; }
  .modal-art { min-height: 200px; max-height: 230px; }
  .modal-info { padding: 1.5rem 1.4rem 1.8rem; }
  .stat-grid { grid-template-columns: 1fr; }
  .dash-head .btn { margin-left: auto; }
}

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