/* Cart Page Styles */

.cart-title {
  font-family: Play, sans-serif;
  color: #ffffff;
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 8px;
}

.cart-subtitle {
  font-family: Inter, sans-serif;
  color: #999999;
  font-size: 14px;
  margin-bottom: 0;
}

/* Cart Items */

.cart-item {
  background: linear-gradient(135deg, #101010 0%, #1a1a1a 100%);
  border: 1px solid #2f2f2f;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  transition: border-color 0.3s ease;
}

.cart-item:hover {
  border-color: #0569f1;
}

.cart-item-img {
  border-radius: 8px;
  background: #1a1a1a;
}

.cart-item-name {
  font-family: Inter, sans-serif;
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  display: block;
  margin-bottom: 4px;
  transition: color 0.3s ease;
}

.cart-item-name:hover {
  color: #0569f1;
}

.cart-item-sku {
  font-family: Inter, sans-serif;
  color: #666666;
  font-size: 11px;
  margin-bottom: 8px;
}

.flash-badge {
  display: inline-block;
  background: linear-gradient(90deg, #bc0a20, #161619);
  color: #ffffff;
  font-family: Play, sans-serif;
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 4px;
}

.cart-item-price {
  font-family: Inter, sans-serif;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 0;
}

.cart-item-original-price {
  font-family: Inter, sans-serif;
  color: #ff7d06;
  font-size: 12px;
  text-decoration: line-through;
  margin-bottom: 0;
}

/* Quantity Controls */

.quantity-control {
  display: flex;
  align-items: center;
  background: #1a1a1a;
  border: 1px solid #2f2f2f;
  border-radius: 8px;
  overflow: hidden;
}

.qty-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  width: 36px;
  height: 36px;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.qty-btn:hover {
  background: #0569f1;
}

.qty-input {
  background: transparent;
  border: none;
  color: #ffffff;
  width: 40px;
  text-align: center;
  font-family: Inter, sans-serif;
  font-size: 14px;
  -moz-appearance: textfield;
}

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

/* Action Buttons */

.btn-favorite, .btn-remove {
  background: transparent;
  border: none;
  color: #666666;
  font-size: 16px;
  padding: 8px;
  cursor: pointer;
  transition: color 0.3s ease;
}

.btn-favorite:hover {
  color: #ff4444;
}

.btn-remove:hover {
  color: #ff4444;
}

/* Continue Shopping & Clear Cart */

.continue-shopping {
  font-family: Inter, sans-serif;
  color: #0569f1;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.continue-shopping:hover {
  color: #76b900;
}

.btn-clear-cart {
  background: transparent;
  border: 1px solid #666666;
  color: #666666;
  font-family: Inter, sans-serif;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-clear-cart:hover {
  border-color: #ff4444;
  color: #ff4444;
}

/* Order Summary */

.order-summary {
  background: linear-gradient(135deg, #101010 0%, #1a1a1a 100%);
  border: 1px solid #2f2f2f;
  border-radius: 12px;
  padding: 24px;
  position: sticky;
  top: 20px;
}

.summary-title {
  font-family: Play, sans-serif;
  color: #ffffff;
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 20px;
}

/* Coupon Section */

.coupon-section {
  margin-bottom: 16px;
}

.coupon-label {
  font-family: Inter, sans-serif;
  color: #999999;
  font-size: 13px;
  display: block;
  margin-bottom: 8px;
}

.coupon-input {
  background: #1a1a1a;
  border: 1px solid #2f2f2f;
  color: #ffffff;
  font-family: Inter, sans-serif;
  font-size: 14px;
  border-radius: 8px 0 0 8px;
  padding: 10px 12px;
}

.coupon-input:focus {
  background: #1a1a1a;
  border-color: #0569f1;
  color: #ffffff;
  box-shadow: none;
}

.coupon-input::placeholder {
  color: #666666;
}

.coupon-btn {
  background: linear-gradient(90deg, #0569f1, #76b900);
  border: none;
  color: #ffffff;
  font-family: Inter, sans-serif;
  font-size: 14px;
  padding: 10px 16px;
  border-radius: 0 8px 8px 0;
  transition: opacity 0.3s ease;
}

.coupon-btn:hover {
  opacity: 0.9;
  color: #ffffff;
}

/* Summary Details */

.summary-divider {
  border-color: #2f2f2f;
  margin: 16px 0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-family: Inter, sans-serif;
  font-size: 14px;
  color: #999999;
}

.summary-row span:last-child {
  color: #ffffff;
}

.discount-amount {
  color: #76b900 !important;
}

.shipping-amount {
  color: #ff7d06 !important;
}

.total-row {
  margin-bottom: 8px;
}

.total-row span {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff !important;
}

.total-row span:last-child {
  background: linear-gradient(90deg, #0569f1, #76b900);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.installments-text {
  font-family: Inter, sans-serif;
  color: #76b900;
  font-size: 12px;
  text-align: center;
  margin-bottom: 20px;
}

/* Checkout Button */

.checkout-btn {
  width: 100%;
  background: linear-gradient(90deg, #0569f1, #76b900);
  border: none;
  color: #ffffff;
  font-family: Play, sans-serif;
  font-size: 16px;
  font-weight: bold;
  padding: 14px 24px;
  border-radius: 8px;
  margin-bottom: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.checkout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(5, 105, 241, 0.4);
  color: #ffffff;
}

/* Payment Methods */

.payment-methods {
  text-align: center;
  margin-bottom: 16px;
}

.payment-label {
  font-family: Inter, sans-serif;
  color: #666666;
  font-size: 12px;
  margin-bottom: 8px;
}

.payment-icons {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.payment-icons img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.payment-icons img:hover {
  opacity: 1;
}

/* Security Badge */

.security-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(118, 185, 0, 0.1);
  border: 1px solid rgba(118, 185, 0, 0.3);
  border-radius: 8px;
  padding: 12px;
  color: #76b900;
  font-family: Inter, sans-serif;
  font-size: 12px;
}

.security-badge i {
  font-size: 16px;
}

/* Warehouse Badges */

.badge-warehouse {
  display: inline-flex;
  align-items: center;
  background: rgba(5, 105, 241, 0.12);
  color: #4d9fff;
  border: 1px solid rgba(5, 105, 241, 0.35);
  font-family: Inter, sans-serif;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 10px;
  white-space: nowrap;
}

/* Red border + tinted background when a line has confirmed zero warehouse stock */
/* .cart-item--no-stock intentionally has no border/background override —
   the badge inside the row is the only out-of-stock indicator. */

/* "Sin stock" pill badge */
.badge-no-stock {
  display: inline-flex;
  align-items: center;
  background: rgba(224, 82, 82, 0.12);
  color: #e05252;
  border: 1px solid rgba(224, 82, 82, 0.45);
  font-family: Inter, sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 10px;
  white-space: nowrap;
}

/* Shown when the same product spans two warehouse lines (split shipment) */
.badge-warehouse-split {
  display: inline-flex;
  align-items: center;
  background: rgba(243, 156, 18, 0.12);
  color: #f39c12;
  border: 1px solid rgba(243, 156, 18, 0.40);
  font-family: Inter, sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 10px;
  white-space: nowrap;
}

/* =============================================================================
   Recently Deleted Section
   ============================================================================= */

.deleted-section {
  margin-top: 16px;
  padding: 16px;
  background: #111;
  border: 1px solid #2a2a2a;
  border-left: 3px solid rgba(5, 105, 241, 0.4);
  border-radius: 12px;
  animation: deletedSectionFadeIn 0.35s ease;
}

@keyframes deletedSectionFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.deleted-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #1a1a1a;
}

.deleted-section-title {
  font-family: Inter, sans-serif;
  font-size: 13px;
  color: #888;
  display: flex;
  align-items: center;
  gap: 6px;
}

.deleted-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.07);
  color: #888;
  font-family: Inter, sans-serif;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
}

.deleted-clear-all {
  background: transparent;
  border: none;
  color: #444;
  font-family: Inter, sans-serif;
  font-size: 12px;
  cursor: pointer;
  transition: color 0.2s;
  padding: 2px 0;
}

.deleted-clear-all:hover {
  color: #e05252;
}

.deleted-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #151515;
  transition: background 0.2s;
}

.deleted-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.deleted-card-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: #1a1a1a;
  border-radius: 6px;
  flex-shrink: 0;
}

.deleted-card-info {
  flex: 1;
  min-width: 0;
}

.deleted-card-name {
  font-family: Inter, sans-serif;
  font-size: 13px;
  color: #999;
  text-decoration: none;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
  transition: color 0.2s;
}

.deleted-card-name:hover {
  color: #4d9fff;
}

.deleted-card-meta {
  font-family: Inter, sans-serif;
  font-size: 11px;
  color: #666;
  margin-top: 3px;
}

.deleted-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.deleted-card-restore {
  background: transparent;
  border: 1px solid rgba(5, 105, 241, 0.45);
  color: #4d9fff;
  font-family: Inter, sans-serif;
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.deleted-card-restore:hover:not(:disabled) {
  background: rgba(5, 105, 241, 0.12);
  border-color: #0569f1;
}

.deleted-card-restore:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  border-color: #2a2a2a;
  color: #555;
}

.deleted-card-perma {
  background: transparent;
  border: 1px solid #222;
  color: #444;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}

.deleted-card-perma:hover {
  border-color: rgba(224, 82, 82, 0.6);
  color: #e05252;
  background: rgba(224, 82, 82, 0.08);
}

/* ==========================================================================
   Split product card — single card for a product across multiple warehouses
   ========================================================================== */

.cart-split-header {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  position: relative;
}

.cart-split-header .cart-item-name {
  flex: 1 1 100%;
}

.cart-split-header .btn-favorite {
  position: absolute;
  top: 0;
  right: 0;
}

.cart-warehouse-lines {
  border-top: 1px solid #222;
  padding-top: 6px;
}

/* One row per warehouse line inside the grouped card */
.cart-warehouse-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #1a1a1a;
  flex-wrap: wrap;
}

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

.cart-warehouse-line.cwl--no-stock .cwl-badge {
  opacity: 0.55;
}

.cwl-badge {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.cwl-controls {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.cwl-price {
  flex-shrink: 0;
  text-align: right;
  min-width: 72px;
}

.cwl-remove {
  flex-shrink: 0;
}

/* Totals footer shown at the bottom of a split card */
.cart-split-totals {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #222;
}

.cart-split-totals-units {
  font-family: Inter, sans-serif;
  font-size: 12px;
  color: #666;
}

.cart-split-totals-price {
  font-family: Play, sans-serif;
  font-size: 15px;
  color: #fff;
  font-weight: bold;
}

/* ==========================================================================
   Cart Split-Price: Overflow hint chip (Improvement 1)
   ========================================================================== */

.qty-overflow-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(243, 156, 18, 0.35);
  background: rgba(243, 156, 18, 0.08);
  color: #f39c12;
  font-family: Inter, sans-serif;
  font-size: 11px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  user-select: none;
  white-space: nowrap;
}

.qty-overflow-hint:hover {
  background: rgba(243, 156, 18, 0.16);
  border-color: rgba(243, 156, 18, 0.55);
}

/* ==========================================================================
   Cart Split-Price: Inline overflow banner (Improvement 2)
   ========================================================================== */

.cart-overflow-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 0 0;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid rgba(243, 156, 18, 0.3);
  background: rgba(243, 156, 18, 0.07);
  animation: bannerFadeIn 0.2s ease;
}

@keyframes bannerFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.cart-overflow-banner-text {
  flex: 1;
  font-family: Inter, sans-serif;
  font-size: 12px;
  color: #bbb;
  min-width: 0;
}

.cart-overflow-banner-text strong {
  color: #f0c060;
}

.cart-overflow-banner-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.cart-overflow-banner-actions .cart-overflow-accept {
  padding: 4px 12px;
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-weight: 600;
  background: linear-gradient(90deg, #0569f1, #76b900);
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
}

.cart-overflow-banner-actions .cart-overflow-decline {
  padding: 4px 8px;
  font-family: Inter, sans-serif;
  font-size: 12px;
  background: transparent;
  border: 1px solid #444;
  border-radius: 6px;
  color: #888;
  cursor: pointer;
}

.cart-overflow-banner-actions .cart-overflow-decline:hover {
  border-color: rgba(224, 82, 82, 0.5);
  color: #e05252;
}

/* Responsive Adjustments */

@media (max-width: 991px) {
  .order-summary {
    margin-top: 24px;
    position: relative;
    top: 0;
  }
}

@media (max-width: 767px) {
  .cart-title {
    font-size: 22px;
  }
}

@media (max-width: 767px) {
  .cart-item-name {
    font-size: 13px;
  }
}

@media (max-width: 767px) {
  .cart-item-price {
    font-size: 14px;
  }
}

@media (max-width: 767px) {
  .quantity-control {
    justify-content: center;
  }
}

