/* ==========================================================================
   WILLY SHOP — design system
   Palette: Primary #3155D9 · Bright Blue #6685FF · Ice Blue #EAF0FF · White #FFFFFF
            Midnight #171C2B · Background #F5F7FC · Accent #FFB547
   Motif: the digital voucher — notched edges and a perforated stub.
   ========================================================================== */

:root {
  /* Brand palette */
  --primary: #3155D9;
  --primary-bright: #6685FF;
  --ice: #EAF0FF;
  --white: #FFFFFF;
  --ink: #171C2B;
  --bg: #F5F7FC;
  --accent: #FFB547;

  /* Tints derived from the palette */
  --primary-dark: #2646BE;
  --ink-2: #474F66;
  --ink-3: #697189;
  --line: #E2E8F6;
  --line-strong: #CDD6EE;
  --ice-strong: #D8E2FF;
  --accent-soft: #FFF2DB;
  --accent-ink: #7A4A00;

  /* Feedback states */
  --success: #17805A;
  --success-soft: #E5F5EE;
  --danger: #C2364B;
  --danger-soft: #FCECEF;

  /* Type */
  --font-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Onest', 'Segoe UI', system-ui, -apple-system, sans-serif;

  /* Shape & depth */
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius: 12px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(23, 28, 43, 0.05);
  --shadow-md: 0 1px 2px rgba(23, 28, 43, 0.04), 0 10px 28px -12px rgba(49, 85, 217, 0.18);
  --shadow-lg: 0 2px 6px rgba(23, 28, 43, 0.05), 0 28px 60px -24px rgba(49, 85, 217, 0.35);
  --ring: 0 0 0 4px rgba(102, 133, 255, 0.25);

  --header-height: 72px;
  --notch-bg: var(--bg);
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body > main { flex: 1 0 auto; }

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

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3, h4 {
  margin: 0;
  text-wrap: balance;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
}

p { margin: 0; }

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

:focus-visible {
  outline: 3px solid var(--primary-bright);
  outline-offset: 2px;
  border-radius: 6px;
}

[hidden] { display: none !important; }

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }

.icon { width: 1.15em; height: 1.15em; flex-shrink: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--white);
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

.muted { color: var(--ink-3); }
.nowrap { white-space: nowrap; }
.strong { font-weight: 600; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.65rem 1.15rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn .icon { width: 1.1em; height: 1.1em; }

.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); }

.btn-secondary { background: var(--white); border-color: var(--line-strong); color: var(--ink); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--ice); color: var(--primary); }

