/* ── Tipografía: Barlow (27 oct 2026, Nerea eligió la maqueta A) ─────────────────
   Autoalojada (woff2 de @fontsource/barlow 5.1.0, licencia OFL) junto a este CSS. Sustituye a la
   Helvetica en toda la web y a la Times de los títulos; la Times queda solo en el logotipo. */
@font-face { font-family: Barlow; font-weight: 400; font-style: normal; font-display: swap; src: url(barlow-400.woff2) format('woff2'); }
@font-face { font-family: Barlow; font-weight: 500; font-style: normal; font-display: swap; src: url(barlow-500.woff2) format('woff2'); }
@font-face { font-family: Barlow; font-weight: 600; font-style: normal; font-display: swap; src: url(barlow-600.woff2) format('woff2'); }
@font-face { font-family: Barlow; font-weight: 700; font-style: normal; font-display: swap; src: url(barlow-700.woff2) format('woff2'); }

/* ── Variables — Paleta corporativa Estanfi ────────────────────────────────── */
:root {
    /* Marca */
    --est-green:    #005348;   /* Era #748C3F. 26 oct: Estanfi quiere el verde claro solo en el logo y el oscuro en todo lo demás */
    --est-teal:     #005348;   /* EST-ADVENTURE */
    --est-black:    #2D2C2F;   /* ASPHALT BLACK */
    --est-metal:    #BABFBC;   /* EST-METAL */

    /* Aliases funcionales */
    --primary:      #005348;
    --primary-dark: #00413a;
    --primary-hover:#33756d;   /* El oscuro aclarado al pasar el ratón */
    --dark:         #2D2C2F;

    /* Estado stock */
    --green:        #3a7d3a;
    --green-light:  #eaf4ea;
    --orange:       #b05a10;
    --orange-light: #fff3e6;
    --red:          #c0392b;
    --red-light:    #fdecea;

    /* WhatsApp */
    --wa:           #25d366;

    /* UI */
    --text:         #1c1b1e;
    --muted:        #6b6b6b;
    --border:       #ddddd8;
    --bg:           #f5f5f2;   /* Fondo off-white del manual */
    --white:        #ffffff;

    --shadow-sm:    0 1px 2px rgba(0,0,0,.07);
    --shadow:       0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md:    0 4px 6px -1px rgba(0,0,0,.10), 0 2px 4px -2px rgba(0,0,0,.08);
    --radius:       6px;
    --font:         Barlow, 'Helvetica Neue', Helvetica, Arial, -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif:   'Times New Roman', Times, Georgia, serif;
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.5; }
img  { max-width: 100%; height: auto; display: block; }
a    { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: inherit; }

/* ── Layout ────────────────────────────────────────────────────────────────── */
.container {
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 20px;
}
.site-main { min-height: 60vh; padding: 24px 0 60px; }
/* Pie siempre abajo aunque la página sea corta (15 oct 2026). */
body { display: flex; flex-direction: column; min-height: 100vh; }
body.admin-bar { min-height: calc(100vh - 32px); }
@media screen and (max-width: 782px) { body.admin-bar { min-height: calc(100vh - 46px); } }
.site-main { flex: 1 0 auto; }

