/* ==========================================================================
   El Pastor de la Mancha - style.css (unico)
   Tipografias autoalojadas: Raleway (titulos) + Open Sans (texto)
   ========================================================================== */

@font-face {
    font-family: "Raleway";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/raleway-latin-400-normal.woff2") format("woff2");
}

@font-face {
    font-family: "Raleway";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/raleway-latin-500-normal.woff2") format("woff2");
}

@font-face {
    font-family: "Raleway";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/raleway-latin-600-normal.woff2") format("woff2");
}

@font-face {
    font-family: "Raleway";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/raleway-latin-700-normal.woff2") format("woff2");
}

@font-face {
    font-family: "Open Sans";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/open-sans-latin-400-normal.woff2") format("woff2");
}

@font-face {
    font-family: "Open Sans";
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/open-sans-latin-400-italic.woff2") format("woff2");
}

@font-face {
    font-family: "Open Sans";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/open-sans-latin-600-normal.woff2") format("woff2");
}

@font-face {
    font-family: "Open Sans";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/open-sans-latin-700-normal.woff2") format("woff2");
}

/* --------------------------------------------------------------------------
   1. Variables y temas
   -------------------------------------------------------------------------- */

:root {
    --red: #c60925;
    --red-dark: #9d061c;
    --red-soft: #fbe9ec;
    --graphite-1: #34363b;
    --graphite-2: #202226;
    --graphite-3: #17181b;
    --bg: #ffffff;
    --bg-alt: #f3f4f6;
    --surface: #ffffff;
    --text: #2b2d31;
    --text-soft: #5b6068;
    --line: #e0e3e8;
    --link: #c60925;
    --shadow: 0 10px 30px rgba(20, 22, 26, .10);
    --shadow-lg: 0 18px 50px rgba(20, 22, 26, .18);
    --radius: 14px;
    --topbar-h: 38px;
    --bar-h: 78px;
    --hdr-h: 116px;
    --wrap: 1180px;
    --font-head: "Raleway", "Segoe UI", Arial, sans-serif;
    --font-body: "Open Sans", "Segoe UI", Arial, sans-serif;
    color-scheme: light;
}

html[data-theme="dark"] {
    --bg: #131417;
    --bg-alt: #1a1c20;
    --surface: #1f2126;
    --text: #e9eaed;
    --text-soft: #a9adb5;
    --line: #2f3238;
    --link: #ff5a72;
    --red-soft: #3a1219;
    --shadow: 0 10px 30px rgba(0, 0, 0, .45);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, .55);
    color-scheme: dark;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--hdr-h) + 12px);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding-top: var(--hdr-h);
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    overflow-x: hidden;
    transition: background-color .3s ease, color .3s ease;
}

img,
svg {
    max-width: 100%;
}

img {
    height: auto;
    display: block;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-head);
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 .6em;
    color: var(--text);
}

p {
    margin: 0 0 1em;
}

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

a:hover {
    color: var(--red-dark);
}

html[data-theme="dark"] a:hover {
    color: #ff8a9b;
}

ul,
ol {
    margin: 0 0 1em;
    padding-left: 1.3em;
}

:focus-visible {
    outline: 3px solid var(--red);
    outline-offset: 2px;
    border-radius: 4px;
}

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 24px;
}

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

.skip-link {
    position: fixed;
    top: -60px;
    left: 12px;
    z-index: 2000;
    padding: 10px 16px;
    background: var(--red);
    color: #fff;
    border-radius: 0 0 8px 8px;
    transition: top .2s ease;
}

.skip-link:focus {
    top: 0;
    color: #fff;
}

/* Iconos Lucide (ISC) */
.icon {
    width: 1.25em;
    height: 1.25em;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -.2em;
}

.icon-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 6px 16px rgba(198, 9, 37, .35);
}

.icon-circle .icon {
    width: 22px;
    height: 22px;
    stroke: #fff;
    color: #fff;
}

/* Fondos oscuros: degradado grafito + franjas diagonales + brillo del acento */
.dark-surface {
    background:
        radial-gradient(520px 260px at 88% -10%, rgba(198, 9, 37, .30), transparent 70%),
        radial-gradient(420px 220px at 6% 120%, rgba(198, 9, 37, .14), transparent 70%),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, .05) 0, rgba(255, 255, 255, .05) 1px, transparent 1.6px, transparent 5px),
        linear-gradient(135deg, var(--graphite-1), var(--graphite-3));
    color: #e9eaed;
}

