/* Product showcase section */
#velzeli {
  margin: 2.5rem 0 0;
}

.product-showcase {
  position: relative;
  width: 100%;
  margin: 0 auto;
  min-height: 460px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 40px;
  flex-wrap: wrap;
  transition: min-height 0.35s ease;
}

.product-bottle-stage {
  position: relative;
  display: inline-block;
  padding: 0 0 56px;
  border: 0;
  background: transparent;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.product-bottle-stage:hover {
  transform: translateY(-4px);
}

.product-bottle-stage.is-active {
  transform: translate3d(var(--active-shift, 0px), -2px, 0) scale(var(--active-scale, 1));
  transform-origin: center bottom;
  z-index: 5;
}

.product-bottle-stage.is-active:hover {
  transform: translate3d(var(--active-shift, 0px), -6px, 0) scale(var(--active-scale, 1));
}

.product-bottle-stage:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 6px;
}

.product-img {
  width: clamp(170px, 15vw, 250px);
  height: auto;
  transition: transform 0.3s ease, filter 0.3s ease;
  cursor: pointer;
  transform-origin: center bottom;
  filter: drop-shadow(0 16px 20px rgba(0, 0, 0, 0.45));
  position: relative;
  z-index: 2;
}

.product-img:hover {
  transform: translateY(-10px) scale(1.04);
  filter: drop-shadow(0 26px 30px rgba(0, 0, 0, 0.62));
}

.product-img-reflection {
  position: absolute;
  left: 50%;
  top: calc(100% - 8px);
  width: clamp(170px, 15vw, 250px);
  height: auto;
  transform: translateX(-50%) scaleY(-1);
  opacity: 0.25;
  filter: blur(1px);
  pointer-events: none;
  z-index: 1;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0));
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0));
}

.product-bottle-stage::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 62%;
  height: 22px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0) 72%);
  filter: blur(4px);
  pointer-events: none;
  z-index: 0;
}

/* Anchored product panel */
#velzoriModal {
  position: absolute;
  inset: 0;
  background: transparent;
  z-index: 4;
  pointer-events: none;
}

#velzoriModalContent {
  --card-enter-x: 24px;
  --card-enter-y: 0px;
  position: absolute;
  left: 0;
  top: 0;
  width: min(400px, 34vw);
  height: auto;
  max-height: none;
  background: #0a0410;
  color: #fff;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5), 0 0 30px rgba(168, 85, 247, 0.55);
  border: 2.5px solid #c084fc;
  border-radius: 18px;
  padding: 20px 20px 16px;
  opacity: 0;
  transform: translate3d(var(--card-enter-x), var(--card-enter-y), 0) scale(0.96);
  transition: opacity 0.24s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

#velzoriModal.show #velzoriModalContent {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  pointer-events: auto;
}

#closeVelzoriModal {
  position: absolute;
  top: 10px;
  right: 12px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.65);
  z-index: 20;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s ease, color 0.2s ease;
}

#closeVelzoriModal:hover {
  background: rgba(196, 130, 255, 0.25);
  color: #fff;
}

/* Main panel layout */
.modal-scene {
  width: 100%;
  height: 100%;
}

.modal-info {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  height: 100%;
  gap: 8px;
  padding-top: 2px;
  min-height: 0;
}

.modal-info .nf-box {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(147, 51, 234, 0.3) transparent;
}

.modal-info .nf-box::-webkit-scrollbar { width: 4px; }
.modal-info .nf-box::-webkit-scrollbar-thumb { background: rgba(147, 51, 234, 0.3); border-radius: 4px; }

.modal-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding-right: 22px;
}

.product-title {
  font-size: clamp(15px, 1.7vw, 20px);
  line-height: 1.1;
  margin: 0;
  color: #5a1e7a;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-desc {
  font-size: 11px;
  margin: 0;
  color: #8b5faa;
  font-style: italic;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
}

.product-rating .stars {
  color: #c9821a;
  font-size: 12px;
  letter-spacing: 1.5px;
}

.product-rating .rating-num {
  font-size: 12px;
  font-weight: 700;
  color: #4a1f60;
}

.product-rating .rating-count {
  font-size: 11px;
  color: #9a72b0;
}

.modal-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(147, 51, 234, 0.25) 0%, transparent 80%);
  flex-shrink: 0;
}

