/* ==========================================================================
   MEDICUBE US - BEST SELLERS COLLECTION & PRODUCT CARD STYLES
   ========================================================================== */

/* Breadcrumbs */
.breadcrumbs {
  padding: 16px 0 8px;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.breadcrumbs a {
  color: var(--color-text-muted);
}

.breadcrumbs a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.breadcrumbs span {
  margin: 0 6px;
}

/* Collection Hero */
.collection-hero {
  padding: 24px 0 32px;
  text-align: center;
  position: relative;
}

.collection-hero__title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: var(--color-primary);
}

.collection-hero__description {
  max-width: 680px;
  margin: 0 auto 24px;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Value Props / Trust Badges */
.trust-badges-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  background-color: var(--color-bg-light);
  padding: 16px 20px;
  border-radius: var(--border-radius-md);
  margin-bottom: 32px;
}

.trust-badge-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #222222;
}

.trust-badge-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  fill: var(--color-primary);
}

/* Shoppable Stories / UGC Reels */
.community-reels-section {
  margin-bottom: 36px;
}

.section-subtitle {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--color-accent-red);
  margin-bottom: 4px;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.reels-slider {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 12px;
  -webkit-overflow-scrolling: touch;
}

.reels-slider::-webkit-scrollbar {
  height: 4px;
}

.reels-slider::-webkit-scrollbar-thumb {
  background-color: #d1d1d1;
  border-radius: 4px;
}

.reel-card {
  flex: 0 0 160px;
  height: 250px;
  border-radius: var(--border-radius-md);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  scroll-snap-align: start;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.reel-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.reel-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reel-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
  color: #ffffff;
}

.reel-play-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  background-color: rgba(255,255,255,0.3);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reel-play-icon svg {
  width: 12px;
  height: 12px;
  fill: #ffffff;
}

.reel-product-tag {
  font-size: 0.6875rem;
  background-color: rgba(255, 255, 255, 0.95);
  color: #121212;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 6px;
  align-self: flex-start;
}

.reel-title {
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
}

/* Collection Controls / Filter & Sort Bar */
.collection-controls {
  position: sticky;
  top: var(--header-height);
  z-index: 90;
  background-color: #ffffff;
  padding: 14px 0;
  margin-bottom: 24px;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: top var(--transition-fast);
}

.filter-categories-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0;
  -webkit-overflow-scrolling: touch;
  min-width: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.filter-categories-pills::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1px solid var(--color-border);
  background-color: #ffffff;
  color: #444444;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-pill:hover {
  border-color: #000000;
  color: #000000;
}

.filter-pill.active {
  background-color: #000000;
  color: #ffffff;
  border-color: #000000;
  font-weight: 600;
}

.controls-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.product-count-label {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.sort-select-wrapper {
  position: relative;
  display: inline-block;
}

.sort-select {
  appearance: none;
  -webkit-appearance: none;
  padding: 7px 32px 7px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-sm);
  background-color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #222222;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.sort-select:focus,
.sort-select:hover {
  border-color: #000000;
}

.sort-select-wrapper::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #444444;
  pointer-events: none;
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px 18px;
  margin-bottom: 48px;
}

/* Product Card */
.product-card {
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform var(--transition-normal);
}

.product-card:hover {
  /* subtle lift */
}

/* Card Media / Image */
.product-card__media {
  position: relative;
  width: 100%;
  padding-bottom: 100%; /* 1:1 Aspect Ratio */
  background-color: #f7f7f7;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  margin-bottom: 12px;
}

.product-card__media a {
  position: absolute;
  inset: 0;
  display: block;
}

.product-card__image-primary,
.product-card__image-secondary {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.35s ease, transform 0.4s ease;
}

.product-card__image-secondary {
  opacity: 0;
}

.product-card:hover .product-card__image-secondary {
  opacity: 1;
}

.product-card:hover .product-card__image-primary {
  opacity: 0;
}

.product-card:hover .product-card__image-secondary,
.product-card:hover .product-card__image-primary {
  transform: scale(1.03);
}

/* Product Badges */
.product-card__badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 2;
  pointer-events: none;
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 2px;
  line-height: 1.2;
}

.badge-sale {
  background-color: var(--color-accent-red);
  color: #ffffff;
}

.badge-new {
  background-color: #111111;
  color: #ffffff;
}

.badge-bestseller {
  background-color: #111111;
  color: #ffffff;
}

.badge-limited {
  background-color: #e599b2;
  color: #ffffff;
}

/* Wishlist Button */
.btn-wishlist {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: #666666;
}

.btn-wishlist:hover {
  background-color: #ffffff;
  color: var(--color-accent-red);
  transform: scale(1.1);
}

.btn-wishlist.active {
  color: var(--color-accent-red);
  fill: var(--color-accent-red);
}

/* Quick View Overlay Button on Hover */
.btn-quick-view {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background-color: rgba(255, 255, 255, 0.95);
  color: #121212;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 8px 16px;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  border: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  white-space: nowrap;
  z-index: 3;
}

