/* Tropical Distillery team merch store — styled to match tropicaldistillery.com.
   Brand tokens are taken from the Shopify theme there: cream page, deep navy
   type, Miami pink and sky blue, Josefin Sans headings in capitals, Inter for
   everything else, pill buttons and soft rounded cards.

   The brand pink #E84890 is too light to carry white or small pink text at
   WCAG AA, so it is used for decoration (logo, gradients, rules, focus) while
   buttons use --action (#CF3579, 4.7:1 with white) and pink text uses
   --pink-text (#C92F74, the theme's own accent-dark, 4.9:1 on cream). */

:root {
  color-scheme: light;

  /* Brand (from tropicaldistillery.com) */
  --cream: #fffaf5;
  --navy: #14203a;
  --deep: #0f2340;
  --muted: #556078;
  --pink: #e84890;
  --pink-text: #c92f74;
  --sky: #50b0e0;
  --sky-light: #7fcbee;
  --sky-surface: #e8f5fb;
  --blush: #fdedf4;
  --line: rgba(20, 32, 58, 0.14);
  --line-strong: rgba(20, 32, 58, 0.25);
  --gradient-miami: linear-gradient(90deg, #e84890 0%, #50b0e0 100%);
  --gradient-sunset: linear-gradient(120deg, #e84890 0%, #f7926a 55%, #ffc46b 100%);

  /* Roles */
  --page: var(--cream);
  --surface: #ffffff;
  --surface-alt: #faf4ee;
  --ink: var(--navy);
  --ink-2: var(--muted);
  --ink-3: var(--muted);
  --action: #cf3579;
  --action-hover: #b32866;

  --error: #b03a3a;
  --error-bg: #f8e4e3;
  --warn: #8a4a0b;
  --warn-bg: #fcebd6;
  --ok: #2e6b1f;
  --ok-bg: #e8f3dc;

  --radius-card: 18px;
  --radius-control: 12px;
  --shadow-1: 0 1px 2px rgba(20, 32, 58, 0.05);
  --shadow-lift: 0 16px 40px rgba(30, 20, 10, 0.1);
  --shadow-2: 0 24px 60px rgba(15, 35, 64, 0.22);
  --focus-ring: 0 0 0 3px #fff, 0 0 0 5px var(--pink);

  --font-heading: "Josefin Sans", "Avenir Next", "Century Gothic", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--pink-text);
  text-underline-offset: 3px;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(30px, 4.4vw, 46px);
  text-transform: uppercase;
}

h2 {
  font-size: 19px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

h3 {
  font-size: 16px;
}

p {
  margin: 0;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 8px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  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: 12px;
  top: -60px;
  z-index: 100;
  background: var(--surface);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

.muted {
  color: var(--ink-2);
}

.fine {
  font-size: 13px;
  color: var(--ink-3);
}

/* Small spaced capitals in pink, with the theme's three-line "Miami" rule. */
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pink-text);
}

.eyebrow::before {
  content: "";
  display: block;
  width: 72px;
  height: 7px;
  margin-bottom: 12px;
  background: linear-gradient(var(--pink) 0 2px, transparent 2px 3px, #a07cc0 3px 4.5px, transparent 4.5px 5px, var(--sky) 5px 7px);
}

.lede {
  color: var(--ink-2);
  font-size: 16.5px;
  max-width: 62ch;
}

.stack > * + * {
  margin-top: 12px;
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--cream) 94%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header::before {
  content: "";
  display: block;
  height: 5px;
  background: var(--gradient-miami);
}

.site-header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}

.brand-mark {
  height: 36px;
  width: auto;
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  padding-top: 0.2em;
}

.brand-sub {
  display: block;
  margin-top: 5px;
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--pink-text);
}

.site-nav {
  display: flex;
  gap: 4px;
  margin-left: 8px;
}

.site-nav a {
  white-space: nowrap;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  padding: 8px 12px;
  border-radius: 999px;
}

.site-nav a:hover {
  color: var(--pink-text);
}

.site-nav a[aria-current="page"] {
  color: var(--pink-text);
  background: var(--blush);
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.cart-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 8px 0 16px;
  border: 2px solid var(--action);
  border-radius: 999px;
  background: var(--action);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.cart-button:hover {
  background: var(--action-hover);
  border-color: var(--action-hover);
}

.cart-button svg {
  width: 18px;
  height: 18px;
}

.cart-count {
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border-radius: 999px;
  background: #fff;
  color: var(--action);
  font-size: 12.5px;
  letter-spacing: 0;
  display: inline-grid;
  place-items: center;
}

.cart-count.bump {
  animation: bump 0.35s ease;
}

@keyframes bump {
  40% {
    transform: scale(1.3);
  }
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--ink-2);
}

.user-chip strong {
  color: var(--ink);
  font-weight: 600;
}

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

.site-header .link-button:hover {
  color: var(--pink-text);
}

.admin-badge {
  background: var(--navy);
  color: var(--cream);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 11px;
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  background: var(--deep);
  color: rgba(255, 250, 245, 0.8);
  border-top: 6px solid;
  border-image: var(--gradient-miami) 1;
  font-size: 14px;
}

.site-footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 36px 24px 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
}

.site-footer .brand {
  color: #fff;
}

.site-footer .tagline {
  margin-top: 8px;
  color: var(--sky-light);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.site-footer a {
  color: rgba(255, 250, 245, 0.85);
}

.site-footer a:hover {
  color: var(--sky-light);
}

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

.page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 24px 88px;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.page-head > div > * + * {
  margin-top: 10px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-1);
}

.card-pad {
  padding: 26px;
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border: 2px solid var(--action);
  border-radius: 999px;
  background: var(--action);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s;
}