/* ── Header ────────────────────────────────────────────────────────────────── */
.site-header {
    background: var(--est-black);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.header-inner {
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 20px;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Logo corporativo */
.site-logo { flex-shrink: 0; text-decoration: none; display: flex; align-items: center; }
.site-logo img { height: 44px; width: auto; display: block; }

.logo-box {
    display: inline-flex;
    flex-direction: column;
    border: 2px solid rgba(255,255,255,.85);
    padding: 3px 10px 4px;
    line-height: 1;
    gap: 2px;
    text-decoration: none;
}
.logo-name {
    font-family: var(--font-serif);
    font-weight: 900;
    font-size: 21px;
    color: #fff;
    letter-spacing: 1.5px;
    display: block;
}
.logo-sub {
    font-family: var(--font);
    font-weight: 500;
    font-size: 9.5px;
    color: rgba(255,255,255,.9);
    letter-spacing: 3.5px;
    text-transform: uppercase;
    display: block;
    border-top: 1px solid rgba(255,255,255,.4);
    padding-top: 3px;
    text-align: center;
}

.header-search {
    flex: 1;
    display: flex;
    max-width: 500px;
    background: rgba(255,255,255,.12);
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,.2);
    overflow: hidden;
    transition: background .15s;
}
.header-search:focus-within {
    background: rgba(255,255,255,.18);
    border-color: rgba(255,255,255,.4);
}
.header-search__input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    padding: 0 14px;
    font-size: 14px;
}
.header-search__input::placeholder { color: rgba(255,255,255,.5); }
.header-search__btn {
    background: transparent;
    border: none;
    padding: 0 14px;
    color: rgba(255,255,255,.7);
    display: flex;
    align-items: center;
    transition: color .15s;
}
.header-search__btn:hover { color: #fff; }

.header-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}
.header-nav__link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,.85);
    font-size: 14px;
    white-space: nowrap;
    text-decoration: none;
    transition: color .15s;
}
.header-nav__link:hover { color: #fff; text-decoration: none; }
.header-nav__cart {
    position: relative;
    color: rgba(255,255,255,.85);
    display: flex;
    align-items: center;
    transition: color .15s;
}
.header-nav__cart:hover { color: #fff; }
.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* ── Cabecera en el móvil (30 sep 2026) ─────────────────────────────────────
   No había ninguna regla: en 390 px el logo, «Proyecto», el nombre del usuario y el
   carrito se comían el ancho, la caja de búsqueda se encogía hasta desaparecer y la
   página quedaba 10 px más ancha que la pantalla. Buscar por referencia es lo primero
   que hace un taller, y muchas veces con el móvil al lado del coche: en pantallas
   estrechas el buscador baja a su propia fila, a todo lo ancho, y los enlaces se quedan
   en icono. */
@media (max-width: 700px) {
    .header-inner { flex-wrap: wrap; height: auto; padding: 8px 12px 10px; gap: 8px 14px; }
    .site-logo img { height: 36px; }
    .header-nav { gap: 14px; }
    .header-nav__link span { display: none; }
    .header-search { order: 3; flex: 1 1 100%; max-width: none; height: 40px; }
    .header-search__input { font-size: 16px; }   /* 16 px: por debajo, iOS hace zoom al tocar */
}

/* Selector de tipo de búsqueda (fase 4, como Dolz) */
.header-search__tipo { flex-shrink: 0; max-width: 150px; height: 100%; border: 0; border-right: 1px solid rgba(255,255,255,.18); background: transparent; color: rgba(255,255,255,.85); font: inherit; font-size: 12.5px; padding: 0 6px 0 12px; cursor: pointer; outline: none; }
.header-search { max-width: 620px; }
.header-search__input { min-width: 0; }
.header-search__tipo option { color: #2D2C2F; background: #fff; }
@media (max-width: 700px) { .header-search__tipo { max-width: 104px; font-size: 12px; padding-left: 8px; } }

/* ── Cabecera clara (David, 19 oct 2026) ────────────────────────────────────────
   La negra la veían muy oscura y el buscador, redondeado y translúcido, parecía fuera del
   menú. Ahora: fondo blanco, buscador rectangular con borde como los campos de la tienda, y
   en la portada no sale (allí está «Búsqueda por número», encima de la manual). */
.site-header { background: #fff; box-shadow: 0 1px 0 var(--border), 0 2px 6px rgba(0,0,0,.06); }
.header-search { background: #fff; border: 1px solid #c9c9c2; border-radius: 2px; height: 38px; }
.header-search:focus-within { background: #fff; border-color: var(--est-green); box-shadow: 0 0 0 2px rgba(0,83,72,.18); }
.header-search__input { color: var(--est-black); }
.header-search__input::placeholder { color: #8a8a85; }
.header-search__tipo { color: var(--est-black); border-right: 1px solid #dcdcd6; background: #f4f4f0; }
.header-search__btn { background: var(--est-green); color: #fff; padding: 0 16px; }
.header-search__btn:hover { background: var(--primary-hover,#33756d); color: #fff; }
.header-nav__link, .header-nav__cart { color: var(--est-black); }
.header-nav__link:hover, .header-nav__cart:hover { color: var(--primary-hover,#33756d); }
/* 26 oct 2026: el buscador de la cabecera se ve también en la portada (antes se escondía
   porque está «Búsqueda por número»; al ir desde «Buscador general» parecía que se perdía). */

/* ── Barra de secciones (fase 4, 19 oct 2026: como la de Dolz) ──────────────── */
.header-menu { background: var(--est-teal); }
.header-menu__inner { max-width: 1380px; margin: 0 auto; padding: 0 20px; display: flex; align-items: stretch; height: 40px; overflow-x: auto; scrollbar-width: none; }
.header-menu__inner::-webkit-scrollbar { display: none; }
.header-menu a { display: flex; align-items: center; gap: 7px; padding: 0 14px; color: rgba(255,255,255,.88); font-size: 13.5px; font-weight: 600; white-space: nowrap; text-decoration: none; }
.header-menu a:hover { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }
/* «Área de cliente» al final de la barra, alineado con el borde derecho del contenido */
.header-menu__cuenta { margin-left: auto; }
.header-menu a.is-on { background: rgba(0,0,0,.28); color: #fff; box-shadow: inset 0 -3px 0 rgba(255,255,255,.75); }
.header-menu__home { padding: 0 12px !important; }
.header-menu__sep { width: 1px; background: rgba(255,255,255,.25); margin: 9px 8px; flex-shrink: 0; }
@media (max-width: 700px) {
    .header-menu__inner { padding: 0 6px; height: 38px; }
    .header-menu a { padding: 0 10px; font-size: 13px; }
}

/* ── Footer ────────────────────────────────────────────────────────────────── */
.site-footer { background: var(--dark); color: rgba(255,255,255,.5); padding: 20px 0; margin-top: 60px; }
.footer-inner { max-width: 1380px; margin: 0 auto; padding: 0 20px; }
.footer-copy { font-size: 13px; }

/* ── Breadcrumb ────────────────────────────────────────────────────────────── */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 20px;
}
.breadcrumb__sep { color: var(--border); }
.breadcrumb__link { color: var(--primary); }
.breadcrumb__link:hover { text-decoration: underline; }
.breadcrumb__current { color: var(--text); font-weight: 500; }

/* ── Product Hero ──────────────────────────────────────────────────────────── */
.product-page { padding-top: 20px; }

.product-hero {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    margin-bottom: 40px;
    align-items: start;
}
@media (max-width: 900px) {
    /* minmax(0,1fr) y min-width:0: sin ellos la columna no encoge por debajo de su
       contenido y en el móvil la ficha quedaba 5 px más ancha que la pantalla. */
    .product-hero { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .product-hero > * { min-width: 0; }
}

/* ── Gallery ───────────────────────────────────────────────────────────────── */
.product-gallery { position: sticky; top: 80px; }

.gallery-main {
    position: relative;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}
.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    transition: opacity .2s;
}
.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,.9);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    box-shadow: var(--shadow);
    transition: background .15s;
    z-index: 2;
}
.gallery-arrow:hover { background: var(--white); }
.gallery-arrow--prev { left: 10px; }
.gallery-arrow--next { right: 10px; }

.gallery-thumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.gallery-thumb {
    width: 64px;
    height: 64px;
    border: 2px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    background: var(--white);
    padding: 0;
    transition: border-color .15s;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.gallery-thumb:hover,
.gallery-thumb.is-active { border-color: var(--primary); }

/* ── Product Summary ───────────────────────────────────────────────────────── */
.product-summary {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow-sm);
}

.product-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.product-brand {
    background: var(--est-green);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 3px;
    letter-spacing: .8px;
    text-transform: uppercase;
    font-family: var(--font);
}
.product-sku { font-size: 13px; color: var(--muted); }
.product-sku strong { color: var(--text); font-family: monospace; font-size: 14px; }

.product-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
    margin-bottom: 6px;
}
.product-family { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.product-tecdoc-desc { font-size: 14px; color: var(--muted); font-style: italic; margin-bottom: 0; }

.product-divider { height: 1px; background: var(--border); margin: 18px 0; }

/* Price */
.product-price-block {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.price-was {
    font-size: 16px;
    color: var(--muted);
    text-decoration: line-through;
}
.price-current {
    font-size: 24px;   /* era 32 px: Estanfi lo veía demasiado grande (20 oct 2026) */
    font-weight: 800;
    color: var(--dark);
    line-height: 1;
}
.price-vat { font-size: 12px; color: var(--muted); align-self: flex-end; }
.price-na  { font-size: 16px; color: #8a8a8a; font-style: italic; }
.price-unit { font-size: 12px; color: var(--muted); width: 100%; }

/* Stock */
.product-stock-block {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
}
.stock-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.stock-badge--ok   { background: var(--green-light);  color: var(--green); }
.stock-badge--ok   .stock-dot { background: var(--green); }
.stock-badge--low  { background: #fff8e1; color: #a67c00; }             /* semáforo AMARILLO (<5 uds) */
.stock-badge--low  .stock-dot { background: #e6a800; animation: pulse 1.5s infinite; }
.stock-badge--out  { background: var(--red-light);    color: var(--red); }
.stock-badge--out  .stock-dot { background: var(--red); }
.stock-badge--order { background: #e6f0f5; color: #005348; }
.stock-badge--order .stock-dot { background: #005348; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: .4; }
}

.stock-refresh {
    background: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 4px 8px;
    color: var(--muted);
    display: flex;
    align-items: center;
    font-size: 12px;
    gap: 4px;
    transition: all .15s;
}
.stock-refresh:hover { border-color: var(--primary); color: var(--primary); }
.stock-refresh.is-loading svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Delivery */
.product-delivery {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 0;
}
/* El icono no debe encogerse cuando el texto ocupa dos líneas */
.product-delivery svg { flex-shrink: 0; }
/* La fecha estimada y el origen de la pieza, bajo el plazo */
.product-delivery__note {
    display: block;
    font-size: 12px;
    font-style: normal;
    opacity: .78;
}
/* Entrega el mismo día (SERVEI10): es la buena noticia, se destaca */
.product-delivery.is-fast { color: var(--est-green); font-weight: 600; }
/* Hay que pedirla fuera, tarda más */
.product-delivery.is-order { color: #8a6d00; }

/* Cart form */
.product-cart-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.qty-wrap {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    height: 44px;
}
.qty-btn {
    background: var(--bg);
    border: none;
    width: 36px;
    font-size: 20px;
    color: var(--text);
    transition: background .15s;
    line-height: 1;
}
.qty-btn:hover { background: var(--border); }
.qty-input {
    width: 52px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    font-size: 15px;
    font-weight: 600;
    outline: none;
    color: var(--text);
    -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.btn-cart {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0 22px;
    height: 44px;
    font-size: 15px;
    font-weight: 600;
    transition: background .15s;
    flex: 1;
    justify-content: center;
    min-width: 160px;
}
.btn-cart:hover { background: var(--primary-hover); }

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--wa);
    color: #fff;
    border-radius: 6px;
    padding: 0 16px;
    height: 44px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: filter .15s;
    white-space: nowrap;
}
.btn-whatsapp:hover { filter: brightness(1.08); text-decoration: none; }

.product-unavailable { padding: 20px 0; color: var(--muted); }

/* Barcodes / Extra refs */
.product-barcodes,
.product-est-refs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}
.product-extra-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.product-barcodes code,
.product-est-refs code {
    font-size: 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 7px;
}
.ref-est { color: var(--primary); border-color: #bfdbfe; background: #eff6ff; }

/* ── Tabs ──────────────────────────────────────────────────────────────────── */
.product-tabs {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 40px;
}

.tabs-nav {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    background: var(--bg);
}
.tab-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 14px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    white-space: nowrap;
    transition: all .15s;
    margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.is-active { color: var(--est-green); border-bottom-color: var(--est-green); background: var(--white); font-weight: 600; }

.tab-count {
    background: var(--border);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    min-width: 22px;
    text-align: center;
}
.tab-btn.is-active .tab-count { background: #e3eeec; color: var(--est-green); }

.tab-panel { display: none; padding: 24px; }
.tab-panel.is-active { display: block; }

/* ── Vehicles ──────────────────────────────────────────────────────────────── */
.vehicles-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.filter-select,
.filter-search {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    font-family: var(--font);
    color: var(--text);
    background: var(--white);
    outline: none;
    transition: border-color .15s;
}
.filter-select { min-width: 200px; }
.filter-search { flex: 1; min-width: 200px; }
.filter-select:focus,
.filter-search:focus { border-color: var(--primary); }

.vehicles-count {
    font-size: 13px;
    color: var(--muted);
    margin-left: auto;
    white-space: nowrap;
}

/* ── Tables ────────────────────────────────────────────────────────────────── */
.table-scroll { overflow-x: auto; }

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.data-table th {
    background: var(--bg);
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    color: var(--muted);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}
.data-table td {
    padding: 9px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--bg); }
.data-table .is-hidden { display: none; }

.text-right { text-align: right; }
.text-muted  { color: var(--muted); }

/* Specs */
.specs-table { max-width: 600px; }
.spec-label { color: var(--muted); width: 40%; }
.spec-value { }
.unit { color: var(--muted); font-weight: 400; font-size: 12px; }

/* OEM grid */
.oem-grid { display: flex; flex-direction: column; gap: 16px; }
.oem-group { }
.oem-mfr {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--muted);
    letter-spacing: .5px;
    margin-bottom: 8px;
}
.oem-numbers { display: flex; flex-wrap: wrap; gap: 6px; }
.oem-tag {
    font-size: 13px;
    font-family: monospace;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 3px 9px;
    color: var(--text);
}

/* Catalogs */
.catalogs-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.catalog-tag {
    font-size: 12px;
    font-family: monospace;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 3px 9px;
    color: var(--text);
}
.catalog-tag--est { background: #e3eeec; border-color: #b3cfca; color: var(--est-green); font-weight: 600; }
.catalog-tag--ntt { background: #fef2f2; border-color: #fecaca; color: var(--red); }
.refs-title { font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }

/* ═══════════════════════════════════════════════════════════════════════════ */
/* HOME SIN LOGIN                                                             */
/* ═══════════════════════════════════════════════════════════════════════════ */
.site-main:has(.login-page) { padding: 0; }
.login-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: calc(100vh - 64px);
}
@media (max-width: 768px) {
    .login-page { grid-template-columns: 1fr; }
}

/* Panel izquierdo */
.login-brand {
    background: var(--est-black);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    position: relative;
    overflow: hidden;
}
.login-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,83,72,.15) 0%, transparent 60%);
    pointer-events: none;
}
.login-brand__inner { position: relative; z-index: 1; max-width: 380px; }
.login-brand__logo  { width: 200px; margin-bottom: 32px; }
.login-brand__claim {
    color: rgba(255,255,255,.85);
    font-size: 20px;
    line-height: 1.5;
    margin-bottom: 32px;
    font-weight: 300;
}
.login-brand__stats {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.login-brand__stats li {
    color: rgba(255,255,255,.65);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.login-brand__stats li::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--est-green);
    flex-shrink: 0;
}
.login-brand__stats strong { color: rgba(255,255,255,.9); }

/* Panel derecho */
.login-form-panel {
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
}
.login-form-wrap { width: 100%; max-width: 400px; }
.login-form-wrap__title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}
.login-form-wrap__sub { font-size: 14px; color: var(--muted); margin-bottom: 28px; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: var(--font);
    color: var(--text);
    background: var(--white);
    outline: none;
    transition: border-color .15s;
}
.form-control:focus { border-color: var(--primary); }

.form-control-wrap { position: relative; }
.form-control-wrap .form-control { padding-right: 44px; }
.toggle-pass {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: var(--muted);
    line-height: 1;
    padding: 0;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
}
.btn-submit {
    background: var(--est-green);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    flex-shrink: 0;
}
.btn-submit:hover { background: var(--primary-hover); }
.form-link { font-size: 13px; color: var(--muted); }
.form-link:hover { color: var(--primary); }

.login-register-cta {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
}
.login-register-cta p { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.btn-register {
    display: inline-block;
    border: 2px solid var(--est-green);
    color: var(--est-green);
    border-radius: var(--radius);
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all .15s;
}
.btn-register:hover { background: var(--est-green); color: #fff; text-decoration: none; }

/* ═══════════════════════════════════════════════════════════════════════════ */
/* HOME CON LOGIN                                                             */
/* ═══════════════════════════════════════════════════════════════════════════ */
.home-logged { padding-top: 28px; }

.home-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}
.home-welcome__text { font-size: 16px; color: var(--muted); }
.home-welcome__text strong { color: var(--text); }
.btn-all-products {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--est-green);
    color: #fff;
    border-radius: var(--radius);
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s;
}
.btn-all-products:hover { background: var(--primary-hover); text-decoration: none; }

.home-search {
    display: flex;
    gap: 0;
    margin-bottom: 36px;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--white);
}
.home-search__input {
    flex: 1;
    border: none;
    padding: 14px 18px;
    font-size: 16px;
    font-family: var(--font);
    outline: none;
    color: var(--text);
    background: transparent;
}
.home-search__btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--est-green);
    color: #fff;
    border: none;
    padding: 0 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
}
.home-search__btn:hover { background: var(--primary-hover); }

.home-section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
    margin-bottom: 16px;
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 48px;
}
.brand-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 18px;
    text-decoration: none;
    color: var(--text);
    transition: all .15s;
    position: relative;
    border-left: 4px solid var(--brand-color, var(--est-green));
}
.brand-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    text-decoration: none;
    border-color: var(--brand-color, var(--est-green));
}
.brand-card__icon { font-size: 24px; margin-bottom: 4px; }
.brand-card__name { font-size: 16px; font-weight: 700; color: var(--text); }
.brand-card__count { font-size: 12px; color: var(--muted); }
.brand-card__arrow {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--border);
    transition: color .15s, right .15s;
}
.brand-card:hover .brand-card__arrow { color: var(--brand-color, var(--est-green)); right: 10px; }
.brand-card--special { border-left-color: var(--est-green); }

/* ═══════════════════════════════════════════════════════════════════════════ */
/* SHOP / ARCHIVO DE PRODUCTOS                                                */
/* ═══════════════════════════════════════════════════════════════════════════ */
.shop-page { padding-top: 24px; }

.shop-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}
.shop-header__title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
}
.shop-header__title em { font-style: normal; color: var(--primary); }
.shop-header__count { font-size: 13px; color: var(--muted); margin-left: 10px; }
.shop-clear-filter { font-size: 13px; color: var(--red); text-decoration: none; }
.shop-clear-filter:hover { text-decoration: underline; }

.shop-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
}
.shop-filters__group { display: flex; }
.shop-filter-input,
.shop-filter-select {
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 0 12px;
    font-size: 14px;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    outline: none;
    transition: border-color .15s;
}
.shop-filter-input--search { width: 300px; }
.shop-filter-select { min-width: 180px; }
.shop-filter-input:focus,
.shop-filter-select:focus { border-color: var(--primary); background: var(--white); }
.shop-filter-btn {
    height: 38px;
    background: var(--est-green);
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.shop-filter-btn:hover { background: var(--primary-hover); }

/* Grid de producto */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.product-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow .15s, transform .15s;
    display: flex;
    flex-direction: column;
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.product-card__img-wrap {
    display: block;
    position: relative;
    background: var(--bg);
    aspect-ratio: 1;
    overflow: hidden;
}
.product-card__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
    transition: transform .2s;
}
.product-card:hover .product-card__img-wrap img { transform: scale(1.04); }

.product-card__stock {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.stock-badge--ok  { background: var(--green-light);  color: var(--green); }
.stock-badge--low { background: #fff8e1;             color: #a67c00; }
.stock-badge--out { background: var(--red-light);    color: var(--red); }

.product-card__body { padding: 12px 14px; display: flex; flex-direction: column; flex: 1; }
.product-card__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.product-card__brand {
    font-size: 10px;
    font-weight: 700;
    background: var(--est-green);
    color: #fff;
    padding: 2px 7px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.product-card__sku { font-size: 11px; color: var(--muted); font-family: monospace; }
.product-card__title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 4px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card__title a { color: var(--text); text-decoration: none; }
.product-card__title a:hover { color: var(--primary); }
.product-card__family { font-size: 11px; color: var(--muted); margin-bottom: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}
.product-card__price { font-size: 16px; font-weight: 800; color: var(--est-black); }
.product-card__price--na { font-size: 13px; font-weight: 400; color: var(--muted); font-style: italic; }
.product-card__add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: var(--est-green);
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    transition: background .15s;
    flex-shrink: 0;
}
.product-card__add-btn:hover { background: var(--primary-hover); text-decoration: none; }
.product-card__view-btn {
    font-size: 12px;
    color: var(--muted);
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 5px 10px;
}
.product-card__view-btn:hover { color: var(--primary); border-color: var(--primary); }

/* Shop vacío */
.shop-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}
.shop-empty svg { margin: 0 auto 16px; opacity: .3; }
.shop-empty p { font-size: 16px; margin-bottom: 20px; }

/* Paginación shop */
.shop-pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    margin: 32px 0 48px;
    flex-wrap: wrap;
}
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 14px;
    color: var(--text);
    text-decoration: none;
    background: var(--white);
    transition: all .15s;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.page-btn.is-current { background: var(--est-green); color: #fff; border-color: var(--est-green); font-weight: 700; }
.page-info { font-size: 13px; color: var(--muted); margin-left: 6px; }

/* ═══════════════════════════════════════════════════════════════════════════ */
/* PÁGINA GENÉRICA (carrito, cuenta, checkout)                               */
/* ═══════════════════════════════════════════════════════════════════════════ */
.page-content { padding-top: 32px; }
.page-inner {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    max-width: 900px;
    box-shadow: var(--shadow-sm);
}
.page-inner--account { max-width: 100%; }

/* WooCommerce overrides básicos */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 14px;
}
.woocommerce-message { background: var(--green-light); border-left: 4px solid var(--green); color: var(--green); }
.woocommerce-error   { background: var(--red-light);   border-left: 4px solid var(--red);   color: var(--red); }
.woocommerce-info    { background: #e3eeec;             border-left: 4px solid var(--est-green); color: var(--est-black); }

.woocommerce button.button,
.woocommerce input.button,
.woocommerce a.button {
    background: var(--est-green) !important;
    color: #fff !important;
    border-radius: var(--radius) !important;
    font-family: var(--font) !important;
    font-weight: 600 !important;
    transition: background .15s !important;
}
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce a.button:hover { background: var(--primary-hover) !important; }

.woocommerce table.shop_table { border-radius: var(--radius); overflow: hidden; border-collapse: collapse; width: 100%; }
.woocommerce table.shop_table th { background: var(--bg); padding: 10px 14px; font-size: 13px; color: var(--muted); }
.woocommerce table.shop_table td { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 14px; }

/* Footer */
.site-footer { margin-top: 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-legal { display: flex; gap: 16px; }
.footer-legal a { font-size: 12px; color: rgba(255,255,255,.4); text-decoration: none; }
.footer-legal a:hover { color: rgba(255,255,255,.7); }

/* ═══════════════════════════════════════════════════════════════════════════ */
/* 404                                                                        */
/* ═══════════════════════════════════════════════════════════════════════════ */
.not-found {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 80px 20px 100px;
    gap: 16px;
}
.not-found__code {
    font-size: 120px;
    font-weight: 900;
    color: var(--border);
    line-height: 1;
}
.not-found__title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}
.not-found__text { font-size: 16px; color: var(--muted); margin: 0; }
.not-found__actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.not-found__search { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--est-green);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s;
    cursor: pointer;
}
.btn-primary:hover { background: var(--primary-hover); text-decoration: none; color: #fff; }

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--est-green);
    border: 2px solid var(--est-green);
    border-radius: var(--radius);
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all .15s;
}
.btn-outline:hover { background: var(--est-green); color: #fff; text-decoration: none; }

/* ═══════════════════════════════════════════════════════════════════════════ */
/* LOGIN TABS (my-account page)                                               */
/* ═══════════════════════════════════════════════════════════════════════════ */
.login-tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 24px;
    gap: 0;
}
.login-tab-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 500;
    color: var(--muted);
    cursor: pointer;
    transition: color .15s, border-color .15s;
    white-space: nowrap;
}
.login-tab-btn:hover { color: var(--text); }
.login-tab-btn.is-active { color: var(--est-green); border-bottom-color: var(--est-green); font-weight: 600; }

