/* Pfad Atelier — componentes: botones, tarjetas, tablas, formularios, cesta, aviso de cookies */

/* ---------- botones y enlaces ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 50px;
    padding: 12px 28px;
    border: 1px solid var(--a4);
    border-radius: 999px;
    background: var(--a3);
    color: var(--a4);
    font-family: var(--f2);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--a4);
    color: var(--a3);
}

.btn-red {
    background: var(--g2);
    border-color: var(--g2);
    color: var(--a3);
}

.btn-red:hover,
.btn-red:focus-visible {
    background: var(--g3);
    border-color: var(--g3);
    color: var(--a3);
}

.btn-red:focus-visible {
    outline-color: var(--a4);
}

.btn-line {
    background: transparent;
}

.btn-wide {
    width: 100%;
}

.btn-small {
    min-height: 44px;
    padding: 8px 20px;
    font-size: 0.92rem;
}

.btn[disabled] {
    cursor: progress;
    background: var(--a5);
    border-color: var(--a5);
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    color: var(--g1);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px dashed var(--g1);
}

.link-arrow::after {
    content: "→";
    font-family: var(--f3);
}

.link-arrow:hover {
    color: var(--a4);
    border-bottom-style: solid;
    border-bottom-color: var(--a4);
}

/* píldora de la cesta en la cabecera */
.cart-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 6px 8px 6px 18px;
    border: 1px solid var(--a4);
    border-radius: 999px;
    color: var(--a4);
    font-weight: 700;
    text-decoration: none;
}

.cart-pill:hover {
    background: var(--a4);
    color: var(--a3);
}

.cart-count {
    display: inline-grid;
    place-items: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--g2);
    color: var(--a3);
    font-family: var(--f3);
    font-size: 0.9rem;
}

/* ---------- hero ---------- */
.hero-img {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: -40px; /* margen para el desplazamiento de paralaje */
    background: var(--a6) url("../img/portada-pinza.webp") center 8% / cover no-repeat; /* la cara queda dentro en cajas anchas */
    transition: transform 0.1s linear;
}

.hc-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: clamp(28px, 4.5vw, 64px) clamp(16px, 4vw, 56px);
}

.hero-title {
    max-width: 15ch;
    font-size: clamp(2.1rem, 1.3rem + 2.2vw, 3rem);
    line-height: 1.04;
}

.hero-lead {
    max-width: 46ch;
    color: var(--a5);
    font-size: 1.08rem;
    margin-bottom: var(--s3);
}

.hero-ship {
    margin: var(--s2) 0 0;
    font-family: var(--f3);
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    color: var(--a5);
}

.hc-cuts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid var(--a4);
}

.hc-cut {
    display: grid;
    gap: 2px;
    padding: 16px clamp(16px, 2.4vw, 28px);
    color: var(--a4);
    text-decoration: none;
    border-bottom: 1px solid var(--a6);
}

.hc-cut:nth-child(odd) {
    border-right: 1px solid var(--a6);
}

.hc-cut:nth-child(n+3) {
    border-bottom: 0;
}

.hc-cut:hover {
    background: var(--a4);
    color: var(--a3);
}

.hc-label {
    font-family: var(--f3);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.hc-price {
    font-family: var(--f1);
    font-weight: 800;
    font-size: 1.2rem;
}

.hc-n {
    font-size: 0.85rem;
    color: inherit;
}

/* ---------- tarjetas de categoría ---------- */
.cat-cell {
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    gap: 6px;
    padding: 20px;
    color: var(--a4);
    text-decoration: none;
    background: var(--a1);
    border-right: 1px solid var(--a4);
    border-bottom: 1px solid var(--a4);
}

.cat-img img {
    width: 100%;
    max-height: 300px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: var(--r1);
    margin-bottom: 10px;
}

.cat-name {
    font-family: var(--f1);
    font-weight: 800;
    font-size: 1.3rem;
    text-transform: uppercase;
}

.cat-text {
    color: var(--a5);
    font-size: 0.95rem;
}

.cat-n {
    font-family: var(--f3);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    padding-top: 10px;
    border-top: 1px dashed var(--a6);
}

.cat-cell:hover {
    background: var(--a4);
    color: var(--a3);
}

.cat-cell:hover .cat-text {
    color: var(--a6);
}

/* ---------- tarjeta de producto (la única con sombra) ---------- */
.p-card {
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr;
    background: var(--a3);
    border-radius: 4px;
    box-shadow: 0 10px 24px -14px hsla(224, 30%, 12%, 0.35);
}

.p-img {
    background: var(--a2);
    border-radius: 4px 4px 0 0;
    overflow: hidden;
}

.p-img img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.p-body {
    display: grid;
    align-content: start;
    gap: 4px;
    padding: 14px 16px 16px;
}

.p-body p {
    margin: 0;
}

.p-cat {
    font-family: var(--f3);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--g1);
}

