/* ==========================================================
   components.css — Cedar Stone Bistro
   Reusable components: CTA section, promo popup, cards,
   menu items, package cards, forms. Built phase by phase.
   ========================================================== */

/* ──────────────────────────────────────────
   CTA SECTION (includes/contact-section.php)
   Used on all inner pages above the footer.
────────────────────────────────────────── */
.cta-section {
  position: relative;
  overflow: hidden;
  padding-block: 6rem;
  isolation: isolate;
}

.cta-section__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.cta-section__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Dark overlay over the background image */
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    135deg,
    rgba(7, 4, 9, 0.9) 0%,
    rgba(27, 13, 34, 0.84) 55%,
    rgba(131, 28, 145, 0.22) 100%
  );
}

.cta-section__content {
  position: relative;
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
}

.cta-section__eyebrow {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cs-gold);
  margin-bottom: 0.875rem;
}

.cta-section__title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--cs-white);
  margin-bottom: 1rem;
}

.cta-section__text {
  font-size: 1.2rem;
  color: var(--cs-muted);
  line-height: 1.75;
  margin-bottom: 2rem;
}

.cta-section__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

@media (max-width: 767px) {
  .cta-section {
    padding-block: 4rem;
  }

  .cta-section__actions {
    flex-direction: column;
    align-items: center;
  }

  .cta-section__actions .btn {
    width: 100%;
    max-width: 360px;
  }
}

/* ──────────────────────────────────────────
   PROMOTIONAL POPUP (includes/promo-popup.php)
   Homepage only, shown on scroll to contact section.
────────────────────────────────────────── */
/* Lock body scroll while promo popup is visible */
body:has(#promo-popup:not([hidden])) {
  overflow: hidden;
}

.promo-popup {
  position: fixed;
  inset: 0;
  z-index: 8500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.promo-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 4, 7, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

.promo-popup__card {
  position: relative;
  z-index: 1;
  background: var(--cs-bg-3);
  border: 1px solid var(--cs-line-gold);
  border-radius: var(--radius-lg);
  box-shadow:
    0 8px 64px rgba(0, 0, 0, 0.7),
    0 0 60px rgba(215, 181, 109, 0.07);
  padding: 2.5rem 2rem;
  max-width: 480px;
  width: 100%;
  text-align: center;
  animation: promo-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes promo-in {
  from {
    transform: translateY(24px) scale(0.96);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .promo-popup__card {
    animation: none;
  }
}

.promo-popup__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--cs-muted);
  transition:
    color var(--transition),
    background var(--transition);
}

.promo-popup__close:hover,
.promo-popup__close:focus-visible {
  color: var(--cs-white);
  background: rgba(255, 255, 255, 0.08);
}

.promo-popup__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem 1rem;
  border-radius: 20px;
  background: rgba(215, 181, 109, 0.1);
  border: 1px solid var(--cs-line-gold);
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cs-gold);
  margin: 0 auto 1.5rem;
}

.promo-popup__title {
  font-size: clamp(1.375rem, 3vw, 1.875rem);
  font-weight: 700;
  color: var(--cs-white);
  margin-bottom: 0.875rem;
  line-height: 1.2;
}

.promo-popup__desc {
  font-size: 1.4rem;
  color: var(--cs-muted);
  line-height: 1.65;
  margin-bottom: 1.75rem;
}

.promo-popup__desc strong {
  color: var(--cs-gold);
  font-weight: 700;
}

.promo-popup__cta {
  width: 100%;
}

@media (min-width: 480px) {
  .promo-popup__card {
    padding: 3rem 2.5rem;
  }
}

/* ──────────────────────────────────────────
   SECTION EYEBROW LABEL
   Reusable uppercase gold label above headings.
────────────────────────────────────────── */
.eyebrow {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cs-gold);
  margin-bottom: 0.875rem;
}

/* ──────────────────────────────────────────
   SECTION HEADING BLOCK
   Standard heading + intro text combo.
────────────────────────────────────────── */
.section-header {
  margin-bottom: 3rem;
}

.section-header--center {
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
  margin-bottom: 3rem;
}

