/* ==========================================================
   RARE COCOA™ — Collection Pages & Product Modal Styles
   ========================================================== */

* {
  -webkit-tap-highlight-color: transparent;
}

#rc-maintenance-banner,
#rc-hold-popup-overlay {
  display: none !important;
}

/* ── Page Hero Banner ──────────────────────────────────── */
.page-hero {
  padding: clamp(100px, 9vw, 120px) 0 clamp(30px, 4vw, 45px);
  background: var(--bg-secondary);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 80%, var(--accent-glow) 0%, transparent 60%);
  pointer-events: none;
}

.page-hero .section-label {
  margin-bottom: 6px;
}

.page-hero .section-title {
  margin-bottom: 10px;
}

.page-hero-desc {
  font-family: var(--font-heading);
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  font-weight: 300;
  font-style: italic;
  color: var(--text-tertiary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
}

.page-hero-tags {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.page-hero-tag {
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 4px 14px;
  border: 1px solid var(--border-gold);
  border-radius: 100px;
  background: rgba(255, 252, 247, 0.7);
}

/* ── Breadcrumb ────────────────────────────────────────── */
.breadcrumb {
  padding: 16px 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.breadcrumb a {
  color: var(--text-tertiary);
  transition: color 0.3s;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb span {
  margin: 0 8px;
  opacity: 0.5;
}

/* ── Sub-Category Tabs ─────────────────────────────────── */
.sub-tabs {
  position: sticky;
  top: 70px;
  z-index: 100;
  background: rgba(255, 252, 247, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 16px;
  padding: 16px 24px;
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: clamp(30px, 4vw, 45px);
  flex-wrap: wrap;
  box-shadow: 0 10px 30px rgba(26, 14, 8, 0.04);
  transition: top 0.4s var(--ease);
}

@media (max-width: 768px) {
  .sub-tabs {
    top: 62px;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding: 16px 20px;
    background: rgba(255, 252, 247, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 0;
    border-left: none;
    border-right: none;
    margin-bottom: clamp(16px, 4vw, 24px);
    display: flex;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: none;
    scrollbar-width: none;
    gap: 8px;
  }
  .sub-tabs::-webkit-scrollbar {
    display: none;
  }
  .sub-tab {
    flex: 0 0 auto;
    scroll-snap-align: none;
    padding: 12px 24px;
    font-size: 0.78rem;
  }
}

.sub-tab {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px 28px;
  color: #8b6e4b;
  background: linear-gradient(135deg, rgba(255, 252, 247, 0.9) 0%, rgba(245, 230, 200, 0.5) 100%);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}

.sub-tab:hover {
  border-color: rgba(212, 175, 55, 0.6);
  color: #b8860b;
  background: linear-gradient(135deg, rgba(255, 252, 247, 1) 0%, rgba(245, 230, 200, 0.7) 100%);
}

.sub-tab.active {
  background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
  color: #ffffff;
  border-color: #d4af37;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.22);
}

/* ── Product Grid ──────────────────────────────────────── */
.products-section {
  padding: clamp(40px, 5vw, 60px) 0 var(--section-py);
  background: var(--bg-primary);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.product-grid-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s var(--ease);
  position: relative;
}

.product-grid-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  border: 2px solid transparent;
  transition: border-color 0.4s var(--ease);
  pointer-events: none;
}

.product-grid-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lift);
}

.product-grid-card:hover::after {
  border-color: var(--accent-light);
}

/* ── Mini Chocolate Bar on Tablet Cards ─────────────────── */
.card-choco-wrapper {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  animation: cocoaCountUp 0.5s cubic-bezier(0.16,1,0.3,1) both;
}
.card-choco-wrapper .chocolate-bar-visualizer {
  width: 36px;
  height: 58px;
}
.card-choco-wrapper .chocolate-bar {
  width: 30px;
  height: 50px;
  border-width: 2px;
  border-radius: 7px;
}
.card-choco-wrapper .chocolate-liquid-container {
  border-radius: 4px;
}
.card-choco-wrapper .liquid-waves {
  left: -8px;
  width: calc(100% + 16px);
  bottom: -8px;
  height: calc(100% + 8px);
}
.card-choco-wrapper .wave {
  height: 26px;
}
.card-choco-wrapper .wave1 { top: -13px; }
.card-choco-wrapper .wave2 { top: -11px; }
.card-choco-wrapper .wave3 { top: -9px; }
.card-choco-wrapper .chocolate-grid-overlay {
  gap: 1px;
  padding: 1px;
}
.card-choco-wrapper .chocolate-segment {
  border-radius: 1px;
}
.card-choco-pct { display: none; }
@keyframes cocoaCountUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.product-grid-img {
  aspect-ratio: 1/1;
  background: var(--bg-secondary);
  overflow: hidden;
  position: relative;
}

.product-grid-img .img-gradient {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  transition: transform 0.6s var(--ease);
}

.product-grid-card:hover .img-gradient {
  transform: scale(1.08);
}

@keyframes fadeInImage {
  from {
    opacity: 0;
    filter: blur(8px);
  }
  to {
    opacity: 1;
    filter: blur(0);
  }
}

.product-grid-img img,
.product-grid-img video {
  animation: fadeInImage 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: opacity, filter;
}

/* ── Product Card Carousel ────────────────────────────────── */
.card-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  touch-action: pan-y;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}

.card-carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.55s cubic-bezier(0.77, 0, 0.18, 1);
  will-change: transform;
  touch-action: pan-y;
}

.card-carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
  min-width: 100%;
  height: 100%;
  flex-shrink: 0;
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
}

