/* vv-ecommerce — sistema base
   Los tokens se reemplazan por tienda. No usar valores mágicos fuera de :root. */

:root {
    --paper: #faf7f2;
    --surface: #fffdf9;
    --ink: #1a1815;
    --muted: #6b645b;
    --line: #e6dfd4;
    --accent: #9c3d21;
    --accent-ink: #fffaf6;
    --ok: #2f6b4f;

    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 22px;

    --shadow-sm: 0 1px 2px rgb(26 24 21 / .06);
    --shadow: 0 18px 40px -28px rgb(26 24 21 / .45);

    --wrap: 76rem;
    --gutter: clamp(1rem, 4vw, 2rem);

    --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --step--1: clamp(.8rem, .77rem + .15vw, .875rem);
    --step-0: clamp(1rem, .96rem + .2vw, 1.0625rem);
    --step-1: clamp(1.25rem, 1.15rem + .5vw, 1.5rem);
    --step-2: clamp(1.6rem, 1.4rem + 1vw, 2.25rem);
    --step-3: clamp(2.1rem, 1.6rem + 2.4vw, 3.5rem);
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font);
    font-size: var(--step-0);
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

main {
    flex: 1;
}

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

h1,
h2,
h3 {
    margin: 0 0 .55em;
    font-family: var(--font-headings, var(--font));
    line-height: 1.12;
    letter-spacing: -.025em;
    text-wrap: balance;
}

h1 {
    font-size: var(--step-3);
}

h2 {
    font-size: var(--step-2);
}

h3 {
    font-size: var(--step-1);
}

p {
    margin: 0 0 1em;
    text-wrap: pretty;
}

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

a:hover {
    text-decoration-thickness: 2px;
}

:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent) 40%, transparent);
    outline-offset: 3px;
    border-radius: 4px;
}

::selection {
    background: var(--accent);
    color: var(--accent-ink);
}

code {
    font-size: .9em;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: .1em .35em;
}

.wrap {
    width: min(100% - (var(--gutter) * 2), var(--wrap));
    margin-inline: auto;
}

.skip {
    position: absolute;
    left: -9999px;
    top: .75rem;
    padding: .7rem 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    z-index: 100;
}

.skip:focus {
    left: var(--gutter);
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--header-bg, var(--paper));
    backdrop-filter: var(--header-blur, none);
    border-bottom: 1px solid var(--line);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4.5rem;
}

/* Variantes de cabecera que fija el tema. */
body.header--compact .header__inner {
    min-height: 3.5rem;
}

body.header--compact .brand__logo {
    width: auto;
    max-height: 2rem;
}

@media (min-width: 60rem) {
    body.header--centered .header__inner {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: .6rem;
        min-height: 0;
        padding-block: .9rem;
        text-align: center;
    }

    body.header--centered .nav--desktop {
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
        row-gap: .45rem;
    }
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    min-width: 0;
    font-family: var(--font-headings, var(--font));
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -.03em;
    color: var(--ink);
    text-decoration: none;
}

.brand__logo {
    flex: 0 0 auto;
    width: auto;
    height: auto;
    max-width: 8rem;
    max-height: 2.65rem;
    object-fit: contain;
}

.brand__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand__mark {
    width: .55rem;
    height: .55rem;
    border-radius: 2px;
    background: var(--accent);
    transform: rotate(45deg);
}

.nav--desktop {
    display: none;
    align-items: center;
    gap: 1.4rem;
    font-size: .95rem;
}

.nav--desktop a {
    color: var(--muted);
    text-decoration: none;
}

.nav--desktop a:hover {
    color: var(--ink);
}

.nav__group {
    position: relative;
    display: flex;
    align-items: center;
}

.nav__group-link {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    color: var(--muted);
    text-decoration: none;
}

.nav__group-link::after {
    content: "";
    width: .35rem;
    height: .35rem;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
    transition: transform .18s ease;
}

.nav__group:hover .nav__group-link,
.nav__group:focus-within .nav__group-link {
    color: var(--ink);
}

.nav__group:hover .nav__group-link::after,
.nav__group:focus-within .nav__group-link::after {
    transform: rotate(225deg) translateY(-1px);
}

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

.nav__submenu {
    position: absolute;
    top: calc(100% + .8rem);
    left: -.8rem;
    z-index: 1;
    min-width: 13rem;
    padding: .4rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-.35rem);
    transition: opacity .16s ease, transform .16s ease;
}

/* Puente invisible entre el enlace y el submenú para no perder el hover. */
.nav__submenu::before {
    content: "";
    position: absolute;
    inset: -.8rem 0 auto;
    height: .8rem;
}

