/* ======= SHOPPING CART PAGE ======= */
.cart-page {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
  padding: 2rem 0;
}

.cart-container {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ======= CART ITEMS SECTION ======= */
.cart-items-section {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.cart-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 2rem;
  color: white;
}

.cart-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cart-title i {
  font-size: 1.5rem;
}

.cart-count {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-left: auto;
}

/* ======= CART ITEMS LIST ======= */
.cart-items-list {
  padding: 1.5rem;
}

.cart-item-card {
  display: grid;
  grid-template-columns: 120px 1fr auto auto auto;
  gap: 1.5rem;
  padding: 1.5rem;
  border-radius: 12px;
  background: white;
  border: 2px solid #f0f0f0;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
  position: relative;
  align-items: center;
}

.cart-item-card:hover {
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
  transform: translateY(-2px);
}

/* Image */
.cart-item-image-wrapper {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  overflow: hidden;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.cart-item-card:hover .cart-item-img {
  transform: scale(1.05);
}

.cart-item-placeholder {
  color: #dee2e6;
  font-size: 3rem;
}

/* Details */
.cart-item-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.cart-item-name {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  color: #2d3748;
}

.cart-item-name a {
  color: #667eea;
  text-decoration: none;
  transition: color 0.2s ease;
}

.cart-item-name a:hover {
  color: #764ba2;
  text-decoration: underline;
}

.cart-item-meta {
  display: flex;
  gap: 0.5rem;
}

.cart-item-meta .badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  font-weight: 500;
}

.cart-item-price-mobile {
  display: none;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #4a5568;
}

.cart-item-price-mobile .price-label {
  font-weight: 500;
  color: #718096;
}

.cart-item-price-mobile .price-value {
  font-weight: 700;
  color: #2d3748;
  margin-left: 0.5rem;
}

/* Quantity Controls */
.cart-item-quantity {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.quantity-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #718096;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.quantity-controls {
  display: flex;
  align-items: center;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.qty-btn {
  background: #f7fafc;
  border: none;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #4a5568;
}

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

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

.qty-input {
  width: 50px;
  height: 36px;
  border: none;
  text-align: center;
  font-weight: 600;
  color: #2d3748;
  font-size: 1rem;
  background: white;
}

.qty-input:focus {
  outline: none;
}

/* Remove number input spinners */
.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qty-input[type=number] {
  -moz-appearance: textfield;
}

/* Price Column */
.cart-item-price {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: right;
  min-width: 100px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.price-label {
  font-size: 0.75rem;
  color: #718096;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.price-amount {
  font-size: 1rem;
  font-weight: 700;
  color: #2d3748;
}

.price-row.total {
  margin-top: 0.25rem;
  padding-top: 0.5rem;
  border-top: 1px solid #e2e8f0;
}

.price-row.total .price-amount {
  font-size: 1.25rem;
  color: #667eea;
}

/* Remove Button */
.cart-item-remove {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #fff5f5;
  color: #e53e3e;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
}

.cart-item-remove:hover {
  background: #e53e3e;
  color: white;
  transform: rotate(90deg);
}

/* ======= CART SUMMARY SECTION ======= */
.cart-summary-section {
  position: sticky;
  top: 2rem;
  height: fit-content;
}

.cart-summary-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.summary-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1.5rem 0;
  color: #2d3748;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  color: #4a5568;
}

.summary-label {
  font-size: 0.9375rem;
  font-weight: 500;
}

.summary-value {
  font-size: 1rem;
  font-weight: 600;
  color: #2d3748;
}

.summary-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
  margin: 1rem 0;
}

.summary-row.total {
  padding: 1rem 0 0 0;
  margin-top: 1rem;
  border-top: 2px solid #e2e8f0;
}

.summary-row.total .summary-label {
  font-size: 1.125rem;
  font-weight: 700;
  color: #2d3748;
}

.summary-row.total .summary-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #667eea;
}

/* Buttons */
.btn-checkout,
.btn-continue {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-checkout {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  margin: 1.5rem 0 0.75rem 0;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-checkout:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
  color: white;
}

.btn-continue {
  background: #f7fafc;
  color: #4a5568;
  border: 2px solid #e2e8f0;
}

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

/* Trust Badges */
.trust-badges {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.trust-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: #f7fafc;
  border-radius: 8px;
  text-align: center;
}

.trust-badge i {
  font-size: 1.5rem;
  color: #667eea;
}

.trust-badge span {
  font-size: 0.75rem;
  font-weight: 600;
  color: #4a5568;
}

/* ======= EMPTY CART ======= */
.cart-empty {
  padding: 4rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cart-empty-icon {
  font-size: 5rem;
  color: #cbd5e0;
  margin-bottom: 2rem;
}

.cart-empty-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #2d3748;
  margin: 0 0 1rem 0;
}

.cart-empty-text {
  font-size: 1.125rem;
  color: #718096;
  margin: 0 0 2rem 0;
  max-width: 500px;
}

.cart-empty .btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  padding: 1rem 2rem;
  font-size: 1.125rem;
  font-weight: 600;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  transition: all 0.3s ease;
}

.cart-empty .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

/* ======= WARNINGS ======= */
.cart-warnings {
  padding: 1.5rem;
}

.cart-warnings .alert {
  border-radius: 12px;
  border: none;
  background: #fffbeb;
  color: #92400e;
  padding: 1rem 1.25rem;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.2);
}

.cart-warnings .alert i {
  margin-right: 0.5rem;
  color: #f59e0b;
}

.cart-warnings .alert strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.cart-warnings .alert ul {
  margin: 0.5rem 0 0 1.5rem;
  padding: 0;
}

.cart-warnings .alert li {
  margin-bottom: 0.25rem;
}

/* ======= RESPONSIVE ======= */
@media (max-width: 1200px) {
  .cart-container {
    grid-template-columns: 1fr 350px;
  }
}

@media (max-width: 992px) {
  .cart-container {
    grid-template-columns: 1fr;
  }
  
  .cart-summary-section {
    position: static;
  }
  
  .cart-item-card {
    grid-template-columns: 100px 1fr;
    grid-template-rows: auto auto auto;
    gap: 1rem;
  }
  
  .cart-item-quantity {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
  }
  
  .quantity-label {
    order: -1;
  }
  
  .cart-item-price {
    display: none;
  }
  
  .cart-item-price-mobile {
    display: flex;
    gap: 0.5rem;
  }
}

@media (max-width: 640px) {
  .cart-page {
    padding: 1rem 0;
  }
  
  .cart-container {
    gap: 1rem;
  }
  
  .cart-header {
    padding: 1.5rem 1rem;
  }
  
  .cart-title {
    font-size: 1.25rem;
    flex-wrap: wrap;
  }
  
  .cart-count {
    margin-left: 0;
    margin-top: 0.5rem;
  }
  
  .cart-items-list {
    padding: 1rem;
  }
  
  .cart-item-card {
    padding: 1rem;
    gap: 0.75rem;
  }
  
  .cart-item-image-wrapper {
    width: 80px;
    height: 80px;
  }
  
  .cart-item-name {
    font-size: 1rem;
  }
  
  .cart-summary-card {
    padding: 1.5rem;
  }
  
  .trust-badges {
    grid-template-columns: 1fr;
  }
}
