/* General Styles */
:root {
    --primary-color: #2B114C; /* Morado principal */
    --accent-color: #F6911D; /* Naranja para acentos */
    --text-color: #343a40; /* Gris oscuro para texto principal */
    --light-text-color: #6c757d; /* Gris medio para descripciones */
    --background-color: #f8f9fa; /* Fondo muy claro */
    --card-background: #ffffff; /* Fondo de tarjetas blanco */
    --border-color: #e9ecef; /* Borde muy sutil */
    --shadow-light: rgba(0, 0, 0, 0.04); /* Sombra muy ligera */
    --shadow-medium: rgba(0, 0, 0, 0.08); /* Sombra media */
    --shadow-strong: rgba(0, 0, 0, 0.15); /* Sombra más fuerte para modales */
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header */
.main-header {
    background-color: var(--card-background);
    padding: 2.5em 0;
    text-align: center;
    box-shadow: 0 2px 15px var(--shadow-light);
}

.header-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.store-logo {
    margin-bottom: 15px;
}

.store-logo img {
    max-width: 400px;
    margin-bottom: 10px;
    height: auto;
    display: block;
    margin: 0 auto;
    transition: transform 0.3s ease-in-out;
}

.store-logo img:hover {
    transform: scale(1.05);
}

.store-name h1 {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    letter-spacing: -0.5px;
}

.main-header p {
    font-size: 1.1em;
    color: var(--light-text-color);
    margin-top: 8px;
}

/* Hero Section */
.hero-section {
    position: relative;
    width: 100%;
    height: 400px; /* Adjust as needed */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    margin-bottom: 30px;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    filter: brightness(0.6); /* Darken the image slightly for text readability */
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.6); /* más oscuro */
    text-shadow: 0px 2px 4px rgba(0,0,0,0.5);
    border-radius: 10px;
}

.hero-content h2 {
    font-size: 2.8em;
    margin-bottom: 10px;
    color: white;
}

.hero-content p {
    font-size: 1.3em;
    color: white;
}

/* Category Navigation */
.category-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--card-background);
    padding: 12px 0;
    box-shadow: 0 2px 10px var(--shadow-light);
    border-bottom: 1px solid var(--border-color);
}

.category-buttons-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 0 20px;
}

.category-button {
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 9px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.category-button:hover {
    background-color: var(--primary-color);
    color: var(--card-background);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.category-button.active {
    background-color: var(--primary-color);
    color: var(--card-background);
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px var(--shadow-medium);
}

.gamut-button {
    background-color: var(--accent-color);
    color: var(--card-background);
    border: 1px solid var(--accent-color);
    padding: 9px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.gamut-button:hover {
    background-color: #e08a1c;
    border-color: #e08a1c;
    transform: translateY(-1px);
}

.gamut-button.active {
    background-color: #1f0d38;
    color: var(--card-background);
    border-color: #1f0d38;
    box-shadow: 0 2px 8px var(--shadow-medium);
}

.shimano-logo {
    height: 1.2em; /* Adjust size as needed */
    vertical-align: middle;
    margin-right: 5px;
}

/* Main Content & Product Catalog */
#product-catalog {
    padding: 40px 20px;
    max-width: 1000px;
    margin: 30px auto;
    background-color: var(--card-background);
    border-radius: 12px;
    box-shadow: 0 5px 15px var(--shadow-light);
}

#product-catalog h2 {
    text-align: center;
    color: var(--primary-color);
    font-size: 2.2em;
    margin-bottom: 35px;
    position: relative;
    font-weight: 700;
}

#product-catalog h2::after {
    content: '';
    width: 50px;
    height: 3px;
    background-color: var(--accent-color);
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 1.5px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
}



.hidden {
    display: none;
}

/* Product Card */
.product-card {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    background-color: var(--card-background);
    box-shadow: 0 4px 12px var(--shadow-light);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px var(--shadow-medium);
}

.product-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid var(--border-color);
}

.product-info {
    padding: 18px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-info h3 {
    margin-top: 0;
    color: var(--text-color);
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 8px;
}

.product-info p {
    font-size: 0.95em;
    line-height: 1.5;
    color: var(--light-text-color);
    flex-grow: 1;
    margin-bottom: 15px;
}

.product-price {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--accent-color);
    margin-top: auto;
    text-align: right;
}

/* Add to Selection Button */
.add-to-selection-button {
    display: block;
    width: 100%;
    padding: 10px 15px;
    margin-top: 15px;
    background-color: var(--primary-color);
    color: var(--card-background);
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1em;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 3px 10px rgba(43, 17, 76, 0.3); /* Sombra con color morado */
}

