/* ============================================================
   MARIE — Sistema de diseño
   Minimalismo zen: pasteles suaves, mucho aire, casi sin bordes.
   Tipografía: DM Sans
   ============================================================ */

:root {
    --paper: #F9F9F7;
    --surface: #FEFEFC;
    --ink: #4A4A4A;
    --ink-soft: #9A9A95;
    --line-soft: rgba(74, 74, 74, 0.12);
    --accent: #A3B18A;
    --accent-dark: #8FA07A;
    --accent-ink: rgba(163, 177, 138, 0.35);
    --secondary: #E8DCC8;
    --secondary-dark: #C9BAA4;
    --stock: #C9927E;
    --stamp: #C9927E;
    --ok: #8FA882;

    --font-display: 'DM Sans', system-ui, sans-serif;
    --font-text: 'DM Sans', system-ui, sans-serif;
    --font-serif: 'Cormorant Garamond', Georgia, serif;

    --radius-img: 16px;
    --radius: 8px;
    --border: 1px;

    --catalog-sidebar: 280px;
    --grid-gap: 1.75rem;
    --layout-max: 1580px;

    --speed: 220ms;
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ---------- Base ---------- */

html, body {
    font-family: var(--font-text);
    background-color: var(--paper);
    color: var(--ink);
    font-size: 16px;
    line-height: 1.5;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
}

.site-header .container.container--wide,
main.container.container--wide {
    width: 100%;
    max-width: min(var(--layout-max), calc(100vw - 3.5rem));
    margin-left: auto;
    margin-right: auto;
    padding-left: clamp(1.25rem, 2.5vw, 2.75rem);
    padding-right: clamp(1.25rem, 2.5vw, 2.75rem);
}

.container--wide {
    max-width: min(var(--layout-max), calc(100vw - 3.5rem));
    padding-left: clamp(1.25rem, 2.5vw, 2.75rem);
    padding-right: clamp(1.25rem, 2.5vw, 2.75rem);
}

@media (max-width: 576px) {
    .container--wide {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

::selection {
    background: var(--accent);
    color: var(--ink);
}

h1, h2, h3, .display-title {
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.25;
    color: var(--accent-dark);
    text-transform: lowercase;
}

h1 { font-size: clamp(1.75rem, 3.5vw, 2.25rem); }
h2 { font-size: clamp(1.35rem, 2.5vw, 1.65rem); }
h3 { font-size: 0.95rem; font-weight: 500; color: var(--ink); }
h1:focus { outline: none; }

a {
    color: var(--accent-dark);
    text-decoration: none;
    transition: color var(--speed) var(--ease);
}

a:hover { color: var(--ink); }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: var(--radius);
}

.kicker {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--accent-dark);
    margin-bottom: 0.6rem;
}

.lead {
    color: var(--ink-soft);
    font-size: 1.05rem;
    font-weight: 400;
    max-width: 48ch;
    line-height: 1.65;
}

.text-muted { color: var(--ink-soft) !important; }
.text-primary { color: var(--accent-dark) !important; }
.text-success { color: var(--ok) !important; }
.text-danger { color: var(--stamp) !important; }

/* ---------- Header (logo · nav centrada · iconos) ---------- */

.site-header {
    background: var(--paper);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 72px;
    padding: 1.25rem 0;
}

.brand {
    justify-self: start;
    text-decoration: none;
    color: var(--ink);
}

.brand:hover { color: var(--ink); opacity: 0.75; }

.brand__name {
    font-size: 1.0625rem;
    font-weight: 300;
    letter-spacing: 0.04em;
    text-transform: lowercase;
    line-height: 1;
}

.brand__tag { display: none; }

.site-nav--center {
    justify-self: center;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-tab {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0;
    font-size: 0.9375rem;
    font-weight: 300;
    text-decoration: none;
    color: var(--ink-soft);
    text-transform: lowercase;
    letter-spacing: 0.01em;
    transition: color var(--speed) var(--ease);
}

.nav-tab:hover { color: var(--ink); background: transparent; }

.nav-tab.active {
    color: var(--ink);
    box-shadow: inset 0 -1px 0 var(--accent);
}

.site-tools {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 1.375rem;
}

.site-tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-soft);
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    position: relative;
    transition: color var(--speed) var(--ease);
}

