/* Plekari — tema oscuro (alineado con el fondo fotográfico) */
:root {
  --color-bg: #0c1214;
  --color-surface: #141c20;
  --color-surface-raised: #1a252b;
  --color-text: #f5f5f4;
  --color-text-muted: #a8a29e;
  --color-accent: #2dd4bf;
  --color-accent-hover: #5eead4;
  --color-border: rgba(148, 163, 184, 0.16);
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 14px 44px rgba(0, 0, 0, 0.4);
  --radius: 12px;
  --container: min(1120px, 92vw);
  --site-header-height: 15rem;
  --header-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-duration: 0.55s;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--color-accent-hover);
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 1000;
  padding: 0.75rem 1rem;
  background: var(--color-accent);
  color: #fff;
  font-weight: 600;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  transition:
    background-color var(--header-duration) var(--header-ease),
    border-color var(--header-duration) var(--header-ease),
    box-shadow var(--header-duration) var(--header-ease);
}

.page-home .site-header {
  background-color: transparent;
  background-image: none;
  border-bottom-color: transparent;
  box-shadow: none;
  transition:
    background-color var(--header-duration) var(--header-ease),
    border-color var(--header-duration) var(--header-ease),
    box-shadow var(--header-duration) var(--header-ease);
}

.page-home .site-header.is-scrolled {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.site-header .site-logo img {
  filter: brightness(0) invert(1);
  opacity: 0.94;
  transition: filter 0.28s ease, opacity 0.2s ease;
}

.page-home .site-header:not(.is-scrolled) .site-logo img {
  opacity: 1;
}

.site-header__inner {
  width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 0 1.25rem;
  transition:
    padding var(--header-duration) var(--header-ease),
    gap var(--header-duration) var(--header-ease);
}

.page-layout .site-header .site-header__inner {
  /* Sin transición en padding/gap: --header-shrink se actualiza al hacer scroll;
     animarlo choca con el objetivo que cambia y produce temblor. */
  transition: none;
  padding-top: calc(0.4rem + 0.6rem * (1 - var(--header-shrink, 0)));
  padding-bottom: calc(0.4rem + 0.85rem * (1 - var(--header-shrink, 0)));
  gap: calc(0.75rem + 0.25rem * (1 - var(--header-shrink, 0)));
}

.site-header.is-scrolled .site-header__inner {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1rem;
  padding: 0.4rem 0;
}

.page-home .site-header.is-scrolled .site-header__inner {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
}

.site-header.is-scrolled .site-logo {
  order: 1;
}

.site-header.is-scrolled .site-logo img {
  height: 44px;
  max-width: 180px;
}

.page-layout .site-header .site-logo img {
  height: calc(132px - 88px * var(--header-shrink, 0));
  max-width: min(90vw, calc(180px + 420px * (1 - var(--header-shrink, 0))));
  transition: filter var(--header-duration) var(--header-ease), opacity 0.2s ease;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
  text-decoration: none;
}

.site-logo:hover {
  color: var(--color-accent-hover);
}

.site-logo img {
  height: 132px;
  width: auto;
  max-width: min(90vw, 600px);
  display: block;
  object-fit: contain;
  transition:
    height var(--header-duration) var(--header-ease),
    max-width var(--header-duration) var(--header-ease),
    opacity 0.2s ease;
}

.site-logo:hover img {
  opacity: 0.92;
}

.site-main {
  width: var(--container);
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
}

.hero {
  background: linear-gradient(165deg, var(--color-surface) 0%, var(--color-bg) 55%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 3rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.hero:not(.hero--home) .hero__title {
  color: var(--color-text);
}

.hero:not(.hero--home) .hero__lead {
  color: var(--color-text-muted);
}

.hero--home {
  background: transparent;
  border-color: transparent;
}

.hero--home::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(
      165deg,
      rgba(15, 23, 25, 0.72) 0%,
      rgba(15, 23, 25, 0.45) 45%,
      rgba(15, 23, 25, 0.55) 100%
    ),
    url("../images/fondo.jpg") center / cover no-repeat;
  z-index: 0;
}

.hero--home > * {
  position: relative;
  z-index: 1;
}

.page-home .site-main--home {
  width: 100%;
  max-width: none;
  margin: 0;
  margin-top: calc(-1 * var(--site-header-height));
  padding: 0;
}

.page-home .hero--home {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin-bottom: 0;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: calc(var(--site-header-height) + clamp(1.75rem, 8vh, 4rem));
  padding-bottom: clamp(2.5rem, 12vh, 6rem);
  padding-left: max(1.25rem, calc((100vw - var(--container)) / 2));
  padding-right: max(1.25rem, calc((100vw - var(--container)) / 2));
}

.page-home .hero--home .hero__title {
  color: #fafaf9;
  max-width: 22ch;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}

.page-home .hero--home .hero__lead {
  color: rgba(250, 250, 249, 0.92);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

.page-home .hero--home .btn--ghost {
  border-color: rgba(250, 250, 249, 0.55);
  color: #fafaf9;
  background: rgba(15, 23, 25, 0.25);
}

.page-home .hero--home .btn--ghost:hover {
  border-color: #fafaf9;
  color: #fafaf9;
  background: rgba(15, 23, 25, 0.45);
}

.page-home__content {
  width: var(--container);
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.hero__title {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  max-width: 28ch;
}

.hero__lead {
  margin: 0;
  font-size: 1.125rem;
  color: var(--color-text-muted);
  max-width: 42ch;
}

.section-title {
  font-size: 1.5rem;
  margin: 0 0 1.25rem;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card__title {
  margin: 0;
  font-size: 1.15rem;
  color: var(--color-text);
}

.card__text {
  margin: 0;
  color: var(--color-text-muted);
  flex-grow: 1;
}

.card--product .card__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px;
  margin: 0 0 1rem;
  background: var(--color-surface-raised);
}

.card--product .card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-shot {
  margin: 0 auto 2rem;
  max-width: 56rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  background: var(--color-surface);
}

.product-shot img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
}

.prose .product-shot + .product-shot {
  margin-top: 1.25rem;
}

.product-shot--narrow {
  max-width: 28rem;
}

.product-shot figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  background: var(--color-surface);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
  list-style: none;
  padding: 0;
}

.media-grid li {
  margin: 0;
}

.media-grid img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--color-border);
}

