/* ==========================================================================
   Latest Arrivals Section (5 Products Grid directly under Parallax)
   ========================================================================== */

.latest-arrivals-section {
  width: 100%;
  padding: 16px 24px 70px;
  background-color: #ffffff;
}

.latest-arrivals-wrapper {
  max-width: 1540px;
  margin: 0 auto;
}

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

/* Product Card */
.latest-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;
}

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

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

.latest-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);
}

.latest-img-primary {
  opacity: 1;
  z-index: 1;
}

.latest-img-hover {
  opacity: 0;
  z-index: 2;
  transform: scale(1.04);
}

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

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

/* Badges */
.latest-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;
}

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

.latest-badge.dark {
  background-color: #1a1a1a;
  color: #ffffff;
}

/* Wishlist Button */
.latest-card .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);
}

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

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

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

/* Quick View Overlay */
.latest-card .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);
}

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

.latest-card .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 */
.latest-info {
  padding: 14px 8px 10px;
  text-align: center;
}

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

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

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

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

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

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

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

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

@media (max-width: 992px) {
  .latest-arrivals-section {
    padding: 14px 16px 50px;
  }
  .latest-grid-5 {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

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

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