.add-to-selection-button:hover {
    background-color: #1f0d38; /* Morado más oscuro */
    box-shadow: 0 5px 12px rgba(43, 17, 76, 0.4);
    transform: translateY(-1px);
}

/* Selection Button (Floating) */
.selection-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--accent-color);
    color: white;
    padding: 14px 22px;
    border-radius: 999px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    font-weight: bold;
    font-size: 1em;
    display: flex;
    align-items: center;
    z-index: 999;
    transition: all 0.3s ease;
  }
  
  .selection-button:hover {
    background-color: #e08a1c;
    transform: translateY(-2px);
  }

.selection-button:hover {
    background-color: #e08a1c; /* Naranja más oscuro al hover */
    box-shadow: 0 8px 20px rgba(246, 145, 29, 0.5); /* Sombra con color naranja */
    transform: translateY(-2px);
}

.selection-button .icon {
    font-size: 1.4em;
    margin-right: 10px;
}

.selection-button .count {
    background-color: var(--primary-color);
    color: var(--card-background);
    border-radius: 50%;
    padding: 3px 8px;
    font-size: 0.8em;
    margin-left: 10px;
}

/* Footer */
footer {
    background-color: var(--text-color);
    color: var(--card-background);
    text-align: center;
    padding: 1.5em 0;
    margin-top: 50px;
    font-size: 0.9em;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Modal Styles */
.modal {
    display: none; /* Oculto por defecto */
    position: fixed; /* Posición fija en la pantalla */
    z-index: 2000; /* Por encima de todo */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Habilitar scroll si el contenido es muy largo */
    background-color: rgba(0, 0, 0, 0.6); /* Fondo oscuro semitransparente */
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--card-background);
    margin: auto;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 25px var(--shadow-strong);
    position: relative;
    width: 90%;
    max-width: 600px;
    animation: fadeIn 0.3s ease-out;
}

.close-button {
    color: var(--light-text-color);
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 15px;
    right: 25px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-button:hover,
.close-button:focus {
    color: var(--text-color);
    text-decoration: none;
}

.modal-content h3 {
    color: var(--primary-color);
    text-align: center;
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 1.8em;
}

#selected-products-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 300px; /* Altura máxima para la lista */
    overflow-y: auto; /* Scroll si la lista es larga */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 20px;
}

#selected-products-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
}

#selected-products-list li:last-child {
    border-bottom: none;
}

#selected-products-list li span {
    color: var(--text-color);
    font-size: 1em;
}

#selected-products-list li .remove-item {
    background-color: #dc3545; /* Rojo para eliminar */
    color: var(--card-background);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

#selected-products-list li .remove-item:hover {
    background-color: #c82333;
}

.modal-actions {
    text-align: center;
}



/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .main-header h1 {
        font-size: 2.2em;
    }
    .main-header p {
        font-size: 1em;
    }
    .category-button {
        padding: 8px 15px;
        font-size: 0.95em;
    }
    #product-catalog h2 {
        font-size: 2em;
    }
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .category-nav {
        position: static; /* Change sticky to static on mobile */
    }
    .main-header {
        padding: 2em 0;
    }
    .store-name h1 {
        font-size: 1.8em;
    }
    .main-header p {
        font-size: 0.9em;
    }
    .category-buttons-container {
        flex-direction: column;
        gap: 8px;
    }
    .category-button {
        width: 90%;
        margin: 0 auto;
    }
    #product-catalog {
        padding: 30px 15px;
        margin: 30px auto;
    }
    #product-catalog h2 {
        font-size: 1.8em;
    }
    .product-info h3 {
        font-size: 1.2em;
    }
    .product-info p {
        font-size: 0.85em;
    }
    .product-price {
        font-size: 1.1em;
    }
    .add-to-selection-button {
        font-size: 0.95em;
        padding: 10px;
    }
    .selection-button {
        bottom: 15px;
        right: 15px;
        padding: 12px 15px;
        font-size: 1em;
    }
    .selection-button .icon {
        font-size: 1.2em;
        margin-right: 8px;
    }
    .selection-button .count {
        padding: 2px 7px;
    }
    .modal-content {
        width: 95%;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .main-header {
        padding: 1.5em 0;
    }
    .store-name h1 {
        font-size: 1.5em;
    }
    .main-header p {
        font-size: 0.8em;
    }
    .category-nav {
        padding: 8px 0;
    }
    .category-button {
        font-size: 0.8em;
        padding: 6px 12px;
    }
    #product-catalog h2 {
        font-size: 1.5em;
    }
    .product-info h3 {
        font-size: 1.1em;
    }
    .product-info p {
        font-size: 0.8em;
    }
    .product-price {
        font-size: 1em;
    }
    .add-to-selection-button {
        font-size: 0.9em;
        padding: 8px;
    }
}