/* CAPITAL VAPE - Catalog & Product Cards */

.catalog-section {
  padding: 70px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-title {
  font-size: 2.4rem;
  margin-bottom: 10px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* ==========================================================================
   FILTERS & SEARCH BAR
   ========================================================================== */
.catalog-toolbar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 36px;
  background: var(--bg-card);
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
}

.toolbar-top-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cat-pill-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.cat-pill-btn:hover, .cat-pill-btn.active {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-purple-deep));
  color: #fdfdfd;
  border-color: var(--accent-purple);
  box-shadow: 0 0 15px var(--accent-purple-glow);
}

.products-count-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.toolbar-controls-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 240px;
}

.search-input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px 16px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 15px var(--accent-gold-glow);
}

.sort-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sort-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.sort-select {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.sort-select:focus {
  border-color: var(--accent-gold);
}

/* ==========================================================================
   PRODUCTS GRID
   ========================================================================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 26px;
}

/* ==========================================================================
   PRODUCT CARD (CLEAN INDEPENDENT LAYOUT - NO TEXT OVERLAPPING)
   ========================================================================== */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
  position: relative;
}

.product-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-purple);
  box-shadow: 0 12px 35px var(--accent-purple-glow), 0 0 20px var(--accent-gold-glow);
}

/* 1. INDEPENDENT IMAGE CONTAINER (ENLARGED & CENTERED) */
.card-image-wrapper {
  position: relative;
  width: 100%;
  height: 260px;
  background: radial-gradient(circle at center, rgba(216, 27, 183, 0.14) 0%, rgba(20, 8, 33, 0.95) 75%);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
}

.product-img-real {
  max-width: 90%;
  max-height: 220px;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.45));
}

.product-card:hover .product-img-real {
  transform: scale(1.08) translateY(-3px);
  filter: drop-shadow(0 12px 24px rgba(216, 27, 183, 0.3));
}

