:root {
    --dark-bg: #121212;
    --card-bg: #1A1A1A;
    --primary: #FFD700;
    --secondary: #D4AF37;
    --accent: #FFD700;
    --text: #FFFFFF;
    --text-muted: #AAAAAA;
    --success: #00CC99;
    --whatsapp: #25D366;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background-color: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.header-wrap {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text);
    gap: 0.75rem;
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: var(--dark-bg);
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.brand-name {
    font-family: 'Apple Chancery', cursive, 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.brand-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
    justify-content: flex-end;
}

.search-container {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 600px;
    min-width: 0;
}

.search {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    width: 100%;
}

.search .icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    z-index: 1;
}

.search input {
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    color: var(--text);
    width: 100%;
    transition: all 0.3s ease;
    min-width: 0;
}

.search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
}

/* MEJORAS PARA COMPUTADORA - MÁS RESPONSIVE */
.main-container {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    margin: 1rem auto 2rem;
    max-width: 1400px;
    padding: 0 1.5rem;
    width: 100%;
    min-height: 60vh;
}

@media (max-width: 1023px) {
    .main-container {
        flex-direction: column;
        padding: 0 1rem;
        max-width: 100%;
    }
}

/* SIDEBAR PARA VERSIÓN MÓVIL */
.sidebar {
    background-color: var(--card-bg);
    padding: 1.2rem;
    border-radius: 12px;
    width: 240px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: var(--primary);
    border-radius: 3px;
}

@media (max-width: 1023px) {
    .sidebar {
        display: none;
        width: 100%;
        position: static;
        max-height: none;
        padding: 1rem;
    }
    
    .sidebar.mobile-visible {
        display: block;
    }
}

