.checkout-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  margin-block: 2rem;
}

.summary {
  background: var(--stryx-panel);
  border: 1px solid #444;
  padding: 1.5rem;
  height: fit-content;
}

.cart-list {
  list-style: none;
  padding: 0;
}

.cart-item {
  display: grid;
  grid-template-columns: 90px 1fr 100px auto;
  gap: 1.5rem;
  align-items: center;
  border-bottom: 1px solid #444;
  padding: 1.5rem 0;
}

.cart-item img {
  width: 90px;
  height: 90px;
  object-fit: cover;
}

.total {
  font-size: 1.5rem;
  color: #f3d430;
  font-weight: 700;
}

@media (max-width: 850px) {
  .checkout-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .cart-item {
    grid-template-columns: 65px 1fr 80px;
    gap: 1rem;
  }

  .cart-item button {
    grid-column: 2/-1;
  }

  .cart-item img {
    width: 65px;
    height: 65px;
  }
}

.empty-cart > p {
  margin-block: 1rem 1.8rem;
}

.cart-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
}

.summary {
  display: grid;
  gap: 1.2rem;
}

.summary .button,
.summary > button {
  width: 100%;
  text-align: center;
}

.summary p {
  margin: 0;
}

.subtotal-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.minimum-status {
  background: #302c16;
  color: #f6e997;
  padding: 1rem;
  font-size: 0.85rem;
  border: 1px solid #5d5426;
  margin-block: 1.2rem;
}

.minimum-status.ready {
  background: #173426;
  border-color: #336a4e;
  color: #b7edcc;
}

.summary button:disabled,
.drawer-footer button:disabled {
  opacity: 1;
  background: #494627;
  color: #c5bd87;
  border-color: #5a542e;
}

.cart-item {
  grid-template-columns: 90px 1fr auto;
  align-items: start;
}

.cart-item h3 {
  font-size: 1rem;
}

.cart-item p {
  margin-top: 0.5rem;
}

.quantity-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  width: fit-content;
  border: 1px solid var(--stryx-field-line);
  padding: 0;
  margin-top: 1rem;
  min-width: 0;
}

.quantity-stepper button {
  border: 0;
  padding: 0.5rem 0.8rem;
  min-width: 44px;
  min-height: 44px;
}

.quantity-stepper input {
  width: 54px;
  min-width: 0;
  text-align: center;
  border: 0;
  background: transparent;
  padding: 0.4rem;
  appearance: textfield;
}

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

.remove-item {
  border: 0;
  padding: 0.6rem;
  background: transparent;
}

.remove-item:hover {
  background: #333;
}

.added-dialog,
.cart-drawer {
  color: var(--stryx-text);
  background: var(--stryx-section);
  border: 1px solid var(--stryx-line);
  padding: 0;
  max-height: 100dvh;
}

.added-dialog::backdrop,
.cart-drawer::backdrop {
  background: #0009;
}

.added-dialog {
  width: min(560px, calc(100% - 2rem));
  margin: auto;
  padding: 1.6rem;
  max-height: calc(100dvh - 2rem);
  overflow: auto;
}

.added-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #193c2a;
  border: 1px solid #407756;
  color: #c0f5d4;
  padding: 0.8rem 1rem;
  margin-bottom: 1.6rem;
}

.added-heading h2 {
  font-size: 1.1rem;
  margin: 0;
}

.added-heading button {
  border: 0;
  padding: 0 0.6rem;
  font-size: 1.6rem;
  min-height: 36px;
}

.added-dialog > article {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1.3rem;
}

.added-dialog > article img {
  width: 120px;
  height: 140px;
  object-fit: cover;
}

.added-dialog article h3 {
  font-size: 1.15rem;
}

.added-dialog article p {
  margin-block: 0.6rem;
}

.added-dialog .actions {
  margin-top: 1.8rem;
}

.added-dialog .actions > * {
  flex: 1;
  text-align: center;
}

.cart-drawer {
  inset: 0 0 0 auto;
  margin: 0;
  width: min(560px, 100%);
  height: 100dvh;
  max-width: 100%;
  border-right: 0;
}

.cart-drawer[open] {
  display: flex;
  flex-direction: column;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid #444;
  flex-shrink: 0;
}

.drawer-header h2 {
  font-size: 1.25rem;
  margin: 0;
}

.drawer-header button {
  border: 0;
  font-size: 1.8rem;
  padding: 0 0.6rem;
}

.drawer-items {
  overflow: auto;
  flex: 1;
  padding: 0 1.5rem;
  min-height: 0;
}

.drawer-items > h3 {
  margin-top: 2rem;
}

.drawer-item {
  display: grid;
  grid-template-columns: 95px 1fr 40px;
  gap: 1rem;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--stryx-line);
  align-items: start;
}

.drawer-item > img {
  width: 95px;
  height: 115px;
  object-fit: cover;
}

.drawer-item h3 {
  font-size: 1rem;
  line-height: 1.3;
}