.login-tab-panel { display: none; }
.login-tab-panel.is-active { display: block; }

.login-brand__logo-text { margin-bottom: 32px; }

.form-required { color: var(--red); }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 500px) { .form-row { grid-template-columns: 1fr; } }

.form-group--check .form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
}
.form-group--check .form-check input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--est-green);
    width: 16px;
    height: 16px;
}
.form-group--check .form-check a { color: var(--primary); }

.register-note {
    margin-top: 20px;
    font-size: 12px;
    color: var(--muted);
    background: var(--bg);
    border-radius: var(--radius);
    padding: 10px 14px;
    border: 1px solid var(--border);
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* DASHBOARD MI CUENTA                                                        */
/* ═══════════════════════════════════════════════════════════════════════════ */
.account-welcome {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.account-welcome__title { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.account-welcome__sub { font-size: 14px; color: var(--muted); }
.account-welcome__sub a { color: var(--primary); }

.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 14px;
    font-size: 13px;
    color: var(--muted);
    text-decoration: none;
    transition: all .15s;
    white-space: nowrap;
    flex-shrink: 0;
}
.btn-logout:hover { border-color: var(--red); color: var(--red); text-decoration: none; }

.account-quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 32px;
}
.account-quick-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 18px;
    text-decoration: none;
    transition: all .15s;
}
.account-quick-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); text-decoration: none; }
.account-quick-card__icon { color: var(--est-green); margin-bottom: 6px; }
.account-quick-card__label { font-size: 15px; font-weight: 700; color: var(--text); }
.account-quick-card__sub { font-size: 12px; color: var(--muted); }

