/**
 * Noyona cart page — custom layout for classic WooCommerce cart.
 * Scoped to .noyona-cart-shell (and body.woocommerce-cart fallback).
 */

:root {
  --noyona-cart-pink: #e199a4;
  --noyona-cart-pink-dark: #cc848f;
  --noyona-cart-pink-soft: #fef0f2;
  --noyona-cart-line: #efefef;
  --noyona-cart-inactive: #d6dbe0;
  --noyona-cart-card-radius: 28px;
}

/* ───────────────────────────────────────
   Shell
   ─────────────────────────────────────── */
.noyona-cart-shell,
body.woocommerce-cart .wp-site-blocks {
  --wp--style--global--wide-size: min(1200px, 94vw);
}

.noyona-cart-shell {
  padding-top: clamp(1rem, 3vw, 2rem);
  padding-bottom: clamp(2rem, 5vw, 4rem);
}

/* ───────────────────────────────────────
   Checkout progress (Cart active)
   ─────────────────────────────────────── */
.noyona-checkout-steps {
  margin: 0 0 clamp(2rem, 5vw, 3rem);
  padding: 0;
}

.noyona-checkout-steps ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem, 4vw, 3rem);
}

.noyona-checkout-steps li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  font-family: var(--wp--preset--font-family--proxima-nova), "Proxima Nova",
    system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #8da1b5;
  background: var(--noyona-cart-inactive);
  border: none;
  position: relative;
}

.noyona-checkout-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(100% + 2px);
  right: calc(-1 * clamp(1.5rem, 4vw, 3rem) + 4px);
  top: 50%;
  height: 2px;
  background: #b5c1cb;
  transform: translateY(-50%);
  pointer-events: none;
}

.noyona-checkout-steps li.is-active {
  background: var(--noyona-cart-pink);
  color: #fff;
}

.noyona-checkout-steps__icon {
  display: inline-flex;
  width: 1.1em;
  justify-content: center;
  font-size: 1.1em;
}

/* ───────────────────────────────────────
   Summary card wrapper
   ─────────────────────────────────────── */
.noyona-cart-shell .noyona-cart-summary-card,
body.woocommerce-cart .noyona-cart-summary-card {
  background: #fff;
  border: 1px solid var(--noyona-cart-line);
  border-radius: var(--noyona-cart-card-radius);
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.06);
}

.noyona-cart-shell .noyona-cart-summary-card > .noyona-cart-page-title,
body.woocommerce-cart .noyona-cart-summary-card > .noyona-cart-page-title {
  margin-top: 0;
}

/* ───────────────────────────────────────
   Page title
   ─────────────────────────────────────── */
.noyona-cart-shell .noyona-cart-page-title,
body.woocommerce-cart .noyona-cart-page-title {
  margin-bottom: clamp(1rem, 2.5vw, 1.5rem);
  font-family: var(--wp--preset--font-family--proxima-nova), "Proxima Nova",
    system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  line-height: 1.2;
  color: #111;
}

/* ───────────────────────────────────────
   Cart items
   ─────────────────────────────────────── */
.noyona-cart-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.noyona-cart-item {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
  padding: clamp(1.25rem, 2.5vw, 1.5rem);
  background: var(--noyona-cart-pink-soft);
  border-radius: 20px;
}

.noyona-cart-item__image {
  flex: 0 0 clamp(100px, 25vw, 220px);
}

.noyona-cart-item__image img {
  width: 100%;
  height: auto;
  border-radius: 20px;
  object-fit: cover;
  display: block;
}

.noyona-cart-item__details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.noyona-cart-item__name {
  font-family: var(--wp--preset--font-family--proxima-nova), "Proxima Nova",
    system-ui, sans-serif;
  font-size: clamp(1.1rem, 2.2vw, 1.25rem);
  font-weight: 800;
  line-height: 1.2;
}

.noyona-cart-item__name a {
  color: #111;
  text-decoration: none;
}

.noyona-cart-item__price {
  font-family: var(--wp--preset--font-family--proxima-nova), "Proxima Nova",
    system-ui, sans-serif;
  font-size: 1.15rem;
  margin: 0.25rem 0;
}