.site-tool:hover { color: var(--ink); }

.site-tool--btn,
.site-tool__label {
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 300;
    text-transform: lowercase;
    color: inherit;
}

.site-tool__icon {
    width: 24px;
    height: 24px;
    display: block;
}

.site-tool--cart { position: relative; }

.site-tool__badge {
    position: absolute;
    top: -6px;
    right: -10px;
    min-width: 1.125rem;
    height: 1.125rem;
    padding: 0 0.3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 500;
    line-height: 1;
    color: var(--ink);
    background: var(--accent);
    border-radius: 999px;
    pointer-events: none;
}

.site-tool__badge--empty {
    background: transparent;
    color: var(--ink-soft);
    font-weight: 400;
    min-width: 0;
    height: auto;
    padding: 0;
    top: -5px;
    right: -8px;
}

.site-tool__badge--pulse {
    animation: badge-pop 320ms var(--ease);
}

@keyframes badge-pop {
    0% { transform: scale(0.6); opacity: 0.5; }
    60% { transform: scale(1.12); }
    100% { transform: scale(1); opacity: 1; }
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 300;
    color: var(--ink);
    text-transform: lowercase;
    cursor: pointer;
    justify-self: end;
}

@media (max-width: 860px) {
    .site-header__inner {
        grid-template-columns: 1fr auto;
        gap: 1rem;
    }

    .nav-toggle { display: inline-flex; }

    .site-nav--center {
        display: none;
        grid-column: 1 / -1;
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.5rem 0 1rem;
    }

    .site-nav--center.open { display: flex; }

    .site-tools {
        display: none;
        grid-column: 1 / -1;
        justify-content: flex-end;
        padding-bottom: 0.5rem;
    }

    .site-tools.open { display: flex; }
}


/* ---------- Footer ---------- */

.site-footer {
    border-top: none;
    background: transparent;
    margin-top: 5rem;
}

.site-footer__inner {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 3rem 0 2rem;
    font-size: 0.72rem;
    color: var(--ink-soft);
    text-transform: lowercase;
    letter-spacing: 0.06em;
}

/* ---------- Botones ---------- */

.btn {
    font-family: var(--font-text);
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0;
    text-transform: none;
    border-radius: var(--radius);
    border-width: var(--border);
    padding: 0.55rem 1.25rem;
    transition: background-color var(--speed) var(--ease),
                color var(--speed) var(--ease),
                border-color var(--speed) var(--ease),
                box-shadow var(--speed) var(--ease);
}

.btn:active { transform: none; }

.btn-lg { font-size: 0.95rem; padding: 0.7rem 1.5rem; }
.btn-sm { font-size: 0.8rem; padding: 0.35rem 0.85rem; }

.btn-primary,
.btn-success {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--ink);
}

.btn-primary:hover, .btn-primary:focus,
.btn-success:hover, .btn-success:focus {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: var(--ink);
    box-shadow: var(--shadow);
}

.btn-primary:disabled, .btn-success:disabled {
    background: var(--secondary);
    border-color: var(--secondary);
    color: var(--ink-soft);
    opacity: 0.7;
}

.btn-outline-primary, .btn-outline-secondary, .btn-secondary {
    background: transparent;
    border-color: var(--line-soft);
    color: var(--ink);
}

.btn-outline-primary:hover, .btn-outline-primary:focus,
.btn-outline-secondary:hover, .btn-outline-secondary:focus,
.btn-secondary:hover, .btn-secondary:focus {
    background: var(--surface);
    border-color: var(--accent);
    color: var(--ink);
    box-shadow: var(--shadow);
}

.btn-outline-danger, .btn-danger {
    background: transparent;
    border-color: rgba(201, 149, 138, 0.4);
    color: var(--stamp);
}

.btn-outline-danger:hover, .btn-outline-danger:focus,
.btn-danger:hover, .btn-danger:focus {
    background: rgba(201, 149, 138, 0.12);
    border-color: var(--stamp);
    color: var(--stamp);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus,
.form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 3px var(--accent-ink);
}