.btn:hover {
  background: var(--action-hover);
  border-color: var(--action-hover);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled,
.btn.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn.is-disabled {
  pointer-events: none;
}

.btn-secondary {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}

.btn-secondary:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--cream);
}

.btn-danger {
  background: transparent;
  color: var(--error);
  border-color: var(--error);
}

.btn-danger:hover {
  background: var(--error);
  border-color: var(--error);
  color: #fff;
}

.btn-danger.solid {
  background: var(--error);
  color: #fff;
}

.btn-danger.solid:hover {
  background: #922f2f;
  border-color: #922f2f;
}

.btn-sm {
  min-height: 36px;
  padding: 0 15px;
  font-size: 11.5px;
}

.btn-block {
  width: 100%;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-2);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--blush);
  color: var(--ink);
}

/* ----------------------------------------------------------------- forms */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field > label,
.field > .label,
fieldset > legend {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

.field .optional {
  font-weight: 400;
  color: var(--ink-3);
}

.hint {
  font-size: 12.5px;
  color: var(--ink-3);
}

.field-error {
  font-size: 12.5px;
  color: var(--error);
  font-weight: 600;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="date"],
input[type="number"],
input[type="url"],
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 15.5px;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

select {
  appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%2314203A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(20, 32, 58, 0.45);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(232, 72, 144, 0.22);
  border-radius: var(--radius-control);
}

[aria-invalid="true"] {
  border-color: var(--error) !important;
}

input::placeholder,
textarea::placeholder {
  color: #7d8597;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.span-6 {
  grid-column: span 6;
}
.span-4 {
  grid-column: span 4;
}
.span-3 {
  grid-column: span 3;
}
.span-2 {
  grid-column: span 2;
}
.span-1 {
  grid-column: span 1;
}

.check {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.5px;
  cursor: pointer;
}

.check input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--action);
  flex-shrink: 0;
}

.form-alert {
  border-radius: var(--radius-control);
  padding: 12px 16px;
  background: var(--error-bg);
  color: var(--error);
  font-weight: 600;
  font-size: 14px;
  white-space: pre-line;
}

.form-alert.ok {
  background: var(--ok-bg);
  color: var(--ok);
}

/* Large radio cards: ship-to choice, shipping speed */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.choice {
  position: relative;
  display: flex;
  gap: 14px;
  padding: 18px;
  border: 1.5px solid var(--line-strong);
  border-radius: 16px;
  background: var(--surface);
  cursor: pointer;
}

.choice:hover {
  border-color: rgba(20, 32, 58, 0.45);
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice:has(input:checked) {
  border-color: var(--pink);
  background: var(--blush);
  box-shadow: inset 0 0 0 1px var(--pink);
}

.choice:has(input:focus-visible) {
  box-shadow: var(--focus-ring);
}

.choice-icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--blush);
  color: var(--pink-text);
}

.choice:has(input:checked) .choice-icon {
  background: #fff;
}

.choice-icon svg {
  width: 23px;
  height: 23px;
}

.choice-title {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding-top: 0.15em;
}

.choice-text {
  display: block;
  font-size: 13.5px;
  color: var(--ink-2);
  margin-top: 3px;
}

.choice-tick {
  margin-left: auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  background: #fff;
  flex-shrink: 0;
}

.choice:has(input:checked) .choice-tick {
  border: 7px solid var(--action);
}

.choice.compact {
  padding: 14px 16px;
}

/* ------------------------------------------------------------------ chips */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.chip:hover {
  border-color: var(--navy);
}

.chip[aria-pressed="true"] {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--cream);
}

.chip .chip-count {
  font-size: 12px;
  opacity: 0.75;
}

/* --------------------------------------------------------------- badges */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status-submitted {
  color: #1f5f86;
  background: var(--sky-surface);
}
.status-approved {
  color: var(--navy);
  background: #e6e9f2;
}
.status-shipped {
  color: #a8296a;
  background: var(--blush);
}
.status-delivered {
  color: var(--ok);
  background: var(--ok-bg);
}
.status-cancelled {
  color: #5c6461;
  background: #edeeec;
}
.status-declined {
  color: var(--error);
  background: var(--error-bg);
}

.tag {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--surface-alt);
  color: var(--ink-2);
}

.tag.rush {
  background: var(--error-bg);
  color: var(--error);
}

.tag.account {
  background: var(--sky-surface);
  color: #1f5f86;
}

.tag.self {
  background: var(--blush);
  color: #a8296a;
}

/* ---------------------------------------------------------------- artwork */

