/* ==========================================================================
   Garuda Online Store - Premium Shopping Cart Styles
   ========================================================================== */

/* Cart Page Section */
.cart-section {
  padding: 80px 0;
  background-color: #f9fbfd;
}

/* Card Panel Styling */
.cart-card-panel {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  padding: 30px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
  transition: all 0.3s ease;
}

.cart-card-panel:hover {
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.cart-card-title {
  font-size: 22px;
  font-weight: 700;
  color: #333333;
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 10px;
}

.cart-card-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 3px;
  background-color: #ff7722;
  border-radius: 2px;
}

/* Cart Table Styles */
.cart-table {
  width: 100%;
  border-collapse: collapse;
}

.cart-table th {
  font-size: 14px;
  font-weight: 700;
  color: #999999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 15px 10px;
  border-bottom: 2px solid #f1f1f1;
}

.cart-table td {
  padding: 20px 10px;
  vertical-align: middle;
  border-bottom: 1px solid #f5f5f5;
}

/* Product Info Cell */
.cart-item-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.cart-item-image {
  width: 75px;
  height: 75px;
  border-radius: 12px;
  overflow: hidden;
  object-fit: cover;
  border: 1px solid rgba(0, 0, 0, 0.05);
  background: #f8fbff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cart-item-placeholder {
  width: 75px;
  height: 75px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff6e5 0%, #ffd7b3 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: #ba6c0a;
  text-transform: uppercase;
  flex-shrink: 0;
}

.cart-item-details {
  display: flex;
  flex-direction: column;
}

.cart-item-name {
  font-size: 16px;
  font-weight: 600;
  color: #222222;
  text-decoration: none;
  transition: color 0.2s ease;
  margin-bottom: 5px;
}

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

/* Price & Subtotal Cell */
.cart-item-price {
  font-size: 16px;
  font-weight: 600;
  color: #444444;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
}

.cart-item-subtotal {
  font-size: 16px;
  font-weight: 700;
  color: #ff7722;
  /* PT Sans mis-renders U+20B9 (Indian Rupee sign) as a Peso-like glyph; use a font stack that supports it correctly. */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
}

/* Quantity Control Box */
.cart-qty-wrapper {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 30px;
  padding: 3px;
  background: #f8fafc;
}

.cart-qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #ffffff;
  color: #64748b;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.cart-qty-btn:hover {
  background: #ff7722;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(255, 119, 34, 0.25);
}

.cart-qty-input {
  width: 45px;
  border: none;
  background: transparent;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  outline: none;
}

/* Delete Action Button */
.cart-delete-btn {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cart-delete-btn:hover {
  background: #fee2e2;
  transform: scale(1.1);
}

/* Order Summary Column */
.summary-card {
  position: sticky;
  top: 100px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 30px;
}

.summary-title {
  font-size: 20px;
  font-weight: 700;
  color: #222222;
  margin-bottom: 25px;
  border-bottom: 1px solid #f1f1f1;
  padding-bottom: 15px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  font-size: 15px;
  color: #64748b;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
}

.summary-row.total {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  border-top: 1px dashed #e2e8f0;
  margin-top: 20px;
  padding-top: 20px;
}

.summary-row.total span:last-child {
  color: #ff7722;
  font-size: 24px;
}

/* Promo Code Box */
.promo-box {
  margin: 25px 0;
  background: #f8fafc;
  padding: 15px;
  border-radius: 12px;
  border: 1px solid #f1f5f9;
}

.promo-title {
  font-size: 14px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.promo-form {
  display: flex;
  gap: 8px;
}

.promo-input {
  flex-grow: 1;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  background: #ffffff;
  outline: none;
  text-transform: uppercase;
}

.promo-input:focus {
  border-color: #ff7722;
}

.promo-btn {
  background: #1e293b;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.promo-btn:hover {
  background: #ff7722;
}

.promo-feedback {
  font-size: 13px;
  margin-top: 8px;
  font-weight: 500;
  display: none;
}

.promo-feedback.success {
  color: #16a34a;
  display: block;
}

.promo-feedback.error {
  color: #dc2626;
  display: block;
}

/* Checkout CTA Button */
.checkout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: #ff7722;
  color: #ffffff;
  border: none;
  border-radius: 30px;
  padding: 15px 25px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(255, 119, 34, 0.2);
}

.checkout-btn:hover {
  background: #e05e11;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(255, 119, 34, 0.35);
  color: #ffffff;
  text-decoration: none;
}

.continue-shopping {
  display: block;
  text-align: center;
  margin-top: 15px;
  color: #64748b;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s;
}

.continue-shopping:hover {
  color: #ff7722;
}

/* Empty State Styling */
.empty-cart-container {
  text-align: center;
  padding: 60px 20px;
}

.empty-cart-icon {
  font-size: 80px;
  color: #ffd7b3;
  margin-bottom: 25px;
  animation: pulse-icon 2s infinite ease-in-out;
}

.empty-cart-title {
  font-size: 24px;
  font-weight: 700;
  color: #222222;
  margin-bottom: 12px;
}

.empty-cart-text {
  font-size: 15px;
  color: #64748b;
  max-width: 400px;
  margin: 0 auto 30px auto;
  line-height: 1.6;
}

.empty-cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ff7722;
  color: #ffffff;
  border: none;
  border-radius: 30px;
  padding: 12px 30px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(255, 119, 34, 0.2);
  transition: all 0.3s ease;
}

.empty-cart-btn:hover {
  background: #e05e11;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(255, 119, 34, 0.35);
  color: #ffffff;
  text-decoration: none;
}

/* Row animations */
.cart-row-fade {
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.cart-row-fade.removing {
  opacity: 0;
  transform: translateX(-50px);
}

@keyframes pulse-icon {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* Responsive Table Breakpoints */
@media (max-width: 991px) {
  .cart-card-panel {
    padding: 20px;
  }
  .summary-card {
    margin-top: 30px;
    position: static;
  }
}

@media (max-width: 768px) {
  /* Collapse table into card layouts for small screens */
  .cart-table, .cart-table thead, .cart-table tbody, .cart-table tr, .cart-table td, .cart-table th {
    display: block;
  }
  
  .cart-table thead {
    display: none; /* Hide header on mobile */
  }
  
  .cart-table tr {
    position: relative;
    padding: 15px 0;
    border-bottom: 1px solid #f1f1f1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }
  
  .cart-table td {
    border-bottom: none;
    padding: 5px 0;
    width: 100%;
  }

  .cart-table td.cart-product-td {
    order: 1;
    width: calc(100% - 40px);
  }

  .cart-table td.cart-delete-td {
    order: 2;
    width: 40px;
    text-align: right;
  }

  .cart-table td.cart-price-td {
    order: 3;
    width: 33.33%;
    font-size: 14px;
  }

  .cart-table td.cart-qty-td {
    order: 4;
    width: 33.33%;
    display: flex;
    justify-content: center;
  }

  .cart-table td.cart-subtotal-td {
    order: 5;
    width: 33.33%;
    text-align: right;
    font-size: 15px;
  }
  
  /* Add label prefix for pricing columns on mobile if necessary */
  .cart-table td.cart-price-td::before {
    content: 'Price: ';
    font-weight: 600;
    color: #999;
  }

  .cart-table td.cart-subtotal-td::before {
    content: 'Total: ';
    font-weight: 600;
    color: #999;
  }
}
