/*
 * GoodDeal — demo store styles.
 * No sticky or fixed element, no transition, no web font, nothing loaded from elsewhere:
 * the page looks the same at every visit.
 */

:root {
  /* Black and white sportswear look: black for every action, grey for images, pill buttons. */
  --brand: #111111;
  --brand-dark: #111111;
  --brand-soft: #f5f5f5;
  --ink: #111111;
  --muted: #5f5f61;
  --line: #e5e5e5;
  --field-border: #757575;
  --surface: #ffffff;
  --background: #ffffff;
  --image-background: #f5f5f5;
  --swatch-ring: rgb(17 17 17 / 25%);
  --success: #15803d;
  --success-soft: #f0fdf4;
  --danger: #b91c1c;
  --danger-soft: #fef2f2;
  --ribbon: #f5f5f5;
  --ribbon-ink: #111111;
  --badge: #b13a00;
  --radius: 12px;
  --radius-small: 8px;
  --pill: 999px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --text-sm: 14px;
  --text-md: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 32px;
  --text-4xl: 36px;
}

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

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

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
fieldset {
  margin: 0;
}

ul,
ol {
  padding: 0;
}

p {
  text-wrap: pretty;
}

a {
  color: var(--ink);
}

/* Titles in medium weight, as big sportswear stores set them. */
h1,
h2 {
  font-weight: 500;
  line-height: 1.2;
}

:focus-visible {
  outline: 3px solid var(--brand-dark);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

/* Inline padding only: `main` sets its own top padding, which a `padding` shorthand here would erase. */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: var(--space-5);
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  padding: var(--space-2) var(--space-4);
  background: var(--surface);
  border-radius: var(--radius);
}

.skip-link:focus {
  top: var(--space-4);
}

/* ---------------------------------------------------------------- Utility bar, header, promo strip, footer */

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

.utility-bar {
  background: var(--image-background);
  font-size: 12px;
  font-weight: 500;
}

.utility-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 36px;
}

.utility-nav {
  display: flex;
  align-items: center;
  margin-right: calc(-1 * var(--space-3));
}

.utility-nav a,
.utility-nav button {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 var(--space-3);
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

/* The links are parted by thin bars, like on a big store. */
.utility-nav > * + *::before {
  content: '';
  width: 1px;
  height: 12px;
  margin-right: var(--space-3);
  margin-left: calc(-1 * var(--space-3));
  background: var(--ink);
}

.utility-nav a:hover,
.utility-nav button:hover {
  color: var(--muted);
}

.site-header {
  background: var(--surface);
}

.site-header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-4);
  min-height: 60px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  justify-self: start;
  min-height: 44px;
  color: var(--ink);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.logo__mark {
  width: 44px;
  height: 28px;
  fill: currentColor;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 60px;
  padding: 0 var(--space-3);
  border-bottom: 2px solid transparent;
  border-top: 2px solid transparent;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  border-bottom-color: var(--ink);
}

.header-tools {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: var(--space-2);
}

.header-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 180px;
}

.header-search__icon {
  position: absolute;
  left: 8px;
  width: 24px;
  height: 24px;
  pointer-events: none;
}

.header-search__input {
  width: 100%;
  height: 40px;
  padding: 0 var(--space-4) 0 40px;
  border: 0;
  border-radius: var(--pill);
  background: var(--image-background);
  color: var(--ink);
  font: inherit;
}

.header-search__input:hover {
  background: var(--line);
}

.header-search__input::placeholder {
  color: var(--muted);
}

.bag-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--ink);
}

.bag-link:hover {
  background: var(--image-background);
}

.bag-link svg {
  width: 24px;
  height: 24px;
}

.cart-count {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 18px;
  padding: 0 4px;
  border-radius: var(--pill);
  background: var(--ink);
  color: var(--surface);
  font-size: 11px;
  font-weight: 500;
  line-height: 18px;
  text-align: center;
}

/* The demo's own voice: the grey promo strip under the header, as on a big store. */
.demo-ribbon {
  padding: var(--space-3) var(--space-5);
  background: var(--ribbon);
  color: var(--ribbon-ink);
  font-size: var(--text-sm);
  font-weight: 500;
  text-align: center;
}

.demo-ribbon a,
.try-this a,
.test-card a,
.end-note a {
  color: inherit;
}

