/* =========================================================================
   AQWAKE BEST SELLERS 3D CONCAVE RIBBON CAROUSEL
   Adapted for Proud Mary Coffee with Specialty Elegance
   Mobile Optimized — Zero Horizontal Scroll
   ========================================================================= */

/* Eyebrow Pill */
.carousel-eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(43, 76, 63, 0.08);
  border: 1px solid rgba(43, 76, 63, 0.2);
  color: var(--color-forest, #2b4c3f);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

.carousel-eyebrow-pill i {
  color: var(--color-amber, #c8723c);
  font-size: 0.75rem;
}

/* 3D Concave Amphitheater Stage Wrap */
.bestsellers-3d-stage-wrap {
  position: relative;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  perspective-origin: 50% 50%;
  overflow: visible;
  user-select: none;
  touch-action: pan-y;
  padding: 20px 0;
}

/* Flanking Stage Nav Arrows */
.bestsellers-3d-stage-wrap .stage-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 60;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(26, 23, 21, 0.12);
  color: #1a1715;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  outline: none;
}

.bestsellers-3d-stage-wrap .stage-nav-arrow:hover {
  background: #1a1715;
  color: #ffffff;
  border-color: #1a1715;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  transform: translateY(-50%) scale(1.08);
}

.bestsellers-3d-stage-wrap .stage-nav-arrow:active {
  transform: translateY(-50%) scale(0.96);
}

.bestsellers-3d-stage-wrap .stage-nav-arrow.arrow-left {
  left: 10px;
}

.bestsellers-3d-stage-wrap .stage-nav-arrow.arrow-right {
  right: 10px;
}

@media (min-width: 1200px) {
  .bestsellers-3d-stage-wrap .stage-nav-arrow.arrow-left {
    left: -20px;
  }
  .bestsellers-3d-stage-wrap .stage-nav-arrow.arrow-right {
    right: -20px;
  }
}

/* Dynamic 3D Amphitheater Ring Container */
.bestsellers-3d-ring {
  position: relative;
  width: 100%;
  height: 480px;
  transform-style: preserve-3d;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Individual Product Card in 3D Stage */
.bestsellers-3d-ring .product-card {
  position: absolute;
  width: 300px;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid rgba(26, 23, 21, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1),
              opacity 0.45s cubic-bezier(0.25, 1, 0.5, 1),
              box-shadow 0.35s ease;
  will-change: transform, opacity;
  transform-origin: center center;
  cursor: pointer;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.bestsellers-3d-ring .product-card.active-center {
  box-shadow: 0 24px 50px rgba(26, 23, 21, 0.16), 0 4px 12px rgba(200, 114, 60, 0.08);
  border-color: rgba(43, 76, 63, 0.25);
  cursor: default;
}

/* Media Wrap */
.product-card .card-media-wrap {
  position: relative;
  width: 100%;
  height: 240px;
  background: #f7f4ee;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card .card-media-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.product-card:hover .card-media-wrap img {
  transform: scale(1.05);
}

/* Card Badges */
.product-card .card-badges {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.product-card .badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 999px;
  line-height: 1.2;
}

.product-card .badge-best {
  background: #1a1715;
  color: #ffffff;
}

.product-card .badge-popular {
  background: var(--color-amber, #c8723c);
  color: #ffffff;
}

.product-card .badge-new {
  background: var(--color-forest, #2b4c3f);
  color: #ffffff;
}

.product-card .badge-limited {
  background: #8b3a3a;
  color: #ffffff;
}

/* Wishlist Button */
.product-card .wishlist-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 6;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: #71717a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.product-card .wishlist-btn:hover {
  background: #ffffff;
  color: #e24a4a;
  transform: scale(1.1);
}

.product-card .wishlist-btn.active {
  color: #e24a4a;
  background: #ffffff;
}

.product-card .wishlist-btn.active i {
  font-weight: 900;
}

/* Quick Action Overlay */
.product-card .card-quick-actions {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  z-index: 5;
  display: flex;
  gap: 8px;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.product-card:hover .card-quick-actions,
.product-card.active-center .card-quick-actions {
  opacity: 1;
  transform: translateY(0);
}

.card-quick-btn {
  flex: 1;
  padding: 8px 10px;
  font-size: 0.74rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.card-quick-btn.btn-view {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  color: #1a1715;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.card-quick-btn.btn-view:hover {
  background: #ffffff;
  color: var(--color-forest, #2b4c3f);
}

.card-quick-btn.btn-add {
  background: var(--color-forest, #2b4c3f);
  color: #ffffff;
}

.card-quick-btn.btn-add:hover {
  background: #1e362c;
  transform: translateY(-1px);
}

/* Card Body */
.product-card .card-body {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-card .card-category-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.product-card .card-category {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-amber, #c8723c);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.product-card .card-profile-tag {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(43, 76, 63, 0.08);
  color: var(--color-forest, #2b4c3f);
}

.product-card .card-title {
  font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a1715;
  margin: 0 0 8px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card .card-rating-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 0.75rem;
  color: #71717a;
}

.product-card .card-rating-row .stars {
  color: #f59e0b;
  font-size: 0.72rem;
  letter-spacing: 1px;
}

.product-card .card-tasting-notes {
  font-size: 0.74rem;
  color: #52525b;
  line-height: 1.4;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card .card-footer-row {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: nowrap;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.product-card .card-price-stack {
  display: flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.product-card .card-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: #1a1715;
  white-space: nowrap;
  line-height: 1;
}

.product-card .card-compare-price {
  font-size: 0.8rem;
  color: #a1a1aa;
  text-decoration: line-through;
  white-space: nowrap;
  line-height: 1;
}

.product-card .card-bag-size {
  font-size: 0.7rem;
  font-weight: 600;
  color: #71717a;
  background: #f4f4f5;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 115px;
}

/* Indicators Container */
.carousel-indicators-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.carousel-indicator-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(26, 23, 21, 0.2);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.carousel-indicator-dot:hover {
  background: rgba(26, 23, 21, 0.45);
}

.carousel-indicator-dot.active {
  width: 28px;
  background: var(--color-forest, #2b4c3f);
  border-radius: 999px;
}

/* Mobile & Tablet Optimizations */
@media (max-width: 768px) {
  .bestsellers-section {
    overflow: hidden;
    width: 100%;
    max-width: 100vw;
  }
  .bestsellers-3d-stage-wrap {
    min-height: 460px;
    padding: 10px 0;
    overflow: hidden;
  }
  .bestsellers-3d-ring {
    height: 420px;
  }
  .bestsellers-3d-ring .product-card {
    width: 250px;
  }
  .product-card .card-media-wrap {
    height: 190px;
  }
  .bestsellers-3d-stage-wrap .stage-nav-arrow {
    width: 38px;
    height: 38px;
    font-size: 0.85rem;
    z-index: 70;
  }
  .bestsellers-3d-stage-wrap .stage-nav-arrow.arrow-left {
    left: 4px;
  }
  .bestsellers-3d-stage-wrap .stage-nav-arrow.arrow-right {
    right: 4px;
  }
}

@media (max-width: 480px) {
  .bestsellers-3d-stage-wrap {
    min-height: 430px;
  }
  .bestsellers-3d-ring {
    height: 395px;
  }
  .bestsellers-3d-ring .product-card {
    width: 228px;
    border-radius: 14px;
  }
  .product-card .card-media-wrap {
    height: 170px;
  }
  .product-card .card-body {
    padding: 12px 12px 14px;
  }
  .product-card .card-title {
    font-size: 0.95rem;
    margin-bottom: 4px;
  }
  .product-card .card-rating-row {
    margin-bottom: 8px;
    font-size: 0.7rem;
  }
  .product-card .card-tasting-notes {
    display: none;
  }
  .product-card .card-price {
    font-size: 1rem;
    white-space: nowrap;
  }
  .product-card .card-compare-price {
    font-size: 0.75rem;
    white-space: nowrap;
  }
  .product-card .card-bag-size {
    font-size: 0.65rem;
    padding: 2px 6px;
    max-width: 90px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