.art {
  --art-bg: var(--sky-surface);
  --art-main: #23406a;
  --art-deep: var(--pink);
  --art-soft: #bfe3f5;
  --art-ink: var(--deep);
  --art-paper: var(--cream);
  background: var(--art-bg);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.art svg {
  width: 100%;
  height: 100%;
  transition: transform 0.35s ease;
}

.art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* House Tropical Distillery merch: navy with Miami pink. */
.tone-palm {
  --art-bg: #e8f5fb;
  --art-main: #23406a;
  --art-deep: #e84890;
  --art-soft: #bfe3f5;
  --art-ink: #0f2340;
  --art-paper: #fffaf5;
}
.tone-sky {
  --art-bg: #e8f5fb;
  --art-main: #50b0e0;
  --art-deep: #1f7fb0;
  --art-soft: #bfe3f5;
  --art-ink: #0f2340;
  --art-paper: #ffffff;
}
.tone-mango {
  --art-bg: #fdefd9;
  --art-main: #f29e38;
  --art-deep: #c9661a;
  --art-soft: #fbd9a8;
  --art-ink: #5a2e0c;
  --art-paper: #fffdf8;
}
.tone-espresso {
  --art-bg: #f2e8e2;
  --art-main: #8a5a43;
  --art-deep: #4a2c21;
  --art-soft: #dcc5b8;
  --art-ink: #2a1812;
  --art-paper: #fff9f4;
}
.tone-lime {
  --art-bg: #eef6df;
  --art-main: #8dc63f;
  --art-deep: #5c8a1f;
  --art-soft: #d3e8b0;
  --art-ink: #2f4a0e;
  --art-paper: #fcfff6;
}
.tone-lychee {
  --art-bg: #fdedf4;
  --art-main: #f27aae;
  --art-deep: #c92f74;
  --art-soft: #f9c6dd;
  --art-ink: #5a1634;
  --art-paper: #fffaf5;
}
.tone-citrus {
  --art-bg: #fff4d6;
  --art-main: #f7c33b;
  --art-deep: #e08a1e;
  --art-soft: #fbe3a0;
  --art-ink: #5a3a06;
  --art-paper: #fffdf6;
}
.tone-oak {
  --art-bg: #f5ebdd;
  --art-main: #b5803f;
  --art-deep: #7a4f1e;
  --art-soft: #e6cfa9;
  --art-ink: #3d2810;
  --art-paper: #fffbf3;
}

.art .m { fill: var(--art-main); }
.art .d { fill: var(--art-deep); }
.art .s { fill: var(--art-soft); }
.art .i { fill: var(--art-ink); }
.art .p { fill: var(--art-paper); }
.art .shadow { fill: var(--art-ink); opacity: 0.1; }
.art .glow { fill: none; stroke: var(--art-main); stroke-width: 10; stroke-linecap: round; stroke-linejoin: round; opacity: 0.3; }
.art .o,
.art .ot,
.art .od,
.art .op,
.art .om {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.art .o { stroke: var(--art-ink); stroke-width: 2.5; }
.art .ot { stroke: var(--art-ink); stroke-width: 1.6; }
.art .od { stroke: var(--art-deep); stroke-width: 3; }
.art .op { stroke: var(--art-paper); stroke-width: 3; }
.art .om { stroke: var(--art-main); stroke-width: 4; }

.thumb {
  width: 56px;
  height: 42px;
  border-radius: 10px;
  flex-shrink: 0;
}

/* ----------------------------------------------------------------- shop */

.shop-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  margin-bottom: 36px;
}

.shop-hero > div:first-child > * + * {
  margin-top: 12px;
}

.ways {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.way {
  position: relative;
  display: block;
  width: 100%;
  border: 2px solid transparent;
  border-radius: var(--radius-card);
  padding: 20px;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.way:first-child {
  background: var(--blush);
}

.way:last-child {
  background: var(--sky-surface);
}

.way:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.way:focus-visible {
  box-shadow: var(--focus-ring);
}

.way[aria-pressed="true"] {
  border-color: var(--action);
}

/* a tick in the corner of the chosen card */
.way[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--action)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E")
    center / 15px no-repeat;
}

.way .choice-icon {
  margin-bottom: 12px;
  background: #fff;
}

.way-text {
  display: block;
  font-size: 13.5px;
  color: var(--ink-2);
  margin-top: 4px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.toolbar .search {
  flex: 1 1 280px;
  position: relative;
}

.toolbar .search svg {
  position: absolute;
  left: 15px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: var(--ink-3);
  pointer-events: none;
}

.toolbar .search input {
  padding-left: 42px;
  border-radius: 999px;
}

.toolbar select {
  width: auto;
  min-width: 180px;
  border-radius: 999px;
}

.result-count {
  font-size: 13.5px;
  color: var(--ink-3);
  margin: 16px 0;
}

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

.product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.25s;
}

.product-card:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-3px);
}

.product-card:hover .art svg {
  transform: scale(1.04);
}

.product-card .art {
  aspect-ratio: 4 / 3;
}

/* Photo gallery on a product card. */
.product-media {
  position: relative;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  width: 34px;
  height: 34px;
  margin-top: -17px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(20, 32, 58, 0.18);
  color: var(--navy);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}

.gallery-arrow::before {
  content: "";
  display: block;
  width: 9px;
  height: 9px;
  margin: 0 auto;
  border: solid currentColor;
  border-width: 0 2.5px 2.5px 0;
  transform: translateX(-2px) rotate(-45deg);
}

.gallery-arrow.prev {
  left: 10px;
}

.gallery-arrow.prev::before {
  transform: translateX(2px) rotate(135deg);
}

.gallery-arrow.next {
  right: 10px;
}

.product-media:hover .gallery-arrow,
.gallery-arrow:focus-visible {
  opacity: 1;
}

@media (hover: none) {
  .gallery-arrow {
    opacity: 1;
  }
}

.gallery-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  display: flex;
  justify-content: center;
  gap: 2px;
}

.gallery-dot {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.gallery-dot::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  margin: auto;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 0 0 1px rgba(20, 32, 58, 0.3);
}

.gallery-dot[aria-current="true"]::before {
  background: var(--pink);
  box-shadow: 0 0 0 1px #fff;
}

/* Colour swatches. */
.swatches {
  border: 0;
  margin: 8px 0 0;
  padding: 0;
  min-width: 0;
}

.swatches legend {
  padding: 0;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}

.swatch-name {
  font-weight: 700;
  color: var(--ink);
}

.swatches[aria-invalid="true"] legend,
.swatches[aria-invalid="true"] .swatch-name {
  color: var(--error);
}

.swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  margin-left: -2px;
}

.swatch {
  position: relative;
  display: inline-grid;
  padding: 2px;
  cursor: pointer;
}

.swatch input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.swatch-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgba(20, 32, 58, 0.18);
  transition: box-shadow 0.15s;
}

.swatch.light .swatch-dot {
  box-shadow: inset 0 0 0 1px rgba(20, 32, 58, 0.35);
}

