/* ══════════════════════════════════════════
   BobParts v3 — Con dark mode, Inter font,
   animaciones y mejoras visuales 2026
   ══════════════════════════════════════════ */

:root {
    --primary:  #0f172a;
    --blue:     #1e40af;
    --blue-l:   #3b82f6;
    --green :    #16a34a;
    --green-l:  #22c55e;
    --accent:   #f97316;
    --accent-h: #ea6c00;
    --bg:       #f1f5f9;
    --card:     #ffffff;
    --text:     #1e293b;
    --muted:    #64748b;
    --border:   #e2e8f0;
    --radius:   12px;
    --shadow:   0 2px 12px rgba(0,0,0,0.08);
    --shadow-h: 0 8px 28px rgba(0,0,0,0.16);
    --header-bg: #0f172a;
    --footer-bg: #0f172a;
}

/* ── DARK MODE ── */
[data-theme="dark"] {
    --bg:       #0d1117;
    --card:     #161b22;
    --text:     #e2e8f0;
    --muted:    #94a3b8;
    --border:   #30363d;
    --primary:  #1e293b;
    --shadow:   0 2px 12px rgba(0,0,0,0.4);
    --shadow-h: 0 8px 28px rgba(0,0,0,0.6);
    --header-bg: #0d1117;
    --footer-bg: #0d1117;
}
[data-theme="dark"] body {
    background: var(--bg);
    color: var(--text);
}
[data-theme="dark"] header {
    background: var(--header-bg);
    border-bottom: 1px solid #30363d;
}
[data-theme="dark"] .comunicado {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-color: #2d3748;
}
[data-theme="dark"] .comunicado h2 { color: var(--blue-l); }
[data-theme="dark"] .service-card {
    background: var(--card);
    border-color: var(--border);
}
[data-theme="dark"] #buscador {
    background: var(--card);
    color: var(--text);
    border-color: var(--border);
}
[data-theme="dark"] .product-image-container {
    background: var(--card);
    border-color: var(--border);
}
[data-theme="dark"] .producto-card { background: var(--card); }
[data-theme="dark"] .product-card-title { color: var(--text); }
[data-theme="dark"] .icon-moon { display: block !important; }
[data-theme="dark"] .icon-sun  { display: none !important; }

/* Dark mode toggle icons default */
.icon-moon { display: none; }

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
}

/* ── HEADER ── */
header {
    background: var(--header-bg, var(--primary));
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
    transition: background 0.3s;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: 68px;
    max-width: 1280px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center; /* Centra verticalmente el ícono y el texto */
    gap: 12px; /* Espacio entre el ícono y el texto */
    text-decoration: none; /* Elimina el subrayado del enlace */
}

.logo-icon {
    height: 40px; /* Altura del ícono */
    width: auto;
    border-radius: 6px; /* Bordes redondeados suaves */
}

.logo-text-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo-text {
    font-size: 22px;
    font-weight: 800;
    color: white;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.logo-sub {
    font-size: 11px;
    color: #94a3b8;
}

/* ── NAV ── */
nav.main-nav {
    display: flex;
    gap: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

/* ── BOTON HACER PEDIDO EN NAV ── */
.nav-link-order {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #fff !important;
    font-weight: 700 !important;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(22,163,74,0.35);
    transition: transform 0.15s, box-shadow 0.15s, background 0.2s !important;
}
.nav-link-order:hover {
    background: linear-gradient(135deg, #15803d, #16a34a) !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(22,163,74,0.45);
}

/* ── BTN HACER PEDIDO (en detalle-producto) ── */
.btn-hacer-pedido {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #fff;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 16px rgba(22,163,74,0.35);
}
.btn-hacer-pedido:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(22,163,74,0.45);
    color: #fff;
}

.detalle-wa {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    background: transparent;
    border: 2px solid #22c55e;
    color: #22c55e;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.detalle-wa:hover {
    background: #22c55e;
    color: #fff;
}

.detalle-acciones {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

/* ── DARK MODE TOGGLE ── */
.dark-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.07);
    color: #cbd5e1;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    flex-shrink: 0;
}
.dark-toggle:hover {
    background: rgba(255,255,255,0.15);
    color: white;
    transform: rotate(20deg);
}

/* ── HEADER SEARCH BAR ── */
.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    padding: 6px 14px;
    flex: 1;
    max-width: 280px;
    color: #94a3b8;
    transition: background 0.2s, border-color 0.2s;
    order: 0; /* posición normal en desktop */
    position: relative; /* Ancla para el dropdown absolute */
}
.header-search:focus-within {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.25);
}
.header-search input {
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 13px;
    font-family: inherit;
    width: 100%;
}
.header-search input::placeholder {
    color: #64748b;
}

