/* =============================================================
   La Industrial — Web E-Commerce CSS
   ============================================================= */

:root {
    /* Más oscuro, menos saturado — industrial profesional */
    --primary:      #1b2c47;
    --primary-dark: #0f1d30;
    --accent:       #c45c00;   /* naranja industrial, no neón */
    --accent-dark:  #a34a00;
    --accent-light: #fff0e6;   /* fondo suave para tiles/iconos */
    --bg:           #f1f3f6;
    --card-bg:      #ffffff;
    --text:         #1a202c;
    --text-muted:   #64748b;
    --border:       #dde2ea;
    --success-bg:   #d1fae5;
    --success-txt:  #065f46;
    --warning-bg:   #fef3c7;
    --warning-txt:  #92400e;
    --info-bg:      #dbeafe;
    --info-txt:     #1e40af;
    --danger-bg:    #fee2e2;
    --danger-txt:   #991b1b;
}

/* ---- Base ---- */
body            { font-family: 'Inter', 'Roboto', sans-serif; background: var(--bg); color: var(--text); }
a               { color: var(--primary); }
a:hover         { color: var(--accent); text-decoration: none; }
.btn            { border-radius: 6px; font-weight: 500; }
.btn-primary    { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-accent     { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }

/* ============================================================
   HEADER: 3 capas (topbar + main-header + cat-nav)
   ============================================================ */

.site-header-wrap {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1040;
    box-shadow: 0 2px 12px rgba(0,0,0,0.22);
}

/* ---- Main Header ---- */
.main-header {
    background: var(--primary);
    padding: 10px 0;
}
.mh-inner {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Logo */
.mh-logo { flex-shrink: 0; display: flex; align-items: center; text-decoration: none; }
.mh-logo img {
    height: 52px;
    object-fit: contain;
    display: block;
    /* sin cajita — respira directo sobre el fondo oscuro */
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
}
.mh-logo-text { color: #fff; font-size: 22px; font-weight: 300; }
.mh-logo-text strong { color: var(--accent); font-weight: 700; }
.mh-logo:hover { text-decoration: none; opacity: 0.9; }

/* Search */
.mh-search {
    flex: 1;
    display: flex;
    max-width: 640px;
    margin: 0 auto;
}
.mh-search input {
    flex: 1;
    height: 46px;
    border: none;
    border-radius: 4px 0 0 4px;
    padding: 0 18px;
    font-size: 14px;
    color: var(--text);
    outline: none;
    background: #fff;
}
.mh-search input::placeholder { color: #999; }
.mh-search button {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    padding: 0 22px;
    height: 46px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: background 0.15s;
}
.mh-search button:hover { background: var(--accent-dark); }

/* ============================================================
   AUTOCOMPLETE — dropdown de búsqueda
   ============================================================ */

.mh-search { position: relative; }   /* ancla el dropdown */

.search-drop {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 0 0 10px 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.14);
    z-index: 2100;
    max-height: 420px;
    overflow-y: auto;
}

/* Item de resultado */
.sdrop-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    transition: background 0.12s;
}
.sdrop-item:last-of-type { border-bottom: none; }
.sdrop-item:hover,
.sdrop-item.active { background: var(--bg); color: var(--text); text-decoration: none; }

/* Imagen miniatura — !important para ganarle al img{height:auto} de Bootstrap 3 */
.sdrop-img {
    width: 42px !important; height: 42px !important;
    max-width: 42px; max-height: 42px;
    min-width: 42px;
    object-fit: contain;
    border-radius: 5px;
    background: var(--bg);
    flex-shrink: 0;
    display: block;
}
.sdrop-img-ph {
    width: 42px; height: 42px;
    background: var(--bg);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--border);
    font-size: 18px;
    flex-shrink: 0;
}

/* Texto */
.sdrop-info  { flex: 1; min-width: 0; }
.sdrop-name  { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sdrop-meta  { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.sdrop-name mark { background: #fff3cd; padding: 0 1px; border-radius: 2px; font-weight: 700; }

/* Precio */
.sdrop-price { font-size: 13px; font-weight: 700; color: var(--primary); flex-shrink: 0; text-align: right; }

/* Footer "ver todos" */
.sdrop-footer {
    padding: 10px 14px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    background: var(--bg);
    border-radius: 0 0 10px 10px;
    cursor: pointer;
    border-top: 1px solid var(--border);
}
.sdrop-footer:hover { color: var(--accent-dark); background: #eee; }

/* Sin resultados / cargando */
.sdrop-empty,
.sdrop-loading {
    padding: 18px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Contacto compacto en header */
.mh-contact {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-left: 1px solid rgba(255,255,255,0.12);
    padding-left: 14px;
}
.mhc-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,0.75);
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s;
    line-height: 1.2;
}
.mhc-link:hover { color: #fff; text-decoration: none; }
.mhc-link i { font-size: 13px; }
.mhc-wa i { color: #25d366; }
.mhc-wa:hover { color: #25d366 !important; }

/* Actions right */
.mh-actions { flex-shrink: 0; display: flex; gap: 6px; align-items: center; }
.mha-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: rgba(255,255,255,0.85);
    font-size: 11px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1;
}
.mha-btn i:first-child { font-size: 22px; }
.mha-caret { font-size: 10px !important; opacity: .7; }
.mha-btn:hover { background: rgba(255,255,255,0.1); color: #fff; text-decoration: none; }
.mha-login { background: var(--accent) !important; color: #fff !important; }
.mha-login:hover { background: var(--accent-dark) !important; }

/* Dropdown de usuario */
.mh-actions .dropdown-menu { min-width: 200px; border-radius: 6px; border: none; box-shadow: 0 6px 24px rgba(0,0,0,0.18); }
.mh-actions .dropdown-menu > li > a { font-size: 14px; padding: 9px 16px; color: var(--text); }
.mh-actions .dropdown-menu > li > a i { width: 18px; margin-right: 6px; color: var(--primary); }
.mh-actions .dropdown-menu > li > a:hover { background: var(--bg); color: var(--primary); }
.mh-actions .dropdown-menu .dropdown-header { color: var(--text-muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.6px; padding: 8px 16px 4px; }

/* Mobile toggle */
.mh-mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    padding: 8px 10px;
    cursor: pointer;
    margin-left: 8px;
}
.mh-mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: #fff;
    transition: all 0.2s;
}
.mh-mobile-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mh-mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mh-mobile-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Cat Nav ---- */
.cat-nav {
    background: var(--primary-dark);
    border-top: 1px solid rgba(255,255,255,0.07);
}
.cat-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: stretch;
    overflow: visible; /* NO overflow-x:auto — cliparía el dropdown absoluto */
}
.cat-nav-list > li > a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,0.8);
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    height: 100%;
}
.cat-nav-list > li > a:hover { background: rgba(255,255,255,0.08); color: #fff; text-decoration: none; }
.cat-nav-list > li > a i { font-size: 13px; }
.cn-caret { font-size: 9px !important; opacity: .7; margin-left: 2px; }

/* Dropdown categorías */
.cat-dropdown { position: relative; }
.cat-mega {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1050;
    min-width: 260px;
    max-height: 75vh;
    overflow-y: auto;
    border-radius: 0 0 6px 6px;
    border: none;
    box-shadow: 0 8px 28px rgba(0,0,0,0.22);
    padding: 6px 0;
    background: #fff;
    list-style: none;
    margin: 0;
}
.cat-mega > li > a { display: block; font-size: 14px; padding: 9px 18px; color: var(--text); text-decoration: none; }
.cat-mega > li > a:hover { background: var(--bg); color: var(--primary); }
/* Abrir: hover (desktop) o clase .open (click/JS) */
.cat-dropdown:hover > .cat-mega,
.cat-dropdown.open  > .cat-mega { display: block; }

/* WhatsApp en cat-nav */
.cn-wa-item { margin-left: auto; }
.cn-wa-item > a { color: #fff !important; background: #25d366 !important; font-weight: 600 !important; }
.cn-wa-item > a:hover { background: #1ebe57 !important; }

/* ---- Spacer ---- */
.header-spacer {
    height: 112px; /* header(68) + cat-nav(44) */
}

/* ---- Responsive ---- */
@media (max-width: 991px) {
    .mh-contact { display: none; } /* se oculta en tablet, basta con el botón wa del cat-nav */
}
@media (max-width: 767px) {
    /* ── Layout 2 filas en móvil ─────────────────────────────
       Fila 1: Logo  |  Cart + Cuenta + Toggle
       Fila 2: Buscador full-width
       ──────────────────────────────────────────────────────── */
    .main-header { padding: 8px 0; }
    .mh-inner {
        flex-wrap: wrap;
        gap: 0;
        align-items: center;
    }
    /* Fila 1 — logo a la izquierda */
    .mh-logo { order: 1; flex-shrink: 0; }
    .mh-logo img { height: 34px; }
    /* Fila 1 — iconos a la derecha (carrito, cuenta, toggle) */
    .mh-contact { display: none; }
    .mha-btn   { order: 2; }
    .mha-btn span { display: none; }
    .mh-actions { order: 2; gap: 2px; margin-left: auto; }
    .mh-mobile-toggle { order: 2; display: flex; margin-left: 6px; }
    /* Fila 2 — buscador ocupa toda la fila */
    .mh-search {
        order: 3;
        flex-basis: 100%;
        max-width: 100%;
        margin: 6px 0 0;
    }
    .mh-search input  { height: 38px; font-size: 13px; }
    .mh-search button { height: 38px; padding: 0 14px; }
    .mh-search button .btn-buscar-txt { display: none; }
    /* Cat-nav móvil — desplegable */
    .cat-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        max-height: 70vh;
        overflow-y: auto;
        z-index: 999;
    }
    .cat-nav.mobile-open { display: block; }
    .cat-nav-list { flex-direction: column; }
    .cat-nav-list > li > a { padding: 12px 20px; border-bottom: 1px solid rgba(255,255,255,0.06); }
    .cat-mega { position: static !important; display: none !important; }
    .cn-wa-item { margin-left: 0; }
    /* Spacer: fila1(34+8+8) + gap(6) + fila2(38) + padding-bot(8) = ~102px */
    .header-spacer { height: 102px; }
}

/* Legacy navbar-web — por si Bootstrap lo fuerza en algún sitio */
.navbar-web { display: none !important; }

/* ---- Product card ---- */
/* Col wrapper: flex column para que todas las tarjetas de una fila tengan igual altura */
.product-col {
    display: flex;
    flex-direction: column;
    padding-bottom: 16px;   /* spacing entre filas (reemplaza margin-bottom de la card) */
}
.product-card {
    background: var(--card-bg);
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.18s;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex: 1;                /* ocupa toda la altura disponible del col */
    box-shadow: 0 1px 3px rgba(0,0,0,0.07);
}
.product-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.13);
}
.product-card > a { color: inherit; text-decoration: none; flex: 1; display: block; }
.product-img {
    height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    overflow: hidden;
    padding: 10px;
    border-bottom: 1px solid var(--border);
}
.product-img img { max-height: 165px; max-width: 100%; object-fit: contain; }
.no-img { color: #d1d5db; font-size: 52px; }
.product-info { padding: 10px 12px 8px; }
.product-brand { font-size: 11px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.5px; margin: 0 0 3px; font-weight: 600; }
.product-name {
    font-size: 13px;
    font-weight: 500;
    margin: 0 0 4px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 37px;
    color: var(--text);
}
.product-model { font-size: 11px; font-weight: 700; color: var(--accent); margin: 0 0 2px; letter-spacing: .3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-code  { font-size: 11px; color: var(--text-muted); margin: 0 0 5px; font-family: 'Courier New', monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-price { font-size: 16px; font-weight: 700; color: var(--primary); margin: 0 0 4px; }
.product-price-consultar { font-size: 12px; color: var(--text-muted); margin: 0 0 4px; }
.btn-cotizar {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 0 0 10px 10px;
    font-size: 13px;
    padding: 9px;
    font-weight: 500;
    display: block;
    text-align: center;
    transition: background 0.15s;
    width: 100%;
}
.btn-cotizar:hover { background: var(--accent-dark); color: #fff; text-decoration: none; }

/* ---- Hero section ---- */
.hero-placeholder {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 80px 0;
    text-align: center;
}
.hero-placeholder h1 { font-weight: 700; font-size: 32px; margin-bottom: 16px; }
.hero-placeholder .lead { font-size: 18px; opacity: 0.85; margin-bottom: 28px; }
.carousel-inner > .item > img, .carousel-inner > .item > a > img { max-height: 420px; width: 100%; object-fit: cover; }

/* ---- Home sections ---- */
.section-home { margin-bottom: 48px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.section-title {
    font-weight: 700;
    color: var(--primary);
    font-size: 20px;
    border-left: 4px solid var(--accent);
    padding-left: 12px;
    margin: 0;
}
.ver-mas { color: var(--accent); font-size: 14px; font-weight: 500; }
.ver-mas:hover { color: var(--accent-dark); }

/* ---- Trust Bar ---- */
.trust-bar {
    display: flex;
    gap: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 36px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.trust-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-right: 1px solid var(--border);
    transition: background 0.15s;
}
.trust-item:last-child { border-right: none; }
.trust-item:hover { background: var(--bg); }
.trust-item > i {
    font-size: 26px;
    color: var(--accent);
    flex-shrink: 0;
}
.trust-item > div { line-height: 1.3; }
.trust-item strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}
.trust-item span {
    font-size: 11px;
    color: var(--text-muted);
}

@media (max-width: 991px) {
    .trust-bar { flex-wrap: wrap; }
    .trust-item { flex: 0 0 50%; border-bottom: 1px solid var(--border); }
    .trust-item:nth-child(odd) { border-right: 1px solid var(--border); }
    .trust-item:nth-child(even) { border-right: none; }
}
@media (max-width: 480px) {
    .trust-bar { display: none; } /* no vale la pena en pantalla muy chica */
}

/* ---- Category chips (ML style) ---- */
.cat-chips-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.cat-chip {
    display: inline-block;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    transition: all 0.15s;
    text-decoration: none;
}
.cat-chip:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(27,44,71,0.18);
}

/* legacy cat-card (mantener por si se usa en otro lado) */
.cat-card { display:block; text-align:center; background:#fff; border-radius:6px; padding:16px 10px 12px; margin-bottom:12px; border:1px solid var(--border); color:var(--text); font-weight:500; font-size:13px; text-decoration:none; transition:box-shadow 0.2s; }
.cat-card:hover { box-shadow:0 4px 12px rgba(0,0,0,0.10); color:var(--primary); }
.cat-icon-placeholder { font-size:34px; color:var(--primary); margin-bottom:8px; opacity:0.5; }

/* ---- Mid banners (entre secciones del home) ---- */
.mid-banner-wrap {
    margin-bottom: 36px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.mid-banner-wrap a { display: block; }
.mid-banner-wrap img {
    width: 100%;
    display: block;
    max-height: 220px;
    object-fit: cover;
    transition: opacity 0.2s;
}
.mid-banner-wrap a:hover img { opacity: 0.93; }

/* ---- Portal CTA banner (home, usuarios logueados) ---- */
.portal-cta-banner {
    background: var(--primary);
    color: #fff;
    border-radius: 10px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}
.portal-cta-banner strong { font-size: 16px; }
.portal-cta-banner p { margin: 4px 0 0; opacity: .82; font-size: 14px; }

/* ---- Páginas CMS ---- */
.page-content-wrap {
    max-width: 820px;
    margin: 0 auto 60px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 36px 40px;
}
.page-content-title {
    font-weight: 700;
    color: var(--primary);
    font-size: 26px;
    margin: 0 0 24px;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--accent);
}
.page-content-body { font-size: 15px; line-height: 1.75; color: var(--text); }
.page-content-body h4 { font-weight: 700; color: var(--primary); margin: 24px 0 8px; }
.page-content-body ul { padding-left: 20px; margin-bottom: 16px; }
.page-content-body li { margin-bottom: 6px; }
.page-content-body p { margin-bottom: 14px; }
.page-content-body a { color: var(--accent); }
@media (max-width: 767px) {
    .page-content-wrap { padding: 24px 18px; }
    .page-content-title { font-size: 21px; }
}

/* ---- Footer bottom (copyright + links legales) ---- */
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.footer-legal-links { display: flex; gap: 16px; }
.footer-legal-links a { font-size: 12px; color: rgba(255,255,255,0.5); text-decoration: none; }
.footer-legal-links a:hover { color: rgba(255,255,255,0.85); }

/* ---- Auth ---- */
.auth-wrapper { max-width: 920px; margin: 40px auto; padding: 0 15px; }
.auth-card {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-logo h2 { font-weight: 700; color: var(--primary); font-size: 22px; }
.auth-logo span { color: var(--accent); }
.auth-divider { text-align: center; color: var(--text-muted); font-size: 13px; margin: 16px 0; }
.auth-tabs .nav-tabs { border-bottom: 2px solid var(--border); margin-bottom: 24px; }
.auth-tabs .nav-tabs > li > a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 15px;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 10px 20px;
}
.auth-tabs .nav-tabs > li.active > a { color: var(--primary); border-bottom-color: var(--accent); background: none; }
.form-control-web {
    border-radius: 8px;
    border: 1px solid var(--border);
    height: 42px;
    font-size: 14px;
    color: var(--text);
}
.form-control-web:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,58,110,0.1); outline: none; }
.form-label { font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 6px; display: block; }
.alert-web { border-radius: 8px; font-size: 14px; padding: 12px 16px; }

/* ---- Catalog page ---- */
.catalog-wrapper { display: flex; gap: 24px; align-items: flex-start; }
.catalog-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 10px;
    border: 1px solid var(--border);
    padding: 16px;
}
.filter-title { font-size: 13px; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 0.5px; margin: 0 0 10px; }
.filter-divider { border-color: var(--border); margin: 12px 0; }
.cat-link { color: var(--text); text-decoration: none; }
.cat-link:hover { color: var(--accent); }
.cat-link.active { color: var(--accent); font-weight: 600; }

/* ── Árbol de categorías 2 niveles ──────────────────────────────── */
.cat-tree           { font-size: 13px; margin: 0; }
.cat-tree > li      { margin: 3px 0; }
.cat-tree-item      { margin: 4px 0; }
.cat-parent         { display: flex; align-items: center; justify-content: space-between;
                      font-weight: 500; padding: 2px 0; }
.cat-caret          { font-size: 10px; color: var(--text-muted); margin-left: 4px; flex-shrink: 0; }
.cat-children       { display: none; margin: 2px 0 4px 10px;
                      border-left: 2px solid var(--border); padding-left: 8px; }
.cat-children.visible { display: block; }
.cat-child          { font-size: 12px; padding: 2px 0; color: var(--text-muted); display: block; }
.cat-child:hover    { color: var(--accent); }
.cat-child.active   { color: var(--accent); font-weight: 600; }

/* Filtro de precio */
.price-range-wrap { }
.price-range-inputs { display: flex; align-items: center; gap: 6px; }
.price-range-sep { color: var(--text-muted); flex-shrink: 0; font-size: 13px; }
.price-input-group { display: flex; align-items: center; gap: 3px; flex: 1; min-width: 0; }
.price-input-group span { font-size: 13px; color: var(--text-muted); flex-shrink: 0; }
.price-input-group input { padding: 4px 6px; font-size: 12px; }
.catalog-main { flex: 1; min-width: 0; }
.catalog-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.catalog-header h4 { margin: 0; font-weight: 600; color: var(--primary); font-size: 16px; }
.result-count { color: var(--text-muted); font-size: 13px; margin-top: 2px; }

/* Ordenar sutil */
.sort-form { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.sort-label { font-size: 12px; color: var(--text-muted); margin: 0; white-space: nowrap; }
.sort-select {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 12px;
    color: var(--text);
    background: #fff;
    cursor: pointer;
    height: 28px;
}
.pagination-web { text-align: center; margin-top: 24px; }
.pagination-web .pagination > li > a,
.pagination-web .pagination > li > span { color: var(--primary); border-color: var(--border); }
.pagination-web .pagination > li.active > a { background: var(--primary); border-color: var(--primary); }

/* ---- Product detail ---- */
.product-detail-img {
    background: #fff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 380px;
    padding: 24px;
    border: 1px solid var(--border);
}
.product-detail-img img { max-height: 340px; max-width: 100%; object-fit: contain; }
.product-detail-brand { font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 6px; }
.product-detail-name { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 8px; line-height: 1.35; }
.product-detail-code { font-size: 13px; color: var(--text-muted); font-family: monospace; margin-bottom: 14px; }
.product-detail-price { font-size: 28px; font-weight: 700; color: var(--primary); margin: 0; }
.product-detail-price small { font-size: 14px; font-weight: 400; color: var(--text-muted); }
.product-detail-desc { font-size: 14px; color: var(--text); line-height: 1.7; }
/* CTA buttons detalle */
.btn-wa-detail {
    background: #25d366;
    color: #fff !important;
    padding: 13px 24px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.15s;
    text-decoration: none !important;
}
.btn-wa-detail:hover { background: #1ebe57; }
.btn-tel-detail {
    background: var(--primary);
    color: #fff !important;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: background 0.15s;
    text-decoration: none !important;
}
.btn-tel-detail:hover { background: var(--primary-dark); }
.btn-cotizar-detail {
    background: transparent;
    color: var(--primary) !important;
    border: 1px solid var(--border);
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.15s;
    text-decoration: none !important;
}
.btn-cotizar-detail:hover { border-color: var(--primary); background: var(--bg); }
.tag-cat { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); font-size: 12px; padding: 3px 10px; border-radius: 3px; margin-right: 6px; display: inline-block; }

/* ---- Portal ---- */
.portal-wrapper { display: flex; min-height: calc(100vh - 180px); }
.portal-sidebar {
    width: 230px;
    background: var(--primary);
    flex-shrink: 0;
    padding: 20px 0;
}
.portal-sidebar .sidebar-section-title {
    color: rgba(255,255,255,0.45);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 20px 4px;
}
.portal-sidebar ul { list-style: none; margin: 0; padding: 0; }
.portal-sidebar ul li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: rgba(255,255,255,0.75);
    font-size: 14px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.portal-sidebar ul li a:hover,
.portal-sidebar ul li.active a {
    background: rgba(255,255,255,0.1);
    color: #fff;
}
.portal-sidebar ul li a i { width: 18px; text-align: center; opacity: 0.8; }
.portal-sidebar ul li.active a i { opacity: 1; }
.portal-sidebar .sidebar-divider { border-color: rgba(255,255,255,0.1); margin: 8px 0; }

.portal-content { flex: 1; padding: 28px; background: var(--bg); }
.portal-page-title { font-size: 22px; font-weight: 700; color: var(--primary); margin: 0 0 24px; }

/* Stat cards */
.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid var(--border);
    text-align: center;
    height: 100%;
}
.stat-icon { font-size: 26px; color: var(--accent); margin-bottom: 10px; }
.stat-value { font-size: 38px; font-weight: 700; color: var(--primary); line-height: 1; }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 6px; }

/* Portal tables */
.portal-table-wrap {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    margin-bottom: 24px;
}
.portal-table-wrap .table { margin-bottom: 0; }
.portal-table-wrap .table > thead > tr > th {
    background: var(--primary);
    color: #fff;
    font-weight: 500;
    font-size: 13px;
    padding: 12px 16px;
    border: none;
}
.portal-table-wrap .table > tbody > tr > td {
    padding: 10px 16px;
    font-size: 14px;
    vertical-align: middle;
    border-color: var(--border);
}
.portal-table-wrap .table > tbody > tr:hover > td { background: #f8fafc; }

/* Status badges */
.badge-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}
.badge-status.pendiente   { background: var(--warning-bg); color: var(--warning-txt); }
.badge-status.proceso     { background: var(--info-bg);    color: var(--info-txt); }
.badge-status.enviado     { background: #ede9fe;           color: #5b21b6; }
.badge-status.entregado   { background: var(--success-bg); color: var(--success-txt); }
.badge-status.cancelado   { background: var(--danger-bg);  color: var(--danger-txt); }

/* Portal tabs */
.portal-tabs { border-bottom: 2px solid var(--border); margin-bottom: 20px; }
.portal-tabs > li > a { color: var(--text-muted); font-size: 14px; font-weight: 500; border: none; padding: 10px 20px; }
.portal-tabs > li.active > a,
.portal-tabs > li > a:hover { color: var(--primary); border: none; border-bottom: 2px solid var(--accent); background: none; margin-bottom: -2px; }

/* Empty state */
.empty-state { text-align: center; padding: 48px 20px; }
.empty-state i { font-size: 48px; color: #d1d5db; margin-bottom: 16px; display: block; }
.empty-state p { color: var(--text-muted); font-size: 15px; }

/* Distributor cards */
.dist-card { background: #fff; border-radius: 10px; border: 1px solid var(--border); padding: 20px; margin-bottom: 16px; }
.dist-card h5 { font-weight: 600; color: var(--primary); margin: 0 0 4px; }

/* ── Giros de consumo ───────────────────────────────────────────── */
.giros-title    { font-size: 22px; font-weight: 700; color: var(--primary); margin: 0 0 6px; }
.giros-subtitle { font-size: 14px; color: var(--text-muted); margin: 0 0 28px; }

.giros-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.giro-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 16px 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    text-decoration: none;
    transition: box-shadow .15s, border-color .15s, transform .15s;
    cursor: pointer;
}
.giro-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 18px rgba(0,0,0,.10);
    transform: translateY(-2px);
    text-decoration: none;
    color: var(--text);
}
.giro-icon {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--accent-light, #FFF3E0);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 12px;
    font-size: 22px;
    color: var(--accent);
}
.giro-name { font-weight: 600; font-size: 14px; line-height: 1.3; }
.giro-desc { font-size: 12px; color: var(--text-muted); margin-top: 4px; line-height: 1.4; }

/* ---- Footer ---- */
.web-footer { background: #0f172a; color: #94a3b8; padding: 48px 0 24px; margin-top: 60px; }
.web-footer h5 { color: #e2e8f0; font-weight: 600; font-size: 14px; margin-bottom: 14px; }
.web-footer ul { padding: 0; list-style: none; }
.web-footer ul li { margin-bottom: 6px; }
.web-footer a { color: #94a3b8; font-size: 14px; }
.web-footer a:hover { color: #fff; }
.web-footer hr { border-color: #1e293b; margin: 24px 0 16px; }
.web-footer .copyright { font-size: 13px; text-align: center; }

/* ---- Descuento badge ---- */
.product-img { position: relative; }
.badge-descuento {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #e53e3e;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 4px;
    z-index: 2;
    line-height: 1.3;
}
.badge-descuento-lg { font-size: 14px; padding: 5px 10px; top: 12px; left: 12px; }

/* Precio original tachado */
.product-price-original {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: line-through;
    margin: 0 0 2px;
}
/* Precio final en tarjeta */
.product-price { font-size: 17px; font-weight: 700; color: var(--primary); margin: 0 0 6px; }
/* "MXN · IVA inc." — bloque separado para que nunca parta en medio */
.product-price small { display: block; font-size: 11px; font-weight: 400; color: var(--text-muted); white-space: nowrap; }

/* Bloque precio en detalle */
.detail-price-block { margin-bottom: 18px; }
.detail-descuento-txt { font-size: 13px; color: #e53e3e; font-weight: 500; margin: 4px 0 0; }

/* CTAs en tarjeta */
.card-actions { display: flex; }
/* WhatsApp — botón primario de la tarjeta */
.btn-wa-card {
    background: #25d366;
    color: #fff;
    border: none;
    border-radius: 0 0 6px 6px;
    font-size: 13px;
    font-weight: 600;
    padding: 10px;
    flex: 1;
    text-align: center;
    transition: background 0.15s;
    display: block;
}
.btn-wa-card:hover { background: #1ebe57; color: #fff; text-decoration: none; }
/* Email fallback */
.btn-cotizar {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 0 0 6px 6px;
    font-size: 13px;
    padding: 9px 12px;
    font-weight: 500;
    flex: 1;
    text-align: center;
    transition: background 0.15s;
    display: block;
}
.btn-cotizar:hover { background: var(--accent-dark); color: #fff; text-decoration: none; }

/* CTAs en detalle */
.detail-cta-group { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0; align-items: center; }
.btn-wa-detail {
    background: #25d366;
    color: #fff;
    border: none;
    padding: 12px 22px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    display: inline-block;
    transition: background 0.15s;
}
.btn-wa-detail:hover { background: #1ebe57; color: #fff; text-decoration: none; }
.btn-detail-sec {
    border-radius: 8px !important;
    padding: 11px 20px !important;
    font-weight: 500 !important;
    font-size: 14px !important;
}

/* Código badges en detalle */
.code-badge {
    display: inline-block;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    padding: 2px 8px;
    margin-right: 6px;
    color: var(--text-muted);
}

/* Specs mini-grid */
.spec-mini-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.spec-mini {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    text-align: center;
    min-width: 80px;
}
.spec-mini i { display: block; color: var(--primary); font-size: 16px; margin-bottom: 4px; }
.spec-mini span { display: block; font-weight: 600; font-size: 14px; color: var(--text); }
.spec-mini small { color: var(--text-muted); font-size: 11px; }

/* ================================================================
   CARRITO
   ================================================================ */

/* ---- Icono carrito en nav ---- */
.mha-cart { position: relative; }
.mha-cart-wrap { position: relative; display: inline-block; }
.cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--accent);
    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;
    line-height: 1;
}

/* ---- Toast notificación ---- */
.cart-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--primary);
    color: #fff;
    padding: 12px 28px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    z-index: 9999;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0,0,0,0.22);
}
.cart-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ---- Botón "Agregar" en product card ---- */
.card-actions {
    display: flex;
    gap: 6px;
    padding: 8px 10px;
    border-top: 1px solid var(--border);
    align-items: center;
}
.btn-add-cart {
    flex: 1;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.15s;
}
.btn-add-cart:hover { background: var(--primary-dark); }
.btn-wa-card {
    flex-shrink: 0;
    background: #25d366;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    padding: 8px 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    text-decoration: none;
}
.btn-wa-card:hover { background: #1ebe57; color: #fff; text-decoration: none; }

/* ---- Agregar al carrito en detalle ---- */
.detail-cart-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 8px;
    flex-wrap: wrap;
}
.detail-qty-ctrl {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}
.detail-qty-ctrl button {
    background: var(--bg);
    border: none;
    width: 36px;
    height: 42px;
    font-size: 18px;
    cursor: pointer;
    color: var(--primary);
    font-weight: 700;
    transition: background 0.12s;
}
.detail-qty-ctrl button:hover { background: var(--border); }
.detail-qty-ctrl input {
    width: 52px;
    height: 42px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    -moz-appearance: textfield;
}
.detail-qty-ctrl input::-webkit-inner-spin-button { display: none; }
.btn-add-cart-detail {
    flex: 1;
    min-width: 200px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    padding: 11px 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.15s;
}
.btn-add-cart-detail:hover { background: var(--primary-dark); }

/* ---- Página del carrito ---- */
.cart-page-title {
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.cart-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}
.cart-empty i { font-size: 60px; margin-bottom: 16px; display: block; opacity: 0.2; }
.cart-empty h3 { color: var(--primary); font-weight: 700; margin-bottom: 8px; }
.cart-empty p { margin-bottom: 24px; }

.cart-table-wrap {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: auto;
}
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th {
    background: var(--bg);
    padding: 12px 14px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.cart-table td { padding: 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.cart-table tbody tr:last-child td { border-bottom: none; }
.cart-table tbody tr:hover { background: var(--bg); }

.cart-img-cell img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 4px;
    background: #fafafa;
    border: 1px solid var(--border);
}
.cart-item-name {
    font-weight: 500;
    font-size: 14px;
    color: var(--text);
    line-height: 1.4;
    display: block;
    max-width: 280px;
}
.cart-item-name:hover { color: var(--accent); text-decoration: none; }
.cart-item-sku { font-size: 11px; color: var(--text-muted); font-family: monospace; margin-top: 3px; }
.cart-price { font-weight: 600; color: var(--primary); white-space: nowrap; }
.cart-sub { font-weight: 700; color: var(--primary); white-space: nowrap; }

.cart-qty-ctrl { display: flex; align-items: center; gap: 0; }
.cart-qty-ctrl .qty-btn {
    background: var(--bg);
    border: 1px solid var(--border);
    width: 30px;
    height: 32px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    color: var(--primary);
    transition: background 0.12s;
}
.cart-qty-ctrl .qty-btn:first-child { border-radius: 4px 0 0 4px; }
.cart-qty-ctrl .qty-btn:last-child  { border-radius: 0 4px 4px 0; }
.cart-qty-ctrl .qty-btn:hover { background: var(--border); }
.cart-qty-ctrl .qty-input {
    width: 48px;
    height: 32px;
    text-align: center;
    border: 1px solid var(--border);
    border-left: none;
    border-right: none;
    font-size: 14px;
    font-weight: 600;
    -moz-appearance: textfield;
}
.cart-qty-ctrl .qty-input::-webkit-inner-spin-button { display: none; }

.cart-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}
.cart-remove:hover { color: #e53e3e; background: #fee2e2; }

/* Resumen */
.cart-summary-box {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 22px;
    position: sticky;
    top: 124px;
}
.cart-summary-title {
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 16px;
    font-size: 16px;
}
.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
}
.btn-cart-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background 0.15s;
}
.btn-cart-quote { background: var(--primary); color: #fff; }
.btn-cart-quote:hover { background: var(--primary-dark); color: #fff; text-decoration: none; }
.btn-cart-pay { background: var(--accent); color: #fff; }
.btn-cart-pay:hover { background: var(--accent-dark); color: #fff; text-decoration: none; }
.btn-cart-wa { background: #25d366; color: #fff; }
.btn-cart-wa:hover { background: #1ebe57; color: #fff; text-decoration: none; }

/* ---- Botón WhatsApp flotante ---- */
.wa-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 56px;
    height: 56px;
    background: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 16px rgba(37,211,102,0.45);
    z-index: 1030;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.wa-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 22px rgba(37,211,102,0.6);
    color: #fff;
    text-decoration: none;
}
/* Pulso suave para llamar atención */
@keyframes wa-pulse {
    0%   { box-shadow: 0 0 0 0   rgba(37,211,102,0.5); }
    70%  { box-shadow: 0 0 0 12px rgba(37,211,102,0);   }
    100% { box-shadow: 0 0 0 0   rgba(37,211,102,0);   }
}
.wa-float { animation: wa-pulse 2.5s infinite; }
@media (max-width: 767px) {
    .wa-float { width: 50px; height: 50px; font-size: 24px; bottom: 20px; right: 16px; }
}

/* ---- Error 404 ---- */
.error-page { text-align: center; padding: 80px 20px; }
.error-page .error-code { font-size: 80px; font-weight: 700; color: var(--primary); opacity: 0.3; line-height: 1; }
.error-page h2 { font-weight: 700; color: var(--primary); margin: 16px 0 8px; }
.error-page p { color: var(--text-muted); }

/* ============================================================
   BADGES DE ENVÍO
   ============================================================ */

/* Tarjeta de producto — badge compacto */
.ship-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    margin: 3px 0 0;
    letter-spacing: 0.01em;
    line-height: 1.6;
}
.ship-1 { background: #dcfce7; color: #15803d; }   /* gratis Mty — verde */
.ship-2 { background: #dbeafe; color: #1d4ed8; }   /* + envío — azul */
.ship-3 { background: #f1f5f9; color: #475569; }   /* recolección — gris */

/* Página de detalle — badge prominente */
.ship-badge-detail {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 8px;
    margin: 8px 0 14px;
}
.ship-badge-detail.ship-0 { background: #f8f9fa; color: var(--text-muted); border: 1px solid var(--border); }
.ship-badge-detail.ship-1 { background: #dcfce7; color: #15803d; }
.ship-badge-detail.ship-2 { background: #dbeafe; color: #1d4ed8; }
.ship-badge-detail.ship-3 { background: #f1f5f9; color: #475569; }

/* Stock badges — overlay en la imagen */
.product-img .stock-badge {
    position: absolute;
    bottom: 6px;
    left: 6px;
    margin: 0;
}
.stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin: 3px 0 0;
}
.stock-ok   { background: #dcfce7; color: #15803d; }
.stock-low  { background: #fff3e0; color: #c45c00; }
.stock-last { background: #fce4ec; color: #c62828; }

/* Nota IVA en detalle */
.detail-iva-note {
    font-size: 11px;
    color: var(--text-muted);
    margin: 2px 0 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Carrito — nota IVA y fila de envío */
.cart-iva-note {
    font-size: 11px;
    color: var(--text-muted);
    text-align: right;
    padding: 2px 0 6px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
}
.cart-ship-row {
    color: var(--text-muted);
    font-size: 12px;
    border-top: 1px dashed var(--border);
    padding-top: 6px;
    margin-top: 4px;
}
.cart-ship-row span:first-child { font-weight: 600; color: var(--primary); }

/* ---- Responsive ---- */
@media (max-width: 992px) {
    .catalog-wrapper { flex-direction: column; }
    .catalog-sidebar { width: 100%; }
    .catalog-sidebar .filter-group { display: flex; flex-wrap: wrap; gap: 6px; }
}
@media (max-width: 768px) {
    .portal-wrapper { flex-direction: column; }
    .portal-sidebar { width: 100%; padding: 8px 0; }
    .portal-sidebar ul { display: flex; flex-wrap: wrap; padding: 0 8px; gap: 2px; }
    .portal-sidebar ul li a { padding: 7px 10px; font-size: 12px; border-radius: 6px; }
    .portal-content { padding: 16px; }
    .cat-strip { display: none; }
    .navbar-web .navbar-form .form-control { width: 180px; }
    .hero-placeholder { padding: 48px 0; }
    .hero-placeholder h1 { font-size: 24px; }
}
