:root {
    --bg-color: #ffffff;
    --surface-color: #ffffff;
    --surface-secondary-color: #f9f9f9;
    --primary-text-color: #111111;
    --secondary-text-color: #666666;
    --accent-color: #000000;
    --card-border-color: #e0e0e0;
    --dark-border-color: #dcdcdc;
    --success-color: #007600;
    --danger-color: #D32F2F;
    --discount-color: #D32F2F;
    --navbar-height: 110px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: 'Poppins', 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--primary-text-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 0.95em;
    overflow-x: hidden;
    padding-top: var(--navbar-height);
}

.navbar {
    background-color: #111111;
    color: #ffffff;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: var(--navbar-height);
    transition: transform 0.3s ease;
}

.navbar.hidden {
    transform: translateY(-100%);
}

.navbar .logo {
    margin-bottom: 1rem;
    width: 100%;
    display: flex;
    justify-content: center;
}

.navbar .logo img {
    max-height: 40px;
    transition: transform 0.3s ease;
}
.navbar .logo:hover img {
    transform: scale(1.05);
}

/* ESTILOS MODERNOS PARA LA BARRA DE BÚSQUEDA */
.search-bar {
    position: relative;
    width: 100%;
    max-width: 800px;
    display: flex;
    align-items: center;
}

.search-bar input[type="search"] {
    width: 100%;
    padding: 0.5rem 0.2rem 0.4rem 3rem;
    border: none;
    border-radius: 25px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

.search-bar input[type="search"]::placeholder {
    color: #b0b0b0;
    font-family: 'Poppins', sans-serif;
}

.search-bar input[type="search"]:focus {
    outline: none;
    background-color: #ffffff;
    color: var(--primary-text-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
 
.search-bar .search-icon {
    position: absolute;
    left: 1rem;
    color: #ffffff;
    transition: color 0.3s ease;
}

.search-bar input[type="search"]:focus + .search-icon {
    color: var(--primary-text-color);
}
/* FIN DE ESTILOS MODERNOS */

.products-section {
    max-width: 1600px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}
.section-header h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    margin-bottom: 0.4rem;
    color: var(--primary-text-color);
    font-family: 'Inter', sans-serif;
}
.section-header p {
    font-size: 1rem;
    color: var(--secondary-text-color);
    max-width: 450px;
    margin: 0 auto;
    font-family: 'Inter', sans-serif;
}

/* NUEVO ESTILO PARA EL GRID - VERSIÓN MEJORADA */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
    justify-content: center;
}

@media (min-width: 600px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (min-width: 900px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

/* Espaciado más ajustado para móviles */
@media (max-width: 600px) {
    .products-grid {
        gap: 0.5rem;
    }
}

.product-card {
    background-color: var(--surface-color);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}
.product-card:hover {
    transform: translateY(-10px);
    box-shadow: none;
}
.product-card a {
    text-decoration: none;
    color: inherit;
}
.product-card .product-image {
    max-width: 130px;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}
.product-card:hover .product-image {
    transform: scale(1.05);
}
.product-card .product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}
.product-price {
    font-size: 1rem;
    color: var(--secondary-text-color);
    margin: 0.4rem 0;
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    align-items: baseline;
    font-weight: 500;
    flex-wrap: wrap;
}

.product-price .discount-badge {
    color: var(--danger-color);
    font-weight: 600;
    font-size: 1rem;
}

.product-price .current-price {
    color: var(--primary-text-color);
    font-weight: 700;
    font-size: 1.1rem;
}

.product-price .original-price {
    text-decoration: line-through;
    color: var(--secondary-text-color);
    font-size: 0.9rem;
    font-weight: 400;
}

.product-card.out-of-stock {
    opacity: 0.6;
    pointer-events: none;
    cursor: not-allowed;
    position: relative;
}

.product-card.out-of-stock:hover {
    transform: none;
}

.product-card.out-of-stock .product-price {
    color: var(--secondary-text-color);
}

.sold-out-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--danger-color);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    white-space: nowrap;
    opacity: 1;
    z-index: 10;
}

@media (min-width: 769px) {
    .product-card .product-image {
        max-width: 160px;
    }
    .product-card .product-title {
        font-size: 1.2rem;
    }
    .product-card .product-price {
        font-size: 1.1rem;
    }
}

footer {
    background-color: #111111;
    color: #a0a0a0;
    padding: 3rem 1.5rem 1.5rem;
    font-size: 0.9rem;
    margin-top: 0;
    text-align: center;
    border-top: 1px solid #333;
    width: 100%;
}
 
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto 3rem;
    justify-items: center;
}
 
.footer-section {
    text-align: center;
    width: 100%;
}
 
.footer-section h3 {
    font-weight: 700;
    margin-bottom: 1.2rem;
    font-size: 1rem;
    color: #ffffff;
}
 
.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    display: inline-block;
    text-align: center;
}
 
.footer-section ul li {
    margin-bottom: 0.8rem;
    text-align: center;
}
 
.footer-section ul li a {
    color: #a0a0a0;
    text-decoration: none;
    transition: color 0.3s ease, text-decoration 0.3s ease;
    display: inline-block;
}
 
.footer-section ul li a:hover {
    color: #ffffff;
    text-decoration: underline;
}
 
.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    font-size: 0.8rem;
    color: #666;
    border-top: 1px solid #333;
    width: 100%;
}