/* ── SEARCH DROPDOWN ── */
.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-h);
    max-height: 320px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    flex-direction: column;
}
.search-dropdown.active {
    display: flex;
}
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--text);
    transition: background 0.2s;
    border-bottom: 1px solid var(--border);
}
.dropdown-item:last-child {
    border-bottom: none;
}
.dropdown-item:hover {
    background: rgba(59, 130, 246, 0.08);
}
.dropdown-item img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    background: white;
    border-radius: 6px;
    padding: 2px;
    border: 1px solid var(--border);
    flex-shrink: 0;
}
.dropdown-item-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    text-align: left;
}
.dropdown-item-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}
.dropdown-item-price {
    font-size: 12px;
    color: var(--accent);
    font-weight: 700;
    margin-top: 2px;
}
.dropdown-no-results {
    padding: 16px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

/* ── HAMBURGER ── */
.cerrar {
    display: none;
    cursor: pointer;
    user-select: none;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.cerrar:hover {
    background: rgba(255,255,255,0.1);
}

/* ── HERO ── */
.hero {
    background: linear-gradient(135deg, #1e40af 0%, #0f172a 60%, #1e293b 100%);
    color: white;
    padding: 90px 32px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 40%, rgba(59,130,246,0.18) 0%, transparent 60%),
                radial-gradient(ellipse at 20% 80%, rgba(249,115,22,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.hero-badge {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.18);
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 16px;
    border-radius: 50px;
    backdrop-filter: blur(4px);
    transition: background 0.2s;
}
.hero-badge:hover {
    background: rgba(255,255,255,0.18);
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 800;
    margin-bottom: 18px;
    letter-spacing: -1.5px;
    line-height: 1.15;
}

.hero-highlight {
    background: linear-gradient(90deg, #60a5fa, #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 1.05rem;
    color: #93c5fd;
    margin-bottom: 10px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.hero-sub {
    font-size: 13px;
    font-style: italic;
    color: #7dd3fc;
    margin-bottom: 32px;
}

.hero-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 48px;
}

.hero-btn {
    display: inline-block;
    background: var(--accent);
    color: white;
    text-decoration: none;
    padding: 14px 36px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 15px;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(249,115,22,0.4);
}

.hero-btn:hover {
    background: var(--accent-h);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(249,115,22,0.55);
}

.hero-btn-outline {
    display: inline-block;
    background: transparent;
    color: white;
    text-decoration: none;
    padding: 14px 36px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    border: 2px solid rgba(255,255,255,0.3);
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.hero-btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.6);
    transform: translateY(-2px);
}

/* Hero Stats */
.hero-stats {
    display: inline-flex;
    align-items: center;
    gap: 0;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    padding: 20px 32px;
    backdrop-filter: blur(8px);
    flex-wrap: wrap;
    justify-content: center;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 28px;
}

.hero-stat-num {
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    line-height: 1;
}

.hero-stat-label {
    font-size: 12px;
    color: #93c5fd;
    margin-top: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.15);
}

/* ── MAIN CONTENT ── */
main.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px 32px;
}

/* ── SECCIÓN ── */
.seccion {
    margin-bottom: 56px;
}

.seccion-titulo {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--border);
}

.seccion-titulo-icon {
    width: 46px;
    height: 46px;
    background: var(--blue);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(30,64,175,0.35);
}

.seccion-titulo h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
}