.product-card:hover .btn-quick-view {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.btn-quick-view:hover {
  background-color: #000000;
  color: #ffffff;
}

/* Card Content */
.product-card__content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Rating */
.product-card__rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 0.75rem;
}

.rating-stars {
  display: flex;
  gap: 2px;
  color: var(--color-star);
}

.rating-star-icon {
  width: 13px;
  height: 13px;
  fill: var(--color-star);
}

.rating-count {
  color: var(--color-text-muted);
  font-size: 0.75rem;
}

/* Title */
.product-card__title {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 4px;
  color: #121212;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}

.product-card__title a:hover {
  color: var(--color-accent-red);
}

/* Product Subtitle / Type */
.product-card__type {
  font-size: 0.75rem;
  color: var(--color-text-light);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Pricing */
.product-card__price-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}

.price-current {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #000000;
}

.price-sale-highlight {
  color: var(--color-sale-red);
}

.price-compare {
  font-size: 0.875rem;
  color: var(--color-text-light);
  text-decoration: line-through;
}

.price-save-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--color-sale-red);
  background-color: #ffebee;
  padding: 1px 6px;
  border-radius: 4px;
}

/* Variant Selector */
.product-card__variants {
  margin-bottom: 10px;
}

.product-card__variant-select {
  width: 100%;
  padding: 6px 10px;
  font-size: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-sm);
  background-color: #fafafa;
  cursor: pointer;
  color: #333333;
}

.product-card__variant-select:focus {
  border-color: #000000;
  background-color: #ffffff;
}

/* Card Actions: Quantity Selector & Add Button */
.product-card__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.quantity-stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-sm);
  background-color: #ffffff;
  height: 38px;
  flex-shrink: 0;
}

.btn-qty {
  width: 28px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  color: #555555;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.btn-qty:hover {
  background-color: #f0f0f0;
  color: #000000;
}

.qty-input {
  width: 28px;
  height: 100%;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 600;
  border: none;
  background: none;
  -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.btn-add-to-cart {
  flex: 1;
  height: 38px;
  background-color: #000000;
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.btn-add-to-cart:hover {
  background-color: #333333;
}

.btn-add-to-cart:active {
  transform: scale(0.98);
}

.btn-add-to-cart.loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn-add-to-cart.added {
  background-color: var(--color-success);
}

/* Pagination / Load More */
.pagination-wrap {
  text-align: center;
  margin: 40px 0 60px;
}

.pagination-progress {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.btn-load-more {
  padding: 12px 36px;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background-color: #ffffff;
  border: 2px solid #000000;
  color: #000000;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.btn-load-more:hover {
  background-color: #000000;
  color: #ffffff;
}

/* Responsive Grid */
@media (max-width: 1200px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 14px;
  }
}

@media (max-width: 768px) {
  .collection-hero {
    padding: 16px 0 20px;
  }
  .collection-hero__title {
    font-size: 1.5rem;
    margin-bottom: 8px;
  }
  .collection-hero__description {
    font-size: 0.8125rem;
    line-height: 1.45;
    margin-bottom: 16px;
    padding: 0 4px;
  }
  .trust-badges-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 10px 12px;
    margin-bottom: 24px;
  }
  .trust-badge-item {
    font-size: 0.72rem;
    gap: 6px;
  }
  .trust-badge-icon {
    width: 18px;
    height: 18px;
  }
  .collection-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 10px 0;
    top: 54px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background-color: #ffffff;
  }
  .filter-categories-pills {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 2px;
  }
  .filter-pill {
    padding: 5px 11px;
    font-size: 0.75rem;
  }
  .controls-right {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .product-count-label {
    font-size: 0.75rem;
  }
  .sort-select {
    font-size: 0.78rem;
    padding: 6px 28px 6px 8px;
  }
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 8px;
    width: 100%;
    max-width: 100%;
  }
  .product-card {
    width: 100%;
    min-width: 0;
  }
  .product-card__title {
    font-size: 0.78rem;
    min-height: 2.4em;
    line-height: 1.25;
  }
  .price-current {
    font-size: 0.875rem;
  }
  .price-compare {
    font-size: 0.72rem;
  }
  .quantity-stepper {
    display: none;
  }
  .btn-add-to-cart {
    width: 100%;
    padding: 9px 8px;
    font-size: 0.78rem;
  }
  .reels-slider {
    gap: 10px;
    padding-bottom: 8px;
    scrollbar-width: none;
  }
  .reels-slider::-webkit-scrollbar {
    display: none;
  }
  .reel-card {
    flex: 0 0 135px;
    height: 210px;
  }
}

@media (max-width: 480px) {
  .trust-badges-bar {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 8px 10px;
  }
  .trust-badge-item span {
    font-size: 0.6875rem;
    line-height: 1.2;
  }
}