.card-carousel-slide img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  pointer-events: none;
}

.card-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.45);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  font-size: 0.75rem;
  transition: background 0.2s;
  line-height: 1;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.card-carousel-btn:hover { background: rgba(0,0,0,0.75); }
.card-carousel-btn.prev { left: 7px; }
.card-carousel-btn.next { right: 7px; }

.card-carousel-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: 5;
}

.card-carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transition: background 0.3s, transform 0.3s;
  cursor: pointer;
}

.card-carousel-dot.active {
  background: #fff;
  transform: scale(1.3);
}


.product-grid-body {
  padding: 20px 20px 24px;
}

.product-grid-name {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.product-grid-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.product-grid-cta {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.3s var(--ease);
}

.product-grid-card:hover .product-grid-cta {
  gap: 10px;
}

.product-grid-cta svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}


.product-grid-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.product-grid-price {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent);
}

.fixed-price-val {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 8px;
}

/* ── Product Modal / Popup ─────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(26, 14, 8, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
  will-change: opacity;
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 32px 80px rgba(26, 14, 8, 0.15);
  border: 1px solid var(--border-light);
  transform: translateY(24px) scale(0.97) translate3d(0, 0, 0);
  -webkit-transform: translateY(24px) scale(0.97) translate3d(0, 0, 0);
  transition: transform 0.4s var(--ease);
  position: relative;
  will-change: transform, opacity;
}

.modal-backdrop.active .modal {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 1.2rem;
  transition: all 0.3s;
  z-index: 10;
  cursor: pointer;
  border: none;
}

.modal-close:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
}

.modal-header {
  padding: 24px 36px 16px;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
}

.modal-product-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.modal-product-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.modal-product-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  font-family: var(--font-heading);
}

.modal-body {
  padding: 20px 36px 20px;
}

.modal-option-group {
  margin-bottom: 18px;
}

.modal-option-group:last-child {
  margin-bottom: 0;
}

.modal-option-label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 12px;
  display: block;
}

.modal-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-option-pill {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 400;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-secondary);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.25s var(--ease);
}

.modal-option-pill:hover {
  border-color: var(--accent-light);
  background: var(--accent-bg);
  color: var(--accent);
}

.modal-option-pill.selected {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
}

/* Mini chocolate bar in modal (reuses exact same visualizer, scaled down) */
.modal-choco-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}
.modal-choco-wrapper .chocolate-bar-visualizer {
  width: 60px;
  height: 100px;
}
.modal-choco-wrapper .chocolate-bar {
  width: 54px;
  height: 92px;
  border-width: 3px;
  border-radius: 10px;
}
.modal-choco-wrapper .chocolate-liquid-container {
  border-radius: 6px;
}
.modal-choco-wrapper .liquid-waves {
  left: -10px;
  width: calc(100% + 20px);
  bottom: -10px;
  height: calc(100% + 10px);
}
.modal-choco-wrapper .wave {
  height: 40px;
}
.modal-choco-wrapper .wave1 { top: -20px; }
.modal-choco-wrapper .wave2 { top: -18px; }
.modal-choco-wrapper .wave3 { top: -16px; }
.modal-choco-wrapper .chocolate-grid-overlay {
  gap: 2px;
  padding: 2px;
}
.modal-choco-wrapper .chocolate-segment {
  border-radius: 2px;
}