.p-name {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.2;
}

.p-link {
    color: var(--a4);
    text-decoration: none;
}

.p-link::after {
    content: "";
    position: absolute;
    inset: 0;
}

.p-card:hover .p-link {
    text-decoration: underline;
}

.p-meta {
    color: var(--a5);
    font-size: 0.9rem;
}

.p-price {
    margin-top: 6px;
    font-family: var(--f3);
    font-weight: 700;
    font-size: 1rem;
}

/* ---------- tabla comparativa ---------- */
.cmp-tools {
    display: none; /* sin JS el cambio de unidades no tendría efecto */
    border: 1px solid var(--a4);
    border-radius: 999px;
    margin-bottom: var(--s3);
    overflow: hidden;
}

.cmp-btn {
    min-height: 44px;
    padding: 8px 20px;
    border: 0;
    background: transparent;
    font-weight: 600;
    cursor: pointer;
}

.cmp-btn[aria-pressed="true"] {
    background: var(--a4);
    color: var(--a3);
}

.js .cmp-tools {
    display: inline-flex;
}

.cmp-wrap,
.tbl-wrap {
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--g1) transparent;
}

.cmp-table,
.m-table,
.req-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--a3);
    border: 1px solid var(--a4);
}

.cmp-table caption,
.m-table caption,
.req-table caption {
    caption-side: top;
    text-align: left;
    padding: 0 0 10px;
    font-family: var(--f3);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--a5);
}

.cmp-table th,
.cmp-table td,
.m-table th,
.m-table td,
.req-table th,
.req-table td {
    padding: 12px 14px;
    border: 1px solid var(--a6);
    text-align: left;
    vertical-align: top;
}

.cmp-table thead th,
.m-table thead th {
    background: var(--a4);
    color: var(--a3);
    font-family: var(--f3);
    font-size: 0.76rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-color: var(--a4);
}

.cmp-table tbody th,
.m-table tbody th {
    font-family: var(--f1);
    font-weight: 800;
}

.m-table td {
    font-family: var(--f3);
    font-size: 0.92rem;
}

.cmp-table td {
    font-size: 0.95rem;
}

.v-cm {
    font-family: var(--f3);
    font-weight: 600;
}

.v-tx {
    display: block;
    color: var(--a5);
    font-size: 0.9rem;
}

.js .v-tx,
.js [data-units-table].u-tx .v-cm {
    display: none;
}

.js [data-units-table].u-tx .v-tx {
    display: block;
    color: var(--a4);
    font-size: 0.95rem;
}

@media (max-width: 760px) {
    /* en móvil cada fila de la tabla se convierte en una tarjeta */
    .cmp-table,
    .cmp-table tbody,
    .cmp-table tr,
    .cmp-table th,
    .cmp-table td {
        display: block;
    }

    .cmp-table thead {
        display: none;
    }

    .cmp-table {
        border: 0;
        background: transparent;
    }

    .cmp-table tr {
        margin-bottom: 16px;
        background: var(--a3);
        border: 1px solid var(--a4);
    }

    .cmp-table tbody th {
        background: var(--a4);
        color: var(--a3);
        border: 0;
    }

    .cmp-table td {
        display: grid;
        grid-template-columns: 116px minmax(0, 1fr);
        gap: 12px;
        border: 0;
        border-top: 1px dashed var(--a6);
    }

    .cmp-table td::before {
        content: attr(data-th);
        font-family: var(--f3);
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--a5);
    }
}

.req-table th {
    width: 34%;
    background: var(--a2);
    font-weight: 700;
}

.req-table td {
    overflow-wrap: anywhere;
}

/* ---------- muro de notas ---------- */
.note {
    margin: 0;
    padding: 20px 20px 16px;
    background: var(--a3);
    border: 1px solid var(--a4);
    border-radius: var(--r1);
}

.note:nth-child(3n+2) {
    margin-top: 28px;
}

.note:nth-child(3n) {
    background: var(--a2);
}

.note-text {
    font-family: var(--f1);
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.4;
}

.note-sign {
    margin: 0;
    padding-top: 10px;
    border-top: 1px dashed var(--a6);
    font-family: var(--f3);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--g1);
}

/* ---------- pasos escalonados ---------- */
.step-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    border-left: 1px solid var(--a4);
}

.step {
    padding: 22px 20px;
    background: var(--a3);
    border: 1px solid var(--a4);
    border-left: 0;
}

@media (min-width: 900px) {
    .step-grid {
        border-left: 0;
    }

    .step {
        border-left: 1px solid var(--a4);
        margin-left: -1px;
    }

    .step:nth-child(4n+2) {
        margin-top: 32px;
    }

    .step:nth-child(4n+3) {
        margin-top: 64px;
    }

    .step:nth-child(4n+4) {
        margin-top: 96px;
    }

    .step-six .step:nth-child(n) {
        margin-top: 0;
    }

    .step-six .step:nth-child(even) {
        margin-top: 40px;
    }

    .step-line .step:nth-child(n) {
        margin-top: 0;
    }
}