.media-grid-hint {
  margin: -1rem 0 0.75rem;
  color: var(--color-text-muted);
}

.media-grid--lightbox .media-grid__open {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
  border-radius: 8px;
  font: inherit;
  color: inherit;
}

.media-grid--lightbox .media-grid__open:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.media-grid--lightbox .media-grid__open img {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.media-grid--lightbox .media-grid__open:hover img {
  opacity: 0.92;
  transform: scale(1.02);
}

.image-lightbox {
  padding: 0;
  margin: auto;
  border: none;
  max-width: none;
  max-height: none;
  width: min(96vw, 1200px);
  background: transparent;
  overflow: visible;
}

.image-lightbox::backdrop {
  background: rgba(6, 10, 12, 0.92);
}

.image-lightbox__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
}

.image-lightbox__close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.image-lightbox__close:hover {
  border-color: var(--color-accent);
  color: var(--color-accent-hover);
}

.image-lightbox__close:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.image-lightbox__img {
  display: block;
  width: auto;
  max-width: min(96vw, 1200px);
  max-height: min(85vh, 900px);
  height: auto;
  margin: 0 auto;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  object-fit: contain;
}

.image-lightbox__caption {
  margin: 0;
  max-width: min(96vw, 48rem);
  text-align: center;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.category-strip a {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.category-strip img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.category-strip span {
  display: block;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn--primary {
  background: var(--color-accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--color-accent-hover);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: var(--color-accent);
  border: 1px solid var(--color-border);
}

.btn--ghost:hover {
  border-color: var(--color-accent);
  color: var(--color-accent-hover);
}

.prose {
  max-width: min(72rem, 100%);
}

.prose h1 {
  font-size: 2rem;
  margin-top: 0;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.product-hero-price {
  margin: 0.35rem 0 1.25rem;
  font-size: clamp(1.2rem, 2.8vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.product-hero-subtitle {
  margin: 0 0 1.25rem;
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: -0.01em;
}

.prose h2 {
  font-size: 1.35rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

.prose h3 {
  font-size: 1.1rem;
  margin-top: 1.5rem;
  color: var(--color-text);
}

.prose p,
.prose li {
  color: var(--color-text-muted);
}

.prose p.product-hero-price {
  color: #4ade80;
}

.prose strong {
  color: var(--color-text);
}

.highlight-box {
  background: rgba(234, 179, 8, 0.1);
  border-left: 4px solid #ca8a04;
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 2rem 0;
}

.highlight-box p {
  margin: 0;
  font-weight: 600;
  color: var(--color-text);
}

.price-table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.price-table th,
.price-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.price-table th {
  background: var(--color-surface-raised);
  font-weight: 600;
  color: var(--color-text);
}

.price-table tr:last-child td {
  border-bottom: none;
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--color-border);
  background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-surface) 22%);
}

.site-footer__main {
  padding: 3rem 0 2.5rem;
}

.site-footer__grid {
  width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr 1.1fr;
  gap: 2.5rem 2rem;
  align-items: start;
}

@media screen and (max-width: 900px) {
  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }

  .site-footer__contact {
    grid-column: 1 / -1;
  }
}

@media screen and (max-width: 560px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
  }
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.site-footer__logo-link {
  display: inline-flex;
  align-self: flex-start;
}

.site-footer__logo-img {
  height: 160px;
  width: auto;
  max-width: min(90vw, 640px);
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

.site-footer__tagline {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--color-text-muted);
  max-width: 28ch;
}

.site-footer__block {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.site-footer__title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.site-footer__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.site-footer__list a {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  text-decoration: none;
}

.site-footer__list a:hover {
  color: var(--color-accent-hover);
}

.site-footer__contact-items {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.site-footer__contact-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.site-footer__contact-item--whatsapp {
  align-items: center;
}

.site-footer__wa-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--color-text);
  font-size: 0.95rem;
  font-weight: 500;
}

.site-footer__wa-link:hover {
  color: var(--color-accent-hover);
}

.site-footer__wa-icon {
  flex-shrink: 0;
  display: block;
}

.site-footer__contact-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.site-footer__contact-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.site-footer__contact-body a {
  font-size: 0.95rem;
  color: var(--color-text);
  text-decoration: none;
}

.site-footer__contact-body a:hover {
  color: var(--color-accent-hover);
}

.site-footer__contact-text {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.site-footer__bottom {
  border-top: 1px solid var(--color-border);
  background: rgba(0, 0, 0, 0.2);
  padding: 1.15rem 0;
}

.site-footer__bottom-inner {
  width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.site-footer__copy {
  margin: 0;
}

.site-footer__legal {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.site-footer__legal a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.site-footer__legal a:hover {
  color: var(--color-accent-hover);
}

.page-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--color-surface-raised);
  border-top: 1px solid var(--color-border);
  color: var(--color-text);
  padding: 1rem 1.25rem;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.45);
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.cookie-banner--visible {
  transform: translateY(0);
}

.cookie-banner__inner {
  width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.cookie-banner p {
  margin: 0;
  font-size: 0.9rem;
  max-width: 60ch;
  flex: 1 1 280px;
}

.cookie-banner a {
  color: #a5f3fc;
}

.cookie-banner__actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.cookie-banner .btn--primary {
  background: var(--color-accent);
  color: var(--color-bg);
}

.cookie-banner .btn--primary:hover {
  background: var(--color-accent-hover);
  color: var(--color-bg);
}

.scroll-to-top {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 150;
  width: 3rem;
  height: 3rem;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface-raised);
  color: var(--color-accent);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(0.75rem);
  transition:
    opacity 0.35s var(--header-ease),
    visibility 0.35s,
    transform 0.35s var(--header-ease),
    background-color 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease;
}

.scroll-to-top--visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-to-top:hover {
  color: var(--color-accent-hover);
  background: var(--color-surface);
  border-color: rgba(45, 212, 191, 0.35);
}

.scroll-to-top:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.scroll-to-top svg {
  display: block;
  margin: 0 auto;
}

.list-check {
  padding-left: 1.25rem;
}

.list-check li {
  margin-bottom: 0.5rem;
}

@media screen and (min-width: 768px) {
  .hero:not(.hero--home) {
    display: grid;
    gap: 1.5rem;
  }
}