.nav__group:hover .nav__submenu,
.nav__group:focus-within .nav__submenu {
    opacity: 1;
    pointer-events: auto;
    transform: none;
}

.nav__submenu a {
    display: block;
    padding: .55rem .7rem;
    border-radius: var(--radius-sm);
    color: var(--ink);
}

.nav__submenu a:hover {
    background: var(--paper);
}

.nav__submenu--pages {
    min-width: 15rem;
}

.nav--desktop .nav__home {
    display: grid;
    place-items: center;
    width: 2.15rem;
    height: 2.15rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
}

.nav--desktop .nav__home:hover,
.nav--desktop .nav__home:focus-visible {
    border-color: var(--ink);
    background: var(--paper);
    color: var(--ink);
}

.nav__home svg {
    display: block;
}

/* Megamenú de categorías */

.nav__group--mega {
    position: static;
    margin-block: -2rem;
    padding-block: 2rem;
}

.nav__group--empty .nav__group-link::after {
    display: none;
}

.nav__mega {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    z-index: 2;
    background: var(--surface);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transform: translateY(-.35rem);
    transition: opacity .16s ease, transform .16s ease, visibility .16s;
}

.nav__group--mega:hover .nav__mega,
.nav__group--mega:focus-within .nav__mega {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: none;
}

.nav__mega-inner {
    padding-block: 1.25rem 1rem;
}

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

.nav-mega {
    display: flex;
    flex-direction: column;
    gap: .55rem;
    min-width: 0;
}

.nav-mega__head {
    display: grid;
    grid-template-columns: 3.4rem minmax(0, 1fr);
    grid-template-areas:
        "media title"
        "media count";
    align-items: center;
    column-gap: .7rem;
    row-gap: .05rem;
    color: var(--ink);
    text-decoration: none;
}

.nav-mega__head:hover .nav-mega__title {
    text-decoration: underline;
}

.nav-mega__media {
    grid-area: media;
    display: grid;
    place-items: center;
    width: 3.4rem;
    aspect-ratio: 1;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--paper), var(--surface));
}

.nav-mega__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav-mega__initial {
    color: var(--accent);
    font-family: var(--font-headings, var(--font));
    font-size: 1.2rem;
    font-weight: 700;
}

.nav-mega__title {
    grid-area: title;
    color: var(--ink);
    font-weight: 600;
    line-height: 1.25;
}

.nav-mega__count {
    grid-area: count;
    color: var(--muted);
    font-size: .78rem;
}

.nav-mega__links {
    display: grid;
    gap: .05rem;
    margin: 0;
    padding: 0 0 0 .2rem;
    list-style: none;
}

.nav-mega__links a {
    display: block;
    padding: .3rem .45rem;
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-size: .86rem;
    text-decoration: none;
}

.nav-mega__links a:hover {
    background: var(--paper);
    color: var(--ink);
}

.nav-mega__all {
    color: var(--accent) !important;
    font-weight: 600;
}

.nav__mega-foot {
    margin: .85rem 0 0;
    padding-top: .75rem;
    border-top: 1px solid var(--line);
    font-size: .85rem;
}

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

.menu__group summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .7rem .8rem;
    border-radius: var(--radius-sm);
    color: var(--ink);
    cursor: pointer;
    list-style: none;
}

.menu__group summary:hover {
    background: var(--paper);
}

.menu__group summary::after {
    content: "+";
    color: var(--muted);
}

.menu__group[open] summary::after {
    content: "−";
}

.menu__submenu {
    display: grid;
    gap: .1rem;
    padding-left: .8rem;
}

.menu__submenu a {
    padding: .55rem .8rem;
    font-size: .92rem;
}

.menu__home {
    display: flex;
    align-items: center;
    gap: .55rem;
}

.menu__home svg {
    color: var(--muted);
}

.menu__panel .menu__parent {
    font-weight: 600;
}

.menu__panel .menu__child {
    padding-left: 1.55rem;
    color: var(--muted);
    font-size: .88rem;
}

.menu {
    position: relative;
}

.menu__button {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
    list-style: none;
}

.menu__button::-webkit-details-marker {
    display: none;
}

.menu[open] .menu__button {
    border-color: var(--ink);
}

