/* ==========================================================================
   Mini Kosmos — Cart page CSS
   Sections: Header · Layout · Items · Summary · Suggestions
   ========================================================================== */


/* ==========================================================================
   1. Page header
   ========================================================================== */

.mk-cart-header-section { padding: 10px 0 20px; }

.mk-cart-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
}

.mk-cart-h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 5vw, 64px);
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* Checkout steps */
.mk-checkout-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-soft);
}

.mk-step {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.mk-step-sep {
  color: var(--muted);
  margin: 0 4px;
}

.mk-step-n {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.mk-step--active .mk-step-n {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.mk-step--active .mk-step-l {
  font-weight: 600;
  color: var(--ink);
}


/* ==========================================================================
   2. Body layout
   ========================================================================== */

.mk-cart-body-section { padding-bottom: 64px; }

.mk-cart-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 28px;
  align-items: start;
}


/* ==========================================================================
   3. Empty state
   ========================================================================== */

.mk-cart-empty {
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: 24px;
  padding: 60px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mk-cart-empty-icon { font-size: 56px; line-height: 1; }

.mk-cart-empty-h {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;
  margin-top: 14px;
  color: var(--ink);
}

.mk-cart-empty-sub {
  color: var(--ink-soft);
  margin-top: 8px;
  font-size: 16px;
}


/* ==========================================================================
   4. Free shipping meter
   ========================================================================== */

.mk-ship-meter {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 18px;
  margin-bottom: 16px;
}

.mk-ship-meter-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 14px;
  flex-wrap: wrap;
  gap: 6px;
}

.mk-ship-meter-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mk-ship-meter-text svg { color: var(--coral); }

.mk-ship-meter-progress-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.mk-ship-meter-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--cream-deep);
  overflow: hidden;
}

.mk-ship-meter-fill {
  height: 100%;
  background: var(--coral);
  border-radius: 999px;
  transition: width .4s ease;
}


/* ==========================================================================
   5. Cart items
   ========================================================================== */

.mk-cart-form { display: block; }

.mk-cart-items-list {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
}

.mk-cart-item {
  display: grid;
  grid-template-columns: 100px 1fr auto auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.mk-cart-item:last-child { border-bottom: none; }

.mk-cart-item-img-wrap {
  width: 100px;
  height: 100px;
  border-radius: 18px;
  background: var(--card-tint, #FFE9B8);
  overflow: hidden;
  display: block;
  flex-shrink: 0;
}

.mk-cart-item-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mk-cart-item-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.mk-cart-item-name {
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mk-cart-item-name:hover { color: var(--coral); }

.mk-cart-item-meta {
  font-size: 13px;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.mk-cart-item-remove {
  margin-top: 6px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--muted);
  text-decoration: underline;
  font-size: 13px;
  cursor: pointer;
  justify-self: start;
  font-family: inherit;
  transition: color .15s;
  display: inline;
}

.mk-cart-item-remove:hover { color: var(--coral); }

/* Quantity stepper in cart */
.mk-cart-qty-wrap {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--cream);
  border-radius: 999px;
  padding: 4px;
  flex-shrink: 0;
}

.mk-cart-qty-btn {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: none;
  background: var(--paper);
  display: grid;
  place-items: center;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
}

.mk-cart-qty-btn:hover { background: var(--line); }

.mk-cart-qty-input {
  width: 30px;
  text-align: center;
  border: none;
  background: transparent;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}

.mk-cart-qty-input::-webkit-outer-spin-button,
.mk-cart-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Line total */
.mk-cart-item-total {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  min-width: 80px;
  color: var(--ink);
}

/* Trust strip */
.mk-cart-trust-strip {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.mk-cart-trust-tile {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.3;
}

.mk-cart-trust-tile svg { flex-shrink: 0; color: var(--coral); }
.mk-cart-trust-tile:nth-child(2) svg { color: var(--coral); }
.mk-cart-trust-tile:nth-child(3) svg { color: var(--sun); }


/* ==========================================================================
   6. Order summary sidebar
   ========================================================================== */

.mk-cart-summary {
  position: sticky;
  top: 90px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
}

.mk-cart-summary-h {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 16px;
}

.mk-cart-summary-rows { display: grid; gap: 10px; font-size: 15px; }

.mk-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-soft);
}

.mk-summary-row span:last-child {
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.mk-summary-free { color: var(--coral) !important; }

.mk-summary-divider {
  border: none;
  border-top: 1px dashed var(--line);
  margin: 16px 0;
}

.mk-summary-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 18px;
}

.mk-summary-total-label {
  font-weight: 600;
  font-size: 17px;
  color: var(--ink);
}

.mk-summary-total-amount {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 3vw, 36px);
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* Coupon form (WooCommerce outputs its own HTML — style it) */
.mk-cart-summary .woocommerce-form-coupon-toggle,
.mk-cart-summary .coupon { margin-bottom: 14px; }

/* Checkout button */
.mk-cart-checkout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 56px;
  border: none;
  border-radius: 14px;
  background: var(--coral);
  color: var(--paper);
  font-family: inherit;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
  transition: opacity .15s, transform .15s;
  margin-bottom: 12px;
}

.mk-cart-checkout-btn:hover { opacity: .9; transform: translateY(-1px); color: var(--paper); }
.mk-cart-checkout-btn:active { transform: translateY(0); }

.mk-cart-checkout-btn--disabled {
  opacity: .4;
  cursor: not-allowed;
  pointer-events: none;
}

.mk-cart-payment-note {
  font-size: 12px;
  color: var(--ink-soft);
  text-align: center;
  margin: 0;
  line-height: 1.5;
}


/* ==========================================================================
   7. Suggestions
   ========================================================================== */

.mk-cart-suggestions { padding-bottom: 80px; }

.mk-cart-suggestions-h {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 18px;
}


/* ==========================================================================
   8. Responsive
   ========================================================================== */

@media (max-width: 960px) {
  .mk-cart-layout { grid-template-columns: 1fr; }
  .mk-cart-summary { position: static; order: -1; }
  .mk-cart-trust-strip { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .mk-cart-item { grid-template-columns: 80px 1fr; grid-template-rows: auto auto; }
  .mk-cart-item-img-wrap { width: 80px; height: 80px; }
  .mk-cart-item-total { grid-column: 2; justify-self: start; font-size: 18px; }
  .mk-cart-qty-wrap { grid-column: 2; }
  .mk-cart-trust-strip { grid-template-columns: 1fr; }
  .mk-checkout-steps { display: none; }
}

/* ==========================================================================
   Terms & Conditions (checkout/terms.php override)
   ========================================================================== */

.mk-terms-wrapper { margin-top: 16px; }

.mk-terms-row {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px !important;
  margin: 0 !important;
}

.mk-terms-row label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  line-height: 1.5;
}

.mk-terms-row input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--coral);
  width: 16px;
  height: 16px;
}

.mk-terms-row .required { color: var(--coral); }

/* WooCommerce privacy policy text (below Place Order) */
.woocommerce-privacy-policy-text {
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.6;
}

.woocommerce-privacy-policy-text a,
.mk-terms-wrapper a.mk-link {
  color: var(--coral);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.woocommerce-privacy-policy-text a:hover,
.mk-terms-wrapper a.mk-link:hover { color: var(--coral-deep); }