.site-footer {
  margin-top: var(--space-7);
  padding: var(--space-6) 0 var(--space-5);
  border-top: 1px solid var(--line);
}

.site-footer__columns {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5) 80px;
}

.site-footer h2 {
  font-size: var(--text-md);
  font-weight: 500;
}

.site-footer ul {
  margin-top: var(--space-2);
  list-style: none;
}

.site-footer li a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
}

.site-footer li a:hover {
  color: var(--ink);
}

.site-footer__legal {
  margin-top: var(--space-6);
  color: var(--muted);
  font-size: 12px;
}

.site-footer__legal a {
  color: var(--ink);
  text-decoration: underline;
}

main {
  padding-top: var(--space-5);
}

/* ---------------------------------------------------------------- Buttons, fields, messages */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0 var(--space-5);
  border: 1.5px solid transparent;
  border-radius: var(--pill);
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.btn--primary {
  background: var(--brand);
  color: var(--surface);
}

.btn--primary:hover {
  background: #3a3a3a;
}

.btn--secondary {
  background: var(--surface);
  border-color: #cacacb;
  color: var(--ink);
}

.btn--secondary:hover {
  border-color: var(--ink);
}

/* Same as the navigation: padding for the target, negative margin for the text's alignment. */
.btn--link {
  min-height: 44px;
  margin-inline: calc(-1 * var(--space-2));
  padding: 0 var(--space-2);
  background: none;
  border: none;
  color: var(--brand-dark);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.btn--block {
  width: 100%;
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.field__label {
  font-weight: 600;
}

.field__hint {
  color: var(--muted);
  font-size: var(--text-sm);
}

.field__input,
.field textarea {
  min-height: 44px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--field-border);
  border-radius: var(--radius-small);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

/* A refused field thickens inward: its size does not move, nor what surrounds it. */
.field__input[aria-invalid='true'],
.listbox__button[aria-invalid='true'] {
  border-color: var(--danger);
  box-shadow: inset 0 0 0 1px var(--danger);
}

.field__error {
  color: var(--danger);
  font-size: var(--text-sm);
  font-weight: 600;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-4);
}

.message {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  font-weight: 600;
}

.message--success {
  background: var(--success-soft);
  color: var(--success);
}

.message--error {
  background: var(--danger-soft);
  color: var(--danger);
}

.check {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 44px;
  cursor: pointer;
}

.check input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--brand);
}

.check input[aria-invalid='true']:not(:focus-visible) {
  outline: 2px solid var(--danger);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- Home */

/* ---------------------------------------------------------------- Home: filters and product wall */

.listing__title {
  padding: var(--space-2) 0 var(--space-5);
  font-size: var(--text-2xl);
}

.listing__layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: var(--space-6);
  align-items: start;
}

.filters__group {
  margin: 0;
  padding: var(--space-3) 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.filters__group:first-child {
  padding-top: 0;
  border-top: 0;
}

.filters__group legend {
  padding: var(--space-2) 0;
  font-weight: 500;
}

.filters .check {
  min-height: 36px;
}

.filters .check input {
  accent-color: var(--ink);
}

.search__status {
  min-height: 0;
  color: var(--muted);
  font-weight: 500;
}

.search__status:not(:empty) {
  margin-bottom: var(--space-3);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6) var(--space-3);
  list-style: none;
}

/* The card reads as one object: its link covers all of it, price and colours included. */
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
}

.product-card__link {
  display: flex;
  flex-direction: column;
  color: var(--ink);
  text-decoration: none;
}

.product-card__link::after {
  content: '';
  position: absolute;
  inset: 0;
}

.product-card__link:focus-visible {
  outline: none;
}

.product-card__link:focus-visible::after {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.product-card__image,
.cart-line__image,
.product-page__image,
.swatch__image {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--image-background);
}

.product-card__image {
  aspect-ratio: 1;
}

.product-card__image svg {
  width: 82%;
  height: auto;
}

.product-card__text {
  display: flex;
  flex-direction: column;
  padding-top: var(--space-3);
}

.product-card__badge,
.product-page__badge {
  color: var(--badge);
  font-weight: 500;
}

.product-card__name {
  font-weight: 500;
}