/* ── CARRUSEL (index.html) ── */
.seccion-titulo {
    position: relative;
}

.carrusel-controles {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    gap: 8px;
}

.carrusel-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--primary);
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.carrusel-btn:hover {
    background: var(--blue);
    color: white;
    border-color: var(--blue);
    box-shadow: 0 2px 8px rgba(30,64,175,0.35);
}

.carrusel-viewport {
    overflow-x: auto;
    /* Ocultar la barra de scroll */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
}
.carrusel-viewport::-webkit-scrollbar { /* WebKit */
    display: none;
}

.carrusel-grid {
    display: flex;
    gap: 20px;
}

/* Cards dentro del carrusel: ancho fijo para que el scroll funcione */
.carrusel-grid .producto-card {
    min-width: 180px;
    max-width: 180px;
    flex-shrink: 0;
}

.carrusel-grid .product-image-container {
    width: 180px;
    height: 180px;
    aspect-ratio: unset;
    flex-shrink: 0;
}

.carrusel-grid .product-card-info {
    width: 180px;
}

.carrusel-grid .wast {
    width: calc(180px - 24px);
    margin: auto 12px 12px;
}

/* ── PRODUCT GRIDS ── */
.articulo, .piezas {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 20px;
}

/* ── PRODUCT CARDS ── */
.product-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    cursor: pointer;
    transition: border-color 0.2s;
    overflow: hidden;
    margin: 0;
}

.product-image-container:hover {
    border-color: var(--blue-l);
}

.product-image-container img {
    width: 100%;
    height: 140px;
    object-fit: contain;
}

.producto-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    transition: transform 0.2s, box-shadow 0.2s;
    background: var(--card);
    overflow: hidden;
}

.producto-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-h);
}

.product-card-link {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
}

.product-card-info {
    padding: 4px 12px 12px;
    width: 100%;
}

.product-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    line-height: 1.3;
    /* Truncate text to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 36px; /* 14px * 1.3 * 2 lines */
}

.product-card-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent);
}

.wast {
    display: block;
    background: var(--green);
    color: white;
    text-decoration: none;
    padding: 6px 0;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    width: calc(100% - 24px);
    text-align: center;
    transition: background 0.2s, transform 0.15s;
    margin: auto 12px 12px;
}

.wast:hover {
    background: var(--green-l);
    transform: translateY(-1px);
}

/* ── BOLSA (productos.html) ── */
.bolsa {
    width: 170px; height: 170px;
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: flex; align-items: center; justify-content: center;
    padding: 12px; cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.bolsa:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-h);
    border-color: var(--blue-l);
}

/* ── SERVICES SECTION ── */
.services-section { margin-bottom: 56px; }

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 4px;
}

.service-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-h);
    border-color: var(--blue-l);
}

.service-icon {
    font-size: 2.2rem;
    margin-bottom: 14px;
    display: block;
}

.service-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

[data-theme="dark"] .service-card h3 { color: var(--text); }

.service-card p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.55;
}