.menu__panel {
    position: absolute;
    right: 0;
    top: calc(100% + .6rem);
    width: min(19rem, calc(100vw - (var(--gutter) * 2)));
    max-height: calc(100dvh - 6rem);
    padding: .4rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.menu__panel a {
    display: block;
    padding: .7rem .8rem;
    border-radius: var(--radius-sm);
    color: var(--ink);
    text-decoration: none;
}

.menu__panel a:hover {
    background: var(--paper);
}

/* Hero y secciones */

.hero {
    padding-block: clamp(3rem, 8vw, 6rem) clamp(1rem, 3vw, 2rem);
}

.eyebrow {
    margin-bottom: .9rem;
    font-family: var(--font-subheadings, var(--font));
    color: var(--accent);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 18ch;
}

.hero__lead {
    max-width: 48ch;
    margin-top: 1rem;
    color: var(--muted);
    font-size: var(--step-1);
    line-height: 1.45;
}

.hero__actions {
    margin-top: 1.6rem;
}

/* Hero con slider */

.hero--slider {
    --hero-box-gap: clamp(1rem, 3vw, 2rem);
    position: relative;
    padding: 0;
    overflow: clip;
    background: var(--ink);
}

.hero--slider.is-boxed {
    background: var(--paper);
}

.hero-slider {
    position: relative;
    display: grid;
}

.hero-slide {
    position: relative;
    grid-area: 1 / 1;
    display: grid;
    align-items: end;
    min-height: clamp(26rem, 62vw, 40rem);
    background: var(--ink);
    color: #fff;
}

.hero-slide--boxed {
    width: min(100% - (var(--gutter) * 2), var(--wrap));
    margin-block: var(--hero-box-gap);
    margin-inline: auto;
    min-height: clamp(22rem, 48vw, 34rem);
    border-radius: var(--radius-lg);
    overflow: clip;
    box-shadow: var(--shadow);
}

.hero-slide--boxed .hero-slide__content.wrap {
    width: 100%;
    padding-inline: var(--gutter);
}

.hero-slide[hidden] {
    display: none;
}

.hero-slide__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgb(0 0 0 / .72) 0%, rgb(0 0 0 / .42) 48%, rgb(0 0 0 / .12) 100%);
}

.hero-slide__content {
    position: relative;
    z-index: 1;
    padding-block: clamp(4rem, 10vw, 7rem) clamp(4rem, 8vw, 5.5rem);
}

.hero-slide h1 {
    max-width: 20ch;
    color: #fff;
}

.hero-slide .eyebrow {
    color: rgb(255 255 255 / .78);
}

.hero-slide .hero__lead {
    color: rgb(255 255 255 / .86);
}

.hero-slide.is-entering {
    z-index: 2;
}

.hero-slide.is-leaving {
    z-index: 1;
    pointer-events: none;
}

.hero--effect-fade .hero-slide.is-entering {
    animation: hero-fade-in var(--hero-transition, .7s) ease both;
}

.hero--effect-fade .hero-slide.is-leaving {
    animation: hero-fade-out var(--hero-transition, .7s) ease both;
}

.hero--effect-slide .hero-slide.is-entering {
    animation: hero-fade-in var(--hero-transition, .7s) ease both;
}

.hero--effect-slide .hero-slide.is-leaving {
    animation: hero-fade-out var(--hero-transition, .7s) ease both;
}

.hero--effect-slide .hero-slide.is-entering .hero-slide__image {
    animation: hero-image-in var(--hero-transition, .7s) cubic-bezier(.22, .61, .36, 1) both;
}

.hero--effect-slide .hero-slide.is-leaving .hero-slide__image {
    animation: hero-image-out var(--hero-transition, .7s) cubic-bezier(.22, .61, .36, 1) both;
}

.hero--effect-slide .hero-slide.is-entering .hero-slide__content {
    animation: hero-content-in var(--hero-transition, .7s) cubic-bezier(.22, .61, .36, 1) both;
}

.hero--effect-slide .hero-slide.is-leaving .hero-slide__content {
    animation: hero-content-out var(--hero-transition, .7s) cubic-bezier(.22, .61, .36, 1) both;
}

