.product--grid {
    height: 100%;
    min-height: 240px;
    display: flex;
    flex-direction: column;
}

.event-card {
    position: relative;
    border: none;
    border-radius: 20px;
    overflow: hidden;
    min-height: 240px;
    display: flex;
    justify-content: flex-end;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #2c3e50;
}

/* Desktop: Fixed aspect ratio for consistent image sizes */
@media (min-width: 768px) {
    .event-card {
        aspect-ratio: 4 / 3;
        height: auto;
        min-height: 0;
        width: 100%;
    }
    
    .col-md-4.px-10 {
        display: flex;
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
    
    .col-md-4.px-10 .event-card {
        width: 100%;
    }
    
    .event-card__background {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

.event-card:hover,
.event-card:focus-within {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.event-card__background {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-card__background--fallback {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 60%, #2980b9 100%);
}

.event-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.55) 85%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.event-card:hover .event-card__overlay,
.event-card:focus-within .event-card__overlay {
    opacity: 1;
}

.event-card__full-link {
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: inherit;
    display: block;
    text-indent: -9999px;
}

.event-card__badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(255, 255, 255, 0.95);
    color: #e74c3c;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 3;
}

.event-card__content {
    position: relative;
    z-index: 3;
    width: 100%;
    padding: 24px 24px 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.55) 85%);
}

.event-card__title {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.3;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.event-card__link {
    color: #ffffff;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.event-card__link:hover,
.event-card__link:focus {
    color: #ffffff;
    text-decoration: underline;
}

.event-card__details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.3s ease;
    pointer-events: none;
    max-height: 0;
    overflow: hidden;
    margin-top: 0;
}

.event-card:hover .event-card__details,
.event-card:focus-within .event-card__details {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    max-height: 200px;
    margin-top: 12px;
}

.event-card__date,
.event-card__location {
    margin: 0;
    color: #ffffff;
    font-size: 0.95rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 6px;
}

.event-card__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    border-radius: 999px;
    padding: 10px 24px;
    font-weight: 700;
    background-color: rgba(255, 255, 255, 0.95);
    color: #e74c3c;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.event-card__cta:hover,
.event-card__cta:focus {
    background-color: #e74c3c;
    color: #ffffff;
}

.event-card__cta--disabled,
.event-card__cta--disabled:hover,
.event-card__cta--disabled:focus {
    background-color: rgba(255, 255, 255, 0.35);
    color: rgba(255, 255, 255, 0.8);
    box-shadow: none;
    cursor: default;
    pointer-events: none;
}

.event-card:hover .event-card__content,
.event-card:focus-within .event-card__content {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.7) 100%);
}

.event-card--placeholder {
    background-color: #2c3e50;
}

.event-card--placeholder .event-card__content {
    background: linear-gradient(180deg, rgba(52, 73, 94, 0.2) 0%, rgba(52, 73, 94, 0.8) 100%);
}

.event-card--placeholder:hover .event-card__content,
.event-card--placeholder:focus-within .event-card__content {
    background: linear-gradient(180deg, rgba(52, 73, 94, 0.35) 0%, rgba(52, 73, 94, 0.9) 100%);
}

.product-item {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-item__image {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
}

.product-item__image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-item__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
}

.product-item__footer {
    margin-top: auto;
    padding: 15px 0;
}

.col-md-4.px-10 {
    margin-bottom: 40px;
    display: flex;
}

.col-md-4.px-10>.card {
    width: 100%;
}

.card-body {
    padding: 25px 20px;
}

/* Estilos globales para prevenir saltos */
.header-top,
.navbar,
.navbar-right,
.navbar-right__menu,
.nav-flag-select,
.nav-item-toggle,
.dropdown-custom,
.dropdown-wrapper,
#languageToggle,
.nav-author,
.nav-author a {
    transition: none !important;
    animation: none !important;
    transform: none !important;
    backface-visibility: hidden !important;
    -webkit-font-smoothing: antialiased !important;
    perspective: none !important;
}

/* Fijar dimensiones iniciales */
.navbar-right__menu {
    display: flex !important;
    align-items: center !important;
    height: 50px !important;
}

.nav-flag-select {
    position: relative !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
}



.nav-author {
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
}

.nav-author a {
    display: flex !important;
    align-items: center !important;
    height: 36px !important;
}