.noyona-cart-item__price del {
  opacity: 0.55;
  margin-right: 0.35rem;
}

.noyona-cart-item__price ins,
.noyona-cart-item__price .woocommerce-Price-amount {
  color: var(--noyona-cart-pink);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
}

/* Variation / meta data */
.noyona-cart-item__details .variation,
.noyona-cart-item__details dl.variation {
  font-size: 0.8125rem;
  color: #666;
  margin-top: 0.35rem;
  line-height: 1.45;
}

/* Actions row: quantity + remove */
.noyona-cart-item__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.65rem;
}

.noyona-cart-item__qty {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.noyona-qty-label {
  font-family: var(--wp--preset--font-family--proxima-nova), "Proxima Nova",
    system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #555;
}

/* Quantity selector */
.noyona-cart-item__qty .quantity {
  display: flex;
  align-items: center;
  border-radius: 12px;
  border: 1px solid #efefef;
  background: #fff;
  overflow: hidden;
  max-width: 120px;
  height: 42px;
}

.noyona-cart-item__qty .quantity input.qty {
  width: 48px;
  height: 42px;
  text-align: center;
  border: none;
  font-weight: 700;
  font-size: 0.95rem;
  background: transparent;
  -moz-appearance: textfield;
}

.noyona-cart-item__qty .quantity input.qty::-webkit-inner-spin-button,
.noyona-cart-item__qty .quantity input.qty::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Remove item link */
.noyona-remove-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #999;
  font-size: 1rem;
  transition: color 0.15s ease, background 0.15s ease;
}

.noyona-remove-item:hover {
  color: #c0392b;
  background: rgba(192, 57, 43, 0.08);
}

/* Update cart button — visually hidden, triggered by JS on qty change */
.noyona-update-cart {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ───────────────────────────────────────
   Cart summary / totals
   ─────────────────────────────────────── */
.noyona-cart-summary {
  padding-top: clamp(1.5rem, 4vw, 2.5rem);
  margin-top: clamp(1.5rem, 3vw, 2rem);
  border-top: 2px solid var(--noyona-cart-line);
}

/* ── Coupon section ── */
.noyona-coupon-section {
  margin-bottom: 1.5rem;
}

.noyona-coupon-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
  font-family: var(--wp--preset--font-family--proxima-nova), "Proxima Nova",
    system-ui, sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: #111;
}

.noyona-coupon-header i {
  color: var(--noyona-cart-pink);
  font-size: 1.15rem;
}

.noyona-coupon-form {
  display: flex;
  gap: 0.5rem;
}

.noyona-coupon-input {
  flex: 1;
  height: 48px;
  padding: 0 1rem;
  border: 1px solid #efefef;
  border-radius: 12px;
  background: #fff;
  font-family: var(--wp--preset--font-family--proxima-nova), "Proxima Nova",
    system-ui, sans-serif;
  font-size: 0.95rem;
  color: #333;
  outline: none;
  transition: border-color 0.15s ease;
}

.noyona-coupon-input:focus {
  border-color: var(--noyona-cart-pink);
}

.noyona-coupon-input::placeholder {
  color: #aaa;
}

.noyona-coupon-apply {
  height: 48px;
  padding: 0 1.5rem;
  border: none;
  border-radius: 12px;
  background: #dfe3e8;
  color: #8da1b5;
  font-family: var(--wp--preset--font-family--proxima-nova), "Proxima Nova",
    system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.noyona-coupon-apply:hover {
  background: #cdd3d9;
  color: #5a6f82;
}

/* Applied coupon chips */
.noyona-applied-coupons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.noyona-coupon-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: #f8e6ea;
  color: #c76f7a;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--wp--preset--font-family--proxima-nova), "Proxima Nova",
    system-ui, sans-serif;
  text-transform: uppercase;
}

.noyona-coupon-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #c76f7a;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.15s ease;
}

.noyona-coupon-remove:hover {
  opacity: 1;
}

/* ── Summary rows ── */
.noyona-summary-rows {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.noyona-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.7rem 0;
  font-family: var(--wp--preset--font-family--proxima-nova), "Proxima Nova",
    system-ui, sans-serif;
}