/* ── WooCommerce My Account — overrides navegación ──────────────────────── */
.woocommerce-account .site-main { padding-top: 32px; }

.woocommerce-MyAccount-navigation {
    float: none;
    width: 100%;
    margin-bottom: 0;
}
.woocommerce-MyAccount-navigation ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}
.woocommerce-MyAccount-navigation li a {
    display: inline-block;
    padding: 7px 16px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    color: var(--muted);
    text-decoration: none;
    background: var(--white);
    transition: all .15s;
}
.woocommerce-MyAccount-navigation li a:hover { border-color: var(--primary-hover); color: var(--primary-hover); }
.woocommerce-MyAccount-navigation li.is-active a,
.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--is-active a {
    background: var(--est-green);
    border-color: var(--est-green);
    color: #fff;
    font-weight: 600;
}

.woocommerce-MyAccount-content {
    float: none;
    width: 100%;
}

/* ── Área de cliente (26 oct 2026): cabecera de cada apartado y aspecto de las
      pantallas propias de WooCommerce, con los mismos campos, botones y cajas que el
      resto de la web ─────────────────────────────────────────────────────────── */
.account-welcome__title { margin: 0 0 4px; line-height: 1.25; }
.account-welcome--apartado { align-items: flex-end; padding-bottom: 18px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.account-volver { display: inline-block; font-size: 13px; color: var(--muted); text-decoration: none; margin-bottom: 6px; }
.account-volver:hover { color: var(--primary-hover); text-decoration: none; }
.account-quick-card__icon { color: var(--primary); }
.account-quick-card:hover { border-color: var(--primary-hover); }
.account-quick-card:hover .account-quick-card__label { color: var(--primary-hover); }
.btn-logout svg { flex-shrink: 0; }

.woocommerce-MyAccount-content h2,
.woocommerce-MyAccount-content h3 { font-size: 17px; font-weight: 700; color: var(--text); margin: 0 0 12px; }
.woocommerce-MyAccount-content > p { font-size: 14px; color: var(--muted); }
.woocommerce-MyAccount-content a:not(.button):not(.woocommerce-button):not(.btn-logout) { color: var(--primary); }
.woocommerce-MyAccount-content a:not(.button):not(.woocommerce-button):not(.btn-logout):hover { color: var(--primary-hover); }

/* Formularios (Mis datos, Mis direcciones) */
.woocommerce-MyAccount-content form { max-width: 720px; }
.woocommerce-MyAccount-content .form-row { display: block; margin: 0 0 16px; padding: 0; }
.woocommerce-MyAccount-content .form-row-first,
.woocommerce-MyAccount-content .form-row-last { display: inline-block; width: calc(50% - 8px); vertical-align: top; }
.woocommerce-MyAccount-content .form-row-first { margin-right: 12px; }
.woocommerce-MyAccount-content .form-row label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; line-height: 1.4; }
.woocommerce-MyAccount-content .form-row .required { color: var(--red); text-decoration: none; border: 0; }
.woocommerce-MyAccount-content input.input-text,
.woocommerce-MyAccount-content select,
.woocommerce-MyAccount-content textarea,
.woocommerce-MyAccount-content .select2-container .select2-selection--single {
    width: 100%; min-height: 42px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius);
    font-size: 15px; font-family: var(--font); color: var(--text); background: var(--white); outline: none; box-sizing: border-box;
}
.woocommerce-MyAccount-content .select2-container .select2-selection--single .select2-selection__rendered { padding: 0; line-height: 20px; }
.woocommerce-MyAccount-content .select2-container .select2-selection--single .select2-selection__arrow { top: 8px; right: 8px; }
.woocommerce-MyAccount-content input.input-text:focus,
.woocommerce-MyAccount-content select:focus,
.woocommerce-MyAccount-content textarea:focus { border-color: var(--primary); }
.woocommerce-MyAccount-content em,
.woocommerce-MyAccount-content .description { display: block; font-size: 12px; color: var(--muted); font-style: normal; margin-top: 5px; }
.woocommerce-MyAccount-content fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px 6px; margin: 26px 0 20px; }
.woocommerce-MyAccount-content legend { font-size: 15px; font-weight: 700; color: var(--text); padding: 0 8px; margin-left: -8px; }
.woocommerce-MyAccount-content .show-password-input { top: 50% !important; transform: translateY(-50%); }
.woocommerce-MyAccount-content .clear { display: none; }
.woocommerce .woocommerce-MyAccount-content button.button,
.woocommerce .woocommerce-MyAccount-content a.button,
.woocommerce .woocommerce-MyAccount-content .woocommerce-Button {
    display: inline-flex; align-items: center; gap: 6px; border: 0; padding: 10px 20px; font-size: 14px; line-height: 1.3; text-decoration: none; cursor: pointer;
}
@media (max-width: 600px) {
    .woocommerce-MyAccount-content .form-row-first,
    .woocommerce-MyAccount-content .form-row-last { display: block; width: 100%; margin-right: 0; }
}