/* ── COMUNICADO ── */
.comunicado {
    background: linear-gradient(135deg, #eff6ff, #e0f2fe);
    border: 1px solid #bfdbfe;
    border-radius: var(--radius);
    padding: 36px 40px;
    margin-top: 16px;
    text-align: center;
}
.comunicado h2 {
    font-size: 1.4rem; font-weight: 700;
    color: var(--blue); margin-bottom: 14px;
}
.comunicado p { color: var(--text); font-size: 15px; margin-bottom: 8px; }
.comunicado span { font-weight: 700; color: var(--primary); }

/* ── FOOTER ── */
footer {
    background: var(--footer-bg, #0f172a);
    color: #ccc;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: flex-start;
    padding: 48px 32px 24px;
    gap: 30px;
    transition: background 0.3s;
}
.footer-brand p { margin: 4px 0 0; font-size: 13px; color: #94a3b8; }
.footer-links, .footer-contact {
    display: flex; flex-direction: column; gap: 8px; font-size: 14px;
}
.footer-links h4, .footer-contact h4 {
    color: white; margin: 0 0 8px; font-size: 15px;
    border-bottom: 1px solid #1e3a5f; padding-bottom: 6px;
}
.footer-links a { color: #94a3b8; text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: white; }
.footer-contact p { margin: 0; color: #94a3b8; }
.footer-copy {
    width: 100%; text-align: center;
    border-top: 1px solid #1e3a5f; padding-top: 16px;
    font-size: 12px; color: #475569;
}

/* ── FOOTER SOCIAL ── */
.footer-social {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    color: #94a3b8;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.social-link:hover {
    background: var(--blue);
    color: white;
    border-color: var(--blue);
    transform: translateY(-3px);
}

/* ── PÁGINA DE CONTACTO ── */
.contacto-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 48px 32px;
}
.contacto-titulo {
    font-size: 28px; font-weight: 700; margin-bottom: 28px;
    color: var(--primary); border-bottom: 3px solid var(--blue); padding-bottom: 10px;
}
.contacto-wrapper { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.contacto-info { flex: 1; min-width: 220px; }
.contacto-info h2 { font-size: 18px; margin-bottom: 16px; color: var(--primary); }
.contacto-info p { margin: 12px 0; font-size: 14px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.contacto-form { flex: 2; min-width: 280px; }
.contacto-form h2 { font-size: 18px; margin-bottom: 16px; color: var(--primary); }
.form-group { display: flex; flex-direction: column; margin-bottom: 16px; }
.form-group label { font-size: 13px; font-weight: 600; margin-bottom: 5px; color: var(--text); }
.form-group input, .form-group textarea {
    padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px;
    font-size: 14px; font-family: inherit; transition: border-color 0.2s, box-shadow 0.2s;
    outline: none; background: var(--card);
}
.form-group input:focus, .form-group textarea:focus {
    border-color: var(--blue-l); box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
.form-group textarea { resize: vertical; }
.btn-enviar {
    background: var(--blue); color: white; border: none;
    padding: 12px 32px; border-radius: 8px; font-size: 15px;
    font-weight: 600; cursor: pointer; font-family: inherit;
    transition: background 0.2s, transform 0.15s;
}
.btn-enviar:hover { background: var(--primary); transform: translateY(-1px); }

/* ── FADE-IN-UP SCROLL ANIMATION ── */
.fade-in-up {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── SIN RESULTADOS (buscador) ── */
.sin-resultados {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 64px 24px;
    text-align: center;
    color: var(--muted);
    animation: fadeIn 0.35s ease;
}
.sin-resultados svg {
    opacity: 0.3;
    color: var(--muted);
}
.sin-resultados h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}
.sin-resultados p {
    font-size: 0.95rem;
    color: var(--muted);
    margin: 0;
    max-width: 420px;
}
.sin-resultados-acciones {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 8px;
}
.btn-wa-sinresult {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #16a34a;
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    transition: background 0.2s, transform 0.15s;
    box-shadow: 0 4px 12px rgba(22,163,74,0.35);
}
.btn-wa-sinresult:hover {
    background: #15803d;
    transform: translateY(-2px);
}
.btn-limpiar-busqueda {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--blue-l);
    border: 2px solid var(--blue-l);
    padding: 11px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.15s;
}
.btn-limpiar-busqueda:hover {
    background: var(--blue-l);
    color: white;
    transform: translateY(-2px);
}
.sin-resultados-tip {
    font-size: 12px;
    color: var(--muted);
    opacity: 0.7;
    margin-top: 4px;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── LEGACY (compatibilidad otros páginas) ── */
.menu { display: none; }
.informacion, .piezas-title, .info-title, .detalle-MouseIn { display: none; }
.tag a, .house a, .contact a { display: inline-block; text-decoration: none; color: inherit; }

/* ── MOBILE NAV TOGGLE ── */
@media (max-width: 768px) {
    .cerrar {
        display: flex;
    }

    /* El header ahora tiene 2 filas en móvil */
    header {
        padding-bottom: 0;
    }

    .header-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 0 16px;
        gap: 0;
        position: relative;
    }

    /* Fila superior: logo + dark toggle + hamburguesa */
    .logo {
        flex: 1;
        padding: 12px 0;
    }
    .dark-toggle {
        margin-right: 6px;
    }
    .cerrar {
        padding: 12px 4px;
    }

    /* Barra de búsqueda: segunda fila, ancho completo */
    .header-search {
        order: 10;          /* empujar al final del flex, nueva fila */
        flex-basis: 100%;   /* ancho completo */
        max-width: 100%;
        margin: 0 0 10px 0;
        background: rgba(255,255,255,0.1);
        border-color: rgba(255,255,255,0.2);
    }

    nav.main-nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 112px;   /* altura de las 2 filas del header */
        left: 0;
        right: 0;
        background: var(--primary);
        padding: 12px 16px;
        gap: 4px;
        box-shadow: 0 8px 20px rgba(0,0,0,0.35);
        z-index: 99;
    }
    nav.main-nav.nav-open {
        display: flex;
    }

    .hero-stats {
        padding: 16px 16px;
    }
    .hero-stat {
        padding: 0 16px;
    }
    .hero-stat-num { font-size: 1.4rem; }
}

/* ── GRIDS RESPONSIVOS EN MOBILE ── */
@media (max-width: 480px) {
    /* 2 columnas exactas en pantallas muy pequeñas */
    .articulo,
    .piezas,
    .articulo-productos {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    /* Ajustar imagen de card para pantallas pequeñas */
    .product-image-container {
        padding: 8px;
    }

    .product-image-container img {
        height: auto;
    }

    /* Reducir tamaño de texto en cards pequeñas */
    .product-card-title {
        font-size: 12px;
        height: auto;
        -webkit-line-clamp: 2;
    }

    .product-card-price {
        font-size: 13px;
    }

    .wast {
        font-size: 12px;
        padding: 5px 0;
    }

    /* El carrusel mantiene tamaño fijo para deslizar */
    .carrusel-grid .producto-card {
        min-width: 160px;
        max-width: 160px;
    }
}

/* ── TABLET: 3 columnas ── */
@media (min-width: 481px) and (max-width: 900px) {
    .articulo,
    .piezas,
    .articulo-productos {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 16px;
    }
}


/* ── ARTICULO PRODUCTOS PAGE ── */
.articulo-productos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

/* ── BREADCRUMB ── */
.breadcrumb {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 16px;
}
.breadcrumb a {
    color: var(--blue-l);
    text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }

/* ── DETALLE PRODUCTO ── */


.detalle-producto {
    display: flex;
    gap: 48px;
    align-items: flex-start;
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 40px;
}

.detalle-img {
    flex-shrink: 0;
    position: relative; /* Ancla para el posicionamiento de la ventana de zoom */
    width: 280px;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.detalle-img img {
    max-width: 100%;
    max-height: 260px;
    object-fit: contain;
}

.detalle-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.detalle-info h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.detalle-precio {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--accent);
}

.detalle-codigo {
    font-size: 13px;
    font-family: 'Courier New', Courier, monospace;
    color: var(--muted);
    background-color: var(--bg);
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
}

.detalle-descripcion p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--muted);
}

.detalle-specs h3 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
}

.detalle-specs ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detalle-specs ul li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: var(--text);
}

.detalle-specs ul li::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--blue);
    flex-shrink: 0;
}