/* Nutrition facts — dark theme */
.nf-box {
  width: 100%;
  background: transparent;
  border-radius: 0;
  padding: 6px 12px 10px;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

.nf-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  height: 2px;
  background: linear-gradient(90deg, #6b21a8 0%, #9333ea 50%, #c084fc 100%);
}

.nf-header {
  font-family: "Cinzel", serif;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 6px 0 0;
  line-height: 1;
}

.nf-tag {
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #c084fc;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.nf-serving-rows {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom: 4px solid rgba(196, 130, 255, 0.7);
  padding: 3px 0;
}

.nf-serving-row {
  display: flex;
  justify-content: space-between;
  font-size: 8.5px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.3;
}

.nf-serving-row.size {
  font-weight: 700;
  font-size: 10px;
  color: #fff;
}

.nf-calories-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 3px solid rgba(196, 130, 255, 0.7);
  padding: 3px 0 2px;
}

.nf-cal-label {
  font-size: 14px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}

.nf-cal-amount-label {
  font-size: 7px;
  font-weight: 600;
  color: rgba(196, 130, 255, 0.85);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 1px;
}

.nf-cal-num {
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  color: #c084fc;
  letter-spacing: -0.02em;
}

.nf-dv-header {
  text-align: right;
  font-size: 8px;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  padding: 3px 0 2px;
  color: rgba(255, 255, 255, 0.85);
}

.nf-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2px 0;
  font-size: 9.5px;
  color: #fff;
  line-height: 1.2;
}

.nf-row .nf-dv {
  font-weight: 700;
  color: #c084fc;
  min-width: 28px;
  text-align: right;
}

.nf-row.bold { font-weight: 700; }
.nf-row.indent { padding-left: 10px; color: rgba(255, 255, 255, 0.78); font-size: 9px; }
.nf-row.indent2 { padding-left: 20px; color: rgba(255, 255, 255, 0.65); font-size: 9px; }

.nf-divider-thick {
  height: 4px;
  background: rgba(196, 130, 255, 0.7);
  margin: 2px 0 3px;
}

.nf-minerals {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px 10px;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.85);
  padding-bottom: 4px;
}

.nf-mineral {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.5px 0;
}

.nf-mineral b {
  font-weight: 700;
  color: #c084fc;
}

.nf-footnote {
  font-size: 7.5px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.35;
  margin-top: 5px;
  font-style: italic;
}

.nf-ingredients {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.4;
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.nf-ingredients b {
  color: #c084fc;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 8px;
  display: block;
  margin-bottom: 1px;
}

.modal-buy-section {
  width: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #0a0410;
  margin: 0 -20px -16px;
  padding: 14px 20px;
  border-bottom-left-radius: 17px;
  border-bottom-right-radius: 17px;
  border-top: 0;
  flex-shrink: 0;
}

.modal-price {
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 800;
  color: #5a1e7a;
  letter-spacing: -0.02em;
  line-height: 1;
}

#velzoriModal a.buy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #15091c;
  color: #fff;
  padding: 9px 28px;
  border-radius: 999px;
  text-decoration: none;
  font-family: "Cinzel", serif;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  border: 1.5px solid rgba(168, 85, 247, 0.5);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
}

#velzoriModal a.buy-button:hover {
  border-color: rgba(196, 130, 255, 0.95);
  box-shadow: 0 0 22px rgba(147, 51, 234, 0.4), inset 0 0 14px rgba(147, 51, 234, 0.15);
  transform: translateY(-1px);
}


@media (max-width: 900px) {
  .product-bottle-stage.is-active {
    transform: translate3d(var(--active-shift, 0px), -6px, 0) scale(var(--active-scale, 1));
  }

  .product-bottle-stage.is-active:hover {
    transform: translate3d(var(--active-shift, 0px), -10px, 0) scale(var(--active-scale, 1));
  }

  .product-bottle-stage.is-active .product-img-reflection {
    opacity: 0;
  }

  .product-bottle-stage.is-active::after {
    opacity: 0;
  }

  #velzoriModal {
    position: absolute;
    inset: 0;
    pointer-events: none;
  }

  #velzoriModalContent {
    max-width: none;
    padding: 14px 14px 12px;
    border-radius: 12px;
  }

  #closeVelzoriModal {
    top: 6px;
    right: 8px;
    font-size: 14px;
    width: 22px;
    height: 22px;
  }

  .product-title {
    font-size: 14px;
    max-width: calc(100% - 24px);
  }

  .product-desc {
    font-size: 10px;
  }

  .product-rating .stars {
    font-size: 10px;
  }

  .modal-price {
    font-size: 16px;
  }

  #velzoriModal a.buy-button {
    font-size: 10px;
    padding: 7px 11px;
  }

  .product-showcase {
    min-height: 380px;
  }

  .product-bottle-stage {
    padding-bottom: 44px;
  }

  .product-img,
  .product-img-reflection {
    width: clamp(130px, 34vw, 150px);
  }
}

