/* Estilos personalizados para tiendalex2 */

/* Clase para contenedores con fondo azul claro */
.ilike-blue-container {
    background-color: #2c3e50 !important; /* Color actualizado para mantener consistencia */
}

/* Estilos para la barra de navegación */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000; /* Asegura que el encabezado esté por encima de otros elementos */
    height: auto; /* Cambiado a auto */
}

nav {
    box-shadow: 0 2px 5px 0 rgba(0,0,0,0.16);
    height: auto; /* Cambiado a auto */
}

nav.nav-extended .nav-wrapper {
    height: auto; /* Cambiado a auto */
    line-height: normal; /* Cambiado a normal */
    display: flex;
    align-items: center;
}

.nav-wrapper .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-container {
    width: 95%;
    max-width: 1280px;
    padding: 0 15px;
}

nav .brand-logo {
    position: relative;
    left: 0;
    padding-left: 0;
    font-size: 1.8rem; /* Tamaño de fuente ajustado */
    transform: none;
    color: white !important;
}

nav ul {
    display: flex;
    align-items: center;
    height: auto; /* Cambiado a auto */
}

nav ul a {
    padding: 0 15px;
    display: flex;
    align-items: center;
    height: auto; /* Cambiado a auto */
    color: white !important;
}

nav i.material-icons {
    display: flex;
    align-items: center;
    height: auto; /* Cambiado a auto */
    line-height: normal; /* Cambiado a normal */
}

/* Ajustes para el menú desplegable */
.dropdown-content {
    width: auto !important;
    min-width: 250px;
    max-height: none !important;
    overflow-y: visible !important;
    z-index: 1002 !important;
    opacity: 1;
    box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
    background-color: white !important; /* Asegura que el fondo sea blanco */
}

.dropdown-content li {
    min-height: 48px;
    line-height: 1.5;
}

.dropdown-content li > a {
    color: #000 !important; /* Asegura que el texto sea negro */
    display: flex;
    align-items: center;
    padding: 14px 16px;
    font-size: 14px;
    height: auto;
    line-height: 22px;
}

.dropdown-content li > a > i {
    margin-right: 12px;
    height: 24px;
    line-height: 24px;
    color: #2c3e50 !important; /* Color de los iconos en el menú desplegable */
}

.dropdown-content .divider {
    height: 1px;
    margin: 0;
}

/* Ajustes para pantallas medianas */
@media only screen and (max-width: 992px) {
    nav .brand-logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 70%;
    }

    .nav-container {
        width: 100%;
        padding: 0;
    }
}

/* Estilos para las tarjetas */
.card.ilike-blue-container {
    transition: box-shadow 0.3s ease;
}

.card.ilike-blue-container:hover {
    box-shadow: 0 8px 17px 0 rgba(0,0,0,0.2);
}

/* Estilos para el footer */
.footer-copyright {
    margin-top: 0.1px;
    padding-top: 5px;
}

.page-footer {
    background-color: #2c3e50 !important;
    color: white;
    margin-top: auto;
    padding-top: 5px;
    position: relative;
    bottom: 0;
    width: 100%;
}

.footer-copyright {
    background-color: #243342 !important;
    margin-top: 0.1px;
    padding-top: 5px;
}

/* Estilos para el menú móvil */
.sidenav {
    z-index: 1001; /* Asegura que el menú móvil esté por encima del encabezado fijo */
}

.sidenav li > a {
    padding: 0 16px;
    height: 48px;
    line-height: 48px;
    display: flex;
    align-items: center;
}

.sidenav li > a > i.material-icons {
    height: 48px;
    line-height: 48px;
    margin-right: 16px;
}

/* Estilos para el menú de usuario en móvil */
.sidenav .user-view {
    padding: 16px 16px 0;
    margin-bottom: 8px;
}

.sidenav .user-view .name {
    font-size: 16px;
    font-weight: 500;
    margin-top: 8px;
    margin-bottom: 8px;
}

/* Estilos generales */
body {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    padding-top: 0; /* Eliminado, se controlará dinámicamente */
    background-color: #7c0909 !important; /* Color de fondo forzado */
}

main {
    flex: 1 0 auto;
    margin-top: 0 !important; /* Asegurar que no haya margen superior fijo */
    padding-top: 0 !important; /* Asegurar que no haya padding superior fijo */
    position: relative; /* Asegura que el contenido esté por encima del encabezado */
    z-index: 1; /* Valor menor que el encabezado para que esté detrás */
}

