
.cart-page-container {
  padding: 40px 0;
  min-height: 80vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.cart-header {
  text-align: center;
  margin-bottom: 10px;
}

.cart-header h1 {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 10px;
}

.cart-header .header-line {
  width: 100px;
  height: 4px;
  background: var(--primary-blue);
  margin: 0 auto;
  border-radius: 2px;
}

.cart-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  align-items: flex-start;
}

/* Cart Item Card */
.cart-items-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cart-item-card {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--gray-200);
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
  transition: transform 0.3s, box-shadow 0.3s;
}

.cart-item-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.item-image img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid var(--gray-100);
}

.item-details {
  flex-grow: 1;
  margin: 0 20px;
}

.item-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 5px;
}

.item-price {
  font-size: 1rem;
  color: var(--primary-blue);
  font-weight: 500;
  margin-bottom: 15px;
}

.quantity-selector {
  display: flex;
  align-items: center;
}

.btn-quantity {
  width: 35px;
  height: 35px;
  border: none;
  background: var(--gray-800);
  color: white;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-quantity:hover {
  transform: scale(1.1);
  background: var(--primary-blue);
  box-shadow: var(--shadow-md);
}

.quantity-input {
  width: 50px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--gray-800);
  margin: 0 10px;
  -moz-appearance: textfield;
  appearance: textfield;
}

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

.item-actions {
  text-align: left;
}

.item-total {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 15px;
}

.btn-remove {
  background: none;
  border: none;
  color: #aaa;
  font-size: 1.2rem;
  cursor: pointer;
  transition: color 0.3s, transform 0.3s;
}

.btn-remove:hover {
  color: var(--primary-blue);
  transform: scale(1.2);
}

/* Summary Card */
.summary-card {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--gray-200);
  border-radius: 15px;
  padding: 30px;
  position: sticky;
  top: 120px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}

.summary-shimmer {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(transparent, rgba(37, 182, 255, 0.15), transparent 30%);
  animation: rotate 8s linear infinite;
  z-index: -1;
}

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

.summary-card h2 {
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 25px;
  color: var(--gray-800);
}

.summary-item, .summary-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  font-size: 1rem;
}

.summary-item span:first-child, .summary-total span:first-child {
  color: #555;
}

.summary-item span:last-child, .summary-total span:last-child {
  font-weight: 600;
  color: var(--gray-800);
}

.free-shipping {
  color: #28a745 !important;
  font-weight: 600;
}

.summary-separator {
  height: 1px;
  background-color: rgba(0,0,0,0.1);
  margin: 20px 0;
}

.summary-total {
  font-size: 1.3rem;
  font-weight: 700;
}

.btn-checkout {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 50px;
  background: var(--gray-800);
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  margin-top: 20px;
}

.btn-checkout:hover {
  transform: translateY(-3px);
  background: var(--primary-blue);
  color: white;
  box-shadow: var(--shadow-lg);
}

.btn-checkout i {
  margin-left: 10px; /* Switched from margin-right for RTL */
  transition: transform 0.3s;
}

.btn-checkout:hover i {
  transform: translateX(5px); /* Switched to positive for RTL */
}

/* Empty Cart */
.empty-cart-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 50vh;
}

.empty-cart-card {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  max-width: 500px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}

.empty-cart-icon {
  font-size: 4rem;
  color: var(--gray-400);
  margin-bottom: 20px;
}

.empty-cart-card h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 15px;
}

.empty-cart-card p {
  color: #555;
  margin-bottom: 25px;
}

.btn-gradient {
    background: var(--gray-800);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
    display: inline-block;
    align-items: center;
    gap: 10px;
}

.btn-gradient:hover {
    transform: translateY(-3px);
    background: var(--primary-blue);
    box-shadow: var(--shadow-lg);
    box-shadow: var(--shadow-lg);
    color: white;
}

/* Responsive */
@media (max-width: 992px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }
  .summary-card {
    position: static;
    margin-top: 30px;
  }
}

@media (max-width: 576px) {
  .cart-item-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .item-image {
    margin-bottom: 15px;
  }
  .item-details {
    margin: 0 0 15px 0;
  }
  .item-actions {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
  }
  .item-total {
    margin-bottom: 0;
  }
  .cart-header h1 {
    font-size: 2.2rem;
  }
  .btn-checkout {
      font-size: 1rem;
      padding: 12px;
  }
  .summary-card {
      padding: 20px;
  }
}

/* Delete Confirmation Modal */
.delete-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.delete-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.delete-modal {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  padding: 0;
  max-width: 450px;
  width: 90%;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  transform: scale(0.8) translateY(20px);
  transition: transform 0.3s ease;
  overflow: hidden;
  position: relative;
}