.drawer-item p {
  margin-top: 0.5rem;
}

.drawer-footer {
  padding: 1.2rem 1.5rem 1.5rem;
  border-top: 1px solid var(--stryx-line);
  background: var(--stryx-panel);
  flex-shrink: 0;
}

.drawer-footer > .subtotal-row {
  font-size: 1.2rem;
}

.drawer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.drawer-actions button {
  border-radius: 30px;
}

.cart-page-link {
  display: block;
  text-align: center;
  text-decoration: underline;
  margin-top: 1rem;
}

.checkout-shell {
  padding-block: 2.5rem 4rem;
}

.checkout-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.8rem;
}

.checkout-title h1 {
  font-size: 2.3rem;
  margin: 0;
}

.checkout-title a {
  text-decoration: underline;
  font-size: 0.85rem;
}

.checkout-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  list-style: none;
  padding: 0;
  margin: 0 0 1.3rem;
}

.checkout-steps li {
  padding: 1rem 0.5rem;
  border-bottom: 4px solid #444;
  color: #aaa;
  display: flex;
  gap: 0.6rem;
  justify-content: center;
}

.checkout-steps .current {
  color: #f3d430;
  border-color: #f3d430;
  font-weight: 700;
}

.checkout-steps .complete {
  color: #b7edcc;
  border-color: #729c76;
}

.preview-note {
  font-size: 0.75rem;
  color: #bbb;
  margin-bottom: 1.5rem;
}

.checkout-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
  align-items: start;
}

.checkout-bag,
.checkout-panels {
  display: grid;
  gap: 1.4rem;
}

.checkout-card {
  background: var(--stryx-panel);
  border: 1px solid var(--stryx-line);
  border-radius: 12px;
  padding: 1.5rem;
  display: grid;
  gap: 1.15rem;
}

.checkout-card h2 {
  font-size: 1.2rem;
  margin: 0;
}

.checkout-card p {
  margin: 0;
}

.checkout-card .cart-item {
  padding-block: 1rem;
}

.checkout-card .cart-item img {
  height: 90px;
}

.checkout-card-heading,
.completed > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.checkout-card-heading a,
.completed button {
  font-size: 0.85rem;
  text-decoration: underline;
}

.completed button {
  border: 0;
  padding: 0.3rem;
  min-height: 32px;
}

.completed h2 {
  color: #b7edcc;
}

.checkout-card.locked {
  background: var(--stryx-raised);
  color: #aaa;
  border-color: #333;
  gap: 0.3rem;
}

.checkout-card.locked p {
  font-size: 0.8rem;
}

.delivery-choice {
  padding: 1rem;
  border: 1px solid #756c27;
  background: #302d1a;
  font-size: 0.85rem;
}

.payment-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  border: 0;
  padding: 0;
  min-width: 0;
}

.payment-methods label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0.6rem;
  border: 1px solid var(--stryx-line);
  font-size: 0.8rem;
}

.payment-methods input {
  width: 18px;
  min-height: 18px;
  accent-color: #f3d430;
}

.checkout-help {
  display: block;
  text-align: center;
  text-decoration: underline;
  margin-top: 3rem;
}

