body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background-color: #f4f4f4;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
header {
    background-color: #000;
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../img/backround.webp');
    background-size: cover;
    background-position: center;
    color: #fff; /* Blanco puro */
    padding: 10px 20px 0 20px;
    display: flex;
    justify-content: flex-start;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff; /* Blanco puro */
    margin-right: auto;
}
.logo-container h1 {
    margin: 0;
    font-size: 1.5rem;
}
h1, h2, h3 {
    font-family: 'Poppins', sans-serif;
}
nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
}
nav a {
    color: #00d4ff; /* Color de acento */
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff; /* Blanco puro */
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}
.search-container input {
    padding: 8px 15px 8px 35px;
    border-radius: 20px;
    border: none;
    outline: none;
    font-family: 'Poppins', sans-serif;
    width: 200px;
    font-size: 0.9rem;
    transition: width 0.3s ease;
}
.search-icon {
    position: absolute;
    left: 12px;
    color: #666;
    pointer-events: none;
    display: flex;
    align-items: center;
}
.cart-icon-container {
    position: relative;
    cursor: pointer;
    margin-left: auto;
    color: white;
    display: flex;
    align-items: center;
}
.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ff0055;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.75rem;
    font-weight: bold;
    border: 1px solid white;
    display: none;
}
.cart-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 300px;
    background-color: white;
    color: #333;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 15px;
    display: none;
    z-index: 1100;
    flex-direction: column;
    gap: 10px;
}
.cart-dropdown.active {
    display: flex;
    animation: slideInDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.cart-item {
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
}
.cart-empty-msg {
    color: #777;
    font-size: 0.9rem;
    text-align: center;
    padding: 10px 0;
}
.cart-item-info {
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-remove-item {
    background: none;
    border: none;
    color: #ff4444;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0 5px;
}
.cart-qty {
    background: #eee;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}
.cart-footer {
    margin-top: 15px;
    border-top: 1px solid #eee;
    padding-top: 10px;
}
.cart-total {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 10px;
}
.btn-vaciar {
    background: none;
    border: none;
    color: #ff0055;
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: underline;
    width: 100%;
    text-align: right;
}
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    margin-top: 8px;
    z-index: 1001;
    overflow: hidden;
    display: none;
    min-width: 250px;
    animation: fadeIn 0.2s ease-out;
}
.search-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: #333;
    transition: background 0.2s;
    font-size: 0.85rem;
}
.search-item:hover {
    background-color: #f5f5f5;
}
.search-item img {
    width: 35px;
    height: 35px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 10px;
}
.search-item-info {
    display: flex;
    flex-direction: column;
}
.search-item-price {
    color: #006a8e;
    font-weight: bold;
    font-size: 0.8rem;
}
.anuncio-container {
    width: 100%;
    width: calc(100% + 40px);
    margin-left: -20px;
    margin-right: -20px;
    background-color: rgba(255, 165, 0, 0.9);
    color: #000;
    font-weight: bold;
    font-size: 0.85rem;
    overflow: hidden;
    white-space: nowrap;
    margin-top: 10px;
    padding: 5px 0;
}
.anuncio-texto {
    display: inline-block;
    padding-left: 100%;
    animation: ticker 25s linear infinite;
}

main {
    flex: 1;
}

@keyframes ticker {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}
#productos, #servicios, .grid-productos {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 15px;
    padding: 10px;
    max-width: 1200px;
    margin: 0 auto;
}
.producto-card {
    background-color: white;
    border: none;
    border-top: 4px solid #00d4ff; /* Color de acento */
    border-radius: 8px;
    padding: 15px;
    text-align: left;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    position: relative;
    z-index: 1;
}
.producto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.15);
}
.producto-card h2 {
    font-size: 1rem;
    margin: 10px 0 5px 0;
    line-height: 1.3;
}
.acciones-card {
    margin-top: auto;
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
}
.acciones-card .btn {
    margin-top: 0;
    flex-grow: 1;
    text-align: center;
}
.btn-carrito {
    background-color: #ffc107;
    color: #333;
    border: none;
    border-radius: 5px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.2s;
}
.btn-carrito:hover {
    background-color: #e0a800;
    transform: scale(1.05);
}
.producto-card p:not(.precio) {
    font-size: 0.85rem;
    color: #444;
    margin: 5px 0;
    line-height: 1.4;
}
.producto-card .lista-specs {
    display: block;
    text-align: left;
    font-size: 0.75rem;
    color: #555; /* Oscurecido para mejor contraste */
    margin: 5px 0 10px 0;
    padding-left: 20px;
    line-height: 1.5;
}
.producto-card img, .servicio-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    border-radius: 5px;
}
.detalle-columna img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}
.servicio-card {
    background-color: white;
    border: none;
    border-top: 4px solid #28a745;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 250px;
}
.servicio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.15);
}
.precio {
    font-size: 1.4rem;
    color: #006a8e; /* Color secundario */
    font-weight: bold;
    margin: 5px 0;
}
.btn {
    display: inline-block;
    background-color: #0062cc;
    color: white;
    padding: 10px 18px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    margin-top: 10px;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}
