.bgf-password-toggle{display:inline-flex;align-items:center;justify-content:center;margin:.35rem 0 .3rem .45rem;padding:.35rem .65rem;border:1px solid #9aaac0;border-radius:5px;background:#fff;color:#153a63;cursor:pointer;font-size:.85rem}
.bgf-password-toggle:focus-visible{outline:3px solid #1458b4;outline-offset:2px}
.bgf-gallery{display:flex;flex-wrap:wrap;gap:1rem;margin:1rem 0}
.bgf-gallery img{width:160px;height:160px;object-fit:contain;border:1px solid #dce2eb;border-radius:8px}
.bgf-product-detail{max-width:950px;line-height:1.65}

.bgf-category-tree{padding:.4rem .3rem;border-bottom:1px solid #e5e9ef}
.bgf-category-tree summary{cursor:pointer;font-weight:600;color:#163d68;display:flex;justify-content:space-between;gap:.5rem}
.bgf-category-tree .filter-link{margin-left:.5rem}
/* E4: notificaciones legibles y uniformes sin JS inline (CSP). */
.store-ajax-notice{top:20px;bottom:auto;right:20px;min-width:min(340px,calc(100vw - 30px));max-width:min(480px,calc(100vw - 30px));padding:16px 20px;border-radius:7px;font-size:15px;font-weight:600;line-height:1.5;box-shadow:0 14px 35px rgba(12,38,70,.18)}
@media(max-width:720px){.store-ajax-notice{top:12px;bottom:auto;left:12px;right:12px;min-width:0;max-width:none}}

.bgf-toast-region{position:fixed;z-index:1100;top:1rem;display:flex;flex-direction:column;gap:.6rem;width:min(95vw,460px);max-height:90vh;overflow:auto;pointer-events:none}
.bgf-toast-region.bgf-right{right:1rem}.bgf-toast-region.bgf-center{left:50%;transform:translateX(-50%)}
.bgf-toast-region .bgf-toast{display:flex;align-items:center;justify-content:space-between;gap:1rem;pointer-events:auto;margin:0;padding:.9rem 1.1rem;border:1px solid #92a9c6;border-left:5px solid #1455a4;border-radius:6px;box-shadow:0 8px 24px #0002;background:white;color:#203247;line-height:1.5;font-size:.95rem}
.bgf-toast-region .bgf-toast.success{border-left-color:#218356}.bgf-toast-region .bgf-toast.error{border-left-color:#b42a32}.bgf-toast-region .bgf-toast.warning{border-left-color:#aa6f07}
.bgf-toast-close{background:transparent;border:0;color:inherit;font-size:1.4rem;cursor:pointer;padding:.1rem .35rem}
.bgf-toast-close:focus-visible{outline:3px solid #1a5caf}
@media(max-width:550px){.bgf-toast-region{left:.5rem!important;right:.5rem!important;top:.5rem;width:auto;transform:none!important}}

/* RC2: categorias superiores realmente desplegables, sin invadir banner. */
.store-category-bar.bgf-top-categories{position:relative;z-index:35}
.store-category-bar.bgf-top-categories > .store-shell{display:flex;align-items:stretch;overflow:visible;flex-wrap:nowrap;gap:0;min-width:0}
.bgf-top-categories .bgf-nav-category{position:relative;flex:0 1 auto;min-width:0}
.bgf-top-categories .bgf-nav-category>summary{list-style:none;cursor:pointer;padding:12px 14px;border-right:1px solid #dce2e8;color:#17314f;font-size:13px;white-space:nowrap;display:flex;align-items:center;gap:9px}
.bgf-top-categories .bgf-nav-category>summary::-webkit-details-marker{display:none}
.bgf-top-categories .bgf-nav-category>summary:hover,.bgf-top-categories .bgf-nav-category[open]>summary{background:#eaf2fd;color:#1455a4}
.bgf-nav-caret{border:solid currentColor;border-width:0 2px 2px 0;display:inline-block;padding:3px;transform:rotate(45deg);margin-top:-4px}
.bgf-top-categories .bgf-nav-category[open]>.bgf-nav-menu{display:flex}
.bgf-top-categories .bgf-nav-menu{display:flex;flex-direction:column;gap:0;min-width:230px;max-width:min(360px,90vw);position:absolute;top:100%;left:0;z-index:60;background:#fff;border:1px solid #cdd7e5;box-shadow:0 14px 24px #14354a33;border-radius:0 0 8px 8px;padding:8px;max-height:60vh;overflow-y:auto}
.bgf-top-categories .bgf-nav-menu a{display:block;white-space:normal!important;line-height:1.35;border:0;padding:10px 12px;border-radius:5px;font-size:13px}
.bgf-top-categories .bgf-nav-menu .bgf-nav-all{font-weight:700;background:#eef4fb}
.bgf-top-categories .bgf-nav-menu .bgf-nav-category{width:100%}
.bgf-top-categories .bgf-nav-menu .bgf-nav-category>summary{padding:9px 12px;border:0}
.bgf-top-categories .bgf-nav-menu .bgf-nav-menu{position:static;box-shadow:none;max-height:none;border:0;border-left:2px solid #dee9f4;margin-left:10px;padding:0 0 0 5px}
.bgf-top-categories .store-orders-link{margin-left:auto}
@media(min-width:981px) and (max-width:1280px){.bgf-top-categories .bgf-nav-category>summary{padding:11px 9px;font-size:12px}}
@media(max-width:980px){.store-category-bar.bgf-top-categories{display:none}}
/* Ojo accesible para cualquier formulario de contrasena (cliente y administrador). */
.bgf-password-field{position:relative;display:block;width:100%;max-width:100%;margin-top:4px}
.bgf-password-field input{display:block;width:100%!important;max-width:100%;box-sizing:border-box;padding-right:54px!important;margin:0!important}
.bgf-password-field .bgf-password-toggle{position:absolute;right:6px;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:40px;height:38px;margin:0!important;padding:7px!important;background:transparent;border:0;border-radius:6px;color:#173b66;cursor:pointer}
.bgf-password-toggle svg{width:21px;height:21px}
.bgf-password-toggle:hover{background:#e9f1fc}
.bgf-password-toggle:focus-visible{outline:3px solid #1458b4;outline-offset:1px}
.bgf-password-field.is-visible .bgf-password-toggle{color:#1165a3;background:#e6f2ff}
/* Selector de envio: una opcion por fila, nunca ancho completo del input radio. */
.bgf-delivery-options{border:1px solid #d7e2ec;padding:14px 16px;border-radius:8px;min-width:0;margin:0;display:grid;gap:9px}
.bgf-delivery-options legend{padding:0 7px;font-weight:700;color:#21394e}
.bgf-delivery-options label.bgf-delivery-option{display:flex!important;align-items:center!important;justify-content:flex-start;gap:12px;background:#fff;border:1px solid #d7e2ed;border-radius:7px;padding:12px 14px;margin:0;cursor:pointer;font-weight:600}
.bgf-delivery-options .bgf-delivery-option:has(input:checked){border-color:#246abb;background:#f0f6ff}
.bgf-delivery-options .bgf-delivery-option input[type=radio]{appearance:auto!important;width:18px!important;height:18px!important;min-width:18px!important;max-width:18px!important;flex:0 0 18px!important;margin:0!important;padding:0!important;accent-color:#1458ad;box-shadow:none!important;position:static!important}
.bgf-delivery-options .bgf-delivery-option span{min-width:0;flex:1}
.bgf-delivery-options label.bgf-delivery-address{display:block;margin-top:6px}
.bgf-delivery-options .bgf-delivery-address input{display:block;width:100%;margin-top:6px}
/* Timeline con hitos e iconografia; estados futuros atenuados. */
.bgf-order-progress{margin-bottom:20px}
.bgf-order-progress h2{margin-bottom:15px}
.bgf-order-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;list-style:none;padding:0!important;margin:0!important}
.bgf-order-steps li{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;font-weight:650;font-size:12px;position:relative;color:#175891}
.bgf-step-icon{display:flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;border:2px solid currentColor;background:#eff5fd}
.bgf-step-icon svg,.bgf-history-icon svg,.store-orders-table .status-pill svg{width:22px;height:22px;flex:0 0 auto}
.bgf-step-done{color:#277b4a!important}.bgf-step-done .bgf-step-icon{background:#e7f5eb}
.bgf-step-current{color:#145db4!important}.bgf-step-current .bgf-step-icon{background:#e6f2ff}
.bgf-step-future{color:#929fae!important}.bgf-step-future .bgf-step-icon{background:#f6f8fa}
.store-order-history li{grid-template-columns:34px minmax(0,1fr)!important;gap:11px!important}
.store-order-history li:not(:last-child):before{left:15px!important;top:24px!important}
.store-order-history .bgf-history-icon{height:32px;width:32px;margin-top:0;display:flex;align-items:center;justify-content:center;border-width:2px;background:#fff;color:#155ab2}
.store-order-history .bgf-history-icon svg{width:18px;height:18px}
.store-orders-table .status-pill{display:inline-flex;align-items:center;gap:6px}
.store-orders-table .status-pill svg{width:16px;height:16px}
@media(max-width:600px){.bgf-order-steps{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:18px}.bgf-step-icon{width:36px;height:36px}}

/* Menu de categorias plegable tambien en el cajon movil. */
.store-drawer .bgf-drawer-cat{border-bottom:1px solid #e9edf4}
.store-drawer .bgf-drawer-cat details{display:block}
.store-drawer .bgf-drawer-cat summary{list-style:none;cursor:pointer;padding:13px 20px;display:flex;align-items:center;justify-content:space-between;font-weight:650;color:#244766}
.store-drawer .bgf-drawer-cat summary::-webkit-details-marker{display:none}
.store-drawer .bgf-drawer-cat .bgf-nav-menu{position:static;display:flex;flex-direction:column;border:0;box-shadow:none;padding:0 0 7px 12px}
.store-drawer .bgf-drawer-cat .bgf-nav-menu a{display:block;padding:11px 18px;border:0}
.store-drawer .bgf-drawer-cat .bgf-nav-leaf{display:block;padding:12px 20px}


/* RC3 - Navegacion de escritorio: padres horizontales; hijos solo en hover/focus o abierto. */
.store-category-bar.bgf-top-categories{position:relative;isolation:isolate;z-index:250;background:#fff;border-bottom:1px solid #dce5f0}
.store-category-bar.bgf-top-categories>.store-shell{display:flex;align-items:stretch;justify-content:flex-start;flex-wrap:nowrap;gap:0;min-width:0;overflow:visible!important}
.bgf-top-categories>.store-shell>.bgf-nav-category{flex:0 1 auto;position:relative;min-width:0}
.bgf-top-categories>.store-shell>.bgf-nav-category>summary{display:flex;gap:8px;align-items:center;padding:12px 13px;white-space:nowrap;background:transparent;border:0;border-right:1px solid #e7edf4;border-radius:0;box-shadow:none;font-weight:600;font-size:13px;line-height:1.4;font-family:inherit;color:#173b65;cursor:pointer}
.bgf-top-categories>.store-shell>.bgf-nav-category:hover>summary,.bgf-top-categories>.store-shell>.bgf-nav-category:focus-within>summary,.bgf-top-categories>.store-shell>.bgf-nav-category[open]>summary{background:#edf5ff;color:#084caa}
.bgf-top-categories .bgf-nav-category>summary::-webkit-details-marker{display:none}
.bgf-top-categories .bgf-nav-category>summary::marker{content:''}
.bgf-top-categories .bgf-nav-caret{flex:none;margin-left:3px;border-width:0 1.8px 1.8px 0;padding:3px;transform:rotate(45deg)}
/* PROBLEMA RC2: display:flex siempre mantenia visibles todos los hijos. */
.bgf-top-categories .bgf-nav-menu{display:none!important;position:absolute;top:100%;left:0;z-index:270;min-width:235px;width:max-content;max-width:min(340px,calc(100vw - 35px));max-height:65vh;overflow-y:auto;overflow-x:hidden;flex-direction:column;gap:0;margin:0;padding:6px;background:#fff;border:1px solid #ccd9e7;border-radius:0 0 9px 9px;box-shadow:0 14px 24px rgba(19,49,84,.18)}
.bgf-top-categories .bgf-nav-category[open]>.bgf-nav-menu,.bgf-top-categories .bgf-nav-category:hover>.bgf-nav-menu,.bgf-top-categories .bgf-nav-category:focus-within>.bgf-nav-menu{display:flex!important}
.bgf-top-categories .bgf-nav-menu a,.bgf-top-categories .bgf-nav-menu summary{display:flex;align-items:center;gap:8px;width:100%;min-height:38px;min-width:0;max-width:100%;padding:9px 11px!important;margin:0;border:0!important;border-radius:5px;background:transparent;color:#173b65!important;font:500 13px/1.4 Arial,Helvetica,sans-serif;text-decoration:none;white-space:normal!important;overflow-wrap:anywhere;box-shadow:none!important;cursor:pointer}
.bgf-top-categories .bgf-nav-menu a:hover,.bgf-top-categories .bgf-nav-menu summary:hover{background:#eef5ff!important;color:#074fa8!important}
.bgf-top-categories .bgf-nav-menu .bgf-nav-all{font-weight:700;background:#eef4fc}
.bgf-top-categories .bgf-nav-menu .bgf-nav-category{position:relative;width:100%}
.bgf-top-categories .bgf-nav-menu .bgf-nav-category>.bgf-nav-menu{position:static;left:auto;top:auto;box-shadow:none;border:0;border-left:2px solid #d7e5f5;margin:2px 0 4px 10px;padding:0 0 0 6px;min-width:0;max-height:none;max-width:calc(100% - 10px)}
.bgf-top-categories .store-category-main,.bgf-top-categories .store-orders-link{display:flex;align-items:center;padding:12px 13px;font-size:13px;white-space:nowrap}
.bgf-top-categories .store-orders-link{margin-left:auto}
@media(max-width:1150px){.store-category-bar.bgf-top-categories{display:none!important}}
/* Cajon movil: acordeon cerrado por defecto. */
.store-drawer .bgf-drawer-cat details>.bgf-nav-menu{display:none!important}
.store-drawer .bgf-drawer-cat details[open]>.bgf-nav-menu{display:flex!important;flex-direction:column}
.store-drawer .bgf-drawer-cat .bgf-nav-menu{position:static;box-shadow:none;max-height:none;overflow:visible}
/* Bloqueo visual de iconos, incluyendo ante estilos globales con reglas SVG agresivas. */
.bgf-order-progress .bgf-order-steps{list-style:none!important;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:0!important;margin:0!important}
.bgf-order-progress .bgf-order-steps>li{display:flex!important;flex-direction:column;align-items:center;justify-content:flex-start;gap:7px;margin:0;padding:4px 0;min-width:0;font-size:12px;line-height:1.35;text-align:center}
.bgf-order-progress .bgf-step-icon{display:inline-flex!important;align-items:center;justify-content:center;flex:0 0 38px;width:38px!important;height:38px!important;min-width:38px;max-width:38px;min-height:38px;max-height:38px;box-sizing:border-box;border-radius:50%}
.bgf-order-progress .bgf-step-icon svg{display:block!important;width:21px!important;height:21px!important;min-width:21px;max-width:21px;min-height:21px;max-height:21px;flex:none!important}
.store-order-history .bgf-history-icon{display:inline-flex!important;flex:0 0 30px;width:30px!important;height:30px!important;min-width:30px;max-width:30px;min-height:30px;max-height:30px;align-items:center;justify-content:center;box-sizing:border-box}
.store-order-history .bgf-history-icon svg{display:block!important;width:17px!important;height:17px!important;min-width:17px;max-width:17px;min-height:17px;max-height:17px;flex:none!important}
.store-orders-table .status-pill svg{display:inline-block!important;width:17px!important;height:17px!important;min-width:17px;max-width:17px;min-height:17px;max-height:17px;vertical-align:middle;flex:none!important}
.store-orders-table .status-pill{vertical-align:middle;white-space:nowrap;font-size:13px;line-height:1.3;padding:5px 9px}
.store-order-history li{grid-template-columns:32px minmax(0,1fr)!important;gap:10px!important}
.store-order-history li:not(:last-child):before{left:15px!important;top:30px!important}
@media(max-width:620px){.bgf-order-progress .bgf-order-steps{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Boton de ojo estatico y funcional en el HTML, no depende de insercion JS. */
.bgf-password-field{position:relative!important;display:block!important;min-width:0;width:100%!important;max-width:100%;margin:4px 0 0!important}
.bgf-password-field>input{display:block;width:100%!important;box-sizing:border-box;padding-right:55px!important;margin:0!important}
.bgf-password-field>.bgf-password-toggle{position:absolute!important;right:5px!important;top:50%!important;transform:translateY(-50%)!important;display:flex!important;align-items:center;justify-content:center;width:42px!important;height:40px!important;min-width:42px;min-height:40px;padding:6px!important;background:#fff!important;border:1px solid #dce5f0!important;border-radius:6px!important;color:#14538d!important;opacity:1!important;visibility:visible!important;z-index:3!important;cursor:pointer}
.bgf-password-field>.bgf-password-toggle svg{display:block!important;width:22px!important;height:22px!important;min-width:22px;max-width:22px}
.bgf-password-field>.bgf-password-toggle:hover{background:#eaf2ff!important}

/* BGF QA1 - Controles agotados: apariencia visual realmente deshabilitada.
   Solo afecta al storefront y solo a elementos con atributo HTML disabled.
   El estado funcional lo determinan el servidor y storefront.js. */
body.storefront .add-cart-form > .btn.primary:disabled,
body.storefront .add-cart-form > .btn.primary:disabled:hover,
body.storefront .add-cart-form > .btn.primary:disabled:active {
    background: #e1e5eb;
    border-color: #c4cbd4;
    color: #747f8d;
    cursor: not-allowed;
    opacity: 1;
    box-shadow: none;
    transform: none;
}
body.storefront .qty-stepper button:disabled,
body.storefront .qty-stepper button:disabled:hover,
body.storefront .qty-stepper button:disabled:active {
    background: #f2f3f5;
    color: #a4acb6;
    cursor: not-allowed;
    opacity: 1;
    box-shadow: none;
    transform: none;
}
body.storefront .qty-stepper input:disabled {
    background: #f5f7f9;
    color: #89939f;
    cursor: not-allowed;
    opacity: 1;
}
