/**
 * MSC MARKET - HOJA DE ESTILOS CSS
 * =====================================
 * Estilos para la página web de MSC MARKET
 * Tienda de tecnología con diseño responsive
 * Autor: MSC MARKET
 * Fecha: 2025
 */

/* ===================================
   CONFIGURACIÓN GLOBAL Y RESET
   =================================== */

/* Reset básico para todos los elementos */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Configuración base del body */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* ===================================
   HEADER Y NAVEGACIÓN
   =================================== */

/* Barra de navegación principal */
header {
    background: linear-gradient(135deg, #00d4ff 0%, #1e3c72 100%);
    color: white;
    padding: 0.3rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 6px 30px rgba(0,0,0,0.25);
}

/* Contenedor de navegación */
nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

/* Logo de la empresa */
.logo {
    font-size: 1.8rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Imagen del logo (antes del texto) */
.logo::before {
    content: "";
    display: inline-block;
    width: 100px;
    height: 100px;
    background-image: url('img/logomsc.png');
    background-size: contain;
    background-repeat: no-repeat;
    margin-right: 8px;
    vertical-align: middle;
}

/* Contenedor central de navegación */
.nav-center {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
    justify-content: center;
}

/* Lista de enlaces de navegación */
.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

/* Estilo de enlaces de navegación */
.nav-links a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

/* Hover de enlaces de navegación */
.nav-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

/* ===================================
   BUSCADOR
   =================================== */

/* Contenedor del buscador */
.search-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 0.3rem;
    transition: all 0.3s ease;
    margin-left: 2rem;
}

/* Efecto focus en el buscador */
.search-container:focus-within {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* Campo de entrada del buscador */
.search-input {
    background: transparent;
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    width: 200px;
    outline: none;
    font-size: 0.9rem;
}

/* Placeholder del buscador */
.search-input::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

/* Botón de búsqueda */
.search-btn {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    padding: 0.5rem 0.8rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hover del botón de búsqueda */
.search-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

/* Botón de menú móvil (hamburguesa) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ===================================
   SECCIÓN HERO (PORTADA)
   =================================== */

/* Sección principal de portada */
.hero {
    background: linear-gradient(
                        rgba(135, 206, 235, 0.8),
                        rgba(176, 224, 230, 0.5),
                        rgba(240, 248, 255, 0.2)
                ), 
                url('https://images.unsplash.com/photo-1518709268805-4e9042af2176?ixlib=rb-4.0.3&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    min-height: 60vh;
    max-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: rgb(3, 3, 3);
    position: relative;
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
    padding-top: 8rem;
    padding-bottom: 3rem;
}

/* Contenido del hero */
.hero-content {
    max-width: 800px;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Título principal del hero */
.hero-content h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    line-height: 1.2;
}

/* Párrafo del hero */
.hero-content p {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    margin-bottom: 2rem;
    max-width: 600px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
    line-height: 1.6;
}

/* Botón de llamada a la acción */
.cta-button {
    background: linear-gradient(45deg, #25D366, #128C7E);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.3s, box-shadow 0.3s;
}

/* Hover del botón CTA */
.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
}

/* ===================================
   SECCIONES GENERALES
   =================================== */

/* Estilos base para todas las secciones */
section {
    padding: 2rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    border-radius: 20px;
    margin-bottom: 3rem;
    background: white;
}

/* Títulos de sección */
h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
    position: relative;
}

/* Línea decorativa bajo los títulos */
h2::after {
    content: '';
    width: 60px;
    height: 4px;
    background: linear-gradient(45deg, #00d4ff, #1e3c72);
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

/* ===================================
   SECCIÓN NOSOTROS
   =================================== */

/* Contenido de la sección sobre nosotros */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

/* Texto descriptivo */
.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: justify;
}

/* Panel de información de contacto */
.about-info {
    background: linear-gradient(135deg, #e8f4fd 0%, #c6e6f5 100%);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Items de información */
.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* Iconos para los items de información */
.info-item::before {
    content: "📍";
    margin-right: 1rem;
    font-size: 1.3rem;
}

.info-item:nth-child(2)::before { content: "🕒"; }
.info-item:nth-child(3)::before { content: "📞"; }
.info-item:nth-child(4)::before { content: "📧"; }

/* ===================================
   SECCIÓN DE PRODUCTOS
   =================================== */

/* Grid de productos */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    transition: all 0.3s ease;
}

/* Tarjeta de producto individual */
.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Hover de tarjeta de producto */
.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* Productos ocultos en búsquedas */
.product-card.hidden {
    display: none;
}

/* Imagen de producto */
.product-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

/* Imágenes específicas para cada producto */
.product-card:nth-child(1) .product-image {
    background-image: url('https://images.unsplash.com/photo-1525547719571-a2d4ac8945e2?ixlib=rb-4.0.3&auto=format&fit=crop&w=500&q=80');
}

.product-card:nth-child(2) .product-image {
    background-image: url('https://images.unsplash.com/photo-1511707171634-5f897ff02aa9?ixlib=rb-4.0.3&auto=format&fit=crop&w=500&q=80');
}

.product-card:nth-child(3) .product-image {
    background-image: url('https://images.unsplash.com/photo-1583394838336-acd977736f90?ixlib=rb-4.0.3&auto=format&fit=crop&w=500&q=80');
}

.product-card:nth-child(4) .product-image {
    background-image: url('https://images.unsplash.com/photo-1593640408182-31c70c8268f5?ixlib=rb-4.0.3&auto=format&fit=crop&w=500&q=80');
}

.product-card:nth-child(5) .product-image {
    background-image: url('https://images.unsplash.com/photo-1544117519-31a4b719223d?ixlib=rb-4.0.3&auto=format&fit=crop&w=500&q=80');
}

.product-card:nth-child(6) .product-image {
    background-image: url('https://images.unsplash.com/photo-1572569511254-d8f925fe2cbb?ixlib=rb-4.0.3&auto=format&fit=crop&w=500&q=80');
}

/* Contenido de la tarjeta de producto */
.product-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Título del producto */
.product-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #333;
    min-height: 2.6rem;
    display: flex;
    align-items: center;
}

/* Descripción del producto */
.product-description {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    flex: 1;
    line-height: 1.5;
}

/* Texto de descripción con estados expandido/colapsado */
.description-text {
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Estado colapsado (3 líneas) */
.description-text.collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    max-height: 4.5em;
}

/* Estado expandido (todo el texto) */
.description-text.expanded {
    max-height: none;
}

/* Botón "Mostrar más/menos" */
.show-more-btn {
    background: none;
    border: none;
    color: #00d4ff;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.2rem 0;
    margin-top: 0.5rem;
    transition: color 0.3s ease;
    text-align: left;
}

/* Hover del botón mostrar más */
.show-more-btn:hover {
    color: #1e3c72;
    text-decoration: underline;
}

/* Precio del producto */
.product-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #00ff88;
    margin-bottom: 1rem;
    min-height: 2rem;
    display: flex;
    align-items: center;
}

/* Botón de WhatsApp para productos */
.whatsapp-btn {
    background: linear-gradient(45deg, #25D366, #128C7E);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.3s;
    width: 100%;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    margin-top: auto;
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hover del botón WhatsApp */
.whatsapp-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

/* Icono del botón WhatsApp */
.whatsapp-btn::before {
    content: "📱 ";
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 3rem;
    background: linear-gradient(135deg, #e8f4fd 0%, #c6e6f5 100%);
    border-radius: 15px;
    margin-top: 2rem;
}

.no-results h3 {
    color: #1e3c72;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.no-results p {
    color: #666;
    font-size: 1.1rem;
}

.no-results a {
    color: #25D366;
    text-decoration: none;
    font-weight: bold;
}

.no-results a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #e8f4fd 0%, #c6e6f5 100%);
    color: #333;
    text-align: center;
    padding: 3rem 2rem 2rem;
    margin-top: 2rem;
    box-shadow: 0 -12px 40px rgba(0,0,0,0.15);
    border-radius: 20px 20px 0 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-social {
    margin-bottom: 2rem;
}

.social-link {
    color: #333;
    font-size: 1.5rem;
    margin: 0 1rem;
    text-decoration: none;
    transition: opacity 0.3s;
}

.social-link:hover {
    opacity: 0.8;
}

/* Responsive Design */
@media (min-width: 1200px) {
    .hero {
        min-height: 70vh;
    }
    
    .hero-content h1 {
        font-size: 4rem;
        margin-bottom: 2rem;
    }
    
    .hero-content p {
        font-size: 1.4rem;
        margin-bottom: 2.5rem;
    }
    
    .cta-button {
        font-size: 1.2rem;
        padding: 1.2rem 2.5rem;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-center {
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(0, 212, 255, 0.95);
        backdrop-filter: blur(10px);
        padding: 1rem 0;
        display: none;
    }

    .nav-center.active {
        display: flex;
    }

    .nav-links {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 1rem;
    }

    .search-container {
        margin: 0;
        width: 90%;
    }

    .search-input {
        width: 100%;
    }

    .hero {
        min-height: 60vh;
        padding-top: 6rem;
        padding-bottom: 2rem;
    }

    .hero-content {
        padding: 0 1rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    .hero-content p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .cta-button {
        font-size: 1rem;
        padding: 0.9rem 1.8rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    section {
        padding: 3rem 1rem;
    }

    h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 55vh;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 0.95rem;
    }
    
    .cta-button {
        font-size: 0.95rem;
        padding: 0.8rem 1.5rem;
    }
}

/* Scroll animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}