.swatch input:checked + .swatch-dot {
  box-shadow: inset 0 0 0 1px rgba(20, 32, 58, 0.25), 0 0 0 2px #fff, 0 0 0 4px var(--navy);
}

.swatch input:focus-visible + .swatch-dot {
  box-shadow: var(--focus-ring);
}

.product-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.product-brand {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pink-text);
}

.product-name {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
  line-height: 1.2;
}

.product-unit {
  font-size: 13px;
  color: var(--ink-3);
}

.product-desc {
  font-size: 14px;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
}

.price {
  font-weight: 700;
  font-size: 16.5px;
}

.price small {
  font-weight: 500;
  font-size: 12px;
  color: var(--ink-3);
}

.stock {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--ok-bg);
  color: var(--ok);
}

.stock.low {
  background: var(--warn-bg);
  color: var(--warn);
}

.stock.out {
  background: #edeeec;
  color: #5c6461;
}

.stock.made {
  background: var(--sky-surface);
  color: #1f5f86;
}

.product-actions {
  display: flex;
  gap: 8px;
  align-items: stretch;
  flex-wrap: wrap;
  margin-top: 8px;
}

.product-actions select {
  flex: 1 1 100%;
  min-height: 42px;
  font-size: 14.5px;
}

.product-actions .btn {
  flex: 1;
  min-height: 42px;
}

.product-limit {
  font-size: 12px;
  color: var(--ink-3);
}

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  overflow: hidden;
  flex-shrink: 0;
}

.qty button {
  width: 36px;
  height: 40px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 18px;
  color: var(--ink);
  cursor: pointer;
}

.qty button:hover:not(:disabled) {
  background: var(--blush);
}

.qty button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.qty input {
  width: 38px;
  min-height: 40px;
  border: 0;
  border-radius: 0;
  text-align: center;
  padding: 0;
  font-weight: 700;
  -moz-appearance: textfield;
}

.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qty input:focus-visible {
  box-shadow: inset 0 0 0 2px var(--pink);
  border-radius: 0;
}

.empty {
  text-align: center;
  padding: 52px 24px;
  color: var(--ink-2);
}

.empty h2 {
  font-size: 24px;
  color: var(--ink);
  margin-bottom: 8px;
}

.empty .btn {
  margin-top: 18px;
}

.skeleton {
  background: linear-gradient(90deg, #f6efe7, #efe5da, #f6efe7);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-card);
  min-height: 380px;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

/* --------------------------------------------------------------- drawer */

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(15, 35, 64, 0.45);
  z-index: 40;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(460px, 100%);
  background: var(--cream);
  z-index: 50;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-2);
  animation: slide-in 0.2s ease;
}

.drawer::before {
  content: "";
  display: block;
  height: 5px;
  flex-shrink: 0;
  background: var(--gradient-miami);
}

.drawer.wide {
  width: min(640px, 100%);
}

@keyframes slide-in {
  from {
    transform: translateX(24px);
    opacity: 0;
  }
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.drawer-head h2 {
  font-size: 21px;
  padding-top: 0.15em;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px;
  background: var(--surface);
}

.drawer-foot {
  border-top: 1px solid var(--line);
  padding: 16px 22px;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-line {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.cart-line:first-child {
  padding-top: 0;
}

.cart-line-main {
  flex: 1;
  min-width: 0;
}

.cart-line-name {
  font-weight: 600;
  font-size: 14.5px;
}

.cart-line-sub {
  font-size: 12.5px;
  color: var(--ink-3);
}

.cart-line-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.cart-line .warn {
  font-size: 12.5px;
  color: var(--warn);
  margin-top: 4px;
}

.totals {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 14px;
}

.totals strong {
  font-family: var(--font-heading);
  font-size: 21px;
}

/* ------------------------------------------------------------- checkout */

.checkout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  align-items: start;
}

.checkout-main > * + * {
  margin-top: 18px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.section-title h2 {
  padding-top: 0.15em;
}

.section-title .fine {
  margin-left: auto;
}

.step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  display: grid;
  place-items: center;
  padding-top: 0.15em;
  flex-shrink: 0;
}

.summary {
  position: sticky;
  top: 100px;
}

.summary .totals {
  margin: 14px 0 16px;
}

.summary-lines {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 340px;
  overflow-y: auto;
}

.summary-lines li {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}

.summary-lines .line-info {
  flex: 1;
  min-width: 0;
}

.saved-account {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.saved-account .field {
  flex: 1;
}

/* --------------------------------------------------------------- orders */

.order-list > * + * {
  margin-top: 18px;
}

.order-card {
  padding: 24px 26px;
}

.order-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.order-head h2 {
  font-size: 24px;
}

.tracker {
  list-style: none;
  margin: 22px 0 6px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.tracker li {
  position: relative;
  padding-top: 24px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: center;
}

.tracker li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 2px solid var(--line-strong);
  z-index: 1;
}

.tracker li::after {
  content: "";
  position: absolute;
  top: 7px;
  left: -50%;
  width: 100%;
  height: 3px;
  background: rgba(20, 32, 58, 0.12);
}

.tracker li:first-child::after {
  display: none;
}

.tracker li.done {
  color: var(--pink-text);
}

.tracker li.done::before {
  background: var(--pink);
  border-color: var(--pink);
}

.tracker li.done::after {
  background: var(--gradient-miami);
}

.tracker li.current::before {
  box-shadow: 0 0 0 5px var(--blush);
}

.order-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.kv-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 5px;
}

.address {
  font-size: 14.5px;
  line-height: 1.55;
}

.order-items {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.order-items li {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 14px 5px 5px;
  font-size: 13.5px;
}

.order-items .thumb {
  width: 40px;
  height: 32px;
  border-radius: 999px;
}

.order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.callout {
  margin-top: 16px;
  border-radius: 14px;
  padding: 12px 16px;
  background: var(--surface-alt);
  font-size: 14px;
}

.callout.declined {
  background: var(--error-bg);
  color: var(--error);
}

.banner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border-radius: var(--radius-card);
  padding: 18px 22px;
  background: var(--sky-surface);
  color: var(--navy);
  margin-bottom: 24px;
  box-shadow: inset 6px 0 0 var(--pink);
}

.banner strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 19px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

/* ---------------------------------------------------------------- admin */

.kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.kpi {
  padding: 18px 20px;
}

.kpi-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.kpi-value {
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 700;
  margin-top: 6px;
  line-height: 1.1;
}

.kpi-sub {
  font-size: 12.5px;
  color: var(--ink-3);
}

.tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line-strong);
  margin-bottom: 20px;
  overflow-x: auto;
}

