/**
 * vl-cart.css — Warenkorb
 * Geladen auf: is_cart()
 * Orientiert an design-system/woocommerce/cart-prototype.html
 *
 * @package vandalierer-labs
 */

/* ── Page layout ─────────────────────────────────────────── */
.woocommerce-cart .woocommerce { padding: 0; }

.vl-cart-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 40px 80px;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
}

/* ── Page header ─────────────────────────────────────────── */
.vl-cart-title {
  font-size: 24px;
  font-weight: 900;
  color: var(--bark);
  margin-bottom: 4px;
  font-family: 'DIN1451AltHeadline', 'DIN1451Alt', sans-serif;
}
.vl-cart-subtitle { font-size: 12px; color: var(--muted-light); margin-bottom: 20px; }

/* ── App return banner ───────────────────────────────────── */
.vl-app-return {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(196,99,58,.06);
  border: 1.5px solid rgba(196,99,58,.15);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 20px;
}
.vl-app-return-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(196,99,58,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.vl-app-return-text { flex: 1; }
.vl-app-return-title { font-size: 12px; font-weight: 700; color: var(--bark); }
.vl-app-return-sub   { font-size: 11px; color: var(--muted-text); margin-top: 2px; }
.vl-app-return-link  {
  font-size: 12px;
  font-weight: 700;
  color: var(--terra);
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1.5px solid rgba(196,99,58,.25);
  text-decoration: none;
  transition: background .15s;
}
.vl-app-return-link:hover { background: rgba(196,99,58,.08); }

/* ── Cart items ──────────────────────────────────────────── */
.vl-cart-items { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }

.vl-cart-item {
  background: rgba(255,255,255,.94);
  border: 1.5px solid var(--warm-border);
  border-radius: 14px;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 16px;
  align-items: center;
  transition: border-color .15s;
}
.vl-cart-item:hover { border-color: var(--terra-pale); }

/* Product image */
.vl-item-img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: var(--warm-card);
  border: 1px solid var(--warm-border);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vl-item-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vl-item-img a   { display: block; width: 100%; height: 100%; }

/* Product info */
.vl-item-cat  { font-size: 9px; font-weight: 700; color: var(--muted-light); letter-spacing: .07em; text-transform: uppercase; margin-bottom: 3px; }
.vl-item-name { font-size: 14px; font-weight: 800; color: var(--bark); line-height: 1.3; margin-bottom: 3px; }
.vl-item-name a { color: inherit; text-decoration: none; }
.vl-item-name a:hover { color: var(--terra); }
.vl-item-meta { font-size: 11px; color: var(--muted-light); }
.vl-item-backorder { font-size: 11px; color: var(--terra); margin-top: 4px; }

/* Right column: price + qty + remove */
.vl-item-right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; flex-shrink: 0; }

.vl-item-price-wrap { text-align: right; }
.vl-item-price      { font-size: 16px; font-weight: 900; color: var(--bark); font-family: 'DIN1451Alt', sans-serif; }
.vl-item-price-each { font-size: 10px; color: var(--muted-light); margin-top: 1px; }

/* Qty stepper */
.vl-qty-control {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--warm-border);
  border-radius: 8px;
  background: rgba(255,255,255,.8);
  overflow: hidden;
}
.vl-qty-btn {
  width: 32px;
  height: 30px;
  border: none;
  background: transparent;
  color: var(--terra);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  font-family: inherit;
  line-height: 1;
}
.vl-qty-btn:hover { background: rgba(196,99,58,.08); }

.vl-qty-control .quantity { display: flex; align-items: center; }
.vl-qty-control .qty {
  width: 36px;
  height: 30px;
  border: none;
  background: transparent;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--bark);
  -moz-appearance: textfield;
}
.vl-qty-control .qty::-webkit-inner-spin-button,
.vl-qty-control .qty::-webkit-outer-spin-button { -webkit-appearance: none; }
.vl-qty-control .qty:focus { outline: none; }