/* ---------- Formularios ---------- */

.form-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--ink-soft);
    margin-bottom: 0.4rem;
}

.form-control, .form-select {
    background: var(--surface);
    border: var(--border) solid var(--line-soft);
    border-radius: var(--radius);
    color: var(--ink);
    padding: 0.6rem 0.85rem;
}

.form-control::placeholder { color: var(--ink-soft); opacity: 0.6; }

.form-control:focus, .form-select:focus {
    background: var(--surface);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-ink);
    color: var(--ink);
}

.valid.modified:not([type=checkbox]) { outline: 1px solid var(--ok); }
.invalid { outline: 1px solid var(--stamp); }

.validation-message {
    color: var(--stamp);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.validation-errors {
    list-style: none;
    padding: 0.75rem 1rem;
    margin: 0 0 1rem;
    border: var(--border) solid rgba(201, 149, 138, 0.3);
    border-radius: var(--radius);
    background: rgba(201, 149, 138, 0.06);
}

.validation-errors .validation-message { margin: 0; }

/* ---------- Tarjeta de producto ---------- */

.ficha {
    display: flex;
    flex-direction: column;
    background: transparent;
}

.ficha__head { display: none; }

.ficha__media {
    display: block;
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-img);
    overflow: hidden;
    margin-bottom: 0.875rem;
}

.ficha__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 500ms var(--ease);
}

.ficha:hover .ficha__media img { transform: scale(1.02); }

.ficha__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(249, 249, 247, 0.55);
    font-size: 0.75rem;
    font-weight: 300;
    color: var(--stock);
    text-transform: lowercase;
}

.ficha__body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0;
}

.ficha__name {
    font-size: 0.9375rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.35;
    text-transform: lowercase;
}

.ficha__name a {
    color: var(--ink);
    text-decoration: none;
}

.ficha__name a:hover { color: var(--ink); opacity: 0.7; }

.ficha__desc {
    font-size: 0.8125rem;
    color: var(--ink-soft);
    margin: 0 0 0.4rem;
    line-height: 1.45;
    font-weight: 300;
    text-transform: lowercase;
}

.ficha__meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    margin-top: 0.1rem;
}

.ficha__price {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--ink);
}

.ficha__stock {
    font-size: 0.8125rem;
    font-weight: 300;
    color: var(--stock);
    text-transform: lowercase;
    white-space: nowrap;
}

.ficha__stock--out { opacity: 0.85; }

.ficha__foot { display: none; }

.tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--ink-soft);
    background: var(--secondary);
    border: none;
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
}

.stamp {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--stamp);
    background: rgba(201, 149, 138, 0.12);
    border: none;
    border-radius: 999px;
    padding: 0.25rem 0.7rem;
    transform: none;
}

.stamp--ok {
    color: var(--ok);
    background: rgba(143, 168, 130, 0.15);
}

.stamp--overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.85rem;
    padding: 0.45rem 1rem;
    backdrop-filter: blur(4px);
    box-shadow: var(--shadow);
}

.stock-note {
    font-size: 0.72rem;
    color: var(--ink-soft);
    font-weight: 300;
    text-transform: lowercase;
}

.stock-note--low { color: var(--stamp); }

/* Precio en listados (carrito, checkout) */
.ledger {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
}

.ledger__label { display: none; }
.ledger__dots { display: none; }

.ledger__value {
    font-weight: 500;
    font-size: 1rem;
    color: var(--accent-dark);
    font-variant-numeric: tabular-nums;
}

.ledger--big .ledger__value { font-size: 1.5rem; }
.ledger--total .ledger__value { color: var(--ink); font-weight: 500; }

/* ---------- Layout catálogo (sidebar + grilla 4 col) ---------- */

.catalog-layout {
    display: grid;
    grid-template-columns: var(--catalog-sidebar) 1fr;
    gap: 0 3.5rem;
    align-items: start;
    padding-bottom: 4rem;
}

.catalog-layout__sidebar {
    position: sticky;
    top: 88px;
}

.catalog-layout__main {
    min-width: 0;
}

.catalog-layout__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--grid-gap);
}

.catalog-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3rem;
    padding-top: 1rem;
}

