/* ==========================================================================
   FERRUSEC · Diseño moderno de la tienda  (v1 · nov 2026)
   Se carga DESPUÉS de styles.min.css. Todo el diseño vive aquí:
   para cambiar colores, edita solo las variables de :root.
   ========================================================================== */
:root {
    --fx-brand: #175389;        /* azul del logo */
    --fx-brand-600: #12446f;
    --fx-navy: #0b2a5b;         /* azul oscuro del logo */
    --fx-navy-900: #061a3a;
    --fx-accent: #f59e0b;       /* ámbar: llamadas a la acción */
    --fx-accent-600: #d97706;
    --fx-success: #16a34a;
    --fx-danger: #dc2626;
    --fx-ink: #0f172a;
    --fx-text: #334155;
    --fx-muted: #64748b;
    --fx-line: #e2e8f0;
    --fx-soft: #f1f5f9;
    --fx-bg: #f6f8fb;
    --fx-white: #ffffff;
    --fx-radius: 14px;
    --fx-radius-sm: 10px;
    --fx-shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .05);
    --fx-shadow: 0 10px 30px -12px rgba(15, 23, 42, .18);
    --fx-shadow-lg: 0 24px 60px -20px rgba(11, 42, 91, .35);
    --fx-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --fx-max: 1320px;
}

/* ---------- Base ---------- */
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--fx-font) !important;
    font-size: 15px;
    line-height: 1.55 !important;
    color: var(--fx-text) !important;
    background: var(--fx-bg) !important;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 0 !important;
}
h1, h2, h3, h4, h5, h6, .title { font-family: var(--fx-font) !important; color: var(--fx-ink) !important; letter-spacing: -.01em; }
a { color: var(--fx-brand) !important; transition: color .15s ease; }
a:hover, a:focus { color: var(--fx-navy) !important; text-decoration: none; }
img { max-width: 100%; }
::selection { background: rgba(23, 83, 137, .18); }
:focus-visible { outline: 3px solid rgba(245, 158, 11, .55); outline-offset: 2px; }
#wrapper { background: transparent !important; }
.fx-container, .page-contents > .container, .page-contents > .container-fluid {
    width: 100% !important;
    max-width: var(--fx-max) !important;
    margin: 0 auto !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}
.fx-muted { color: var(--fx-muted) !important; }
.page-contents { padding: 32px 0 48px !important; background: transparent !important; max-width: none !important; }


/* styles.min.css trae reglas globales con !important (color gris en span/p/a, fuente y
   peso de títulos). Aquí se neutralizan para que manden los estilos de abajo. */
p, span, td, th, label, input, select, button, li, small, strong { color: inherit !important; line-height: inherit !important; font-family: inherit !important; }
.product_name, .product-name, .panel-title { color: inherit !important; }
.product_price, td:nth-child(2) { color: inherit !important; }
.featured-products .fx-card .btn { opacity: 1 !important; position: static !important; left: auto !important; top: auto !important; margin: 0 !important; }

