/* Landing Cart Page Styles */

.cart-page {
  min-height: 60vh;
  padding: 3rem 0;
  background: #f8f9fa;
}

.cart-page .container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

@media (min-width: 1200px) {
  .cart-page .container {
    max-width: 1600px;
    padding: 0 30px;
  }
}

/* Professional Cart Layout - CSS Grid Approach */
.cart-layout-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  width: 100%;
  margin: 0 auto;
}

@media (min-width: 992px) {
  .cart-layout-wrapper {
    grid-template-columns: 2fr 1fr; /* 66.67% and 33.33% */
    gap: 3rem;
    align-items: start;
  }
}

@media (min-width: 1200px) {
  .cart-layout-wrapper {
    gap: 3.5rem;
  }
}

/* Cart Items Column */
.cart-items-column {
  width: 100%;
  min-width: 0; /* Prevents overflow */
  order: 1;
}

/* Cart Summary Column */
.cart-summary-column {
  width: 100%;
  order: 2;
}

@media (min-width: 992px) {
  .cart-summary-column {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #dee2e6 transparent;
  }
  
  .cart-summary-column::-webkit-scrollbar {
    width: 6px;
  }
  
  .cart-summary-column::-webkit-scrollbar-track {
    background: transparent;
  }
  
  .cart-summary-column::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 3px;
  }
  
  .cart-summary-column::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
  }
}

.cart-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2.5rem 0;
  margin-top: 9rem;
  margin-bottom: 3rem;
  border-radius: 0 0 20px 20px;
  width: 100%;
  position: relative;
}

.cart-item-card {
  border: 1px solid #e9ecef;
  border-radius: 16px;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  background: #fff;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  border-left: 4px solid transparent;
}

.cart-item-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  transform: translateY(-2px);
  border-left-color: #667eea;
}

.cart-item-card:last-child {
  margin-bottom: 0;
}

.cart-item-image {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  background: #f8f9fa;
}

.cart-summary {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 2px solid #e9ecef;
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  width: 100%;
  max-width: 100%;
  position: relative;
  overflow: hidden;
}

.cart-summary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

@media (min-width: 992px) {
  .cart-summary {
    position: sticky;
    top: 20px;
  }
}

.coupon-section {
  background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
  border: 2px solid #ffc107;
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 6px 20px rgba(255, 193, 7, 0.2);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.coupon-section:hover {
  box-shadow: 0 8px 28px rgba(255, 193, 7, 0.3);
  transform: translateY(-2px);
}

.coupon-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 193, 7, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.coupon-section h6 {
  color: #856404;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.coupon-section h6 i {
  color: #ff9800;
}

.coupon-input-group {
  display: flex;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
}

.coupon-input-group input {
  flex: 1;
  border: 2px solid #ffc107;
  border-radius: 10px;
  padding: 0.875rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  background: #fff;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(255, 193, 7, 0.1);
}

.coupon-input-group input:focus {
  border-color: #ff9800;
  box-shadow: 0 0 0 0.25rem rgba(255, 152, 0, 0.25);
  outline: none;
  transform: translateY(-1px);
}

.coupon-input-group input::placeholder {
  color: #999;
  font-weight: 400;
}

.coupon-input-group .btn {
  border-radius: 10px;
  padding: 0.875rem 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
  transition: all 0.3s ease;
  border: none;
}

.coupon-input-group .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
}

.coupon-input-group .btn:active {
  transform: translateY(0);
}

#couponMessage {
  position: relative;
  z-index: 1;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-top: 0.75rem;
  display: none;
}

.coupon-success {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  border: 2px solid #28a745;
  color: #155724;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
}

.coupon-error {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
  border: 2px solid #dc3545;
  color: #721c24;
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2);
}

/* Desktop-specific coupon enhancements */
@media (min-width: 992px) {
  .coupon-section {
    padding: 2rem 2.25rem;
    border-width: 2.5px;
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 50%, #ffe69c 100%);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.2);
  }
  
  .coupon-section::before {
    opacity: 0.3;
  }
  
  .coupon-section h6 {
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
    color: #664d03;
  }
  
  .coupon-section h6 i {
    font-size: 1.2rem;
    color: #ff9800;
  }
  
  .coupon-input-group {
    gap: 1rem;
  }
  
  .coupon-input-group input {
    padding: 1.125rem 1.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    border-width: 2.5px;
    background: #fff;
    box-shadow: 0 3px 6px rgba(255, 193, 7, 0.15);
  }
  
  .coupon-input-group input:focus {
    border-color: #ff9800;
    box-shadow: 0 0 0 0.3rem rgba(255, 152, 0, 0.3);
    transform: translateY(-2px);
  }
  
  .coupon-input-group .btn {
    padding: 1.125rem 2.25rem;
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.35);
  }
  
  .coupon-input-group .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(255, 193, 7, 0.45);
  }
  
  #couponMessage {
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.875rem 1.25rem;
    border-radius: 10px;
  }
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quantity-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #dee2e6;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-weight: 600;
}

