:root {
  --navy: #14213d;
  --red: #b22234;
  --red-dark: #8f1b2a;
  --cream: #f5efe3;
  --paper: #fffdf8;
  --ink: #151515;
  --muted: #6b6558;
  --line: #e2d9c6;
  --radius: 10px;
  --display: 'Oswald', 'Arial Narrow', sans-serif;
  --body: 'Inter', system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--cream); line-height: 1.5; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

.announce { background: var(--navy); color: #fff; text-align: center; font-size: 13px; letter-spacing: .04em; padding: 8px 16px; }

.site-header { position: sticky; top: 0; z-index: 20; background: rgba(245, 239, 227, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { font-family: var(--display); font-weight: 700; font-size: 18px; background: var(--red); color: #fff; padding: 3px 8px; border-radius: 6px; letter-spacing: .02em; }
.brand-mark.small { font-size: 14px; }
.brand-name { font-family: var(--display); font-weight: 600; font-size: 20px; text-transform: uppercase; letter-spacing: .04em; color: var(--navy); }
.nav { margin-left: auto; display: flex; gap: 20px; }
.nav a { text-decoration: none; font-weight: 500; font-size: 15px; }
.nav a:hover { color: var(--red); }
.cart-btn { position: relative; background: none; border: 0; padding: 8px; color: var(--navy); }
.cart-count { position: absolute; top: 0; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; }

.hero { position: relative; background: #0b0b0b; }
.slides { position: relative; aspect-ratio: 2 / 1; max-height: 620px; margin-inline: auto; overflow: hidden; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; }
.slide.is-active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: contain; }
.dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff; background: transparent; padding: 0; opacity: .8; }
.dot.is-active { background: #fff; opacity: 1; }

.shop { padding: 48px 0 72px; }
.shop-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.shop-head h1 { font-family: var(--display); text-transform: uppercase; font-size: clamp(28px, 4vw, 40px); line-height: 1.05; margin: 0; color: var(--navy); letter-spacing: .01em; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--navy); background: transparent; color: var(--navy); border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 500; }
.chip.is-active { background: var(--navy); color: #fff; }

.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-align: left; padding: 0; display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(20, 33, 61, .12); }
.card:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.card-img { aspect-ratio: 1; background: #fff; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-size: 14px; font-weight: 500; line-height: 1.35; margin: 0; }
.card-price { font-weight: 600; color: var(--navy); margin-top: auto; }
.skeleton { min-height: 320px; background: linear-gradient(90deg, #eee6d6 25%, #f6f0e4 50%, #eee6d6 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.load-error { text-align: center; padding: 32px; color: var(--red); }

.btn { display: inline-flex; justify-content: center; align-items: center; width: 100%; border-radius: 8px; padding: 14px 20px; font-weight: 600; font-size: 15px; letter-spacing: .02em; border: 2px solid transparent; transition: background .15s ease; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-primary:disabled { background: #b9aea0; cursor: not-allowed; }
.btn-outline { border-color: var(--navy); background: transparent; color: var(--navy); width: auto; }
.icon-btn { background: none; border: 0; font-size: 28px; line-height: 1; padding: 4px 10px; color: var(--navy); }

/* Product dialog */
.product-dialog { width: min(980px, 100% - 24px); max-height: calc(100dvh - 24px); border: 0; border-radius: 14px; padding: 0; background: var(--paper); color: var(--ink); }
.product-dialog::backdrop { background: rgba(10, 14, 28, .6); }
.product-dialog .close { position: absolute; top: 8px; right: 8px; z-index: 2; }
.pd { display: grid; grid-template-columns: 1.1fr 1fr; }
.pd-media { background: #fff; padding: 20px; }
.pd-media > img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.pd-thumbs { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.pd-thumbs button { flex: 0 0 64px; height: 64px; padding: 0; border: 2px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.pd-thumbs button.is-active { border-color: var(--navy); }
.pd-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pd-info { padding: 32px 28px; display: flex; flex-direction: column; gap: 18px; overflow-y: auto; }
.pd-info h2 { font-family: var(--display); text-transform: uppercase; font-size: 26px; line-height: 1.15; margin: 0 32px 0 0; color: var(--navy); }
.pd-price { font-size: 22px; font-weight: 600; margin: -6px 0 0; }
.opt { display: flex; flex-direction: column; gap: 8px; }
.label { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.label b { color: var(--ink); text-transform: none; letter-spacing: 0; font-weight: 500; }
.values { display: flex; flex-wrap: wrap; gap: 8px; }
.val { min-width: 48px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 14px; }
.val.is-active { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); font-weight: 600; }
.val:disabled { opacity: .35; text-decoration: line-through; cursor: not-allowed; }
.val.swatch { min-width: 0; width: 34px; height: 34px; padding: 0; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.val.swatch.is-active { box-shadow: 0 0 0 2px var(--navy); }
.val.swatch:disabled { text-decoration: none; }
.qty-row { display: flex; align-items: center; justify-content: space-between; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.qty button { background: none; border: 0; width: 38px; height: 38px; font-size: 18px; }
.qty span { min-width: 28px; text-align: center; font-weight: 600; }
.pd-unavailable { color: var(--red); margin: -8px 0 0; font-size: 14px; }
.pd-desc summary { cursor: pointer; font-weight: 600; }
.pd-desc div { white-space: pre-line; font-size: 14px; color: var(--muted); margin-top: 8px; }

/* Cart drawer */
.scrim { position: fixed; inset: 0; background: rgba(10, 14, 28, .5); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--paper); z-index: 50; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .3s ease; box-shadow: -12px 0 32px rgba(0, 0, 0, .15); }
.drawer.is-open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-family: var(--display); text-transform: uppercase; font-size: 22px; margin: 0; color: var(--navy); }
.drawer-note { margin: 12px 20px 0; padding: 10px 12px; border-radius: 8px; background: #fff3d6; font-size: 14px; }
.lines { list-style: none; margin: 0; padding: 8px 20px; overflow-y: auto; flex: 1; }
.line { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.line img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.line-title { font-size: 14px; font-weight: 500; margin: 0; line-height: 1.3; }
.line-variant { font-size: 13px; color: var(--muted); margin: 2px 0 8px; }
.line .qty button { width: 30px; height: 30px; font-size: 15px; }
.line-right { display: flex; flex-direction: column; align-items: end; justify-content: space-between; }
.line-price { font-weight: 600; }
.remove { background: none; border: 0; font-size: 13px; color: var(--muted); text-decoration: underline; padding: 0; }
.line.is-unavailable { opacity: .6; }
.line.is-unavailable .line-variant { color: var(--red); }
.drawer-empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.drawer-foot { border-top: 1px solid var(--line); padding: 18px 20px 22px; }
.subtotal { display: flex; justify-content: space-between; font-size: 17px; }
.small-print { font-size: 13px; margin: 6px 0 14px; }
.checkout-error { color: var(--red); font-size: 14px; margin: 0 0 12px; }

.site-footer { background: var(--navy); color: #d8dbe4; font-size: 14px; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; padding: 28px 0; }
.site-footer .muted { color: #9aa1b5; margin-left: auto; }
.site-footer a { color: #fff; }

/* Success page */
.success { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 48px 16px; }
.success-card { max-width: 520px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 40px 28px; }
.success-card h1 { font-family: var(--display); text-transform: uppercase; color: var(--navy); margin: 0 0 12px; font-size: 34px; }
.success-card .btn { margin-top: 20px; width: auto; }

@media (max-width: 1000px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .brand-name { font-size: 16px; }
  .nav { display: none; }
  .cart-btn { margin-left: auto; }
  .pd { grid-template-columns: 1fr; }
  .pd-media { padding: 12px; }
  .pd-info { padding: 20px 18px 24px; }
  .shop { padding-top: 32px; }
  .site-footer .muted { margin-left: 0; }
}
@media (max-width: 340px) { .brand-name { display: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