.tab {
  border: 0;
  background: none;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 12px 14px 10px;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  white-space: nowrap;
}

.tab:hover {
  color: var(--ink);
}

.tab[aria-selected="true"] {
  color: var(--ink);
  border-bottom-color: var(--pink);
}

.table-wrap {
  overflow-x: auto;
}

table.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--cream);
  white-space: nowrap;
}

.table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table tbody tr.clickable {
  cursor: pointer;
}

.table tbody tr.clickable:hover td {
  background: #fff5f9;
}

.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.cell-main {
  font-weight: 600;
}

.cell-sub {
  font-size: 12.5px;
  color: var(--ink-3);
}

.item-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.low-text {
  color: var(--warn);
  font-weight: 700;
}

.center-card {
  margin: 40px auto;
}

.panel-note {
  margin-top: 12px;
}

#status-chips {
  margin-bottom: 4px;
}

.row-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: var(--pink-text);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.detail-top {
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.detail-section + .detail-section {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.detail-section h3 {
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
}

.kv {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 6px 12px;
  font-size: 14px;
}

.kv dt {
  color: var(--ink-3);
}

.kv dd {
  margin: 0;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline li {
  position: relative;
  padding: 0 0 14px 22px;
  font-size: 13.5px;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--pink);
}

.timeline li::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 17px;
  bottom: 0;
  width: 2px;
  background: var(--line);
}

.timeline li:last-child::after {
  display: none;
}

.action-row,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inline-actions {
  margin-top: 10px;
}

.drawer-foot .inline-actions {
  margin-top: 0;
  justify-content: space-between;
}

.action-form {
  margin-top: 14px;
  padding: 18px;
  border-radius: 16px;
  background: var(--cream);
  border: 1px solid var(--line);
}

.action-form > * + * {
  margin-top: 12px;
}

.items-table td,
.items-table th {
  padding: 9px 10px;
}

.items-table tfoot td {
  font-weight: 700;
  border-top: 1px solid var(--line-strong);
}

.variant-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 38px;
  gap: 8px;
  align-items: center;
}

.variant-rows > * + * {
  margin-top: 8px;
}

.art-preview {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
}

/* -------------------------------------------------------------- sign-in */

.signin {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}

.signin-brand {
  position: relative;
  overflow: hidden;
  background: var(--deep);
  color: var(--cream);
  padding: 44px clamp(24px, 6vw, 72px);
  display: flex;
  flex-direction: column;
  gap: 26px;
  box-shadow: inset -6px 0 0 var(--pink);
}

.signin-brand .brand {
  color: #fff;
  position: relative;
}

.signin-brand .brand-sub {
  color: var(--sky-light);
}

.signin-brand .eyebrow {
  color: var(--sky-light);
  position: relative;
  margin-top: auto;
}

.signin-brand h1 {
  font-size: clamp(34px, 4.6vw, 56px);
  max-width: 13ch;
  position: relative;
  color: var(--cream);
}

.signin-brand h1 em {
  font-style: normal;
  color: var(--pink);
}

/* The theme's hero motif: a sunset disc with horizon stripes. */
.sun {
  position: absolute;
  right: -130px;
  top: -120px;
  width: 420px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--gradient-sunset);
  opacity: 0.92;
  -webkit-mask-image: linear-gradient(180deg, #000 0 56%, transparent 56% 60%, #000 60% 68%, transparent 68% 72%, #000 72% 79%, transparent 79% 83%, #000 83% 89%, transparent 89% 93%, #000 93%);
  mask-image: linear-gradient(180deg, #000 0 56%, transparent 56% 60%, #000 60% 68%, transparent 68% 72%, #000 72% 79%, transparent 79% 83%, #000 83% 89%, transparent 89% 93%, #000 93%);
  pointer-events: none;
}

.signin-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
  max-width: 46ch;
  position: relative;
}

.signin-points li {
  display: flex;
  gap: 14px;
  color: rgba(255, 250, 245, 0.8);
  font-size: 15px;
}

.signin-points li strong {
  color: #fff;
  display: block;
}

.signin-points .dot {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--sky-light);
  display: grid;
  place-items: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  padding-top: 0.15em;
}

.signin-foot {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sky-light);
  position: relative;
}

.signin-panel {
  display: grid;
  place-items: center;
  padding: 40px 24px;
  background: var(--cream);
}

.signin-card {
  width: min(440px, 100%);
  padding: 34px;
  border-radius: 22px;
}

.signin-card > * + * {
  margin-top: 16px;
}

.signin-card h2 {
  font-size: 28px;
}

/* ---------------------------------------------------------------- toasts */

.toasts {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(440px, calc(100% - 32px));
}

.toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--deep);
  color: #fff;
  border-radius: 16px;
  padding: 13px 18px;
  box-shadow: var(--shadow-2);
  font-size: 14px;
  animation: toast-in 0.2s ease;
}

.toast.error {
  background: var(--error);
}