.detalle-volver {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--blue);
    color: white;
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    margin-top: 8px;
    transition: background 0.2s, transform 0.15s;
    width: fit-content;
}

.detalle-volver:hover {
    background: var(--blue-l);
    transform: translateY(-2px);
}

@media (max-width: 640px) {
    .detalle-producto {
        flex-direction: column;
        padding: 24px;
        gap: 24px;
    }
    .detalle-img {
        width: 100%;
        height: 220px;
    }
}

/* ── ZOOM DE IMAGEN DE PRODUCTO ── */
#zoom-result {
    position: absolute;
    top: 0;
    left: 105%; /* Posiciona el zoom a la derecha de la imagen principal */
    width: 400px; /* Ancho de la ventana de zoom */
    height: 400px; /* Alto de la ventana de zoom */
    border: 1px solid var(--border);
    background-repeat: no-repeat;
    display: none; /* Oculto por defecto */
    z-index: 10;
    background-color: white;
    border-radius: var(--radius); /* Mismo borde redondeado que la imagen */
}

/* Ocultar la ventana de zoom en pantallas pequeñas para evitar problemas de layout */
@media (max-width: 820px) {
    #zoom-result {
        display: none !important; /* Usamos !important para sobreescribir el display: block de JS */
    }
}

/* ══════════════════════════════════════════
   FILTROS DE CATEGORÍA — productos.html
   ══════════════════════════════════════════ */