.product-card:hover .product-card__name {
  text-decoration: underline;
}

.product-card__subtitle,
.product-card__colors {
  color: var(--muted);
}

.product-card__price {
  margin-top: var(--space-2);
  font-weight: 500;
}

/* The guide speaks in the demo's own voice, the grey of the promo strip. */
.try-this {
  margin-top: var(--space-5);
  padding: var(--space-4);
  background: var(--ribbon);
  color: var(--ribbon-ink);
  font-size: var(--text-sm);
}

.try-this h2 {
  font-size: var(--text-md);
}

.try-this ol {
  margin-top: var(--space-2);
  padding-left: var(--space-5);
}

.try-this li + li {
  margin-top: var(--space-2);
}

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

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
  color: var(--muted);
  font-size: var(--text-sm);
}

.breadcrumb li + li::before {
  content: '/';
  margin-right: var(--space-2);
}

.product-page {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: var(--space-7);
  margin-top: var(--space-5);
  align-items: start;
}

.product-page__image {
  aspect-ratio: 1;
}

.product-page__image svg {
  width: 86%;
  height: auto;
}

.product-page__info {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  max-width: 456px;
}

.product-page__info h1 {
  font-size: var(--text-2xl);
}

.product-page__subtitle {
  font-weight: 500;
}

.product-page__price {
  margin-top: var(--space-3);
  font-weight: 500;
}

.choice {
  margin: 0;
  padding: 0;
  border: none;
}

.choice legend {
  padding: 0;
  font-weight: 500;
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.swatch {
  position: relative;
  display: block;
  width: 72px;
  height: 72px;
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  cursor: pointer;
}

.swatch__image {
  width: 100%;
  height: 100%;
  border-radius: calc(var(--radius-small) - 1px);
}

.swatch__image svg {
  width: 90%;
  height: auto;
}

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

/* A choice thickens inward: the neighbours do not move. */
.swatch:has(.swatch__input:checked) {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.swatch:has(.swatch__input:focus-visible),
.size:has(.size__input:focus-visible) {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.size-group__legend {
  margin-bottom: var(--space-3);
}

.sizes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}

.size {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  cursor: pointer;
}

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

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

.size:has(.size__input:checked) {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

/* Sold out: greyed and struck through, and it cannot be chosen. */
.size:has(.size__input:disabled) {
  border-color: var(--line);
  background: var(--image-background);
  color: #8d8d8d;
  text-decoration: line-through;
  cursor: default;
}

.size:has(.size__input:disabled) .size__input {
  cursor: default;
}

.size-group--error .size:not(:has(.size__input:disabled)) {
  border-color: var(--danger);
}

.size-group--error .size-group__legend,
.size-group__error {
  color: var(--danger);
}

.size-group__error {
  margin-top: var(--space-2);
}

.product-page__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.btn--large {
  min-height: 60px;
}

.btn svg {
  width: 24px;
  height: 24px;
}

.btn[aria-pressed='true'] svg path {
  fill: currentColor;
}

.product-page__facts {
  margin-top: var(--space-4);
  padding-left: var(--space-5);
}

.disclosure + .disclosure {
  border-top: 0;
}

.disclosure__panel {
  padding-bottom: var(--space-4);
}

.stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--field-border);
  border-radius: var(--radius);
  background: var(--surface);
}

.stepper__button {
  width: 44px;
  min-height: 44px;
  border: none;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: var(--text-xl);
  cursor: pointer;
}

.stepper__button:disabled {
  color: var(--line);
  cursor: default;
}

.stepper__input {
  width: 48px;
  border: none;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  font: inherit;
  font-weight: 700;
  text-align: center;
  appearance: textfield;
}

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

.quantity__label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: 600;
}

.added {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

.disclosure {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.disclosure__button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 52px;
  padding: 0;
  border: none;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.disclosure__button::after {
  content: '+';
  font-size: var(--text-2xl);
  line-height: 1;
}

.disclosure__button[aria-expanded='true']::after {
  content: '−';
}

.specs {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-2) var(--space-5);
  padding-bottom: var(--space-4);
}

.specs dt {
  color: var(--muted);
}

.specs dd {
  font-weight: 600;
}

/* ---------------------------------------------------------------- Cart */

.page-title {
  font-size: var(--text-3xl);
}

.cart-layout,
.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: var(--space-6);
  margin-top: var(--space-5);
  align-items: start;
}