/* Mis direcciones: una caja por dirección */
.woocommerce-MyAccount-content .woocommerce-Addresses { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 14px; }
.woocommerce-MyAccount-content .woocommerce-Addresses::before,
.woocommerce-MyAccount-content .woocommerce-Addresses::after { display: none; }
.woocommerce-MyAccount-content .woocommerce-Address { float: none !important; width: auto !important; margin: 0 !important; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; background: var(--white); }
.woocommerce-MyAccount-content .woocommerce-Address-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.woocommerce-MyAccount-content .woocommerce-Address-title::before,
.woocommerce-MyAccount-content .woocommerce-Address-title::after { display: none; }
.woocommerce-MyAccount-content .woocommerce-Address-title h2 { margin: 0; font-size: 15px; }
.woocommerce-MyAccount-content .woocommerce-Address-title .edit { float: none; font-size: 13px; font-weight: 600; }
.woocommerce-MyAccount-content address { font-style: normal; font-size: 14px; line-height: 1.6; color: var(--text); }

/* Pedidos de la web y su detalle */
.woocommerce-MyAccount-content table.shop_table { border: 1px solid var(--border); margin: 0 0 20px; }
.woocommerce-MyAccount-content table.shop_table th { text-align: left; font-weight: 600; text-transform: uppercase; font-size: 11.5px; letter-spacing: .03em; }
.woocommerce-MyAccount-content table.shop_table tr:last-child td { border-bottom: 0; }
.woocommerce-MyAccount-content table.shop_table tfoot th,
.woocommerce-MyAccount-content table.shop_table tfoot td { background: var(--bg); border-top: 1px solid var(--border); text-transform: none; font-size: 14px; letter-spacing: 0; }
.woocommerce .woocommerce-MyAccount-content .woocommerce-orders-table .button { padding: 6px 14px; font-size: 13px; margin: 2px 4px 2px 0; }
.woocommerce-MyAccount-content .woocommerce-pagination { display: flex; gap: 8px; }
.woocommerce-MyAccount-content mark { background: var(--bg); color: var(--text); font-weight: 600; padding: 1px 6px; border-radius: 4px; }
.woocommerce-MyAccount-content .woocommerce-customer-details address { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.woocommerce-MyAccount-content .woocommerce-columns--addresses { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.woocommerce-MyAccount-content .woocommerce-columns--addresses .woocommerce-column { float: none; width: auto; }
.woocommerce-MyAccount-content .woocommerce-message,
.woocommerce-MyAccount-content .woocommerce-info { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.woocommerce-MyAccount-content .woocommerce-message::before,
.woocommerce-MyAccount-content .woocommerce-info::before { display: none; }
@media (max-width: 700px) {
    .woocommerce-MyAccount-content table.shop_table_responsive thead { display: none; }
    .woocommerce-MyAccount-content table.shop_table_responsive tr { display: block; border-bottom: 1px solid var(--border); padding: 6px 0; }
    .woocommerce-MyAccount-content table.shop_table_responsive td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 6px 14px; text-align: right !important; }
    .woocommerce-MyAccount-content table.shop_table_responsive td::before { content: attr(data-title); font-weight: 600; color: var(--muted); text-align: left; }
}

/* ── Britpart — Ficha de producto ──────────────────────────────────────────── */

/* Badge en la fila de meta (junto a SKU y marca) */
.product-bp-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--est-teal);
    background: #e8f5f3;
    border: 1px solid #b3d9d3;
    border-radius: 20px;
    padding: 2px 9px 2px 6px;
    white-space: nowrap;
}
.product-bp-badge svg { color: var(--est-teal); flex-shrink: 0; }