/* --------------------------------------------------------------------------
   3. Cabecera fija
   -------------------------------------------------------------------------- */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .25);
}

.topbar {
    position: relative;
    z-index: 3;
    height: var(--topbar-h);
    background: var(--graphite-3);
    color: #cfd2d8;
    font-size: .8125rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.topbar .wrap {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

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

.topbar a:hover {
    color: #ff8a9b;
}

.topbar__hours,
.topbar__right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar__right {
    gap: 18px;
}

.topbar .icon {
    width: 1.1em;
    height: 1.1em;
    color: #ff5a72;
}

.lang {
    position: relative;
}

.lang summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: #fff;
    padding: 4px 2px;
}

.lang summary::-webkit-details-marker {
    display: none;
}

.lang[open] .icon-chevron {
    transform: rotate(180deg);
}

.lang ul {
    z-index: 5;
    position: absolute;
    right: 0;
    top: 100%;
    margin: 6px 0 0;
    padding: 6px;
    list-style: none;
    min-width: 150px;
    background: var(--graphite-2);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
}

.lang li a {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
}

.lang li a:hover,
.lang li a[aria-current="true"] {
    background: rgba(255, 255, 255, .1);
}

.mainbar {
    height: var(--bar-h);
    transition: height .25s ease;
}

.mainbar .wrap {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    display: block;
    flex: none;
    order: 1;
    margin-right: auto;
}

.logo img {
    height: 50px;
    width: auto;
    transition: height .25s ease;
}

.nav {
    order: 2;
}

.nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 6px;
}

.nav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    color: #f1f2f4;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .95rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-decoration: none;
}

.nav a::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 4px;
    height: 2px;
    background: var(--red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s ease;
}

.nav a:hover::after,
.nav a[aria-current="page"]::after,
body[data-page="home"] .nav a[data-nav="home"]::after,
body[data-page="history"] .nav a[data-nav="history"]::after,
body[data-page="products"] .nav a[data-nav="products"]::after,
body[data-page="recipes"] .nav a[data-nav="recipes"]::after {
    transform: scaleX(1);
}

body[data-page="home"] .nav a[data-nav="home"],
body[data-page="history"] .nav a[data-nav="history"],
body[data-page="products"] .nav a[data-nav="products"],
body[data-page="recipes"] .nav a[data-nav="recipes"] {
    color: #fff;
}

.nav a:hover {
    color: #fff;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
    color: #fff;
    cursor: pointer;
    transition: background-color .2s ease, transform .2s ease;
}

.icon-btn:hover {
    background: var(--red);
    transform: translateY(-1px);
}

.icon-btn .icon {
    width: 20px;
    height: 20px;
}

.theme-btn {
    order: 3;
}

.theme-btn .icon-sun {
    display: none;
}

html[data-theme="dark"] .theme-btn .icon-moon {
    display: none;
}

html[data-theme="dark"] .theme-btn .icon-sun {
    display: inline-block;
}

.menu-btn {
    order: 4;
    display: none;
}

.menu-btn .icon-close {
    display: none;
}

.menu-btn[aria-expanded="true"] .icon-open {
    display: none;
}

.menu-btn[aria-expanded="true"] .icon-close {
    display: inline-block;
}

.site-header.is-scrolled .mainbar {
    height: 62px;
}

.site-header.is-scrolled .logo img {
    height: 40px;
}

.no-js .theme-btn,
.no-js .menu-btn {
    display: none;
}

/* --------------------------------------------------------------------------
   4. Portadas de paginas interiores (foto solo en escritorio)
   -------------------------------------------------------------------------- */

.cover {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    display: flex;
    align-items: flex-end;
}

.cover__media {
    position: absolute;
    inset: 0;
    margin: 0;
}

.cover__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.08);
    will-change: transform;
}

.cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(23, 24, 27, .78), rgba(23, 24, 27, .25) 60%, rgba(23, 24, 27, .1));
}

.cover::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    z-index: 2;
    background: var(--red);
}