.noyona-summary-row__label {
  color: #555;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
}

.noyona-summary-row__value {
  color: #111;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
  text-align: right;
}

.noyona-summary-row__value--discount {
  color: #2ecc71;
  font-weight: 600;
}

.noyona-summary-row__value--free {
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* ── Total row ── */
.noyona-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 0.5rem;
  padding-top: 0.85rem;
  border-top: 1px solid #ece7e8;
  font-family: var(--wp--preset--font-family--proxima-nova), "Proxima Nova",
    system-ui, sans-serif;
}

.noyona-summary-total__label {
  font-size: 1.15rem;
  font-weight: 800;
  color: #111;
}

.noyona-summary-total__value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--noyona-cart-pink);
}

/* ───────────────────────────────────────
   Checkout CTA
   ─────────────────────────────────────── */
.noyona-cart-checkout {
  margin-top: 1.25rem;
}

.noyona-checkout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 58px;
  border-radius: 20px;
  background: var(--noyona-cart-pink);
  border: none;
  color: #fff;
  font-family: var(--wp--preset--font-family--proxima-nova), "Proxima Nova",
    system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  box-shadow: 0 10px 25px rgba(225, 153, 164, 0.5);
  transition: background 0.15s ease, box-shadow 0.15s ease,
    transform 0.1s ease;
  cursor: pointer;
}

.noyona-checkout-btn:hover {
  background: var(--noyona-cart-pink-dark);
  color: #fff;
  box-shadow: 0 12px 30px rgba(225, 153, 164, 0.6);
  transform: translateY(-1px);
}

/* ───────────────────────────────────────
   Empty cart
   ─────────────────────────────────────── */
.noyona-cart-summary-card .woocommerce-info,
.noyona-cart-summary-card .cart-empty {
  text-align: center;
  padding: 2rem 1rem;
  font-family: var(--wp--preset--font-family--proxima-nova), "Proxima Nova",
    system-ui, sans-serif;
}

.noyona-cart-summary-card .cart-empty + .return-to-shop {
  text-align: center;
  margin-top: 1rem;
}

.noyona-cart-summary-card .return-to-shop .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 2rem;
  border-radius: 16px;
  background: var(--noyona-cart-pink);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  box-shadow: 0 8px 20px rgba(225, 153, 164, 0.4);
  transition: background 0.15s ease;
}

.noyona-cart-summary-card .return-to-shop .button:hover {
  background: var(--noyona-cart-pink-dark);
}

/* ───────────────────────────────────────
   WooCommerce notices
   ─────────────────────────────────────── */
.noyona-cart-summary-card .woocommerce-message,
.noyona-cart-summary-card .woocommerce-error,
.noyona-cart-summary-card .woocommerce-info {
  border-radius: 12px;
  padding: 0.85rem 1.25rem;
  margin-bottom: 1rem;
  font-family: var(--wp--preset--font-family--proxima-nova), "Proxima Nova",
    system-ui, sans-serif;
  font-size: 0.9rem;
}

.noyona-cart-summary-card .woocommerce-message {
  background: #e8f5e9;
  border-left: 4px solid #4caf50;
  color: #2e7d32;
}

.noyona-cart-summary-card .woocommerce-error {
  background: #fdecea;
  border-left: 4px solid #f44336;
  color: #c62828;
}

/* ───────────────────────────────────────
   Responsive
   ─────────────────────────────────────── */
@media (max-width: 600px) {
  .noyona-cart-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .noyona-cart-item__image {
    flex: none;
    width: 100%;
    max-width: 180px;
    margin: 0 auto;
  }

  .noyona-cart-item__details {
    width: 100%;
  }

  .noyona-coupon-form {
    flex-direction: column;
  }

  .noyona-coupon-apply {
    width: 100%;
  }

  .noyona-checkout-steps ol {
    gap: 0.75rem;
  }

  .noyona-checkout-steps li {
    font-size: 11px;
    padding: 0.45rem 0.85rem;
  }

  .noyona-checkout-steps li:not(:last-child)::after {
    display: none;
  }
}