/* Ajuste para el parallax con encabezado fijo */
.parallax-container.first-parallax {
    margin-top: 0 !important; /* Asegurar que no haya margen superior fijo */
}

/* Ajuste para secciones normales cuando no hay parallax */
.section:first-of-type:not(.parallax-container + .section) {
    margin-top: 0 !important; /* Asegurar que no haya margen superior fijo */
}

/* Ajuste para pantallas pequeñas donde el encabezado puede ser más alto */
@media only screen and (max-width: 600px) {
    nav.nav-extended .nav-wrapper {
        height: auto; /* Cambiado a auto */
        line-height: normal; /* Cambiado a normal */
    }

    nav ul {
        height: auto; /* Cambiado a auto */
    }

    nav ul a {
        height: auto; /* Cambiado a auto */
    }

    nav i.material-icons {
        height: auto; /* Cambiado a auto */
        line-height: normal; /* Cambiado a normal */
    }

    nav .brand-logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 70%;
    }

    main {
        margin-top: 0 !important; /* Cambiado a 0 */
        padding-top: 0 !important; /* Espacio adicional para separar el contenido del encabezado en móviles */
    }

    .parallax-container.first-parallax {
        margin-top: 0 !important; /* Cambiado a 0 */
    }

    .section:first-of-type:not(.parallax-container + .section) {
        margin-top: 0 !important; /* Cambiado a 0 */
    }
}

/* Estilos para los mensajes de notificación */
.message-container {
    position: fixed;
    top: 0 !important; /* Cambiado a 0 */
    left: 0;
    width: 100%;
    z-index: 999;
    padding: 0;
    transition: all 0.3s ease;
}

.message-container .card-panel {
    margin: 0;
    border-radius: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    padding: 10px 20px;
    animation: slideDown 0.5s ease-out;
}

.message-container .card-panel span {
    display: flex;
    align-items: center;
    font-weight: 500;
}

.message-container .card-panel i {
    margin-right: 10px;
}