.catalog-pagination__btn {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 300;
    color: var(--ink-soft);
    text-transform: lowercase;
    cursor: pointer;
    padding: 0;
}

.catalog-pagination__btn:hover:not(:disabled) { color: var(--ink); }

.catalog-pagination__btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.catalog-pagination__info {
    font-size: 0.75rem;
    color: var(--ink-soft);
    font-weight: 300;
}

@media (max-width: 1100px) {
    .catalog-layout__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 860px) {
    .catalog-layout {
        grid-template-columns: 1fr;
        gap: 2rem 0;
    }

    .catalog-layout__sidebar {
        position: static;
    }

    .catalog-layout__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .catalog-layout__grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Sidebar del catálogo ---------- */

.catalog-sidebar {
    padding-top: 0.25rem;
}

.catalog-sidebar__title {
    font-size: clamp(2rem, 2.8vw, 2.625rem);
    font-weight: 400;
    color: var(--accent);
    text-transform: lowercase;
    margin: 0 0 2.25rem;
    line-height: 1.08;
    letter-spacing: -0.02em;
}

.catalog-sidebar__search {
    margin-bottom: 1.75rem;
}

.catalog-sidebar__search .form-control {
    background: transparent;
    border: none;
    border-bottom: var(--border) solid var(--line-soft);
    border-radius: 0;
    padding: 0.35rem 0;
    font-size: 0.75rem;
    font-weight: 300;
}

.catalog-sidebar__search .form-control:focus {
    box-shadow: none;
    border-color: var(--accent);
}

/* ---------- Categorías (lista lateral) ---------- */

.pasillos { border-top: none; }

.pasillo,
button.pasillo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    padding: 0.75rem 0;
    border: none;
    background: none;
    text-decoration: none;
    color: var(--ink);
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    text-align: left;
    transition: color var(--speed) var(--ease);
}

.pasillo__num {
    font-size: 1rem;
    font-weight: 300;
    color: var(--accent);
    min-width: 1.5rem;
    flex-shrink: 0;
}

.pasillo__name {
    font-size: 1rem;
    font-weight: 300;
    text-transform: lowercase;
    white-space: nowrap;
    color: var(--ink);
}

.pasillo.active .pasillo__name,
button.pasillo.active .pasillo__name {
    color: var(--accent-dark);
    font-weight: 400;
}

.pasillo__line {
    flex: 1;
    height: 1px;
    background: var(--line-soft);
    min-width: 0.75rem;
    margin: 0 0.25rem;
}

.pasillo__arrow {
    font-size: 0.875rem;
    font-weight: 300;
    color: var(--ink-soft);
    flex-shrink: 0;
    opacity: 0.55;
}

.pasillo--cat {
    padding-left: 1.25rem;
}

.pasillo--cat .pasillo__name {
    font-size: 0.96875rem;
}

.pasillo--cat.active .pasillo__name,
button.pasillo--cat.active .pasillo__name {
    color: var(--accent-dark);
}

.pasillo--sub {
    padding-left: 1.75rem;
}

.pasillo--sub .pasillo__name {
    font-size: 0.9375rem;
    color: var(--ink-soft);
}

.pasillo--sub.active .pasillo__name,
button.pasillo--sub.active .pasillo__name {
    color: var(--accent-dark);
}

/* ---------- Hero ---------- */

.hero--zen {
    position: relative;
    text-align: center;
    padding: 3.5rem 1.5rem 4.25rem;
    margin: 0 auto;
    overflow: hidden;
}

.hero--zen::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(820px, 95vw);
    height: min(820px, 95vw);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(163, 177, 138, 0.16) 0%, rgba(163, 177, 138, 0.05) 45%, transparent 70%);
    pointer-events: none;
}

.hero__tagline {
    position: relative;
    z-index: 1;
    font-family: var(--font-serif);
    font-size: clamp(1.125rem, 1.6vw, 1.375rem);
    font-weight: 300;
    font-style: italic;
    color: var(--ink-soft);
    line-height: 1.55;
    margin: 0 auto;
    max-width: 32rem;
    text-transform: lowercase;
}

.hero__data { display: none; }