.toast a,
.toast button {
  color: var(--sky-light);
  font-weight: 700;
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.toast.error button {
  color: #fff;
}

@keyframes toast-in {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
}

/* ---------------------------------------------------------------- dialog */

dialog.confirm {
  border: 0;
  border-radius: 22px;
  padding: 28px;
  width: min(420px, calc(100% - 32px));
  box-shadow: var(--shadow-2);
  color: var(--ink);
  background: var(--cream);
}

dialog.confirm::backdrop {
  background: rgba(15, 35, 64, 0.45);
}

dialog.confirm h2 {
  font-size: 23px;
  margin-bottom: 10px;
}

dialog.confirm .dialog-actions {
  display: flex;
  /* side by side when they fit; otherwise each on its own full-width row,
     the main action on top */
  flex-wrap: wrap-reverse;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

dialog.confirm .dialog-actions .btn {
  flex: 1 1 auto;
}

/* --------------------------------------------------------- packing slip */

.slip-toolbar {
  max-width: 820px;
  margin: 24px auto 0;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.slip {
  max-width: 820px;
  margin: 18px auto 48px;
  padding: 40px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.slip-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--ink);
}

.slip-head .brand {
  color: var(--ink);
}

.slip-title {
  text-align: right;
}

.slip-title h1 {
  font-size: 28px;
}

.slip-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 24px 0;
}

.slip table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-bottom: 24px;
}

.slip th,
.slip td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line-strong);
}

.slip th {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.slip .box {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
}

.slip-sign {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 48px;
  font-size: 13px;
  color: var(--ink-2);
}

.slip-sign div {
  border-top: 1px solid var(--ink);
  padding-top: 6px;
}

@media print {
  body {
    background: #fff;
  }
  .no-print {
    display: none !important;
  }
  .slip {
    border: 0;
    margin: 0;
    padding: 0;
    max-width: none;
  }
}

/* ----------------------------------------------------------- responsive */

@media (max-width: 1080px) {
  .kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .checkout {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

@media (max-width: 900px) {
  .shop-hero,
  .checkout,
  .signin {
    grid-template-columns: minmax(0, 1fr);
  }
  .summary {
    position: static;
  }
  .order-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .signin-brand {
    padding-top: 28px;
    padding-bottom: 36px;
    box-shadow: inset 0 -6px 0 var(--pink);
  }
  .signin-brand .eyebrow {
    margin-top: 8px;
  }
  .signin-foot {
    display: none;
  }
  .sun {
    width: 260px;
    right: -90px;
    top: -60px;
  }
}

@media (max-width: 680px) {
  /* Two rows: logo and cart, then navigation and sign-out. */
  .site-header-inner {
    padding: 10px 16px;
    gap: 6px 10px;
    flex-wrap: wrap;
  }
  .header-actions {
    display: contents;
  }
  .brand,
  .admin-badge {
    order: 1;
  }
  .cart-button {
    order: 2;
    margin-left: auto;
    min-height: 40px;
    padding: 0 6px 0 12px;
  }
  /* Icon and count only; the button's aria-label still names it. */
  .cart-button > span:not(.cart-count) {
    display: none;
  }
  .site-nav {
    order: 3;
    flex: 1;
    margin-left: -12px;
  }
  .user-chip {
    order: 4;
    margin-left: auto;
  }
  .site-nav a {
    padding: 6px 12px;
  }
  .brand-name {
    font-size: 14.5px;
  }
  .brand-mark {
    height: 30px;
  }
  .user-chip .who {
    display: none;
  }
  .page {
    padding: 26px 16px 64px;
  }
  .ways,
  .choice-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .span-6,
  .span-4,
  .span-3 {
    grid-column: span 2;
  }
  .span-2,
  .span-1 {
    grid-column: span 1;
  }
  .order-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kv {
    grid-template-columns: 110px minmax(0, 1fr);
  }
  .card-pad,
  .order-card {
    padding: 20px;
  }
  .slip {
    padding: 20px;
  }
  .slip-cols {
    grid-template-columns: 1fr;
  }
  .toolbar select {
    flex: 1 1 auto;
  }
  .toasts {
    left: 50%;
    transform: translateX(-50%);
  }
  body:has(.drawer:not([hidden])) .toasts {
    bottom: 150px;
  }
  .site-footer-inner {
    padding: 28px 16px 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .way:hover {
    transform: none;
  }
}

/* ----------------------------------------------------------------- team */

.team-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 20px;
  align-items: start;
}

.team-grid h2 {
  margin-bottom: 14px;
}

.team-grid form > * + * {
  margin-top: 14px;
}

#team-mode-note {
  margin-top: 12px;
}

.new-codes,
.suggestions {
  margin-bottom: 20px;
}

.new-codes {
  background: var(--blush);
  border-color: transparent;
}

.suggestions {
  margin-top: 20px;
}

.code-list {
  list-style: none;
  margin: 14px 0;
  padding: 0;
}

.code-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.code-list li > div:first-child {
  flex: 1 1 220px;
  min-width: 0;
}

.code-chip {
  display: inline-block;
  background: #fff;
  border: 1.5px dashed var(--pink);
  color: var(--navy);
  border-radius: 10px;
  padding: 5px 12px;
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: 0.02em;
  user-select: all;
  margin-right: 6px;
}

.suggestion {
  display: flex;
  align-items: center;
  gap: 6px;
}

.suggestion .link-button {
  color: var(--pink-text);
  font-weight: 600;
  padding: 0 2px;
}

@media (max-width: 900px) {
  .team-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ------------------------------------------------------- free to you */

.price .free {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ok);
}

.totals.you-pay {
  margin-top: -4px;
  padding-top: 8px;
  border-top: 1px dashed var(--line-strong);
}

.totals.you-pay strong {
  color: var(--ok);
}

.summary .totals.you-pay {
  margin: -6px 0 16px;
}

/* -------------------------------------------------------- photo picker */

.photo-picker > * + * {
  margin-top: 6px;
}

.photo-drop {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 18px;
  border: 2px dashed var(--line-strong, #c9c1b6);
  border-radius: 14px;
  background: var(--surface, #fff);
  transition: border-color 0.15s, background-color 0.15s;
}

.photo-drop.over {
  border-color: var(--pink, #E84890);
  background: var(--blush, #FDEDF4);
}

.photo-picker .chips {
  margin-top: 4px;
}

.photo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.photo-tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.photo-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-alt);
  box-shadow: inset 0 0 0 1px var(--line);
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.photo-tile select {
  min-height: 34px;
  font-size: 13px;
  padding-block: 4px;
}

.photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.photo-actions .link-button {
  padding: 0;
  font-size: 13px;
}

.photo-actions .link-button.danger {
  color: var(--error);
}

/* ------------------------------------------------------- colour choices */

.color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin: 6px 0;
}

.color-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}

.color-choice:has(input:checked) {
  background: var(--sky-surface);
  border-color: var(--sky);
}

.color-choice input {
  margin: 0;
}

.color-choice .swatch-dot {
  width: 22px;
  height: 22px;
  flex: none;
}

.color-choice.light .swatch-dot {
  box-shadow: inset 0 0 0 1px rgba(20, 32, 58, 0.35);
}

.color-choices .inline-actions .link-button {
  padding-left: 0;
}

/* ------------------------------------------------------- ROI calculator */

.roi {
  margin-top: 18px;
  padding: 16px 18px 14px;
  border-radius: var(--radius-card);
  background: var(--sky-surface);
  border: 1px solid rgba(80, 176, 224, 0.35);
}

.roi h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 15px;
  margin: 0 0 10px;
}

.roi-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
}

.roi-input input {
  width: 96px;
  flex: none;
  text-align: right;
  font-size: 16px;
}

.roi .hint {
  margin: 6px 0 0;
}

.roi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.roi-stat {
  background: var(--surface);
  border-radius: 12px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.roi-stat span {
  font-size: 12px;
  color: var(--ink-2);
}

.roi-stat strong {
  font-family: var(--font-heading);
  font-size: 18px;
}

.roi-stat.big strong {
  font-size: 22px;
}

.roi-stat.gain strong {
  color: var(--ok);
}

.roi-stat.loss strong {
  color: var(--error);
}

.roi-note {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--ink-2);
}

.inline-actions .push-end {
  margin-left: auto;
}

/* Admin-only supplier details in the item editor */
fieldset.admin-only {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-control);
  padding: 14px 16px 16px;
  background: var(--surface-alt);
}
fieldset.admin-only > legend {
  padding: 0 6px;
}
fieldset.admin-only > legend .tag {
  margin-left: 4px;
  vertical-align: 1px;
}
fieldset.admin-only > .hint {
  margin: 0 0 12px;
}
.supplier-line {
  color: var(--pink-text);
}

