/**
 * Puck & Wick Product Detail Quick-View Modal Styles
 * Obsidian black & brushed gold aesthetic with responsive 2-column layout and scent pyramid pills.
 */

.product-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 12, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  overflow-y: auto;
  box-sizing: border-box;
  animation: modalFadeIn 0.25s ease-out;
}

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

.product-modal-card {
  position: relative;
  max-width: 940px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  margin: auto;
  background: var(--color-obsidian-950, #0B0D11);
  border: 1px solid var(--color-border-gold-subtle, rgba(197, 160, 89, 0.25));
  border-radius: var(--radius-xl, 1rem);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), 0 0 35px rgba(197, 160, 89, 0.12);
  padding: 1.75rem 2rem;
  box-sizing: border-box;
  color: var(--color-parchment, #FAF5E8);
  animation: modalScaleUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleUp {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gold-500, #C5A059);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(197, 160, 89, 0.2);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.modal-close-btn:hover,
.modal-close-btn:focus-visible {
  color: #FFFFFF;
  background: rgba(197, 160, 89, 0.25);
  border-color: var(--color-gold-bright, #D4AF37);
  transform: rotate(90deg);
}

.modal-grid {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 2rem;
  align-items: stretch;
}

.modal-visual-column {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  align-self: stretch;
  position: relative;
  padding: 0;
  background: #08090C;
  border: 1px solid rgba(197, 160, 89, 0.32);
  border-radius: var(--radius-lg, 0.75rem);
  overflow: hidden;
  min-width: 0;
  min-height: 0;
}

.modal-vessel-stage {
  width: 100%;
  max-width: none;
  aspect-ratio: 400 / 448;
  height: auto;
  overflow: hidden;
  border-radius: 0;
  background: #08090C;
}

.modal-vessel-stage svg {
  width: 100%;
  height: 100%;
  display: block;
}

.modal-slide-photo-frame {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #08090C;
}

.modal-slide-photo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #08090C;
}

.modal-slide-caption-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.55rem 0.75rem;
  background: linear-gradient(0deg, rgba(8, 9, 12, 0.95) 0%, rgba(8, 9, 12, 0.75) 75%, transparent 100%);
  text-align: center;
  font-family: var(--font-serif, 'Cormorant Garamond', 'Cinzel', serif);
  font-size: 0.86rem;
  font-weight: 700;
  color: #FAF5E8;
  letter-spacing: 0.04em;
}

.modal-carousel-counter {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(11, 13, 17, 0.88);
  border: 1px solid rgba(212, 175, 55, 0.45);
  color: var(--color-gold-bright, #D4AF37);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.22rem 0.58rem;
  border-radius: 999px;
  z-index: 4;
}

.modal-enlarge-btn {
  position: absolute;
  top: 0.72rem;
  left: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(11, 13, 17, 0.9);
  border: 1px solid rgba(212, 175, 55, 0.55);
  color: #FAF5E8;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
  z-index: 6;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.modal-enlarge-btn svg {
  width: 13px;
  height: 13px;
  color: var(--color-gold-bright, #D4AF37);
}

.modal-enlarge-btn:hover {
  background: rgba(212, 175, 55, 0.25);
  border-color: #FFFFFF;
  color: #FFFFFF;
}

/* Nested Distraction-Free Full-Screen Enlarge Lightbox (Window-Within-a-Window) */
.modal-enlarge-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgba(5, 6, 9, 0.97);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: none;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.25rem 1.75rem;
  box-sizing: border-box;
}

.modal-enlarge-lightbox.open {
  display: flex;
  animation: modalFadeIn 0.2s ease-out;
}

.enlarge-lightbox-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(197, 160, 89, 0.25);
}

.enlarge-lightbox-title-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.enlarge-lightbox-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-gold-bright, #D4AF37);
}

.enlarge-lightbox-counter {
  background: rgba(212, 175, 55, 0.16);
  border: 1px solid rgba(212, 175, 55, 0.45);
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
}

.enlarge-lightbox-close {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(212, 175, 55, 0.45);
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.enlarge-lightbox-close svg {
  width: 16px;
  height: 16px;
  color: var(--color-gold-bright, #D4AF37);
}

.enlarge-lightbox-close:hover {
  background: rgba(212, 175, 55, 0.25);
  border-color: #FFFFFF;
}

.enlarge-lightbox-stage-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.75rem 0;
}

.enlarge-lightbox-stage {
  width: 100%;
  height: 100%;
  max-width: 1120px;
  max-height: 74vh;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(197, 160, 89, 0.28);
  border-radius: 12px;
  overflow: hidden;
  background: #07080B;
}

.enlarge-lightbox-stage > svg {
  width: 100%;
  height: 100%;
  max-height: 72vh;
  object-fit: contain;
}

.enlarge-lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(11, 13, 18, 0.88);
  border: 1px solid rgba(212, 175, 55, 0.6);
  color: var(--color-gold-bright, #D4AF37);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: all 0.2s ease;
}

.enlarge-lightbox-arrow svg {
  width: 22px;
  height: 22px;
}

.enlarge-lightbox-arrow:hover {
  background: rgba(212, 175, 55, 0.28);
  color: #FFFFFF;
  border-color: #FFFFFF;
}

.enlarge-lightbox-arrow.arrow-prev {
  left: 0.5rem;
}

.enlarge-lightbox-arrow.arrow-next {
  right: 0.5rem;
}

.enlarge-lightbox-thumbs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding-top: 0.5rem;
}

.enlarge-thumb-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(197, 160, 89, 0.25);
  border-radius: 8px;
  padding: 0.3rem 0.65rem 0.3rem 0.35rem;
  color: #B8BCC6;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.18s ease;
}

.enlarge-thumb-pill img {
  width: 34px;
  height: 26px;
  object-fit: cover;
  border-radius: 4px;
}

.enlarge-thumb-pill.active,
.enlarge-thumb-pill:hover {
  background: rgba(212, 175, 55, 0.18);
  border-color: var(--color-gold-bright, #D4AF37);
  color: #FFFFFF;
}

.modal-carousel-arrow {
  position: absolute;
  top: 42%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  border-radius: 50%;
  background: rgba(11, 13, 17, 0.82);
  border: 1px solid rgba(212, 175, 55, 0.5);
  color: var(--color-gold-bright, #D4AF37);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 4;
  transition: all 0.2s ease;
}

.modal-carousel-arrow svg {
  width: 18px;
  height: 18px;
}

.modal-carousel-arrow:hover {
  background: rgba(212, 175, 55, 0.25);
  color: #FFFFFF;
  border-color: #FFFFFF;
}

.modal-carousel-arrow.arrow-prev {
  left: 0.6rem;
}

.modal-carousel-arrow.arrow-next {
  right: 0.6rem;
}

.modal-gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(75px, 1fr));
  gap: 0.4rem;
  padding: 0.55rem;
  background: #0B0D12;
  border-top: 1px solid rgba(197, 160, 89, 0.25);
}

.modal-thumb-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.22rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(197, 160, 89, 0.2);
  border-radius: 6px;
  padding: 0.25rem;
  cursor: pointer;
  transition: all 0.18s ease;
  color: var(--color-text-muted, #9EA3AE);
}

.modal-thumb-btn:hover {
  border-color: rgba(212, 175, 55, 0.6);
  color: #FFFFFF;
}

.modal-thumb-btn.active {
  border-color: var(--color-gold-bright, #D4AF37);
  background: rgba(212, 175, 55, 0.12);
  color: #FFFFFF;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.22);
}

.modal-thumb-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.modal-thumb-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.modal-badge-seasonal {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  margin-top: 0;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-gold-bright, #D4AF37);
  background: rgba(11, 13, 17, 0.88);
  border: 1px solid var(--color-gold-500, #C5A059);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  text-align: center;
  z-index: 2;
}

.modal-details-column {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.modal-kicker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--color-gold-500, #C5A059);
  margin-bottom: 0.25rem;
  padding-right: 3rem;
}

.modal-title {
  font-family: var(--font-serif, 'Cormorant Garamond', 'Cinzel', serif);
  font-size: 1.65rem;
  line-height: 1.15;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0 0 0.2rem 0;
  letter-spacing: 0.02em;
  padding-right: 2.5rem;
}

.modal-tagline {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-gold-300, #E5C158);
  margin-bottom: 0.5rem;
}

.modal-price-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.55rem;
  flex-wrap: wrap;
}

.modal-price {
  font-family: var(--font-serif, 'Cormorant Garamond', 'Cinzel', serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: #FFFFFF;
}

.modal-burn-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-gold-bright, #D4AF37);
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 4px;
}

.modal-description {
  font-size: 0.82rem;
  line-height: 1.48;
  color: var(--color-text-muted, #B0B3BE);
  margin: 0 0 0.7rem 0;
}

/* 3-Step Visual Picture Guide inside Modal */
.modal-mini-puck-guide {
  background: rgba(197, 160, 89, 0.05);
  border: 1px solid rgba(197, 160, 89, 0.32);
  border-radius: var(--radius-md, 0.5rem);
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.75rem;
}

.mini-guide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
  flex-wrap: wrap;
}

.mini-guide-kicker {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-gold-bright, #D4AF37);
}

.mini-guide-badge {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--color-parchment, #FAF5E8);
  background: rgba(212, 175, 55, 0.14);
  border: 1px solid rgba(212, 175, 55, 0.35);
  padding: 0.12rem 0.48rem;
  border-radius: 999px;
}

.mini-guide-photo-wrap {
  position: relative;
  border-radius: 0.38rem;
  overflow: hidden;
  border: 1px solid rgba(197, 160, 89, 0.35);
  margin-bottom: 0.45rem;
  aspect-ratio: 16 / 7;
  background: #08090C;
}

.mini-guide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mini-guide-step-tags {
  position: absolute;
  inset: auto 0 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem;
  padding: 0.3rem;
  background: linear-gradient(0deg, rgba(8, 9, 12, 0.92) 0%, rgba(8, 9, 12, 0) 100%);
}

.mini-step-tag {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #FFFFFF;
  background: rgba(11, 13, 17, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 4px;
  padding: 0.16rem 0.3rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-step-tag strong {
  color: var(--color-gold-bright, #D4AF37);
  margin-right: 0.2rem;
}

.mini-guide-steps-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
}

.mini-guide-step-item {
  font-size: 0.68rem;
  line-height: 1.32;
  color: var(--color-text-muted, #B8BCC8);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 4px;
  padding: 0.35rem 0.45rem;
}

.mini-guide-step-item strong {
  color: #FFFFFF;
  display: block;
  font-size: 0.69rem;
  margin-bottom: 0.1rem;
}

/* Scent Pyramid Block */
.scent-pyramid-block {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(197, 160, 89, 0.15);
  border-radius: var(--radius-md, 0.5rem);
  padding: 0.7rem 0.9rem;
  margin-bottom: 0.75rem;
}

.scent-pyramid-heading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-gold-500, #C5A059);
  margin-bottom: 0.45rem;
}

.pyramid-icon {
  width: 13px;
  height: 13px;
  color: var(--color-gold-500, #C5A059);
}

.pyramid-tier {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  margin-bottom: 0.35rem;
}

.pyramid-tier:last-child {
  margin-bottom: 0;
}

.tier-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-gold-300, #E5C158);
  min-width: 86px;
}

.tier-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.note-pill {
  font-size: 0.69rem;
  padding: 0.14rem 0.48rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-parchment, #FAF5E8);
}

.note-pill.note-top {
  border-color: rgba(136, 209, 241, 0.35);
  background: rgba(136, 209, 241, 0.08);
}

.note-pill.note-middle {
  border-color: rgba(197, 160, 89, 0.35);
  background: rgba(197, 160, 89, 0.08);
}

.note-pill.note-base {
  border-color: rgba(180, 83, 9, 0.35);
  background: rgba(180, 83, 9, 0.08);
}

/* Modal Specs Grid */
.modal-specs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.spec-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.spec-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-subtle, #757A88);
}

.spec-value {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-parchment, #FAF5E8);
  line-height: 1.4;
}

/* Modal Actions */
.modal-actions-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.modal-qty-stepper {
  display: inline-flex;
  align-items: center;
  background: var(--color-charcoal-850, #16181D);
  border: 1px solid var(--color-border-dark, #262930);
  border-radius: var(--radius-md, 0.5rem);
  padding: 0.25rem;
}

.qty-btn,
#modal-qty-minus,
#modal-qty-plus {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--color-gold-500, #C5A059);
  cursor: pointer;
  border-radius: var(--radius-sm, 0.25rem);
  transition: all 0.15s ease;
}

.qty-btn:hover {
  background: rgba(197, 160, 89, 0.15);
  color: #FFFFFF;
}

.qty-display {
  min-width: 36px;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: #FFFFFF;
}

.modal-add-to-cart-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.9rem 1.5rem;
}

/* Responsive modal */
@media (max-width: 768px) {
  .product-modal-card {
    padding: 1.5rem 1.25rem;
  }

  .modal-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .modal-vessel-stage {
    max-width: none;
    aspect-ratio: 400 / 448;
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .modal-title {
    font-size: 1.75rem;
  }

  .modal-specs-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .mini-guide-steps-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .mini-step-tag {
    font-size: 0.54rem;
    padding: 0.14rem 0.2rem;
  }

  .modal-actions-row {
    flex-direction: column;
    align-items: stretch;
  }

  .modal-qty-stepper {
    justify-content: center;
  }
}