/* Indicador "Britpart" en miniaturas de galería */
.gallery-thumb[data-source="britpart"]::after {
    content: 'BP';
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 9px;
    font-weight: 700;
    background: var(--est-teal);
    color: #fff;
    border-radius: 2px;
    padding: 1px 4px;
    line-height: 1.4;
}
.gallery-thumb { position: relative; }

/* Tab Descripción Britpart */
.britpart-desc {
    padding: 4px 0 8px;
    max-width: 820px;
}
.britpart-cat-pill {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    background: var(--est-teal);
    color: #fff;
    border-radius: 3px;
    padding: 3px 10px;
    margin-bottom: 14px;
}
.britpart-desc__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 12px;
}
.britpart-desc__body {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
    margin-bottom: 12px;
}
.britpart-desc__sub {
    font-size: 13px;
    color: #666;
    font-style: italic;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: #f9f9f7;
    border-left: 3px solid var(--est-metal);
    border-radius: 0 4px 4px 0;
}
.britpart-desc__gallery {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.britpart-desc__thumb {
    display: block;
    width: 90px;
    height: 90px;
    border: 1px solid var(--border, #ddddd8);
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f2;
    transition: border-color .15s, transform .15s;
}
.britpart-desc__thumb:hover {
    border-color: var(--primary-hover,#33756d);
    transform: scale(1.04);
}
.britpart-desc__thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}
.britpart-source {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #888;
    padding-top: 16px;
    border-top: 1px solid #f0f0ec;
}
.britpart-source svg { flex-shrink: 0; }
.britpart-source code {
    background: #f0f0ec;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 11px;
}

/* ── Visor de imagen a pantalla completa ───────────────────────────────────── */
.gallery-main.is-zoomable img { cursor: zoom-in; }

.gallery-zoom {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.92);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text);
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: background .15s, color .15s;
    z-index: 2;
}
.gallery-zoom:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(20,20,20,.92);
    align-items: center;
    justify-content: center;
    padding: 40px 64px;
}
.lightbox.is-open { display: flex; }