.page-prose {
    max-width: 36rem;
    margin: 0 auto 5rem;
    padding: 0 0.5rem;
}

.page-prose h1 {
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
}

.page-prose .lead {
    font-size: 0.9375rem;
    font-weight: 300;
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin: 3rem 0 1.5rem;
    flex-wrap: wrap;
}

.section-head h2 { margin: 0; }

.section-head__note {
    font-size: 0.8rem;
    color: var(--ink-soft);
}

/* ---------- Filtros ---------- */

.consulta {
    background: var(--surface);
    border: none;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 88px;
}

.consulta__title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-dark);
    border-bottom: var(--border) solid var(--line-soft);
    padding-bottom: 0.65rem;
    margin-bottom: 1rem;
}

/* ---------- Detalle de producto (opción 1 · continuidad catálogo) ---------- */

.detalle {
    padding: 0.5rem 0 4rem;
}

.detalle--enter {
    animation: ficha-enter 520ms var(--ease) both;
}

.detalle__crumb {
    font-size: 0.8125rem;
    font-weight: 300;
    color: var(--ink-soft);
    margin-bottom: 1.25rem;
    text-transform: lowercase;
}

.detalle__crumb a {
    color: var(--ink-soft);
    text-decoration: none;
    transition: color var(--speed) var(--ease);
}

.detalle__crumb a:hover { color: var(--ink); }

.detalle__crumb-sep {
    margin: 0 0.35rem;
    opacity: 0.5;
}

.detalle__layout {
    display: grid;
    grid-template-columns: minmax(240px, 480px) minmax(0, 1fr);
    gap: clamp(2rem, 4.5vw, 4.5rem);
    align-items: center;
}

.detalle__media-col {
    display: flex;
    justify-content: center;
    width: 100%;
}

.detalle__gallery {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0.75rem;
    width: 100%;
    max-width: 480px;
}

.detalle__thumbs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 0 0 72px;
    width: 72px;
    align-items: flex-start;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
}

.detalle__gallery .detalle__media {
    max-width: none;
}

.detalle__media--main {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    aspect-ratio: 1 / 1;
    align-self: flex-start;
}

.detalle__media {
    position: relative;
    width: 100%;
    max-width: 420px;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-img);
    overflow: hidden;
}

.detalle__gallery .detalle__media--thumb {
    width: 72px;
    height: 72px;
    min-width: 72px;
    min-height: 72px;
    max-width: 72px;
    max-height: 72px;
    flex: none;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color var(--speed) var(--ease), opacity var(--speed) var(--ease);
}

.detalle__gallery .detalle__media--thumb:hover {
    border-color: var(--line-soft);
    opacity: 0.92;
}

.detalle__gallery .detalle__media--thumb.is-active {
    border-color: var(--ink, #222);
}

.detalle__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.detalle__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(249, 249, 247, 0.55);
    font-size: 0.875rem;
    font-weight: 300;
    color: var(--stock);
    text-transform: lowercase;
}

.detalle__info {
    padding-top: 0;
    max-width: 34rem;
    display: flex;
    flex-direction: column;
}

.detalle__tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--ink-soft);
    background: rgba(232, 220, 200, 0.55);
    border-radius: 999px;
    padding: 0.3rem 0.75rem;
    text-decoration: none;
    text-transform: lowercase;
    margin-bottom: 0.875rem;
    align-self: flex-start;
    transition: background-color var(--speed) var(--ease);
}

.detalle__tag:hover {
    background: rgba(232, 220, 200, 0.85);
    color: var(--ink);
}

.detalle__title {
    font-family: var(--font-display);
    font-size: clamp(1.625rem, 2.5vw, 2rem);
    font-weight: 400;
    color: var(--accent-dark);
    text-transform: lowercase;
    line-height: 1.15;
    margin: 0 0 0.625rem;
    letter-spacing: -0.02em;
}

.detalle__desc {
    font-size: 0.875rem;
    font-weight: 300;
    color: var(--ink-soft);
    line-height: 1.55;
    margin: 0 0 1.25rem;
    max-width: 38ch;
    text-transform: lowercase;
}

.detalle__price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1.125rem;
    border-bottom: var(--border) solid var(--line-soft);
    margin-bottom: 0;
}