/* Closed panels cannot receive keyboard focus or enlarge the visible layout. */
#velzoriModal:not(.show) { visibility: hidden; }

/* Short or narrow viewports use the same card, contained by the visible viewport. */
#velzoriModal.is-viewport-panel {
  position: fixed;
  inset: auto;
  top: var(--panel-top, 0px);
  left: var(--panel-left, 0px);
  width: var(--panel-width, 100%);
  height: var(--panel-height, 100vh);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  z-index: 1400;
  pointer-events: auto;
}

#velzoriModal.is-viewport-panel #velzoriModalContent {
  position: relative;
  inset: auto;
  width: min(320px, 100%);
  height: min(460px, 100%);
  max-height: 100%;
  min-width: 0;
  padding: 14px 14px 12px;
  border-radius: 12px;
  --card-enter-x: 14px;
}

#velzoriModal.is-viewport-panel #closeVelzoriModal {
  top: 6px;
  right: 8px;
  width: 44px;
  height: 44px;
  font-size: 14px;
  background: transparent;
}

#velzoriModal.is-viewport-panel .modal-buy-section {
  margin: 0 -14px -12px;
  padding: 12px 14px;
}

#velzoriModal.is-viewport-panel .buy-button { min-height: 44px; }
#velzoriModal .nf-box { overscroll-behavior: contain; }
#velzoriModal :focus-visible { outline: 2px solid #c084fc; outline-offset: 2px; }

/* Homepage only: the existing bottle and card share one centered width budget.
   Neither element changes document flow, and the page remains freely scrollable. */
main.page:has([data-product-layout="paired"]) {
  /* Preserve the existing crop without overflow:hidden's invisible scroll offset.
     Focus/scrollIntoView must scroll the document, not a second hidden container. */
  overflow: clip;
}

main.page:has([data-product-layout="paired"] .product-trigger.is-active) {
  /* Rotation can put the original section above the viewport. Let the fitted
     pair paint beyond main's crop while open, without moving the page. */
  overflow: visible;
}

[data-product-layout="paired"] {
  scroll-padding: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
}

[data-product-layout="paired"] .product-bottle-stage {
  transform-origin: 0 0;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
}

[data-product-layout="paired"] .product-bottle-stage.is-active,
[data-product-layout="paired"] .product-bottle-stage.is-active:hover {
  transform: translate3d(var(--pair-shift-x), var(--pair-shift-y), 0) scale(var(--pair-bottle-scale));
}

[data-product-layout="paired"] .is-active .product-img {
  transform: none;
}

[data-product-layout="paired"] .is-active .product-img-reflection {
  /* This decorative image extends a second bottle-height below the button.
     Exclude it while fitting the open pair so it cannot lengthen the document. */
  display: none;
}

[data-product-layout="paired"] #velzoriModal {
  inset: auto;
  left: var(--pair-left, 0px);
  top: var(--pair-top, 0px);
  width: var(--pair-width, 100%);
  height: var(--pair-height, 0px);
  display: grid;
  grid-template-columns: var(--pair-bottle-width, 0px) minmax(0, 1fr);
  column-gap: var(--pair-gap, 0px);
  align-items: center;
}

[data-product-layout="paired"] #velzoriModalContent {
  position: relative;
  inset: auto;
  grid-column: 2;
  width: 100%;
  height: var(--pair-card-height);
  min-width: 0;
  box-sizing: border-box;
  --card-enter-x: 8px;
}

@media (max-width: 900px), (max-height: 600px) {
  [data-product-layout="paired"] #velzoriModalContent { padding: 38px 10px 10px; }
  [data-product-layout="paired"] #closeVelzoriModal {
    top: 2px;
    right: 2px;
    width: 40px;
    height: 40px;
  }
  [data-product-layout="paired"] .modal-buy-section {
    margin: 0 -10px -10px;
    padding: 8px 10px;
  }
  [data-product-layout="paired"] .buy-button { min-height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  [data-product-layout="paired"] .product-bottle-stage,
  [data-product-layout="paired"] #velzoriModalContent { transition-duration: 0.01ms; }
}
