/* Cart Sidebar Partial Styles */

/* Admin-specific cart sidebar styles */
body.layout-fixed .cart-sidebar {
  z-index: 99999; /* Higher z-index for admin pages */
}

body.layout-fixed .cart-sidebar-panel {
  top: 0;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: none;
}

.cart-sidebar.active {
  display: block;
}

.cart-sidebar-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cart-sidebar.active .cart-sidebar-overlay {
  opacity: 1;
}

.cart-sidebar-panel {
  position: absolute;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 420px;
  height: 100%;
  background-color: #fff;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
  overflow: hidden;
}

.cart-sidebar.active .cart-sidebar-panel {
  right: 0;
}

.cart-sidebar-header {
  padding: 1.25rem;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f8f9fa;
}

.cart-sidebar-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #212529;
}

.cart-sidebar-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #6c757d;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.cart-sidebar-close:hover {
  background-color: #e9ecef;
  color: #212529;
}

.cart-sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.cart-items-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: none;
}

.cart-item {
  display: flex;
  padding: 1rem;
  border-bottom: 1px solid #e9ecef;
  gap: 1rem;
}

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

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

.cart-item-details {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #212529;
  font-size: 0.95rem;
}

.cart-item-price {
  color: #6c757d;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

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

.cart-item-quantity-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #dee2e6;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.cart-item-quantity-btn:hover {
  background-color: #f8f9fa;
  border-color: #adb5bd;
}

.cart-item-quantity-input {
  width: 50px;
  text-align: center;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 0.25rem;
  font-size: 0.875rem;
}

.cart-item-remove {
  background: none;
  border: none;
  color: #dc3545;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.cart-item-remove:hover {
  color: #c82333;
}

.cart-sidebar-footer {
  padding: 1.25rem;
  border-top: 1px solid #e9ecef;
  background-color: #f8f9fa;
  display: none;
}

/* Professional Cart Action Buttons */
.cart-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cart-actions .btn {
  border: none;
  border-radius: 10px;
  padding: 0.875rem 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cart-actions .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;
}

.cart-actions .btn:hover::before {
  width: 300px;
  height: 300px;
}

.cart-actions .btn i {
  transition: transform 0.3s ease;
}

/* View Cart Button - Secondary Style */
.btn-view-cart {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  border: 2px solid transparent;
}

.btn-view-cart:hover {
  background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

.btn-view-cart:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-view-cart:hover i {
  transform: scale(1.1);
}

/* Proceed to Checkout Button - Primary Style */
.btn-checkout {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: #ffffff;
  border: 2px solid transparent;
  font-size: 1rem;
  padding: 1rem 1.5rem;
}

.btn-checkout:hover {
  background: linear-gradient(135deg, #e082ea 0%, #e4465b 100%);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 87, 108, 0.4);
}

.btn-checkout:active {
  transform: translateY(0);
  box-shadow: 0 3px 12px rgba(245, 87, 108, 0.3);
}

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

/* Shop Now Button - Professional Style */
.btn-shop-now {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: #ffffff !important;
  border: none;
  border-radius: 10px;
  padding: 1rem 1.5rem;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
  max-width: 100%;
}

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

.btn-shop-now:hover::before {
  width: 300px;
  height: 300px;
}

.btn-shop-now:hover {
  background: linear-gradient(135deg, #218838 0%, #1ea080 100%);
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.5);
}

.btn-shop-now:active {
  transform: translateY(0);
  box-shadow: 0 3px 12px rgba(40, 167, 69, 0.4);
}

.btn-shop-now i {
  transition: transform 0.3s ease;
}

.btn-shop-now:hover i {
  transform: scale(1.1) rotate(5deg);
}

.btn-shop-now:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.3);
}

/* Focus states for accessibility */
.cart-actions .btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.btn-checkout:focus {
  box-shadow: 0 0 0 3px rgba(245, 87, 108, 0.3);
}

.cart-empty-state {
  padding: 2rem 1rem;
}

.cart-empty-state i.cart-empty-icon {
  opacity: 0.3;
}

.cart-total {
  margin-bottom: 1rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .cart-sidebar-panel {
    max-width: 100%;
  }
  
  .cart-sidebar-header {
    padding: 1rem;
  }
  
  .cart-sidebar-title {
    font-size: 1.1rem;
  }
  
  .cart-item {
    padding: 0.75rem;
    gap: 0.75rem;
  }
  
  .cart-item-image {
    width: 60px;
    height: 60px;
  }
  
  .cart-item-name {
    font-size: 0.85rem;
  }
  
  .cart-item-price {
    font-size: 0.9rem;
  }
  
  .cart-item-quantity-btn {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
  }
  
  .cart-item-quantity-input {
    width: 40px;
    font-size: 0.85rem;
    padding: 0.25rem;
  }
  
  .cart-sidebar-footer {
    padding: 1rem;
  }
  
  .cart-actions .btn {
    padding: 0.875rem 1.25rem;
    font-size: 0.9rem;
  }

  .btn-checkout {
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
  }

  .btn-shop-now {
    padding: 0.875rem 1.25rem;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .cart-sidebar-content {
    padding: 0.75rem;
  }
  
  .cart-item {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .cart-item-image {
    width: 100%;
    height: 150px;
  }
  
  .cart-sidebar-panel {
    max-width: 100%;
  }
}