/* Remove button */
.vl-remove-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted-light);
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  padding: 0;
  text-decoration: none;
  transition: color .15s;
}
.vl-remove-btn:hover { color: #c04030; }

/* ── Cart footer: coupon + actions ──────────────────────── */
.vl-cart-footer { margin-top: 8px; }

.vl-coupon-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.vl-coupon-input {
  flex: 1;
  padding: 10px 13px;
  border-radius: 10px;
  border: 1.5px solid var(--warm-border);
  background: rgba(255,255,255,.85);
  font-size: 13px;
  color: var(--bark);
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
}
.vl-coupon-input:focus { border-color: var(--terra); }
.vl-coupon-input::placeholder { color: var(--muted-light); }
.vl-coupon-btn {
  padding: 10px 18px;
  border-radius: 10px;
  border: 1.5px solid var(--warm-border);
  background: rgba(255,255,255,.85);
  color: var(--muted-text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: border-color .15s, color .15s;
}
.vl-coupon-btn:hover { border-color: var(--terra); color: var(--terra); }

.vl-cart-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.vl-continue {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-text);
  text-decoration: none;
  transition: color .15s;
}
.vl-continue:hover { color: var(--terra); }

.vl-update-cart {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted-text);
  background: transparent;
  border: 1.5px solid var(--warm-border);
  border-radius: 8px;
  padding: 6px 14px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s, color .15s;
}
.vl-update-cart:hover { border-color: var(--terra); color: var(--terra); }
.vl-update-cart[aria-disabled="true"] { opacity: .45; pointer-events: none; }

/* ── Empty cart ──────────────────────────────────────────── */
.vl-cart-empty {
  text-align: center;
  padding: 60px 20px;
}
.vl-cart-empty-icon { margin-bottom: 20px; opacity: .35; }
.vl-cart-empty-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--bark);
  margin-bottom: 8px;
  font-family: 'DIN1451AltHeadline', 'DIN1451Alt', sans-serif;
}
.vl-cart-empty-sub { font-size: 13px; color: var(--muted-text); margin-bottom: 24px; }
.vl-cart-empty-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Right sidebar: order summary ────────────────────────── */
.vl-summary-card {
  background: rgba(255,255,255,.95);
  border: 1.5px solid var(--warm-border);
  border-radius: 16px;
  overflow: hidden;
  position: sticky;
  top: 62px;
}
.vl-summary-header {
  padding: 14px 18px 13px;
  border-bottom: 1px solid rgba(196,99,58,.07);
}
.vl-summary-title {
  font-family: 'DIN1451AltHeadline', 'DIN1451Alt', sans-serif;
  font-size: 15px;
  font-weight: 900;
  color: var(--bark);
}
.vl-summary-body { padding: 0; }

/* WC cart totals table inside summary card */
.vl-summary-body .shop_table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.vl-summary-body .shop_table tr th,
.vl-summary-body .shop_table tr td {
  padding: 9px 18px;
  border-bottom: 1px solid rgba(196,99,58,.06);
  text-align: left;
}
.vl-summary-body .shop_table tr:last-child th,
.vl-summary-body .shop_table tr:last-child td { border-bottom: none; }
.vl-summary-body .shop_table th { font-size: 12px; color: var(--muted-text); font-weight: 600; }
.vl-summary-body .shop_table td { font-weight: 700; color: var(--bark); text-align: right; }
.vl-summary-body .order-total th { font-size: 14px; font-weight: 800; color: var(--bark); }
.vl-summary-body .order-total td { font-size: 20px; font-weight: 900; color: var(--terra); }
.vl-summary-body .order-total td .amount { font-family: 'DIN1451Alt', sans-serif; }

/* Checkout button from WC totals */
.vl-summary-body .wc-proceed-to-checkout { padding: 16px 18px; }
.vl-summary-body .checkout-button,
.vl-summary-body .button.alt {
  display: block;
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: none;
  background: var(--terra);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(196,99,58,.3);
  transition: background .15s, box-shadow .15s;
}
.vl-summary-body .checkout-button:hover,
.vl-summary-body .button.alt:hover {
  background: #b3562f;
  box-shadow: 0 6px 20px rgba(196,99,58,.4);
}

/* Shipping calculator */
.vl-summary-body .shipping-calculator-button {
  font-size: 11px;
  color: var(--terra);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.vl-summary-body .shipping-calculator-form { margin-top: 12px; padding: 0 18px 14px; }

/* Coupon discount row */
.vl-summary-body .cart-discount th,
.vl-summary-body .cart-discount td { color: var(--sage-dark, #3d7a50); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .vl-cart-wrap {
    grid-template-columns: 1fr;
    padding: 20px 24px 60px;
  }
  .vl-cart-right { position: static; }
  .vl-summary-card { position: static; }
}

@media (max-width: 560px) {
  .vl-cart-item { grid-template-columns: 48px 1fr; }
  .vl-item-right { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; border-top: 1px solid rgba(196,99,58,.06); padding-top: 10px; }
  .vl-item-price-wrap { text-align: left; }
  .vl-app-return { flex-direction: column; align-items: flex-start; }
}
