.checkout-content {
  padding: clamp(16px, 3vw, 32px);
  padding-bottom: clamp(48px, 5vw, 72px);
}

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: clamp(24px, 4vw, 40px);
  background: var(--panel-bg);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: clamp(22px, 3vw, 40px);
  box-shadow: var(--panel-shadow);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
}

.checkout-column {
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 2vw, 28px);
  padding: clamp(4px, 1vw, 8px);
}

.checkout-column--main {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.basket-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.basket-header h1 {
  margin: 0;
}

.basket-empty {
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  padding: 8px 18px;
  background: transparent;
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.basket-empty:disabled,
.basket-empty[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}

.basket-empty:not(:disabled):hover,
.basket-empty:not(:disabled):focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.basket-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.basket-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  background: rgba(3, 6, 14, 0.55);
}

.basket-item__media {
  width: 96px;
  height: 96px;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--glass-border);
}

.basket-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.basket-item__details {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.basket-item__title {
  font-weight: 600;
  margin: 0 0 6px;
}

.basket-item__meta {
  margin: 0;
  color: rgba(231, 236, 243, 0.75);
  font-size: 0.95rem;
}

.basket-item__meta-list {
  margin: 0;
  padding-left: 18px;
  color: rgba(231, 236, 243, 0.75);
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.basket-item__meta-list strong {
  font-weight: 600;
}

.basket-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.basket-item__quantity {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  overflow: hidden;
}

.basket-item__quantity input {
  width: 52px;
  text-align: center;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1rem;
}

.basket-item__qty-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 1.2rem;
  cursor: pointer;
}

.basket-item__qty-btn:hover,
.basket-item__qty-btn:focus-visible {
  color: var(--accent);
}

.basket-item__remove {
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--text-primary);
  padding: 6px 16px;
  cursor: pointer;
}

.basket-item__remove:hover,
.basket-item__remove:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.basket-item__pricing {
  text-align: right;
}

.basket-item__price {
  font-weight: 700;
  white-space: nowrap;
  font-size: 1.1rem;
}

.basket-item__price-note {
  color: rgba(231, 236, 243, 0.75);
  font-size: 0.85rem;
}

.basket-item--empty {
  justify-content: center;
  grid-template-columns: 1fr;
  text-align: center;
  font-weight: 600;
  color: rgba(231, 236, 243, 0.85);
}

@media (max-width: 720px) {
  .basket-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .basket-item__media {
    width: 100%;
    height: 200px;
  }

  .basket-item__pricing {
    text-align: left;
  }
}

.buyer-info h2,
.summary-panel h2,
.payment-panel h2 {
  margin-top: 0;
}

.buyer-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  background: rgba(5, 8, 16, 0.4);
}

.form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

label {
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

input,
select {
  background: rgba(3, 6, 14, 0.8);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text-primary);
}

.input-error {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

input::placeholder,
select::placeholder {
  color: rgba(231, 236, 243, 0.65);
}

.summary-panel,
.payment-panel {
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 24px;
  background: var(--panel-bg);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.summary-panel {
  margin-bottom: 20px;
}

.shipping-options select {
  width: 100%;
}

.totals {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.totals div {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.totals__grand {
  border-top: 1px solid var(--glass-border);
  padding-top: 12px;
  font-size: 1.1rem;
  font-weight: 600;
}

.payment-note {
  margin: 0;
  color: rgba(231, 236, 243, 0.75);
  font-size: 0.95rem;
}

.checkout-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkout-status {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(231, 236, 243, 0.85);
}

.checkout-status[data-state="error"] {
  color: #ffb4b4;
}

.checkout-status[data-state="success"] {
  color: #9ee1b2;
}

.checkout-status[hidden] {
  display: none;
}

.place-order {
  border-radius: 14px;
  padding: 14px;
  border: none;
  cursor: pointer;
  background: var(--accent);
  color: #050a16;
  font-weight: 700;
  font-size: 1rem;
}

@media (max-width: 1220px) {
  .checkout-layout {
    grid-template-columns: 1fr;
  }
}
body.checkout-page .checkout-layout.glass-panel {
  background: var(--panel-bg);
}

.checkout-content { background: transparent; }

.postcode-status {
  margin: 0 0 6px;
  font-size: 0.95rem;
  color: rgba(231, 236, 243, 0.75);
}

.postcode-status[data-tone="warning"] {
  color: #ffb4b4;
}

.postcode-status[data-tone="success"] {
  color: #9ee1b2;
}

.postcode-status[hidden] {
  display: none;
}

/* --- Ideal Postcodes button fix --- */
#context button {
  background: var(--accent) !important;
  color: #050a16 !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 10px 16px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  margin-left: 8px !important;
  height: 42px !important;
}

/* Align it properly with the postcode input */
#context {
  display: flex;
  gap: 8px;
  margin: 4px 0 10px;
}

@media (max-width: 640px) {
  #context {
    flex-direction: column;
    align-items: stretch;
  }

  #context button {
    margin-left: 0 !important;
    width: 100% !important;
  }
}