@media (max-width: 899px) {
    .step + .step {
        border-top: 0;
    }

    .step-grid {
        border-left: 1px solid var(--a4);
    }
}

.step-n {
    display: block;
    margin-bottom: 14px;
    font-family: var(--f3);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    color: var(--g1);
}

.step-h {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.step-p {
    margin: 0;
    color: var(--a5);
    font-size: 0.97rem;
}

/* ---------- figuras ---------- */
.arch-fig,
.plain-fig {
    margin: 0;
}

.arch-img {
    width: 100%;
    max-height: clamp(320px, 56vh, 560px);
    object-fit: cover;
    border-radius: 999px 999px var(--r1) var(--r1);
    border: 1px solid var(--a4);
}

.fig-tall .arch-img {
    aspect-ratio: 3 / 4;
}

.plain-img {
    width: 100%;
    max-height: clamp(260px, 48vh, 480px);
    object-fit: cover;
    border-radius: var(--r1);
    border: 1px solid var(--a4);
}

.arch-fig figcaption,
.plain-fig figcaption {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed var(--a6);
    font-family: var(--f3);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    color: var(--a5);
}

.atelier-text p {
    max-width: 60ch;
}

.spec-list {
    margin: var(--s3) 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--a4);
}

.spec-list li {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--a6);
}

.spec-list span {
    font-family: var(--f3);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--g1);
    padding-top: 3px;
}

/* ---------- franja de envíos ---------- */
.ship-band {
    background: var(--a4);
    color: var(--a3);
}

.ship-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 36px;
    padding: 22px 0;
}

.ship-row p {
    margin: 0;
    font-size: 0.95rem;
}

.ship-k {
    font-family: var(--f3);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--a6);
    margin-right: 6px;
}

.ship-band .link-arrow {
    color: var(--a3);
    border-bottom-color: var(--a3);
    margin-left: auto;
}

.ship-band .link-arrow:hover,
.ship-band .link-arrow:focus-visible {
    color: var(--a3);
    border-bottom-style: solid;
}

.ship-band :focus-visible {
    outline-color: var(--a3);
}

/* ---------- cabecera interior ---------- */
.pt-title {
    font-size: clamp(2rem, 1.3rem + 2vw, 3rem);
    max-width: 20ch;
}

.pt-lead {
    max-width: 62ch;
    margin: 0;
    color: var(--a5);
    font-size: 1.05rem;
}

.pt-facts,
.pt-steps {
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--a4);
}

.pt-facts li,
.pt-steps li {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--a6);
    font-size: 0.92rem;
}

.pt-facts span {
    font-family: var(--f3);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--g1);
    padding-top: 3px;
}

.pt-steps li {
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    color: var(--a5);
}

.pt-steps span {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--a5);
    border-radius: 999px;
    font-family: var(--f3);
}

.pt-steps li.cur {
    color: var(--a4);
    font-weight: 700;
}

.pt-steps li.cur span {
    background: var(--a4);
    border-color: var(--a4);
    color: var(--a3);
}

/* ---------- celdas y fichas de texto ---------- */
.def-cell,
.rule-cell,
.tile,
.fab-cell {
    padding: 24px;
    background: var(--a3);
    border-right: 1px solid var(--a4);
    border-bottom: 1px solid var(--a4);
}

.def-k,
.rule-k {
    font-family: var(--f3);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--g1);
}

.def-k {
    font-size: 1rem;
    font-weight: 700;
}

.def-cell p:last-child,
.rule-cell p:last-child,
.tile p:last-child,
.fab-cell p:last-child {
    margin-bottom: 0;
}

.rule-h,
.tile-h,
.fab-h {
    font-size: 1.1rem;
    text-transform: none;
}

.rule-k {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--a6);
    letter-spacing: 0.06em;
    text-transform: none;
    font-size: 0.86rem;
}

.tile-ink {
    background: var(--a4);
    color: var(--a3);
}

.tile-ink h2 {
    color: var(--a3);
}

.tile-ink .sec-num {
    color: var(--a6);
}

.tile-ink .sec-num .num {
    color: var(--a3);
    border-color: var(--a3);
}

.tile-link {
    color: var(--a4);
    text-decoration: none;
}

.tile-link:hover {
    background: var(--a4);
    color: var(--a3);
}

.fab-grid {
    background: transparent;
}

.fab-cell {
    background: var(--a1);
}

.note-card {
    padding: 24px;
    background: var(--a3);
    border: 1px solid var(--a4);
    border-top: 6px solid var(--g1);
    border-radius: var(--r1);
}