.cover__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    padding-top: 36px;
    padding-bottom: 30px;
}

.cover__title {
    margin: 0 0 6px;
    color: #fff;
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 600;
    letter-spacing: -.01em;
}

.cover__sub {
    display: inline-block;
    margin: 0;
    padding-right: 18px;
    border-right: 2px solid rgba(255, 255, 255, .7);
    color: #fff;
    font-family: var(--font-head);
    font-size: 1.2rem;
}

/* --------------------------------------------------------------------------
   5. Secciones y componentes
   -------------------------------------------------------------------------- */

.section {
    padding: 64px 0;
}

.section--alt {
    background: var(--bg-alt);
}

.section__title {
    position: relative;
    display: inline-block;
    padding-bottom: 12px;
    font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.section__title::after,
.underline-anim::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    background: var(--red);
    transform: scaleX(.25);
    transform-origin: left;
    transition: transform .8s ease;
}

.js [data-reveal]:not(.is-visible) .section__title::after,
.js .section__title[data-reveal]:not(.is-visible)::after {
    transform: scaleX(0);
}

.section__title.is-visible::after,
[data-reveal].is-visible .section__title::after {
    transform: scaleX(1);
}

.photo-card {
    margin: 0;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.photo-card img {
    width: 100%;
    border-radius: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    border: 0;
    border-radius: 999px;
    background: var(--red);
    color: #fff;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: .95rem;
    letter-spacing: .03em;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(198, 9, 37, .28);
    transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.btn:hover {
    background: var(--red-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(198, 9, 37, .38);
}

.btn--ghost {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--line);
    box-shadow: none;
}

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

/* Efectos de scroll (todo visible sin JavaScript) */
.js [data-reveal] {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .8s ease, transform .8s ease;
    transition-delay: var(--d, 0s);
}

.js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

.js [data-reveal="left"] {
    transform: translateX(-30px);
}

.js [data-reveal="right"] {
    transform: translateX(30px);
}

.js [data-reveal="left"].is-visible,
.js [data-reveal="right"].is-visible {
    transform: none;
}

.d1 { --d: .1s; }
.d2 { --d: .2s; }
.d3 { --d: .3s; }

/* --------------------------------------------------------------------------
   6. Inicio
   -------------------------------------------------------------------------- */

.intro {
    padding: 56px 0 64px;
}

.intro__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 48px;
    align-items: center;
}

.intro__photo {
    position: relative;
}

.intro__photo .photo-card {
    padding: 8px;
}

.intro__photo .parallax-box {
    overflow: hidden;
    border-radius: 8px;
}

.intro__photo img {
    transform: scale(1.08);
    will-change: transform;
}

.intro-static {
    display: none;
    text-align: center;
}

.intro-static h2 {
    font-weight: 500;
}

/* Slider */
.hero {
    position: relative;
    min-height: 540px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.hero__slides {
    position: absolute;
    inset: 0 0 64px 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 28px 64px 12px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .9s ease, visibility 0s linear .9s;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

.hero-slide h2 {
    margin: 0;
    font-size: clamp(1.7rem, 2.6vw, 2.3rem);
    font-weight: 500;
}

.hero-slide p {
    margin: 0;
    max-width: 30em;
    color: var(--text-soft);
    font-size: 1.05rem;
    line-height: 1.8;
}

.hero-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.hero-media {
    margin: 0;
    width: min(100%, 340px);
    padding: 14px;
    overflow: hidden;
    border-radius: 10px;
    background: #fff;
}

.hero-media img {
    width: 100%;
    max-height: 230px;
    object-fit: contain;
}

/* Texto con movimiento: entra, se desplaza lento, sale (7 s) */
.hero-slide .hero-text {
    opacity: 0;
}

.hero-slide.is-active .hero-text,
.hero-slide.is-leaving .hero-text {
    animation: heroText 7s linear both;
}

@keyframes heroText {
    0% {
        opacity: 0;
        transform: translateY(28px);
    }
    12% {
        opacity: 1;
        transform: translateY(0);
    }
    88% {
        opacity: 1;
        transform: translateY(-10px);
    }
    100% {
        opacity: 0;
        transform: translateY(-26px);
    }
}

/* Ken Burns distinto en cada imagen */
.hero-slide.is-active .kb-1,
.hero-slide.is-leaving .kb-1 {
    animation: kb1 8s ease-out both;
}

.hero-slide.is-active .kb-2,
.hero-slide.is-leaving .kb-2 {
    animation: kb2 8s ease-out both;
}

.hero-slide.is-active .kb-3,
.hero-slide.is-leaving .kb-3 {
    animation: kb3 8s ease-out both;
}

@keyframes kb1 {
    from { transform: scale(1) translate(0, 0); }
    to { transform: scale(1.05) translate(-1%, -1%); }
}

@keyframes kb2 {
    from { transform: scale(1.05) translate(1%, 1%); }
    to { transform: scale(1) translate(0, 0); }
}

@keyframes kb3 {
    from { transform: scale(1.01) translate(-1%, 1%); }
    to { transform: scale(1.06) translate(1%, -1%); }
}

.hero.is-paused .hero-text,
.hero.is-paused .kb-1,
.hero.is-paused .kb-2,
.hero.is-paused .kb-3,
.hero.is-paused .hero__progress span {
    animation-play-state: paused;
}

.hero__arrow {
    position: absolute;
    top: calc(50% - 32px);
    z-index: 3;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: rgba(60, 63, 69, .55);
    color: #fff;
    cursor: pointer;
    transition: background-color .2s ease;
}

.hero__arrow:hover {
    background: var(--red);
}

.hero__arrow--prev {
    left: 14px;
}

.hero__arrow--next {
    right: 14px;
}

.hero__bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.hero__dots {
    display: flex;
    gap: 10px;
}

.hero__dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--line);
    cursor: pointer;
    transition: background-color .2s ease, transform .2s ease;
}

.hero__dot[aria-current="true"] {
    background: var(--red);
    transform: scale(1.3);
}

.hero__pause {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

.hero__pause:hover {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

.hero__pause .icon {
    width: 15px;
    height: 15px;
}

.hero__pause .icon-play,
.hero.is-paused .hero__pause .icon-pause {
    display: none;
}

.hero.is-paused .hero__pause .icon-play {
    display: inline-block;
}

.hero__progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    height: 4px;
    background: var(--line);
}

.hero__progress span {
    display: block;
    height: 100%;
    background: var(--red);
    transform: scaleX(0);
    transform-origin: left;
}

.hero.is-running .hero__progress span {
    animation: heroProgress 7s linear forwards;
}

@keyframes heroProgress {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

/* Sin JavaScript: todas las diapositivas visibles, apiladas */
.no-js .hero {
    min-height: 0;
    padding: 24px;
}

.no-js .hero__slides {
    position: static;
}

.no-js .hero-slide {
    position: static;
    opacity: 1;
    visibility: visible;
    padding: 16px 0 28px;
    border-bottom: 1px solid var(--line);
}

.no-js .hero-slide:last-child {
    border-bottom: 0;
}

.no-js .hero__arrow,
.no-js .hero__bar,
.no-js .hero__progress {
    display: none;
}

/* Certificacion ISO */
.cert {
    padding: 56px 0;
}

.cert__card {
    display: flex;
    align-items: center;
    gap: 32px;
    max-width: 860px;
    padding: 28px 36px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .04);
    box-shadow: var(--shadow-lg);
}

.cert__seal {
    flex: none;
    width: 112px;
    margin: 0;
}

.cert__seal img {
    width: 100%;
    border-radius: 14px;
}

.cert__text {
    margin: 0;
    color: #d6d9de;
    font-size: .95rem;
    line-height: 1.6;
}

.cert__text strong {
    color: #fff;
}

.cert__text .cert__title {
    display: block;
    margin-bottom: 4px;
    color: #fff;
    font-family: var(--font-head);
    font-size: 1.3rem;
}

.cert__text span {
    display: block;
}

.cert__text .cert__company {
    margin: 2px 0 8px;
    color: #fff;
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   7. Nuestra historia
   -------------------------------------------------------------------------- */

.story {
    padding: 70px 0;
}

.story__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 48px;
}

.story h2 {
    margin-bottom: 18px;
    color: #fff;
    font-family: var(--font-body);
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.story p {
    color: #c9ccd2;
    font-size: 1.1rem;
    line-height: 1.85;
}

.story p strong {
    color: #fff;
}

.story__col {
    position: relative;
    padding-top: 18px;
}

.story__col::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 56px;
    height: 3px;
    background: var(--red);
}

/* --------------------------------------------------------------------------
   8. Productos
   -------------------------------------------------------------------------- */

.products {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 48px;
}

.product {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.product__media {
    margin: 0;
    padding: 24px;
    background: #fff;
}

.product__media img {
    width: 100%;
    max-height: 420px;
    object-fit: contain;
    transition: transform .6s ease;
}

.product:hover .product__media img {
    transform: scale(1.04);
}

.product__body {
    padding: 28px 30px 32px;
}

.product__title {
    margin-bottom: 14px;
    color: var(--red);
    font-size: 1.7rem;
    font-weight: 500;
}

html[data-theme="dark"] .product__title {
    color: #ff5a72;
}

.product__list {
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
}

.product__list li {
    display: flex;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px dashed var(--line);
}

.product__list .icon {
    margin-top: .35em;
    color: var(--red);
}

.rings {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
}

.ring {
    position: relative;
    width: 104px;
    text-align: center;
}

.ring__svg {
    width: 104px;
    height: 104px;
    transform: rotate(-90deg);
}

.ring__track {
    fill: none;
    stroke: var(--line);
    stroke-width: 6;
}

.ring__bar {
    fill: none;
    stroke: var(--red);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 295.3;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1.6s ease;
}

.js .ring:not(.is-visible) .ring__bar {
    stroke-dashoffset: 295.3;
}

.ring__num {
    position: absolute;
    top: 0;
    left: 0;
    width: 104px;
    height: 104px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-head);
    font-size: 1.35rem;
    font-weight: 700;
}

.ring__label {
    display: block;
    margin-top: 6px;
    color: var(--text-soft);
    font-size: .8rem;
    line-height: 1.3;
}

/* --------------------------------------------------------------------------
   9. Recetas
   -------------------------------------------------------------------------- */

.recipe-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
}

.recipe-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform .3s ease, box-shadow .3s ease;
}

