.checkout-page {
  font-family: "Inter", sans-serif;
  background: #f6f8fc;
  margin: 0;
  color: #0f172a;
}

/* REMOVE ALL OUTER SPACING */
.checkout-main {
  margin: 0 !important;
  padding: 0 !important;
}

.checkout-container {
  width: min(1100px, calc(100% - 24px));
  margin: auto;
  padding: 40px 0 0 !important; /* 🔥 no bottom padding */
}

/* CARD */
.checkout-card {
  background: white;
  border-radius: 24px;
  padding: 32px 32px 14px !important; /* 🔥 reduced bottom padding */
  border: 1px solid #dbe3ee;
  box-shadow: 0 12px 32px rgba(15,23,42,0.05);
  margin-bottom: 0 !important;
}

/* REMOVE LAST ELEMENT GAP */
.checkout-card > *:last-child {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* TITLE */
.checkout-title {
  font-size: 42px;
  font-weight: 900;
  margin-bottom: 24px;
}

/* SECTIONS */
.checkout-section {
  margin-bottom: 26px;
}

/* 🔥 LAST SECTION (PLACE ORDER) FIX */
.checkout-submit-section {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.checkout-section-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 14px;
}

/* INPUTS */
.checkout-input {
  width: 100%;
  height: 52px;
  border-radius: 12px;
  border: 1px solid #dbe3ee;
  padding: 0 14px;
  font-size: 15px;
}

/* GRID */
.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* BUTTON */
.checkout-button {
  width: 100%;
  height: 58px;
  border-radius: 999px;
  background: #3a8dde;
  color: white;
  font-size: 18px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  margin-bottom: 6px !important; /* 🔥 tight spacing under button */
}

.checkout-button:hover {
  background: #2e79c3;
}

/* HEADER */
.checkout-header {
  background: white;
  border-bottom: 1px solid #dbe3ee;
  padding: 16px 20px;
}

.checkout-logo img {
  height: 48px;
}

.checkout-header-inner {
  width: min(1100px, calc(100% - 24px));
  margin: 0 auto;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* CART ICON */
.checkout-cart-link {
  text-decoration: none;
}

.checkout-cart-icon-wrap {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #dbe3ee;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.checkout-cart-icon-wrap i {
  font-size: 21px;
}

.checkout-cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #4fa3d9;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

/* SUMMARY */
.checkout-summary-card {
  background: #f9fbff;
  border: 1px solid #dbe3ee;
  border-radius: 18px;
  padding: 20px;
}

.checkout-items {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  margin-bottom: 18px;
}

.checkout-summary-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  align-items: center;
  background: #ffffff;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  padding: 12px;
}

.checkout-summary-item-image {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: #f5f8fc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.checkout-summary-item-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.checkout-summary-item-info h3 {
  margin: 0 0 4px;
  font-size: 15px;
  line-height: 1.2;
  color: #0f172a;
  font-weight: 800;
}

.checkout-summary-item-variant,
.checkout-summary-item-qty {
  margin: 0;
  font-size: 13px;
  color: #64748b;
}

.checkout-summary-item-price {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

/* TOTAL */
.checkout-total {
  display: grid;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid #dbe3ee;
}

.checkout-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #475569;
  font-size: 15px;
}

.checkout-total-row strong {
  color: #0f172a;
}

.checkout-total-row.total {
  font-size: 18px;
  font-weight: 800;
  padding-top: 6px;
}

.checkout-empty-summary {
  background: #ffffff;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  padding: 16px;
  color: #64748b;
}

/* 🔥 FOOTER GAP KILL */
#site-footer {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* MOBILE */
@media (max-width: 768px) {
  .checkout-grid {
    grid-template-columns: 1fr;
  }

  .checkout-title {
    font-size: 32px;
  }
}

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

  .checkout-summary-item-price {
    grid-column: 2;
  }

  .checkout-container {
    padding: 20px 0 0 !important; /* 🔥 tighter mobile */
  }

  .checkout-card {
    padding: 24px 20px 10px !important;
  }

  .checkout-button {
    margin-bottom: 4px !important;
  }
}

.shipping-box {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid #dbe4ef;
  border-radius: 28px;
  background: linear-gradient(180deg, #f8fbff 0%, #f5f8fc 100%);
}

.shipping-rates {
  display: none;
  gap: 14px;
}

.shipping-rates.has-rates {
  display: grid;
}

.shipping-address-status:empty,
.shipping-status-text:empty {
  display: none;
}