/* ------------------------------------------------------ bulk order edits */

.table .select-col {
  width: 44px;
  padding-right: 0;
}

.select-hit {
  display: inline-flex;
  padding: 8px;
  margin: -8px;
  cursor: pointer;
}

.select-col input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--action);
  cursor: pointer;
}

.table tbody tr.selected td {
  background: var(--blush);
}

/* Stays in view below the sticky site header while the list scrolls. */
.bulk-bar {
  position: sticky;
  top: 82px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border: 2px solid var(--pink);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-lift);
}

.bulk-bar[hidden] {
  display: none;
}

.bulk-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.bulk-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
}

.bulk-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  padding: 8px 12px;
  font-size: 14px;
  border-bottom: 1px solid var(--line);
}

.bulk-list li:last-child {
  border-bottom: 0;
}

.bulk-tracking {
  margin-bottom: 16px;
}

.bulk-tracking td {
  padding: 8px 10px;
}

.bulk-tracking .field {
  margin: 0;
}

.bulk-tracking input {
  width: 100%;
  min-width: 160px;
}

.tracker-items {
  max-width: 420px;
}

/* Several packing slips print one to a page. */
.slip + .slip {
  break-before: page;
}

@media (max-width: 640px) {
  .bulk-bar {
    position: static;
    border-radius: var(--radius-control);
  }
}

/* ------------------------------------------------------ own passwords */

.show-secret {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--ink-2);
}

dialog.password-dialog {
  width: min(460px, calc(100% - 32px));
}

dialog.password-dialog .field {
  margin-top: 14px;
}

@media (max-width: 480px) {
  dialog.password-dialog {
    padding: 22px;
  }
  dialog.password-dialog .dialog-actions {
    flex-direction: column-reverse;
  }
  dialog.password-dialog .dialog-actions .btn {
    width: 100%;
  }
}

/* ---------------------------------------------------------- stock editor */

.catalog-bulk-bar .bulk-modes {
  margin: 0;
}

.catalog-bulk-bar .bulk-hint {
  flex: 1 1 220px;
  font-size: 13.5px;
}

