/* ===== Theme ===== */
:root {
  --blue: #1d4ed8;
  --blue-dark: #1e3a8a;
  --blue-light: #dbeafe;
  --white: #ffffff;
  --ink: #0f172a;
  --muted: #475569;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden; /* everything above the fold */
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--white);
  color: var(--ink);
  display: flex;
  flex-direction: column;
}

/* ===== Scrolling banner ===== */
.banner {
  background: var(--blue);
  color: var(--white);
  overflow: hidden;
  flex: 0 0 auto;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.banner-track {
  display: flex;
  gap: 2.5rem;
  padding: 0.6rem 1.25rem;
  white-space: nowrap;
  animation: scroll-x 18s linear infinite;
}

.banner:hover .banner-track { animation-play-state: paused; }

/* Desktop: scroll left to right (track duplicated in JS for a seamless loop) */
@keyframes scroll-x {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ===== Layout ===== */
.layout {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  gap: 1.5rem;
  padding: 1.5rem;
  width: 100%;
}

/* Desktop: image left, details right */
@media (min-width: 769px) {
  .layout {
    grid-template-columns: 1.1fr 1fr;
    align-items: stretch;
  }
}

/* Mobile: image top, details bottom */
@media (max-width: 768px) {
  .layout {
    grid-template-rows: 1.2fr 1fr;
  }
}

/* ===== Section 1: scrollable gallery ===== */
.gallery {
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.gallery-track {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  border-radius: 1rem;
  background: var(--blue-light);
}

.gallery-track img {
  height: 100%;
  width: 100%;
  flex: 0 0 100%;
  object-fit: cover;
  scroll-snap-align: center;
}

/* hide scrollbar but keep scrollability */
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track { scrollbar-width: none; }

/* ===== Gallery nav arrows (desktop, show on hover) ===== */
.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--white);
  color: var(--blue);
  box-shadow: 0 2px 10px rgba(30, 58, 138, 0.3);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
  z-index: 2;
}

.nav svg { width: 22px; height: 22px; }
.nav:hover { background: var(--blue-light); }
.nav.prev { left: 14px; }
.nav.next { right: 14px; }

.nav:disabled { opacity: 0 !important; pointer-events: none; }

@media (min-width: 769px) and (hover: hover) and (pointer: fine) {
  .nav { display: flex; }
  .gallery:hover .nav { opacity: 1; }
}

.dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding-top: 0.75rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue-light);
  border: 1px solid var(--blue);
  transition: background 0.2s;
}

.dot.active { background: var(--blue); }

/* ===== Section 2: details ===== */
.details {
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.5rem;
}

.details h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--blue-dark);
  line-height: 1.1;
}

.tagline {
  color: var(--blue);
  font-weight: 600;
}

.desc {
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.95rem;
}

.price {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--ink);
}

.buy-btn {
  display: block;
  text-align: center;
  background: var(--blue);
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0.9rem 1.5rem;
  border-radius: 0.75rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
}

.buy-btn:hover  { background: var(--blue-dark); }
.buy-btn:active { transform: scale(0.98); }

.trust {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
}

/* ===== Success page ===== */
.success {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
  padding: 2rem;
}

.tick {
  width: 96px;
  height: 96px;
}

.success h1 {
  color: var(--blue-dark);
  font-size: clamp(1.8rem, 5vw, 2.5rem);
}

.success p {
  color: var(--muted);
  line-height: 1.5;
  max-width: 32rem;
}

.success .buy-btn {
  margin-top: 1rem;
  padding: 0.8rem 2.5rem;
}