.btn:hover {
    background-color: #0056b3;
}

.aviso-cupo {
    background-color: rgba(255, 165, 0, 0.2);
    border: 1px solid orange;
    color: #7a3e00;
    padding: 10px;
    margin-top: 10px;
    border-radius: 5px;
    font-size: 0.9rem;
}
.aviso-entrega {
    background-color: rgba(0, 106, 142, 0.15);
    border: 1px solid #006a8e;
    color: #00445b;
    padding: 10px;
    margin-top: 10px;
    border-radius: 5px;
    font-size: 0.9rem;
}
.seccion-titulo {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
}
.lista-specs {
    text-align: left;
    font-size: 0.9rem;
    color: #333;
}
.btn-gris {
    background-color: #6c757d;
    transition: background-color 0.3s ease;
}
.btn-wsp {
    background-color: #075E54;
}

.seccion-contacto {
    text-align: center;
    padding: 40px;
    background-color: #e9ecef;
    margin-top: 40px;
}
.detalle-contenedor {
    text-align: left;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: center;
}
.detalle-columna {
    flex: 1;
    min-width: 300px;
}
.categoria-header {
    background-color: white;
    padding: 12px 20px;
    margin: 8px auto;
    max-width: 1200px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    box-shadow: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
.categoria-header:hover {
    background-color: #f8f9fa;
    border-color: #ccc;
}
.categoria-header h2 {
    margin: 0;
    font-size: 1rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding-left: 15px;
    border-left-width: 3px !important;
}
.categoria-flecha {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
    color: #888;
}
.categoria-header.active .categoria-flecha {
    transform: rotate(180deg);
}
.grid-productos.categoria-content {
    display: none;
    animation: slideDown 0.4s ease-out;
    margin-bottom: 30px;
}
.grid-productos.categoria-content.active {
    display: grid;
}
@keyframes slideDown { /* Se usa en el desplegable de categorías */
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
footer {
    background-color: #222;
    color: white;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: auto;
}
.chat-widget-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.chat-toggle-btn {
    background-color: #0062cc;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.3s ease;
}
.chat-toggle-btn:hover {
    transform: scale(1.1);
}
.chat-window {
    background-color: white;
    width: 300px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    margin-bottom: 15px;
    overflow: hidden;
    display: none;
    flex-direction: column;
    border: 1px solid #ddd;
}
.chat-window.active {
    display: flex;
    animation: slideInUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.chat-header {
    background-color: #0062cc;
    color: white;
    padding: 10px 15px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.chat-controls {
    display: flex;
    gap: 15px;
}
.chat-control-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.5rem;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.chat-control-btn:hover {
    opacity: 1;
}
.chat-body {
    padding: 15px;
    background-color: #e5ddd5; 
    height: 300px;
    font-size: 0.9rem;
    color: #333;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.chat-input-area {
    padding: 10px;
    background-color: #f0f0f0;
    display: flex;
    gap: 5px;
    align-items: center;
}
.chat-input-area input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 20px;
    outline: none;
}
.chat-attach-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #555;
}
.chat-send-btn {
    background-color: #0062cc;
    border: none;
    color: white;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chat-message {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.4;
    position: relative;
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    animation: fadeIn 0.3s ease;
}
.chat-message.bot {
    align-self: flex-start;
    background-color: white;
    border-top-left-radius: 0;
}
.chat-message.user {
    align-self: flex-end;
    background-color: #e3f2fd;
    border-top-right-radius: 0; 
    text-align: right;
}
@keyframes slideInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInUp {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes slideOutDown {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(20px) scale(0.95); }
}
.chat-window.closing {
    animation: slideOutDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { 0% { transform: scale(1); } 50% { transform: scale(1.3); } 100% { transform: scale(1); } }
.pop-anim { animation: pop 0.3s ease; }
.trust-bar {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    background-color: #f8f9fa;
    padding: 30px 20px;
    margin-bottom: 40px;
    border-bottom: 1px solid #e0e0e0;
}
.trust-item {
    text-align: center;
    flex: 1;
    min-width: 200px;
    margin: 10px;
}
.trust-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}
.trust-item h4 {
    margin: 5px 0;
    color: #333;
}
.trust-item p {
    font-size: 0.9rem;
    color: #444; /* Oscurecido para contraste */
}
.categorias-lista {
    max-width: 900px;
    margin: 20px auto;
    padding: 0 20px;
}

.categoria-item {
    margin-bottom: 15px;
}

.categoria-header {
    background-color: #f9f9f9;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    transition: background-color 0.2s ease;
}

.categoria-header:hover {
    background-color: #eee;
}

.categoria-header span:first-child {
    margin-right: 8px;
    font-weight: normal;
    color: #777;
}

.categoria-flecha {
    font-size: 0.8rem;
    color: #777;
    transition: transform 0.3s ease;
}

.categoria-header.active .categoria-flecha {
    transform: rotate(180deg);
}

.grid-productos.categoria-content {
    padding: 10px;
    border-top: 1px solid #eee;
    margin-top: 5px;
}
.categorias-section {
    padding: 40px 20px;
    text-align: center;
}
.categoria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 20px auto;
}
.categoria-card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block; /* Para que ocupe todo el espacio */
    text-decoration: none;
    color: inherit;
    padding: 20px;
}
.categoria-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.15);
}

