/**
 * components/cards.css
 * Dedicated stylesheet for all card variants, product cards, promotional badges,
 * thumbnails, snippets, and gallery widgets.
 */

/* ==========================================================================
   1. Base Card Styles & Product Card Hover Aesthetics
   ========================================================================== */
.card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: none;
  background-color: #fff;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 4px 12px rgba(106, 27, 47, 0.05);
}

/* ==========================================================================
   2. Product Card Image & Badges
   ========================================================================== */
.product-image-container {
  background-color: var(--color-surface);
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.product-image-container img {
  object-fit: cover;
  width: 100%;
  aspect-ratio: 3 / 4; /* Standard aspect ratio for sarees & apparel */
}

/* Discount Badge Overlay */
.badge-discount {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background-color: var(--color-accent);
  color: #fff;
  font-weight: 600;
  padding: 0.25em 0.6em;
  font-size: 0.75rem;
}

/* Floating Circular Wishlist Button on Product Cards */
.btn-wishlist {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: #fff;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
}

.btn-wishlist:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

/* ==========================================================================
   3. Product Snippets & Summary Items
   ========================================================================== */
.product-snippet {
  transition: background-color 0.2s ease;
}

.product-snippet:hover {
  background-color: var(--color-border) !important;
}

.product-snippet-img {
  width: 50px;
  height: 65px;
  object-fit: cover;
}

/* Thumbnail in Checkout Order Summary */
.checkout-item-thumb {
  width: 60px;
  height: 75px;
  flex-shrink: 0;
}

/* Overlaid Quantity Badge */
.checkout-qty-badge {
  font-size: 0.65rem;
  min-width: 1.25rem;
  height: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Cart Item Thumbnail */
.cart-item-thumb {
  width: 100px;
  height: 133px;
  overflow: hidden;
  flex-shrink: 0;
}

.cart-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   4. Gallery Thumbnails & Carousel Controls
   ========================================================================== */
.thumbnail-item.active {
  border-color: var(--bs-primary) !important;
  opacity: 1 !important;
}

.product-thumbnails-row {
  scrollbar-width: thin;
}

.product-thumb-btn {
  transition: all 0.2s ease;
}

.product-thumb-btn.active {
  border-color: var(--color-primary, #1A1A1A) !important;
  opacity: 1 !important;
}

.product-carousel-control {
  width: 52px;
  opacity: 0.92;
  z-index: 5;
}

.carousel-control-icon-wrapper {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.92);
  color: var(--color-primary, #1A1A1A);
  font-size: 1.15rem;
  transition: all 0.2s ease;
}

.product-carousel-control:hover .carousel-control-icon-wrapper {
  background-color: #ffffff;
  color: var(--color-accent, #C5A880);
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
