/* WooCommerce-like checkout layout — desktop two-column, mobile stacked */

.hidden {
  display: none !important;
}

  --om-line: #e1e4e8;
  --om-radius-sm: 10px;
  --om-bg-alt: #fff;
  --om-ink: #111827;
  --om-dark: #111;
  --woo-primary: #111827;
  --woo-accent: #334155;
}

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

body.ss-checkout {
  margin: 0;
  background: #f7f7f8;
  color: #111827;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.ss-checkout-header {
  background: #fff;
  border-bottom: 1px solid var(--om-line);
  padding: 16px 20px;
}

.ss-checkout-header__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ss-checkout-header__brand {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--om-ink);
  text-decoration: none;
}

.ss-checkout-header__secure {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #53616f;
  font-size: 0.8125rem;
}

.ss-checkout-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 56px;
}

.woocommerce-checkout {
  width: 100%;
}

.woocommerce-notices-wrapper {
  margin-bottom: 16px;
}

.woocommerce-error,
.woocommerce-message,
.woocommerce-info {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 8px;
  list-style: none;
}

.woocommerce-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.woocommerce-message {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
}

form.checkout.woocommerce-checkout {
  display: block;
}

.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 32px;
  align-items: start;
}

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

.checkout-grid__sidebar {
  position: sticky;
  top: 20px;
}

.checkout-section {
  background: #fff;
  border: 1px solid var(--om-line);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.checkout-section h3 {
  margin: 0 0 16px;
  font-size: 1.125rem;
  font-weight: 600;
}

.woocommerce-billing-fields__field-wrapper,
.woocommerce-shipping-fields__field-wrapper {
  display: grid;
  gap: 14px;
}

.form-row {
  margin: 0;
}

.form-row label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
}

.form-row .required {
  color: #dc2626;
  text-decoration: none;
}

.form-row input.input-text,
.form-row select,
.form-row textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font-size: 16px;
  line-height: 1.4;
}

.form-row input.input-text:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: #111827;
  box-shadow: 0 0 0 1px #111827;
}

.form-row-first,
.form-row-last {
  width: 100%;
}

.form-row-wide {
  grid-column: 1 / -1;
}

.checkout-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

#order_review_heading {
  margin: 0 0 12px;
  font-size: 1.125rem;
  font-weight: 600;
}

.shop_table.woocommerce-checkout-review-order-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.shop_table th,
.shop_table td {
  padding: 10px 0;
  border-bottom: 1px solid #eef2f7;
  vertical-align: top;
}

.shop_table .product-name {
  padding-right: 12px;
}

.shop_table .product-total {
  text-align: right;
  white-space: nowrap;
}

.shop_table tfoot th {
  font-weight: 500;
  color: #64748b;
}

.shop_table tfoot td {
  text-align: right;
  font-weight: 600;
}

.order-total th,
.order-total td {
  font-size: 1.0625rem;
  border-bottom: none;
  padding-top: 14px;
}

#payment {
  margin-top: 16px;
}

.wc_payment_methods {
  list-style: none;
  margin: 0;
  padding: 0;
}

#place_order {
  width: 100%;
  min-height: 52px;
  margin-top: 16px;
  padding: 14px 18px;
  border: 0;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

#place_order:hover {
  background: #000;
}

#place_order:disabled,
#place_order.loading {
  opacity: 0.7;
  cursor: wait;
}

.checkout-empty {
  text-align: center;
  padding: 64px 20px;
  color: #64748b;
}

.checkout-empty h2 {
  margin: 0 0 8px;
  color: #111827;
}

/* Mobile: single column, sidebar moves above payment or stacks */
@media (max-width: 900px) {
  .checkout-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .checkout-grid__sidebar {
    position: static;
  }

  .ss-checkout-main {
    padding: 16px 12px 40px;
  }

  .checkout-section {
    padding: 16px;
    border-radius: 10px;
  }
}

@media (max-width: 640px) {
  .checkout-two-col {
    grid-template-columns: 1fr;
  }

  .ss-checkout-header__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-row input.input-text,
  .form-row select {
    font-size: 16px; /* prevent iOS zoom */
  }

  #place_order {
    min-height: 48px;
    font-size: 0.9375rem;
  }
}

@media (max-width: 380px) {
  .shop_table {
    font-size: 0.875rem;
  }
}
