/* =====================================================================
   Algaita — Homepage styles
   All classes are prefixed hp- so they never clash with style.css
===================================================================== */

:root {
  --hp-bg: #0b0d12;
  --hp-surface: #141822;
  --hp-surface-2: #1c2130;
  --hp-line: rgba(255, 255, 255, 0.08);
  --hp-text: #f4f5f7;
  --hp-muted: #9aa3b5;
  --hp-accent: #f5b301;
  --hp-accent-hover: #ffc933;
  --hp-accent-ink: #15130c;
  --hp-accent-soft: rgba(245, 179, 1, 0.14);
  --hp-danger: #ef4444;
  --hp-wa: #25d366;
  --hp-radius: 14px;
  --hp-radius-lg: 22px;
  --hp-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --hp-container: 1240px;
  --hp-gutter: 16px;
  --hp-gap: 12px;
}

.hp-body {
  background: var(--hp-bg);
  color: var(--hp-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.hp-main {
  padding-bottom: 56px;
}

.hp-wrap {
  max-width: var(--hp-container);
  margin: 0 auto;
  padding: 0 var(--hp-gutter);
}

/* ---------- Icons ---------- */
.hp-icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  display: inline-block;
  vertical-align: -0.2em;
}

.hp-icon-fill {
  fill: currentColor;
}

/* ---------- Buttons & badges ---------- */
.hp-btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, transform 0.2s;
}

.hp-btn-primary {
  background: var(--hp-accent);
  color: var(--hp-accent-ink);
}

.hp-btn-primary:hover,
.hp-btn-primary:focus-visible {
  background: var(--hp-accent-hover);
  color: var(--hp-accent-ink);
}

.hp-btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--hp-text);
  border: 1px solid var(--hp-line);
}

.hp-btn-ghost:hover,
.hp-btn-ghost:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.hp-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--hp-accent);
  color: var(--hp-accent-ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hp-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--hp-accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hp-body a:focus-visible,
.hp-body button:focus-visible {
  outline: 2px solid var(--hp-accent);
  outline-offset: 3px;
}

/* =====================================================================
   HERO
===================================================================== */
.hp-hero {
  padding-top: 16px;
}

.hp-hero-box {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--hp-radius-lg);
  overflow: hidden;
  background: var(--hp-surface);
  box-shadow: var(--hp-shadow);
  isolation: isolate;
}

.hp-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hp-hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.hp-hero-link {
  display: block;
  height: 100%;
  color: #fff;
  text-decoration: none;
}

.hp-hero-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(11, 13, 18, 0.96) 0%, rgba(11, 13, 18, 0.55) 38%, rgba(11, 13, 18, 0) 72%),
    linear-gradient(90deg, rgba(11, 13, 18, 0.55) 0%, rgba(11, 13, 18, 0) 60%);
  pointer-events: none;
}

.hp-hero-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 7s ease;
}

.hp-hero-slide.is-active .hp-hero-img {
  transform: scale(1);
}

.hp-hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  max-width: 640px;
  padding: 16px 16px 40px;
}

.hp-hero-title {
  margin: 10px 0 10px;
  color: #fff;
  font-size: clamp(1.3rem, 4.6vw, 2.9rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hp-hero-desc {
  display: none;
  margin: 0 0 18px;
  color: #d6dae3;
  font-size: 15px;
  line-height: 1.6;
}

.hp-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hp-hero-actions .hp-btn {
  min-height: 38px;
  padding: 8px 16px;
  font-size: 13px;
}

.hp-hero-price {
  color: var(--hp-accent);
  font-size: 15px;
  font-weight: 800;
}

.hp-hero-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  background: rgba(11, 13, 18, 0.5);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background-color 0.2s;
}

.hp-hero-nav:hover {
  background: rgba(11, 13, 18, 0.8);
}

.hp-hero-nav.is-prev { left: 16px; }
.hp-hero-nav.is-next { right: 16px; }

.hp-hero-dots {
  position: absolute;
  right: 12px;
  bottom: 10px;
  z-index: 3;
  display: flex;
  gap: 2px;
}

.hp-hero-dot {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.hp-hero-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  transition: width 0.3s, background-color 0.3s;
}

.hp-hero-dot.is-active::before {
  width: 24px;
  background: var(--hp-accent);
}

/* =====================================================================
   INTRO (page H1 + app / bot links)
===================================================================== */
.hp-intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
  padding: 20px 18px;
  border: 1px solid var(--hp-line);
  border-radius: var(--hp-radius-lg);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(245, 179, 1, 0.16) 0%, rgba(245, 179, 1, 0) 55%),
    var(--hp-surface);
}

