/* Paleta del sitio; acento de marca = azul Historia (#0d47a1). */
:root {
  --story-bg: #0d47a1;
  --story-bg-hover: #082f73;
  --accent: var(--story-bg);
  --accent-hover: var(--story-bg-hover);
  --color-text: #666666;
  --color-text-dark: #333333;
  --color-heading: #333333;
  --footer-bottom: #1f1f1f;
  --font-body: "Open Sans", Helvetica, Arial, sans-serif;
  --shadow-header: 0 1px 0 rgba(0, 0, 0, 0.1);
  --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.06);
  --radius: 3px;
}

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

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.7em;
  font-weight: 500;
  color: var(--color-text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Con páginas cortas (p. ej. ficha de producto), el pie queda al borde inferior de la ventana */
body > main {
  flex: 1 0 auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 0.75rem 1rem;
  background: #111;
  color: #fff;
  text-decoration: none;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* —— Cabecera principal —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  box-shadow: var(--shadow-header);
  line-height: 1em;
  flex-shrink: 0;
}

.header-inner {
  max-width: 1080px;
  width: 80%;
  margin: 0 auto;
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (max-width: 980px) {
  .header-inner {
    width: 100%;
    padding: 0.5rem 1.25rem;
  }
}

.logo-img {
  display: block;
  line-height: 0;
}

.logo-img img {
  display: block;
  width: auto;
  max-height: 64px;
  height: auto;
}

.nav-toggle {
  display: none;
  padding: 0.5rem 0.75rem;
  font: inherit;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 3px;
  cursor: pointer;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.site-nav a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--accent);
}

.site-nav a.nav-active {
  color: var(--accent);
}

/* —— Hero ancho completo —— */
.hero-banner {
  margin: 0;
  padding: 0;
  line-height: 0;
  background: #111;
}

.hero-banner img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: bottom;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container.narrow {
  max-width: 720px;
}

/* Contenedor ancho alineado con el contenido principal (~1080px) */
.container-wide {
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 4% 0;
}

/* —— Productos portada: dos columnas con imagen —— */
.home-section-title {
  text-align: center;
  font-size: 26px;
  font-weight: 500;
  color: var(--color-heading);
  margin: 0 0 1.5rem;
  line-height: 1.3;
}

.home-product-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 2rem;
  max-width: 1080px;
  margin: 0 auto;
}

@media (max-width: 767px) {
  .home-product-cols {
    grid-template-columns: 1fr;
  }
}

.home-product-block {
  display: block;
  text-align: center;
  text-decoration: none;
  color: var(--color-heading);
}

.home-product-img-wrap {
  display: block;
  line-height: 0;
  margin-bottom: 0.75rem;
}

.home-product-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: bottom;
}

.home-product-label {
  display: block;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--color-heading);
}

/* —— Historia: sección oscura + columnas 3/5 + 2/5 —— */
.section-story {
  background-color: var(--story-bg);
  color: rgba(255, 255, 255, 0.92);
  padding: 4% 0 5%;
}

.story-heading {
  text-align: left;
  font-size: 26px;
  font-weight: 400;
  color: #fff;
  margin: 0 0 1.5rem;
}

.story-heading strong {
  font-weight: 600;
}

.story-split {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 2rem 3rem;
  align-items: start;
}

@media (max-width: 980px) {
  .story-split {
    grid-template-columns: 1fr;
  }
}

.story-visual img {
  width: 100%;
  height: auto;
  display: block;
}

.story-brand {
  font-size: 18px;
  letter-spacing: 0.06em;
  font-weight: 700;
  margin: 0 0 1rem;
  color: #fff;
}

.prose-on-dark p {
  margin: 0 0 1rem;
  color: rgba(255, 255, 255, 0.9);
}

.prose-on-dark .closing {
  font-size: 17px;
  font-weight: 600;
  margin-top: 1.25rem;
  color: #fff;
}

/* —— Galería —— */
.section-gallery {
  background: #fff;
}

.gallery-note {
  text-align: center;
  margin: 0 auto 1.5rem;
}

.gallery-note a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.gallery-note a:hover {
  text-decoration: underline;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.gallery-thumb img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 2px;
  display: block;
}

/* —— Donde estamos: blurbs + mapa —— */
.section-contact-home {
  background: #fff;
  color: var(--color-text);
  padding: 4% 0 5%;
}

.section-heading-contact {
  font-size: 26px;
  font-weight: 400;
  color: var(--color-heading);
  margin: 0 0 1.5rem;
  line-height: 1.3;
}

.section-heading-contact strong {
  font-weight: 600;
}