.btn-danger { background: var(--white); border-color: #F0C2CA; color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); }

.btn-google { background: var(--white); border-color: var(--line-strong); color: var(--ink); }
.btn-google:hover { border-color: var(--primary); background: #FBFCFF; }
.btn-google .icon { color: var(--primary); }
.btn-google[aria-disabled='true'] { color: var(--ink-3); background: var(--bg); }

.btn-lg { min-height: 52px; padding: 0.85rem 1.45rem; font-size: 1rem; border-radius: 13px; }
.btn-sm { min-height: 36px; padding: 0.45rem 0.8rem; font-size: 0.875rem; border-radius: var(--radius-sm); }
.btn-block { width: 100%; }
.btn-icon { width: 44px; padding: 0; }

.btn[disabled],
.btn.is-loading { cursor: not-allowed; opacity: 0.7; }
.btn[disabled]:active { transform: none; }

.spinner {
  display: none;
  width: 18px; height: 18px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn.is-loading .spinner { display: inline-block; }

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

.link-button {
  padding: 0; border: 0; background: none;
  font-weight: 600; color: inherit;
  text-decoration: underline; text-underline-offset: 3px;
  cursor: pointer;
}

/* ---------- Forms ---------- */

.field { display: grid; align-content: start; gap: 0.4rem; margin-bottom: 1.1rem; min-width: 0; }
.field > label,
.label { font-size: 0.9rem; font-weight: 600; color: var(--ink); }

.input,
.select {
  width: 100%;
  min-height: 48px;
  padding: 0.72rem 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  font-size: 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input::placeholder { color: #9198AC; }
.input:hover,
.select:hover { border-color: #B3C0E4; }
.input:focus,
.select:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }

.select {
  appearance: none;
  padding-right: 2.6rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23697189' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9.5 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 18px;
  cursor: pointer;
}

.field.has-error .input { border-color: var(--danger); }
.field.has-error .input:focus { box-shadow: 0 0 0 4px rgba(194, 54, 75, 0.16); }

.field-error {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 0.86rem;
  color: var(--danger);
}
.field-error .icon { margin-top: 0.15em; width: 1em; height: 1em; }
.field-hint { font-size: 0.85rem; color: var(--ink-3); }

.input-wrap { position: relative; }
.input-wrap .input { padding-right: 3.2rem; }

.toggle-password {
  position: absolute;
  top: 50%; right: 4px;
  transform: translateY(-50%);
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border: 0; border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
}
.toggle-password:hover { color: var(--primary); background: var(--ice); }
.toggle-password .icon { width: 20px; height: 20px; }
.toggle-password .icon-hide,
.toggle-password[aria-pressed='true'] .icon-show { display: none; }
.toggle-password[aria-pressed='true'] .icon-hide { display: block; }

.checkbox { display: inline-flex; align-items: center; gap: 0.55rem; font-size: 0.92rem; cursor: pointer; }
.checkbox input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); cursor: pointer; }

.strength { display: grid; gap: 0.3rem; }
.strength-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.strength-bars span { height: 4px; border-radius: 4px; background: var(--line); transition: background-color 0.2s ease; }
.strength-label { font-size: 0.8rem; color: var(--ink-3); }
.strength[data-level='1'] .strength-bars span:nth-child(-n + 1) { background: var(--danger); }
.strength[data-level='2'] .strength-bars span:nth-child(-n + 2) { background: var(--accent); }
.strength[data-level='3'] .strength-bars span:nth-child(-n + 3) { background: var(--primary-bright); }
.strength[data-level='4'] .strength-bars span { background: var(--success); }

.search-input-wrap { position: relative; flex: 1; min-width: 0; }
.search-input-wrap > .icon {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 19px; height: 19px;
  color: var(--ink-3);
  pointer-events: none;
}
.search-input-wrap .input { padding-left: 2.75rem; }

/* ---------- Alerts & badges ---------- */

.flash-stack { display: grid; gap: 0.6rem; }
.flash-top { padding-top: 1.25rem; }
.flash-inline { margin-bottom: 1.5rem; }
.flash-auth { margin-bottom: 1.25rem; }

.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.85rem 0.9rem 0.85rem 1rem;
  border: 1px solid;
  border-radius: var(--radius);
  font-size: 0.95rem;
  line-height: 1.5;
}
.alert > .icon { margin-top: 0.12em; }
.alert p { flex: 1; }
.alert-success { background: var(--success-soft); border-color: #BCE3D1; color: #0F5139; }
.alert-error { background: var(--danger-soft); border-color: #F2C4CC; color: #87192B; }
.alert-info { background: var(--ice); border-color: var(--ice-strong); color: #1F3487; }
.alert-warning { background: var(--accent-soft); border-color: #FFD89E; color: var(--accent-ink); }

.alert-dismiss {
  display: grid; place-items: center;
  width: 28px; height: 28px;
  margin: -0.15rem -0.2rem 0 0;
  border: 0; border-radius: 7px;
  background: transparent; color: inherit;
  opacity: 0.65; cursor: pointer;
}
.alert-dismiss:hover { opacity: 1; background: rgba(23, 28, 43, 0.06); }
.alert-dismiss .icon { width: 16px; height: 16px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}
.badge .icon { width: 13px; height: 13px; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-primary { background: var(--ice); color: var(--primary); }
.badge-accent { background: var(--accent-soft); color: var(--accent-ink); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-neutral { background: #EEF1F7; color: var(--ink-2); }

.avatar {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--ice);
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.avatar-sm { width: 26px; height: 26px; font-size: 0.7rem; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.nav { display: flex; align-items: center; gap: 2rem; height: var(--header-height); }

.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; }
.brand-inverse { color: var(--white); }

.nav-menu { display: flex; align-items: center; flex: 1; gap: 1.5rem; }

.nav-links { display: flex; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }

.nav-link {
  display: inline-flex; align-items: center;
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  color: var(--ink-2);
  font-weight: 500;
}
.nav-link:hover { background: var(--bg); color: var(--ink); text-decoration: none; }
.nav-link[aria-current='page'] { background: var(--ice); color: var(--primary); }

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

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px; height: 44px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle .icon { width: 22px; height: 22px; }
.nav-toggle .icon-close,
.site-header.is-open .nav-toggle .icon-open { display: none; }
.site-header.is-open .nav-toggle .icon-close { display: block; }

.balance-pill {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.user-menu { position: relative; }
.user-chip {
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.25rem 0.6rem 0.25rem 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.user-chip::-webkit-details-marker { display: none; }
.user-chip:hover { border-color: var(--line-strong); }
.user-chip-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; font-weight: 600; font-size: 0.92rem; white-space: nowrap; }
.user-chip-caret { width: 16px; height: 16px; color: var(--ink-3); transition: transform 0.15s ease; }
.user-menu[open] .user-chip-caret { transform: rotate(180deg); }

.menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px);
  z-index: 60;
  min-width: 240px;
  padding: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow-lg);
}
.menu-head { display: grid; padding: 0.6rem 0.7rem 0.7rem; margin-bottom: 0.3rem; border-bottom: 1px solid var(--line); }
.menu-head strong { font-size: 0.95rem; }
.menu-head span { font-size: 0.82rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; }
.menu-item {
  display: flex; align-items: center; gap: 0.65rem;
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 0; border-radius: 10px;
  background: none;
  color: var(--ink);
  font-size: 0.93rem;
  text-align: left;
  cursor: pointer;
}
.menu-item:hover { background: var(--bg); text-decoration: none; }
.menu-item .icon { color: var(--ink-3); }

.notice-bar { background: var(--accent-soft); border-bottom: 1px solid #FFDDA8; color: var(--accent-ink); font-size: 0.92rem; }
.notice-bar-inner { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; padding-block: 0.6rem; }
.notice-bar-inner form { margin-left: auto; }

/* ---------- Hero ---------- */

.hero { padding: clamp(3rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem); overflow: hidden; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}

.hero-welcome {
  display: inline-flex; align-items: center; gap: 0.55rem;
  margin-bottom: 1.25rem;
  padding: 0.3rem 0.85rem 0.3rem 0.3rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font-size: 0.92rem;
  color: var(--ink-2);
}

.hero-title {
  max-width: 13ch;
  font-size: clamp(2.6rem, 5.6vw, 4.4rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.04em;
  font-variation-settings: 'opsz' 96;
}

.hero-lead { max-width: 50ch; margin-top: 1.4rem; font-size: 1.15rem; line-height: 1.65; color: var(--ink-2); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.1rem; }

.hero-points {
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem;
  margin: 2.4rem 0 0; padding: 0;
  list-style: none;
  font-size: 0.92rem;
  color: var(--ink-2);
}
.hero-points li { display: inline-flex; align-items: center; gap: 0.5rem; }
.hero-points .icon { color: var(--primary); }

/* ---------- Voucher motif ---------- */

.voucher-stack {
  position: relative;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 1.12;
  margin-left: auto;
}
.voucher-stack::before {
  content: '';
  position: absolute;
  inset: 10% 0 2% 12%;
  border-radius: 32px;
  background: var(--ice);
}

.voucher-shell { position: absolute; width: 84%; }

.voucher {
  --notch: 15px;
  --stub: 27%;
  position: relative;
  display: grid;
  grid-template-columns: 1fr var(--stub);
  width: 100%;
  aspect-ratio: 1.72;
  border-radius: var(--radius-xl);
  /* Ticket notches where the stub is torn off */
  -webkit-mask:
    radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 0, transparent 98%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
  mask:
    radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 0, transparent 98%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
}

.voucher-main { display: flex; flex-direction: column; padding: 1.4rem 1.5rem; min-width: 0; }
.voucher-top { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; }
.voucher-brand { font-family: var(--font-display); font-weight: 800; font-size: 0.95rem; letter-spacing: 0.02em; white-space: nowrap; }
.voucher-kind { padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.72rem; font-weight: 600; white-space: nowrap; }

.voucher-code {
  margin-top: auto;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.4vw, 1.75rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.voucher-code span { opacity: 0.55; }

.voucher-foot { display: flex; align-items: center; gap: 0.45rem; margin-top: 0.5rem; font-size: 0.8rem; opacity: 0.85; }
.voucher-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

.voucher-lines { display: grid; gap: 0.55rem; margin-top: auto; }
.voucher-lines span { height: 10px; border-radius: 6px; background: var(--ice); }
.voucher-lines span:first-child { width: 72%; }
.voucher-lines span:last-child { width: 44%; }

.voucher-stub {
  display: grid; place-items: center;
  border-left: 2px dashed;
}
.voucher-stub-mark {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
}

.voucher-front {
  left: 0; bottom: 8%;
  transform: rotate(-6deg);
  filter: drop-shadow(0 26px 26px rgba(23, 28, 43, 0.26));
  animation: voucher-in 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.voucher-front .voucher { background: var(--primary); color: var(--white); }
.voucher-front .voucher-kind { background: rgba(255, 255, 255, 0.16); }
.voucher-front .voucher-stub { border-left-color: rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.06); }

.voucher-back {
  right: 0; top: 4%;
  transform: rotate(7deg);
  filter: drop-shadow(0 0 1px rgba(23, 28, 43, 0.22)) drop-shadow(0 14px 18px rgba(49, 85, 217, 0.12));
  animation: voucher-back-in 0.9s 0.12s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.voucher-back .voucher { background: var(--white); color: var(--ink); }
.voucher-back .voucher-brand { color: var(--primary); }
.voucher-back .voucher-kind { background: var(--ice); color: var(--primary); }
.voucher-back .voucher-stub { border-left-color: var(--line-strong); background: var(--bg); }
.voucher-back .voucher-stub-mark { background: var(--ice-strong); color: var(--primary); }

@keyframes voucher-in {
  from { opacity: 0; transform: translateY(40px) rotate(-14deg); }
  to { opacity: 1; transform: translateY(0) rotate(-6deg); }
}
@keyframes voucher-back-in {
  from { opacity: 0; transform: translateY(-24px) rotate(14deg); }
  to { opacity: 1; transform: translateY(0) rotate(7deg); }
}

/* ---------- Sections ---------- */

.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section-featured { padding-top: 0; }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  margin-bottom: 1.75rem;
}
.section-title { font-size: clamp(1.65rem, 3vw, 2.25rem); font-weight: 800; letter-spacing: -0.03em; }
.section-sub { margin-top: 0.4rem; max-width: 60ch; color: var(--ink-2); }

.page-head { padding: clamp(2.25rem, 5vw, 3.5rem) 0 1.75rem; background: var(--white); border-bottom: 1px solid var(--line); }
.page-title { font-size: clamp(2.1rem, 4.4vw, 3.2rem); font-weight: 800; letter-spacing: -0.035em; }
.page-sub { margin-top: 0.5rem; max-width: 60ch; color: var(--ink-2); }

/* ---------- Product cards ---------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.product-card {
  position: relative;
  display: flex; flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.product-media { position: relative; aspect-ratio: 4 / 3; background: var(--ice); }
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-placeholder { display: grid; place-items: center; height: 100%; color: var(--primary); }
.product-placeholder .icon { width: 44px; height: 44px; opacity: 0.55; }

.product-category {
  position: absolute; top: 12px; left: 12px;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--white);
  font-size: 0.76rem; font-weight: 600;
  color: var(--ink-2);
  box-shadow: var(--shadow-sm);
}

.product-body { display: grid; align-content: start; gap: 0.35rem; flex: 1; padding: 1rem 1.1rem 0.95rem; }
.product-name { font-size: 1.08rem; font-weight: 700; letter-spacing: -0.01em; }
.product-desc {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.92rem;
  color: var(--ink-2);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Perforated price stub with notches, echoing the voucher */
.product-price-row {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.85rem 1.1rem 0.95rem;
  border-top: 2px dashed var(--line);
}
.product-price-row::before,
.product-price-row::after {
  content: '';
  position: absolute; top: -9px;
  width: 16px; height: 16px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--notch-bg);
}
.product-price-row::before { left: -9px; }
.product-price-row::after { right: -9px; }
.product-price { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* ---------- Empty states ---------- */

.empty-state {
  display: grid; justify-items: center; gap: 0.75rem;
  padding: clamp(2.5rem, 6vw, 4rem) 1.5rem;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius-xl);
  background: var(--white);
  text-align: center;
}
.empty-icon {
  display: grid; place-items: center;
  width: 64px; height: 64px;
  margin-bottom: 0.25rem;
  border-radius: 18px;
  background: var(--ice);
  color: var(--primary);
}
.empty-icon .icon { width: 30px; height: 30px; }
.empty-title { font-size: 1.35rem; font-weight: 700; }
.empty-text { max-width: 46ch; color: var(--ink-2); }
.empty-state .btn { margin-top: 0.5rem; }

/* ---------- Shop ---------- */

.shop-toolbar { display: grid; gap: 1.1rem; margin-top: 1.75rem; }
.search-form { display: flex; gap: 0.6rem; max-width: 640px; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  display: inline-flex; align-items: center;
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink-2);
  font-size: 0.9rem; font-weight: 500;
  white-space: nowrap;
}
.chip:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.chip[aria-current='true'] { border-color: var(--primary); background: var(--primary); color: var(--white); }

.results-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.93rem;
  color: var(--ink-2);
}

.pagination { display: flex; justify-content: center; gap: 0.4rem; margin-top: 2.5rem; }
.page-btn {
  display: inline-grid; place-items: center;
  min-width: 40px; height: 40px;
  padding: 0 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font-weight: 600;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.page-btn[aria-current='page'] { border-color: var(--primary); background: var(--primary); color: var(--white); }
.page-btn.is-disabled { opacity: 0.4; pointer-events: none; }
.page-btn .icon { width: 18px; height: 18px; }

/* ---------- Footer ---------- */

.site-footer { margin-top: auto; padding: 3.5rem 0 2rem; background: var(--ink); color: #B9C0D3; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; }
.footer-text { max-width: 36ch; margin-top: 0.9rem; font-size: 0.95rem; color: #A5ADC2; }
.footer-title { margin-bottom: 0.8rem; font-family: var(--font-body); font-size: 0.92rem; font-weight: 600; letter-spacing: 0; color: var(--white); }
.footer-links { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; font-size: 0.95rem; }
.footer-links a,
.footer-bottom a { color: #B9C0D3; }
.footer-links a:hover,
.footer-bottom a:hover { color: var(--white); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  margin-top: 2.75rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.875rem; color: #8F97AD;
}

/* ---------- Auth ---------- */

.page-auth { background: var(--white); }

.auth-page { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); min-height: 100vh; }

.auth-aside {
  position: relative;
  display: flex; flex-direction: column;
  padding: 2.25rem clamp(2rem, 4vw, 3.5rem);
  overflow: hidden;
  background: var(--primary);
  color: var(--white);
}
.auth-aside-body { position: relative; z-index: 2; display: grid; gap: 1.1rem; max-width: 30rem; margin-top: clamp(3rem, 9vh, 6rem); }
.auth-aside-title { font-size: clamp(2rem, 3.3vw, 2.85rem); font-weight: 800; line-height: 1.04; letter-spacing: -0.035em; color: var(--white); }
.auth-aside-text { font-size: 1.05rem; color: rgba(255, 255, 255, 0.82); }
.auth-aside-list { display: grid; gap: 0.75rem; margin: 0.5rem 0 0; padding: 0; list-style: none; font-size: 0.95rem; }
.auth-aside-list li { display: flex; align-items: center; gap: 0.7rem; }
.auth-aside-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: rgba(255, 255, 255, 0.14); }
.auth-aside-icon .icon { width: 17px; height: 17px; }
.auth-aside-foot { position: relative; z-index: 2; margin-top: auto; font-size: 0.85rem; color: rgba(255, 255, 255, 0.7); }

.voucher-stack--aside { position: absolute; right: -14%; bottom: 2%; width: 78%; max-width: 440px; }
.voucher-stack--aside::before { display: none; }
.voucher-stack--aside .voucher-front { filter: drop-shadow(0 28px 30px rgba(10, 20, 60, 0.4)); }
.voucher-stack--aside .voucher-front .voucher { background: var(--white); color: var(--ink); }
.voucher-stack--aside .voucher-front .voucher-brand { color: var(--primary); }
.voucher-stack--aside .voucher-front .voucher-kind { background: var(--ice); color: var(--primary); }
.voucher-stack--aside .voucher-front .voucher-stub { border-left-color: var(--line-strong); background: var(--bg); }
.voucher-stack--aside .voucher-back { filter: none; }
.voucher-stack--aside .voucher-back .voucher { background: var(--primary-bright); color: var(--white); }
.voucher-stack--aside .voucher-back .voucher-brand { color: var(--white); }
.voucher-stack--aside .voucher-back .voucher-kind { background: rgba(255, 255, 255, 0.2); color: var(--white); }
.voucher-stack--aside .voucher-back .voucher-lines span { background: rgba(255, 255, 255, 0.3); }
.voucher-stack--aside .voucher-back .voucher-stub { border-left-color: rgba(255, 255, 255, 0.45); background: transparent; }
.voucher-stack--aside .voucher-back .voucher-stub-mark { background: var(--accent); color: var(--ink); }

.auth-main { display: flex; flex-direction: column; padding: 1.5rem clamp(1.25rem, 4vw, 3rem); }
.auth-topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.back-link { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--ink-2); font-size: 0.92rem; font-weight: 500; }
.back-link:hover { color: var(--primary); text-decoration: none; }
.back-link .icon { width: 18px; height: 18px; }

.auth-card { width: 100%; max-width: 440px; margin: auto; padding-block: 2.25rem; }
.auth-heading { font-size: clamp(1.7rem, 3vw, 2rem); font-weight: 800; letter-spacing: -0.03em; }
.auth-sub { margin: 0.45rem 0 1.6rem; color: var(--ink-2); }
.auth-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 1.1rem; border-radius: 15px; background: var(--ice); color: var(--primary); }
.auth-icon .icon { width: 24px; height: 24px; }
.auth-google-note { margin-top: 0.5rem; text-align: center; }
.auth-form-spaced { margin-top: 0.25rem; }

.tabs {
  display: grid; grid-template-columns: 1fr 1fr;
  margin-bottom: 1.75rem; padding: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--bg);
}
.tab {
  display: grid; place-items: center;
  min-height: 42px;
  border-radius: 10px;
  color: var(--ink-2);
  font-weight: 600;
}
.tab:hover { color: var(--ink); text-decoration: none; }
.tab[aria-selected='true'] { background: var(--white); color: var(--ink); box-shadow: 0 1px 2px rgba(23, 28, 43, 0.08), 0 0 0 1px var(--line); }

.divider { display: flex; align-items: center; gap: 0.9rem; margin: 1.4rem 0; font-size: 0.85rem; color: var(--ink-3); }
.divider::before,
.divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.form-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; margin: -0.2rem 0 1.4rem; font-size: 0.92rem; }

.auth-switch { margin-top: 1.5rem; text-align: center; font-size: 0.95rem; color: var(--ink-2); }
.auth-switch a { font-weight: 600; }

/* ---------- Error page ---------- */

.error-page { display: grid; place-items: center; padding: clamp(3rem, 9vw, 6.5rem) 0; }
.error-card { display: grid; justify-items: center; gap: 1rem; max-width: 520px; margin-inline: auto; text-align: center; }
.error-ticket {
  position: relative;
  display: grid; place-items: center;
  padding: 0.6rem 2.2rem 0.4rem;
  border: 2px dashed var(--ice-strong);
  border-radius: var(--radius-xl);
  background: var(--white);
}
.error-code { font-family: var(--font-display); font-size: clamp(4rem, 12vw, 6.5rem); font-weight: 800; line-height: 1; letter-spacing: -0.05em; color: var(--primary); }
.error-heading { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; letter-spacing: -0.03em; }
.error-text { color: var(--ink-2); max-width: 46ch; }
.error-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin-top: 0.75rem; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-title { max-width: 16ch; }
  .voucher-stack { max-width: 460px; margin: 0 auto; }

  .auth-page { grid-template-columns: 1fr; }
  .auth-aside { padding: 1rem 16px; }
  .auth-aside-body,
  .auth-aside-foot,
  .voucher-stack--aside { display: none; }
}

@media (max-width: 820px) {
  .nav { gap: 1rem; }
  .nav-toggle { display: inline-grid; }
  .nav-menu {
    position: absolute; left: 0; right: 0; top: var(--header-height);
    display: none;
    flex-direction: column; align-items: stretch; gap: 1rem;
    padding: 1rem 16px 1.25rem;
    border-bottom: 1px solid var(--line);
    background: var(--white);
    box-shadow: var(--shadow-md);
  }
  .site-header.is-open .nav-menu { display: flex; }
  .nav-links { flex-direction: column; }
  .nav-link { padding: 0.75rem 0.85rem; }
  .nav-actions { flex-wrap: wrap; margin-left: 0; }
  .nav-actions > .btn { flex: 1; }
  .user-menu { width: 100%; }
  .user-chip { justify-content: flex-start; }
  .user-chip-caret { margin-left: auto; }
  .menu-panel { position: static; margin-top: 0.5rem; box-shadow: none; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .hero-actions .btn { flex: 1 1 100%; }
  .search-form { flex-direction: column; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .product-grid { grid-template-columns: 1fr; }
  .voucher-main { padding: 0.9rem 1rem; }
  .voucher-brand { font-size: 0.8rem; }
  .voucher-kind { display: none; }
  .voucher-stub-mark { width: 36px; height: 36px; font-size: 1rem; }
  .voucher { --notch: 11px; }
  .footer-bottom { flex-direction: column; }
}

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