/* ==========================================================================
   JOEF · Layout de sitio (banner B2B, header, buscador, cajón móvil, footer)
   Mobile-first. Usa los tokens de joef-ui.css (plugin JOEF Core).
   ========================================================================== */

[hidden]{display:none!important}
.joef-count[hidden]{display:none!important}
body.joef-lock{overflow:hidden}

/* ---------- Banner B2B ---------- */
.joef-topbar{background:var(--joef-celeste);color:var(--joef-night-2);font:600 .8125rem/1.3 var(--joef-font-ui)}
.joef-topbar__in{display:flex;align-items:center;justify-content:center;gap:24px;min-height:44px}
.joef-topbar__msg{margin:0;display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap}
.joef-topbar__msg .joef-icon{width:18px;height:18px}
.joef-topbar__text{display:none}
.joef-topbar a{color:inherit;text-decoration:none}
.joef-topbar__cta{display:inline-flex;align-items:center;gap:6px;font:800 .8125rem/1 var(--joef-font-display);letter-spacing:.02em;text-decoration:underline!important;text-underline-offset:3px;padding:12px 0}
.joef-topbar__cta .joef-icon{width:16px;height:16px;transition:transform .2s}
.joef-topbar__cta:hover .joef-icon{transform:translateX(3px)}
.joef-topbar__aux{display:none;list-style:none;margin:0;padding:0;gap:20px;align-items:center}
.joef-topbar__aux a{display:inline-flex;align-items:center;gap:6px;padding:12px 0}
.joef-topbar__aux a:hover{text-decoration:underline}
.joef-topbar__aux .joef-icon{width:16px;height:16px}
@media (min-width:640px){.joef-topbar__text{display:inline}}
@media (min-width:1000px){
  .joef-topbar__in{justify-content:space-between}
  .joef-topbar__aux{display:flex}
}