.section-header p {
  font-size: 1.2rem;
  color: var(--cs-muted);
  margin-top: 0.875rem;
}

/* ──────────────────────────────────────────
   GOLD DIVIDER LINE
────────────────────────────────────────── */
.gold-divider {
  width: 60px;
  height: 2px;
  background: var(--cs-gold);
  border: none;
  margin-block: 1.5rem;
}

.gold-divider--center {
  margin-inline: auto;
}

/* ──────────────────────────────────────────
   CARDS — base (filled by later phases)
────────────────────────────────────────── */
.card {
  background: var(--cs-bg-3);
  border: 1px solid var(--cs-line);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}

.card:hover {
  border-color: var(--cs-line-gold);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.4);
}

.card__body {
  padding: 1.75rem;
}

.card__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cs-white);
  margin-bottom: 0.625rem;
}

.card__text {
  font-size: 1.1375rem;
  color: var(--cs-muted);
  line-height: 1.7;
}

/* ──────────────────────────────────────────
   VIP PACKAGE CARDS
   Shared by homepage and entertainment pages.
────────────────────────────────────────── */
.packages-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: stretch;
}

.package-card {
  background: var(--cs-bg-3);
  border: 1px solid var(--cs-line);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}

.package-card:hover {
  border-color: var(--cs-line-gold);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

.package-card--featured {
  border-color: var(--cs-purple-soft);
  background: linear-gradient(
    160deg,
    rgba(131, 28, 145, 0.12) 0%,
    var(--cs-bg-3) 100%
  );
  box-shadow:
    0 0 0 1px rgba(131, 28, 145, 0.2),
    0 8px 40px rgba(131, 28, 145, 0.1);
  position: relative;
}

.package-card--featured::before {
  content: 'Bestseller';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--cs-purple);
  color: var(--cs-white);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.25rem 1rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.package-card__badge {
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cs-gold);
  margin-bottom: 1rem;
}

.package-card__name {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--cs-white);
  margin-bottom: 0.375rem;
}

.package-card__tagline {
  font-size: 1.1rem;
  color: var(--cs-muted);
  font-style: italic;
  margin-bottom: 1.5rem;
}

.package-card__price {
  margin-bottom: 1.5rem;
}

.package-card__price-amount {
  font-size: 2rem;
  font-weight: 700;
  color: var(--cs-white);
  font-family: var(--font-main);
}

.package-card__price-unit {
  font-size: 0.875rem;
  color: var(--cs-muted);
  margin-left: 0.375rem;
}

.package-card__divider {
  width: 100%;
  height: 1px;
  background: var(--cs-line);
  border: 0;
  margin-bottom: 1.5rem;
}

.package-card__features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  flex: 1;
  margin-bottom: 2rem;
}

.package-card__features li {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 1.1rem;
  color: var(--cs-muted);
  line-height: 1.5;
}

.package-card__features li::before {
  content: '';
  flex-shrink: 0;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--cs-gold);
  margin-top: 0.55em;
}

.package-card .btn {
  width: 100%;
}

