/* RESET Y ESTILOS BASE */
/* 🔒 Protección de imágenes */
.product-image, .modal-image {
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Evitar descarga de imágenes */
.product-card, .modal-content {
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* ENCABEZADO */
header {
    background-color: #92abc4;
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #023b52;
}

.logo span {
    color: white;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #f39c12;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    color: white;
}

/* BARRA DE BÚSQUEDA */
.search-container {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
    padding: 0 1rem;
}

.search-box {
    display: flex;
    width: 100%;
    max-width: 500px;
}

.search-box input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 5px 0 0 5px;
    font-size: 1rem;
    outline: none;
}

.search-box button {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    padding: 0 1.2rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-box button:hover {
    background-color: #2980b9;
}

/* FILTROS POR CATEGORÍA */
.category-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.filter-btn {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 30px;
    padding: 0.5rem 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.filter-btn:hover, .filter-btn.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

/* HERO SECTION */
.hero {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('../imagenes/a.png');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 5rem 1rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
}

.btn {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #e67e22;
}

/* CATEGORÍAS */
.categories {
    padding: 3rem 0;
    background-color: white;
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: #2c3e50;
}

.category-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-icon {
    font-size: 2.5rem;
    color: #047ee2;
    margin-bottom: 1rem;
}

/* CATÁLOGO DE PRODUCTOS */
.products {
    padding: 3rem 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.product-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 1rem;
}

.product-description {
    color: #7f8c8d;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-buttons {
    display: flex;
    gap: 0.5rem;
}

.product-btn {
    flex: 1;
    text-align: center;
    background-color: #3498db;
    color: white;
    padding: 0.7rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.product-btn:hover {
    background-color: #04395d;
}

.add-to-cart-btn {
    background-color: #037533;
}

.add-to-cart-btn:hover {
    background-color: #038c3c;
}

/* MODAL DE DETALLES DEL PRODUCTO */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    background-color: white;
    margin: 2rem auto;
    width: 90%;
    max-width: 800px;
    border-radius: 8px;
    overflow: hidden;
    animation: modalFade 0.3s;
}

@keyframes modalFade {
    from {opacity: 0; transform: translateY(-50px);}
    to {opacity: 1; transform: translateY(0);}
}

.modal-header {
    padding: 1.5rem;
    background-color: #2c3e50;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-modal {
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
    background: none;
    border: none;
    color: white;
}

.close-modal:hover {
    color: #f39c12;
}

.modal-body {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.modal-image {
    width: 100%;
    border-radius: 8px;
    display: block;
}

.modal-details h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.modal-details p {
    margin-bottom: 1rem;
}

.modal-features {
    list-style-type: none;
    margin-bottom: 1.5rem;
}

.modal-features li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.modal-features li:before {
    content: "✓";
    color: #27ae60;
    position: absolute;
    left: 0;
}

.modal-actions {
    display: flex;
    gap: 1rem;
}

.whatsapp-btn {
    background-color: #25D366;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.3s;
    text-align: center;
    justify-content: center;
}

.whatsapp-btn:hover {
    background-color: #128C7E;
}

/* CARRITO DE COMPRAS */
.cart-icon {
    position: relative;
    cursor: pointer;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: white;
}

#cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
}

.cart-modal-content {
    background-color: white;
    margin: 2rem auto;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    overflow: hidden;
    animation: modalFade 0.3s;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.cart-item-price {
    color: #e74c3c;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-item-actions button {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 3px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-actions button:hover {
    background-color: #2980b9;
}

.cart-total {
    padding: 1rem;
    text-align: right;
    font-size: 1.2rem;
    font-weight: bold;
    border-top: 2px solid #eee;
}

.cart-actions {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.empty-cart-message {
    padding: 2rem;
    text-align: center;
    color: #7f8c8d;
}

/* FOOTER */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #0063ee;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: #f39c12;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: #34495e;
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    color: white;
    transition: background-color 0.3s;
    text-decoration: none;
}

.social-link:hover {
    background-color: #f39c12;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #34495e;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #2c3e50;
        padding: 1rem 0;
        z-index: 101;
    }
    
    nav ul.show {
        display: flex;
    }
    
    nav ul li {
        margin: 0;
        text-align: center;
        padding: 0.7rem 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .modal-body {
        grid-template-columns: 1fr;
    }
    
    .modal-actions {
        flex-direction: column;
    }

    .product-buttons {
        flex-direction: column;
    }

    .cart-actions {
        flex-direction: column;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .category-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .search-container {
        padding: 0 0.5rem;
    }
    
    .category-filters {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 3rem 1rem;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.5rem;
    }
    
    .container {
        width: 95%;
        padding: 0 10px;
    }
}