.quantity-btn:hover {
  background: #667eea;
  border-color: #667eea;
  color: white;
}

.quantity-input {
  width: 70px;
  text-align: center;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 0.5rem;
  font-weight: 600;
}

.empty-cart {
  text-align: center;
  padding: 5rem 2rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 20px;
  border: 2px dashed #dee2e6;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.empty-cart i {
  font-size: 5rem;
  color: #adb5bd;
  margin-bottom: 2rem;
  opacity: 0.7;
}

.empty-cart h3 {
  color: #495057;
  margin-bottom: 1rem;
  font-weight: 600;
}

.empty-cart p {
  color: #6c757d;
  font-size: 1.1rem;
}

.featured-products-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 16px;
  padding: 2rem;
  margin-top: 3rem;
  border: 1px solid #e9ecef;
}

.featured-product-card {
  border: 1px solid #e9ecef;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.featured-product-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  transform: translateY(-4px);
}

.featured-product-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #f8f9fa;
}

.featured-product-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.featured-product-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #212529;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-product-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: #667eea;
  margin-top: auto;
}

.btn-checkout-primary {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  border: none;
  padding: 14px 28px;
  font-weight: 600;
  font-size: 1.1rem;
  border-radius: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-checkout-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
  color: white;
}

/* Professional Remove Item Button */
.remove-item-btn {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  color: #ffffff !important;
  border: 2px solid transparent !important;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
  position: relative;
  overflow: hidden;
}

.remove-item-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.remove-item-btn:hover::before {
  width: 300px;
  height: 300px;
}

.remove-item-btn:hover {
  background: linear-gradient(135deg, #ff5252 0%, #e0485c 100%);
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255, 107, 107, 0.4);
}

.remove-item-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.remove-item-btn i {
  transition: transform 0.3s ease;
}

.remove-item-btn:hover i {
  transform: scale(1.15) rotate(10deg);
}

.remove-item-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.3);
}

/* Professional Add to Cart Button (Featured Products) */
.add-featured-to-cart {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff !important;
  border: 2px solid transparent !important;
  border-radius: 10px;
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 3px 12px rgba(102, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.add-featured-to-cart::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.add-featured-to-cart:hover::before {
  width: 400px;
  height: 400px;
}

.add-featured-to-cart:hover {
  background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.add-featured-to-cart:active {
  transform: translateY(0);
  box-shadow: 0 3px 12px rgba(102, 126, 234, 0.3);
}

.add-featured-to-cart i {
  transition: transform 0.3s ease;
}

.add-featured-to-cart:hover i {
  transform: scale(1.2) rotate(-15deg);
}

.add-featured-to-cart:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

/* Loading state for add to cart button */
.add-featured-to-cart.loading {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}

.add-featured-to-cart.loading i {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Discount row - hidden by default */
#discountRow {
  display: none !important;
}

/* Mobile Responsive */
@media (max-width: 991px) {
  .cart-layout-wrapper {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .cart-header {
    padding: 1.5rem 0;
    margin-bottom: 2rem;
  }
  
  .cart-item-card {
    padding: 1rem;
  }
  
  .cart-item-image {
    width: 80px;
    height: 80px;
  }
  
  .cart-summary {
    position: relative;
    top: 0;
    margin-top: 0;
  }
  
  .coupon-section {
    margin-bottom: 1.5rem;
  }
  
  .coupon-input-group {
    flex-direction: column;
  }
  
  .featured-products-section {
    padding: 1.5rem;
    margin-top: 2rem;
  }
}

@media (max-width: 768px) {
  .cart-layout-wrapper {
    gap: 1rem;
  }
  
  .cart-header {
    padding: 1.25rem 0;
    margin-bottom: 1.5rem;
  }
  
  .cart-summary {
    padding: 1.5rem;
  }
  
  .coupon-section {
    padding: 1.25rem;
  }
  
  .remove-item-btn {
    padding: 0.5rem 0.875rem;
    font-size: 0.8rem;
  }

  .add-featured-to-cart {
    padding: 0.625rem 1rem;
    font-size: 0.85rem;
  }
}