.recipe-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.recipe-card__media {
    position: relative;
    margin: 0;
    padding: 20px;
    background: #fff;
}

.recipe-card__media img {
    width: 100%;
    height: 280px;
    object-fit: contain;
}

.recipe-card__media .icon-circle {
    position: absolute;
    top: 14px;
    right: 14px;
}

.recipe-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 22px 26px 28px;
}

.recipe-card__body h2 {
    font-size: 1.45rem;
    font-weight: 600;
}

.recipe-card__body p {
    flex: 1;
    color: var(--text-soft);
}

.recipe-card__body .btn {
    align-self: flex-start;
}

.recipe {
    max-width: 860px;
    margin: 0 auto;
}

.crumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 22px;
    font-size: .9rem;
}

.crumbs a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.recipe h1 {
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    font-weight: 500;
}

.recipe__lead {
    margin-bottom: 8px;
    color: var(--text-soft);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.recipe__note {
    margin: 0 0 8px;
    padding: 10px 16px;
    border-left: 4px solid var(--red);
    border-radius: 0 8px 8px 0;
    background: var(--red-soft);
}

.recipe h2 {
    position: relative;
    margin-top: 1.6em;
    padding-bottom: 10px;
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.recipe h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 56px;
    height: 3px;
    background: var(--red);
}

.recipe ul {
    padding-left: 1.2em;
}

.recipe li {
    padding: 3px 0;
}

.recipe li::marker {
    color: var(--red);
}

.recipe__download {
    margin-top: 36px;
    padding: 22px 26px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-alt);
}

