/* Definición de variables CSS para modo claro y oscuro */
:root {
    --background-color: #f0f0f0;
    --text-color: #1a1a1a;
    --header-bg: #d3d3d3;
    --nav-hover-bg: #a9a9a9;
    --nav-hover-text: #000000;
    --nav-bg: #b4b4b4d9;
    --card-bg: #ffffff;
    --card-back-bg: #f9f9f9;
    --card-shadow: rgba(0, 0, 0, 0.1);
    --card-hover-shadow: rgba(0, 0, 0, 0.2);
    --price-color: #ff4c29;
    --price-hover: #e63920;
    --bonus-color: #ff8800;
    --amount-color: #00ff7f;
    --inventory-color: #555;
    --out-of-stock-bg: rgba(50, 50, 50, 0.8);
    --out-of-stock-text: white;
    --border-color: #e91e63; 
    --border-hover-color: #e91e63;
    --icon-color: #000000;
    --search-bar-bg: #ffffff;
    --button-bg: #1e90ff;
    --button-text: #ffffff;
    --nav-menu-bg: rgba(211, 211, 211, 0.85);
}

body.dark-mode {
    --background-color: #1a1a1a;
    --text-color: #e5e5e5;
    --header-bg: #333333;
    --nav-bg: rgba(60, 60, 60, 0.85);
    --nav-hover-bg: #5a5a5a;
    --nav-hover-text: #ffffff;
    --card-bg: #2c2c2c;
    --card-back-bg: #353535;
    --card-shadow: rgba(255, 255, 255, 0.1);
    --card-hover-shadow: rgba(255, 255, 255, 0.2);
    --price-color: #ff4d8d;
    --price-hover: #ff6699;
    --bonus-color: #ffea00;
    --amount-color: #00ff7f;
    --inventory-color: #b0b0b0;
    --out-of-stock-bg: rgba(200, 200, 200, 0.8);
    --out-of-stock-text: #333;
    --border-color: #ff4d8d;
    --border-hover-color: #00f0ff;
    --icon-color: #ffffff;
    --search-bar-bg: rgba(59, 59, 59, 0.767);
    --button-bg: #00b7eb;
    --button-text: #ffffff;
    --nav-menu-bg: rgba(40, 40, 40, 0.9);
}

/* HTML and Body */
html {
    width: 100%;
    min-width: 100vw;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    width: 100%;
    min-width: 100vw;
    font-family: 'Roboto', Arial, sans-serif;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
    box-sizing: border-box;
}