.note-card-h {
    font-size: 1.15rem;
}

.note-card-foot {
    margin: 0;
    padding-top: 12px;
    border-top: 1px dashed var(--a6);
    font-family: var(--f3);
    font-size: 0.8rem;
    color: var(--a5);
}

/* guía de cortes: módulos numerados */
.cut-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    gap: 0;
    border-top: 1px solid var(--a4);
    border-left: 1px solid var(--a4);
}

.cut-mod {
    padding: 28px 24px;
    background: var(--a3);
    border-right: 1px solid var(--a4);
    border-bottom: 1px solid var(--a4);
}

.cut-head {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 12px;
}

.cut-n {
    font-family: var(--f3);
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--g1);
}

.cut-h {
    margin: 0;
    font-size: 1.5rem;
    text-transform: uppercase;
}

.cut-spec {
    margin: 16px 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--a4);
}

.cut-spec li {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--a6);
    font-size: 0.95rem;
}

.sp-k {
    font-family: var(--f3);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--g1);
    padding-top: 3px;
}

.check-list {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: chk;
    border-top: 1px solid var(--a4);
    max-width: 860px;
}

.check-list > li {
    position: relative;
    padding: 14px 0 14px 56px;
    border-bottom: 1px dashed var(--a6);
    counter-increment: chk;
}

.check-list > li::before {
    content: counter(chk, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 14px;
    font-family: var(--f3);
    font-weight: 700;
    color: var(--g1);
}

/* ---------- calculadora de largo ---------- */
.calc-box {
    padding: clamp(20px, 3vw, 36px);
    background: var(--a3);
    border: 1px solid var(--a4);
    border-radius: var(--r1);
}

.calc-form {
    display: grid;
    gap: 16px;
    margin: var(--s3) 0;
}

.fld-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.heel-set {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
}

.heel-set legend {
    width: 100%;
    margin-bottom: 6px;
}

.heel-opt input,
.size-opt input,
.pay-opt input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.heel-opt span {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 18px;
    border: 1px solid var(--a4);
    border-radius: 999px;
    font-family: var(--f3);
    cursor: pointer;
}

.heel-opt input:checked + span {
    background: var(--a4);
    color: var(--a3);
}

.heel-opt input:focus-visible + span,
.size-opt input:focus-visible + .size-n {
    outline: 2px solid var(--g1);
    outline-offset: 2px;
}

.calc-out {
    display: none; /* el resultado solo tiene sentido con el cálculo activo */
    padding: 20px;
    background: var(--a2);
    border: 1px dashed var(--a4);
}

.calc-big {
    margin: 0;
    font-family: var(--f3);
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1;
    color: var(--g1);
}

.calc-sub {
    font-family: var(--f3);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--a5);
}

.calc-res {
    margin: 0;
    padding-top: 10px;
    border-top: 1px dashed var(--a6);
}

/* ---------- formularios ---------- */
.fld {
    display: grid;
    gap: 6px;
}

.fld-label {
    font-size: 0.92rem;
    font-weight: 700;
}

.fld-input {
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    background: var(--a3);
    border: 1px solid var(--a5);
    border-radius: var(--r1);
    font-size: 16px;
}

textarea.fld-input {
    resize: vertical;
    min-height: 96px;
}

.fld-input:focus {
    border-color: var(--a4);
    outline: 2px solid var(--g1);
    outline-offset: 0;
}

.fld-input[aria-invalid="true"] {
    border: 2px solid var(--a4);
    background: var(--a2);
}

.fld-mono {
    font-family: var(--f3);
    text-transform: uppercase;
}

.fld-err {
    margin: 0;
    padding: 6px 10px;
    border-left: 3px solid var(--a4);
    background: var(--a2);
    font-size: 0.88rem;
    font-weight: 600;
}

.chk {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    margin: 12px 0 6px;
    font-size: 0.95rem;
    cursor: pointer;
}

.chk input {
    width: 20px;
    height: 20px;
    margin: 3px 0 0;
    accent-color: var(--g1);
}

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

.form-card {
    padding: clamp(20px, 3vw, 36px);
    background: var(--a3);
    border: 1px solid var(--a4);
    border-radius: var(--r1);
}

.form-h {
    font-size: 1.4rem;
}

.msg-form,
.status-form {
    display: grid;
    gap: 16px;
}

.msg-form .btn,
.status-form .btn {
    justify-self: start;
}

.form-alert {
    margin: 0;
    padding: 14px 16px;
    background: var(--a2);
    border: 1px solid var(--a4);
    border-left: 6px solid var(--a4);
    font-weight: 600;
}

.form-alert p {
    margin: 0;
}

/* ---------- ficha de producto ---------- */
.pd {
    display: grid;
    gap: 28px;
    padding-top: clamp(24px, 4vw, 48px);
    padding-bottom: var(--s5);
    grid-template-columns: minmax(0, 1fr);
}

