:root {
  color-scheme: light;
  --yellow: #f6c90e;
  --yellow-soft: #fff6c2;
  --yellow-deep: #d8a900;
  --iron-950: #20242a;
  --iron-800: #303841;
  --iron-700: #454d57;
  --iron-500: #68717d;
  --iron-300: #c7ccd2;
  --iron-150: #e7eaed;
  --iron-050: #f6f7f8;
  --white: #ffffff;
  --sale-red: #b42318;
  --shadow: 0 16px 38px rgb(32 36 42 / 0.12);
  --radius-lg: 1.5rem;
  --radius-md: 0.85rem;
  --container: 72rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-width: 0;
  margin: 0;
  overflow-x: hidden;
  color: var(--iron-950);
  background: var(--iron-050);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

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

a {
  color: inherit;
  text-underline-offset: 0.22em;
}

button,
input,
select,
textarea {
  max-width: 100%;
  color: inherit;
  font: inherit;
}

button,
.button {
  min-height: 2.75rem;
}

:focus-visible {
  outline: 4px solid var(--yellow);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.65rem 1rem;
  color: var(--white);
  background: var(--iron-950);
  border-radius: 0.5rem;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  color: var(--white);
  background: var(--iron-800);
  border-bottom: 4px solid var(--yellow);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  align-items: center;
  min-height: 5rem;
  padding-block: 0.75rem;
}

.brand {
  display: inline-flex;
  gap: 0.65rem;
  align-items: center;
  font-size: 1.15rem;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  flex: 1 1 24rem;
  flex-wrap: wrap;
  gap: 0.25rem;
  justify-content: center;
}

.main-nav a,
.cart-shortcut {
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  font-weight: 750;
  text-decoration: none;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--iron-950);
  background: var(--yellow);
}

.cart-shortcut {
  color: var(--iron-950);
  background: var(--white);
}

.cart-count {
  display: inline-grid;
  min-width: 1.55rem;
  min-height: 1.55rem;
  place-items: center;
  padding-inline: 0.35rem;
  background: var(--yellow);
  border-radius: 999px;
}

.mode-banner {
  min-height: 2.35rem;
  padding: 0.35rem 1rem;
  color: var(--iron-950);
  background: var(--yellow-soft);
  border-bottom: 1px solid var(--yellow-deep);
  text-align: center;
  font-size: 0.92rem;
  font-weight: 750;
}

.mode-banner[data-mode="live"] {
  color: var(--white);
  background: var(--iron-700);
  border-color: var(--iron-950);
}

.hero {
  color: var(--white);
  background:
    linear-gradient(120deg, rgb(32 36 42 / 0.97), rgb(48 56 65 / 0.88)),
    repeating-linear-gradient(135deg, transparent 0 24px, rgb(246 201 14 / 0.2) 24px 28px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(16rem, 0.8fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  min-height: 34rem;
  padding-block: clamp(3.5rem, 8vw, 7rem);
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--yellow);
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1 {
  max-width: 16ch;
  margin: 0;
  font-size: clamp(2.25rem, 8vw, 5rem);
  line-height: 1.05;
}

.hero-copy {
  max-width: 38rem;
  margin-block: 1.25rem 1.75rem;
  color: var(--iron-150);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.hero-card {
  padding: clamp(1.25rem, 4vw, 2.25rem);
  color: var(--iron-950);
  background: var(--yellow);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-card strong {
  display: block;
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  line-height: 1.15;
}

.hero-card ul {
  padding-left: 1.25rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.1rem;
  color: var(--iron-950);
  background: var(--yellow);
  border: 2px solid var(--yellow);
  border-radius: 0.65rem;
  cursor: pointer;
  font-weight: 850;
  text-align: center;
  text-decoration: none;
}

.button:hover {
  background: var(--yellow-deep);
  border-color: var(--yellow-deep);
}

.button-secondary {
  color: var(--white);
  background: transparent;
  border-color: var(--iron-300);
}

.button-secondary:hover {
  color: var(--iron-950);
  background: var(--white);
  border-color: var(--white);
}

.button-quiet {
  color: var(--iron-950);
  background: var(--white);
  border-color: var(--iron-300);
}

.button-danger {
  color: var(--sale-red);
  background: rgb(180 35 24 / 0.04);
  border: 1px solid var(--sale-red);
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 850;
  min-height: 2.35rem;
  padding: 0.45rem 0.85rem;
}

.button-danger:hover {
  color: var(--white);
  background: var(--sale-red);
  border-color: var(--sale-red);
}

.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
}

.button:disabled,
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.section {
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.section-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.section-heading h2,
.panel h2 {
  margin: 0;
  font-size: clamp(1.65rem, 4vw, 2.5rem);
  line-height: 1.2;
}

.section-heading p {
  max-width: 42rem;
  margin: 0;
  color: var(--iron-700);
}

.feature-grid,
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.feature-card,
.product-card,
.panel {
  min-width: 0;
  background: var(--white);
  border: 1px solid var(--iron-150);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgb(32 36 42 / 0.07);
}

.feature-card {
  padding: 1.4rem;
}

.feature-card strong {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 1.2rem;
}

.product-card {
  position: relative;
  overflow: hidden;
}

.product-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--iron-150);
}

.product-card-body {
  display: grid;
  gap: 0.85rem;
  padding: 1.15rem;
}

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

.product-meta {
  margin: 0;
  color: var(--iron-700);
  font-size: 0.93rem;
}

.price-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  align-items: baseline;
}

.price-sale {
  font-size: 1.35rem;
  font-weight: 900;
}

.price-original {
  color: var(--iron-500);
  text-decoration: line-through;
}

.sale-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.25rem 0.55rem;
  color: var(--white);
  background: var(--sale-red);
  border-radius: 0.35rem;
  font-weight: 900;
}