.contact-split {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  align-items: start;
}

/* Página contacto: banda clara + cuatro columnas y mapa debajo (como el sitio publicado) */
.contact-split-section--panel {
  background: #f5f5f5;
  margin-top: 0.5rem;
  margin-left: -0.25rem;
  margin-right: -0.25rem;
  padding: 1.75rem 1.25rem 2rem;
  border-radius: 4px;
}

.contact-split-section--panel .section-heading-contact {
  text-align: center;
}

@media (min-width: 600px) {
  .contact-split-section--panel {
    margin-left: 0;
    margin-right: 0;
    padding: 2rem 2rem 2.25rem;
  }
}

.contact-split--page {
  grid-template-columns: 1fr;
  gap: 2rem;
}

.contact-split--page .contact-blurbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem 1rem;
  align-items: start;
}

.contact-split--page .blurb {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.85rem;
}

.contact-split--page .blurb-text {
  width: 100%;
  min-width: 0;
}

.contact-split--page .blurb-text p {
  line-height: 1.45;
}

.contact-email-link {
  overflow-wrap: anywhere;
  word-break: normal;
}

@media (max-width: 900px) {
  .contact-split--page .contact-blurbs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .contact-split--page .contact-blurbs {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .contact-split {
    grid-template-columns: 1fr;
  }
}

.contact-blurbs {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.blurb {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  text-align: left;
}

.blurb-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--story-bg);
  border-radius: 50%;
  background: var(--story-bg);
  color: #fff;
}

.blurb-icon-svg {
  width: 22px;
  height: 22px;
  display: block;
}

.blurb-text h4 {
  margin: 0 0 0.35rem;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-heading);
}

.blurb-text p {
  margin: 0;
  font-size: 14px;
  color: var(--color-text);
}

.blurb-text a:link,
.blurb-text a:visited {
  color: var(--story-bg);
  text-decoration: none;
}

.blurb-text a:hover {
  text-decoration: underline;
}

.blurb-text a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.contact-split-section {
  margin-top: 1rem;
}

.map-embed iframe {
  width: 100%;
  max-width: 100%;
  height: min(450px, 55vw);
  border: 0;
}

/* —— Pie —— */
.site-footer {
  background: var(--footer-bottom);
  color: rgba(255, 255, 255, 0.75);
  padding: 1.25rem;
  text-align: center;
  font-size: 14px;
  flex-shrink: 0;
}

.site-footer .container {
  padding: 0 1.25rem;
  background: transparent;
}

.site-footer .container p {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35em;
  line-height: 1.5;
}

.site-footer a {
  color: #fff;
  text-decoration: none;
}

.site-footer a:hover {
  color: rgba(255, 255, 255, 0.75);
}

.footer-instagram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
  line-height: 1;
}

.footer-instagram-svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: block;
  overflow: visible;
}

.main-home {
  padding: 0;
}

.main-contained {
  padding: 2rem 0 3rem;
}

.page-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--color-heading);
}

.breadcrumb {
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  color: #5a6578;
}

.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.page-intro {
  margin: 0 0 2rem;
  max-width: 640px;
  color: #4a5568;
}

/* —— Catálogo (pescados / mariscos) —— */
.shop-catalog .breadcrumb {
  text-align: left;
  margin-bottom: 0.65rem;
}

.shop-catalog .shop-page-title {
  text-align: center;
  margin-bottom: 1.75rem;
}

/* Rejilla 3 columnas como la tienda original (escritorio) */
.shop-catalog .product-catalog {
  display: grid;
  gap: 1.75rem 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 520px) {
  .shop-catalog .product-catalog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .shop-catalog .product-catalog {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.shop-catalog .product-tile {
  margin: 0;
  min-width: 0;
}

.shop-catalog .product-tile-link {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  border-radius: 0;
  padding: 0;
  overflow: hidden;
  text-decoration: none;
  color: #666;
  border: none;
  box-shadow: none;
}

.shop-catalog .product-tile-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.shop-catalog .product-tile-media {
  position: relative;
  display: block;
  overflow: hidden;
  background: #f5f5f5;
}

.shop-catalog .product-tile-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  vertical-align: bottom;
  transition: transform 0.35s ease;
}

.shop-catalog .product-tile-meta {
  padding: 0.65rem 0 0;
  text-align: left;
}

.shop-catalog .product-tile-title {
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 0.2rem;
  color: #666;
  line-height: 1.35;
}

.shop-catalog .product-tile-price {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  line-height: 1.35;
}

/* Productos relacionados en ficha: tres ítems de la misma categoría + hover con velo y + */
.related-products {
  margin-top: 2.5rem;
  padding: 2rem 0 0;
  border-top: 1px solid #eee;
}

.related-products-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-heading);
  margin: 0 0 1.25rem;
  text-align: left;
}