.modal-option-input {
  width: 100%;
  padding: 12px 18px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  background: var(--bg-card);
  transition: border-color 0.25s var(--ease);
}

.modal-option-input:focus {
  outline: none;
  border-color: var(--accent);
}

.modal-option-select {
  width: 100%;
  padding: 12px 18px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  background: var(--bg-card);
  transition: border-color 0.25s var(--ease);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4af37' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 16px;
  padding-right: 42px;
}

.modal-option-select:focus {
  outline: none;
  border-color: var(--accent);
}

.modal-footer {
  padding: 0 36px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.modal-qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--accent-bg);
  border: 1px solid var(--accent-light);
  border-radius: 8px;
  overflow: hidden;
  width: 240px;
  margin: 0 auto;
  box-shadow: var(--shadow-gold);
}
.modal-qty-btn {
  background: transparent;
  border: none;
  width: 75px;
  height: 50px;
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
  .modal-qty-btn:hover { background: var(--accent-bg); }
}
.modal-qty-btn.flash-active {
  animation: qtyGoldBlink 0.5s ease-out forwards;
}
@keyframes qtyGoldBlink {
  0%   { background: var(--accent-light); color: #fff; }
  70%  { background: rgba(201,164,86,0.15); color: var(--accent); }
  100% { background: transparent; color: var(--accent); }
}
.modal-qty-val {
  flex: 1;
  text-align: center;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  border-left: 1px solid var(--border-gold);
  border-right: 1px solid var(--border-gold);
  line-height: 50px;
  user-select: none;
  letter-spacing: 0.08em;
}




.modal-price-display {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  min-width: 60px;
}

.modal-add-btn {
  width: 100%;
  padding: 16px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--bg-primary);
  background: var(--text-primary);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.3s var(--ease);
}
.modal-add-btn:hover {
  background: var(--accent);
  color: #1A0D07;
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
}
.modal-add-btn.btn-gold-glow {
  background: #C9A456 !important;
  color: #1A0D07 !important;
  box-shadow: 0 0 0 4px rgba(201,164,86,0.25), 0 0 32px rgba(201,164,86,0.55) !important;
  transform: scale(1.02) !important;
}


/* ── Make Your Own Builder ─────────────────────────────── */
.builder-section {
  padding: clamp(40px, 5vw, 60px) 0 var(--section-py);
  background: var(--bg-primary);
}

.builder-container {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: clamp(32px, 4vw, 48px);
  box-shadow: var(--shadow-md);
}

.builder-step {
  margin-bottom: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border-light);
}

.builder-step:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.builder-step-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.builder-step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-bg);
  border: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
}

.builder-step-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text-primary);
}

.builder-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-left: 52px;
}

.builder-option {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 400;
  padding: 10px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.25s var(--ease);
}

.builder-option:hover {
  border-color: var(--accent-light);
  background: var(--accent-bg);
  color: var(--accent);
}

.builder-option.selected {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
}

/* Multi-select hint */
.builder-step .multi-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  padding-left: 52px;
  margin-top: 8px;
}

.builder-submit {
  margin-top: 36px;
  width: 100%;
  padding: 18px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bg-primary);
  background: var(--text-primary);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s var(--ease);
}

