/* ============================================================
   INDEX — Layout overrides + Secciones de preview
   ============================================================ */

/* Fix: viewport centrado funciona mal con contenido largo */
.viewport {
  display: block;
  padding: 0;
}

/* El card pasa a ser un contenedor de ancho máximo */
.card {
  max-width: 460px;
  margin: 0 auto;
  padding: 32px 0 60px;
}

/* El header/logo/subtitle mantiene su padding */
.card > .brand {
  padding: 0 24px;
  margin-bottom: 8px;
}

/* ============================================================
   Desktop responsive
   ============================================================ */
/* Flechas — ocultas en mobile */
.prev-arrow {
  display: none;
}

@media (min-width: 700px) {
  .card {
    max-width: 100%;
    padding: 40px 0 60px;
  }

  .card > .brand {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }

  .preview-sections {
    max-width: 1400px;
    margin: 24px auto 0;
    padding: 0 32px;
    gap: 20px;
  }

  .preview-section {
    padding: 20px;
    border-radius: 20px;
  }

  /* Wrapper con flechas */
  .preview-scroll-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  /* Flechas de navegación */
  .prev-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #ff3131 0%, #ff914d 100%);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 49, 49, 0.4);
    transition: transform 0.1s ease, filter 0.15s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .prev-arrow:hover { filter: brightness(1.1); transform: scale(1.05); }
  .prev-arrow:active { transform: scale(0.93); }

  /* Scroll horizontal con scrollbar oculto */
  .preview-scroll {
    flex: 1;
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 10px;
    padding-right: 0;
    padding-bottom: 4px;
  }

  .prev-card {
    flex-shrink: 0;
    width: 120px;
  }

  .prev-skeleton {
    flex-shrink: 0;
    width: 120px;
    height: 185px;
  }

  .prev-card__img {
    height: 110px;
  }

  .prev-card--ver-todo {
    flex-shrink: 0;
    width: 120px;
    height: 185px;
    min-height: unset;
  }
}

/* ============================================================
   Secciones de preview
   ============================================================ */

.preview-sections {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  padding: 0 16px;
  box-sizing: border-box;
}

.preview-section {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 16px 0 16px 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-right: 16px;
  margin-bottom: 12px;
}

.preview-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #1a1a1a;
}

.preview-ver-todo {
  font-size: 0.72rem;
  font-weight: 700;
  color: #c0380a;
  text-decoration: none;
  border: 1.5px solid #c0380a;
  border-radius: 20px;
  padding: 3px 11px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.preview-ver-todo:active,
.preview-ver-todo:hover {
  background: #c0380a;
  color: #fff;
}

/* Scroll horizontal */
.preview-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-right: 16px;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.preview-scroll::-webkit-scrollbar {
  display: none;
}

/* Placeholder */
.preview-placeholder {
  font-size: 0.8rem;
  color: #aaa;
  padding: 10px 0;
  font-style: italic;
  margin: 0;
}

/* Skeleton */
.prev-skeleton {
  flex-shrink: 0;
  width: 110px;
  height: 158px;
  background: #ececec;
  border-radius: 14px;
  animation: prevPulse 1.1s ease infinite alternate;
}

@keyframes prevPulse {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

/* Cards */
.prev-card {
  flex-shrink: 0;
  width: 110px;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid #f0f0f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-align: left;
  padding: 0;
}

.prev-card:active {
  transform: scale(0.96);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

@media (hover: hover) {
  .prev-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
  }
}

.prev-card__img {
  width: 100%;
  height: 90px;
  background: #f8f8f8;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.prev-card__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}

.prev-card__body {
  padding: 7px 8px 9px;
}

.prev-card__name {
  font-size: 0.63rem;
  font-weight: 600;
  color: #222;
  line-height: 1.3;
  margin: 0 0 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.prev-card__price {
  font-size: 0.7rem;
  font-weight: 800;
  color: #c0380a;
  margin: 0;
}

/* Card "Ver todos" */
.prev-card--ver-todo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #ff3131 0%, #ff914d 100%);
  border: none;
  box-shadow: 0 4px 14px rgba(255, 60, 0, 0.35);
  height: 158px;
}

.prev-card__ver-todo-icon {
  font-size: 1.6rem;
  color: #fff;
  line-height: 1;
}

.prev-card__ver-todo-label {
  font-size: 0.7rem;
  font-weight: 800;
  color: #fff;
  text-align: center;
  line-height: 1.3;
}