.pd-photo {
    justify-self: center;
}

.pd-img {
    width: min(100%, 44vh, 520px);
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--a6);
    background: var(--a2);
}

@media (min-width: 900px) {
    .pd {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        grid-template-areas: "foto info";
        align-items: start;
    }

    .pd-photo {
        grid-area: foto;
        justify-self: end;
        position: sticky;
        top: calc(var(--hh) + 20px);
    }

    .pd-info {
        grid-area: info;
        max-width: 520px;
    }

    .pd-img {
        width: min(100%, 48vh, 520px); /* alto = 64vh: la foto entera cabe en pantalla */
    }
}

.pd-crumb {
    font-family: var(--f3);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.pd-crumb a {
    display: inline-block;
    padding: 12px 0;
}

.pd-title {
    font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.6rem);
    margin-bottom: 8px;
}

.pd-color {
    color: var(--a5);
    margin-bottom: 10px;
}

.pd-price {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--a4);
    border-bottom: 1px dashed var(--a6);
}

.pd-amount {
    font-family: var(--f3);
    font-size: 1.6rem;
    font-weight: 700;
}

.pd-vat {
    font-size: 0.88rem;
    color: var(--a5);
}

.buy-form {
    display: grid;
    gap: 16px;
    margin: 18px 0;
}

.size-set {
    margin: 0;
    padding: 0;
    border: 0;
}

.size-legend {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 10px;
    font-weight: 700;
}

.size-help {
    font-weight: 500;
    font-size: 0.9rem;
}

.size-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.size-opt {
    position: relative;
    display: grid;
    justify-items: center;
    cursor: pointer;
}

.size-n {
    display: grid;
    place-items: center;
    min-width: 52px;
    height: 48px;
    padding: 0 10px;
    border: 1px solid var(--a4);
    border-radius: var(--r1);
    font-family: var(--f3);
    font-weight: 700;
    background: var(--a3);
}

.size-opt:hover .size-n {
    background: var(--a2);
}

.size-opt input:checked + .size-n {
    background: var(--a4);
    color: var(--a3);
}

.size-off {
    cursor: not-allowed;
}

.size-off .size-n {
    color: var(--a5);
    border-style: dashed;
    border-color: var(--a6);
    background: transparent;
    text-decoration: line-through;
}

.size-x {
    font-family: var(--f3);
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--a5);
}

.qty-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qty-label {
    font-weight: 700;
}

.qty-sel {
    min-height: 44px;
    min-width: 76px;
    padding: 6px 10px;
    border: 1px solid var(--a5);
    border-radius: var(--r1);
    background: var(--a3);
    font-family: var(--f3);
}

.buy-msg {
    margin: 0;
    padding: 10px 12px;
    border-left: 3px solid var(--a4);
    background: var(--a2);
    font-weight: 600;
}

.btn-buy {
    width: 100%;
    min-height: 56px;
    font-size: 1.05rem;
}

.pd-facts {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--a4);
}

.pd-facts li {
    padding: 8px 0 8px 22px;
    border-bottom: 1px dashed var(--a6);
    font-size: 0.92rem;
    position: relative;
}

.pd-facts li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: var(--g1);
}

.pd-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr);
}

.pd-grid > * {
    min-width: 0;
}

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

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

.pd-card {
    padding: 24px;
    background: var(--a3);
    border: 1px solid var(--a4);
    border-radius: var(--r1);
}

.pd-card-h {
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pd-comp {
    font-family: var(--f3);
    font-size: 0.92rem;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--a6);
}

.care-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.care-list li {
    padding: 6px 0 6px 20px;
    position: relative;
    font-size: 0.95rem;
}

.care-list li::before {
    content: "·";
    position: absolute;
    left: 4px;
    font-weight: 700;
    color: var(--g1);
}

.pd-note {
    margin: 12px 0 0;
    font-size: 0.9rem;
    color: var(--a5);
}

.pd-measure .m-table th,
.pd-measure .m-table td {
    padding: 8px 10px;
}

/* aviso breve tras añadir a la cesta */
.toast {
    position: fixed;
    top: calc(var(--hh) + 12px);
    right: 16px;
    z-index: 25;
    display: grid;
    gap: 6px;
    width: min(360px, calc(100% - 32px));
    padding: 14px 18px;
    background: var(--a4);
    color: var(--a3);
    border-radius: var(--r1);
}

.toast-text {
    margin: 0;
}