.marcas-section {
    text-align: center;
    padding: 40px 20px;
    background-color: white;
}
.marcas-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    align-items: center;
    opacity: 0.8; /* Aumentada opacidad para contraste */
}
.marca-nombre {
    font-size: 1.5rem;
    font-weight: bold;
    color: #555; /* Oscurecido para contraste */
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
}
.testimonios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
.testimonio-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-left: 4px solid #00d4ff;
}
.testimonio-texto {
    font-style: italic;
    color: #555;
    margin-bottom: 15px;
}
.cliente-nombre {
    font-weight: bold;
    color: #222;
    display: block;
}
@media (min-width: 1024px) {
    #productos, #servicios, .grid-productos {
        grid-template-columns: repeat(4, 1fr); 
        gap: 30px;
    }
}
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        order: 2;
    }
    
    .cart-icon-container {
        order: 2;
    }

    .logo-container {
        order: 1;
        flex-grow: 1;
    }

    .search-container {
        order: 3;
        width: 100%;
        margin-top: 15px;
        margin-bottom: 5px;
    }

    .search-container input {
        width: 100%;
        box-sizing: border-box;
    }

    nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #111;
        text-align: center;
        
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        padding: 0;
        transition: all 0.4s ease-in-out;
    }

    nav.activo {
        max-height: 400px;
        opacity: 1;
        padding: 20px 0;
    }

    nav ul {
        flex-direction: column;
        gap: 20px;
    }
    
    #productos, #servicios, .grid-productos {
        gap: 30px;
        padding: 15px;
    }

    .producto-card {
        padding: 8px;
    }

    .producto-card h2 {
        font-size: 0.85rem;
        margin: 5px 0;
    }

    .producto-card .precio {
        font-size: 1.1rem;
        margin: 2px 0;
    }

    .producto-card .btn {
        padding: 6px 10px;
        font-size: 0.8rem;
        margin-top: 5px;
    }
}

/* Clase utilitaria para accesibilidad (oculto visualmente pero legible por screen readers) */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}