.hp-intro h1 {
  margin: 8px 0 8px;
  color: #fff;
  font-size: clamp(1.4rem, 3.4vw, 2.1rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hp-intro p {
  max-width: 640px;
  margin: 0;
  color: var(--hp-muted);
  font-size: 14.5px;
  line-height: 1.6;
}

.hp-intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hp-intro-actions .hp-btn {
  flex: 1 1 150px;
}

/* =====================================================================
   SECTIONS
===================================================================== */
.hp-section {
  margin-top: 36px;
}

.hp-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.hp-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #fff;
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.hp-section-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 10px;
  background: var(--hp-accent-soft);
  color: var(--hp-accent);
}

.hp-section-sub {
  margin: 6px 0 0;
  color: var(--hp-muted);
  font-size: 13.5px;
  line-height: 1.5;
}

.hp-section-foot {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.hp-rail-controls {
  display: none;
  gap: 8px;
  flex: none;
}

.hp-rail-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--hp-line);
  border-radius: 999px;
  background: var(--hp-surface);
  color: var(--hp-text);
  cursor: pointer;
  transition: background-color 0.2s, opacity 0.2s;
}

.hp-rail-btn:hover:not(:disabled) {
  background: var(--hp-surface-2);
}

.hp-rail-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* Horizontal scrolling row (full-bleed on phones) */
.hp-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(128px, 38vw, 180px);
  gap: var(--hp-gap);
  margin: 0 calc(var(--hp-gutter) * -1);
  padding: 4px var(--hp-gutter) 10px;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--hp-gutter);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.hp-rail::-webkit-scrollbar {
  display: none;
}

.hp-rail > li {
  scroll-snap-align: start;
}

/* Poster grid */
.hp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* =====================================================================
   MOVIE CARD
===================================================================== */
.hp-card {
  min-width: 0;
}

.hp-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  border-radius: var(--hp-radius);
}

.hp-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--hp-radius);
  background: var(--hp-surface-2);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.hp-poster img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.hp-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 42%);
  pointer-events: none;
}

