/* ============================================================
   CGT DESIGN SYSTEM v3.0 — CART PAGE (DESKTOP)
   File: style_css/cart/web.css
   ============================================================ */

/* ── Cart Page Container ── */
.cart-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 100px;
}

/* ── Page Heading ── */
.cart-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
  flex-wrap: wrap;
  gap: 12px;
}

.cart-heading h2 {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Segoe UI', sans-serif;
}

.cart-heading h2 i {
  color: var(--green);
  font-size: 1.6rem;
}

.cart-heading h2 .count-pill {
  background: var(--green);
  color: var(--white);
  font-size: 0.65rem;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  letter-spacing: 0.3px;
}

.cart-clear-btn {
  background: var(--white);
  border: 1.5px solid #ef4444;
  color: #dc2626;
  border-radius: var(--radius-sm);
  padding: 9px 18px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s var(--ease);
  font-family: 'Segoe UI', sans-serif;
}

.cart-clear-btn:hover {
  background: #fee2e2;
  border-color: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239,68,68,.15);
}

/* ── Grid Layout ── */
.cart-grid {
  display: grid;
  grid-template-columns: 1fr 390px;
  gap: 28px;
  align-items: start;
}

/* ── Cart Items Card ── */
.cart-items-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--bg-alt);
  transition: background 0.15s var(--ease);
}

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

.cart-item:hover {
  background: var(--bg);
}

.cart-item-img {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  flex-shrink: 0;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.cart-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cart-item-title {
  font-weight: 700;
  font-size: 0.96rem;
  color: var(--text);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'Segoe UI', sans-serif;
}

.cart-item-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.cart-item-title a:hover {
  color: var(--green);
}

.cart-item-price {
  color: var(--green);
  font-weight: 700;
  font-size: 0.92rem;
  font-family: 'Segoe UI', sans-serif;
}

.cart-item-price span {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 500;
  margin-left: 4px;
}

/* ── Quantity Controls ── */
.qty-ctrl {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg);
}

.qty-btn {
  width: 38px;
  height: 38px;
  border: none;
  background: var(--white);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s var(--ease);
  flex-shrink: 0;
}

.qty-btn:hover:not(:disabled) {
  background: var(--bg);
  color: var(--green);
}

.qty-btn:disabled {
  color: var(--text-light);
  cursor: not-allowed;
  opacity: 0.45;
}

.qty-val {
  width: 38px;
  text-align: center;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  line-height: 38px;
  background: var(--bg-alt);
  font-family: 'Segoe UI', sans-serif;
}

.cart-item-subtotal {
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--text);
  min-width: 72px;
  text-align: right;
  flex-shrink: 0;
  font-family: 'Segoe UI', sans-serif;
}

.cart-remove-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 9px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s var(--ease);
  font-size: 0.9rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-remove-btn:hover {
  color: #dc2626;
  background: #fee2e2;
}

/* ── Continue Shopping ── */
.cart-continue {
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s var(--ease);
  font-family: 'Segoe UI', sans-serif;
}

.cart-continue:hover {
  gap: 10px;
  color: var(--green-dark);
}

/* ── Order Summary Card ── */
.cart-summary {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 26px;
  position: sticky;
  top: 120px;
}

.cart-summary h5 {
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--text);
  margin: 0 0 20px;
  padding-bottom: 16px;
  border-bottom: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Segoe UI', sans-serif;
}

.cart-summary h5 i {
  color: var(--green);
  font-size: 0.92rem;
}

.sum-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 10px 0;
  font-family: 'Segoe UI', sans-serif;
}

.sum-row.total {
  font-weight: 800;
  font-size: 1.07rem;
  color: var(--text);
  border-top: 1.5px solid var(--border);
  margin-top: 12px;
  padding-top: 14px;
}

.sum-row.total span:last-child {
  color: var(--green);
  font-size: 1.22rem;
}

.sum-row.discount {
  color: #dc2626;
  font-weight: 600;
}

.sum-row.free {
  color: var(--green);
  font-weight: 600;
}

.sum-row i {
  font-size: 0.82rem;
}

/* ── Coupon Section ── */
.coupon-wrap {
  margin: 20px 0;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.coupon-input-row {
  display: flex;
  gap: 8px;
}

.coupon-input {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 0.86rem;
  outline: none;
  transition: border-color 0.2s var(--ease);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text);
  font-family: 'Segoe UI', sans-serif;
  background: var(--white);
}

.coupon-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(46,125,50,.1);
}

.coupon-apply-btn {
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 20px;
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
  font-family: 'Segoe UI', sans-serif;
}

.coupon-apply-btn:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.coupon-msg {
  font-size: 0.8rem;
  margin-top: 8px;
  min-height: 20px;
  font-family: 'Segoe UI', sans-serif;
}

/* ── Checkout Button ── */
.cart-checkout-btn {
  background: linear-gradient(135deg, var(--accent), #ff9100);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 16px;
  font-size: 0.96rem;
  font-weight: 800;
  width: 100%;
  cursor: pointer;
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  text-decoration: none;
  transition: all 0.2s var(--ease);
  box-shadow: var(--shadow);
  letter-spacing: 0.3px;
  font-family: 'Segoe UI', sans-serif;
}

.cart-checkout-btn:hover {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--white);
}

.btn-items-count {
  background: rgba(255,255,255,.28);
  border-radius: var(--radius-pill);
  font-size: 0.73rem;
  padding: 3px 10px;
  font-weight: 700;
}

.cart-secure-note {
  text-align: center;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: 'Segoe UI', sans-serif;
}

.cart-secure-note i {
  color: var(--green);
  font-size: 0.75rem;
}

/* ── Empty State ── */
.cart-empty {
  text-align: center;
  padding: 110px 24px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

/* Only the main shopping cart icon — NOT button icons */
.cart-empty > i {
  font-size: 5.5rem;
  color: var(--text-light);
  margin-bottom: 22px;
  display: block;
  opacity: 0.35;
}

/* Reset icon size inside buttons */
.cart-empty-btn i {
  font-size: 1rem;
  color: inherit;
  opacity: 1;
  display: inline;
  margin: 0;
}

.cart-empty h4 {
  color: var(--text);
  font-weight: 800;
  margin-bottom: 10px;
  font-size: 1.35rem;
  font-family: 'Segoe UI', sans-serif;
}

.cart-empty p {
  color: var(--text-muted);
  margin-bottom: 30px;
  font-size: 0.92rem;
  font-family: 'Segoe UI', sans-serif;
}

.cart-empty-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.cart-empty-btn {
  padding: 12px 30px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.2s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'Segoe UI', sans-serif;
  cursor: pointer;
  border: none;
}

.cart-empty-btn.green {
  background: var(--green);
  color: var(--white);
}

.cart-empty-btn.green:hover {
  background: var(--green-dark);
}

.cart-empty-btn.blue {
  background: var(--blue);
  color: var(--white);
}

.cart-empty-btn.blue:hover {
  background: #0d47a1;
}

.cart-empty-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* ── OOS Banner ── */
.cart-oos-banner {
  background: linear-gradient(135deg,#fef2f2 0%,#fee2e2 100%);
  border: 1.5px solid #fca5a5;
  color: #991b1b;
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Segoe UI', sans-serif;
}

.cart-oos-banner .oos-icon {
  font-size: 1.2rem;
  color: #dc2626;
  flex-shrink: 0;
}

.cart-oos-banner .oos-title {
  font-weight: 700;
  font-size: .95rem;
}

.cart-oos-banner .oos-desc {
  font-size: .82rem;
  margin-top: 2px;
}
