/* Estilos para la sección de categorías y pestañas */
.discount-categories-section {
    background: #BFD5FF !important;
    padding: 40px 35px;
    position: relative;
}

body {
    background: #BFD5FF !important;
}

body.dark-mode {
    background: #2b3546 !important;
}

.dark-mode .discount-categories-section {
    background: #2b3546 !important;
}

.text-teal {
    color: #015B86 !important;
}

/* Contenedor padre común para alinear ambas secciones */
.content-container {
    max-width: 90%;
    margin: 0 auto;
    padding: 0 20px;
}

/* Estilos para las categorías */
.categories-wrapper {
    margin: 0;
    justify-content: center;
    gap: 20px;
    padding: 10px 0;
}

.category-item {
    flex: 0 0 auto;
}

.category-card {
    width: 171px;
    height: 125px;
    padding: 20px 15px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: white !important;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.category-card:hover .category-name {
    color: #2D8AA3 !important;
}

.category-icon-container {
    width: 50px;
    height: 50px;
}

.category-icon {
    font-size: 2rem;
    color: #333;
}

.category-name {
    font-size: 0.9rem;
    line-height: 1.3;
    color: #333;
    transition: color 0.3s ease;
    font-weight: 600;
}

.category-icon-img {
    width: 70%;
    height: auto;
    max-width: 84px;
    min-width: 84px;
    max-height: 58px;
    object-fit: contain;
}

/* Contenedor con efecto fade-out para categorías */
.categories-container {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.categories-container::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(to right, transparent, #BFD5FF);
    pointer-events: none;
    z-index: 1;
    display: none; /* Oculto por defecto */
}

.dark-mode .categories-container::after {
    background: linear-gradient(to right, transparent, #2b3546);
}

/* Estilos para las pestañas */
.tabs-section {
    margin-top: 50px;
    padding-bottom: 0;
    border-bottom: 1.5px solid #000000 !important;
    position: relative;
}

.custom-tab {
    border: none !important;
    background: none !important;
    color: #666 !important;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 15px 30px 15px 0;
    border-bottom: 3px solid transparent !important;
    transition: all 0.3s ease;
    margin-right: 40px;
    position: relative;
}

.custom-tab:hover {
    color: rgb(0, 0, 0) !important;
}

.custom-tab.active {
    color: rgb(0, 0, 0) !important;
    background: none !important;
    border-bottom: 3px solid transparent !important;
    position: relative;
}

/* Línea activa del tab */
.custom-tab.active::after {
    content: '';
    position: absolute;
    bottom: -17px !important;
    left: 0;
    right: 30px;
    height: 3px;
    background: #E36414 !important;
    z-index: 1;
}

.tab-navigation {
    display: flex;
    gap: 10px;
}

.tab-navigation button {
    width: 40px;
    height: 40px;
    border: 2px solid rgb(0, 0, 0);
    color: #666;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.tab-navigation button:hover {
    background-color: rgb(0, 0, 0);
    border-color: rgb(0, 0, 0);
    color: white;
    transform: scale(1.1);
}

/* ===========================================
   ESTILOS CORREGIDOS PARA SCROLL HORIZONTAL
   =========================================== */

/* Contenedor del tab content */
.tab-content {
    overflow: visible;
    padding-top: 30px;
}

/* Contenedor scrolleable horizontal */
.discount-cards-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding: 0;
}

.discount-cards-wrapper {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    gap: 20px;
    padding: 20px 0;
    /* Ocultar scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE y Edge */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling en iOS */
    cursor: grab;
    user-select: none;
}

.discount-cards-wrapper::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.discount-cards-wrapper:active {
    cursor: grabbing;
}

.discount-cards-wrapper.dragging {
    cursor: grabbing;
}

.discount-cards-wrapper.dragging .discount-card {
    pointer-events: none;
}

/* Efecto fade-out en el borde derecho */
.discount-cards-container::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(to right, transparent, #BFD5FF);
    pointer-events: none;
    z-index: 1;
}

/* Ocultar el efecto en mobile */
@media (max-width: 768px) {
    .discount-cards-container::after {
        display: none;
    }
}

.dark-mode .discount-cards-container::after {
    background: linear-gradient(to right, transparent, #2b3546);
}

/* Estilos para las tarjetas de descuento */
.discount-card {
    flex: 0 0 auto;
    width: 320px;
    min-height: 280px;
    max-height: none;
    padding: 20px 15px;
    background: white !important;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.discount-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.discount-percentage {
    padding: 10px 0;
    margin-bottom: 15px;
    text-align: center;
}

.discount-number {
    font-size: 28px;
    font-family: 'Arial', sans-serif;
    font-weight: 700;
    color: #FF4757;
    display: block;
    line-height: 1.2;
}

.description-text {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.4;
    text-align: center;
}

.brand-info {
    margin-bottom: 20px;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo {
    width: 200px;
    height: 60px;
    object-fit: contain;
    flex-shrink: 0;
}

.terms-info {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

.terms-text {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
    margin-bottom: 4px;
}

.additional-text {
    font-size: 0.75rem;
    color: #999;
    margin-bottom: 0;
}

/* Font Awesome icons */
.fa-umbrella-beach::before { content: "\f5ca"; }
.fa-film::before { content: "\f008"; }
.fa-utensils::before { content: "\f2e7"; }
.fa-user-tie::before { content: "\f508"; }
.fa-spa::before { content: "\f5bb"; }
.fa-shopping-bag::before { content: "\f290"; }
.fa-ellipsis-h::before { content: "\f141"; }
.fa-chevron-left::before { content: "\f053"; }
.fa-chevron-right::before { content: "\f054"; }

/* ===========================================
   RESPONSIVE DESIGN - ORDEN CORRECTO
   =========================================== */

/* Desktop grande */
@media (max-width: 1200px) {
    .content-container {
        max-width: 95%;
        padding: 0 15px;
    }
    
    .categories-wrapper {
        gap: 20px;
    }
    
    .custom-tab {
        margin-right: 30px;
    }
    
    .custom-tab.active::after {
        right: 20px;
    }
    
    .discount-cards-wrapper .discount-card {
        width: 280px;
    }
    
    .discount-cards-container::after {
        width: 35px;
    }
}

/* Tablet */
@media (max-width: 768px) {
    .content-container {
        max-width: 100%;
        padding: 0 10px;
    }
    
    .discount-categories-section {
        margin-top: 20px;
        padding: 30px 20px;
    }
    
    /* Activar scroll horizontal para categorías en móvil */
    .categories-wrapper {
        justify-content: flex-start !important;
        flex-wrap: nowrap !important;
        padding: 10px 0;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-behavior: smooth;
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
    }
    
    .categories-wrapper::-webkit-scrollbar {
        display: none;
    }
    
    /* Mostrar efecto fade-out en móvil */
    .categories-container::after {
        display: block !important;
        width: 25px;
    }
    
    /* CATEGORÍAS MÁS GRANDES EN TABLET */
    .category-card {
        width: 171px;
        height: 125px;
        padding: 20px 15px;
        flex-shrink: 0 !important;
    }
    
    /* Mantener el tamaño del icono igual */
    .category-icon-container {
        width: 50px !important;
        height: 50px !important;
    }
    
    .category-icon-img {
        width: 70% !important;
        height: auto !important;
        max-width: 84px !important;
        min-width: 84px !important;
        max-height: 58px !important;
        object-fit: contain !important;
    }
    
    .category-name {
        font-size: 0.85rem !important;
    }
    
    /* Tabs */
    .custom-tab {
        font-size: 0.95rem;
        padding: 12px 20px 12px 0;
        margin-right: 20px;
    }
    
    .custom-tab.active::after {
        right: 10px;
        bottom: -17px !important;
    }
    
    .tab-navigation {
        display: none;
    }
    
    /* Discount cards */
    .discount-cards-wrapper .discount-card {
        width: 260px;
        min-height: 260px;
    }
    
    .discount-number {
        font-size: 24px;
    }
    
    .discount-cards-container::after {
        width: 25px;
    }
}

/* Móvil */
@media (max-width: 576px) {
    .content-container {
        padding: 0 5px;
    }
    
    .categories-wrapper {
        gap: 15px !important;
    }
    
    .categories-container::after {
        width: 20px !important;
    }
    
    /* CATEGORÍAS MÁS GRANDES EN MÓVIL */
    .category-card {
        width: 171px;
        height: 125px;
        padding: 20px 15px;
        flex-shrink: 0 !important;
    }
    
    /* Mantener el tamaño del icono igual */
    .category-icon-container {
        width: 50px !important;
        height: 50px !important;
    }
    
    .category-icon-img {
        width: 70% !important;
        height: auto !important;
        max-width: 84px !important;
        min-width: 84px !important;
        max-height: 58px !important;
        object-fit: contain !important;
    }
    
    .category-name {
        font-size: 0.8rem !important;
    }
    
    /* Tabs */
    .custom-tab {
        font-size: 0.85rem;
        padding: 10px 15px 10px 0;
        margin-right: 15px;
    }
    
    .custom-tab.active::after {
        right: 5px;
    }
    
    /* Discount cards */
    .discount-cards-wrapper .discount-card {
        width: 280px;
        min-height: 240px;
    }
    
    .discount-number {
        font-size: 22px;
    }
    
    .discount-cards-container::after {
        width: 20px;
    }
    
    .discount-cards-wrapper {
        gap: 15px;
    }
}

/* Pantallas muy pequeñas */
@media (max-width: 400px) {
    .category-card {
       width: 171px;
        height: 125px;
        padding: 20px 15px;
        flex-shrink: 0 !important;
    }
    
    .category-name {
        font-size: 0.75rem !important;
    }
}