.related-products-grid {
  display: grid;
  gap: 1.75rem 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 520px) {
  .related-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .related-products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.related-products .product-tile {
  margin: 0;
  min-width: 0;
}

.related-products .product-tile-link {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  border-radius: 0;
  padding: 0;
  overflow: hidden;
  text-decoration: none;
  border: none;
  box-shadow: none;
}

.related-products .product-tile-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.related-products .product-tile-media {
  position: relative;
  display: block;
  overflow: hidden;
  background: #f5f5f5;
}

.related-products .product-tile-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.related-products .product-tile-link:hover .product-tile-media img,
.related-products .product-tile-link:focus-visible .product-tile-media img,
.shop-catalog .product-catalog .product-tile-link:hover .product-tile-media img,
.shop-catalog .product-catalog .product-tile-link:focus-visible .product-tile-media img,
.gallery-page .gallery-fig-link:hover .gallery-fig-media img,
.gallery-page .gallery-fig-link:focus-visible .gallery-fig-media img {
  transform: scale(1.03);
}

/* Velo + icono + en catálogo, galería y productos relacionados */
.related-products .product-tile-overlay,
.shop-catalog .product-catalog .product-tile-overlay,
.gallery-page .product-tile-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.related-products .product-tile-link:hover .product-tile-overlay,
.related-products .product-tile-link:focus-visible .product-tile-overlay,
.shop-catalog .product-catalog .product-tile-link:hover .product-tile-overlay,
.shop-catalog .product-catalog .product-tile-link:focus-visible .product-tile-overlay,
.gallery-page .gallery-fig-link:hover .product-tile-overlay,
.gallery-page .gallery-fig-link:focus-visible .product-tile-overlay {
  opacity: 1;
}

.related-products .product-tile-plus,
.shop-catalog .product-catalog .product-tile-plus,
.gallery-page .product-tile-plus {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--story-bg);
  position: relative;
  box-shadow: 0 2px 10px rgba(13, 71, 161, 0.35);
}

.related-products .product-tile-plus::before,
.related-products .product-tile-plus::after,
.shop-catalog .product-catalog .product-tile-plus::before,
.shop-catalog .product-catalog .product-tile-plus::after,
.gallery-page .product-tile-plus::before,
.gallery-page .product-tile-plus::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 1px;
}

.related-products .product-tile-plus::before,
.shop-catalog .product-catalog .product-tile-plus::before,
.gallery-page .product-tile-plus::before {
  width: 16px;
  height: 2px;
}

.related-products .product-tile-plus::after,
.shop-catalog .product-catalog .product-tile-plus::after,
.gallery-page .product-tile-plus::after {
  width: 2px;
  height: 16px;
}

.related-products .product-tile-meta {
  padding: 0.65rem 0 0;
  text-align: left;
}

.related-products .product-tile-title {
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 0.2rem;
  color: #666;
  line-height: 1.35;
}

.related-products .product-tile-price {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: #888;
  line-height: 1.35;
}

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
  align-items: start;
}

.product-detail-media img {
  width: 100%;
  max-width: 480px;
  height: auto;
  border-radius: 3px;
  box-shadow: var(--shadow-soft);
  border: 1px solid #eee;
}

.product-price {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 1rem;
}

.muted-note {
  font-size: 0.9rem;
  color: #6b7280;
  margin-top: 1.5rem;
}

.gallery-page {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.gallery-fig {
  margin: 0;
}

.gallery-fig-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.gallery-fig-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.gallery-fig-media {
  position: relative;
  display: block;
  overflow: hidden;
  background: #f5f5f5;
  border-radius: 3px;
}

.gallery-page .gallery-fig-media img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: bottom;
  transition: transform 0.35s ease;
}

.prose p {
  margin: 0 0 1rem;
}

.legal-page .legal h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  color: var(--color-heading);
}

.legal-page .legal h2:first-child {
  margin-top: 0;
}

.btn-submit {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.65rem 1.25rem;
  background: var(--accent);
  color: #fff !important;
  text-decoration: none;
  border-radius: 3px;
  font-weight: 600;
}

.btn-submit:hover {
  background: var(--accent-hover);
}

@media (max-width: 768px) {
  .product-detail {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 1rem 1.25rem 1.25rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0.5rem;
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .site-header .header-inner {
    position: relative;
  }
}