.toast-link {
    color: var(--a3);
    font-weight: 700;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.toast-link:hover,
.toast-link:focus-visible {
    color: var(--a3);
    text-decoration-thickness: 2px;
}

.toast :focus-visible {
    outline-color: var(--a3);
}

/* ---------- catálogo ---------- */
.flt-bar {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: var(--s4);
    padding-bottom: var(--s3);
    border-bottom: 1px dashed var(--a4);
}

.js .flt-bar {
    display: flex;
}

.flt-btn {
    min-height: 44px;
    padding: 8px 20px;
    border: 1px solid var(--a4);
    border-radius: 999px;
    background: var(--a3);
    font-weight: 600;
    cursor: pointer;
}

.flt-btn:hover {
    background: var(--a2);
}

.flt-btn[aria-pressed="true"] {
    background: var(--g1);
    border-color: var(--g1);
    color: var(--a3);
}

.cat-block + .cat-block {
    margin-top: var(--s5);
}

.cat-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    margin-bottom: var(--s3);
    padding-bottom: 14px;
    border-bottom: 1px solid var(--a4);
}

@media (min-width: 900px) {
    .cat-head {
        grid-template-columns: 240px minmax(0, 1fr) auto;
        align-items: baseline;
        gap: 24px;
    }
}

.cat-head h2 {
    margin: 0;
}

.cat-intro {
    margin: 0;
    color: var(--a5);
}

.cat-count {
    margin: 0;
    font-family: var(--f3);
    font-size: 0.8rem;
    color: var(--g1);
}

/* ---------- cesta y tramitación ---------- */
.cart-grid,
.co-grid,
.conf-grid {
    display: grid;
    gap: clamp(24px, 3vw, 40px);
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
}

@media (min-width: 960px) {
    .cart-grid,
    .co-grid,
    .conf-grid {
        grid-template-columns: minmax(0, 1fr) 360px;
    }

    .sum-card {
        position: sticky;
        top: calc(var(--hh) + 20px);
    }
}

.cart-lines {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--a4);
}

.cart-line {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 10px 18px;
    padding: 18px 0;
    border-bottom: 1px dashed var(--a4);
}

.cl-img img {
    width: 84px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: var(--r1);
    border: 1px solid var(--a6);
}

.cl-info p {
    margin: 0 0 4px;
}

.cl-name {
    font-family: var(--f1);
    font-weight: 800;
    font-size: 1.1rem;
    line-height: 1.2;
}

.cl-link {
    color: var(--a4);
    text-decoration: none;
}

.cl-link:hover {
    text-decoration: underline;
}

.cl-meta,
.cl-unit {
    font-size: 0.9rem;
    color: var(--a5);
}

.cl-qty,
.cl-total,
.cl-del {
    grid-column: 2;
}

.cl-qlabel {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.cl-total {
    margin: 0;
    font-family: var(--f3);
    font-weight: 700;
}

.cl-del {
    justify-self: start;
    min-height: 44px;
    padding: 6px 0;
    border: 0;
    background: none;
    color: var(--a4);
    text-decoration: underline;
    cursor: pointer;
}

.cl-del:hover {
    color: var(--g1);
}

@media (min-width: 700px) {
    .cart-line {
        grid-template-columns: 96px minmax(0, 1fr) auto 110px auto;
        align-items: center;
    }

    .cl-img img {
        width: 96px;
    }

    .cl-qty,
    .cl-total,
    .cl-del {
        grid-column: auto;
    }

    .cl-total {
        text-align: right;
    }
}

.cart-notice {
    margin-bottom: var(--s3);
    padding: 14px 16px;
    background: var(--a3);
    border: 1px dashed var(--a4);
}

.cart-notice p {
    margin: 0;
}

.sum-card {
    padding: 24px;
    background: var(--a3);
    border: 1px solid var(--a4);
    border-radius: var(--r1);
}

.sum-h {
    font-size: 1.2rem;
}

.sum-list {
    margin: 0 0 16px;
}

.sum-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--a6);
}

.sum-row dt {
    font-size: 0.95rem;
}

.sum-row dd {
    margin: 0;
    font-family: var(--f3);
    font-weight: 600;
    white-space: nowrap;
}

.sum-total {
    border-bottom: 0;
    border-top: 1px solid var(--a4);
    margin-top: 6px;
    padding-top: 12px;
}

.sum-total dt {
    font-weight: 700;
}

.sum-total dd {
    font-size: 1.2rem;
    font-weight: 700;
}

.sum-free {
    margin-bottom: 12px;
    padding: 8px 12px;
    background: var(--a2);
    font-size: 0.9rem;
}

.sum-ok {
    border-left: 3px solid var(--g1);
}

.sum-zone {
    font-size: 0.85rem;
    color: var(--a5);
}

.sum-card .btn-wide {
    margin-bottom: 8px;
}

.mini-lines {
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--a4);
}

.mini-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 12px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--a6);
    font-size: 0.9rem;
}

.mini-name {
    font-weight: 700;
}

.mini-meta {
    grid-row: 2;
    color: var(--a5);
}

.mini-sum {
    grid-row: 1 / span 2;
    grid-column: 2;
    align-self: center;
    font-family: var(--f3);
}