/* Estilos para el header en móvil */
@media (max-width: 767px) {
    .header-top {
        padding: 0 0 10px 0 !important;
        height: auto !important;
    }

    .navbar {
        flex-wrap: nowrap !important;
        height: auto !important;
    }

    .navbar-right__menu>li {
        margin-left: 0 !important;
    }

    /* Estilos para el selector de idioma */
    .nav-flag-select {
        position: relative;
        margin-right: 2px !important;
    }


    /* Mantener el icono original */
    .dm-select::after {
        display: inline-block !important;
        position: absolute !important;
        right: 8px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        font-family: "Line Awesome Free" !important;
        font-weight: 900 !important;
        font-size: 12px !important;
        margin-left: 0 !important;
    }

    .navbar-left {
        flex: 0 0 auto;
    }

    .navbar-right {
        flex: 0 0 auto;
    }

    .navbar-right__menu>li {
        margin-left: 0 !important;
    }

    /* Estilos para el selector de idioma */
    .nav-flag-select {
        position: relative;
        margin-right: 2px !important;
    }

    .logo-area {
        max-width: 120px;
    }

    .logo-area img {
        max-width: 100%;
        height: auto;
    }

    .nav-search {
        display: none;
    }

    /* Estilos para el botón de inicio de sesión */
    .nav-item-toggle u {
        display: none !important;
    }

    .nav-item-toggle {
        padding: 8px !important;
        min-width: auto !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-item-toggle i {
        margin: 0 !important;
    }

    /* Estilo para el botón del selector */
    .nav-flag-select .nav-item-toggle {
        display: flex;
        align-items: center;
        gap: 4px;
    }

    /* Ajustar la flecha del selector */
    .nav-flag-select .nav-link::after {
        margin-left: 4px;
    }

    .nav-flag-select .dropdown-wrapper {
        position: absolute !important;
        top: 100% !important;
        left: auto !important;
        right: 0 !important;
        width: 120px !important;
        transform: none !important;
        margin-top: 5px;
        background: white;
        border-radius: 6px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        z-index: 9999;
    }

    .nav-flag-select .dropdown-wrapper--small {
        min-width: unset !important;
    }

    .nav-flag-select .language-select {
        padding: 8px !important;
        margin: 0;
    }

    .nav-flag-select .language-select li {
        text-align: left;
        padding: 8px 12px;
        border-bottom: 1px solid #eee;
    }

    .nav-flag-select .language-select li:last-child {
        border-bottom: none;
    }

    .nav-flag-select .language-select a {
        font-size: 14px;
        display: block;
        color: #666;
        text-decoration: none;
    }

    .nav-flag-select .language-select a.active {
        color: #0056b3;
        font-weight: 500;
    }

    .col-md-4.px-10 {
        width: 50% !important;
        padding: 0 5px !important;
        margin-bottom: 12px !important;
    }

    .product--grid {
        min-height: 200px !important;
        height: auto !important;
    }

    .event-card {
        min-height: 200px;
        border-radius: 16px;
        aspect-ratio: 1 / 1;
        height: auto;
    }

    .event-card__overlay {
        display: none;
    }

    .event-card__content {
        display: flex;
        padding: 18px 16px;
        background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.7) 100%);
        align-items: flex-end;
        justify-content: flex-end;
    }

    .event-card__badge {
        top: 10px;
        right: 10px;
        font-size: 0.6rem;
        padding: 4px 10px;
    }

    .event-card__background {
        will-change: transform;
        transform: translateZ(0);
    }

    .event-card__title {
        display: none;
    }

    .event-card__details {
        opacity: 1;
        transform: none;
        pointer-events: auto;
        max-height: none;
        margin-top: 0;
        gap: 0;
        align-items: center;
        width: 100%;
    }

    .event-card__details > p {
        display: none;
    }

    .event-card__cta {
        padding: 10px 28px;
        font-size: 0.95rem;
    }

    .products_page .col-md-4.px-10 {
        width: 100%;
        flex: 0 0 100%;
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
        display: flex;
        justify-content: center;
    }

    .products_page .col-md-4.px-10 + .col-md-4.px-10 {
        margin-top: 20px;
    }

    .products_page .col-md-4.px-10 .event-card {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
    }

    .product-item {
        height: auto !important;
    }

    .product-item__image {
        padding-top: 100% !important;
        /* Mantener proporción cuadrada */
    }

    .card-body {
        padding: 8px 8px !important;
    }

    .product-item__body {
        padding: 0 !important;
    }

    .product-item__body h6 {
        font-size: 12px !important;
        line-height: 1.2 !important;
        margin-bottom: 4px !important;
        font-weight: 600 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        height: 2.4em !important;
    }

    .product-item__body p {
        font-size: 11px !important;
        margin-bottom: 4px !important;
        line-height: 1.2 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 1 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    .product-item__footer {
        margin-top: 8px !important;
    }

    .product-item__footer .btn {
        padding: 6px 12px !important;
        font-size: 11px !important;
        line-height: 1.2 !important;
        height: auto !important;
        white-space: nowrap !important;
    }

    /* Ajustar el contenedor de las cards */
    .row.product-page-list {
        margin-left: -5px !important;
        margin-right: -5px !important;
    }
}