.detalle__price {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--ink);
}

.detalle__stock {
    font-size: 0.8125rem;
    font-weight: 300;
    color: var(--stock);
    text-transform: lowercase;
    white-space: nowrap;
}

.detalle__specs {
    margin: 0 0 0.25rem;
    padding: 0;
}

.detalle__spec {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: var(--border) solid var(--line-soft);
}

.detalle__spec dt {
    font-size: 0.8125rem;
    font-weight: 300;
    color: var(--ink-soft);
    text-transform: lowercase;
    margin: 0;
}

.detalle__spec dd {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--ink);
    text-transform: lowercase;
    margin: 0;
    text-align: right;
}

.detalle__spec dd a {
    color: var(--ink);
    text-decoration: none;
}

.detalle__spec dd a:hover { color: var(--accent-dark); }

.detalle__qty {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.detalle__qty-label {
    font-size: 0.8125rem;
    font-weight: 300;
    color: var(--ink-soft);
    text-transform: lowercase;
    margin: 0;
    white-space: nowrap;
}

.detalle__qty-input {
    width: 3.75rem;
    text-align: center;
    border: var(--border) solid var(--line-soft);
    border-radius: var(--radius);
    background: var(--surface);
    font-size: 0.875rem;
    font-weight: 400;
    padding: 0.5rem 0.35rem;
}

.detalle__qty-input:focus {
    border-color: var(--accent);
    box-shadow: none;
}

.detalle__message {
    font-size: 0.8125rem;
    color: var(--stamp);
    margin: 0.75rem 0 0;
}

.detalle__purchase {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-top: 2.5rem;
    padding-top: 0.25rem;
    flex-wrap: wrap;
}

.detalle__btn {
    text-transform: lowercase;
    font-weight: 400;
    font-size: 0.875rem;
    padding: 0.625rem 1.5rem;
    flex: 1 1 12rem;
    min-width: 10rem;
    max-width: 100%;
}

.detalle__back {
    font-size: 0.8125rem;
    font-weight: 300;
    color: var(--ink-soft);
    text-decoration: none;
    text-transform: lowercase;
    margin-top: 1.75rem;
    transition: color var(--speed) var(--ease);
}

.detalle__back:hover { color: var(--ink); }

/* Skeleton detalle */
.detalle--loading .skeleton--crumb { width: 10rem; height: 0.75rem; margin-bottom: 1.25rem; }
.detalle--loading .detalle__media { max-width: 420px; aspect-ratio: 1 / 1; border-radius: var(--radius-img); }
.detalle--loading .skeleton--tag { width: 5rem; height: 1.5rem; border-radius: 999px; margin-bottom: 0.875rem; }
.detalle--loading .skeleton--title { width: 70%; height: 1.75rem; margin-bottom: 0.75rem; }
.detalle--loading .skeleton--desc { width: 85%; margin-bottom: 1.25rem; }
.detalle--loading .detalle__price-row { border-bottom: none; padding-bottom: 0; }
.detalle--loading .skeleton--price { width: 6rem; }
.detalle--loading .skeleton--stock { width: 4rem; }

@media (max-width: 860px) {
    .detalle__layout {
        grid-template-columns: 1fr;
        gap: 2rem;
        align-items: start;
    }

    .detalle__media-col {
        justify-content: flex-start;
    }

    .detalle__media {
        max-width: min(420px, 100%);
    }

    .detalle__gallery {
        max-width: min(480px, 100%);
    }

    .detalle__info { max-width: none; }

    .detalle__purchase {
        flex-direction: column;
        align-items: stretch;
    }

    .detalle__btn { flex: 1 1 auto; width: 100%; }
}

.breadcrumb-archivo {
    font-size: 0.8rem;
    color: var(--ink-soft);
    margin-bottom: 1.5rem;
}

.breadcrumb-archivo a { color: var(--ink-soft); }
.breadcrumb-archivo a:hover { color: var(--accent-dark); }

.spec-table {
    width: 100%;
    border-top: var(--border) solid var(--line-soft);
    margin: 1.5rem 0;
}

.spec-table td {
    padding: 0.6rem 0;
    border-bottom: var(--border) solid var(--line-soft);
    font-size: 0.9rem;
}

.spec-table td:first-child {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--ink-soft);
    width: 38%;
}