.recipe__download p {
    margin: 0;
    font-weight: 600;
}

.recipe-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.recipe-nav a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border: 1px solid var(--line);
    border-radius: 10px;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
}

.recipe-nav a:hover {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

.recipe-nav .recipe-nav__next {
    margin-left: auto;
}

/* --------------------------------------------------------------------------
   10. Paginas legales
   -------------------------------------------------------------------------- */

.legal {
    max-width: 860px;
    margin: 0 auto;
    padding: 56px 24px 72px;
}

.legal h1 {
    font-size: clamp(1.9rem, 4vw, 2.5rem);
    font-weight: 500;
}

.legal h2 {
    margin-top: 1.8em;
    font-size: 1.25rem;
}

.legal__updated {
    color: var(--text-soft);
    font-size: .9rem;
}

.legal dl {
    margin: 0 0 1em;
    padding: 16px 20px;
    border-left: 4px solid var(--red);
    border-radius: 0 10px 10px 0;
    background: var(--bg-alt);
}

.legal dt {
    float: left;
    clear: left;
    min-width: 150px;
    margin-right: 10px;
    font-weight: 700;
}

.legal dd {
    margin: 0 0 4px;
    overflow: hidden;
}

/* --------------------------------------------------------------------------
   11. Pie
   -------------------------------------------------------------------------- */

.site-footer {
    color: #d3d6dc;
}

.footer-main {
    padding: 64px 0 56px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 48px;
}

.footer-grid h2 {
    position: relative;
    display: inline-block;
    margin-bottom: 28px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, .6);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 500;
}