.builder-submit:hover {
  background: var(--accent);
  box-shadow: var(--shadow-gold);
}

/* ── Manufacturing Page ────────────────────────────────── */
.mfg-hero {
  padding: clamp(140px, 15vw, 220px) 0 clamp(60px, 8vw, 100px);
  background: var(--bg-secondary);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.mfg-hero {
  position: relative;
  padding: clamp(140px, 12vw, 180px) 0 clamp(60px, 6vw, 80px);
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  text-align: center;
  overflow: hidden;
}

.mfg-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 100%, var(--accent-glow) 0%, transparent 60%);
  pointer-events: none;
}

.mfg-hero .section-title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.mfg-hero .page-hero-desc {
  max-width: 680px;
  margin: 0 auto;
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  color: var(--text-secondary);
  line-height: 1.6;
  font-style: normal;
  font-weight: 400;
}

.process-timeline {
  padding: var(--section-py) 0;
  background: var(--bg-primary);
  position: relative;
}

.timeline {
  max-width: 1000px;
  margin: 60px auto 0;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--border) 0%, var(--accent-light) 50%, var(--border) 100%);
}

.timeline-step {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 80px;
  position: relative;
  width: 100%;
}

.timeline-step:last-child {
  margin-bottom: 0;
}

/* Alternating rows */
.timeline-step:nth-child(odd) {
  flex-direction: row-reverse;
}

.timeline-step-space {
  width: 45%;
}

.timeline-marker-container {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.timeline-marker {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 1.5px solid var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  box-shadow: var(--shadow-sm), 0 0 12px rgba(201, 164, 86, 0.1);
  transition: all 0.5s var(--ease);
}

.timeline-step:hover .timeline-marker {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg-primary);
  transform: scale(1.1) rotate(360deg);
  box-shadow: var(--shadow-gold), 0 0 24px rgba(201, 164, 86, 0.3);
}

.timeline-content {
  width: 45%;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 40px;
  transition: all 0.4s var(--ease);
  box-shadow: var(--shadow-sm);
}

.timeline-step:hover .timeline-content {
  transform: translateY(-6px);
  border-color: var(--accent-light);
  box-shadow: var(--shadow-md), 0 10px 40px rgba(201, 164, 86, 0.05);
}

.timeline-content h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.timeline-content p {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-tertiary);
  margin: 0;
}

/* Quality commitments */
.quality-section {
  padding: var(--section-py) 0;
  background: var(--bg-secondary);
  position: relative;
}

.quality-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 50px;
}

.quality-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 44px 32px;
  text-align: center;
  transition: all 0.4s var(--ease);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.quality-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-light), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.quality-card:hover::before {
  opacity: 1;
}

.quality-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg), 0 10px 40px rgba(201, 164, 86, 0.08);
  border-color: var(--border-gold);
}

.quality-icon-wrapper {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent-bg);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  transition: all 0.4s var(--ease);
}

.quality-card:hover .quality-icon-wrapper {
  background: var(--accent);
  color: var(--bg-primary);
  transform: scale(1.05);
}

.quality-icon-wrapper svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
  transition: transform 0.4s var(--ease);
}

.quality-card h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.quality-card p {
  font-size: 0.9rem;
  color: var(--text-tertiary);
  line-height: 1.6;
  margin: 0;
}

