/**
 * Shopping Cart Styles
 */

/* Cart Container */
.seecommerce-cart {
  max-width: 1000px;
  margin: 32px auto;
  padding: 0 20px;
}

@media (max-width: 640px) {
  .seecommerce-cart {
    margin: 16px auto;
    padding: 0 16px;
  }
}

.cart-wrapper {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  padding: 32px;
}

@media (max-width: 1024px) {
  .cart-wrapper {
    padding: 24px;
  }
}

@media (max-width: 640px) {
  .cart-wrapper {
    padding: 20px;
  }
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.cart-header h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: #111827;
}

.btn-clear {
  padding: 8px 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  color: #6b7280;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-clear:hover {
  border-color: #dc2626;
  color: #dc2626;
}

/* Cart Content Layout */
.cart-content {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 32px;
}

@media (max-width: 1024px) {
  .cart-content {
    grid-template-columns: 1fr;
  }
}

/* Cart Items */
.cart-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  transition: all 0.2s;
}

.cart-item:hover {
  border-color: #0073aa;
  box-shadow: 0 2px 8px rgba(0, 115, 170, 0.1);
}

/* Row 1: Product Name + Quantity Controls + Remove */
.item-row-1 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

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

.item-name {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Quantity Controls */
.quantity-controls {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.qty-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  background: #f8f9fa;
  border: none;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:hover:not(:disabled) {
  background: #e9ecef;
  color: #0073aa;
}

.qty-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.qty-input {
  width: 48px;
  height: 32px;
  padding: 0;
  border: none;
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  background: #fff;
  -moz-appearance: textfield;
}

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

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

/* Remove Button */
.btn-remove {
  width: 32px;
  height: 32px;
  padding: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 20px;
  line-height: 1;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-remove:hover {
  background: #fee2e2;
  border-color: #fecaca;
  color: #dc2626;
}

/* Row 2: Unit Price + Total */
.item-row-2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.item-price {
  font-size: 18px;
  font-weight: 600;
  color: #0073aa;
}

.item-total {
  display: flex;
  align-items: center;
  gap: 6px;
}

.total-label {
  font-size: 14px;
  color: #666;
}

.total-amount {
  font-size: 18px;
  font-weight: 700;
  color: #333;
}

@media (max-width: 768px) {
  .item-name {
    font-size: 14px;
  }

  .qty-btn {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  .qty-input {
    width: 40px;
    height: 28px;
    font-size: 13px;
  }

  .btn-remove {
    width: 28px;
    height: 28px;
    font-size: 18px;
  }

  .item-price,
  .total-amount {
    font-size: 16px;
  }

  .total-label {
    font-size: 13px;
  }
}

/* Cart Summary */
.cart-summary {
  position: sticky;
  top: 32px;
}

.summary-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 24px;
}

.summary-card h3 {
  margin: 0 0 24px;
  font-size: 20px;
  font-weight: 700;
  color: #111827;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
  color: #6b7280;
}

.summary-row.total {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 2px solid #e5e7eb;
  border-bottom: none;
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}

.checkout-btn {
  margin: 24px 0 16px;
}

.continue-shopping {
  display: block;
  text-align: center;
  padding: 12px;
  color: #6b7280;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s;
}

.continue-shopping:hover {
  color: #2563eb;
}

/* Empty Cart */
.seecommerce-cart-empty {
  text-align: center;
  padding: 80px 20px;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 24px;
  opacity: 0.5;
}

.seecommerce-cart-empty h2 {
  margin: 0 0 16px;
  font-size: 24px;
  font-weight: 700;
  color: #111827;
}

.seecommerce-cart-empty p {
  margin: 0 0 32px;
  color: #6b7280;
  font-size: 16px;
}

/* Notifications */
.seecommerce-notification {
  position: fixed;
  bottom: -100px;
  right: 24px;
  background: #111827;
  color: #fff;
  padding: 16px 24px;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  font-size: 14px;
  font-weight: 500;
  transition: bottom 0.3s ease;
  z-index: 9999;
}

.seecommerce-notification.show {
  bottom: 24px;
}

.seecommerce-notification.success {
  background: #059669;
}

.seecommerce-notification.error {
  background: #dc2626;
}

/* Button States */
.add-to-cart.success {
  background: #059669 !important;
}

.add-to-cart.error {
  background: #dc2626 !important;
}