.bulk-apply {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.bulk-apply[hidden] {
  display: none;
}

.bulk-apply select,
.bulk-apply input {
  min-height: 38px;
  width: auto;
  min-width: 160px;
}

.stock-table td {
  padding-top: 8px;
  padding-bottom: 8px;
}

.stock-table tr.group-start td {
  border-top: 1px solid var(--line-strong);
}

.stock-table .stock-field {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin: 0;
}

.stock-table .stock-input {
  width: 128px;
  min-height: 40px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.stock-table .stock-note {
  min-width: 56px;
  font-variant-numeric: tabular-nums;
}

.stock-table .field-error {
  flex-basis: 100%;
  margin: 0;
}

/* ------------------------------------------------- bulk catalog editor */

.bulk-table {
  min-width: 2920px;
}

.bulk-table td {
  padding: 8px 8px;
  vertical-align: top;
}

.bulk-table th {
  padding: 12px 8px;
}

.bulk-table input[type="text"],
.bulk-table input[type="number"],
.bulk-table select,
.bulk-table textarea {
  min-height: 38px;
  padding: 7px 10px;
  font-size: 14px;
}

.bulk-table .bulk-cell {
  gap: 4px;
  border-radius: var(--radius-control);
}

.bulk-table .dirty input,
.bulk-table .dirty select,
.bulk-table .dirty textarea,
.bulk-table input.dirty {
  background: var(--warn-bg);
  border-color: var(--warn);
}

.bulk-table .dirty input[type="checkbox"] {
  outline: 2px solid var(--warn);
  outline-offset: 2px;
}

.bulk-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--action);
}

/* the tick box and the item stay in view while the grid scrolls sideways */
.bulk-table .sticky-col {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface);
}

.bulk-table th.sticky-col {
  background: var(--cream);
}

.bulk-table .item-col {
  left: 84px;
  min-width: 300px;
  box-shadow: 1px 0 0 var(--line);
}

.bulk-table tr.selected td,
.bulk-table tr.selected .sticky-col {
  background: var(--blush);
}

.bulk-table .bulk-name {
  flex: 1;
  min-width: 0;
}

.bulk-table .bulk-name input {
  width: 100%;
  font-weight: 600;
}

.bulk-table .w-num {
  width: 82px;
}

.bulk-table .w-sku {
  width: 150px;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.bulk-table .w-cat {
  width: 185px;
}

.bulk-table .w-brand {
  width: 175px;
}

.bulk-table .field-error {
  max-width: 180px;
}

.bulk-table .w-unit {
  width: 150px;
}

.bulk-table .w-supplier {
  width: 190px;
}

.bulk-table .w-link {
  width: 220px;
}

.bulk-table .w-desc {
  width: 300px;
  resize: vertical;
}

.bulk-stocks {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: 6px 10px;
  width: 330px;
}

.bulk-stocks .bulk-stock {
  flex-direction: row;
  align-items: center;
  gap: 4px;
}

.bulk-stocks .bulk-stock-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
  min-width: 22px;
}

.bulk-stocks .stock-input {
  width: 72px;
  text-align: right;
}

.bulk-stocks .dirty .stock-input {
  background: var(--warn-bg);
  border-color: var(--warn);
}

/* A wide table's sideways scrollbar, kept at the bottom of the window while
   the table is on screen (see stickyScrollbar in admin.js). The table's own
   scrollbar is hidden so there's only one. */
.has-hscroll {
  scrollbar-width: none;
}

.table-wrap.has-hscroll::-webkit-scrollbar {
  display: none;
  height: 0;
}

.hscroll {
  position: sticky;
  bottom: 0;
  z-index: 6;
  box-sizing: border-box;
  height: 20px;
  overflow-x: scroll;
  overflow-y: hidden;
  margin-top: -1px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0 0 var(--radius-control) var(--radius-control);
  box-shadow: 0 -6px 16px rgba(20, 32, 58, 0.08);
  scrollbar-width: auto;
  scrollbar-color: var(--muted) var(--surface-alt);
}

.hscroll[hidden] {
  display: none;
}

.hscroll-inner {
  height: 1px;
}

/* Styled scrollbars stay visible, even where the system hides them until you
   scroll (macOS). */
.hscroll::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar {
  height: 14px;
}

.hscroll::-webkit-scrollbar-track,
.table-wrap::-webkit-scrollbar-track {
  background: var(--surface-alt);
}

.hscroll::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb {
  background: #9aa2b4;
  border: 3px solid var(--surface-alt);
  border-radius: 999px;
}

.hscroll::-webkit-scrollbar-thumb:hover,
.table-wrap::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* sorting and reordering in the bulk editor */

.bulk-table .select-col {
  width: 84px;
  min-width: 84px;
  padding-right: 4px;
}

.row-tools {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.row-tools > input[type="checkbox"] {
  margin-top: 10px;
}

.move-tools {
  display: grid;
  justify-items: center;
  gap: 1px;
}

.move-btn {
  width: 30px;
  height: 20px;
  padding: 0;
  font-size: 10px;
  line-height: 1;
  color: var(--ink-2);
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}

.move-btn:hover:not(:disabled) {
  color: var(--ink);
  border-color: var(--line-strong);
}

.move-btn:disabled,
.grip[aria-disabled="true"] {
  opacity: 0.35;
  cursor: default;
}

.grip {
  display: grid;
  place-items: center;
  width: 30px;
  height: 22px;
  font-size: 16px;
  color: var(--ink-2);
  cursor: grab;
  border-radius: 6px;
  user-select: none;
}

.grip:active {
  cursor: grabbing;
}

.grip:focus-visible {
  box-shadow: var(--focus-ring);
  outline: none;
}

.table tr.dragging td {
  opacity: 0.45;
}

.table tr.drop-before td {
  box-shadow: inset 0 3px 0 var(--pink);
}

.table tr.drop-after td {
  box-shadow: inset 0 -3px 0 var(--pink);
}

.table tr.category-start td {
  border-top: 2px solid var(--line-strong);
}

#catalog-table .move-col {
  width: 46px;
  padding-right: 0;
}

.sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.sort-btn:hover,
.sort-btn.sorted {
  color: var(--ink);
}

.sort-mark {
  font-size: 10px;
  opacity: 0.5;
}

.sort-btn.sorted .sort-mark {
  opacity: 1;
  color: var(--pink-text);
}

.bulk-sorted {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