/* Image Badges */
.card-puffs-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: rgba(11, 4, 16, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  color: var(--accent-yellow);
  font-size: 0.76rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.card-top-seller-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background: linear-gradient(135deg, #EF4444, var(--accent-gold));
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

/* 2. CARD BODY CONTAINER */
.card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 12px;
  background: var(--bg-card);
}

/* Meta row (Rating + Stock) */
.card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.card-rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(229, 183, 0, 0.12);
  border: 1px solid rgba(229, 183, 0, 0.35);
  color: var(--accent-gold);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.card-rating-badge .star-icon {
  color: #F59E0B;
  font-size: 0.85rem;
}

.card-stock-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.card-stock-badge.in {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.card-stock-badge.out {
  background: rgba(239, 68, 68, 0.12);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.card-header-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
}

.card-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   FLAVOR SELECTOR BUTTON (CLEAN & DEDICATED)
   ========================================================================== */
.card-flavor-picker-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.btn-open-flavor-modal {
  width: 100%;
  background: linear-gradient(135deg, rgba(216, 27, 183, 0.16), rgba(229, 183, 0, 0.12));
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 9px 12px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
}

.btn-open-flavor-modal:hover {
  border-color: var(--accent-gold);
  background: linear-gradient(135deg, rgba(216, 27, 183, 0.28), rgba(229, 183, 0, 0.2));
  color: var(--accent-yellow);
  box-shadow: 0 0 15px var(--accent-purple-glow);
}

.flavor-picker-label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.flavor-current-tag {
  font-size: 0.74rem;
  color: var(--accent-yellow);
  background: rgba(229, 183, 0, 0.12);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(229, 183, 0, 0.25);
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Pricing Block */
.card-pricing-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.pricing-tier-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tier-label-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tier-badge-tag {
  font-size: 0.68rem;
  font-weight: 800;
  background: var(--badge-bg);
  color: var(--accent-purple);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--badge-border);
}

.tier-badge-tag.duo {
  background: rgba(229, 183, 0, 0.16);
  color: var(--accent-gold);
  border-color: rgba(229, 183, 0, 0.4);
}

.tier-name {
  font-size: 0.76rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.tier-save-tag {
  font-size: 0.7rem;
  font-weight: 700;
  color: #10B981;
}

.tier-price-val {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
}

.tier-price-val.promo {
  color: var(--accent-yellow);
}

/* Card Actions */
.card-actions-wrapper {
  margin-top: auto;
}

.btn-add-cart {
  width: 100%;
  padding: 11px;
  font-size: 0.9rem;
}

/* ==========================================================================
   FLAVOR & COLOR MODAL (#flavorModal)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 2, 12, 0.82);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  animation: modalFadeIn 0.25s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.flavor-modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 35px var(--accent-purple-glow);
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideUp {
  from { transform: translateY(30px) scale(0.97); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.flavor-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-surface);
}

.flavor-modal-title-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.flavor-modal-badges {
  display: flex;
  align-items: center;
  gap: 8px;
}

.flavor-modal-cat-tag {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent-purple);
  background: rgba(216, 27, 183, 0.15);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.flavor-modal-product-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.flavor-modal-product-sub {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close-btn:hover {
  background: #EF4444;
  border-color: #EF4444;
  color: #FFFFFF;
}

.flavor-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.flavor-modal-search-box {
  position: relative;
}

.flavor-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.flavor-card-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  transition: var(--transition);
  position: relative;
}

.flavor-card-item:hover {
  border-color: var(--accent-gold);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(216, 27, 183, 0.25);
}

.flavor-card-item.is-selected {
  border-color: var(--accent-gold);
  background: linear-gradient(180deg, rgba(229, 183, 0, 0.12) 0%, var(--bg-surface) 100%);
  box-shadow: 0 0 20px var(--accent-gold-glow);
}

.flavor-card-img-wrap {
  width: 100%;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(216, 27, 183, 0.15) 0%, transparent 70%);
}

.flavor-card-img {
  max-width: 85%;
  max-height: 130px;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5));
  transition: transform 0.25s ease;
}

.flavor-card-item:hover .flavor-card-img {
  transform: scale(1.08);
}

.flavor-card-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
}

.flavor-card-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.35;
  min-height: 38px;
}

.flavor-card-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
}

.btn-flavor-select {
  width: 100%;
  padding: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
}

.flavor-card-item.is-selected .btn-flavor-select {
  background: var(--accent-gold);
  color: #000;
  border-color: var(--accent-gold);
}

.btn-flavor-select:hover {
  background: var(--accent-purple);
  color: #FFFFFF;
  border-color: var(--accent-purple);
}

.btn-flavor-add-cart {
  width: 100%;
  padding: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  border: none;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-purple-deep));
  color: #FFFFFF;
  cursor: pointer;
  transition: var(--transition);
}

.btn-flavor-add-cart:hover {
  box-shadow: 0 0 15px var(--accent-purple-glow);
  transform: translateY(-1px);
}

/* ==========================================================================
   BUGATTI BALANCED IMAGE STYLING (EQUILIBRADO)
   ========================================================================== */
.product-card.is-bugatti .card-image-wrapper,
.product-card[data-product-id="bugatti"] .card-image-wrapper {
  height: 268px;
  background: radial-gradient(circle at center, rgba(229, 183, 0, 0.18) 0%, rgba(20, 8, 33, 0.98) 75%);
}

.product-card.is-bugatti .product-img-real,
.product-card[data-product-id="bugatti"] .product-img-real {
  max-height: 232px;
  max-width: 88%;
  transform: scale(1.06);
  filter: drop-shadow(0 8px 18px rgba(229, 183, 0, 0.3));
}

.product-card.is-bugatti:hover .product-img-real,
.product-card[data-product-id="bugatti"]:hover .product-img-real {
  transform: scale(1.12) translateY(-3px);
  filter: drop-shadow(0 12px 24px rgba(229, 183, 0, 0.45));
}

.flavor-card-item.is-bugatti-flavor .flavor-card-img-wrap {
  height: 145px;
  background: radial-gradient(circle at center, rgba(229, 183, 0, 0.15) 0%, transparent 70%);
}

.flavor-card-item.is-bugatti-flavor .flavor-card-img {
  max-height: 135px;
  max-width: 90%;
  transform: scale(1.06);
  filter: drop-shadow(0 6px 14px rgba(229, 183, 0, 0.25));
}

/* Product description inside modal */
.flavor-modal-product-desc {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-gold);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.45;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Top Seller Inline Pill in Meta Row */
.card-top-seller-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.18), rgba(229, 183, 0, 0.2));
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #FF8A00;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

/* AirPods Special Styling for High Contrast and Clarity */
.product-card[data-category="accesorios"] .card-image-wrapper {
  background: radial-gradient(circle at center, rgba(216, 27, 183, 0.2) 0%, rgba(20, 8, 33, 0.98) 75%);
}

.product-card[data-category="accesorios"] .product-img-real {
  filter: drop-shadow(0 8px 24px rgba(255, 255, 255, 0.25)) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.7));
}

/* Card Puffs Tag below Product Name */
.card-puffs-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(229, 183, 0, 0.12);
  border: 1px solid rgba(229, 183, 0, 0.35);
  color: var(--accent-yellow);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  width: fit-content;
  margin-top: 2px;
}