.lightbox__stage {
    margin: 0;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
/* La foto va dentro de .lightbox__pic con la marca de agua encima (Estanfi, 20 oct 2026):
   solo en el visor ampliado, no en la ficha. El zoom se aplica a la capa, así la marca
   crece con la foto. */
.lightbox__pic {
    position: relative;
    display: inline-block;
    max-width: 100%;
    line-height: 0;
    border-radius: 6px;
    overflow: hidden;
    cursor: zoom-in;
    transition: transform .2s;
}
.lightbox__pic.is-zoomed {
    transform: scale(1.9);
    cursor: zoom-out;
}
.lightbox__stage img {
    /* Muchas fotos (Britpart, ISI) miden ~300 px: sin mínimo, el visor «ampliado»
       las enseñaba más pequeñas que la propia ficha. */
    min-width: min(640px, 80vw);
    max-width: 100%;
    max-height: calc(100vh - 120px);
    object-fit: contain;
    background: #fff;
}
.lightbox__wm {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='170'%3E%3Ctext x='130' y='95' text-anchor='middle' transform='rotate(-28 130 85)' font-family='Times New Roman,serif' font-size='34' font-weight='700' letter-spacing='4' fill='%23005348' fill-opacity='.16' stroke='%23ffffff' stroke-opacity='.25' stroke-width='1'%3EESTANFI%3C/text%3E%3C/svg%3E");
    background-repeat: repeat;
    background-position: center;
    pointer-events: auto;   /* recibe el clic derecho: no se llega a la imagen */
}
/* Sin arrastrar ni pulsación larga (móvil) en las fotos del producto. */
.product-gallery img,
.lightbox img,
.britpart-desc__thumb img {
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    user-select: none;
}
.lightbox__count {
    color: #ddd;
    font-size: 13px;
    letter-spacing: .5px;
}

.lightbox__close,
.lightbox__nav {
    position: absolute;
    background: rgba(255,255,255,.12);
    border: none;
    color: #fff;
    cursor: pointer;
    line-height: 1;
    border-radius: 50%;
    transition: background .15s;
}
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(255,255,255,.28); }

.lightbox__close {
    top: 18px;
    right: 22px;
    width: 40px;
    height: 40px;
    font-size: 26px;
}
.lightbox__nav {
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    font-size: 30px;
}
.lightbox__nav--prev { left: 14px; }
.lightbox__nav--next { right: 14px; }

@media (max-width: 700px) {
    .lightbox { padding: 56px 12px; }
    .lightbox__nav { width: 38px; height: 38px; font-size: 24px; }
    .lightbox__stage img { max-height: calc(100vh - 150px); }
}