@media (max-width: 767px) {
  .packages-grid {
    grid-template-columns: 1fr;
    max-width: 440px;
    margin-inline: auto;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .packages-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

/* ──────────────────────────────────────────
   FORMS — base (Phase 9)
────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cs-muted);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--cs-line);
  border-radius: var(--radius-sm);
  color: var(--cs-white);
  font-family: var(--font-main);
  font-size: 1.4rem;
  line-height: 1.5;
  transition:
    border-color var(--transition),
    background var(--transition);
  appearance: none;
  -webkit-appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--cs-purple-soft);
  background: rgba(255, 255, 255, 0.06);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: rgba(232, 223, 240, 0.35);
}

.form-textarea {
  resize: vertical;
  min-height: 140px;
}

.form-error {
  font-size: 0.875rem;
  color: #f27878;
  display: none;
}

.form-group--error .form-input,
.form-group--error .form-select,
.form-group--error .form-textarea {
  border-color: #f27878;
}

.form-group--error .form-error {
  display: block;
}

.form-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 1.1375rem;
  color: var(--cs-muted);
  cursor: pointer;
  line-height: 1.6;
}

.form-checkbox-label input[type='checkbox'] {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  accent-color: var(--cs-purple);
  margin-top: 2px;
  cursor: pointer;
}

.form-note {
  font-size: 0.875rem;
  color: rgba(232, 223, 240, 0.5);
  font-style: italic;
}

/* ──────────────────────────────────────────
   INNER PAGE HERO
   Used on all content pages (not homepage).
────────────────────────────────────────── */
.page-hero {
  position: relative;
  height: clamp(420px, 55vh, 680px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}

.page-hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.page-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    to top,
    rgba(5, 4, 7, 0.95) 0%,
    rgba(5, 4, 7, 0.6) 45%,
    rgba(5, 4, 7, 0.25) 80%,
    transparent 100%
  );
}

.page-hero__content {
  padding-bottom: 4rem;
  max-width: 720px;
}

.page-hero__breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(232, 223, 240, 0.45);
  margin-bottom: 1.25rem;
}

.page-hero__breadcrumb a {
  color: #fff;
  text-decoration: none;
  transition: color var(--transition);
}

.page-hero__breadcrumb a:hover {
  color: var(--cs-gold);
}

.page-hero__breadcrumb span {
}

.page-hero__eyebrow {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cs-gold);
  margin-bottom: 0.875rem;
}

.page-hero__title {
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--cs-white);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.page-hero__title em {
  font-style: italic;
  color: var(--cs-gold);
}

.page-hero__desc {
  font-size: 1.2rem;
  color: var(--cs-muted);
  line-height: 1.7;
  max-width: 540px;
}

@media (max-width: 767px) {
  .page-hero {
    height: clamp(360px, 60vh, 520px);
  }

  .page-hero__content {
    padding-bottom: 3rem;
  }
}

/* ──────────────────────────────────────────
   SPLIT SECTION
   Reusable editorial split layout (image + text).
   Used on restaurant, lounge, entertainment, about pages.
────────────────────────────────────────── */
.split-section {
  padding-block: 6rem;
}

.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.split-layout--reverse {
  direction: rtl;
}

.split-layout--reverse > * {
  direction: ltr;
}

.split-visual {
  position: relative;
}

.split-visual__frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.split-visual__frame img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  display: block;
}

.split-visual__frame::before {
  content: '';
  position: absolute;
  top: -8px;
  left: -8px;
  width: 64px;
  height: 64px;
  border-top: 2px solid var(--cs-gold);
  border-left: 2px solid var(--cs-gold);
  z-index: 1;
  pointer-events: none;
  border-radius: 2px;
}

.split-visual__frame::after {
  content: '';
  position: absolute;
  bottom: -8px;
  right: -8px;
  width: 64px;
  height: 64px;
  border-bottom: 2px solid var(--cs-gold);
  border-right: 2px solid var(--cs-gold);
  z-index: 1;
  pointer-events: none;
  border-radius: 2px;
}

.split-body {
  padding-block: 1rem;
}

.split-body h2 {
  margin-bottom: 1rem;
}

.split-body p {
  font-size: 1.2rem;
  color: var(--cs-muted);
  line-height: 1.75;
  margin-bottom: 1.5rem;
}

.split-body .btn {
  margin-top: 0.5rem;
}

.split-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-bottom: 2rem;
}

.split-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.1375rem;
  color: var(--cs-muted);
}

.split-features li::before {
  content: '';
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cs-gold);
}

@media (max-width: 1023px) {
  .split-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .split-layout--reverse {
    direction: ltr;
  }

  .split-visual__frame img {
    aspect-ratio: 16/9;
  }
}