/* ── Responsive for Collection Pages & Process Timeline ───────────────────── */
@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .quality-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .modal {
    max-width: 100%;
    margin: 0 16px;
    border-radius: var(--radius-lg);
  }

  .modal-header {
    padding: 28px 24px 20px;
  }

  .modal-body {
    padding: 20px 24px 28px;
  }

  .modal-footer {
    padding: 0 24px 28px;
  }

  .builder-options {
    padding-left: 0;
  }

  .builder-step .multi-hint {
    padding-left: 0;
  }

  .quality-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .quality-card {
    display: flex;
    align-items: flex-start;
    text-align: left;
    padding: 24px;
    gap: 20px;
  }

  .quality-icon-wrapper {
    margin: 0;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
  }

  .quality-card-text {
    flex: 1;
  }

  .quality-card h3 {
    margin-top: 0;
    margin-bottom: 6px;
    font-size: 1.15rem;
  }

  .quality-card p {
    font-size: 0.85rem;
  }

  .timeline {
    padding-top: 16px;
  }

  .timeline::before {
    display: none;
  }

  .timeline-step {
    flex-direction: column !important;
    align-items: flex-start;
    margin-bottom: 40px;
    padding-left: 0;
  }

  .timeline-step-space {
    display: none;
  }

  .timeline-marker-container {
    position: absolute;
    left: 24px;
    top: -16px;
    transform: none;
    z-index: 10;
  }

  .timeline-marker {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
    background: var(--accent);
    color: var(--bg-primary);
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
  }

  .timeline-content {
    width: 100%;
    padding: 28px 24px 24px;
    position: relative;
  }

  .mfg-hero {
    padding: 110px 0 40px;
  }

  .mfg-hero .section-title {
    font-size: 2.1rem;
    margin-bottom: 12px;
  }

  .mfg-hero .page-hero-desc {
    font-size: 0.92rem;
  }
}

@media (max-width: 500px) {
  .products-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .sub-tabs {
    gap: 6px;
  }

  .sub-tab {
    padding: 8px 14px;
    font-size: 0.7rem;
  }
}

/* ── Skeleton Shimmer (Collection Pages) ────────────────── */
@keyframes skeleton-shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}
body.page-loading .product-grid-img,
body.page-loading .product-grid-img > div,
body.page-loading .mfg-hero,
body.page-loading .page-hero {
  background: linear-gradient(
    90deg,
    #F0E9DD 25%,
    #EDE5D8 50%,
    #F0E9DD 75%
  ) !important;
  background-size: 600px 100% !important;
  animation: skeleton-shimmer 1.4s infinite linear !important;
}
body.page-loading .product-grid-img span {
  opacity: 0;
}

/* ── Builder Layout & Visualizer Styles ── */
.builder-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: start;
}


.builder-preview-panel {
  position: sticky;
  top: 100px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-md);
  z-index: 10;
}

.preview-sticky {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.preview-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--text-primary);
  text-align: center;
  letter-spacing: 0.02em;
}

/* 3D Viscous Chocolate Bar */
.chocolate-bar-visualizer {
  width: 170px;
  height: 290px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.chocolate-bar {
  width: 156px;
  height: 270px;
  background: var(--bg-secondary);
  border: 7px solid #2A170F; /* Rich chocolate boundary */
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 15px 35px rgba(26, 14, 8, 0.15),
    inset 0 4px 12px rgba(0, 0, 0, 0.12);
}

.chocolate-liquid-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 10px;
  background: #E8DEC9; /* Empty bar inner cream backing */
  transform: translateZ(0);
  will-change: transform;
}