.delete-modal-overlay.show .delete-modal {
  transform: scale(1) translateY(0);
}

.delete-modal-header {
  text-align: center;
  padding: 30px 20px 20px;
  background: linear-gradient(135deg, rgba(37, 182, 255, 0.1), rgba(25, 74, 120, 0.1));
  position: relative;
}

.delete-modal-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-blue);
}

.delete-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
  animation: pulse 2s infinite;
}

.delete-icon i {
  font-size: 24px;
  color: white;
}

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

.delete-modal-header h3 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gray-800);
}

.delete-modal-body {
  padding: 20px 30px;
  text-align: center;
}

.delete-modal-body p {
  font-size: 1rem;
  color: #555;
  margin-bottom: 20px;
  line-height: 1.6;
}

.product-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  border: 1px solid var(--gray-200);
}

.product-preview img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--gray-100);
}

.product-preview span {
  font-weight: 600;
  color: var(--gray-800);
}

.delete-modal-actions {
  display: flex;
  gap: 15px;
  padding: 20px 30px 30px;
}

.btn-cancel, .btn-confirm-delete {
  flex: 1;
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-cancel {
  background: var(--gray-100);
  color: var(--gray-600);
  border: 1px solid var(--gray-300);
}

.btn-cancel:hover {
  background: var(--gray-200);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-confirm-delete {
  background: var(--primary-blue);
  color: white;
  border: 1px solid transparent;
}

.btn-confirm-delete:hover {
  background: var(--primary-blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 182, 255, 0.4);
}

/* Modal Animation */
@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes modalSlideOut {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  to {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
}

/* Responsive Modal */
@media (max-width: 576px) {
  .delete-modal {
    max-width: 95%;
    margin: 20px;
  }
  
  .delete-modal-header {
    padding: 25px 15px 15px;
  }
  
  .delete-modal-body {
    padding: 15px 20px;
  }
  
  .delete-modal-actions {
    padding: 15px 20px 25px;
    flex-direction: column;
  }
  
  .btn-cancel, .btn-confirm-delete {
    padding: 14px 20px;
  }
  
  .product-preview {
    flex-direction: column;
    gap: 10px;
  }
}
.cart-table {
    width: 100%;
    margin-bottom: 2rem;
  }
  
  .cart-table th {
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid var(--blue-200);
    padding: 1rem 0.5rem;
    background: var(--gray-50);
  }
  
  .cart-table td {
    vertical-align: middle;
    padding: 1.25rem 0.5rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
  }
  
  /* Quantity Controls */
  .quantity-control {
    display: flex;
    align-items: center;
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
    display: inline-block;
}

.btn-gradient:hover {
    transform: translateY(-3px);
    background: var(--primary-blue);
    box-shadow: var(--shadow-lg);
    color: white;
}

/* Responsive */
@media (max-width: 992px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }
  .summary-card {
    position: static;
    margin-top: 30px;
  }
}

@media (max-width: 576px) {
  .cart-item-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 15px;
  }
  .item-image {
    width: 100%;
    margin-bottom: 15px;
  }
  .item-image img {
    width: 100%;
    height: auto;
  }
  .item-details {
    margin: 0;
    width: 100%;
  }
  .item-actions {
    width: 100%;
      border: none;
      border-bottom: 1px dashed var(--gray-200);
    }
    
    .cart-table td:last-child {
      border-bottom: none;
    }
    
    .cart-table td::before {
      content: attr(data-label);
      font-weight: 600;
      margin-right: 1rem;
      color: #666;
    }
    
    .cart-table .quantity-control {
      margin-left: auto;
    }
  }
  
  /* Toast Notifications */
  .toast-container {
    z-index: 1090;
    min-width: 300px;
  }
  
  .toast {
    backdrop-filter: blur(10px);
    background-color: rgba(33, 37, 41, 0.9) !important;
  }
  
  /* Empty Cart */
  .empty-cart {
    text-align: center;
    padding: 3rem 1rem;
  }
  
  .empty-cart-icon {
    font-size: 4rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
  }
  
  /* Cart Summary */
  .cart-summary {
    background: var(--gray-50);
    border-radius: 15px;
    padding: 1.5rem;
    margin-top: 2rem;
    border: 1px solid rgba(212, 175, 55, 0.1);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.1);
  }
  
  .cart-summary h4 {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-300);
    color: var(--primary-blue);
    font-family: 'Playfair Display', serif;
  }
  
  .summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
  }
  
  .summary-row.total {
    font-size: 1.25rem;
    font-weight: 600;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-300);
    margin-top: 1rem;
    color: var(--primary-blue);
  }