/* ──────────────────────────────────────────
   FEATURE GRID
   3 or 4 icon + title + text feature items.
────────────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.feature-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

.feature-item {
  padding: 1.75rem;
  background: var(--cs-bg-3);
  border: 1px solid var(--cs-line);
  border-radius: var(--radius-md);
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}

.feature-item:hover {
  border-color: var(--cs-line-gold);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.feature-item__icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}

.feature-item__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--cs-white);
  margin-bottom: 0.5rem;
}

.feature-item__text {
  font-size: 1.1rem;
  color: var(--cs-muted);
  line-height: 1.65;
}

@media (max-width: 767px) {
  .feature-grid,
  .feature-grid--4 {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .feature-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ──────────────────────────────────────────
   STRIP GALLERY
   Horizontal 2-3 image strip for atmosphere sections.
────────────────────────────────────────── */
.strip-gallery {
  display: grid;
  gap: 1rem;
}

.strip-gallery--2 {
  grid-template-columns: 1fr 1fr;
}

.strip-gallery--3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.strip-gallery__item {
  border-radius: var(--radius-md);
  overflow: hidden;
}

.strip-gallery__item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.strip-gallery__item:hover img {
  transform: scale(1.04);
}

@media (max-width: 767px) {
  .strip-gallery--3 {
    grid-template-columns: 1fr 1fr;
  }

  .strip-gallery--2 {
    grid-template-columns: 1fr;
  }
}

/* ──────────────────────────────────────────
   PROSE SECTION
   Centered or max-width text intro block.
────────────────────────────────────────── */
.prose-section {
  padding-block: 5rem;
}

.prose-section--bg {
  background: var(--cs-bg-2);
}

.prose-block {
  max-width: 760px;
}

.prose-block--center {
  margin-inline: auto;
  text-align: center;
}

.prose-block h2 {
  margin-bottom: 1.25rem;
}

.prose-block p {
  font-size: 1.2rem;
  color: var(--cs-muted);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.prose-block p:last-child {
  margin-bottom: 0;
}

/* ──────────────────────────────────────────
   LIGHTBOX
   Full-screen viewer with smooth zoom, drag-to-pan, pinch zoom.
   Triggered via [data-lightbox] elements.
────────────────────────────────────────── */
body:has(#lightbox:not([hidden])) {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9500;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 3, 6, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.lightbox__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  animation: lb-in 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes lb-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox__panel {
    animation: none;
  }
}

/* ── Toolbar ── */
.lightbox__toolbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(5, 4, 7, 0.88);
  border-bottom: 1px solid rgba(215, 181, 109, 0.12);
  min-height: 52px;
}

.lightbox__toolbar-left,
.lightbox__toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.lightbox__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.5rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.13);
  color: var(--cs-white);
  cursor: pointer;
  flex-shrink: 0;
  transition:
    background var(--transition),
    border-color var(--transition);
}

.lightbox__btn:hover,
.lightbox__btn:focus-visible {
  background: rgba(215, 181, 109, 0.18);
  border-color: var(--cs-gold);
  outline: none;
}

.lightbox__btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.lightbox__close-btn:hover,
.lightbox__close-btn:focus-visible {
  background: rgba(242, 120, 120, 0.2);
  border-color: #f27878;
}

.lightbox__zoom-level {
  min-width: 3.75rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--cs-gold);
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  user-select: none;
}

/* ── Stage — pannable/zoomable area ── */
.lightbox__stage {
  flex: 1;
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.lightbox__img {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  transform-origin: 0 0;
  will-change: transform;
  cursor: inherit;
  -webkit-user-drag: none;
  max-width: none;
}

/* ── Caption ── */
.lightbox__caption {
  flex-shrink: 0;
  padding: 0.625rem 1rem;
  font-size: 1.1rem;
  font-style: italic;
  color: rgba(232, 223, 240, 0.48);
  text-align: center;
  background: rgba(5, 4, 7, 0.7);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Cursor hint for trigger elements */
[data-lightbox] {
  cursor: zoom-in;
}

/* ──────────────────────────────────────────
   MENU POSTER — lightbox keyboard focus state
────────────────────────────────────────── */
.menu-poster[data-lightbox]:focus-visible {
  outline: 2px solid var(--cs-gold);
  outline-offset: 3px;
  border-radius: var(--radius-md);
}

.menu-poster[data-lightbox]:focus-visible .menu-poster__overlay {
  opacity: 1;
}