.footer-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.footer-item > div {
    min-width: 0;
}

.footer-item a {
    overflow-wrap: anywhere;
}

.footer-item small {
    display: block;
    color: #9da2ab;
    font-size: .8rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.footer-item .footer-mail {
    font-size: clamp(.8rem, 3.5vw, .9rem);
    font-weight: 600;
}

.footer-item strong,
.footer-item a {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
}

.footer-item a:hover {
    color: #ff8a9b;
    text-decoration: underline;
}

.footer-item address {
    font-style: normal;
    line-height: 1.7;
}

.footer-item .hours {
    font-size: .95rem;
    font-weight: 400;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.footer-links .btn {
    padding: 9px 16px;
    font-size: .85rem;
}

.footer-links .btn--ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, .4);
}

.footer-seal {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.footer-seal img {
    width: 78px;
    border-radius: 10px;
}

.footer-bottom {
    padding: 14px 0;
    background: var(--graphite-3);
    border-top: 1px solid rgba(255, 255, 255, .08);
    font-size: .9rem;
    text-align: center;
}

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

.footer-bottom a:hover {
    color: #ff8a9b;
    text-decoration: underline;
}

.footer-bottom .sep {
    margin: 0 8px;
    color: #6b7078;
}

/* Boton volver arriba */
.to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 900;
    width: 48px;
    height: 48px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(198, 9, 37, .45);
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px);
    transition: opacity .3s ease, transform .3s ease, visibility 0s linear .3s;
}

.to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 0s;
}

.to-top:hover {
    background: var(--red-dark);
}

/* Ventana emergente legal */
.legal-dialog {
    width: min(900px, 94vw);
    height: min(86vh, 900px);
    padding: 0;
    border: 0;
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.legal-dialog[open] {
    display: flex;
    flex-direction: column;
}

.legal-dialog::backdrop {
    background: rgba(10, 11, 13, .7);
}

.legal-dialog__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px 10px 22px;
    background: var(--graphite-2);
    color: #fff;
    font-family: var(--font-head);
    font-weight: 600;
}

.legal-dialog__bar .icon-btn {
    width: 36px;
    height: 36px;
}

.legal-dialog iframe {
    flex: 1;
    width: 100%;
    border: 0;
    background: var(--bg);
}

/* Modo embebido (contenido dentro del popup) */
html.is-embedded .site-header,
html.is-embedded .site-footer,
html.is-embedded .to-top,
html.is-embedded .skip-link {
    display: none;
}

html.is-embedded body {
    padding-top: 0;
}

html.is-embedded .legal {
    padding-top: 28px;
}