/* SIDEBAR MEJORADO PARA VERSIÓN PC */
@media (min-width: 1024px) {
    .sidebar {
        background-color: var(--card-bg);
        padding: 1.5rem;
        border-radius: 12px;
        width: 280px;
        flex-shrink: 0;
        position: sticky;
        top: 100px;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: var(--primary) transparent;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .sidebar-title {
        font-family: 'Playfair Display', serif;
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
        color: var(--primary);
        text-align: center;
        padding-bottom: 1rem;
        border-bottom: 2px solid rgba(255, 215, 0, 0.3);
        position: relative;
    }

    .sidebar-title::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 25%;
        width: 50%;
        height: 2px;
        background: var(--primary);
    }

    .categories {
        display: flex;
        flex-direction: column;
        gap: 0.8rem;
    }

    .chip {
        padding: 0.8rem 1.2rem;
        background-color: rgba(255, 255, 255, 0.05);
        color: var(--text);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.3s ease;
        font-size: 0.9rem;
        text-align: left;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .chip:hover {
        background-color: rgba(255, 215, 0, 0.1);
        border-color: rgba(255, 215, 0, 0.3);
        transform: translateX(5px);
    }

    .chip.active {
        background-color: var(--primary);
        color: var(--dark-bg);
        font-weight: 600;
        border-color: var(--primary);
        box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
    }

    .chip .count {
        background: rgba(0, 0, 0, 0.2);
        padding: 0.2rem 0.5rem;
        border-radius: 12px;
        font-size: 0.8rem;
    }

    .chip.active .count {
        background: rgba(0, 0, 0, 0.3);
    }

    /* Sección de filtros adicionales */
    .filter-section {
        margin-top: 2rem;
        padding-top: 1.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .filter-title {
        font-size: 1.1rem;
        margin-bottom: 1rem;
        color: var(--text);
        font-weight: 600;
    }

    .filter-options {
        display: flex;
        flex-direction: column;
        gap: 0.8rem;
    }

    .filter-option {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.9rem;
        cursor: pointer;
    }

    .filter-option input[type="checkbox"] {
        accent-color: var(--primary);
    }

    /* Mejora visual para el scrollbar */
    .sidebar::-webkit-scrollbar {
        width: 6px;
    }

    .sidebar::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
        border-radius: 3px;
    }

    .sidebar::-webkit-scrollbar-thumb {
        background-color: var(--primary);
        border-radius: 3px;
    }
}

/* Estilos móviles para el sidebar */
@media (max-width: 1023px) {
    .sidebar-title {
        font-family: 'Playfair Display', serif;
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
        color: var(--primary);
    }

    .categories {
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .chip {
        padding: 0.4rem 0.8rem;
        background-color: rgba(255, 255, 255, 0.1);
        color: var(--text);
        border: none;
        border-radius: 50px;
        cursor: pointer;
        transition: all 0.3s ease;
        font-size: 0.85rem;
    }

    .chip:hover {
        background-color: rgba(255, 215, 0, 0.2);
    }

    .chip.active {
        background-color: var(--primary);
        color: var(--dark-bg);
        font-weight: 600;
    }
}

.content-area {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.grid {
    display: grid;
    margin-bottom: 2rem;
}

/* MODIFICACIONES PARA HACER MÁS RESPONSIVE EL GRID */

/* Versión móvil - 1 columna */
@media (max-width: 640px) {
    .grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Versión tablet - 2 columnas */
@media (min-width: 641px) and (max-width: 1023px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

/* Versión escritorio - se mantiene igual (auto-fill) */
@media (min-width: 1024px) {
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

/* Mejoras para pantallas grandes */
@media (min-width: 1600px) {
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

.note {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 2rem;
}

.card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.thumb {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .thumb img {
    transform: scale(1.05);
}

.badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--primary);
    color: var(--dark-bg);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.card-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.4;
    flex: 1;
}

.meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.cat {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.price {
    font-weight: 700;
    color: var(--primary);
    font-size: 1rem;
}

.glow {
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

footer {
    background-color: var(--card-bg);
    padding: 2rem 1rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

.footer-section {
    text-align: center;
}

@media (min-width: 768px) {
    .footer-section {
        text-align: left;
    }
}

.footer-section h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.footer-section p {
    margin: 0.5rem 0;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .footer-section p {
        justify-content: flex-start;
    }
}

.footer-section a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary);
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: var(--primary);
    color: var(--dark-bg);
    transform: translateY(-3px);
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background-color: var(--whatsapp);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 99;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
}

.mobile-filter-btn {
    display: block;
    position: fixed;
    bottom: 2rem;
    left: 1rem;
    width: 50px;
    height: 50px;
    background-color: var(--primary);
    color: var(--dark-bg);
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    z-index: 99;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

@media (min-width: 1024px) {
    .mobile-filter-btn {
        display: none;
    }
}

.mobile-filter-btn:hover {
    transform: scale(1.1);
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 100;
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -240px;
    width: 240px;
    height: 100%;
    background-color: var(--card-bg);
    z-index: 101;
    padding: 1.5rem 1.2rem;
    overflow-y: auto;
    transition: left 0.3s ease;
}

.mobile-sidebar.open {
    left: 0;
}

.close-sidebar {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
}

/* MEJORAS RESPONSIVE PARA HEADER EN COMPUTADORA */
@media (max-width: 1200px) and (min-width: 1024px) {
    .header-wrap {
        padding: 0 1.5rem;
    }
    
    .search-container {
        max-width: 500px;
    }
}

@media (max-width: 900px) {
    .header-wrap {
        flex-direction: column;
        align-items: stretch;
    }
    
    .brand {
        justify-content: center;
        margin-bottom: 1rem;
    }
    
    .header-actions {
        flex-direction: column;
    }
    
    .search-container {
        flex-direction: row;
        margin-bottom: 0.5rem;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .brand-name {
        font-size: 1.25rem;
    }
    
    .footer-section p {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .search-container {
        flex-direction: column;
    }
}

/* Ajustes adicionales para mejorar la visualización en tablet */
@media (min-width: 641px) and (max-width: 1023px) {
    .main-container {
        padding: 0 1rem;
        gap: 1.25rem;
    }
    
    .card {
        border-radius: 10px;
    }
    
    .thumb {
        height: 180px; /* Un poco más alto en tablet */
    }
    
    .title {
        font-size: 1rem;
        line-height: 1.4;
    }
}

/* Mejora para tablets más grandes */
@media (min-width: 768px) and (max-width: 1023px) {
    .grid {
        gap: 1.5rem;
    }
    
    .thumb {
        height: 200px;
    }
}

/* Ajustes específicos para móviles muy pequeños */
@media (max-width: 480px) {
    .grid {
        gap: 0.75rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .title {
        font-size: 0.9rem;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.grid > div {
    animation: fadeIn 0.5s ease forwards;
}

/* Scroll suave para toda la página */
html {
    scroll-behavior: smooth;
}