.qty-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

/* ---------- Tablas ---------- */

.table {
    color: var(--ink);
    border-color: var(--line-soft);
    background: transparent;
}

.table thead th {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--ink-soft);
    border-bottom: var(--border) solid var(--line-soft);
    background: transparent;
    padding-bottom: 0.75rem;
}

.table tbody td {
    border-bottom: var(--border) solid var(--line-soft);
    vertical-align: middle;
    background: transparent;
    padding: 1rem 0.5rem;
}

.table tfoot th {
    border-top: var(--border) solid var(--line-soft);
    border-bottom: none;
    background: transparent;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-accent-bg: rgba(184, 201, 168, 0.06);
    color: var(--ink);
}

.table-hover > tbody > tr:hover > * {
    --bs-table-accent-bg: rgba(184, 201, 168, 0.1);
    color: var(--ink);
}

.mono-num {
    font-variant-numeric: tabular-nums;
    font-size: 0.9rem;
}

/* ---------- Tarjetas ---------- */

.card {
    background: var(--surface);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    background: rgba(184, 201, 168, 0.2);
    color: var(--ink);
    font-size: 0.85rem;
    font-weight: 500;
    border-bottom: var(--border) solid var(--line-soft);
    border-radius: 0 !important;
}

.list-group-item {
    background: transparent;
    border-color: var(--line-soft);
    border-style: solid;
    color: var(--ink);
}

/* ---------- Alertas ---------- */

.alert {
    border-radius: var(--radius);
    border: none;
    background: var(--surface);
    box-shadow: var(--shadow);
    color: var(--ink);
    font-size: 0.9rem;
}

.alert-danger {
    background: rgba(201, 149, 138, 0.1);
    color: var(--stamp);
}

.alert-warning { background: rgba(232, 220, 200, 0.5); }
.alert-info { background: rgba(184, 201, 168, 0.15); color: var(--ink); }
.alert-success { background: rgba(143, 168, 130, 0.12); color: var(--ok); }

/* ---------- Estados vacíos ---------- */

.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    margin-top: 2rem;
}

.empty-state--flat {
    padding: 3rem 0;
}

.empty-state__glyph { display: none; }

.empty-state__title {
    font-size: 1rem;
    font-weight: 400;
    color: var(--accent-dark);
    text-transform: lowercase;
    margin-bottom: 0.4rem;
}

.empty-state p {
    color: var(--ink-soft);
    max-width: 40ch;
    margin: 0 auto 1.5rem;
    font-size: 0.95rem;
}

/* ---------- Carga y skeleton ---------- */

.skeleton {
    background: linear-gradient(
        90deg,
        rgba(232, 220, 200, 0.45) 0%,
        rgba(249, 249, 247, 0.95) 45%,
        rgba(232, 220, 200, 0.45) 90%
    );
    background-size: 220% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.skeleton--media {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-img);
}

.skeleton--line {
    height: 0.75rem;
    border-radius: 999px;
}

.skeleton--title { width: 68%; margin-bottom: 0.45rem; }
.skeleton--desc { width: 52%; height: 0.625rem; margin-bottom: 0.65rem; }
.skeleton--price { width: 38%; }
.skeleton--stock { width: 28%; }

.ficha--skeleton .ficha__meta {
    margin-top: 0.15rem;
}

.ficha--skeleton .ficha__media {
    margin-bottom: 0.875rem;
}

@keyframes skeleton-shimmer {
    0% { background-position: 120% 0; }
    100% { background-position: -120% 0; }
}

.ficha--enter {
    opacity: 0;
    animation: ficha-enter 520ms var(--ease) forwards;
    animation-delay: var(--enter-delay, 0ms);
}

.catalog-pagination--enter {
    opacity: 0;
    animation: ficha-enter 480ms var(--ease) 360ms forwards;
}

@keyframes ficha-enter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loading-note {
    font-size: 0.85rem;
    color: var(--ink-soft);
    padding: 4rem 0;
    text-align: center;
    text-transform: lowercase;
    font-weight: 300;
}