body.light-mode {
    background: linear-gradient(135deg, #f0f0f5, #e0e0ea);
}

body.dark-mode {
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
}

/* Contenedor Header */
header {
    position: sticky;
    top: 0;
    z-index: 30;
    width: 100%;
    min-width: 100vw;
    left: 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Barra superior fija (top-bar) */
.top-bar {
    background-color: var(--header-bg);
    color: var(--text-color);
    padding: 8px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 30;
    width: 100%;
    min-width: 100vw;
    box-sizing: border-box;
    box-shadow: 0 2px 4px var(--card-shadow);
    font-family: 'Poppins', sans-serif;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Agrupar por bloques */
.nombre-local,
.barra-busqueda,
.iconos-contacto {
    display: flex;
    align-items: center;
}

/* Ajustes a cada sección */
.nombre-local {
    flex: 1;
    font-size: 24px;
}

.barra-busqueda {
    flex: 2;
    justify-content: center;
    padding: 0 20px;
}

.iconos-contacto {
    flex: 1;
    justify-content: flex-end;
    gap: 15px;
}

/* Íconos */
.icono-ws,
.icono-ubicacion {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.icono-ws i,
.icono-ubicacion i {
    font-size: 16px;
    color: var(--icon-color);
}

/* Estilo para hipervínculos en el top-bar */
.nombre-local a,
.icono-ws a {
    color: #000000;
    text-decoration: none;
}

.nombre-local a:hover,
.nombre-local a:active,
.nombre-local a:visited,
.icono-ws a:hover,
.icono-ws a:active,
.icono-ws a:visited {
    color: #000000;
    text-decoration: none;
}

/* Modo oscuro para hipervínculos en el top-bar */
body.dark-mode .nombre-local a,
body.dark-mode .icono-ws a {
    color: #ffffff;
}

body.dark-mode .nombre-local a:hover,
body.dark-mode .nombre-local a:active,
body.dark-mode .nombre-local a:visited,
body.dark-mode .icono-ws a:hover,
body.dark-mode .icono-ws a:active,
body.dark-mode .icono-ws a:visited {
    color: #ffffff;
}

/* Botón de cambio de tema */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
}

.theme-icon {
    font-size: 20px;
    color: var(--text-color);
    transition: transform 0.3s ease, color 0.3s ease;
}

.theme-icon:hover {
    transform: scale(1.2);
    color: var(--border-color);
}

/* Botón de menú */
.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: none;
}

.menu-icon {
    font-size: 20px;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.menu-icon:hover {
    color: var(--border-color);
}

/* Barra de búsqueda */
.search-bar {
    padding: 8px;
    width: 100%;
    max-width: 450px;
    box-sizing: border-box;
    background-color: var(--search-bar-bg);
    color: var(--text-color);
    border: 1px solid var(--card-shadow);
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    font-family: 'Roboto', sans-serif;
    font-weight: normal;
}

.search-bar:focus {
    outline: none;
    border-color: var(--border-color);
}

/* Barra de navegación */
.nav-container {
    display: block;
    width: 100%;
}

.nav-bar {
    background-color: var(--nav-bg);
    padding: 6px 0;
    text-align: center;
    position: sticky;
    z-index: 30;
    width: 100%;
    min-width: 100vw;
    left: 0;
    margin: 0;
    box-shadow: 0 2px 4px var(--card-shadow);
    transition: background-color 0.3s ease;
}

.nav-bar ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.nav-bar li {
    display: flex;
}

.nav-bar a {
    color: var(--text-color);
    text-decoration: none;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: 16px;
    white-space: nowrap;
}

.nav-bar a:hover {
    background-color: var(--nav-hover-bg);
    color: var(--nav-hover-text);
}

/* Íconos dentro del menú */
.nav-bar i {
    font-size: 20px;
}

/* Sección Ubicación */
.ubicacion-contacto {
    width: 90%;
    max-width: 1500px;
    margin: 50px auto;
    padding: 50px;
    background: rgba(15, 14, 24, 0.8);
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.5s ease-in-out;
    border: 2px solid var(--border-color);
    box-sizing: border-box;
}

body.light-mode .ubicacion-contacto {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border: 2px solid #696666bd;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ubicacion-contacto h1 {
    width: 100%;
    font-size: 36px;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    color: var(--price-color);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

body.light-mode .ubicacion-contacto h1 {
    color: #d35400;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

.ubicacion-contacto h1::after {
    content: '';
    display: block;
    width: 100px;
    height: 5px;
    background-color: var(--price-color);
    margin: 20px auto;
}

body.light-mode .ubicacion-contacto h1::after {
    background-color: #d35400;
}

.subtitulo {
    font-size: 20px;
    color: #bbbbbb;
    text-align: center;
    margin-bottom: 40px;
    font-weight: 400;
}

body.light-mode .subtitulo {
    color: #666666;
}

/* Contenedor de 2 columnas */
.contenedor-principal {
    display: flex;
    gap: 50px;
    width: 100%;
    box-sizing: border-box;
}

/* Columna izquierda (mapa + foto) */
.columna-izquierda {
    flex: 1;
    min-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.mapa {
    height: 550px;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
    border: 4px solid var(--border-color);
    position: relative;
    transition: transform 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

body.light-mode .mapa {
    border: 4px solid #696666bd;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.mapa:hover {
    transform: scale(1.02);
}

.mapa iframe {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 12px;
    display: block;
}

.mapa-btn {
    display: inline-block;
    background-color: #4a90e2;
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    margin-top: 15px;
    text-align: center;
    width: fit-content;
    align-self: center;
}

body.light-mode .mapa-btn {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.mapa-btn:hover {
    background-color: #357abd;
    transform: scale(1.05);
}

.foto-item {
    transition: transform 0.3s ease;
    width: 100%;
}

.foto-item:hover {
    transform: scale(1.02);
}

.foto-item .gallery-img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 12px;
    border: 4px solid var(--border-color);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
    display: block;
    cursor: pointer;
}

body.light-mode .foto-item .gallery-img {
    border: 4px solid #696666bd;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    overflow: auto;
}

.modal-content {
    position: relative;
    margin: 5% auto;
    padding: 20px;
    width: 80%;
    max-width: 800px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-image {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 10px;
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 36px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.modal-close:hover {
    color: var(--price-color);
}

.modal-prev,
.modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 30px;
    padding: 10px 15px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.modal-prev {
    left: -60px;
}

.modal-next {
    right: -60px;
}

.modal-prev:hover,
.modal-next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Columna derecha (detalles) */
.detalles-contacto {
    flex: 1;
    min-width: 400px;
    padding: 40px;
    background-color: rgba(249, 249, 249, 0.1);
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
    border: 2px solid var(--border-color);
    transition: transform 0.3s ease;
    box-sizing: border-box;
}

body.light-mode .detalles-contacto {
    background-color: rgba(249, 249, 249, 0.9);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    border: 2px solid #696666bd;
}

.detalles-contacto:hover {
    transform: scale(1.02);
}

.contacto-item {
    font-size: 22px;
    line-height: 1.8;
    margin: 25px 0;
    display: flex;
    align-items: flex-start;
    gap: 18px;
    color: #ffffff;
}

body.light-mode .contacto-item {
    color: #333333;
}

.contacto-item i {
    color: var(--price-color);
    font-size: 32px;
    transition: transform 0.3s ease;
}

body.light-mode .contacto-item i {
    color: #d35400;
}

.contacto-item i:hover {
    transform: scale(1.1);
}

.whatsapp-btn {
    background-color: #25D366;
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

body.light-mode .whatsapp-btn {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.whatsapp-btn:hover {
    background-color: #1ebe57;
    transform: scale(1.05);
}

.horario-tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: 20px;
    color: #ffffff;
}

body.light-mode .horario-tabla {
    color: #333333;
}

.horario-tabla tr:nth-child(odd) {
    background-color: rgba(255, 255, 255, 0.05);
}

body.light-mode .horario-tabla tr:nth-child(odd) {
    background-color: #f1f1f1;
}

.horario-tabla td {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.light-mode .horario-tabla td {
    border-bottom: 1px solid #e0e0e0;
}

.horario-tabla td:first-child {
    font-weight: 500;
    color: var(--price-color);
}

body.light-mode .horario-tabla td:first-child {
    color: #d35400;
}

/* Search Results Styles */
#search-results {
    width: 90%;
    max-width: 1200px;
    margin: 50px auto;
    padding: 20px;
    background: rgba(15, 14, 24, 0.8);
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--border-color);
    box-sizing: border-box;
}

body.light-mode #search-results {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border: 2px solid #696666bd;
}

.search-results-container {
    text-align: center;
}

.search-results-container h2 {
    font-size: 28px;
    color: var(--price-color);
    margin-bottom: 20px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

body.light-mode .search-results-container h2 {
    color: #d35400;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.search-result-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 4px 10px var(--card-shadow);
    padding: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.search-result-card:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px var(--card-hover-shadow);
}

.search-result-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.search-result-card h3 {
    font-size: 18px;
    color: var(--text-color);
    margin: 10px 0;
}

.search-result-card .price {
    font-size: 16px;
    color: var(--price-color);
    font-weight: bold;
    margin: 5px 0;
}

.search-result-card .inventory {
    font-size: 14px;
    color: var(--inventory-color);
    margin: 5px 0;
}

.search-result-card .amount,
.search-result-card .bonus {
    font-size: 14px;
    margin: 5px 0;
}

.search-result-card .amount {
    color: var(--amount-color);
}

.search-result-card .bonus {
    color: var(--bonus-color);
}

.search-result-card .out-of-stock {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--out-of-stock-bg);
    color: var(--out-of-stock-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18 PX;
    font-weight: bold;
    text-align: center;
    opacity: 0.9;
}

.no-results {
    font-size: 18px;
    color: var(--text-color);
    text-align: center;
    margin: 20px 0;
}

/* Estilo para el botón "Ver Detalles" */
.details-btn {
    display: inline-block;
    background-color: var(--button-bg);
    color: var(--button-text);
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-top: 10px;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 5px var(--card-shadow);
    cursor: pointer;
    text-align: center;
}

.details-btn:hover {
    background: #0056b3;
    transform: scale(1.05);
    box-shadow: 0 4px 10px var(--card-hover-shadow);
}

body.light-mode .details-btn {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

body.dark-mode .details-btn {
    box-shadow: 0 2px 5px rgba(255, 255, 255, 0.1);
}

/* Responsividad */
@media (max-width: 900px) {
    .contenedor-principal {
        flex-direction: column;
        gap: 30px;
    }
    .columna-izquierda,
    .detalles-contacto {
        width: 100%;
        min-width: 100%;
    }

    .mapa {
        height: 450px;
    }

    .foto-item .gallery-img {
        max-height: 350px;
    }

    .contacto-item {
        font-size: 18px;
    }

    .horario-tabla {
        font-size: 16px;
    }

    .search-results-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* Footer Styles */
.footer {
    background-color: var(--header-bg);
    color: var(--text-color);
    padding: 40px 20px;
    border-top: 2px solid var(--border-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section {
    flex: 1;
    min-width: 200px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}

.footer-section p {
    font-size: 14px;
    line-height: 1.6;
    margin: 5px 0;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--nav-hover-text);
}

.footer-section p i {
    margin-right: 8px;
    color: var(--icon-color);
}

.footer-section p a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section p a:hover {
    color: var(--nav-hover-text);
}

.footer-bottom {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    font-size: 14px;
    margin: 0;
    color: var(--text-color);
}