/* Variables globales */
:root {
    --primary-blue: #0066cc;
    --accent-green: #4CAF50;
    --light-gray: #f5f5f5;
    --text-gray: #666;
    --hover-color: #0066cc;
}

/*Logo whatsapp flotante*/
.whatsapp-float {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 15px;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1);
}

.whatsapp-float svg {
    width: 40px;
    height: 40px;
}

/* Reset global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Estilos base */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f8f9fa;
}

/* Top Bar */
.top-bar {
    background-color: var(--primary-blue);
    color: white;
    padding: 0.5rem 5%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.empty-space {
    flex: 1;
}

.phone-container,
.address-container {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.address-container {
    justify-content: flex-end;
}

.phone-container {
    justify-content: center;
}

.phone-number,
.address {
    font-size: 1rem;
    font-weight: 500;
}

.contact-info i {
    font-size: 1rem;
}
/* Reset styles to ensure proper behavior */
body, html {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Header styles */
header {
    width: 100%;
    /* Important: Do not set a fixed height on the header */
    /* Do not set overflow properties on the header */
}

/* Navigation */
.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    width: 100%;
    box-sizing: border-box; /* To ensure padding doesn't break the layout */
}

.logo img {
    width: 89px;
    height: auto;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-gray);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    background-color: var(--hover-color);
    color: white;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-gray);
    padding: 0.5rem;
}

/* Header */
.header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Filters */
.filters-container {
    background: white;
    padding: 1rem;
    margin: 2rem auto;
    max-width: 1200px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.filter-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1rem;
}

.filter-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 25px;
    background: var(--light-gray);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: #e0e0e0;
}

.filter-btn.active {
    background: var(--primary-blue);
    color: white;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); /* Reducido de 300px a 220px */
    gap: 1.5rem; /* Reducido de 2rem para más compacto */
    padding: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Product Card */
.product-card {
    background: white;
    border-radius: 8px; /* Reducido de 10px */
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); /* Sombra más sutil */
    transition: transform 0.3s ease;
    display: none;
}

.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}
.product-card.show {
    display: block;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    position: relative;
    height: 300px;
    overflow: hidden;
}

/* Estilo específico para las imágenes de herramientas */
.product-card[data-category="herramientas"] .spec-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    color: var(--text-gray);
    position: relative;
    padding-left: 15px;
}

.product-card[data-category="herramientas"] .spec-item:before {
    content: "-";
    position: absolute;
    left: 0;
    color: var(--text-gray);
}

.product-card[data-category="herramientas"] .product-image {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card[data-category="herramientas"] .product-image img {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain; /* Muestra la imagen completa */
    transition: transform 0.3s ease;
}

/* Mantiene el estilo original para los demás productos */
.product-card:not([data-category="herramientas"]) .product-image img {
    /* Estos son los estilos originales que ya tenías */
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-green);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 12px;
    font-size: 0.85rem;
    z-index: 10;
}

.product-info {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: #333;
    height: auto;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Product Specifications */
.product-specs {
    margin: 0.75rem 0;
    flex-grow: 1;
}
.product-specs span {
    font-weight: normal; /* <-- esto lo hace más delgado */
}

.spec-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 0.5rem;
    color: var(--text-gray);
}

.spec-icon {
    width: 20px;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spec-item span {
    font-size: 0.9rem;
    flex: 1;
    word-wrap: break-word;
}

.rotation-speed-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: -4px;
    margin-right: -3px;
}

.rotation-speed-icon svg {
    width: 100%;
    height: 100%;
    fill: #666666;
}

.rotation-speed-icon svg path {
    transition: fill 0.3s ease;
}


/* Buttons */
.product-actions {
    display: flex;
    gap: 1rem;
    margin-top: auto; /* Push to bottom */
    padding-top: 1rem;
}

.btn {
    flex: 1;
    padding: 0.8rem;
    text-align: center;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.94rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    display: inline-block;
    white-space: nowrap;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 4rem 0 0 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
}

.footer-section h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #fff;
}

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #fff;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: white;
    color: #1e3c72;
    transform: translateY(-3px);
}

.contact-info,
.quick-links {
    list-style: none;
    padding: 0;
}

.contact-info li,
.quick-links li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-links a {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.quick-links a:hover {
    color: var(--accent-green);
    padding-left: 5px;
}

.newsletter {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.newsletter input {
    padding: 0.8rem;
    border: none;
    border-radius: 4px;
    flex: 1;
}

.newsletter button {
    padding: 0.8rem 1.5rem;
    background: var(--accent-green);
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter button:hover {
    background: #45a049;
}

.footer-bottom {
    margin-top: 3rem;
    padding: 1.5rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}


.product-specs .spec-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.modern-bullet {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 12px;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border-radius: 2px;
    transform: rotate(45deg);
    position: relative;
}

.modern-bullet::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(44, 62, 80, 0.2);
    border-radius: 2px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.2;
    }
    50% {
        transform: scale(1.5);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0.2;
    }
}



/* Media Queries */

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        width: 100%;
        display: block;
        padding: 0.8rem 1rem;
        text-align: center;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .contact-buttons {
        flex-direction: column;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer-section {
        text-align: center;
        padding-right: 0;
    }

    .social-links {
        justify-content: center;
    }

    .contact-info {
        align-items: center;
    }

    .contact-item {
        align-items: center;
        text-align: center;
    }

    .quick-links {
        align-items: center;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .contact-title {
        font-size: 2rem;
    }

    .contact-subtitle {
        font-size: 1.1rem;
    }

    .feature-card, .product-card, .testimonial-card {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
        padding: 1rem;
    }
    
    .product-image {
        height: 150px;
    }
    
    .product-title {
        font-size: 1rem;
    }
    
    .product-info {
        padding: 0.8rem;
    }
    
    .btn {
        padding: 0.6rem;
        font-size: 0.85rem;
    }
    
    .spec-item {
        gap: 0.5rem;
    }
    
    .spec-icon {
        width: 16px;
        height: 16px;
    }
    
    .spec-item span {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.75rem;
    }
    
    .product-image {
        height: 130px;
    }
    
    .product-info {
        padding: 0.7rem;
    }
    
    .product-title {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .btn {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    /* Ajuste para botones en móvil */
    .product-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
}


.product-card[data-category="herramientas"] .product-image,
.product-card:has(.product-badge) .product-image {
    position: relative;
}

/* Ajustes para los botones "Solicitar Cotización" y "Ver más" */
button.btn, a.btn {
    display: inline-block;
    min-height: 42px;
    line-height: normal;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Asegurar que el botón "Ver más" tenga el ancho adecuado */
.btn-primary {
    width: 100%;
}