@media (max-width: 850px) {
  .cart-layout,
  .checkout-columns {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .checkout-bag {
    order: 2;
  }

  .checkout-panels {
    order: 1;
  }

  .checkout-card .cart-item {
    grid-template-columns: 75px 1fr 40px;
  }

  .checkout-card .cart-item img {
    width: 75px;
    height: 90px;
  }

  .cart-item button {
    grid-column: auto;
  }
}

@media (max-width: 500px) {
  .added-dialog {
    padding: 1rem;
  }

  .added-dialog > article {
    grid-template-columns: 85px 1fr;
    gap: 0.8rem;
  }

  .added-dialog > article img {
    width: 85px;
    height: 110px;
  }

  .added-dialog article h3 {
    font-size: 1rem;
  }

  .added-dialog .actions {
    gap: 0.6rem;
  }

  .added-dialog .actions button {
    padding: 0.7rem 0.6rem;
    font-size: 0.8rem;
  }

  .drawer-header,
  .drawer-footer {
    padding: 1rem;
  }

  .drawer-items {
    padding-inline: 1rem;
  }

  .drawer-item {
    grid-template-columns: 70px 1fr 32px;
    gap: 0.7rem;
  }

  .drawer-item > img {
    width: 70px;
    height: 90px;
  }

  .drawer-item h3 {
    font-size: 0.9rem;
  }

  .drawer-item .remove-item {
    padding: 0.3rem;
    min-width: 32px;
  }

  .drawer-actions {
    gap: 0.6rem;
  }

  .drawer-actions button {
    padding: 0.7rem 0.6rem;
    font-size: 0.8rem;
  }

  .quantity-stepper button {
    min-width: 36px;
    padding: 0.4rem 0.5rem;
  }

  .quantity-stepper input {
    width: 42px;
  }

  .checkout-steps li {
    font-size: 0.75rem;
    gap: 0.3rem;
    padding-inline: 0;
  }

  .checkout-title h1 {
    font-size: 2rem;
  }

  .checkout-card {
    padding: 1.1rem;
  }

  .checkout-card .cart-item {
    grid-template-columns: 60px 1fr 30px;
    gap: 0.6rem;
  }

  .checkout-card .cart-item img {
    width: 60px;
    height: 75px;
  }

  .checkout-card .remove-item {
    padding: 0.2rem;
  }

  .payment-methods {
    grid-template-columns: 1fr;
  }

  .payment-methods label {
    font-size: 0.9rem;
  }

  .cart-item {
    grid-template-columns: 65px 1fr 35px;
    gap: 0.7rem;
  }

  .cart-layout {
    gap: 2rem;
  }

  .summary {
    padding: 1.2rem;
  }
}

.checkout-card > .button,
.checkout-card > button {
  margin-top: 0.8rem;
}

.checkout-card .button + button {
  margin-top: 0.6rem;
}

.cart-item .quantity-stepper {
  margin-bottom: 0.3rem;
}

.fulfilment-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.fulfilment-options legend {
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.fulfilment-options label {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border: 1px solid var(--stryx-line);
  padding: 1rem;
  cursor: pointer;
}

.fulfilment-options label:has(input:checked) {
  background: #302d1a;
  border-color: #f3d430;
}

.fulfilment-options input {
  width: 18px;
  accent-color: #f3d430;
}

.address-fields {
  display: grid;
  gap: 1.1rem;
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.address-fields select {
  min-width: 0;
  max-width: 100%;
}

.pickup-information {
  background: #23271e;
  border: 1px solid #4b6042;
  padding: 1.2rem;
  display: grid;
  gap: 0.9rem;
}

.pickup-information h3 {
  font-size: 1rem;
}

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

.payment-methods label {
  min-height: 62px;
  line-height: 1.4;
}

.payment-methods label:has(input:checked) {
  background: #302d1a;
  border-color: #f3d430;
}

.checkout-steps li span {
  line-height: 1.4;
}

@media (max-width: 500px) {
  .payment-methods {
    grid-template-columns: 1fr;
  }

  .fulfilment-options label {
    font-size: 0.9rem;
    padding: 0.8rem;
  }

  .checkout-steps li {
    font-size: 0.67rem;
  }
}

.checkout-bag {
  min-width: 0;
}

.address-fields input[list] {
  padding-right: 1rem;
}

.checkout-columns > section {
  min-width: 0;
}

@media (max-width: 850px) {
  .checkout-bag {
    order: 0;
  }

  .checkout-panels {
    order: 1;
  }
}

.checkout-card form {
  width: 100%;
}

.checkout-card label:not(.privacy-consent) {
  margin-bottom: -0.5rem;
}

.cart-quantity-form {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.cart-quantity-form > label {
  width: 100%;
  font-size: 0.8rem;
}

.cart-quantity-form .quantity-stepper {
  margin: 0;
}

.cart-quantity-form > button {
  padding: 0.4rem 0.65rem;
  min-height: 44px;
}

.cart-item > form,
.drawer-item > form {
  display: block;
}

.confirmation-page > article {
  max-width: 700px;
  margin-top: 2rem;
}

.checkout-steps a {
  text-decoration: underline;
}

.drawer-actions a {
  border-radius: 30px;
  text-align: center;
}

.added-dialog article p {
  font-size: 0.85rem;
}

.minimum-status.ready,
.added-heading {
  color: #c0f5d4;
}

@media (max-width: 850px) {
  .checkout-bag {
    order: 0;
  }

  .checkout-panels {
    order: 1;
  }

  .cart-item,
  .drawer-item {
    grid-template-columns: 65px minmax(0, 1fr) 35px;
  }

  .cart-item button {
    grid-column: auto;
  }
}

@media (max-width: 500px) {
  .cart-quantity-form {
    gap: 0.5rem;
  }

  .cart-quantity-form .quantity-stepper button {
    min-width: 34px;
  }

  .cart-quantity-form .quantity-stepper input {
    width: 40px;
  }

  .drawer-header h2 {
    font-size: 1.1rem;
  }
}

.cart-status {
  position: fixed;
  z-index: 50;
  inset: auto 1rem 1rem auto;
  max-width: min(26rem, calc(100vw - 2rem));
  margin: 0;
  padding: 0.8rem 1rem;
  background: var(--stryx-panel);
  color: var(--stryx-text);
  border: 1px solid var(--stryx-line);
  box-shadow: 0 4px 20px #0004;
  pointer-events: none;
}

.cart-status:empty {
  padding: 0;
  border: 0;
  box-shadow: none;
}

[data-checkout-minimum],
[data-checkout-confirmation] {
  margin-block: var(--space-6);
}

[data-checkout-panel] > .cluster {
  margin-top: var(--space-4);
}

[data-cart-items] > article + article {
  margin-top: var(--space-4);
}