.filtros-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 24px;
    margin: 28px auto 8px;
    max-width: 1280px;
    flex-wrap: wrap;
}

.filtro-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 20px;
    border: 2px solid var(--border);
    border-radius: 50px;
    background: var(--card);
    color: var(--muted);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.22s ease;
    box-shadow: var(--shadow);
    white-space: nowrap;
}

.filtro-btn svg {
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.filtro-btn:hover {
    border-color: var(--blue-l);
    color: var(--blue-l);
    background: rgba(59, 130, 246, 0.07);
    transform: translateY(-1px);
    box-shadow: var(--shadow-h);
}

.filtro-btn:hover svg {
    opacity: 1;
}

.filtro-btn.active {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
    box-shadow: 0 4px 16px rgba(30, 64, 175, 0.35);
}

.filtro-btn.active svg {
    opacity: 1;
    stroke: #fff;
}

/* Animación de ocultar/mostrar secciones */
.seccion-oculta {
    display: none !important;
}

.seccion-visible {
    animation: fadeInUp 0.35s ease both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dark mode para filtros */
[data-theme="dark"] .filtro-btn {
    background: var(--card);
    border-color: var(--border);
    color: var(--muted);
}

[data-theme="dark"] .filtro-btn:hover {
    background: rgba(59, 130, 246, 0.12);
    border-color: var(--blue-l);
    color: var(--blue-l);
}

[data-theme="dark"] .filtro-btn.active {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

/* Responsive */
@media (max-width: 600px) {
    .filtros-bar {
        padding: 0 16px;
        gap: 8px;
    }
    .filtro-btn {
        font-size: 13px;
        padding: 8px 14px;
        gap: 5px;
    }
}

/* ══════════════════════════════════════════
   BOTÓN FLOTANTE WHATSAPP
   ══════════════════════════════════════════ */
.wa-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    animation: waSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes waSlideIn {
    from { opacity: 0; transform: translateY(60px) scale(0.7); }
    to   { opacity: 1; transform: translateY(0)   scale(1);   }
}

/* Tooltip de texto */
.wa-float-label {
    background: #1e293b;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 20px;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    opacity: 0;
    transform: translateX(10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.wa-float:hover .wa-float-label {
    opacity: 1;
    transform: translateX(0);
}

/* Botón circular verde */
.wa-float-btn {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.50);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    flex-shrink: 0;
}

.wa-float-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #25D366;
    animation: waPulse 2.4s ease-out infinite;
    z-index: -1;
}

@keyframes waPulse {
    0%   { transform: scale(1);   opacity: 0.6; }
    70%  { transform: scale(1.55); opacity: 0;  }
    100% { transform: scale(1.55); opacity: 0;  }
}

.wa-float:hover .wa-float-btn {
    transform: scale(1.1);
    box-shadow: 0 10px 32px rgba(37, 211, 102, 0.65);
}

.wa-float-btn svg {
    fill: #fff;
    width: 30px;
    height: 30px;
}

/* En mobile: ocultar el label, sólo mostrar el botón */
@media (max-width: 600px) {
    .wa-float { bottom: 20px; right: 18px; }
    .wa-float-label { display: none; }
    .wa-float-btn { width: 52px; height: 52px; }
}