.empty-box {
    max-width: 680px;
    padding: clamp(24px, 4vw, 44px);
    background: var(--a3);
    border: 1px solid var(--a4);
    border-top: 6px solid var(--g1);
    border-radius: var(--r1);
}

.empty-soft {
    background: var(--a2);
    border-top-width: 1px;
    border-style: dashed;
}

.empty-big {
    font-family: var(--f1);
    font-weight: 800;
    font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem);
    line-height: 1.15;
}

.empty-acts {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.co-form {
    display: grid;
    gap: 16px;
}

.co-step {
    margin: 0;
    padding: clamp(20px, 3vw, 32px);
    background: var(--a3);
    border: 1px solid var(--a4);
    border-radius: var(--r1);
    min-width: 0;
}

.co-legend {
    float: left;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 0;
    font-family: var(--f1);
    font-weight: 800;
    font-size: 1.3rem;
    text-transform: uppercase;
}

.co-legend + * {
    clear: both;
}

.co-n {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: var(--a4);
    color: var(--a3);
    font-family: var(--f3);
    font-size: 1rem;
}

.fld-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 640px) {
    .fld-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .fld-wide {
        grid-column: 1 / -1;
    }
}

.zone-msg {
    margin: 16px 0 0;
    padding: 12px 14px;
    border: 2px solid var(--a4);
    background: var(--a2);
    font-weight: 600;
}

.zone-info {
    border-width: 1px;
    border-style: dashed;
    font-weight: 400;
}

.co-acts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
    margin-top: 20px;
}

.review-card {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr);
    padding: 18px;
    margin-bottom: 18px;
    background: var(--a2);
    border: 1px dashed var(--a4);
}

@media (min-width: 640px) {
    .review-card {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .review-card .btn {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

.review-k {
    margin: 0 0 6px;
    font-family: var(--f3);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--g1);
}

.review-v {
    margin: 0;
    overflow-wrap: anywhere;
}

.review-com {
    margin-top: 8px;
    color: var(--a5);
}

.pay-box {
    padding: 16px 18px;
    margin-bottom: 12px;
    border: 1px solid var(--a4);
    border-left: 6px solid var(--g1);
}

.pay-opt {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    position: relative;
}

.pay-opt span::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 10px;
    border-radius: 999px;
    border: 4px solid var(--g1);
    vertical-align: -2px;
}

.pay-note {
    margin: 8px 0 0;
    font-size: 0.9rem;
    color: var(--a5);
}

.co-form [data-confirm] {
    margin-top: 12px;
}

.stock-item {
    display: block;
}

/* confirmación y estado */
.conf-head {
    padding: 24px;
    margin-bottom: 20px;
    background: var(--a3);
    border: 1px solid var(--a4);
    border-top: 6px solid var(--g1);
}

.conf-big {
    font-family: var(--f1);
    font-weight: 800;
    font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem);
    margin-bottom: 8px;
}

.conf-num b {
    font-family: var(--f3);
    font-size: 1.2rem;
    padding: 2px 8px;
    background: var(--a2);
    border: 1px solid var(--a4);
}

.conf-cols {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    margin-bottom: var(--s4);
}

.conf-card {
    padding: 18px;
    background: var(--a3);
    border: 1px dashed var(--a4);
}

.conf-h {
    font-size: 1.4rem;
}

.status-card {
    padding: 24px;
    background: var(--a3);
    border: 1px solid var(--a4);
    border-top: 6px solid var(--g1);
}

.status-big {
    font-family: var(--f1);
    font-weight: 800;
    font-size: 1.8rem;
    line-height: 1.1;
}

.track {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
    border: 1px solid var(--a4);
}

.track-step {
    padding: 10px 8px;
    font-size: 0.8rem;
    line-height: 1.25;
    border-right: 1px solid var(--a6);
    color: var(--a5);
}

.track-step:last-child {
    border-right: 0;
}

.track-step.done {
    background: var(--a2);
    color: var(--a4);
}

.track-step.now {
    background: var(--g1);
    color: var(--a3);
    font-weight: 700;
}

/* ---------- páginas legales ---------- */
.doc-wrap {
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 960px) {
    .doc-wrap {
        grid-template-columns: 240px minmax(0, 1fr);
        align-items: start;
    }

    .doc-toc {
        position: sticky;
        top: calc(var(--hh) + 20px);
    }
}

.doc-toc {
    padding: 18px;
    border: 1px solid var(--a4);
    background: var(--a2);
}

.doc-toc-h {
    font-family: var(--f3);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--a5);
}

.doc-toc-list {
    margin: 0;
    padding-left: 1.6em;
    font-size: 0.92rem;
}

.doc-toc-list a {
    display: inline-block;
    padding: 6px 0;
    min-height: 32px;
}

