/* 
   INVENTA - Estilos del Catálogo E-commerce 
   Diseño Premium tipo Mobile-First
*/

:root {
    --catalog-bg: #f8f9fa;
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --primary-color: var(--primary-600, #4f46e5);
    --primary-light: var(--primary-50, #eef2ff);
    --accent-green: #10b981;
    --radius-xl: 16px;
    --radius-lg: 12px;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

.catalog-layout {
    background-color: var(--catalog-bg);
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    padding-bottom: 100px;
    /* Espacio para carrito flotante */
}

/* --- HERO & HEADER (Estilo Treinta) --- */
.hero-section {
    background: linear-gradient(135deg, #2563EB, #1E40AF);
    /* Azul corporativo fuerte */
    color: white;
    padding: 6rem 1.5rem 5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: -2.5rem;
    /* Superposición del buscador */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 700px;
    margin: 0 auto;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    /* Sombra fuerte para leerse sobre fotos */
}

/* Logo Círculo Perfecto */
.store-logo-circle {
    width: 100px;
    height: 100px;
    background: white;
    /* Fondo blanco sólido para que el logo resalte */
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border: 4px solid rgba(255, 255, 255, 0.2);
    /* Aro semitransparente */
    overflow: hidden;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    color: white !important;
    /* Forzar blanco */
}

.hero-desc {
    font-size: 1.1rem;
    opacity: 1;
    margin-bottom: 1.5rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9) !important;
}

/* --- SEARCH BAR (Centrado y Flotante) --- */
.search-container {
    padding: 0 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 20;
    max-width: 600px;
    /* Limite de ancho para que no se estire */
    margin-left: auto;
    margin-right: auto;
}

.search-input-wrapper {
    position: relative;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    /* Bordes menos redondos, más app moderna */
    background: white;
    transition: transform 0.2s;
}

.search-input-wrapper:hover {
    transform: translateY(-2px);
}

.search-input {
    width: 100%;
    height: 60px;
    /* Más alto para toque fácil */
    padding: 0 1.5rem 0 3.5rem;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 1.05rem;
    outline: none;
    transition: all 0.3s;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
    font-size: 1.5rem;
}

/* --- CATEGORIES (Pills estilo Chips) --- */
.categories-scroll {
    display: flex;
    justify-content: center;
    /* Centrar categorías si son pocas */
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.5rem 1.5rem 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
    flex-wrap: wrap;
    /* En desktop que bajen si son muchas */
}

.categories-scroll::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.category-pill {
    background: white;
    color: #4B5563;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid #E5E7EB;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.category-pill.active {
    background: #111827;
    /* Negro/Azul oscuro para contraste */
    color: white;
    border-color: #111827;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

/* --- PRODUCTS GRID (El corazón del diseño) --- */
.products-wrapper {
    padding: 0 1.5rem;
    max-width: 1100px;
    /* Ancho máximo estilo contenedor */
    margin: 0 auto;
    /* Centrado automático */
}

.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1F2937;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 2px solid #F3F4F6;
    padding-bottom: 1rem;
}

.products-grid {
    display: grid;
    /* Columnas más anchas: mínimo 240px. Si no cabe, baja. */
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 2rem;
    /* Espacio generoso entre tarjetas */
    justify-content: center;
}

/* --- PRODUCT CARD (Estilo Treinta / Shopify) --- */
.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #F3F4F6;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: transparent;
}

.product-image-container {
    position: relative;
    padding-top: 100%;
    /* Cuadrada */
    background: #f9fafb;
    overflow: hidden;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Mejor para productos variados */
    padding: 1rem;
    /* Margen interno para que no toque bordes */
    transition: transform 0.5s;
    mix-blend-mode: multiply;
    /* Ayuda a que fondos blancos se fundan */
}

.product-card:hover .product-image {
    transform: scale(1.1);
}

.product-price-tag {
    display: none;
    /* Quitamos el tag flotante */
}

.product-info {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    border-top: 1px solid #f3f4f6;
}

.product-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #6B7280;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.product-title {
    font-weight: 700;
    color: #111827;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    height: 3rem;
    /* Altura fija para alineación */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price-hero {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.btn-add {
    margin-top: auto;
    width: 100%;
    padding: 0.75rem;
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-add:hover {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.btn-add:active {
    transform: scale(0.96);
}

/* --- FLOATING CART BUTTON --- */
.cart-floater {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--text-main);
    color: white;
    border-radius: 50px;
    padding: 1rem 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    z-index: 100;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cart-floater:hover {
    transform: scale(1.05);
}

.cart-floater.hidden {
    transform: translateY(200%);
}

.floater-count {
    background: var(--accent-green);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
}

/* --- MODAL CARRITO --- */
.cart-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.cart-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top-left-radius: 2rem;
    border-top-right-radius: 2rem;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 201;
}

.cart-modal.open {
    transform: translateY(0);
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.qty-control {
    display: flex;
    align-items: center;
    background: #f3f4f6;
    border-radius: 8px;
    height: 32px;
}

.qty-btn {
    width: 32px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    font-size: 1.2rem;
    color: var(--text-muted);
    cursor: pointer;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
    width: 100%;
    padding: 1rem;
    border-radius: var(--radius-xl);
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    cursor: pointer;
}

/* Responsive fixes */
@media (max-width: 640px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .product-price-tag {
        font-size: 0.8rem;
        padding: 0.2rem 0.4rem;
    }

    .cart-floater {
        bottom: 1.5rem;
        right: 1.5rem;
        padding: 0.8rem 1.2rem;
    }

    .hero-title {
        font-size: 2rem !important;
    }

    .hero-section {
        padding: 3rem 1.5rem;
    }
}

/* --- LANDING PAGE EXTRAS --- */

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), #4338ca);
    color: white;
    padding: 4rem 1.5rem 5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: -2rem;
    /* Overlap with search/content */
}

/* Pattern Overlay */
.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    background-image: radial-gradient(white 2px, transparent 2px);
    background-size: 30px 30px;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 600px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

.hero-desc {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* Features Strip */
.features-strip {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    padding: 2rem 1.5rem;
    background: white;
    margin-bottom: 2rem;
    border-bottom: 1px solid #f3f4f6;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.feature-icon-box {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Footer */
.site-footer {
    background: #111827;
    color: white;
    padding: 3rem 1.5rem 6rem;
    /* Extra bottom for cart floater */
    margin-top: 4rem;
    text-align: center;
}

.footer-brand {
    font-weight: 800;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: block;
    color: white;
    text-decoration: none;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.7;
}

.footer-copyright {
    color: #6b7280;
    font-size: 0.85rem;
}