.message-container .close-message {
    padding: 0 10px;
    height: 36px;
    line-height: 36px;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===== FILTROS Y CATEGORÍAS ===== */
.filtros-panel {
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    padding: 20px;
    border: 1px solid #ecf0f1;
    position: sticky;
    top: 80px;
}

.category-title {
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.categorias-container {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 10px;
}

/* Estilos para los checkboxes y radio buttons */
[type="checkbox"].filled-in:checked+span:not(.lever):after {
    border: 2px solid var(--accent-color);
    background-color: var(--accent-color);
}

[type="radio"]:checked+span:after,
[type="radio"].with-gap:checked+span:after {
    background-color: var(--accent-color);
}

[type="radio"]:checked+span:after,
[type="radio"].with-gap:checked+span:before,
[type="radio"].with-gap:checked+span:after {
    border: 2px solid var(--accent-color);
}

/* Estilos para el slider de precio */
input[type=range]::-webkit-slider-thumb {
    background-color: var(--accent-color);
}
input[type=range]::-moz-range-thumb {
    background-color: var(--accent-color);
}
input[type=range]::-ms-thumb {
    background-color: var(--accent-color);
}

input[type=range] + .thumb {
    background-color: var(--accent-color);
}

input[type=range] + .thumb .value {
    color: white;
}

.selected-price {
    color: var(--primary-color);
    font-weight: 500;
}

/* ===== PRODUCTOS Y DETALLES ===== */
.product-title {
    font-size: 1.2rem;
    font-weight: 500;
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--text-color);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-description {
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
}

.product-description-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    font-size: 0.9rem;
    line-height: 1.4;
}

.price-section {
    margin: 10px 0;
}

.price, .price-bs {
    margin: 5px 0;
    font-weight: 500;
}

.price {
    color: var(--accent-color);
}

.price-bs {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.tasa-info {
    font-size: 0.8rem;
    color: var(--text-light);
}

.stock-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0;
}

.category-container {
    margin: 10px 0;
    font-size: 0.9rem;
}

.category-label {
    font-weight: 500;
    margin-right: 5px;
    color: var(--text-light);
}

.category-value-container {
    display: inline-flex;
    align-items: center;
}

.category-value {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #424242;
}

/* ===== ICONOS DE EDICIÓN ===== */
.edit-price-icon, .edit-description-icon, .edit-category-icon, .edit-stock-icon {
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.3s ease;
    vertical-align: middle;
    margin-left: 5px;
}

.edit-image-icon, .fullscreen-image-icon, .foto-count-indicator {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.edit-image-icon {
    top: 10px;
    right: 10px;
}

.fullscreen-image-icon {
    bottom: 10px;
    right: 50px;
}

.foto-count-indicator {
    bottom: 10px;
    right: 10px;
    font-size: 0.7rem;
    width: auto;
    height: auto;
    padding: 3px 6px;
    border-radius: 10px;
}

.foto-count-indicator i {
    font-size: 0.8rem;
    margin-right: 3px;
}

.edit-price-icon:hover, .edit-description-icon:hover, .edit-category-icon:hover, .edit-stock-icon:hover,
.edit-image-icon:hover, .fullscreen-image-icon:hover {
    color: var(--accent-color);
    background-color: white;
    transform: scale(1.1);
}

.edit-stock-icon {
    margin-left: 10px;
}

/* ===== GALERÍA DE IMÁGENES ===== */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.image-item {
    position: relative;
    width: 100px;
    height: 100px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(255, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.preview-item {
    width: 100px;
    height: 100px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 0.7rem;
    padding: 2px 5px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

/* ===== PAGINACIÓN ===== */
.pagination {
    margin-top: 30px;
}

.pagination li.active {
    background-color: var(--accent-color);
}

.pagination li a {
    color: var(--primary-color);
}

.pagination li.active a {
    color: white;
}

/* ===== BADGES Y NOTIFICACIONES ===== */
.badge.new {
    background-color: var(--accent-color);
}

.badge.new.amber {
    background-color: var(--warning-color);
}

.badge.new.red {
    background-color: var(--danger-color);
}

.pulse {
    background-color: var(--accent-color) !important;
}

/* ===== BOTONES ESPECÍFICOS ===== */
#limpiar-filtros, #limpiar-filtros-mensaje {
    background-color: var(--primary-color);
    color: white;
    width: 100%;
}

#limpiar-filtros:hover, #limpiar-filtros-mensaje:hover {
    background-color: var(--secondary-color);
}

.btn-add-cart,
.agregar-carrito-form .btn {
    background-color: var(--accent-color);
}

.btn-add-cart:hover,
.agregar-carrito-form .btn:hover {
    background-color: var(--accent-hover);
}

/* ===== TÍTULOS DE PÁGINA ===== */
.page-title {
    margin-top: 30px;
    margin-bottom: 30px;
    color: var(--accent-color);
    font-weight: 500;
    position: relative;
    z-index: 2;
}

.section-title {
    font-size: 2rem;
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
}

/* ===== CHAT ===== */
.chat-float {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color) !important;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 1050;
    transition: all 0.3s ease;
}

.chat-float:hover {
    transform: scale(1.1);
    background-color: var(--secondary-color) !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.chat-header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ===== ESTILOS PARA PÁGINA DE SERVICIOS ===== */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.parallax-container {
    color: white;
}

.card.hoverable {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card.hoverable:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 15px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19);
}

.btn-large {
    margin-top: 20px;
    border-radius: 30px;
    padding: 0 30px;
}

.large.material-icons {
    font-size: 4rem;
    margin-bottom: 15px;
}

.section {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.divider {
    margin: 20px 0 30px;
}

/* ===== MEDIA QUERIES ===== */
@media only screen and (max-width: 992px) {
    nav .brand-logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 70%;
    }

    .nav-container {
        width: 100%;
        padding: 0;
    }
}

@media only screen and (max-width: 600px) {
    nav.nav-extended .nav-wrapper {
        height: auto; /* Cambiado a auto */
        line-height: normal; /* Cambiado a normal */
    }

    nav ul, nav ul a, nav i.material-icons {
        height: auto; /* Cambiado a auto */
    }

    nav .brand-logo {
        position: absolute;
        font-size: 1.4rem;
        max-width: 60%;
        padding: 0;
    }

    main {
        margin-top: 0; /* Cambiado a 0 */
        padding-top: 30px;
    }

    .parallax-container.first-parallax,
    .section:first-of-type:not(.parallax-container + .section) {
        margin-top: 0; /* Cambiado a 0 */
    }

    .message-container {
        top: 0; /* Cambiado a 0 */
    }
}