.doc-body {
    display: grid;
    gap: 20px;
    min-width: 0;
}

.doc-card {
    min-width: 0;
    padding: clamp(20px, 3vw, 32px);
    background: var(--a3);
    border: 1px solid var(--a4);
    border-radius: var(--r1);
    scroll-margin-top: calc(var(--hh) + 16px);
}

.doc-card:nth-child(even) {
    background: var(--a1);
}

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

.doc-h {
    display: flex;
    align-items: baseline;
    gap: 12px;
    font-size: 1.3rem;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--a6);
}

.doc-n {
    font-family: var(--f3);
    font-size: 0.9rem;
    color: var(--g1);
}

.doc-list,
.doc-steps {
    padding-left: 1.3em;
}

.doc-list > li,
.doc-steps > li {
    margin-bottom: 8px;
}

.form-model {
    padding: 18px 20px;
    background: var(--a2);
    border: 1px dashed var(--a4);
    font-family: var(--f3);
    font-size: 0.9rem;
}

.form-model p {
    margin-bottom: 10px;
}

.ck-box {
    padding: 18px;
    margin-bottom: 16px;
    background: var(--a2);
    border-left: 6px solid var(--g1);
}

/* ---------- revelado al hacer scroll ---------- */
.js [data-rv].pend {
    opacity: 0;
    translate: 0 18px;
    transition: opacity 0.5s ease, translate 0.5s ease;
}

.js [data-rv].pend.entered {
    opacity: 1;
    translate: 0 0;
}

/* ---------- aviso de cookies: tarjeta en la esquina inferior izquierda ---------- */
.notice-consent {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 15; /* por debajo de la cabecera (20) y del menú móvil */
    width: min(360px, calc(100% - 32px));
    padding: 16px 18px;
    background: var(--a3);
    color: var(--a4);
    border: 1px solid var(--a4);
    border-radius: var(--r1);
}

.consent-text {
    margin: 0 0 12px;
    font-size: 0.88rem;
    line-height: 1.45;
}

.consent-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.consent-btn {
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid var(--a4);
    border-radius: 999px;
    background: var(--a3);
    color: var(--a4);
    font-weight: 700;
    cursor: pointer;
}

.consent-btn:hover {
    background: var(--a4);
    color: var(--a3);
}

@media (max-width: 699px) {
    .notice-consent {
        left: 0;
        right: 0;
        bottom: 0;
        width: auto;
        padding: 12px 16px;
        border-width: 1px 0 0;
        border-radius: 0;
    }

    .consent-text {
        font-size: 0.82rem;
        margin-bottom: 10px;
    }
}

/* celda final de la guía: enlace al cálculo de largo */
.cut-more {
    display: grid;
    align-content: start;
    gap: 12px;
    background: var(--a4);
    color: var(--a3);
    text-decoration: none;
}

.cut-more .cut-n {
    color: var(--g4);
}

.cut-more-h {
    font-family: var(--f1);
    font-weight: 800;
    font-size: 1.5rem;
    text-transform: uppercase;
}

.cut-more-p {
    color: var(--a6);
}

.cut-more-k {
    justify-self: start;
    padding: 10px 22px;
    border: 1px solid var(--a3);
    border-radius: 999px;
    font-weight: 700;
}

.cut-more:hover,
.cut-more:focus-visible {
    background: var(--g1);
    color: var(--a3);
    outline-color: var(--a3);
}

/* ficha en móvil: título, precio y botón antes de la foto y por encima del aviso de cookies */
@media (max-width: 699px) {
    .pd {
        padding-top: 8px;
        gap: 20px;
    }

    .pd-crumb a {
        padding: 6px 0;
    }

    .pd-title {
        font-size: 1.55rem;
    }

    .pd-color {
        margin-bottom: 6px;
    }

    .pd-price {
        padding: 6px 0;
    }

    .pd-amount {
        font-size: 1.4rem;
    }

    .buy-form {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 12px;
        margin: 12px 0;
    }

    .size-set,
    .buy-msg {
        grid-column: 1 / -1;
    }

    .size-legend {
        margin-bottom: 6px;
    }

    .size-row {
        gap: 4px;
    }

    .size-n {
        min-width: 42px;
        height: 44px;
        padding: 0 6px;
    }

    .qty-row {
        grid-column: 1;
        grid-row: 2;
    }

    .qty-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    .btn-buy {
        grid-column: 2;
        grid-row: 2;
        min-height: 48px;
        padding: 10px 16px;
    }
}

/* pasos de la confirmación: cuatro columnas estrechas */
.step-line {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
}

.js .calc-out {
    display: block;
}

.hc-all {
    background: var(--a2);
}

.cut-soon {
    margin: 0;
    padding: 8px 12px;
    border: 1px dashed var(--a6);
    font-family: var(--f3);
    font-size: 0.8rem;
    color: var(--a5);
}