.hp-price {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 1;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(11, 13, 18, 0.85);
  color: var(--hp-accent);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.hp-price.is-free {
  background: var(--hp-accent);
  color: var(--hp-accent-ink);
}

.hp-rank {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 28px;
  padding: 0 7px;
  border-radius: 8px;
  background: var(--hp-accent);
  color: var(--hp-accent-ink);
  font-size: 13px;
  font-weight: 800;
}

.hp-play {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.25s;
}

.hp-play .hp-icon {
  box-sizing: border-box;
  width: 48px;
  height: 48px;
  padding: 13px 12px 13px 14px;
  border-radius: 999px;
  background: var(--hp-accent);
  color: var(--hp-accent-ink);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

.hp-card-title {
  display: -webkit-box;
  margin: 8px 2px 0;
  overflow: hidden;
  color: var(--hp-text);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s;
}

.hp-card-note {
  display: -webkit-box;
  margin: 3px 2px 0;
  overflow: hidden;
  color: var(--hp-muted);
  font-size: 12px;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.hp-soon {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(11, 13, 18, 0.85);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.hp-card-upcoming .hp-poster img {
  filter: saturate(0.85);
}

@media (hover: hover) {
  .hp-card-link:hover .hp-poster img { transform: scale(1.06); }
  .hp-card-link:hover .hp-play { opacity: 1; }
  .hp-card-link:hover .hp-card-title { color: var(--hp-accent); }
}

.hp-card-link:focus-visible .hp-play {
  opacity: 1;
}

/* =====================================================================
   TRAILER
===================================================================== */
.hp-trailer {
  display: grid;
  gap: 18px;
  margin-top: 36px;
  padding: 12px;
  border: 1px solid var(--hp-line);
  border-radius: var(--hp-radius-lg);
  background: var(--hp-surface);
}

.hp-trailer-player {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--hp-radius);
  background: #000 center / cover no-repeat;
}

.hp-trailer-player::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
}

.hp-trailer-player.is-playing::before {
  display: none;
}

.hp-trailer-player iframe,
.hp-trailer-player video {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: #000;
}

.hp-trailer-play {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--hp-accent);
  color: var(--hp-accent-ink);
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s, background-color 0.2s;
}

.hp-trailer-play:hover {
  background: var(--hp-accent-hover);
  transform: scale(1.06);
}

.hp-trailer-play .hp-icon {
  width: 28px;
  height: 28px;
  margin-left: 4px;
}

.hp-trailer-info {
  padding: 2px 6px 8px;
}

.hp-trailer-info h2 {
  margin: 8px 0 8px;
  color: #fff;
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.hp-trailer-info p {
  margin: 0;
  color: var(--hp-muted);
  font-size: 14px;
  line-height: 1.6;
}

.hp-trailer-info .hp-btn {
  margin-top: 16px;
}

/* =====================================================================
   EMPTY STATE
===================================================================== */
.hp-empty {
  padding: 44px 20px;
  border: 1px dashed var(--hp-line);
  border-radius: var(--hp-radius-lg);
  color: var(--hp-muted);
  text-align: center;
}

.hp-empty .hp-icon {
  width: 38px;
  height: 38px;
  color: var(--hp-accent);
}

.hp-empty h3 {
  margin: 12px 0 6px;
  color: #fff;
  font-size: 18px;
}

.hp-empty p {
  margin: 0;
  font-size: 14px;
}

/* =====================================================================
   FLOATING BUTTONS (cart + WhatsApp)
===================================================================== */
.hp-fab-stack {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  animation: hp-fab-in 0.5s ease 0.6s both;
}

@keyframes hp-fab-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hp-fab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s, background-color 0.2s;
}

.hp-fab:hover {
  color: #fff;
  transform: translateY(-2px);
}

.hp-fab .hp-icon {
  width: 22px;
  height: 22px;
}

.hp-fab-wa { background: var(--hp-wa); }
.hp-fab-wa:hover { background: #1fbb59; }

.hp-fab-cart {
  background: var(--hp-surface-2);
  border: 1px solid var(--hp-line);
}

.hp-fab-count {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--hp-danger);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

/* =====================================================================
   RESPONSIVE
===================================================================== */
@media (max-width: 599px) {
  .hp-fab {
    width: 52px;
    padding: 0;
  }

  .hp-fab-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .hp-fab-count {
    position: absolute;
    top: -4px;
    right: -4px;
  }
}

@media (min-width: 600px) {
  :root { --hp-gutter: 20px; }

  .hp-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }

  .hp-card-title { font-size: 13.5px; }
}

@media (min-width: 768px) {
  .hp-hero-box { aspect-ratio: 21 / 9; }

  .hp-hero-content { padding: 32px 36px 40px; }

  .hp-hero-desc {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .hp-hero-actions .hp-btn {
    min-height: 44px;
    padding: 10px 20px;
    font-size: 14px;
  }

  .hp-hero-nav { display: grid; }

  .hp-hero-dots {
    right: 24px;
    bottom: 20px;
  }

  .hp-intro {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 26px 30px;
  }

  .hp-intro-actions {
    flex-wrap: nowrap;
  }

  .hp-intro-actions .hp-btn {
    flex: none;
  }
}

@media (min-width: 900px) {
  .hp-rail-controls { display: flex; }

  .hp-rail {
    grid-auto-columns: calc((100% - 5 * var(--hp-gap)) / 6);
    margin: 0;
    padding: 4px 0 10px;
    scroll-padding-inline: 0;
  }

  .hp-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
  }

  .hp-trailer {
    grid-template-columns: 1.4fr 1fr;
    align-items: center;
    gap: 28px;
    padding: 18px;
  }

  .hp-section { margin-top: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .hp-body *,
  .hp-body *::before,
  .hp-body *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}