:root {
  color-scheme: light;
  --ink: #14171b;
  --muted: #5a626e;
  --line: #d9dee6;
  --paper: #ffffff;
  --soft: #f3f5f7;
  --coal: #20242a;
  --brand-pink: #ec008c;
  --brand-pink-dark: #b8006d;
  --brand-blue: #009fe3;
  --steel: var(--brand-blue);
  --mint: #4aa887;
  --shadow: 0 18px 50px rgba(20, 23, 27, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

body.drawer-open {
  overflow: hidden;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  min-height: 72px;
  padding: 12px clamp(16px, 4vw, 52px);
  color: #fff;
  background: rgba(20, 23, 27, 0.96);
  border-bottom: 3px solid var(--brand-blue);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}

.brand img {
  width: 128px;
  max-height: 42px;
  object-fit: contain;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.top-nav a {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.94rem;
  text-decoration: none;
}

.top-nav a:hover {
  color: #fff;
}

.icon-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: inherit;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: var(--radius);
  cursor: pointer;
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  display: grid;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  place-items: center;
  color: #fff;
  background: var(--brand-pink);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
}

main {
  overflow: hidden;
}

.shop-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: clamp(24px, 4vw, 52px);
  align-items: stretch;
  padding: clamp(32px, 6vw, 76px) clamp(16px, 4vw, 52px);
  color: #fff;
  background:
    linear-gradient(90deg, rgba(20, 23, 27, 0.93), rgba(20, 23, 27, 0.78)),
    url("https://images.squarespace-cdn.com/content/v1/5a9de3283e2d090fc7060f30/1533099831830-0KNOZYZP2UUHLWRLC8AX/sale%2Blbox.JPG?format=1500w")
      center / cover;
}

.shop-intro h1 {
  max-width: 760px;
  margin: 0 0 16px;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.shop-intro p {
  max-width: 700px;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(1rem, 1.5vw, 1.22rem);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand-pink);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.quick-panel,
.checkout-form,
.summary-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.quick-panel {
  display: grid;
  gap: 16px;
  align-self: start;
  padding: 22px;
  color: var(--ink);
}

.panel-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-heading h2,
.panel-heading h3 {
  margin: 0;
  font-size: 1.08rem;
}

.panel-heading svg {
  color: var(--brand-pink);
  width: 21px;
  height: 21px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.hidden-field {
  display: none;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #c9d0d9;
  border-radius: var(--radius);
  padding: 10px 12px;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(0, 159, 227, 0.34);
  outline-offset: 2px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.primary-button {
  color: #fff;
  background: var(--brand-pink);
  border-color: var(--brand-pink);
}

.primary-button:hover {
  background: var(--brand-pink-dark);
  border-color: var(--brand-pink-dark);
}

.secondary-button {
  color: var(--ink);
  background: #fff;
  border-color: #c9d0d9;
}

.secondary-button:hover {
  border-color: var(--steel);
}

.primary-button svg,
.secondary-button svg {
  width: 18px;
  height: 18px;
}

.toolbar-band {
  display: grid;
  grid-template-columns: minmax(260px, 380px) 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px clamp(16px, 4vw, 52px);
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.search-field {
  position: relative;
}

.search-field svg {
  position: absolute;
  left: 13px;
  top: 50%;
  width: 18px;
  height: 18px;
  color: var(--muted);
  transform: translateY(-50%);
}

.search-field input {
  padding-left: 42px;
}

.filter-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.filter-tabs button {
  min-height: 40px;
  padding: 8px 13px;
  color: var(--muted);
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
}

.filter-tabs button[aria-selected="true"] {
  color: #fff;
  background: var(--coal);
  border-color: var(--coal);
}

.catalogue,
.checkout-section {
  padding: clamp(32px, 5vw, 64px) clamp(16px, 4vw, 52px);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.1;
}

.section-heading p {
  max-width: 540px;
  margin: 0;
  color: var(--muted);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.product-card {
  display: grid;
  grid-template-rows: 190px auto;
  overflow: hidden;
  min-height: 488px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.product-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: #e5e8ed;
}

.product-body {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  padding: 16px;
}

.product-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.product-card h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.25;
}

.quote-badge {
  flex: 0 0 auto;
  color: var(--steel);
  background: #e7f2f0;
  border: 1px solid rgba(0, 159, 227, 0.28);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 800;
}

.product-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  padding: 4px 8px;
  color: #2f4858;
  background: #e7f2f0;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

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

.checkout-form {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.summary-panel {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 18px;
  padding: 22px;
}

.summary-lines,
.cart-items {
  display: grid;
  gap: 12px;
}

.empty-state {
  margin: 0;
  color: var(--muted);
  background: #f8fafb;
  border: 1px dashed #c9d0d9;
  border-radius: var(--radius);
  padding: 14px;
}

.summary-line,
.cart-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 12px;
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.summary-line strong,
.cart-line strong {
  display: block;
}

.line-meta {
  color: var(--muted);
  font-size: 0.84rem;
}

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

.line-controls button {
  width: 32px;
  height: 32px;
  border: 1px solid #c9d0d9;
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
}

.remove-button {
  color: #9b2f17;
}

.quote-note {
  margin: 0;
  padding: 14px;
  color: var(--ink);
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 800;
  text-align: center;
}

.quote-note.compact {
  padding: 12px;
}

.fine-print {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
}

.cart-drawer.open {
  display: block;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 23, 27, 0.58);
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(460px, 100vw);
  height: 100%;
  padding: 20px;
  background: #fff;
  box-shadow: -18px 0 45px rgba(20, 23, 27, 0.16);
}

.drawer-header,
.drawer-footer {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.drawer-header {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.drawer-header h2 {
  margin: 0;
}

.drawer-header .icon-button {
  color: var(--ink);
}

.cart-items {
  align-content: start;
  overflow: auto;
  padding: 16px 0;
}

.drawer-footer {
  display: grid;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.full-width {
  width: 100%;
}

.product-dialog {
  width: min(920px, calc(100vw - 28px));
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.product-dialog::backdrop {
  background: rgba(20, 23, 27, 0.62);
}

.dialog-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) 1fr;
  margin: 0;
  background: #fff;
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
}

.dialog-media {
  min-height: 420px;
  background: #e5e8ed;
}

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

.dialog-body {
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 34px;
}

.dialog-body h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.05;
}

.dialog-body p {
  margin: 0;
  color: var(--muted);
}

.dialog-actions {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  align-items: end;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 60;
  max-width: min(460px, calc(100vw - 32px));
  padding: 12px 16px;
  color: #fff;
  background: var(--coal);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transform: translate(-50%, 140%);
  transition: transform 180ms ease;
}

.toast.show {
  transform: translate(-50%, 0);
}

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

  .checkout-layout {
    grid-template-columns: 1fr;
  }

  .summary-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .top-nav {
    display: none;
  }

  .shop-intro,
  .toolbar-band,
  .dialog-card {
    grid-template-columns: 1fr;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dialog-media {
    min-height: 260px;
  }
}

@media (max-width: 580px) {
  .brand img {
    width: 104px;
  }

  .brand span {
    display: none;
  }

  .shop-intro {
    padding-top: 28px;
  }

  .quick-panel,
  .checkout-form,
  .summary-panel,
  .dialog-body {
    padding: 16px;
  }

  .field-grid,
  .product-grid,
  .card-actions,
  .dialog-actions {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: grid;
  }

  .product-card {
    min-height: 0;
  }
}