/* --------------------------------------------------------------------------
   12. Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
    .recipe-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .story__grid {
        gap: 32px;
    }

    .footer-grid {
        gap: 28px;
    }
}

@media (max-width: 960px) {
    :root {
        --topbar-h: 34px;
        --bar-h: 64px;
        --hdr-h: 98px;
    }

    .menu-btn {
        display: inline-flex;
    }

    .theme-btn {
        order: 1;
    }

    .logo {
        order: 2;
        margin: 0 auto;
    }

    .menu-btn {
        order: 3;
    }

    .logo img {
        height: 40px;
    }

    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        order: 4;
        display: none;
        background: var(--graphite-2);
        border-top: 1px solid rgba(255, 255, 255, .1);
        box-shadow: 0 16px 30px rgba(0, 0, 0, .35);
    }

    .nav.is-open,
    .no-js .nav {
        display: block;
    }

    .nav ul {
        flex-direction: column;
        gap: 0;
        padding: 8px 0 14px;
    }

    .nav a {
        padding: 14px 24px;
    }

    .nav a::after {
        left: 24px;
        right: auto;
        width: 40px;
        bottom: 8px;
    }

    .no-js .mainbar .wrap {
        flex-wrap: wrap;
        height: auto;
    }

    .topbar .wrap {
        padding: 0 16px;
    }

    .mainbar .wrap {
        padding: 0 14px;
    }

    .site-header.is-scrolled .mainbar {
        height: 56px;
    }
}

@media (max-width: 820px) {
    body {
        font-size: 1rem;
    }

    .section,
    .story {
        padding: 44px 0;
    }

    /* Slider oculto en movil (sus fotos no se descargan) */
    .hero {
        display: none;
    }

    .intro-static {
        display: block;
    }

    .intro__grid,
    .products,
    .recipe-cards,
    .story__grid,
    .footer-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .intro {
        padding: 32px 0 40px;
    }

    .intro__grid {
        gap: 30px;
    }

    /* Portada: desaparece la franja entera; queda solo la linea de color y el titulo */
    .cover {
        min-height: 0;
        background: none;
        color: var(--text);
        border-top: 4px solid var(--red);
    }

    .cover__media,
    .cover::after,
    .cover::before {
        display: none;
    }

    .cover__inner {
        padding-top: 26px;
        padding-bottom: 8px;
    }

    .cover__title {
        color: var(--text);
        font-size: 2rem;
    }

    .cover__sub {
        color: var(--text-soft);
        border-right-color: var(--red);
        font-size: 1rem;
    }

    .cert__card {
        flex-direction: column;
        align-items: flex-start;
        padding: 22px;
    }

    .recipe-card__media img {
        height: 240px;
    }

    .legal-dialog {
        width: 100vw;
        height: 100dvh;
        max-width: 100vw;
        max-height: 100dvh;
        border-radius: 0;
    }

    .footer-main {
        padding: 44px 0 36px;
    }

    .footer-bottom .sep {
        display: none;
    }

    .footer-bottom a {
        display: inline-block;
        margin: 4px 8px;
    }

    .footer-bottom p {
        margin: 0 0 6px;
    }

    .legal dt {
        float: none;
        min-width: 0;
    }
}

@media (max-width: 600px) {
    .topbar__hours {
        display: none;
    }

    .topbar .wrap {
        justify-content: flex-end;
    }
}

@media (max-width: 480px) {
    .wrap {
        padding: 0 18px;
    }

    .product__body {
        padding: 22px 20px 26px;
    }

    .recipe-nav a span {
        display: none;
    }

    .recipe__download {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Reducir animaciones: el slider sigue avanzando, solo con fundido simple */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .js [data-reveal],
    .js [data-reveal="left"],
    .js [data-reveal="right"] {
        transform: none;
        transition: opacity .3s ease;
    }

    .hero-slide.is-active .hero-text,
    .hero-slide.is-leaving .hero-text,
    .hero-slide.is-active .kb-1,
    .hero-slide.is-active .kb-2,
    .hero-slide.is-active .kb-3,
    .hero-slide.is-leaving .kb-1,
    .hero-slide.is-leaving .kb-2,
    .hero-slide.is-leaving .kb-3 {
        animation: none;
    }

    .hero-slide.is-active .hero-text {
        opacity: 1;
    }

    .hero-slide {
        transition: opacity .4s ease, visibility 0s linear .4s;
    }

    .cover__media img,
    .intro__photo img {
        transform: none;
    }

    .recipe-card:hover,
    .btn:hover,
    .icon-btn:hover {
        transform: none;
    }

    .product:hover .product__media img {
        transform: none;
    }

    .ring__bar {
        transition: none;
    }
}

@media print {
    .site-header,
    .to-top,
    .legal-dialog,
    .hero__bar,
    .hero__arrow {
        display: none;
    }

    body {
        padding-top: 0;
    }
}
