html,
body,
#root {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

@supports not (overflow: clip) {
  html,
  body,
  #root {
    overflow-x: hidden;
  }
}

body {
  cursor: auto;
}

button,
a,
[role="button"] {
  cursor: pointer;
}

.snap-x,
.overflow-x-auto,
[class*="overflow-x-auto"] {
  max-width: 100vw;
  overscroll-behavior-x: contain;
}

.product-card {
  max-width: calc(100vw - 2rem);
}

@media (max-width: 767px) {
  body {
    min-width: 0;
  }

  .product-card {
    width: calc(100vw - 2rem) !important;
    min-width: calc(100vw - 2rem) !important;
  }

  .brutalist-shadow {
    box-shadow: 4px 4px 0 #000;
  }

  .brutalist-shadow:hover {
    transform: none;
    box-shadow: 4px 4px 0 #000;
  }

  h1.font-display,
  .font-display {
    letter-spacing: 0;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .product-card {
    width: min(70vw, 32rem) !important;
    min-width: min(70vw, 32rem) !important;
  }
}

@media (min-width: 1024px) {
  .product-card {
    width: min(25vw, 22rem) !important;
    min-width: min(25vw, 22rem) !important;
  }
}

main > .w-full[class*="px-4"],
main > section.w-full[class*="px-4"] {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

main > .w-full[class*="px-4"] > .max-w-7xl,
main > section.w-full[class*="px-4"] > .max-w-7xl {
  width: 100% !important;
  max-width: none !important;
}

.checkout-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  background: rgb(0 0 0 / 0.42);
}

.checkout-overlay.is-open {
  display: block;
}

.checkout-panel {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(100vw, 520px);
  background: #fff;
  border-left: 4px solid #000;
  box-shadow: -8px 0 0 #000;
  display: flex;
  flex-direction: column;
  font-family: Plus Jakarta Sans, ui-sans-serif, system-ui, sans-serif;
}

.checkout-head,
.checkout-foot {
  flex: none;
  border-bottom: 4px solid #000;
  padding: 16px;
  background: #facc15;
}

.checkout-foot {
  border-top: 4px solid #000;
  border-bottom: 0;
  background: #fff;
}

.checkout-body {
  flex: 1;
  overflow: auto;
  padding: 16px;
}

.checkout-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  border: 3px solid #000;
  padding: 10px;
  margin-bottom: 12px;
  background: #fff;
  box-shadow: 4px 4px 0 #000;
}

.checkout-row img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border: 2px solid #000;
  background: #fff;
}

.checkout-title,
.checkout-step-title {
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.05;
}

.checkout-caption {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  color: #6b7280;
}

.checkout-actions,
.checkout-grid {
  display: grid;
  gap: 10px;
}

.checkout-all-grid {
  display: grid;
  gap: 16px;
}

.checkout-section {
  border: 4px solid #000;
  background: #fff;
  padding: 14px;
  box-shadow: 4px 4px 0 #000;
}

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

.checkout-button,
.checkout-input,
.checkout-select,
.checkout-textarea {
  width: 100%;
  border: 3px solid #000;
  background: #fff;
  color: #000;
  font: inherit;
  font-weight: 800;
}

.checkout-button {
  min-height: 44px;
  padding: 10px 12px;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 #000;
}

.checkout-button.primary {
  background: #000;
  color: #fff;
}

.checkout-button.active {
  background: #ef4444;
  color: #fff;
}

.checkout-input,
.checkout-select,
.checkout-textarea {
  min-height: 44px;
  padding: 10px;
  font-size: 14px;
}

.checkout-textarea {
  min-height: 82px;
  resize: vertical;
}

.checkout-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 2px solid #000;
  padding: 8px 0;
  font-weight: 800;
}

.checkout-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 12px;
}

.checkout-step {
  border: 2px solid #000;
  padding: 7px 4px;
  text-align: center;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  background: #fff;
}

.checkout-step.active {
  background: #000;
  color: #fff;
}

.checkout-badge {
  position: fixed;
  top: 4px;
  right: 4px;
  z-index: 100000;
  min-width: 22px;
  height: 22px;
  display: none;
  place-items: center;
  border: 2px solid #000;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.checkout-badge.has-items {
  display: grid;
}

.checkout-toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(82px + env(safe-area-inset-bottom));
  z-index: 100000;
  display: none;
  border: 3px solid #000;
  background: #2dd4bf;
  padding: 12px;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 #000;
}

.checkout-toast.is-open {
  display: block;
}

@media (min-width: 768px) {
  .checkout-overlay {
    padding: 20px;
  }

  .checkout-panel {
    inset: 20px;
    width: auto;
    max-width: 1180px;
    margin: 0 auto;
    border: 4px solid #000;
    box-shadow: 8px 8px 0 #000;
  }

  .checkout-body {
    padding: 20px;
  }

  .checkout-all-grid {
    grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr) minmax(280px, 1fr);
    align-items: start;
  }

  .checkout-section.summary {
    position: sticky;
    top: 0;
  }

  .checkout-toast {
    left: auto;
    right: 24px;
    width: 360px;
    bottom: 24px;
  }
}
