/* ═══════════════════════════════════════════════════════
   SELENA RIMELLI — Cart & Checkout
   ═══════════════════════════════════════════════════════ */

/* ── COLOR DOT (inline swatch in cart rows) ──────────── */
.cart-color-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,.15);
  vertical-align: middle;
  margin-right: 4px;
  flex-shrink: 0;
}

/* ── SHARED LAYOUT ───────────────────────────────────── */
.co-page {
  padding-top: 72px;
  min-height: 100vh;
  background: var(--bg);
}
.co-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2.5rem;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 4rem;
  align-items: start;
}
.co-left  { min-width: 0; }
.co-right { position: sticky; top: 100px; }

/* ── PAGE TITLE ──────────────────────────────────────── */
.co-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 300;
  margin-bottom: .4rem;
}
.co-subtitle {
  font-size: .75rem;
  color: var(--muted);
  letter-spacing: .08em;
  margin-bottom: 3rem;
}

/* ── CHECKOUT STEPS ──────────────────────────────────── */
.co-steps {
  display: flex;
  align-items: center;
  margin-bottom: 3.5rem;
}
.co-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
}
.co-step-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  color: var(--muted);
  transition: all .3s;
}
.co-step.done .co-step-num  { background: var(--brand); border-color: var(--brand); color: white; }
.co-step.active .co-step-num { border-color: var(--brand); color: var(--brand); font-weight: 600; }
.co-step-label {
  font-size: .58rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.co-step.active .co-step-label,
.co-step.done  .co-step-label { color: var(--text); }
.co-step-line {
  flex: 1;
  height: 1px;
  background: var(--border);
  margin: 0 1rem;
  margin-bottom: 1.2rem;
}

/* ── SHIPPING PROGRESS ───────────────────────────────── */
.ship-progress {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1.2rem 1.5rem;
  margin-bottom: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: .8rem;
}
.ship-progress-text {
  font-size: .75rem;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ship-progress-text span { color: var(--brand); font-weight: 500; }
.ship-bar-wrap {
  height: 3px;
  background: var(--border);
  overflow: hidden;
}
.ship-bar-fill {
  height: 100%;
  background: var(--brand);
  transition: width .6s var(--ease);
}
.ship-free-msg {
  font-size: .72rem;
  color: #16A34A;
  display: flex;
  align-items: center;
  gap: .4rem;
}

/* ── CART ROWS ───────────────────────────────────────── */
.cart-rows { border-top: 1px solid var(--border); }

.cart-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 1.5rem;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.cart-row-img {
  aspect-ratio: 3/4;
  background: var(--bg-card);
  overflow: hidden;
  flex-shrink: 0;
  display: block;
  width: 100%;
  object-fit: cover;
}
.cart-row-body {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  min-width: 0;
}
.cart-row-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.cart-row-cat { margin-bottom: .3rem; }
.cart-row-name {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: .3rem;
}
.cart-row-size {
  font-size: .72rem;
  color: var(--muted);
  font-weight: 300;
}
.cart-row-remove {
  font-size: .6rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  flex-shrink: 0;
  padding: .3rem;
  transition: color .3s;
  border-bottom: 1px solid transparent;
}
.cart-row-remove:hover { color: #B85C38; border-color: #B85C38; }
.cart-row-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cart-row-price {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 400;
}

/* Qty control redesigned */
.qty-ctrl {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  width: fit-content;
}
.qty-btn {
  width: 34px; height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--muted);
  transition: color .2s, background .2s;
}
.qty-btn:hover { color: var(--brand); background: var(--bg-card); }
.qty-num {
  width: 38px;
  text-align: center;
  font-size: .85rem;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  line-height: 34px;
  font-weight: 400;
}

/* ── EMPTY CART ──────────────────────────────────────── */
.cart-empty-state {
  text-align: center;
  padding: 5rem 2rem;
}
.cart-empty-icon {
  width: 64px; height: 64px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  color: var(--muted);
}
.cart-empty-state h2 {
  font-size: 1.8rem;
  font-weight: 300;
  margin-bottom: .8rem;
}
.cart-empty-state p {
  color: var(--muted);
  font-size: .88rem;
  margin-bottom: 2.5rem;
  font-weight: 300;
}

/* ── ORDER SUMMARY PANEL ─────────────────────────────── */
.summary-panel {
  background: white;
  border: 1px solid var(--border);
}
.summary-panel-head {
  padding: 1.5rem 1.8rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 400;
}
.summary-panel-body { padding: 1.8rem; }

/* Mini items in summary */
.summary-items {
  display: flex;
  flex-direction: column;
  gap: .9rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  font-size: .8rem;
}
.summary-item-name {
  color: var(--text);
  font-weight: 400;
  line-height: 1.4;
}
.summary-item-size { color: var(--muted); font-weight: 300; font-size: .72rem; }
.summary-item-price {
  font-family: var(--serif);
  font-size: .9rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Promo code */
.promo-wrap {
  display: flex;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.promo-wrap input {
  flex: 1;
  padding: .75rem 1rem;
  border: 1px solid var(--border);
  border-right: none;
  font-size: .82rem;
  outline: none;
  background: var(--bg);
  transition: border-color .3s;
}
.promo-wrap input:focus { border-color: var(--brand); }
.promo-wrap input::placeholder { color: var(--muted); font-style: italic; }
.promo-wrap button {
  padding: .75rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: .6rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: background .3s, color .3s;
}
.promo-wrap button:hover { background: var(--brand); color: white; border-color: var(--brand); }

/* Totals */
.summary-totals { margin-bottom: 1.8rem; }
.s-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .82rem;
  padding: .5rem 0;
}
.s-row.shipping-free { color: #16A34A; }
.s-row-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1.2rem 0 0;
  margin-top: .6rem;
  border-top: 1px solid var(--border);
}
.s-row-total span:first-child {
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 500;
}
.s-row-total span:last-child {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 300;
}

.summary-cta { margin-bottom: 1.2rem; }
.summary-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-size: .65rem;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.summary-trust svg { color: var(--brand); }

/* ── CHECKOUT FORM ───────────────────────────────────── */
.co-section {
  margin-bottom: 2.8rem;
}
.co-section-title {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: .8rem;
}
.co-section-num {
  width: 26px; height: 26px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .65rem;
  color: var(--muted);
  flex-shrink: 0;
}

/* Floating label fields */
.fl-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.fl-grid.one { grid-template-columns: 1fr; }
.fl-grid.three { grid-template-columns: 1fr 1fr 1fr; }

.fl {
  position: relative;
}
.fl input,
.fl select,
.fl textarea {
  width: 100%;
  padding: 1.5rem 1rem .6rem;
  border: 1px solid var(--border);
  background: white;
  font-size: .9rem;
  color: var(--text);
  font-family: var(--sans);
  outline: none;
  transition: border-color .3s;
  -webkit-appearance: none;
  appearance: none;
}
.fl input:focus,
.fl select:focus { border-color: var(--brand); }
.fl label {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: .85rem;
  color: var(--muted);
  pointer-events: none;
  transition: all .2s var(--ease);
  white-space: nowrap;
}
.fl input:focus          + label,
.fl input:not(:placeholder-shown) + label,
.fl select:focus          + label,
.fl select:valid          + label {
  top: .6rem;
  transform: none;
  font-size: .55rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
}
.fl textarea { padding-top: 1.8rem; min-height: 100px; resize: vertical; }
.fl textarea + label { top: 1rem; transform: none; }
.fl textarea:focus + label,
.fl textarea:not(:placeholder-shown) + label {
  font-size: .55rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
}

/* Shipping options */
.shipping-options { display: flex; flex-direction: column; gap: .8rem; }
.shipping-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.3rem;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color .3s, background .3s;
  gap: 1rem;
}
.shipping-opt:hover { border-color: var(--brand-pale); }
.shipping-opt.selected { border-color: var(--brand); background: rgba(90,64,53,.04); }
.shipping-opt input[type=radio] { display: none; }
.shipping-opt-info { display: flex; align-items: center; gap: 1rem; flex: 1; }
.shipping-opt-radio {
  width: 16px; height: 16px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color .3s;
}
.shipping-opt.selected .shipping-opt-radio { border-color: var(--brand); }
.shipping-opt-radio::after {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--brand);
  opacity: 0;
  transition: opacity .2s;
}
.shipping-opt.selected .shipping-opt-radio::after { opacity: 1; }
.shipping-opt-name { font-size: .82rem; font-weight: 400; }
.shipping-opt-desc { font-size: .72rem; color: var(--muted); font-weight: 300; }
.shipping-opt-price {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--brand);
  white-space: nowrap;
}
.shipping-opt-price.free { color: #16A34A; font-size: .75rem; font-family: var(--sans); font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }

/* Payment notice */
.payment-notice {
  border: 1px solid var(--border);
  padding: 1.5rem;
  background: var(--bg-card);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.payment-notice svg { color: var(--brand); flex-shrink: 0; margin-top: .1rem; }
.payment-notice p { font-size: .82rem; color: var(--muted); line-height: 1.7; font-weight: 300; }

/* Submit button */
.co-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  width: 100%;
  padding: 1.4rem;
  font-size: .72rem;
  letter-spacing: .18em;
}

/* ── CONFIRMATION PAGE ───────────────────────────────── */
.confirm-wrap {
  max-width: 600px;
  margin: 0 auto;
  padding: 8rem 2rem;
  text-align: center;
}
.confirm-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: rgba(90,64,53,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2.5rem;
  color: var(--brand);
}
.confirm-wrap .label { display: block; margin-bottom: 1rem; }
.confirm-wrap h1 { font-size: clamp(2rem, 4vw, 3.5rem); margin-bottom: 1.5rem; }
.confirm-wrap p {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.8;
  font-weight: 300;
  margin-bottom: 3rem;
}
.confirm-num {
  display: inline-block;
  border: 1px solid var(--border);
  padding: .8rem 2rem;
  font-family: var(--serif);
  font-size: 1.2rem;
  letter-spacing: .1em;
  margin-bottom: 3rem;
}

/* ── GRADIENT PLACEHOLDERS (cart rows) ──────────────── */
.ph-r1 { background: radial-gradient(ellipse at 35% 65%, #F0E4D6 0%, #C4A070 40%, #8A6040 80%, #5A3A25 100%); }
.ph-r2 { background: radial-gradient(ellipse at 65% 35%, #E8DCD0 0%, #B89070 40%, #806048 80%, #503828 100%); }
.ph-r3 { background: radial-gradient(ellipse at 40% 60%, #E0D0C0 0%, #B08868 40%, #785040 80%, #4A3020 100%); }
.ph-r4 { background: radial-gradient(ellipse at 60% 40%, #EEE4D8 0%, #C8A878 40%, #908060 80%, #5C4030 100%); }
.ph-r5 { background: radial-gradient(ellipse at 45% 55%, #D8CCC0 0%, #A88878 40%, #707060 80%, #404030 100%); }
.ph-r6 { background: radial-gradient(ellipse at 55% 45%, #EAE0D4 0%, #CCB090 40%, #9A8060 80%, #604828 100%); }

/* ── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 900px) {
  .co-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .co-right { position: relative; top: 0; }
  .fl-grid.three { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .co-inner { padding: 2rem 1.5rem; }
  .fl-grid  { grid-template-columns: 1fr; }
  .cart-row { grid-template-columns: 75px 1fr; gap: 1rem; }
  .co-steps { display: none; }
}