@keyframes hero-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes hero-fade-out {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes hero-image-in {
    from {
        transform: translateX(2.5%) scale(1.06);
    }

    to {
        transform: none;
    }
}

@keyframes hero-image-out {
    from {
        transform: none;
    }

    to {
        transform: translateX(-2.5%) scale(1.06);
    }
}

@keyframes hero-content-in {
    from {
        opacity: 0;
        transform: translateX(2rem);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes hero-content-out {
    from {
        opacity: 1;
        transform: none;
    }

    to {
        opacity: 0;
        transform: translateX(-1.5rem);
    }
}

.hero-slider__controls[hidden] {
    display: none;
}

.hero-slider__controls {
    position: absolute;
    right: var(--gutter);
    bottom: 1rem;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: .3rem;
    background: rgb(0 0 0 / .35);
    border: 1px solid rgb(255 255 255 / .22);
    border-radius: 999px;
    backdrop-filter: blur(8px);
}

.hero--slider.is-boxed .hero-slider__controls {
    right: max(calc(var(--gutter) + .75rem), calc((100% - var(--wrap)) / 2 + .75rem));
    bottom: calc(var(--hero-box-gap) + 1rem);
}

.hero-slider__arrow {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 1.1rem;
    cursor: pointer;
}

.hero-slider__arrow:hover,
.hero-slider__arrow:focus-visible {
    background: rgb(255 255 255 / .16);
}

.hero-slider__dots {
    display: flex;
    gap: .25rem;
}

.hero-slider__dots button {
    width: .55rem;
    height: .55rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgb(255 255 255 / .38);
    cursor: pointer;
}

.hero-slider__dots button[aria-current="true"] {
    background: #fff;
}

.hero-slider__dots button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

/* Índice de secciones de la portada */

.page-index {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.page-index__inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-block: .55rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.page-index__inner::-webkit-scrollbar {
    display: none;
}

.page-index__label {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.page-index__links {
    display: flex;
    gap: .35rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.page-index__links a {
    display: inline-flex;
    align-items: center;
    min-height: 2.1rem;
    padding: .3rem .8rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink);
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .15s ease, border-color .15s ease;
}

.page-index__links a:hover {
    background: var(--paper);
    border-color: var(--muted);
}

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

@media (max-width: 30rem) {
    .page-index__label {
        display: none;
    }
}

/* Llamada a la acción */

.cta-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: clamp(1.25rem, 4vw, 2.25rem);
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 5px solid var(--accent);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.cta-panel h2 {
    margin-bottom: .25rem;
}

.cta-panel__text {
    max-width: 58ch;
    margin: 0;
    color: var(--muted);
}

.cta-panel__action {
    margin: 0;
}

.section {
    padding-block: clamp(2rem, 5vw, 3.5rem);
    scroll-margin-top: 5.5rem;
}

.section__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.section__head h2 {
    margin: 0;
}

/* Categorías */

.cat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cat {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 9rem;
    padding: 1rem;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink);
    text-decoration: none;
    transition: border-color .15s ease, transform .15s ease;
}

.cat:hover {
    border-color: color-mix(in srgb, var(--ink) 35%, var(--line));
    transform: translateY(-2px);
}

.cat__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.cat--image {
    color: #fff;
}

.cat--image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgb(14 12 10 / 0) 35%, rgb(14 12 10 / .72) 100%);
    pointer-events: none;
}

.cat__body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

.cat--image .cat__count {
    color: rgb(255 255 255 / .82);
}

.cat--image:hover .cat__image {
    transform: scale(1.04);
}

.cat__name {
    font-size: 1.05rem;
    font-weight: 650;
    letter-spacing: -.015em;
}

.cat__count {
    color: var(--muted);
    font-size: .85rem;
}

/* Productos */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--card-min, 17rem)), 1fr));
    gap: 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.product {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: clip;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.product:hover {
    border-color: color-mix(in srgb, var(--ink) 22%, var(--line));
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.product:focus-within {
    outline: 3px solid color-mix(in srgb, var(--accent) 40%, transparent);
    outline-offset: 3px;
}

.product__media {
    position: relative;
    aspect-ratio: var(--card-ratio, 1 / 1);
    overflow: clip;
    background: color-mix(in srgb, var(--surface) 60%, var(--paper));
    border-bottom: 1px solid var(--line);
}

.product__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: .9rem;
    object-fit: contain;
    object-position: center;
    transition: transform .3s ease;
}

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

.product__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: .45rem;
    padding: 1rem 1.05rem 1.1rem;
}

.product__brand {
    align-self: flex-start;
    margin: 0;
    padding: .16rem .5rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--ink) 7%, transparent);
    color: var(--muted);
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.product__name {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    min-height: 2.7em;
    font-size: .97rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -.01em;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.product__name a {
    color: var(--ink);
    text-decoration: none;
}

.product__name a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.price {
    margin: 0;
    font-size: 1.22rem;
    font-weight: 700;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
}

.price--sale {
    color: var(--accent);
}

.price__old {
    margin-left: .45rem;
    color: var(--muted);
    font-size: .8em;
    font-weight: 400;
}

.product__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-top: auto;
    padding-top: .55rem;
}

.product__stock {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--muted);
    font-size: .74rem;
}

