/* ==========================================================================
   Best Sellers Section (Banner + 5 Products with Image Hover Flip)
   ========================================================================== */

.best-sellers-section {
  width: 100%;
  padding: 10px 24px 70px;
  background-color: #ffffff;
}

.best-sellers-wrapper {
  max-width: 1540px;
  margin: 0 auto;
}

/* Best Sellers Top Banner Image (bastsellers.png) */
.best-sellers-banner {
  width: 100%;
  margin-bottom: 16px;       /* Minimal gap right above the products */
  overflow: hidden;
  border-radius: 2px;
}

.best-sellers-banner img {
  width: 100%;
  height: auto;
  display: block;
}

/* 5 Products Grid Layout */
.products-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

/* Product Card */
.product-card {
  position: relative;
  background: #ffffff;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

/* Product Image Container with Dual Image Swap Effect */
.product-image-box {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.35;
  overflow: hidden;
  background-color: #f7f7f7;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  position: absolute;
  top: 0;
  left: 0;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Primary Image (Default visible) */
.product-img-primary {
  opacity: 1;
  z-index: 1;
}

/* Secondary Hover Image (Hidden by default, reveals on hover) */
.product-img-hover {
  opacity: 0;
  z-index: 2;
  transform: scale(1.04);
}

.product-card:hover .product-img-primary {
  opacity: 0;
  transform: scale(1.05);
}

.product-card:hover .product-img-hover {
  opacity: 1;
  transform: scale(1);
}

/* Product Badges (Sale / Best Seller) */
.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 5;
  background-color: var(--accent-color, #b01b4c);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 2px;
}

.product-badge.gold {
  background-color: var(--topbar-bg, #c5a880);
  color: #1a1a1a;
}

/* Wishlist Heart Icon Button */
.wishlist-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #555555;
  opacity: 0;
  transform: scale(0.85);
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-card:hover .wishlist-btn {
  opacity: 1;
  transform: scale(1);
}

.wishlist-btn:hover {
  color: var(--accent-color, #b01b4c);
  background-color: #ffffff;
  transform: scale(1.1);
}

.wishlist-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* Quick Add to Cart Overlay Bar */
.quick-view-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  padding: 10px 14px;
  text-align: center;
  z-index: 5;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.product-card:hover .quick-view-overlay {
  transform: translateY(0);
}

.quick-view-text {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Product Info / Details */
.product-info {
  padding: 14px 8px 10px;
  text-align: center;
}

.product-category {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #888888;
  font-weight: 500;
  margin-bottom: 4px;
}

.product-name {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 6px;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.product-card:hover .product-name {
  color: var(--accent-color, #b01b4c);
}

.product-price-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.current-price {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
}

.original-price {
  font-size: 13px;
  color: #999999;
  text-decoration: line-through;
  font-weight: 400;
}

.product-rating {
  font-size: 12px;
  color: #f59e0b;
  margin-top: 4px;
  letter-spacing: 2px;
}

/* Responsive Grid Adjustments */
@media (max-width: 1300px) {
  .products-grid-5 {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
}

@media (max-width: 992px) {
  .best-sellers-section {
    padding: 10px 16px 50px;
  }
  .best-sellers-banner {
    margin-bottom: 14px;
  }
  .products-grid-5 {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .best-sellers-section {
    padding: 10px 12px 40px;
  }
  .products-grid-5 {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  /* Hide 5th card on mobile to keep a balanced 2x2 grid */
  .products-grid-5 .product-card:nth-child(5) {
    display: none !important;
  }
  .best-sellers-banner {
    margin-bottom: 12px;
  }
  .product-image-box {
    aspect-ratio: 3 / 4;
  }
  .product-name {
    font-size: 12.5px;
    margin-bottom: 4px;
  }
  .current-price {
    font-size: 13.5px;
  }
  .original-price {
    font-size: 11.5px;
  }
  .wishlist-btn {
    opacity: 1;
    width: 28px;
    height: 28px;
    top: 8px;
    right: 8px;
    transform: scale(1);
  }
  .product-badge {
    font-size: 8.5px;
    padding: 3px 7px;
    top: 8px;
    left: 8px;
  }
}

@media (max-width: 480px) {
  .products-grid-5 {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .best-sellers-section {
    padding: 8px 8px 30px;
  }
}