.loading-note::after {
    content: "…";
    animation: loading-dots 1.2s steps(4, end) infinite;
}

@keyframes loading-dots {
    0% { content: ""; }
    25% { content: "."; }
    50% { content: ".."; }
    75% { content: "..."; }
}

/* ---------- Paginación ---------- */

.pagination { gap: 0.35rem; }

.pagination--minimal .page-link {
    border: none;
    background: transparent;
    color: var(--ink-soft);
    font-size: 0.82rem;
    text-transform: lowercase;
    padding: 0.35rem 0.5rem;
}

.pagination--minimal .page-link:hover {
    background: transparent;
    color: var(--accent-dark);
    border: none;
}

.btn-link {
    color: var(--accent-dark);
    text-decoration: none;
    text-transform: lowercase;
    font-weight: 400;
}

.btn-link:hover { color: var(--ink); }

.page-link {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--ink-soft);
    background: var(--surface);
    border: var(--border) solid var(--line-soft);
    border-radius: var(--radius) !important;
    padding: 0.45rem 0.85rem;
}

.page-link:hover {
    background: rgba(184, 201, 168, 0.2);
    color: var(--ink);
    border-color: var(--accent);
}

.page-item.disabled .page-link {
    color: var(--ink-soft);
    opacity: 0.5;
    background: transparent;
    border-color: var(--line-soft);
}

/* ---------- Modal ---------- */

.modal-content {
    background: var(--surface);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-hover);
}

.modal-header { border-bottom: var(--border) solid var(--line-soft); }

.modal-title {
    font-weight: 500;
    font-size: 1rem;
}

.modal-footer { border-top: var(--border) solid var(--line-soft); }

/* ---------- Admin ---------- */

.admin-head { margin-bottom: 0.5rem; }

.admin-tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: var(--border) solid var(--line-soft);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.admin-tabs a,
.admin-tabs__link {
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 400;
    text-decoration: none;
    color: var(--ink-soft);
    padding: 0.55rem 1rem;
    border: none;
    background: transparent;
    border-radius: var(--radius) var(--radius) 0 0;
    cursor: pointer;
    transition: color var(--speed) var(--ease), background var(--speed) var(--ease);
}

.admin-tabs a:hover,
.admin-tabs__link:hover { color: var(--ink); }

.admin-tabs a.active,
.admin-tabs__link.active {
    color: var(--ink);
    background: rgba(184, 201, 168, 0.2);
    box-shadow: inset 0 -2px 0 var(--accent);
}

.expediente {
    background: var(--surface);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.expediente__toggle {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 1rem 1.15rem;
    cursor: pointer;
    color: var(--ink);
    font-size: 0.875rem;
    flex-wrap: wrap;
}

.expediente__toggle:hover { background: rgba(184, 201, 168, 0.08); }

.expediente__id { font-weight: 500; color: var(--accent-dark); }
.expediente__meta { color: var(--ink-soft); margin-left: auto; }

.expediente__body {
    border-top: var(--border) solid var(--line-soft);
    padding: 1rem 1.15rem;
}

/* ---------- Animación ---------- */

.reveal {
    animation: reveal-up 500ms var(--ease) both;
}

@keyframes reveal-up {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .ficha--enter,
    .catalog-pagination--enter {
        opacity: 1;
        transform: none;
        animation: none;
    }

    .skeleton {
        animation: none;
        background: rgba(232, 220, 200, 0.55);
    }

    .ficha:hover { transform: none; }
    .pasillo:hover { padding-left: 0.25rem; }
}

/* ---------- Blazor error UI ---------- */

#blazor-error-ui {
    background: var(--stamp);
    color: var(--surface);
    bottom: 0;
    box-shadow: 0 -2px 12px rgba(61, 66, 56, 0.1);
    display: none;
    left: 0;
    padding: 0.75rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    font-size: 0.85rem;
}

#blazor-error-ui a { color: var(--surface); }

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: var(--stamp);
    padding: 1rem;
    color: var(--surface);
    border-radius: var(--radius);
}

.blazor-error-boundary::after {
    content: "Ocurrió un error inesperado.";
}
