/* Cart Page Specific Styles */

/* Cart Header */
.cart-page-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #333;
}

/* Empty cart styling */
.cart-empty-message {
  text-align: center;
  padding: 60px 20px;
  background-color: white;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.cart-empty-message .cart-icon {
  font-size: 5rem;
  color: #dee2e6;
  margin-bottom: 20px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-20px);
  }
  60% {
    transform: translateY(-10px);
  }
}

/* Enhanced Cart Items Table */
.cart-table {
  margin-bottom: 0;
}

.cart-table .table-light th {
  background-color: #f8f9fa;
  color: #495057;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  border-top: none;
  padding: 15px;
}

.cart-table td {
  vertical-align: middle;
  padding: 20px 15px;
}

/* Cart Item Row */
.cart-item {
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.cart-item:hover {
  background-color: #f8f9fa;
  border-left: 3px solid var(--primary-color);
}

/* Product thumbnail */
.cart-item-img,
.cart-item .product-thumbnail img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.cart-item-img:hover,
.cart-item .product-thumbnail img:hover {
  transform: scale(1.1);
}

/* Product name */
.product-name h6 {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.product-name a {
  color: #333;
  text-decoration: none;
  transition: color 0.2s;
}

.product-name a:hover {
  color: var(--primary-color);
}

.product-variant {
  font-size: 0.85rem;
  color: #6c757d;
}

/* Price display */
.product-price {
  font-weight: 600;
  color: #333;
}

/* Enhanced Quantity Controls */
.quantity-control-group {
  display: flex;
  justify-content: center;
}

.quantity-controls {
  max-width: 120px;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  background-color: #f8f9fa;
}

.quantity-wrap {
  width: 100%;
  height: 38px;
}

.quantity-input {
  width: 40px !important;
  border: none !important;
  background-color: transparent !important;
  text-align: center;
  font-weight: 600;
  padding: 0 !important;
  -moz-appearance: textfield;
}

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

.quantity-btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none !important;
  background-color: transparent !important;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  color: #6c757d;
}

.quantity-btn:hover {
  color: var(--primary-color);
  background-color: rgba(0, 0, 0, 0.05) !important;
}

.quantity-btn:active {
  transform: scale(0.95);
}

.quantity-btn.quantity-decrease {
  border-right: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.quantity-btn.quantity-increase {
  border-left: 1px solid rgba(0, 0, 0, 0.1) !important;
}

/* Remove Item Button */
.remove-item-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  color: #dc3545;
  transition: all 0.2s;
}

.remove-item-btn:hover {
  background-color: #dc3545;
  color: #fff;
  transform: rotate(90deg);
}

/* ENHANCED: Cart Summary Section - Prominent Right Side Styling */
.cart-summary {
  position: sticky;
  top: 20px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
  background-color: #ffffff;
  border: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-left: 15px; /* Add spacing between cart items and summary */
}

.cart-summary:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.cart-summary .card-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 18px 20px;
}

.cart-summary .card-header h5 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  color: #333;
}

.cart-summary .card-body {
  padding: 20px 25px;
}

/* ENHANCED: Price Detail Rows */
.price-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  font-size: 0.95rem;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.07);
}

.price-detail-row:last-of-type {
  border-bottom: none;
}

.price-detail-row.total {
  font-weight: bold;
  font-size: 1.2rem;
  border-top: 2px solid #e9ecef;
  padding-top: 18px;
  margin-top: 5px;
  color: var(--primary-color);
}

.price-detail-row .discount {
  color: #28a745;
  font-weight: 600;
}

.price-detail-row span:first-child {
  color: #6c757d;
}

.price-detail-row span:last-child {
  font-weight: 600;
  color: #333;
}

.price-detail-row.total span:last-child {
  font-weight: 700;
  color: var(--primary-color);
  font-size: 1.25rem;
}

/* ENHANCED: Checkout Button */
.checkout-btn {
  width: 100%;
  padding: 15px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 15px;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.checkout-btn:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.1);
  z-index: -2;
}

.checkout-btn:before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.15);
  transition: all 0.3s;
  z-index: -1;
}

.checkout-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.3);
}

.checkout-btn:hover:before {
  width: 100%;
}

.checkout-btn i {
  margin-left: 10px;
  transition: transform 0.2s;
}

.checkout-btn:hover i {
  transform: translateX(4px);
}

/* Coupon section */
.coupon-card {
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
  margin-top: 20px;
  transition: transform 0.3s ease;
  margin-left: 15px; /* Add spacing between cart items and coupon */
}

.coupon-card:hover {
  transform: translateY(-5px);
}

.coupon-card .card-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 18px 20px;
}

.coupon-card .card-header h5 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  color: #333;
}

.coupon-card .card-body {
  padding: 20px 25px;
}

.coupon-card .form-control {
  border-top-left-radius: 30px;
  border-bottom-left-radius: 30px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding-left: 20px;
  height: 50px;
}

.coupon-card .btn {
  border-top-right-radius: 30px;
  border-bottom-right-radius: 30px;
  padding-right: 25px;
  padding-left: 25px;
  font-weight: 600;
}

/* Cart actions */
.cart-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background-color: #f8f9fa;
  border-top: 1px solid #dee2e6;
}

.continue-shopping {
  display: flex;
  align-items: center;
  transition: all 0.2s;
}

.continue-shopping i {
  margin-right: 8px;
  transition: transform 0.2s;
}

.continue-shopping:hover i {
  transform: translateX(-3px);
}

#clear-cart-btn {
  display: flex;
  align-items: center;
}

#clear-cart-btn i {
  margin-right: 8px;
}

/* Responsive styles */
@media (max-width: 991px) {
  .cart-summary {
    position: relative;
    top: 0;
    margin-top: 20px;
    margin-left: 0;
  }
  
  .coupon-card {
    margin-left: 0;
  }
}

@media (max-width: 767px) {
  .cart-table .product-thumbnail {
    width: 80px;
  }
  
  .cart-item-img {
    width: 60px;
    height: 60px;
  }
  
  .cart-table td {
    padding: 10px;
  }
  
  .cart-actions {
    flex-direction: column;
    gap: 15px;
  }
  
  .continue-shopping, #clear-cart-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Cart content container - ensure proper layout */
#cart-content {
  display: flex;
  flex-wrap: wrap;
}

#cart-content > .cart-items-container {
  flex: 1 1 60%;
  min-width: 0;
}

#cart-content > .cart-summary-container {
  flex: 1 1 30%;
  min-width: 300px;
  margin-left: 20px;
}

@media (max-width: 991px) {
  #cart-content {
    flex-direction: column;
  }
  
  #cart-content > .cart-summary-container {
    margin-left: 0;
    margin-top: 20px;
  }
}
