* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: #F9FAFB; min-height: 100vh; }

/* HEADER */
nav { background: rgba(255, 255, 255, 0.95); padding: 10px 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); position: sticky; top: 0; z-index: 999; }
.nav-container { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.nav-logo { display: flex; align-items: center; text-decoration: none; }
.logo-nav-img { height: 48px; width: auto; }
.nav-links { display: flex; gap: 25px; list-style: none; align-items: center; }
.nav-links li { position: relative; }
.nav-links a { text-decoration: none; color: #2d3748; font-weight: 600; padding: 8px 0; display: block; }
.nav-links a:hover,.nav-links a.active { color: #D62828; }
.dropdown-content { display: none; position: absolute; background: white; min-width: 280px; box-shadow: 0 8px 16px rgba(0,0,0,0.1); border-radius: 8px; top: 100%; left: 0; padding: 10px 0; z-index: 1000; }
.dropdown-content a { padding: 12px 20px; font-weight: 500; font-size: 15px; line-height: 1.4; }
.dropdown-content a:hover { background: #f7fafc; }
.dropdown-content a strong { display: block; font-weight: 700; color: #2d3748; margin-bottom: 2px; }
.dropdown-content a span { display: block; color: #6B7280; font-size: 0.875rem; font-weight: normal; }
.dropdown:hover .dropdown-content { display: block; }
.dropdown > a::after { content: ' ▾'; font-size: 12px; }
.tienda-link:hover,.tienda-link.active { color: #7C3AED!important; }
.dropdown-content .tienda-divider { border-top: 1px solid #E5E7EB; margin: 8px 0 4px 0; padding-top: 12px!important; }
.dropdown-content .tienda-divider strong { color: #7C3AED!important; }

/* TIENDA */
:root { --color-tienda: #7C3AED; }
/* TIENDA CON GRID */
.tienda-container { 
    max-width: 1400px; 
    margin: 2rem auto; 
    padding: 0 1rem; 
    display: grid;
    grid-template-columns: 280px 1fr;
    grid-template-areas: 
        "search search"
        "sidebar products";
    gap: 2rem;
}

.search-container {
    grid-area: search;
    max-width: 600px;
    margin: 0 auto 1rem auto;
}

.sidebar { 
    grid-area: sidebar;
    width: 100%;
}

.products-area { 
    grid-area: products;
    flex: 1; 
}

/* Fix fotos gigantes */
.product-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
}

@media (max-width: 768px) {
    .tienda-container {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "search"
            "sidebar"
            "products";
        gap: 1.5rem;
    }
    
    .search-container {
        max-width: 100%;
        margin: 0 0 1rem 0;
    }
}
.sidebar { width: 250px; flex-shrink: 0; }
.sidebar h3 { color: var(--color-tienda); margin-bottom: 1rem; font-size: 1.25rem; }
.category-list { list-style: none; background: white; border-radius: 12px; padding: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.category-list li { margin-bottom: 0.5rem; }
.category-list button { width: 100%; text-align: left; background: none; border: none; padding: 10px; border-radius: 8px; cursor: pointer; font-weight: 600; color: #374151; }
.category-list button:hover,.category-list button.active { background: #F3E8FF; color: var(--color-tienda); }

.products-area { flex: 1; }
.tienda-header { 
    background: #FFF7ED; 
    padding: 2rem; 
    border-radius: 12px; 
    margin-bottom: 2rem; 
    text-align: center; 
    border: 2px solid #F97316;
}
.tienda-header h1 { color: var(--color-tienda); font-size: 2rem; margin-bottom: 0.5rem; }
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; }
.product-card { border: 1px solid #E5E7EB; border-radius: 12px; overflow: hidden; background: white; transition: transform 0.2s; cursor: pointer; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 10px 20px rgba(124,58,237,0.1); }
.product-card img { width: 100%; height: 200px; object-fit: cover; }
.product-info { padding: 1rem; }
.product-tag { background: #F3E8FF; color: var(--color-tienda); padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; display: inline-block; margin-bottom: 0.5rem; }
.product-price { color: var(--color-tienda); font-size: 1.25rem; font-weight: bold; margin: 0.5rem 0; }
.btn-add-cart { background: var(--color-tienda); color: white; border: none; padding: 10px; width: 100%; border-radius: 8px; cursor: pointer; font-weight: bold; }
.btn-add-cart:hover { filter: brightness(1.1); }
.btn-add-cart:disabled, .btn-disabled { background: #9CA3AF; cursor: not-allowed; }
.stock-label { font-size: 0.875rem; color: #D62828; font-weight: 600; margin-top: 0.5rem; }

/* CARRITO */
.cart-float { position: fixed; bottom: 20px; right: 20px; background: var(--color-tienda); color: white; padding: 16px 20px; border-radius: 50px; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,0.15); z-index: 1000; font-weight: 600; }
.cart-count { background: #D62828; border-radius: 50%; padding: 2px 8px; font-size: 0.75rem; margin-left: 8px; }
.cart-modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 2000; justify-content: center; align-items: center; }
.cart-content { background: white; width: 90%; max-width: 500px; max-height: 80vh; border-radius: 12px; padding: 1.5rem; overflow-y: auto; }
.cart-item { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; border-bottom: 1px solid #E5E7EB; }
.cart-item button { background: #E5E7EB; border: none; padding: 4px 10px; border-radius: 4px; cursor: pointer; }
.cart-total { font-size: 1.25rem; font-weight: bold; text-align: right; margin: 1rem 0; color: var(--color-tienda); }

/* MODAL PRODUCTO NUEVO */
.modal { display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); animation: fadeIn 0.3s; }
@keyframes fadeIn { from {opacity: 0;} to {opacity: 1;} }
.modal-content { background: white; margin: 3% auto; padding: 0; border-radius: 16px; max-width: 900px; width: 90%; position: relative; animation: slideUp 0.3s; }
@keyframes slideUp { from {transform: translateY(50px); opacity: 0;} to {transform: translateY(0); opacity: 1;} }
.modal-close { position: absolute; right: 20px; top: 15px; font-size: 35px; font-weight: bold; color: #666; cursor: pointer; z-index: 10; }
.modal-close:hover { color: #000; }
.modal-body { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; padding: 2rem; }
.modal-gallery { position: relative; }
.modal-gallery img { width: 100%; height: 400px; object-fit: cover; border-radius: 12px; }
.gallery-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(124,58,237,0.9); color: white; border: none; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 18px; display: none; }
.gallery-arrow:hover { background: rgba(109,40,217,1); }
.gallery-arrow.prev { left: 10px; }
.gallery-arrow.next { right: 10px; }
.gallery-dots { text-align: center; margin-top: 1rem; }
.gallery-dots span { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #ddd; margin: 0 5px; cursor: pointer; }
.gallery-dots span.active { background: #7C3AED; }
.modal-category { background: #F3E8FF; color: #7C3AED; padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.85rem; font-weight: 600; }
.modal-info h2 { margin: 1rem 0; font-size: 1.8rem; color: #333; }
.modal-price { font-size: 2rem; color: #7C3AED; font-weight: 700; margin: 1rem 0; }
.modal-benefits { color: #666; line-height: 1.6; margin: 1rem 0; }
.modal-stock { margin: 1rem 0; font-weight: 600; }
.modal-stock.disponible { color: #16A34A; }
.modal-stock.agotado { color: #D62828; }
#modalAddCart { width: 100%; padding: 1rem; font-size: 1.1rem; }

/* WHATSAPP + FOOTER */
.whatsapp-float { position: fixed; width: 60px; height: 60px; bottom: 90px; right: 25px; background-color: #25d366; color: #FFF; border-radius: 50px; text-align: center; box-shadow: 2px 2px 10px rgba(0,0,0,0.3); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.whatsapp-float svg { width: 35px; height: 35px; }
footer{background:#2d3748;color:white;padding:40px 20px 20px;margin-top:60px}
.footer-content{max-width:1200px;margin:0 auto;display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:30px}
.footer-section h3{color:#D62828;margin-bottom:15px;font-size:18px}
.footer-section p{line-height:1.8;color:#cbd5e0;font-size:15px;margin:0}
.footer-section a{color:#cbd5e0;text-decoration:none}
.footer-section a:hover{color:white;text-decoration:underline}
.footer-social{display:flex;gap:12px;margin-top:12px;justify-content:flex-start;align-items:center}
.footer-section:last-child{text-align:left}
.footer-section:last-child p{ text-align:left }
.footer-social a{width:40px;height:40px;background:#4a5568;border-radius:50%;display:flex;align-items:center;justify-content:center;transition:0.3s}
.footer-social a:hover{background:#D62828;transform:translateY(-2px)}
.footer-social svg{width:20px;height:20px;fill:white;display:block}
.footer-bottom{text-align:center;margin-top:30px;padding-top:20px;border-top:1px solid #4a5568;color:#a0aec0;font-size:14px}
.mapa{width:100%;height:200px;border:0;border-radius:8px;margin-top:10px}

@media (max-width: 768px) {
    .tienda-container { flex-direction: column; }
    .sidebar { width: 100%; }
    .products-grid { grid-template-columns: 1fr; }
    .nav-links { gap: 15px; font-size: 14px; }
    .dropdown-content { position: static; box-shadow: none; min-width: 100%!important; border-left: 3px solid #7C3AED; }
    .modal-body { grid-template-columns: 1fr; }
    .modal-gallery img { height: 300px; }
}
/* BOTÓN VER MÁS */
.btn-load-more {
    background: white;
    color: #7C3AED;
    border: 2px solid #7C3AED;
    padding: 12px 32px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.2s;
}
.btn-load-more:hover {
    background: #7C3AED;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124,58,237,0.3);
}
/* MEDIOS DE PAGO */
.payment-methods {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.payment-methods h3 {
    color: var(--color-tienda);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}
.payment-logos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 1rem;
}
.payment-logos img {
    width: 100%;
    height: 40px;
    object-fit: contain;
    background: #F9FAFB;
    border-radius: 8px;
    padding: 6px;
    border: 1px solid #E5E7EB;
}
.payment-note {
    font-size: 0.8rem;
    color: #6B7280;
    line-height: 1.6;
    text-align: center;
    margin: 0;
}

@media (max-width: 768px) {
   .payment-logos {
        grid-template-columns: repeat(4, 1fr);
    }
}
.modal-benefits {
    color: #6B7280;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 1rem 0;
}
.modal-benefits strong {
    color: #374151;
}
.modal-benefits ul {
    margin: 0.5rem 0 1rem 1.2rem;
}
.modal-benefits li {
    margin-bottom: 0.25rem;
}
#btnVerMas:hover {
    text-decoration: underline;
}

.search-box {
    display: flex;
    background: white;
    border: 2px solid #E5E7EB;
    border-radius: 50px;
    overflow: hidden;
    transition: all 0.3s;
}

.search-box:focus-within {
    border-color: var(--color-tienda);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

#searchInput {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border: none;
    outline: none;
    font-size: 1rem;
    color: var(--color-texto);
}

#searchBtn {
    background: var(--color-tienda);
    border: none;
    padding: 0 1.5rem;
    cursor: pointer;
    color: white;
    transition: background 0.3s;
}

#searchBtn:hover {
    background: #6D28D9;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    margin-top: 0.5rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.search-suggestions.active {
    display: block;
}

.suggestion-item {
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    border-bottom: 1px solid #F3F4F6;
    transition: background 0.2s;
}

.suggestion-item:hover {
    background: #F9FAFB;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-name {
    font-weight: 600;
    color: var(--color-texto);
}

.suggestion-cat {
    font-size: 0.875rem;
    color: #6B7280;
}

.no-results {
    padding: 1.5rem;
    text-align: center;
    color: #6B7280;
}