/* ===========================
   Cart & Wishlist Styles
   =========================== */

/* ── Container Layout ── */
.shopping-container {
  padding: 40px 0;
}

.shopping-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 32px;
}

/* ── Cart Item (Horizontal Card) ── */
.cart-item-card {
  background: white;
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.02);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 24px;
}

.cart-item-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.cart-item-img {
  width: 120px;
  height: 120px;
  background: var(--surface-color);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cart-item-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.cart-item-info {
  flex: 1;
}

.cart-item-info h5 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-color);
}

.cart-item-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-color);
}

/* ── Quantity Control ── */
.quantity-control {
  display: flex;
  align-items: center;
  background: var(--surface-color);
  border-radius: 12px;
  padding: 4px;
  width: fit-content;
}

.qty-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  transition: var(--transition);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.qty-btn:hover {
  background: var(--primary-color);
  color: white;
}

.qty-input {
  width: 40px;
  border: none;
  background: transparent;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
}

/* ── Cart Summary Sidebar ── */
.summary-card {
  background: white;
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.02);
  position: sticky;
  top: 100px;
}

.summary-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 24px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 16px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 2px solid #f1f5f9;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-color);
}

.btn-checkout {
  margin-top: 32px;
  height: 56px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 16px;
}

/* ── Wishlist Card (Vertical like Shop) ── */
/* Reuses .product-card from shop.css, but we'll add specific wishlist overrides if needed */
.wishlist-actions {
  display: flex;
  gap: 8px;
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  background: white;
  border-radius: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.empty-state-icon {
  width: 80px;
  height: 80px;
  background: #eff6ff;
  color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 24px;
}

/* ── Responsive ── */
@media (max-width: 991px) {
  .shopping-container {
    padding: 24px 0;
  }

  .shopping-title {
    font-size: 1.5rem;
    margin-bottom: 24px;
  }
}

@media (max-width: 768px) {
  .cart-item-card {
    flex-direction: row; /* Keep image and info side-by-side if possible, or stack better */
    flex-wrap: wrap;
    padding: 16px;
    gap: 16px;
  }

  .cart-item-img {
    width: 80px;
    height: 80px;
    padding: 8px;
  }

  .cart-item-info {
    width: calc(100% - 100px);
    flex: none;
  }

  .cart-item-info h5 {
    font-size: 0.95rem;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .cart-item-info .d-flex.align-items-center.justify-content-between {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 12px;
  }

  .quantity-control {
    order: 2;
  }

  .cart-item-info .text-end {
    order: 1;
    text-align: left !important;
  }

  .cart-item-card > .ms-lg-3 {
    margin-left: 0 !important;
    width: 100%;
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
    margin-top: 4px;
  }
}

@media (max-width: 576px) {
  .shopping-title {
    font-size: 1.25rem;
  }

  .btn-primary-modern {
    padding: 8px 16px;
    font-size: 0.85rem;
  }
}