.product__dot {
    width: .45rem;
    height: .45rem;
    border-radius: 50%;
    background: var(--muted);
}

.product__stock.is-in .product__dot {
    background: var(--ok);
}

.product__stock.is-out .product__dot {
    background: #b42318;
}

.product__cta {
    margin-left: auto;
    color: var(--muted);
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    transition: color .18s ease, transform .18s ease;
}

.product:hover .product__cta {
    color: var(--accent);
    transform: translateX(2px);
}

/* Tablet: tres columnas fijas; móvil: dos columnas */

@media (min-width: 48rem) and (max-width: 63.99rem) {
    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 47.99rem) {
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .9rem;
    }

    .product__media img {
        padding: .55rem;
    }

    .product__body {
        gap: .35rem;
        padding: .75rem .8rem .85rem;
    }

    .product__brand {
        font-size: .62rem;
    }

    .product__name {
        font-size: .88rem;
        min-height: 4.05em;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }

    .price {
        font-size: 1.05rem;
    }

    .product__foot {
        padding-top: .45rem;
    }

    .product__cta {
        display: none;
    }
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: .24rem .55rem;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-ink);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.product__badges {
    position: absolute;
    top: .65rem;
    left: .65rem;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.badge--muted {
    background: var(--muted);
}

.badge--ok {
    background: var(--ok);
}

/* Tonos de demostración para medios sin imagen */

.tone-1 {
    background: linear-gradient(150deg, #efe8dc, #f8f4ec);
}

.tone-2 {
    background: linear-gradient(150deg, #dfe8e1, #f2f6f1);
}

.tone-3 {
    background: linear-gradient(150deg, #ece1d6, #f9f1e8);
}

.tone-4 {
    background: linear-gradient(150deg, #e3e1ea, #f4f3f8);
}

/* Botones */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 2.75rem;
    padding: .55rem 1.15rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font: inherit;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}

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

.btn--primary:hover {
    background: color-mix(in srgb, var(--accent) 86%, #000);
}

.btn--secondary {
    background: var(--surface);
    border-color: var(--line);
    color: var(--ink);
}

.btn--secondary:hover {
    border-color: var(--ink);
}

.btn--ghost {
    background: transparent;
    color: var(--ink);
}

.btn--ghost:hover {
    background: var(--surface);
}

.btn--sm {
    min-height: 2.25rem;
    padding: .35rem .85rem;
    font-size: .9rem;
}

.btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

/* Formularios */

.form-demo {
    display: grid;
    gap: 1rem;
    max-width: 26rem;
}

.field {
    display: grid;
    gap: .35rem;
}

.field label {
    font-size: .9rem;
    font-weight: 600;
}

.input {
    width: 100%;
    padding: .6rem .75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
}

.input:focus-visible {
    border-color: var(--accent);
}

.help {
    margin: 0;
    color: var(--muted);
    font-size: .85rem;
}

.check {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    font-size: .95rem;
}

.check input {
    margin-top: .3rem;
    accent-color: var(--accent);
}

/* Utilidades de la guía */

.cluster {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
}

.swatches {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: .75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.swatches li {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .9rem;
}

.swatch {
    width: 2rem;
    height: 2rem;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.display {
    margin: 0 0 .4em;
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    font-weight: 700;
    letter-spacing: -.04em;
    line-height: 1;
}

.small {
    color: var(--muted);
    font-size: .9rem;
}

.alert {
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-sm);
}

/* Footer */

.site-footer {
    margin-top: clamp(2rem, 6vw, 4rem);
    padding-block: 2.5rem 1.5rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: .9rem;
}

.footer__grid {
    display: grid;
    gap: 2rem;
}

.footer__brand {
    margin-bottom: .3rem;
    color: var(--ink);
    font-weight: 700;
    letter-spacing: -.02em;
}

.footer__nav ul {
    display: grid;
    gap: .4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer__title {
    margin: 0 0 .55rem;
    color: var(--ink);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

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

.footer__nav a:hover {
    color: var(--ink);
    text-decoration: underline;
}

.footer__legal {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
    font-size: .82rem;
}

.footer__legal p {
    margin: 0;
}

/* Migas, cabecera de página y paginación */

.breadcrumbs {
    margin-bottom: 1.5rem;
    color: var(--muted);
    font-size: .85rem;
}

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
    gap: .4rem;
}

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

.breadcrumbs a:hover {
    color: var(--ink);
    text-decoration: underline;
}

.breadcrumbs [aria-current="page"] {
    color: var(--ink);
}

.breadcrumbs__sep {
    color: var(--line);
}

.page-head {
    padding-block: clamp(1.5rem, 3.5vw, 2.4rem) 0;
}

.page-head h1 {
    margin-bottom: .3rem;
    font-size: clamp(1.7rem, 3.4vw, 2.2rem);
}

.page-head__meta {
    margin: 0 0 .8rem;
    color: var(--muted);
    font-size: .9rem;
}

.page-head__lead {
    max-width: 68ch;
    color: var(--muted);
    font-size: .94rem;
    line-height: 1.55;
}

/* Descripción larga de categoría: plegada para que el catálogo quede a la vista */

.page-head__about {
    max-width: 68ch;
    margin: .35rem 0 0;
}

.page-head__about summary {
    cursor: pointer;
    color: var(--accent);
    font-size: .85rem;
    font-weight: 600;
    list-style: none;
}

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

.page-head__about summary::after {
    content: " +";
}

.page-head__about[open] summary::after {
    content: " –";
}

.page-head__about .page-head__lead {
    margin-top: .5rem;
}

.page-head + .section {
    padding-block-start: clamp(1.25rem, 2.5vw, 1.75rem);
}

/* Detalle de producto */

.product-detail {
    display: grid;
    gap: 2rem;
    align-items: start;
}

.product-detail__media {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: clip;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.product-detail__media img {
    display: block;
    width: 100%;
    height: 100%;
    padding: .85rem;
    object-fit: contain;
    object-position: center;
}

.product-detail__info h1 {
    max-width: 26ch;
    font-size: clamp(1.5rem, 1.3rem + .8vw, 1.9rem);
    line-height: 1.15;
    letter-spacing: -.02em;
}

.product-detail__body {
    min-width: 0;
    max-width: 68ch;
    overflow-x: auto;
}

.product-detail__title {
    margin: 0 0 .9rem;
    font-size: var(--step-1);
}

.product-detail__lead {
    max-width: 46ch;
    margin-top: .75rem;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.6;
}

/* Precio, disponibilidad y acciones forman un solo bloque: el título y la
   bajada quedan arriba, sin competir con el precio. */
.product-buy {
    display: grid;
    gap: .7rem;
    margin-top: 1.6rem;
}

.product-buy .stock {
    margin: 0;
}

.product-buy .product-actions {
    margin: 0;
}

.product-buy .product-contact-email {
    margin: 0;
}

.price--lg {
    margin: 0;
    font-size: clamp(1.35rem, 1.2rem + .6vw, 1.6rem);
    font-weight: 700;
    letter-spacing: -.02em;
}

.stock {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin: 0 0 1rem;
    color: var(--ok);
    font-size: .9rem;
    font-weight: 600;
}

.stock__dot {
    width: .5rem;
    height: .5rem;
    border-radius: 50%;
    background: currentColor;
}

.stock--out {
    color: var(--muted);
}

/* Especificaciones de la ficha: etiquetas pequeñas, valores legibles. */
.product-detail .specs {
    margin-top: 1.6rem;
    padding-block: .9rem;
    gap: .45rem 1rem;
    font-size: .85rem;
}

.product-detail .specs dt {
    padding-top: .1rem;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.product-detail .specs dd {
    font-size: .85rem;
    overflow-wrap: anywhere;
}

.product-back {
    margin-top: 1.25rem;
    font-size: .9rem;
}

.link-arrow {
    color: var(--muted);
    text-decoration: none;
}

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

/* Descripción plegable: el primer párrafo queda a la vista. */
.prose-fold {
    margin-top: .35rem;
}

.prose-fold > summary {
    cursor: pointer;
    color: var(--accent);
    font-size: .9rem;
    font-weight: 600;
    list-style: none;
}

.prose-fold > summary::-webkit-details-marker {
    display: none;
}

.prose-fold > summary::after {
    content: " +";
    font-weight: 700;
}

.prose-fold[open] > summary {
    margin-bottom: 1rem;
}

.prose-fold[open] > summary::after {
    content: " –";
}

.prose {
    max-width: 65ch;
    overflow-wrap: anywhere;
}

.prose > :first-child {
    margin-top: 0;
}

.prose > :last-child {
    margin-bottom: 0;
}

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

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
    margin: 1.6em 0 .55em;
    font-family: var(--font-headings);
    line-height: 1.2;
    letter-spacing: -.01em;
}

.prose h1,
.prose h2 {
    font-size: var(--step-1);
}

.prose h3 {
    font-size: 1.15rem;
}

.prose h4 {
    font-size: 1rem;
}

.prose ul,
.prose ol {
    margin: 0 0 1em;
    padding-left: 1.4rem;
}

.prose li {
    margin-bottom: .35em;
}

.prose li > ul,
.prose li > ol {
    margin: .35em 0 0;
}

.prose a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: .15em;
}

.prose a:hover {
    text-decoration-thickness: 2px;
}

.prose strong,
.prose b {
    font-weight: 650;
}

.prose blockquote {
    margin: 1.25em 0;
    padding: .35rem 0 .35rem 1.1rem;
    border-left: 3px solid var(--accent);
    color: var(--muted);
}

.prose blockquote > :last-child {
    margin-bottom: 0;
}

.prose hr {
    margin: 1.75em 0;
    border: 0;
    border-top: 1px solid var(--line);
}

.prose table {
    width: 100%;
    margin: 0 0 1.25em;
    border-collapse: collapse;
    font-size: .95rem;
}

.prose th,
.prose td {
    padding: .55rem .65rem;
    border: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.prose th {
    background: var(--surface);
    font-weight: 650;
}

.prose caption {
    margin-bottom: .45rem;
    color: var(--muted);
    font-size: .85rem;
    text-align: left;
}

.prose pre {
    margin: 0 0 1.25em;
    padding: .85rem 1rem;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-size: .88rem;
    line-height: 1.5;
}

.prose code {
    padding: .1em .35em;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    font-size: .9em;
}

.prose pre code {
    padding: 0;
    border: 0;
    background: none;
    font-size: inherit;
}

.prose p:last-child {
    margin-bottom: 0;
}

.specs {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .35rem 1.25rem;
    margin: 1.25rem 0;
    padding: 1rem 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    font-size: .9rem;
}

.specs dt {
    color: var(--muted);
}

.specs dd {
    margin: 0;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: 2rem;
}

.pagination a,
.pagination span {
    display: grid;
    place-items: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding-inline: .55rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink);
    font-size: .9rem;
    text-decoration: none;
}

.pagination a:hover {
    border-color: var(--ink);
}

.pagination [aria-current="page"] {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
}

.pagination .pagination__gap {
    border-color: transparent;
}

/* Responsive */

@media (min-width: 48rem) {
    .cat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1rem;
    }

    .cat {
        min-height: 10rem;
        padding: 1.15rem;
    }

    .footer__grid {
        grid-template-columns: 2fr 1fr;
    }

    .footer__grid--pages {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

@media (min-width: 60rem) {
    .nav--desktop {
        display: flex;
    }

    .menu {
        display: none;
    }

    .hero h1 {
        max-width: 20ch;
    }

    .product-detail {
        grid-template-columns: 1.05fr .95fr;
        gap: 2rem 3rem;
    }

    .product-detail--with-description {
        grid-template-areas:
            "media info"
            "body body";
    }

    .product-detail--with-description .product-detail__media {
        grid-area: media;
    }

    .product-detail--with-description .product-detail__info {
        grid-area: info;
    }

    .product-detail--with-description .product-detail__body {
        grid-area: body;
        margin-top: .5rem;
        padding-top: 1.75rem;
        border-top: 1px solid var(--line);
    }
}

/* Entrada suave de la portada */

@keyframes home-rise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.page-home .hero-slide:first-child .hero-slide__content > *,
.page-home .hero:not(.hero--slider) .wrap > * {
    animation: home-rise .55s cubic-bezier(.22, .61, .36, 1) both;
}

.page-home .hero-slide:first-child .hero-slide__content > :nth-child(2),
.page-home .hero:not(.hero--slider) .wrap > :nth-child(2) {
    animation-delay: 60ms;
}

.page-home .hero-slide:first-child .hero-slide__content > :nth-child(3),
.page-home .hero:not(.hero--slider) .wrap > :nth-child(3) {
    animation-delay: 120ms;
}

.page-home .hero-slide:first-child .hero-slide__content > :nth-child(4),
.page-home .hero:not(.hero--slider) .wrap > :nth-child(4) {
    animation-delay: 180ms;
}

.page-home main > .section {
    animation: home-rise .5s ease-out both;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-delay: 0s !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Contacto y leads */

.section--contact {
    scroll-margin-top: 6rem;
}

/* En la ficha de producto el formulario no debe gritar más que el producto. */
.section--contact-product {
    padding-block-start: clamp(1rem, 2.5vw, 1.75rem);
}

.section--contact-product .contact-panel__head h2 {
    font-size: var(--step-1);
}

.contact-panel {
    max-width: 48rem;
    margin-inline: auto;
    padding: clamp(1.25rem, 4vw, 2rem);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow);
    scroll-margin-top: 6rem;
}

.contact-panel__head h2 {
    margin-bottom: .35rem;
    font-size: var(--step-2);
}

.contact-panel__lead {
    max-width: 60ch;
    margin: 0;
    color: var(--muted);
}

.contact-channels {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 1.25rem 0;
}

.contact-form {
    display: grid;
    gap: 1rem;
}

.contact-form__grid {
    display: grid;
    gap: 1rem;
}

.contact-form .field {
    display: grid;
    gap: .35rem;
}

.contact-form .field label {
    font-size: .9rem;
    font-weight: 600;
}

.contact-consent {
    align-items: flex-start;
    font-size: .9rem;
    line-height: 1.45;
}

.contact-hours {
    margin: 1rem 0 0;
    color: var(--muted);
    font-size: .85rem;
}

.product-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 1rem 0 .75rem;
}

.product-contact-email {
    margin: 0 0 1rem;
    font-size: .9rem;
}

.product-contact-email a {
    color: var(--muted);
}

.textarea {
    resize: vertical;
    min-height: 7rem;
}

.hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.required {
    color: var(--accent);
}

.flash {
    margin: 1rem 0;
    padding: .8rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

.flash ul {
    margin: .35rem 0 0;
    padding-left: 1.2rem;
}

.flash--success {
    border-color: color-mix(in srgb, var(--ok) 45%, var(--line));
    background: color-mix(in srgb, var(--ok) 8%, var(--surface));
}

.flash--error {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
    background: color-mix(in srgb, var(--accent) 7%, var(--surface));
}

@media (min-width: 40rem) {
    .contact-form__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Barra de contacto móvil */

.mobile-contact {
    display: none;
}

@media (max-width: 48rem) {
    body.has-mobile-contact {
        padding-bottom: 4.75rem;
    }

    .mobile-contact {
        position: fixed;
        inset: auto 0 0;
        z-index: 40;
        display: grid;
        grid-auto-flow: column;
        gap: .5rem;
        padding: .55rem .75rem calc(.55rem + env(safe-area-inset-bottom));
        border-top: 1px solid var(--line);
        background: color-mix(in srgb, var(--surface) 94%, transparent);
        backdrop-filter: blur(10px);
    }

    .mobile-contact .btn {
        justify-content: center;
        padding: .65rem .7rem;
        font-size: .85rem;
    }
}

/* Secciones libres de la portada */
.section--block {
    padding-block: clamp(2.25rem, 5vw, 3.75rem);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.section--block-cover {
    position: relative;
}

.section--block-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: color-mix(in srgb, var(--paper) 90%, transparent);
    pointer-events: none;
}

.section--block-cover > .wrap {
    position: relative;
}

.block-panel {
    display: grid;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
}

.section--block-image-right .block-panel {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
}

.section--block-image-left .block-panel {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
}

.section--block-image-left .block-panel__media {
    order: -1;
}

.section--block-text-only .block-panel {
    grid-template-columns: minmax(0, 1fr);
    max-width: 52rem;
    margin-inline: auto;
}

.block-panel__body h2 {
    margin: 0 0 .6rem;
    font-size: clamp(1.5rem, 2.6vw, 2.1rem);
    line-height: 1.15;
}

.block-panel__lead {
    margin: 0 0 1rem;
    color: var(--muted);
    font-size: 1.05rem;
}

.block-panel__content {
    color: var(--ink);
}

.block-panel__content > :first-child {
    margin-top: 0;
}

.block-panel__content > :last-child {
    margin-bottom: 0;
}

.block-panel__content ul,
.block-panel__content ol {
    padding-left: 1.25rem;
}

.block-panel__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin: 1.4rem 0 0;
}

.block-panel__media {
    margin: 0;
}

.block-panel__media img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
}

@media (max-width: 47.99rem) {
    .section--block-image-right .block-panel,
    .section--block-image-left .block-panel {
        grid-template-columns: minmax(0, 1fr);
    }

    .section--block-image-left .block-panel__media {
        order: 0;
    }
}

/* Variante compacta de categorías */
.cat-grid--compact {
    grid-template-columns: minmax(0, 1fr);
}

.cat-grid--compact .cat {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: .9rem;
    min-height: 0;
    padding: .7rem .9rem;
}

.cat-grid--compact .cat__image {
    position: static;
    flex: 0 0 3rem;
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-sm);
}

.cat-grid--compact .cat--image::after {
    content: none;
}

@media (min-width: 48rem) {
    .cat-grid--compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