.cart-lines {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  list-style: none;
}

.cart-line {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto 96px auto;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.cart-line__image {
  width: 72px;
  height: 72px;
}

.cart-line__image svg {
  width: 48px;
  height: 48px;
}

.cart-line__details {
  display: flex;
  flex-direction: column;
}

.cart-line__name {
  font-weight: 700;
}

.cart-line__meta {
  color: var(--muted);
  font-size: var(--text-sm);
}

.cart-line__total {
  font-weight: 700;
  text-align: right;
}

.panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.panel h2 {
  font-size: var(--text-xl);
}

.promo {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.promo__row {
  display: flex;
  gap: var(--space-2);
}

.promo__row .field__input {
  flex: 1;
  min-width: 0;
}

.totals {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}

.totals__row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
}

.totals__row--discount {
  color: var(--success);
  font-weight: 600;
}

.totals__row--total {
  padding-top: var(--space-2);
  border-top: 1px solid var(--line);
  font-size: var(--text-xl);
  font-weight: 800;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
  margin-top: var(--space-5);
  padding: var(--space-6);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

/* ---------------------------------------------------------------- Checkout */

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.checkout-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.checkout-section h2 {
  font-size: var(--text-xl);
}

/* A section title and the hint that speaks about the whole section, kept together. */
.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.error-summary {
  padding: var(--space-4) var(--space-5);
  border: 2px solid var(--danger);
  border-radius: var(--radius);
  background: var(--danger-soft);
  color: var(--danger);
}

.error-summary h2 {
  font-size: var(--text-lg);
}

.error-summary ul {
  margin-top: var(--space-2);
  padding-left: var(--space-5);
}

.error-summary a {
  color: var(--danger);
  font-weight: 600;
}

.delivery-option {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 56px;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--field-border);
  border-radius: var(--radius);
  cursor: pointer;
}

.delivery-option:has(input:checked) {
  border-color: var(--brand-dark);
  box-shadow: inset 0 0 0 1px var(--brand-dark);
  background: var(--brand-soft);
}

.delivery-option input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--brand);
}

.delivery-option__text {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.delivery-option__name {
  font-weight: 700;
}

.delivery-option__time {
  color: var(--muted);
  font-size: var(--text-sm);
}

.delivery-option__price {
  font-weight: 700;
}

.listbox {
  position: relative;
}

.listbox__button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--field-border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

/* The arrow is what tells this button from a text field: it is drawn large. */
.listbox__button::after {
  content: '▾';
  color: var(--ink);
  font-size: var(--text-2xl);
  line-height: 1;
}

.listbox__button--chosen {
  color: var(--ink);
}

.listbox__options {
  margin-top: var(--space-1);
  padding: var(--space-1);
  border: 1px solid var(--field-border);
  border-radius: var(--radius);
  background: var(--surface);
  list-style: none;
}

.listbox__option {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-3);
  border-radius: calc(var(--radius) - var(--space-1));
  cursor: pointer;
}

.listbox__option:hover,
.listbox__option--active {
  background: var(--brand-soft);
}

.listbox__option[aria-selected='true'] {
  font-weight: 700;
}

.gift-message__count {
  align-self: flex-end;
  color: var(--muted);
  font-size: var(--text-sm);
}

/* What the demo itself says speaks in its own colour, the ribbon's: the test card, the end note. */
.test-card,
.end-note {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  background: var(--ribbon);
  color: var(--ribbon-ink);
}

.summary__items {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  list-style: none;
}

.summary__item {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
}

/* ---------------------------------------------------------------- Confirmation */

/* Left-aligned like every other page: its text starts where the logo starts. */
.confirmation {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.confirmation__badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--success);
  color: var(--surface);
}

.confirmation__badge svg {
  width: 36px;
  height: 36px;
}

.confirmation h1 {
  font-size: var(--text-3xl);
}

.confirmation__lead {
  margin-top: var(--space-2);
  font-size: var(--text-lg);
}

.end-note {
  font-weight: 600;
}

.details {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-2) var(--space-5);
}

.details dt {
  color: var(--muted);
}

.details dd {
  font-weight: 600;
}

/* ---------------------------------------------------------------- Narrow screens */