/* ---------- Botones ---------- */
.btn {
    font-family: var(--fx-font) !important;
    font-weight: 600 !important;
    border-radius: var(--fx-radius-sm) !important;
    padding: 10px 18px;
    transition: background-color .15s ease, box-shadow .15s ease, transform .15s ease, border-color .15s ease;
    text-transform: none !important;
    letter-spacing: 0 !important;
}
.btn-lg { padding: 14px 26px; font-size: 16px; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-primary, .btn-theme, .btn-info {
    background: var(--fx-brand) !important;
    border: 1px solid var(--fx-brand) !important;
    color: #fff !important;
    box-shadow: 0 6px 16px -8px rgba(23, 83, 137, .7);
}
.btn-primary:hover, .btn-theme:hover, .btn-info:hover,
.btn-primary:focus, .btn-theme:focus, .btn-info:focus {
    background: var(--fx-navy) !important;
    border-color: var(--fx-navy) !important;
    color: #fff !important;
}
.btn-default {
    background: #fff !important;
    border: 1px solid var(--fx-line) !important;
    color: var(--fx-ink) !important;
}
.btn-default:hover { border-color: var(--fx-brand) !important; color: var(--fx-brand) !important; }
.btn-success, .fx-btn-success { background: var(--fx-success) !important; border-color: var(--fx-success) !important; color: #fff !important; }
.btn-success:hover, .fx-btn-success:hover { background: #15803d !important; }
.btn-danger { background: var(--fx-danger) !important; border-color: var(--fx-danger) !important; }
.fx-btn-accent { background: var(--fx-accent) !important; border: 0 !important; color: var(--fx-navy-900) !important; font-weight: 700 !important; }
.fx-btn-accent:hover { background: #fbbf24 !important; color: var(--fx-navy-900) !important; transform: translateY(-1px); }

/* Botón "Añadir al carrito" (catálogo, destacados y ficha de producto) */
.add-to-cart, .btn.add-to-cart {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px;
    white-space: nowrap !important;
    background: var(--fx-brand) !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: var(--fx-radius-sm) !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    text-transform: none !important;
    user-select: none;
    -webkit-user-select: none;
    cursor: pointer;
}
.add-to-cart:hover, .add-to-cart:focus { background: var(--fx-navy) !important; color: #fff !important; }
.add-to-cart i, .add-to-cart span { color: #fff !important; pointer-events: none; }
.add-to-cart .padding-right-md { padding-right: 0 !important; }

/* ---------- Formularios ---------- */
.form-control {
    height: 44px;
    border-radius: var(--fx-radius-sm) !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
    font-size: 15px;
    color: var(--fx-ink) !important;
    padding: 10px 14px;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
textarea.form-control { height: auto; }
.form-control:focus { border-color: var(--fx-brand) !important; box-shadow: 0 0 0 4px rgba(23, 83, 137, .12) !important; }
.control-label, .form-group > label { font-weight: 600 !important; font-size: 13px; color: var(--fx-ink) !important; margin-bottom: 6px; }
.fx-pass { position: relative; }
.fx-pass .form-control { padding-right: 44px; }
.fx-pass__toggle {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    border: 0; background: transparent; color: var(--fx-muted) !important; width: 34px; height: 34px; border-radius: 8px;
}
.fx-pass__toggle:hover { color: var(--fx-brand) !important; background: var(--fx-soft); }

/* ==========================================================================
   CABECERA
   ========================================================================== */
.fx-header { position: relative; z-index: 1000; }

/* Barra superior */
.fx-topbar {
    background: var(--fx-navy-900) !important;
    color: #cbd5e1 !important;
    font-size: 13px;
    padding: 0 !important;
    border: 0 !important;
}
.fx-topbar__inner { display: flex; align-items: center; justify-content: space-between; min-height: 40px; gap: 16px; }
.fx-topbar__info, .fx-topbar__actions { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.fx-topbar__info li { display: flex; align-items: center; gap: 6px; padding-right: 16px; color: #cbd5e1 !important; }
.fx-topbar__info li i { color: var(--fx-accent) !important; }
.fx-topbar a, .fx-topbar .btn { color: #e2e8f0 !important; font-size: 13px !important; background: transparent !important; }
.fx-topbar a:hover { color: #fff !important; }
.fx-topbar__actions > li > a, .fx-topbar__actions > li > .btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 10px !important; border-radius: 8px !important; border: 0 !important; box-shadow: none !important;
}
.fx-topbar__actions > li > a:hover, .fx-topbar__actions > li > .btn:hover { background: rgba(255, 255, 255, .08) !important; }
.fx-topbar__login { background: rgba(255, 255, 255, .1) !important; font-weight: 600 !important; }
.fx-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
    background: var(--fx-accent); color: var(--fx-navy-900) !important; font-size: 11px; font-weight: 700 !important;
}
.fx-topbar .dropdown-menu { margin-top: 8px; }

/* Menús desplegables en general */
.dropdown-menu {
    border: 1px solid var(--fx-line) !important;
    border-radius: var(--fx-radius) !important;
    box-shadow: var(--fx-shadow-lg) !important;
    padding: 8px !important;
    font-size: 14px;
}
.dropdown-menu > li > a { border-radius: 8px; padding: 9px 12px; color: var(--fx-text) !important; }
.dropdown-menu > li > a i { width: 18px; color: var(--fx-muted) !important; }
.dropdown-menu > li > a:hover { background: var(--fx-soft) !important; color: var(--fx-brand) !important; }
.dropdown-menu .divider { margin: 6px 0; background: var(--fx-line); }

/* Ingreso desde la cabecera */
.fx-login { width: 320px; padding: 18px !important; color: var(--fx-ink) !important; }
.fx-login label, .fx-login .checkbox span { color: var(--fx-ink) !important; }
.fx-login a { color: var(--fx-brand) !important; font-size: 13px !important; }
.fx-login .btn-primary { width: 100%; height: 44px; }

/* Logo + buscador + carrito */
.fx-main { background: #fff !important; padding: 0 !important; box-shadow: none !important; border-bottom: 1px solid var(--fx-line); }
.fx-main__inner { display: flex; align-items: center; gap: 28px; min-height: 88px; }
.fx-logo { flex: 0 0 auto; display: block; }
.fx-logo img { height: 52px; width: auto; display: block; }
.fx-search { flex: 1 1 auto; max-width: 720px; }
.fx-search form { position: relative; display: flex; align-items: center; margin: 0; }
.fx-search .form-control {
    height: 50px !important;
    padding: 0 120px 0 46px !important;
    border-radius: 999px !important;
    border: 1.5px solid var(--fx-line) !important;
    background: var(--fx-soft) !important;
    font-size: 15px !important;
}
.fx-search .form-control:focus { background: #fff !important; border-color: var(--fx-brand) !important; }
.fx-search__icon { position: absolute; left: 18px; color: var(--fx-muted) !important; font-size: 16px; pointer-events: none; }
.fx-search__btn {
    position: absolute; right: 5px; top: 5px; bottom: 5px;
    border: 0; border-radius: 999px; padding: 0 22px;
    background: var(--fx-brand); color: #fff !important; font-weight: 600 !important; font-size: 14px;
    transition: background .15s ease;
}
.fx-search__btn:hover { background: var(--fx-navy); }
.fx-cart { margin-left: auto; flex: 0 0 auto; position: relative; }
.fx-cart__btn {
    display: inline-flex !important; align-items: center; gap: 12px;
    background: #fff !important; border: 1.5px solid var(--fx-line) !important; border-radius: 999px !important;
    padding: 8px 18px 8px 8px !important; color: var(--fx-ink) !important; box-shadow: none !important;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.fx-cart__btn > i {
    width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: var(--fx-brand); color: #fff !important; font-size: 16px;
}
.fx-cart__btn:hover { border-color: var(--fx-brand) !important; box-shadow: var(--fx-shadow) !important; }
.fx-cart__label { display: flex; flex-direction: column; line-height: 1.2 !important; text-align: left; }
.fx-cart__label small { color: var(--fx-muted) !important; font-size: 11px; font-weight: 500 !important; }
.fx-cart__label .cart-total-items { font-weight: 700 !important; font-size: 14px; background: none !important; border: 0 !important; padding: 0 !important; color: var(--fx-ink) !important; box-shadow: none !important; }
.fx-cart__menu { width: 360px; padding: 14px !important; margin-top: 10px !important; }
#cart-items { margin-bottom: 12px; }
#cart-items td { border: 0 !important; border-bottom: 1px solid var(--fx-soft) !important; padding: 10px 6px !important; vertical-align: middle !important; font-size: 13px; }
#cart-items img { width: 46px; height: 46px; object-fit: contain; border-radius: 8px; border: 1px solid var(--fx-line); background: #fff; }
#cart-items a { color: var(--fx-ink) !important; font-weight: 500 !important; }
#cart-items tfoot td { font-weight: 700 !important; color: var(--fx-ink) !important; border-bottom: 0 !important; }
#cart-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#cart-links .btn { width: 100%; }
#cart-empty { padding: 18px 8px; text-align: center; color: var(--fx-muted) !important; }

/* Menú principal */
.fx-nav.navbar {
    background: #fff !important;
    border: 0 !important;
    border-bottom: 1px solid var(--fx-line) !important;
    border-radius: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    box-shadow: 0 6px 18px -14px rgba(15, 23, 42, .4);
}
.fx-nav .navbar-collapse { padding-left: 0 !important; padding-right: 0 !important; }
.fx-nav .navbar-nav > li > a,
#wrapper .fx-nav .navbar-nav > li > a {
    color: var(--fx-text) !important;
    background: transparent !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    padding: 16px 16px !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    position: relative;
}
.fx-nav .navbar-nav > li > a::after {
    content: ''; position: absolute; left: 16px; right: 16px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0;
    background: var(--fx-brand); transform: scaleX(0); transition: transform .2s ease; display: block !important;
}
.fx-nav .navbar-nav > li > a:hover, .fx-nav .navbar-nav > li.open > a,
#wrapper .fx-nav .navbar-nav > li.active > a { color: var(--fx-brand) !important; background: transparent !important; }
.fx-nav .navbar-nav > li > a:hover::after, .fx-nav .navbar-nav > li.active > a::after, .fx-nav .navbar-nav > li.open > a::after { transform: scaleX(1); }
.fx-nav .navbar-nav > li:first-child > a { padding-left: 0 !important; }
.fx-nav .navbar-nav > li:first-child > a::after { left: 0; }
.fx-nav .navbar-nav > li > a > .fa-th-large { margin-right: 4px; }
.fx-nav__promo { color: var(--fx-accent-600) !important; }
.fx-nav__promo i { color: var(--fx-accent) !important; }
.fx-nav__right > li > a { color: var(--fx-success) !important; }
.fx-nav__right > li > a:hover { color: #15803d !important; }
.fx-nav__right > li > a::after { display: none !important; }

/* Mega menú de categorías */
.fx-mega { position: static !important; }
.fx-nav .fx-container { position: relative; }
.fx-mega__menu {
    left: 20px !important; right: auto;
    width: min(920px, calc(100vw - 40px)) !important;
    padding: 0 !important; margin-top: 0 !important; overflow: hidden;
    border-top-left-radius: 0 !important; border-top-right-radius: 0 !important;
}
.fx-mega__list { list-style: none; margin: 0; padding: 12px; width: 300px; min-height: 380px; background: var(--fx-soft); position: static; }
.fx-mega__item { position: static; }
.fx-mega__link {
    display: flex !important; justify-content: space-between; align-items: center;
    padding: 10px 14px; border-radius: 10px; color: var(--fx-text) !important; font-weight: 500 !important; font-size: 14px;
}
.fx-mega__link i { opacity: .35; transition: transform .15s ease, opacity .15s ease; }
.fx-mega__panel {
    display: none; position: absolute; top: 0; bottom: 0; left: 300px; right: 0; overflow-y: auto;
    padding: 26px 30px; background: #fff;
}
.fx-mega__panel h3 { margin: 0 0 16px; font-size: 18px; font-weight: 700 !important; }
.fx-mega__subs { list-style: none; margin: 0 0 20px; padding: 0; columns: 2; column-gap: 24px; }
.fx-mega__subs li { break-inside: avoid; margin-bottom: 4px; }
.fx-mega__subs a { display: inline-block; padding: 5px 0; color: var(--fx-text) !important; font-size: 14px; }
.fx-mega__subs a:hover { color: var(--fx-brand) !important; }
.fx-mega__all { display: inline-flex; align-items: center; gap: 8px; font-weight: 600 !important; font-size: 14px; }
/* El primer elemento se ve abierto por defecto, los demás al pasar el mouse */
.fx-mega__item:hover > .fx-mega__panel,
.fx-mega__list:not(:hover) > .fx-mega__item:first-child > .fx-mega__panel { display: block; }
.fx-mega__item:hover > .fx-mega__link,
.fx-mega__list:not(:hover) > .fx-mega__item:first-child > .fx-mega__link { background: #fff; color: var(--fx-brand) !important; box-shadow: var(--fx-shadow-sm); }
.fx-mega__item:hover > .fx-mega__link i { opacity: 1; transform: translateX(3px); }
.fx-mega__menu { display: none; }
.fx-mega.open > .fx-mega__menu { display: flex; }

/* Marcas */
.fx-brands { padding: 12px !important; width: 520px; max-width: calc(100vw - 40px); display: none; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.open > .fx-brands { display: grid; }
.fx-brands a { padding: 8px 10px; border-radius: 8px; color: var(--fx-text) !important; font-size: 14px; }
.fx-brands a:hover { background: var(--fx-soft); color: var(--fx-brand) !important; }

/* Cabecera compacta al bajar */
@media (min-width: 992px) {
    .fx-header { position: sticky; top: 0; }
    body.is-scrolled .fx-topbar { display: none; }
    body.is-scrolled .fx-main__inner { min-height: 68px; }
    body.is-scrolled .fx-logo img { height: 40px; }
}

/* ==========================================================================
   PORTADA
   ========================================================================== */
.fx-hero { padding: 24px 0 8px; }
.fx-hero__grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.fx-hero__slider, .fx-hero__slider .carousel, .fx-hero__slider .carousel-inner { border-radius: 20px; overflow: hidden; }
.fx-hero__slider { box-shadow: var(--fx-shadow); background: var(--fx-navy); }
.fx-hero__slider .item img { width: 100%; height: auto; max-height: 520px; object-fit: cover; display: block; }
.fx-hero__slider .carousel-control {
    width: 44px; height: 44px; top: 50%; margin-top: -22px; border-radius: 50%;
    background: rgba(255, 255, 255, .9) !important; color: var(--fx-ink) !important; opacity: 0; text-shadow: none;
    display: flex; align-items: center; justify-content: center; font-size: 16px; transition: opacity .2s ease;
}
.fx-hero__slider .carousel-control.left { left: 16px; }
.fx-hero__slider .carousel-control.right { right: 16px; }
.fx-hero__slider:hover .carousel-control { opacity: 1; }
.fx-hero__slider .carousel-indicators { bottom: 14px; margin-bottom: 0; }
.fx-hero__slider .carousel-indicators li { width: 8px; height: 8px; margin: 0 3px; border: 0; background: rgba(255, 255, 255, .55); transition: width .2s ease; }
.fx-hero__slider .carousel-indicators .active { width: 24px; height: 8px; margin: 0 3px; background: #fff; border-radius: 4px; }
.fx-hero__slider .carousel-caption { text-shadow: 0 2px 12px rgba(0, 0, 0, .4); }
.fx-hero__fallback {
    height: 100%; min-height: 380px; padding: 48px; color: #fff !important; display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
    background: radial-gradient(1000px 400px at 90% 10%, rgba(245, 158, 11, .25), transparent 60%), linear-gradient(135deg, var(--fx-navy) 0%, var(--fx-brand) 100%);
}
.fx-hero__fallback h1 { color: #fff !important; font-size: 40px; font-weight: 800 !important; line-height: 1.1 !important; max-width: 560px; margin: 8px 0 14px; }
.fx-hero__fallback p { color: #dbe5f1 !important; font-size: 17px; max-width: 480px; margin-bottom: 24px; }
.fx-hero__side { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.fx-promo {
    border-radius: 20px; padding: 24px 28px; background: #fff; border: 1px solid var(--fx-line);
    display: grid; grid-template-columns: 1fr auto; grid-template-areas: "eye btn" "h btn" "p btn"; column-gap: 20px; align-items: center;
}
.fx-promo .fx-eyebrow { grid-area: eye; } .fx-promo h2 { grid-area: h; } .fx-promo p { grid-area: p; margin-bottom: 0 !important; } .fx-promo .btn { grid-area: btn; }
.fx-promo h2 { font-size: 20px; font-weight: 700 !important; margin: 6px 0 6px; }
.fx-promo p { color: var(--fx-muted) !important; font-size: 14px; margin: 0 0 16px; }
.fx-promo--dark { background: linear-gradient(150deg, var(--fx-navy-900), var(--fx-brand)); border: 0; color: #fff !important; }
.fx-promo--dark h2 { color: #fff !important; }
.fx-promo--dark p { color: #c7d5e8 !important; }
.fx-eyebrow { font-size: 12px; font-weight: 700 !important; letter-spacing: .08em; text-transform: uppercase; color: var(--fx-accent-600) !important; }
.fx-promo--dark .fx-eyebrow, .fx-hero__fallback .fx-eyebrow { color: var(--fx-accent) !important; }

/* Secciones */
.fx-section { padding: 28px 0 !important; }
.fx-section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.fx-section__head h2 { margin: 0; font-size: 24px; font-weight: 800 !important; }
.fx-link { font-weight: 600 !important; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }

/* Categorías */
.fx-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 14px; }
.fx-cat {
    display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
    padding: 18px 12px; background: #fff; border: 1px solid var(--fx-line); border-radius: var(--fx-radius);
    color: var(--fx-ink) !important; font-weight: 600 !important; font-size: 14px; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.fx-cat img { width: 64px; height: 64px; object-fit: contain; }
.fx-cat__icon { width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: #e8f0f8; color: var(--fx-brand) !important; font-size: 22px; }
.fx-cat:hover { transform: translateY(-3px); box-shadow: var(--fx-shadow); border-color: transparent; }

/* ==========================================================================
   TARJETAS DE PRODUCTO
   ========================================================================== */
.fx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.fx-card {
    position: relative; display: flex; flex-direction: column;
    background: #fff !important; border: 1px solid var(--fx-line) !important; border-radius: var(--fx-radius) !important;
    overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    padding: 0 !important; margin: 0 !important; min-height: 0 !important; height: auto !important;
}
.fx-card:hover { transform: translateY(-4px); box-shadow: var(--fx-shadow); border-color: transparent !important; }
.fx-card__img { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; padding: 22px; background: #fff; }
.fx-card__img img { width: 100% !important; height: 100% !important; object-fit: contain !important; margin: 0 !important; transition: transform .3s ease; }
.fx-card:hover .fx-card__img img { transform: scale(1.04); }
.fx-card__badge {
    position: absolute; top: 12px; left: 12px; z-index: 2;
    background: var(--fx-danger); color: #fff !important; font-size: 11px; font-weight: 700 !important; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em;
}
.fx-card__body { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 16px; border-top: 1px solid var(--fx-soft); flex: 1; }
.fx-card__name {
    color: var(--fx-ink) !important; font-weight: 500 !important; font-size: 14px; line-height: 1.4 !important;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 39px;
}
.fx-card__name:hover { color: var(--fx-brand) !important; }
.fx-card__price { margin-top: auto; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.fx-card__price strong { font-size: 20px; font-weight: 800 !important; color: var(--fx-ink) !important; letter-spacing: -.02em; }
.fx-card__price del { color: var(--fx-muted) !important; font-size: 13px; }
.fx-card__btn { width: 100%; height: 42px; padding: 0 12px !important; }
.fx-card__login { display: none; }

/* Catálogo (tarjetas que arma el sistema por AJAX) */
#results .product-container { padding-left: 9px; padding-right: 9px; margin-bottom: 18px; }
#results { margin-left: 15px !important; margin-right: 15px !important; }
#results .row { margin-left: -9px; margin-right: -9px; }
#results .product {
    display: flex !important; flex-direction: column !important; height: 100% !important;
    background: #fff !important; border: 1px solid var(--fx-line) !important; border-radius: var(--fx-radius) !important;
    padding: 0 !important; margin: 0 !important; box-shadow: none !important; overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
#results .product:hover { transform: translateY(-4px); box-shadow: var(--fx-shadow) !important; border-color: transparent !important; }
#results .product .product-top { display: flex; flex-direction: column; flex: 1; }
#results .product .product-image { float: none !important; width: 100% !important; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; padding: 20px; background: #fff; }
#results .product .product-image img { max-height: 100%; width: auto; max-width: 100%; object-fit: contain; margin: 0 auto; }
#results .product .product-desc { float: none !important; width: 100% !important; padding: 12px 16px 0 !important; border-top: 1px solid var(--fx-soft); }
#results .product .product-name {
    font-size: 14px !important; font-weight: 500 !important; line-height: 1.4 !important; color: var(--fx-ink) !important; margin: 0 !important;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 39px; text-transform: none !important;
}
#results .product .product-name:hover { color: var(--fx-brand) !important; }
#results .product .product-desc p { display: none !important; } /* la descripción larga se ve en la ficha */
#results .product .product-bottom {
    display: grid !important; grid-template-columns: 1fr auto; align-items: center; gap: 10px;
    padding: 10px 16px 16px !important; background: transparent !important; border: 0 !important;
}
#results .product .product-price {
    float: none !important; width: auto !important; padding: 0 !important; text-align: left !important;
    font-size: 20px !important; font-weight: 800 !important; color: var(--fx-ink) !important; line-height: 1.2 !important; letter-spacing: -.02em;
}
#results .product .product-price del { display: block; font-size: 12px !important; font-weight: 500 !important; color: var(--fx-muted) !important; }
#results .product .product-rating { float: none !important; width: auto !important; padding: 0 !important; }
#results .product .input-group { width: 104px !important; height: 36px; display: flex !important; border: 1px solid var(--fx-line); border-radius: 10px; overflow: hidden; }
#results .product .input-group-addon { width: 32px !important; padding: 0 !important; display: flex !important; align-items: center; justify-content: center; background: var(--fx-soft) !important; border: 0 !important; color: var(--fx-text) !important; font-size: 11px; }
#results .product .input-group .form-control { width: 40px !important; height: 34px !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; text-align: center; font-weight: 700 !important; }
#results .product .product-cart-button { grid-column: 1 / -1; float: none !important; width: 100% !important; padding: 0 !important; }
#results .product .product-cart-button .btn-group { display: flex !important; gap: 8px; width: 100%; }
#results .product .product-cart-button .btn { float: none !important; height: 42px; padding: 0 12px !important; border-radius: var(--fx-radius-sm) !important; }
#results .product .product-cart-button .add-to-cart { flex: 1; width: auto !important; margin: 0 !important; }
#results .product .add-to-wishlist {
    flex: 0 0 42px; width: 42px; background: #fff !important; border: 1px solid var(--fx-line) !important; color: var(--fx-danger) !important; box-shadow: none !important;
}
#results .product .add-to-wishlist:hover { background: #fef2f2 !important; border-color: #fecaca !important; }
#results .product .badge, .featured-products .badge {
    position: absolute; top: 12px; left: 12px; right: auto; z-index: 2;
    background: var(--fx-danger) !important; color: #fff !important; font-size: 11px; font-weight: 700 !important; padding: 4px 10px; border-radius: 999px; text-transform: uppercase;
}
#results .product .image_overlay { display: none !important; }

/* Barra de orden / vista y filtros */
#grid-selector {
    display: flex; align-items: center; flex-wrap: wrap; gap: 16px;
    background: #fff; border: 1px solid var(--fx-line); border-radius: var(--fx-radius); padding: 10px 16px; margin-bottom: 18px;
    color: var(--fx-muted) !important; font-size: 13px;
}
#grid-selector #grid-menu, #grid-selector #grid-sort { float: none !important; display: flex; align-items: center; gap: 8px; margin: 0 !important; }
#grid-selector #grid-menu ul { display: flex; gap: 4px; margin: 0; padding: 0; }
#grid-selector #grid-menu li { list-style: none; width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--fx-muted) !important; border: 1px solid var(--fx-line); }
#grid-selector #grid-menu li.active, #grid-selector #grid-menu li:hover { background: var(--fx-brand); border-color: var(--fx-brand); color: #fff !important; }
#grid-selector .page-info { margin-left: auto; float: none !important; }
#grid-selector .bootstrap-select .btn { height: 36px; border-radius: 8px !important; }
#sticky-con { background: #fff; border: 1px solid var(--fx-line); border-radius: var(--fx-radius); padding: 18px; }
#sticky-con .title, #sticky-con h4, #sticky-con h5 { font-size: 13px !important; font-weight: 700 !important; text-transform: uppercase; letter-spacing: .06em; color: var(--fx-ink) !important; margin-top: 0 !important; border: 0 !important; }
#sticky-con .title span { border: 0 !important; padding: 0 !important; }
#sticky-con .margin-bottom-xl { margin-bottom: 22px !important; }
#sticky-con .list-group-item { border-radius: 8px !important; border-color: var(--fx-line); font-size: 13px; }
#sticky-con .checkbox label { font-size: 14px; color: var(--fx-text) !important; }
#sticky-con .form-control { height: 38px; font-size: 14px; }
#sticky-con .carousel .product { border: 1px solid var(--fx-line) !important; border-radius: var(--fx-radius) !important; padding: 12px !important; background: #fff !important; }
#sticky-con .carousel .product img { max-height: 140px; width: 100%; object-fit: contain; }

/* Paginación */
.pagination > li > a, .pagination > li > span {
    border: 1px solid var(--fx-line) !important; color: var(--fx-text) !important; margin: 0 3px; border-radius: 10px !important;
    min-width: 40px; height: 40px; display: inline-flex !important; align-items: center; justify-content: center; padding: 0 10px !important;
}
.pagination > .active > a, .pagination > .active > span, .pagination > li > a:hover { background: var(--fx-brand) !important; border-color: var(--fx-brand) !important; color: #fff !important; }

/* Ficha de producto, carrito, checkout, cuenta: contenedores tipo tarjeta */
.page-contents .panel, .page-contents .well, .page-contents .tab-content, .page-contents .table-responsive {
    background: #fff; border: 1px solid var(--fx-line) !important; border-radius: var(--fx-radius) !important; box-shadow: none !important;
}
.page-contents .panel-heading { background: transparent !important; border-bottom: 1px solid var(--fx-line) !important; font-weight: 700 !important; color: var(--fx-ink) !important; }
.page-contents .table > thead > tr > th { border-bottom: 1px solid var(--fx-line) !important; color: var(--fx-muted) !important; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600 !important; }
.page-contents .table > tbody > tr > td { border-top: 1px solid var(--fx-soft) !important; vertical-align: middle; }
.page-contents .nav-tabs { border-bottom: 1px solid var(--fx-line) !important; }
.page-contents .nav-tabs > li > a { border: 0 !important; color: var(--fx-muted) !important; font-weight: 600 !important; border-bottom: 3px solid transparent !important; background: transparent !important; }
.page-contents .nav-tabs > li.active > a { color: var(--fx-brand) !important; border-bottom-color: var(--fx-brand) !important; }
.page-contents .tab-content { padding: 28px; }
.breadcrumb { background: transparent !important; padding: 0 !important; font-size: 13px; }
.alert { border-radius: var(--fx-radius-sm) !important; border: 0; }

/* ==========================================================================
   MODO B2B: visitantes sin sesión no ven precios ni carrito
   ========================================================================== */
body.is-guest .add-to-cart, body.is-guest .product-price, body.is-guest .product_price,
body.is-guest .fx-card__price, body.is-guest .product-bottom, body.is-guest .cart-btn,
body.is-guest .shopping-cart, body.is-guest .btn-cart-xs, body.is-guest #cart-items,
body.is-guest .fx-nav a[href*="cart"], body.is-guest .fx-footer a[href*="cart"],
body.is-guest .fx-footer a[href*="orders"], body.is-guest del.text-red, body.is-guest .price { display: none !important; }
body.is-guest .fx-card__login {
    display: inline-flex; align-items: center; gap: 8px; margin-top: auto;
    font-size: 13px; font-weight: 600 !important; color: var(--fx-brand) !important;
    background: #eef4fb; border-radius: var(--fx-radius-sm); padding: 10px 12px; justify-content: center;
}
body.is-guest #results .product .product-top::after {
    content: "\f023  Inicia sesión para ver el precio"; font-family: var(--fx-font), FontAwesome !important;
    display: block; margin: 12px 16px 16px; padding: 10px 12px; border-radius: var(--fx-radius-sm);
    background: #eef4fb; color: var(--fx-brand) !important; font-size: 13px; font-weight: 600 !important; text-align: center;
}

/* ==========================================================================
   PIE DE PÁGINA
   ========================================================================== */
.fx-benefits { background: #fff; border-top: 1px solid var(--fx-line); padding: 28px 0; margin-top: 24px; }
.fx-benefits__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.fx-benefit { display: flex; align-items: center; gap: 14px; }
.fx-benefit > i {
    flex: 0 0 48px; width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
    background: #e8f0f8; color: var(--fx-brand) !important; font-size: 20px;
}
.fx-benefit strong { display: block; color: var(--fx-ink) !important; font-size: 14px; }
.fx-benefit span { display: block; color: var(--fx-muted) !important; font-size: 13px; }

.fx-footer { background: var(--fx-navy-900); color: #b8c4d6 !important; padding-top: 56px; font-size: 14px; position: static !important; }
.fx-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 44px; }
.fx-footer h4 { color: #fff !important; font-size: 13px; font-weight: 700 !important; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 18px; }
.fx-footer ul { list-style: none; padding: 0; margin: 0; }
.fx-footer ul li { margin-bottom: 10px; }
.fx-footer a { color: #d6deea !important; }
.fx-footer a:hover { color: #fff !important; }
.fx-footer__logo { width: 200px; height: auto; margin-bottom: 18px; display: block; }
.fx-footer__brand p { line-height: 1.7 !important; margin-bottom: 20px; max-width: 340px; }
.fx-social { display: flex; gap: 10px; }
.fx-social a {
    width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .08); color: #fff !important; font-size: 17px; transition: background .15s ease, transform .15s ease;
}
.fx-social a:hover { background: var(--fx-brand); transform: translateY(-2px); }
.fx-footer__contact li { display: flex; gap: 10px; align-items: flex-start; }
.fx-footer__contact i { color: var(--fx-accent) !important; width: 16px; margin-top: 3px; text-align: center; }
.fx-footer__pay-title { margin-top: 24px !important; }
.fx-pay { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-pay__chip { background: #fff; color: var(--fx-navy-900) !important; font-weight: 800 !important; font-size: 12px; padding: 6px 10px; border-radius: 8px; letter-spacing: -.01em; }
.fx-pay__yape { color: #742284 !important; font-size: 14px; padding: 4px 12px; }
.fx-reclamos {
    margin-top: 16px; display: inline-flex; align-items: center; gap: 12px; padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, .18); border-radius: 12px; transition: border-color .15s ease, background .15s ease;
}
.fx-reclamos:hover { border-color: var(--fx-accent); background: rgba(255, 255, 255, .04); }
.fx-reclamos i { font-size: 22px; color: var(--fx-accent) !important; }
.fx-reclamos span { display: flex; flex-direction: column; line-height: 1.3 !important; }
.fx-reclamos strong { color: #fff !important; font-size: 14px; }
.fx-reclamos small { color: #94a3b8 !important; font-size: 12px; }
.fx-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding: 18px 0; font-size: 13px; color: #8b9ab0 !important; }
.fx-footer__bottom .fx-container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.fx-footer__bottom .fx-muted { color: #8b9ab0 !important; }

/* WhatsApp flotante */
.fx-wa { position: fixed; right: 22px; bottom: 22px; z-index: 1050; display: flex; align-items: center; gap: 10px; text-decoration: none !important; }
.fx-wa__text {
    background: #fff; color: var(--fx-ink) !important; font-size: 13px; font-weight: 600 !important; padding: 9px 14px; border-radius: 999px;
    box-shadow: var(--fx-shadow); white-space: nowrap; transition: transform .2s ease;
}
.fx-wa__btn {
    width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff !important; font-size: 30px;
    display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 24px -8px rgba(37, 211, 102, .8); transition: transform .2s ease;
}
.fx-wa:hover .fx-wa__btn { transform: scale(1.06); }
.fx-wa:hover .fx-wa__text { transform: translateX(-3px); }

/* Volver arriba */
.fx-top {
    position: fixed; right: 30px; bottom: 92px; z-index: 1040; width: 40px; height: 40px; border-radius: 12px;
    background: #fff; color: var(--fx-ink) !important; box-shadow: var(--fx-shadow); display: flex; align-items: center; justify-content: center;
    font-size: 20px; opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s ease;
}
.fx-top.is-visible { opacity: 1; visibility: visible; }
.back-to-top { display: none !important; }

/* Aviso de cookies */
.fx-cookie {
    position: fixed; left: 20px; bottom: 20px; z-index: 1060; max-width: 440px; display: flex; gap: 14px; align-items: center;
    background: #fff; border: 1px solid var(--fx-line); border-radius: var(--fx-radius); padding: 14px 16px; box-shadow: var(--fx-shadow-lg); font-size: 13px;
}
.fx-cookie p { margin: 0; }

/* SweetAlert y carga */
.swal2-modal { border-radius: 18px !important; font-family: var(--fx-font) !important; }
.swal2-modal .swal2-styled { border-radius: 10px !important; }
#loading .wave .rect { background: var(--fx-brand) !important; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1199px) {
    .fx-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 991px) {
    .fx-main__inner { flex-wrap: wrap; gap: 14px; padding-top: 14px; padding-bottom: 14px; }
    .fx-search { order: 3; flex-basis: 100%; max-width: none; }
    .fx-benefits__grid { grid-template-columns: 1fr 1fr; }
    .fx-nav .navbar-nav > li > a { padding: 14px 12px !important; }
}
@media (max-width: 767px) {
    body { font-size: 14px; }
    .fx-container, .page-contents > .container, .page-contents > .container-fluid { padding-left: 16px !important; padding-right: 16px !important; }
    .fx-topbar__inner { justify-content: flex-end; min-height: 38px; }
    .fx-logo img { height: 40px; }
    .fx-cart__btn { padding: 4px !important; }
    .fx-search .form-control { height: 46px !important; padding-right: 96px !important; }
    .fx-search__btn { padding: 0 16px; }

    .fx-nav .navbar-header { display: flex; align-items: center; justify-content: space-between; margin: 0 !important; }
    .fx-nav__toggle {
        float: none !important; margin: 8px 0 !important; border: 1px solid var(--fx-line) !important; border-radius: 10px !important;
        background: #fff !important; color: var(--fx-ink) !important; font-weight: 600 !important; padding: 8px 14px !important;
    }
    .fx-nav__cartxs { display: none !important; }
    .fx-nav__cartxs-old {
        display: inline-flex !important; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px;
        background: var(--fx-brand); color: #fff !important; font-weight: 600 !important; font-size: 13px;
    }
    .fx-nav__cartxs .cart-total-items { color: #fff !important; background: none !important; border: 0 !important; padding: 0 !important; box-shadow: none !important; }
    .fx-nav .navbar-collapse { border: 0 !important; box-shadow: none !important; max-height: none; }
    .fx-nav .navbar-nav { margin: 0 0 10px !important; }
    .fx-nav .navbar-nav > li > a, .fx-nav .navbar-nav > li:first-child > a { padding: 12px 4px !important; border-bottom: 1px solid var(--fx-soft) !important; }
    .fx-nav .navbar-nav > li > a::after { display: none !important; }
    .fx-mega__menu, .fx-brands { position: static !important; width: 100% !important; box-shadow: none !important; border: 0 !important; float: none !important; }
    .fx-mega.open > .fx-mega__menu { display: block; }
    .fx-mega__list { width: 100%; min-height: 0; padding: 6px; }
    .fx-mega__panel { position: static; width: 100%; padding: 6px 14px 14px; display: none !important; background: transparent; }
    .fx-mega__item.is-open > .fx-mega__panel { display: block !important; }
    .fx-mega__list:not(:hover) > .fx-mega__item:first-child > .fx-mega__link { background: transparent; box-shadow: none; }
    .fx-mega__subs { columns: 1; margin-bottom: 10px; }
    .fx-brands { grid-template-columns: 1fr 1fr; }

    .fx-hero { padding-top: 14px; }
    .fx-hero__side { grid-template-columns: 1fr; gap: 12px; }
    .fx-hero__slider, .fx-hero__slider .carousel, .fx-hero__slider .carousel-inner { border-radius: 14px; }
    .fx-promo { grid-template-columns: 1fr; grid-template-areas: "eye" "h" "p" "btn"; padding: 20px; }
    .fx-promo .btn { margin-top: 14px; justify-self: start; }
    .fx-hero__fallback { padding: 28px; min-height: 260px; }
    .fx-hero__fallback h1 { font-size: 28px; }
    .fx-section__head h2 { font-size: 20px; }
    .fx-cats { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
    .fx-cats { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
    .fx-cat { flex: 0 0 128px; scroll-snap-align: start; }
    .fx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .fx-card__img { padding: 14px; }
    .fx-card__body { padding: 12px; }
    .fx-card__price strong { font-size: 17px; }
    .fx-card__btn { font-size: 13px !important; }
    #results .product-container { width: 50% !important; float: left; padding-left: 6px; padding-right: 6px; }
    #results .row { margin-left: -6px; margin-right: -6px; }
    #results .product .product-bottom { grid-template-columns: 1fr; }
    #results .product .product-rating { display: none; }
    #results .product .add-to-wishlist { display: none !important; }
    #results .product .product-cart-button .add-to-cart { font-size: 13px !important; padding: 0 8px !important; }
    #results .product .product-image { padding: 12px; }
    #results .product .product-desc { padding: 10px 12px 0 !important; }
    #results .product .product-bottom { padding: 8px 12px 12px !important; }
    #sticky-con { margin-bottom: 18px; }

    .fx-benefits__grid { grid-template-columns: 1fr; gap: 14px; }
    .fx-footer__grid { grid-template-columns: 1fr; gap: 28px; }
    .fx-wa { right: 16px; bottom: 16px; }
    .fx-wa__text { display: none; }
    .fx-top { right: 22px; bottom: 82px; }
    .fx-cookie { left: 12px; right: 12px; bottom: 84px; max-width: none; }
    .fx-login { width: 290px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
