/* ── Preview Page ── */
.preview-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  padding-top: calc(var(--nav-h) + var(--sp-lg));
  min-height: 100vh;
  align-items: start;
}

/* ── Browser Frame ── */
.browser-frame {
  border: 1px solid var(--c-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--c-surface);
  box-shadow: 0 40px 120px rgba(0,0,0,0.6);
}

.browser-frame__bar {
  background: #1a1a1a;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--c-border);
}

.browser-frame__dots {
  display: flex;
  gap: 0.4rem;
}

.browser-frame__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.browser-frame__dot:nth-child(1) { background: #ff5f57; }
.browser-frame__dot:nth-child(2) { background: #febc2e; }
.browser-frame__dot:nth-child(3) { background: #28c840; }

.browser-frame__url {
  flex: 1;
  background: #111;
  border: 1px solid var(--c-border);
  border-radius: 4px;
  padding: 0.3rem 0.75rem;
  font-size: 0.72rem;
  color: var(--c-muted);
  font-family: var(--font-mono);
}

/* ── Assembled Preview ── */
.preview-canvas {
  min-height: 600px;
}

.preview-section {
  border-bottom: 1px solid rgba(255,255,255,0.06);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.preview-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Section: Hero */
.ps-hero {
  aspect-ratio: 16/7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-lg);
  position: relative;
  overflow: hidden;
}

.ps-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  transition: background var(--tr-slow);
}

.ps-hero__content { position: relative; z-index: 1; }

.ps-hero__eyebrow {
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 1rem;
}

.ps-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 300;
  line-height: 1.05;
  margin-bottom: 1rem;
}

.ps-hero__sub {
  font-size: 0.9rem;
  color: var(--c-muted);
  margin-bottom: 2rem;
}

/* Section: Nav */
.ps-nav {
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(8,8,8,0.9);
}
.ps-nav__logo { font-family: var(--font-display); font-size: 1.2rem; }
.ps-nav__links { display: flex; gap: 1.5rem; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-muted); }

/* Section: Services */
.ps-services {
  padding: 3rem 2rem;
}
.ps-services__title { font-family: var(--font-display); font-size: 1.8rem; font-weight: 300; margin-bottom: 2rem; }
.ps-services__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.ps-service-card { border: 1px solid var(--c-border); border-radius: 3px; padding: 1.25rem; }
.ps-service-card__icon { font-size: 1.5rem; margin-bottom: 0.75rem; }
.ps-service-card__title { font-size: 0.9rem; font-weight: 500; margin-bottom: 0.4rem; }
.ps-service-card__desc { font-size: 0.75rem; color: var(--c-muted); max-width: none; }

/* Section: Gallery */
.ps-gallery {
  padding: 3rem 2rem;
}
.ps-gallery__title { font-family: var(--font-display); font-size: 1.8rem; font-weight: 300; margin-bottom: 2rem; }
.ps-gallery__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.ps-gallery__item { aspect-ratio: 4/3; border-radius: 3px; display: flex; align-items: center; justify-content: center; font-size: 2rem; border: 1px solid var(--c-border); }

/* Section: Contact */
.ps-contact {
  padding: 3rem 2rem;
  display: flex;
  gap: 3rem;
}
.ps-contact__left { flex: 1; }
.ps-contact__title { font-family: var(--font-display); font-size: 2rem; font-weight: 300; margin-bottom: 1rem; }
.ps-contact__field { border-bottom: 1px solid var(--c-border); padding: 0.75rem 0; margin-bottom: 0.75rem; font-size: 0.8rem; color: var(--c-muted); }
.ps-contact__right { width: 200px; display: flex; flex-direction: column; gap: 0.75rem; font-size: 0.8rem; }
.ps-contact__info { color: var(--c-muted); }

/* Section: Footer */
.ps-footer {
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--c-surface);
  font-size: 0.75rem;
  color: var(--c-muted);
}

/* ── Design Themes ── */
[data-theme="cinemaflow"] .ps-hero__bg { background: linear-gradient(135deg, #050505 0%, #1a1208 100%); }
[data-theme="cinery"]     .ps-hero__bg { background: linear-gradient(135deg, #080808 0%, #0d0d1a 100%); }
[data-theme="cinemax"]    .ps-hero__bg { background: linear-gradient(135deg, #000810 0%, #001428 100%); }
[data-theme="cinemaflow"] .ps-hero__bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(232,200,122,0.08) 0%, transparent 70%); }
[data-theme="cinery"]     .ps-hero__bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(160,124,240,0.08) 0%, transparent 70%); }
[data-theme="cinemax"]    .ps-hero__bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(92,224,184,0.08) 0%, transparent 70%); }

/* ── Sidebar ── */
.preview-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sidebar-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 4px;
  padding: 1.25rem;
}

.sidebar-card__title {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--c-border);
}

.sidebar-selection-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-selection-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--c-border);
}
.sidebar-selection-item:last-child { border-bottom: none; }

.sidebar-selection-item__section { color: var(--c-muted); text-transform: capitalize; }
.sidebar-selection-item__design { color: var(--c-accent); font-size: 0.75rem; }

.sidebar-selection-item__edit {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-muted);
  cursor: pointer;
  transition: color var(--tr-fast);
}
.sidebar-selection-item__edit:hover { color: var(--c-text); }

.preview-hero-header {
  padding-top: calc(var(--nav-h) + var(--sp-md));
  padding-bottom: var(--sp-sm);
}

@media (max-width: 900px) {
  .preview-layout { grid-template-columns: 1fr; }
  .preview-sidebar { position: static; }
  .ps-services__grid { grid-template-columns: repeat(2, 1fr); }
}