@media (max-width: 860px) {
  .listing__layout,
  .product-page,
  .cart-layout,
  .checkout-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .cart-line {
    grid-template-columns: 72px minmax(0, 1fr);
  }

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

  .filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0 var(--space-5);
  }

  .filters__group,
  .filters__group:first-child {
    padding: 0;
    border-top: 0;
  }

  /* The header goes on two rows: logo and tools, then the links. */
  .site-header__inner {
    grid-template-columns: auto 1fr;
  }

  .site-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    margin-inline: calc(-1 * var(--space-3));
  }

  .site-nav a {
    min-height: 44px;
  }

  .header-search {
    width: 140px;
  }
}

@media (max-width: 480px) {
  .utility-bar__inner > span {
    display: none;
  }

  .utility-bar__inner {
    justify-content: flex-end;
  }
}

/* ---------------------------------------------------------------- Footer links, sign in, contact */

.try-this__more {
  margin-top: var(--space-5);
}

.try-this ul {
  margin-top: var(--space-3);
  padding-left: var(--space-5);
}

.try-this a {
  color: var(--ribbon-ink);
  font-weight: 600;
}

/* Forms that stand alone (sign in, contact) keep a reading width, aligned on the logo. */
.narrow {
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.password-row {
  display: flex;
  gap: var(--space-2);
}

.password-row .field__input {
  flex: 1;
  min-width: 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-5);
  margin-top: var(--space-1);
}

.choice[aria-invalid='true'] .check input:not(:focus-visible) {
  outline: 2px solid var(--danger);
  outline-offset: 2px;
}

.billing {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.card-hint {
  list-style: none;
}

/* ---------------------------------------------------------------- Sportswear touches */

/* A floated legend sits inside its group, under the group's top border, not across it. */
.filters__group legend {
  float: left;
  width: 100%;
}

.filters .check {
  clear: both;
}

/* The cart reads as a list, like a big store's bag: no boxes, a rule between products. */
.cart-lines .cart-line {
  grid-template-columns: 120px minmax(0, 1fr) auto 96px auto;
  padding: var(--space-5) 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: none;
}

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

.cart-lines .cart-line__image {
  width: 120px;
  height: 120px;
}

.cart-layout .panel {
  padding: 0;
  border: 0;
}

.cart-layout .panel h2 {
  font-size: var(--text-2xl);
}

@media (max-width: 860px) {
  .cart-lines .cart-line {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .cart-lines .cart-line__image {
    width: 96px;
    height: 96px;
  }
}

.cart-lines .cart-line__image svg {
  width: 88%;
  height: auto;
}

/* Rounded corners everywhere, as on a big sportswear store: pictures, the guide, the stepper. */
.product-card__image,
.product-page__image,
.cart-line__image,
.try-this,
.test-card,
.end-note {
  border-radius: var(--radius);
}

.product-card__link::after {
  border-radius: var(--radius);
}

.stepper {
  overflow: hidden;
  border-radius: var(--pill);
}

.stepper__input {
  border-color: transparent;
}

/* Checkboxes and radio buttons drawn by the page: rounded square, round, black when chosen. */
.check input[type='checkbox'],
.check input[type='radio'] {
  appearance: none;
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 1.5px solid var(--field-border);
  background: var(--surface);
  cursor: pointer;
}

.check input[type='checkbox'] {
  border-radius: 5px;
}

.check input[type='radio'] {
  border-radius: 50%;
}

.check input[type='checkbox']:hover,
.check input[type='radio']:hover {
  border-color: var(--ink);
}

.check input[type='checkbox']:checked {
  border-color: var(--ink);
  background: var(--ink)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 6.5' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 100% no-repeat;
}

.check input[type='radio']:checked {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 4px var(--surface);
  background: var(--ink);
}

/* People wearing the clothes: portrait pictures, with the indigo halo of the team page's portraits. */
.product-card__image,
.product-page__image {
  aspect-ratio: 4 / 5;
}

.product-card__image svg,
.product-page__image svg,
.swatch__image svg,
.cart-line__image svg,
.cart-lines .cart-line__image svg {
  width: auto;
  height: 92%;
}

.figure {
  filter: drop-shadow(0 0 6px rgb(99 102 241 / 30%));
}