/* Viscous Wave Animation */
.liquid-waves {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: transform 1.5s cubic-bezier(0.25, 1, 0.5, 1);
  background: var(--cocoa-color, #4A2E1B);
  filter: url('#goo'); /* Viscous gooey blending filter */
}

.wave {
  position: absolute;
  left: -50%;
  width: 200%;
  height: 120px; /* Tall enough to overlap the top surface */
  background: var(--cocoa-color, #4A2E1B);
  border-radius: 40%;
  transform-origin: center;
  animation: wave-spin 7s linear infinite;
  will-change: transform;
}

.wave1 {
  top: -60px; /* Position at the surface of rising liquid */
  opacity: 1;
  animation-duration: 6s;
}

.wave2 {
  top: -55px;
  opacity: 0.7;
  animation-duration: 9s;
  animation-delay: -2s;
  background: var(--cocoa-color-light, #5D3C2A);
}

.wave3 {
  top: -50px;
  opacity: 0.4;
  animation-duration: 12s;
  animation-delay: -5s;
  background: var(--cocoa-color-dark, #3B2315);
}

@keyframes wave-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Beveled Grid Segments */
.chocolate-grid-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 5px;
  padding: 5px;
  pointer-events: none;
}

.chocolate-segment {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 2px solid rgba(0, 0, 0, 0.18);
  border-right: 2px solid rgba(0, 0, 0, 0.18);
  border-radius: 4px;
  box-shadow: 
    inset 1px 1px 3px rgba(255, 255, 255, 0.12),
    inset -1px -1px 3px rgba(0, 0, 0, 0.3);
}

/* Preview Summary Details */
.preview-summary {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid var(--border-light);
  padding-top: 20px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
}

.summary-label {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--text-tertiary);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.summary-value {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--text-primary);
}

.summary-addons {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.summary-addons-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.summary-addon-pill {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid var(--border-light);
}

/* ── Mobile Scroll-Focus (Gold Boundary Glow) ────────────── */
@media (max-width: 768px) {
  .product-grid-card {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  }
  
  .product-grid-card.scroll-focus {
    transform: scale(1.02) translateY(-4px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.15);
    border-color: transparent;
  }

  .product-grid-card.scroll-focus::after {
    border-color: var(--accent-light);
  }

  .product-grid-card.scroll-focus .img-gradient {
    transform: scale(1.04);
  }
}



@media (max-width: 992px) {
  .builder-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .builder-preview-panel {
    order: -1; /* Move preview panel to top on mobile */
    position: relative !important;
    top: 0 !important;
    margin-bottom: 24px;
    z-index: 10;
}

.chocolate-bar {
  width: 156px;
  height: 270px;
  background: var(--bg-secondary);
  border: 7px solid #2A170F; /* Rich chocolate boundary */
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 15px 35px rgba(26, 14, 8, 0.15),
    inset 0 4px 12px rgba(0, 0, 0, 0.12);
}

.chocolate-liquid-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 10px;
  background: #E8DEC9; /* Empty bar inner cream backing */
  transform: translateZ(0);
  will-change: transform;
}

/* Viscous Wave Animation */
.liquid-waves {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: transform 1.5s cubic-bezier(0.25, 1, 0.5, 1);
  background: var(--cocoa-color, #4A2E1B);
  filter: url('#goo'); /* Viscous gooey blending filter */
}

.wave {
  position: absolute;
  left: -50%;
  width: 200%;
  height: 120px; /* Tall enough to overlap the top surface */
  background: var(--cocoa-color, #4A2E1B);
  border-radius: 40%;
  transform-origin: center;
  animation: wave-spin 7s linear infinite;
  will-change: transform;
}

.wave1 {
  top: -60px; /* Position at the surface of rising liquid */
  opacity: 1;
  animation-duration: 6s;
}

.wave2 {
  top: -55px;
  opacity: 0.7;
  animation-duration: 9s;
  animation-delay: -2s;
  background: var(--cocoa-color-light, #5D3C2A);
}

.wave3 {
  top: -50px;
  opacity: 0.4;
  animation-duration: 12s;
  animation-delay: -5s;
  background: var(--cocoa-color-dark, #3B2315);
}

@keyframes wave-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Beveled Grid Segments */
.chocolate-grid-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 5px;
  padding: 5px;
  pointer-events: none;
}

.chocolate-segment {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 2px solid rgba(0, 0, 0, 0.18);
  border-right: 2px solid rgba(0, 0, 0, 0.18);
  border-radius: 4px;
  box-shadow: 
    inset 1px 1px 3px rgba(255, 255, 255, 0.12),
    inset -1px -1px 3px rgba(0, 0, 0, 0.3);
}

/* Preview Summary Details */
.preview-summary {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid var(--border-light);
  padding-top: 20px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
}

.summary-label {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--text-tertiary);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.summary-value {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--text-primary);
}

.summary-addons {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.summary-addons-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.summary-addon-pill {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid var(--border-light);
}

/* ── Mobile Scroll-Focus (Gold Boundary Glow) ────────────── */
@media (max-width: 768px) {
  .product-grid-card {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  }
  
  .product-grid-card.scroll-focus {
    transform: scale(1.02) translateY(-4px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.15);
    border-color: transparent;
  }

  .product-grid-card.scroll-focus::after {
    border-color: var(--accent-light);
  }

  .product-grid-card.scroll-focus .img-gradient {
    transform: scale(1.04);
  }
}



@media (max-width: 992px) {
  .builder-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .builder-preview-panel {
    order: -1; /* Move preview panel to top on mobile */
    position: relative !important;
    top: 0 !important;
    margin-bottom: 24px;
    z-index: 10;
  }
}

/* Mobile Category Tabs & Scroll Cue Sticky Header */
@media (max-width: 768px) {
  .sub-tabs-header-wrapper {
    position: sticky !important;
    top: 62px !important;
    z-index: 100 !important;
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    margin-bottom: 20px !important;
    pointer-events: none !important;
  }

  body .products-section .sub-tabs-header-wrapper .sub-tabs,
  body .products-section .sub-tabs {
    position: static !important;
    top: auto !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 14px 16px !important;
    background: rgba(255, 252, 247, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-radius: 0 !important;
    border-top: 1px solid rgba(212, 175, 55, 0.2) !important;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2) !important;
    border-left: none !important;
    border-right: none !important;
    margin-bottom: 0px !important;
    display: flex !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-snap-type: none !important;
    scrollbar-width: none !important;
    gap: 8px !important;
    pointer-events: auto !important;
  }
  
  body .products-section .sub-tabs::-webkit-scrollbar {
    display: none !important;
  }

  body .products-section .sub-tab {
    flex: 0 0 auto !important;
    scroll-snap-align: none !important;
    padding: 12px 22px !important;
    font-size: 0.78rem !important;
    margin: 0 !important;
  }

  .sub-tabs-scroll-cue-wrap {
    display: block !important;
    margin: 6px auto 0 auto !important;
    text-align: center !important;
    pointer-events: auto !important;
  }
}

@media (max-width: 500px) {
  body .products-section .sub-tabs-header-wrapper .sub-tabs,
  body .products-section .sub-tabs {
    gap: 6px !important;
    padding: 12px 16px !important;
  }
  
  body .products-section .sub-tab {
    padding: 10px 18px !important;
    font-size: 0.76rem !important;
  }
}

.sub-tabs-scroll-cue-wrap {
  display: none;
}

@keyframes rcGlowPulse {
  0% {
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.4), 0 2px 10px rgba(26, 14, 8, 0.08);
    border-color: rgba(212, 175, 55, 0.5);
    color: #8b5a12;
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 22px rgba(212, 175, 55, 0.85), 0 0 8px rgba(255, 215, 0, 0.6), 0 3px 14px rgba(26, 14, 8, 0.14);
    border-color: rgba(212, 175, 55, 0.95);
    color: #6b3e05;
    transform: scale(1.04);
  }
  100% {
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.4), 0 2px 10px rgba(26, 14, 8, 0.08);
    border-color: rgba(212, 175, 55, 0.5);
    color: #8b5a12;
    transform: scale(1);
  }
}

@media (max-width: 768px) {
  .sub-tabs-scroll-cue {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    font-family: var(--font-body) !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    color: #784e0e !important;
    background: linear-gradient(135deg, rgba(255, 252, 245, 0.98), rgba(255, 243, 214, 0.98)) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border: 1.5px solid rgba(212, 175, 55, 0.7) !important;
    border-radius: 20px !important;
    padding: 6px 18px !important;
    box-shadow: 0 0 14px rgba(212, 175, 55, 0.5) !important;
    animation: rcGlowPulse 2s infinite ease-in-out !important;
    cursor: default !important;
  }

  .sub-tabs-scroll-cue .glow-sparkle {
    font-size: 0.8rem !important;
    display: inline-block !important;
  }
}

/* Prevent iOS Safari Auto-Zoom on Input Focus */
@media screen and (max-width: 768px) {
  input, select, textarea,
  .custom-cocoa-input {
    font-size: 16px !important;
  }
}