/* ---------- Header ---------- */
.joef-header{position:sticky;top:0;z-index:100;background:var(--joef-night);color:#fff;border-bottom:1px solid rgba(255,255,255,.08);transition:box-shadow .2s}
.admin-bar .joef-header{top:32px}
@media (max-width:782px){.admin-bar .joef-header{top:46px}}
.joef-header.is-stuck{box-shadow:0 10px 28px rgba(0,24,28,.4)}
.joef-header__in{display:flex;align-items:center;gap:8px;min-height:64px}
.joef-header__logo{display:inline-flex;align-items:center;margin-right:auto;border-radius:8px}
.joef-header__logo img,.joef-header__logoimg{display:block;height:34px;width:auto;max-width:none}
.joef-nav{display:none}
.joef-header__actions{display:flex;align-items:center;gap:2px}

.joef-hbtn{position:relative;display:inline-grid;place-items:center;flex:none;width:44px;height:44px;padding:0!important;margin:0;border:0;border-radius:50%;background:transparent;color:#fff;cursor:pointer;text-decoration:none;transition:background-color .15s,color .15s;-webkit-appearance:none;appearance:none;line-height:1}
.joef-hbtn:hover,.joef-hbtn[aria-expanded="true"]{background:rgba(255,255,255,.12);color:#fff}
.joef-hbtn .joef-icon{width:22px;height:22px}
.joef-hbtn:focus-visible{outline:3px solid var(--joef-celeste);outline-offset:1px}
.joef-hbtn--account,.joef-hbtn--fav{display:none}

.joef-count{position:absolute;top:2px;right:0;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:var(--joef-celeste);color:var(--joef-night-2);font:800 .6875rem/18px var(--joef-font-display);text-align:center;pointer-events:none}

/* Buscador desplegable */
.joef-searchpanel{background:var(--joef-night-2);border-top:1px solid rgba(255,255,255,.08);padding:16px 0 18px}
.joef-searchpanel .joef-search__box{background:#fff;color:var(--joef-ink-2)}
.joef-searchpanel .joef-search .joef-btn{flex:none}
.joef-searchpanel__chips{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:12px;font-size:.8125rem;color:rgba(255,255,255,.7)}
.joef-searchpanel .joef-chip{background:transparent;color:#fff;border-color:rgba(255,255,255,.3);min-height:36px;padding:0 14px;font-size:.8125rem}
.joef-searchpanel .joef-chip:hover{border-color:var(--joef-celeste);color:var(--joef-celeste)}

/* ---------- Menú de escritorio ---------- */
@media (min-width:1100px){
  .joef-header__in{display:grid;grid-template-columns:auto 1fr auto;gap:24px;min-height:72px}
  .joef-header__logo{margin-right:0}
  .joef-header__logo img,.joef-header__logoimg{height:38px}
  .joef-nav{display:block;justify-self:center}
  .joef-hbtn--burger{display:none}
  .joef-hbtn--account,.joef-hbtn--fav{display:inline-grid}
}
.joef-menu{list-style:none;margin:0;padding:0}
.joef-nav .joef-menu{display:flex;align-items:center;gap:2px}
.joef-nav .joef-menu>li{position:relative;display:flex;align-items:center;margin:0}
.joef-nav .joef-menu>li>a{position:relative;display:flex;align-items:center;min-height:72px;padding:0 12px;color:#fff;text-decoration:none;font:700 .8125rem/1 var(--joef-font-display);letter-spacing:.07em;text-transform:uppercase;transition:color .15s}
.joef-nav .joef-menu>li>a::after{content:"";position:absolute;left:12px;right:12px;bottom:18px;height:2px;background:var(--joef-celeste);transform:scaleX(0);transform-origin:left;transition:transform .2s}
.joef-nav .joef-menu>li:hover>a,.joef-nav .joef-menu>li>a:focus-visible{color:var(--joef-celeste)}
.joef-nav .joef-menu>li.current-menu-item>a,.joef-nav .joef-menu>li.current-menu-ancestor>a,.joef-nav .joef-menu>li.current_page_item>a{color:var(--joef-celeste)}
.joef-nav .joef-menu>li.current-menu-item>a::after,.joef-nav .joef-menu>li.current-menu-ancestor>a::after,.joef-nav .joef-menu>li:hover>a::after{transform:scaleX(1)}
.joef-nav .joef-menu>li>a:focus-visible{outline:3px solid var(--joef-celeste);outline-offset:-3px;border-radius:8px}

.joef-menu__toggle{display:grid;place-items:center;width:32px;height:32px;margin:0 0 0 -2px;padding:0!important;border:0;border-radius:50%;background:transparent;color:rgba(255,255,255,.75);cursor:pointer;-webkit-appearance:none;appearance:none}
.joef-menu__toggle:hover{color:var(--joef-celeste)}
.joef-menu__toggle:focus-visible{outline:3px solid var(--joef-celeste);outline-offset:1px}
.joef-menu__toggle .joef-icon{width:16px;height:16px;transition:transform .2s}
.joef-menu__toggle[aria-expanded="true"] .joef-icon{transform:rotate(180deg)}

.joef-nav .sub-menu{position:absolute;top:calc(100% - 6px);left:0;min-width:270px;margin:0;padding:8px;list-style:none;background:#fff;border-radius:var(--joef-r-panel);box-shadow:var(--joef-shadow-2);opacity:0;visibility:hidden;transform:translateY(8px);transition:opacity .18s,transform .18s,visibility .18s;z-index:5}
.joef-nav .menu-item-has-children:hover>.sub-menu,
.joef-nav .menu-item-has-children:focus-within>.sub-menu,
.joef-nav .menu-item-has-children.is-open>.sub-menu{opacity:1;visibility:visible;transform:none}
.joef-nav .sub-menu a{display:block;padding:11px 14px;border-radius:10px;color:var(--joef-ink);text-decoration:none;font:600 .875rem/1.3 var(--joef-font-ui);text-transform:none;letter-spacing:0}
.joef-nav .sub-menu a:hover,.joef-nav .sub-menu a:focus-visible{background:var(--joef-bg-soft);color:var(--joef-petroleo)}
.joef-nav .sub-menu .current-menu-item>a{color:var(--joef-petroleo);background:var(--joef-celeste-soft)}

/* ---------- Cajón móvil ---------- */
.joef-drawer{position:fixed;inset:0;z-index:300;visibility:hidden;pointer-events:none;transition:visibility 0s linear .3s}
.joef-drawer.is-open{visibility:visible;pointer-events:auto;transition-delay:0s}
.joef-drawer__scrim{position:absolute;inset:0;background:rgba(0,24,28,.62);opacity:0;transition:opacity .3s}
.joef-drawer.is-open .joef-drawer__scrim{opacity:1}
.joef-drawer__panel{position:absolute;top:0;right:0;bottom:0;width:min(92vw,400px);display:flex;flex-direction:column;overflow-y:auto;overscroll-behavior:contain;background:var(--joef-night);transform:translateX(100%);transition:transform .3s cubic-bezier(.2,.8,.2,1);outline:0}
.joef-drawer.is-open .joef-drawer__panel{transform:none}
.joef-drawer__head{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid rgba(255,255,255,.1)}
.joef-drawer__nav{padding:8px 8px 0}
.joef-menu--drawer>li{display:flex;flex-wrap:wrap;align-items:center;border-bottom:1px solid rgba(255,255,255,.08)}
.joef-menu--drawer>li>a{flex:1;display:block;padding:16px 10px;color:#fff;text-decoration:none;font:800 1.0625rem/1.2 var(--joef-font-display);letter-spacing:.01em}
.joef-menu--drawer>li.current-menu-item>a,.joef-menu--drawer>li.current-menu-ancestor>a{color:var(--joef-celeste)}
.joef-menu--drawer .joef-menu__toggle{width:44px;height:44px;margin:0}
.joef-menu--drawer .joef-menu__toggle .joef-icon{width:20px;height:20px}
.joef-menu--drawer .sub-menu{display:none;flex-basis:100%;list-style:none;margin:0;padding:0 0 10px 10px}
.joef-menu--drawer .is-open>.sub-menu{display:block}
.joef-menu--drawer .sub-menu a{display:block;padding:11px 10px;color:rgba(255,255,255,.82);text-decoration:none;font:600 .9375rem/1.3 var(--joef-font-ui);border-radius:8px}
.joef-menu--drawer .sub-menu a:hover{color:var(--joef-celeste);background:rgba(255,255,255,.06)}
.joef-drawer__cta{display:grid;gap:10px;padding:20px 16px 8px}
.joef-drawer__links{list-style:none;margin:0;padding:8px 16px 28px}
.joef-drawer__links a{display:flex;align-items:center;gap:12px;padding:13px 4px;color:rgba(255,255,255,.85);text-decoration:none;font:500 .9375rem/1.3 var(--joef-font-ui)}
.joef-drawer__links a:hover{color:var(--joef-celeste)}
.joef-drawer__links .joef-icon{color:var(--joef-celeste)}

/* ---------- Footer ---------- */
.joef-footer{background:var(--joef-night-2);color:rgba(255,255,255,.78);font-size:.9375rem}
.joef-footer a:not(.joef-btn):not(.joef-icon-btn){color:inherit;text-decoration:none}
.joef-footer a:not(.joef-btn):not(.joef-icon-btn):hover{color:var(--joef-celeste)}
.joef-footer a.joef-btn,.joef-footer a.joef-icon-btn{text-decoration:none}
.joef-footer__b2b{background:var(--joef-petroleo);border-bottom:1px solid rgba(255,255,255,.1)}
.joef-footer__b2b-in{display:grid;gap:24px;padding-block:44px;align-items:center}
.joef-footer__b2b .joef-h2{color:#fff;margin:8px 0 6px}
.joef-footer__b2b .joef-lead{margin:0}
.joef-footer__b2b-cta{display:flex;flex-wrap:wrap;gap:12px}
.joef-footer__b2b-cta .joef-btn{flex:1 1 240px}
@media (min-width:900px){.joef-footer__b2b-in{grid-template-columns:1.3fr 1fr}.joef-footer__b2b-cta{justify-content:flex-end}.joef-footer__b2b-cta .joef-btn{flex:0 0 auto}}

.joef-footer__grid{display:grid;gap:36px 28px;padding-block:52px 36px}
@media (min-width:480px){.joef-footer__grid{grid-template-columns:1fr 1fr}.joef-footer__brand{grid-column:1/-1}}
@media (min-width:1000px){.joef-footer__grid{grid-template-columns:1.5fr 1fr 1fr 1fr}.joef-footer__brand{grid-column:auto}}
.joef-footer .joef-footer__logo{display:block;height:44px;width:auto;max-width:none}
.joef-footer__brand p{margin:16px 0;max-width:340px}
.joef-footer__contact{list-style:none;margin:0 0 18px;padding:0;display:grid;gap:10px}
.joef-footer__contact li{display:flex;align-items:flex-start;gap:10px}
.joef-footer__contact .joef-icon{color:var(--joef-celeste);margin-top:3px;width:18px;height:18px}
.joef-footer__social{list-style:none;margin:0;padding:0;display:flex;gap:10px;flex-wrap:wrap}
.joef-footer__social .joef-icon-btn .joef-icon{width:20px;height:20px}
.joef-footer__h{margin:0 0 14px;font:800 .75rem/1.2 var(--joef-font-display);letter-spacing:.14em;text-transform:uppercase;color:#fff}
.joef-footer__menu{list-style:none;margin:0;padding:0;display:grid;gap:2px}
.joef-footer__menu a{display:inline-block;padding:7px 0}
.joef-footer__bottom{border-top:1px solid rgba(255,255,255,.1)}
.joef-footer__bottom-in{display:flex;flex-direction:column;gap:6px;padding-block:20px;font-size:.8125rem;color:rgba(255,255,255,.62)}
.joef-footer__bottom p{margin:0}
.joef-footer__legal{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:4px 20px}
.joef-footer__legal a{display:inline-block;padding:8px 0}
@media (min-width:800px){.joef-footer__bottom-in{flex-direction:row;justify-content:space-between;align-items:center}}

@media (prefers-reduced-motion:reduce){.joef-drawer,.joef-drawer__panel,.joef-drawer__scrim,.joef-nav .sub-menu{transition:none!important}}

/* ---------- v1.5 · Neutraliza los azules/estilos de Astra y WooCommerce ---------- */
body.joef-site{--ast-global-color-0:#00565D;--ast-global-color-1:#1D555A;--ast-global-color-2:#24343A;--ast-global-color-3:#66747A;--ast-global-color-4:#F3F7F8;--ast-global-color-5:#FFFFFF;--ast-global-color-6:#D9E3E5;--ast-global-color-7:#24343A;--ast-global-color-8:#24343A}
body.joef-site #ast-scroll-top,body.joef-site .ast-scroll-top-icon{background:var(--joef-petroleo)!important;color:#fff!important;border-radius:10px!important;width:44px;height:44px}
body.joef-site #ast-scroll-top:hover{background:var(--joef-teal)!important}

/* Avisos de WooCommerce (agregado al carrito, errores, info) en toda la tienda */
body.joef-site .woocommerce-message,body.joef-site .woocommerce-info,body.joef-site .woocommerce-error{list-style:none;display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;margin:0 0 18px!important;padding:14px 18px!important;border:1px solid var(--joef-line)!important;border-left-width:4px!important;border-radius:10px;background:#fff;color:var(--joef-ink)!important;font:500 .9375rem var(--joef-font-ui);position:relative}
body.joef-site .woocommerce-message{border-left-color:var(--joef-success)!important;background:var(--joef-success-bg)}
body.joef-site .woocommerce-info{border-left-color:var(--joef-celeste)!important;background:var(--joef-celeste-soft)}
body.joef-site .woocommerce-error{border-left-color:var(--joef-danger)!important;background:var(--joef-danger-bg)}
body.joef-site .woocommerce-message::before,body.joef-site .woocommerce-info::before,body.joef-site .woocommerce-error::before{display:none!important}
body.joef-site .woocommerce-message .button,body.joef-site .woocommerce-info .button{order:2;margin-left:auto;float:none!important;display:inline-flex;align-items:center;min-height:40px;padding:0 18px!important;border-radius:var(--joef-r-btn)!important;background:var(--joef-petroleo)!important;color:#fff!important;border:0!important;font:700 .875rem var(--joef-font-display)!important;text-decoration:none!important}
body.joef-site .woocommerce-message .button:hover{background:var(--joef-teal)!important}
body.joef-site .woocommerce-error li{margin:0}

/* Botones azules de Woo/Astra que quedan sueltos (enviar valoración, etc.) */
body.joef-site .woocommerce #respond input#submit,body.joef-site .woocommerce button.button.alt,body.joef-site .woocommerce a.button.alt,body.joef-site .woocommerce input.button{background:var(--joef-petroleo)!important;color:#fff!important;border:1px solid var(--joef-petroleo)!important;border-radius:var(--joef-r-btn)!important;min-height:46px;padding:0 24px!important;font:700 .9375rem var(--joef-font-display)!important}
body.joef-site .woocommerce #respond input#submit:hover{background:var(--joef-teal)!important}

/* Valoraciones */
body.joef-site .joef-reviews{max-width:760px;margin:40px 0 0}
body.joef-site .joef-reviews .woocommerce-Reviews-title,body.joef-site .joef-reviews .comment-reply-title{display:block;font:700 1.125rem/1.3 var(--joef-font-display)!important;color:var(--joef-teal)!important;margin:0 0 14px}
body.joef-site .joef-reviews .woocommerce-noreviews{margin:0 0 18px;padding:14px 16px;border:1px dashed var(--joef-line);border-radius:10px;color:var(--joef-ink-2);font:500 .9375rem var(--joef-font-ui)}
body.joef-site .joef-reviews #review_form_wrapper{border:1px solid var(--joef-line);border-radius:var(--joef-r-panel);background:#fff;padding:20px}
body.joef-site .joef-reviews #review_form #respond{margin:0}
body.joef-site .joef-reviews .comment-form{display:grid;gap:14px;margin:0}
body.joef-site .joef-reviews .comment-form p{margin:0}
body.joef-site .joef-reviews .comment-form label{display:block;font:600 .875rem var(--joef-font-ui);color:var(--joef-ink);margin:0 0 6px}
body.joef-site .joef-reviews .comment-form .required{color:var(--joef-danger)}
body.joef-site .joef-reviews .comment-form textarea,body.joef-site .joef-reviews .comment-form input[type=text],body.joef-site .joef-reviews .comment-form input[type=email]{width:100%;box-sizing:border-box;min-height:48px;padding:12px 14px;border:1px solid var(--joef-line);border-radius:var(--joef-r-btn);background:#fff;font:400 1rem var(--joef-font-ui);color:var(--joef-ink)}
body.joef-site .joef-reviews .comment-form textarea{min-height:120px}
body.joef-site .joef-reviews .comment-form textarea:focus,body.joef-site .joef-reviews .comment-form input:focus{outline:3px solid var(--joef-celeste);outline-offset:1px;border-color:var(--joef-petroleo)}
body.joef-site .joef-reviews .comment-form-rating label{display:inline-block;margin-right:10px}
body.joef-site .joef-reviews p.stars{display:inline-block;margin:0;vertical-align:middle}
body.joef-site .joef-reviews p.stars a{color:#E0A100!important}
body.joef-site .joef-reviews .comment-form-cookies-consent{display:flex;gap:8px;align-items:flex-start;font-size:.875rem}
body.joef-site .joef-reviews .form-submit{margin-top:4px}
body.joef-site .joef-reviews .commentlist{list-style:none;margin:0 0 24px;padding:0;display:grid;gap:14px}
body.joef-site .joef-reviews .commentlist li .comment_container{display:flex;gap:14px;padding:16px;border:1px solid var(--joef-line);border-radius:12px;background:#fff}
body.joef-site .joef-reviews .commentlist img.avatar{width:44px;height:44px;border-radius:50%;flex:none;position:static;padding:0;border:0}
body.joef-site .joef-reviews .commentlist .comment-text{margin:0!important;border:0!important;padding:0!important;flex:1}
body.joef-site .joef-reviews .commentlist .meta{margin:0 0 6px;font-size:.8125rem;color:var(--joef-ink-2)}
body.joef-site .joef-reviews .commentlist .description p{margin:0}

/* Tabla de especificaciones y atributos de Woo (sin la cuadrícula de Astra) */
body.joef-site table.joef-specs,body.joef-site table.woocommerce-product-attributes{width:100%;border:0!important;border-collapse:collapse;margin:0 0 16px}
body.joef-site table.joef-specs th,body.joef-site table.joef-specs td,body.joef-site table.woocommerce-product-attributes th,body.joef-site table.woocommerce-product-attributes td{border:0!important;border-bottom:1px solid var(--joef-line)!important;padding:12px 0!important;background:transparent!important;text-align:left;font:500 .9375rem var(--joef-font-ui);color:var(--joef-ink);vertical-align:top}
body.joef-site table.joef-specs th,body.joef-site table.woocommerce-product-attributes th{width:38%;font-weight:600;color:var(--joef-ink-2);padding-right:16px!important}
body.joef-site table.joef-specs tr:last-child th,body.joef-site table.joef-specs tr:last-child td{border-bottom:0!important}
body.joef-site table.woocommerce-product-attributes td p{margin:0}

/* v1.5 · Contraste WCAG 2.2 AA */
.joef-topbar,.joef-topbar a,.joef-topbar__cta{color:#00262B!important}
.joef-footer .joef-eyebrow,.joef-footer__b2b .joef-eyebrow{color:#9ADCF2!important}