.page-hero {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
  color: var(--white);
  background: var(--iron-800);
}

.page-hero h1 {
  font-size: clamp(2rem, 7vw, 4rem);
}

.page-hero p {
  max-width: 48rem;
  color: var(--iron-150);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(12rem, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--white);
  border: 1px solid var(--iron-150);
  border-radius: var(--radius-md);
}

.field {
  display: grid;
  min-width: 0;
  gap: 0.35rem;
}

.field label,
.field > span,
legend {
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  background: var(--white);
  border: 2px solid var(--iron-300);
  border-radius: 0.55rem;
}

.field textarea {
  min-height: 9rem;
  resize: vertical;
}

.field small {
  color: var(--iron-700);
}

.required,
.field-error,
.status-error {
  color: var(--sale-red);
}

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

.field-full {
  grid-column: 1 / -1;
}

.panel {
  padding: clamp(1.15rem, 3vw, 2rem);
}

#checkout-submit {
  margin-top: 1.25rem;
}

.status-box {
  min-height: 1.75rem;
  margin-block: 1rem;
  padding: 0.75rem;
  color: var(--iron-950);
  background: var(--yellow-soft);
  border-left: 5px solid var(--yellow);
  border-radius: 0.35rem;
}

.status-box:empty {
  display: none;
}

.status-box.status-error {
  background: var(--white);
  border-color: var(--sale-red);
}

.empty-state {
  padding: 2rem;
  background: var(--white);
  border: 2px dashed var(--iron-300);
  border-radius: var(--radius-md);
  text-align: center;
}

.cart-layout,
.checkout-layout,
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(17rem, 0.75fr);
  gap: 1.5rem;
  align-items: start;
}

.cart-list {
  display: grid;
  gap: 1rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  background: var(--white);
  border: 1px solid var(--iron-150);
  border-radius: var(--radius-md);
}

.cart-item img {
  width: 8rem;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 0.5rem;
}

.cart-item h2 {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
}

.quantity-control {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.quantity-control button {
  width: 2.75rem;
  padding: 0.35rem;
  background: var(--white);
  border: 2px solid var(--iron-300);
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 900;
}

.quantity-control output {
  min-width: 2rem;
  text-align: center;
  font-weight: 900;
}

.summary-list,
.receipt-list {
  display: grid;
  gap: 0.65rem;
  margin: 1rem 0;
}

.summary-row,
.receipt-list > div {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  border-bottom: 1px solid var(--iron-150);
}

.summary-row-total {
  padding-top: 0.5rem;
  font-size: 1.2rem;
  font-weight: 900;
  border-top: 3px solid var(--iron-800);
}

.authority-note {
  padding: 0.8rem;
  background: var(--yellow-soft);
  border-radius: 0.5rem;
  font-size: 0.92rem;
}

.order-items {
  padding-left: 1.25rem;
}

.order-items li + li {
  margin-top: 0.4rem;
}

.receipt-list dt {
  color: var(--iron-700);
  font-weight: 700;
}

.receipt-list dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

.status-pill {
  display: inline-flex;
  padding: 0.25rem 0.65rem;
  color: var(--iron-950);
  background: var(--yellow);
  border-radius: 999px;
  font-weight: 900;
}

.contact-aside {
  color: var(--white);
  background: var(--iron-800);
}

.contact-aside a {
  color: var(--yellow);
}

.loading-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  min-height: 8rem;
  padding: 2rem;
  color: var(--iron-700);
  background: var(--white);
  border: 1px solid var(--iron-150);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgb(32 36 42 / 0.07);
  text-align: center;
}

.loading-spinner {
  flex: 0 0 auto;
  width: 1.35rem;
  height: 1.35rem;
  border: 0.22rem solid var(--iron-150);
  border-top-color: var(--yellow-deep);
  border-radius: 50%;
  animation: loading-spin 0.8s linear infinite;
}

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

.site-footer {
  padding-block: 2.5rem;
  color: var(--iron-150);
  background: var(--iron-950);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.6fr 1fr;
  gap: 2rem;
}

.footer-inner p {
  margin-block: 0.4rem 0;
}

.footer-inner nav {
  display: grid;
  align-content: start;
  gap: 0.45rem;
}

.footer-note {
  font-size: 0.9rem;
}

@media (max-width: 52rem) {
  .hero-grid,
  .cart-layout,
  .checkout-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

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

  .hero-card {
    transform: none;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer-note {
    grid-column: 1 / -1;
  }
}

@media (max-width: 38rem) {
  .container {
    width: min(100% - 1.25rem, var(--container));
  }

  .site-header {
    position: static;
  }

  .header-inner {
    justify-content: center;
  }

  .main-nav {
    order: 3;
    flex-basis: 100%;
    justify-content: flex-start;
  }

  .main-nav a {
    flex: 1 1 auto;
    padding-inline: 0.55rem;
    text-align: center;
  }

  .cart-shortcut {
    margin-left: auto;
  }

  .feature-grid,
  .product-grid,
  .form-grid,
  .toolbar,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .field-full,
  .footer-note {
    grid-column: auto;
  }

  .cart-item {
    grid-template-columns: 5.5rem minmax(0, 1fr);
  }

  .cart-item img {
    width: 5.5rem;
  }

  .cart-item-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    width: 100%;
  }

  .button-row .button {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .loading-spinner {
    animation: none;
  }
}
