/* Definición de variables CSS para modo claro y oscuro */
:root {
    /* Modo Claro */
    --background-color: #f0f0f0;
    --text-color: #1a1a1a;
    --header-bg: #d3d3d3;
    --nav-bg: rgba(180, 180, 180, 0.85);
    --nav-hover-bg: #a9a9a9;
    --nav-hover-text: #000000;
    --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: #207ce6;
    --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;
}

[data-theme="dark"] {
    /* Modo Oscuro */
    --background-color: #1a1a1a;
    --text-color: #ffffff;
    --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: transparent;
    --icon-color: #ffffff;
    --search-bar-bg: rgba(59, 59, 59, 0.767);
    --button-bg: #00b7eb;
    --button-text: #ffffff;
}

/* Body */
body {
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    font-family: 'Roboto', Arial, sans-serif;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body {
    background: linear-gradient(135deg, #f0f0f5, #e0e0ea);
}

[data-theme="dark"] {
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
}

/* Contenedor Header */
header {
    position: sticky;
    top: 0;
    z-index: 30;
    width: 100vw;
    left: 0;
    margin: 0;
    padding: 0;
}

/* 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%;
    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: var(--text-color);
    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: var(--text-color);
    text-decoration: none;
}

/* 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;
}

.nav-bar {
    background-color: var(--nav-bg);
    padding: 6px 0;
    text-align: center;
    position: sticky;
    z-index: 30;
    width: 100vw;
    left: 0;
    box-sizing: border-box;
    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;
}

.nav-bar li {
    display: flex;
}

.nav-bar a {
    color: var(--text-color);
    text-decoration: none;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    height: 100%;
    width: 100%;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: 16px;
}

.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;
}

/* Galería de productos */
.gallery-section {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-section h1 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 30px;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.gallery-section h2 {
    text-align: center;
    font-size: 28px;
    margin-bottom: 30px;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.product-gallery,
.search-results-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.product-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 4px 8px var(--card-shadow);
    overflow: hidden;
    position: relative;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease, background-color 0.3s ease;
    border: 2px solid transparent; /* Borde inicial transparente */
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px var(--card-hover-shadow);
    border: 2px solid #ffcccb; /* Rosa pastel para modo claro */
    background-color: #fff5f5; /* Fondo ligeramente rosado */
}

/* Hover en modo oscuro */
[data-theme="dark"] .product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px var(--card-hover-shadow);
    border: 2px solid #ff6f61; /* Coral para modo oscuro */
    background-color: #3a3a3a; /* Fondo gris más claro */
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
}

.product-name {
    font-size: 18px;
    font-weight: 700;
    margin: 10px 0;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.product-price {
    font-size: 16px;
    color: var(--price-color);
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.product-inventory {
    font-size: 14px;
    color: var(--inventory-color);
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.out-of-stock {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--out-of-stock-bg);
    color: var(--out-of-stock-text);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    text-transform: uppercase;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Estilo para el botón "Ver Detalles" en las tarjetas de productos */
.tech-specs-link {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--button-bg); /* #ff4c29 en claro, #ff4d8d en oscuro */
    color: var(--button-text); /* #ffffff */
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    text-align: center;
    margin-top: 10px;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

/* Efecto hover */
.tech-specs-link:hover {
    background-color: var(--price-hover); /* #e63920 en claro, #ff6699 en oscuro */
    transform: translateY(-2px);
    box-shadow: 0 2px 4px var(--card-shadow);
}

/* Efecto active */
.tech-specs-link:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Asegurar que el botón encaje en la tarjeta */
.product-card .tech-specs-link {
    width: fit-content;
    align-self: center;
}

/* Estilos responsivos para móviles */
@media (max-width: 768px) {
    .tech-specs-link {
        padding: 6px 12px;
        font-size: 13px;
        margin-top: 8px;
    }
}

/* 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);
}

/* Estilos para la sección de redes sociales */
.footer-section .social-links li a {
    display: flex;
    align-items: center;
    gap: 8px; /* Espacio entre el icono y el texto */
    color: var(--text-color);
    font-size: 14px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section .social-links li a i {
    color: var(--icon-color);
    font-size: 16px; /* Tamaño del icono ligeramente más grande */
    transition: color 0.3s ease;
}

.footer-section .social-links li a:hover,
.footer-section .social-links li a:hover i {
    color: var(--nav-hover-text); /* Color al pasar el ratón */
}
.highlight-product {
    animation: highlight 3s ease;
    border: 2px solid #ff4c29;
    box-shadow: 0 0 10px rgba(255, 76, 41, 0.5);
}

@keyframes highlight {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}