/* Estilos para el modal de filtros */
.filters-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.filters-modal.show {
    opacity: 1;
    visibility: visible;
}

.filters-modal-content {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    border-radius: 20px 20px 0 0;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s;
    max-height: 80vh;
    overflow-y: auto;
}

.filters-modal.show .filters-modal-content {
    transform: translateY(0);
}

.filters-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.filters-modal-header h5 {
    margin: 0;
    font-weight: 600;
}

.filters-close {
    border: none;
    background: none;
    font-size: 24px;
    padding: 0;
    color: #666;
}

.mobile-filters-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 999;
    cursor: pointer;
}

.mobile-filters-btn:active {
    transform: scale(0.95);
}

.mobile-filters-btn i {
    font-size: 24px;
}

@media (max-width: 767px) {
    .columns-1.col-lg-8 {
        display: none !important;
    }

    .mobile-filters-btn {
        display: flex !important;
    }

    .columns-2.col-lg-12 {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* Estilos para los filtros activos */
.active-filters {
    margin: 15px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 0;
    position: relative;
    z-index: 10;
}

.active-filters:empty {
    display: none;
}

.active-filters .badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: none;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    margin: 0;
    background-color: #ffbc02;
    border-radius: 5px;
}

.active-filters .badge span {
    background: rgba(var(--color-primary-rgb), 0.15);
    color: var(--color-white);
    padding: 8px 12px;
    border-radius: 6px;
    display: inline-block;
}

.active-filters .badge .btn-close {
    padding: 0;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--color-white);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s ease;
    padding-top: .2rem;
}

.active-filters .badge .btn-close:hover {
    color: var(--color-primary);
}

/* Botón limpiar filtros */
.btn-clear-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--color-white);
    border: 1px solid var(--border-color);
    color: var(--color-light);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    transition: all 0.2s ease;
    cursor: pointer;
    margin-left: 20px;
    margin-top: 1rem;
}

.btn-clear-all:hover {
    background: var(--color-danger);
    border-color: var(--color-danger);
    color: white;
}

.btn-clear-all i {
    font-size: 16px;
}

/* Estilos específicos para móvil */
@media (max-width: 767px) {
    .mobile-active-filters {
        position: fixed;
        bottom: 80px;
        left: 0;
        right: 0;
        background: white;
        margin: 0;
        padding: 10px 15px;
        overflow-x: auto;
        flex-wrap: nowrap;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 998;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        display: flex !important;
        align-items: center;
        justify-content: flex-start;
    }

    .mobile-active-filters::-webkit-scrollbar {
        display: none;
    }

    .mobile-active-filters .badge {
        font-size: 13px;
        white-space: nowrap;
        margin-right: 10px;
    }

    .mobile-active-filters .badge span {
        padding: 6px 10px;
        border-radius: 4px;
        background-color: rgba(var(--color-primary-rgb), 0.15);
        color: var(--color-primary);
    }

    .mobile-active-filters .badge .btn-close {
        width: 20px;
        height: 20px;
        font-size: 14px;
        color: var(--color-light);
    }

    .mobile-btn-clear-all {
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 999;
        margin: 0;
        padding: 8px 16px;
        border-radius: 20px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        display: flex !important;
        align-items: center;
        gap: 8px;
        background: var(--color-primary);
        color: white;
        border: none;
        cursor: pointer;
    }

    .mobile-btn-clear-all.d-none {
        display: none !important;
    }

    .mobile-btn-clear-all i {
        font-size: 16px;
    }

    .mobile-btn-clear-all:hover,
    .mobile-btn-clear-all:active {
        background: var(--color-danger);
    }

    .mobile-filters-btn {
        bottom: 90px;
    }
}

@media (max-width: 360px) {
    .col-md-4.px-10 {
        width: 100% !important;
    }

    .col-md-4.px-10 + .col-md-4.px-10 {
        margin-top: 10px !important;
    }
}

/* Estado de carga */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Mensajes de error */
.alert-danger {
    margin: 15px 0;
    padding: 12px 15px;
    background: var(--bg-white);
    border: 1px solid var(--color-danger);
    border-radius: 4px;
    color: var(--color-danger);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.alert-danger .btn-close {
    padding: 0;
    background: transparent;
    border: none;
    color: currentColor;
    opacity: 0.7;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.alert-danger .btn-close:hover {
    opacity: 1;
}

.fade-enter {
    opacity: 0;
    transform: translateY(-10px);
}

.fade-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.fade-exit {
    opacity: 1;
}

.fade-exit-active {
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}