/* ============================================
   CAROUSEL STYLES - Catálogo de Rifas
   ============================================ */

/* === BODY & GENERAL === */
.catalog-page {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* === HERO SECTION === */
.hero-section {
    padding: 60px 0 40px;
    position: relative;
}

.hero-content {
    animation: fadeInDown 0.8s ease-out;
}

/* === LOGOS === */
.hero-logo,
.catalog-logo {
    transition: transform 0.3s ease;
    cursor: pointer;
}

.hero-logo:hover,
.catalog-logo:hover {
    transform: scale(1.05);
}

.fade-in-down {
    animation: fadeInDown 0.8s ease-out;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

.gradient-text {
    background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 20px rgba(255, 255, 255, 0.3);
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    font-weight: 400;
}

.hero-decoration {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
}

.hero-decoration i {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.7);
    animation: float 3s ease-in-out infinite;
}

.hero-decoration i:nth-child(2) {
    animation-delay: 0.5s;
}

.hero-decoration i:nth-child(3) {
    animation-delay: 1s;
}

/* === CAROUSEL SECTION === */
.carousel-section {
    position: relative;
}

/* === SWIPER CONTAINER === */
.swiper {
    width: 100%;
    padding: 40px 20px 60px !important;
}

/* === SWIPER SLIDE === */
.swiper-slide {
    height: auto;
    display: flex;
    justify-content: center;
    align-items: stretch;
}

/* === RAFFLE CARD === */
.raffle-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.raffle-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.raffle-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.raffle-card:hover::before {
    opacity: 1;
}

/* === CARD IMAGE === */
.raffle-card-image {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.raffle-card-image img {
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* === IMAGE STYLES (Configuraciones del Admin) === */

/* Cover: Recorta la imagen para llenar todo el espacio */
.raffle-card-image.style-cover img {
    object-fit: cover;
}

.raffle-card:hover .raffle-card-image.style-cover img {
    transform: scale(1.1) rotate(2deg);
}

/* Contain: Muestra la imagen completa, puede haber espacios */
.raffle-card-image.style-contain {
    background: #f8f9fa;
}

.raffle-card-image.style-contain img {
    object-fit: contain;
    padding: 10px;
}

.raffle-card:hover .raffle-card-image.style-contain img {
    transform: scale(1.05);
}

/* Auto: Tamaño real de la imagen, altura automática - SIN RECORTES */
.raffle-card-image.style-auto {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible;
    background: transparent;
}

.raffle-card-image.style-auto img {
    object-fit: contain;
    height: auto !important;
    width: 100%;
    max-width: 100%;
    display: block;
}

.raffle-card:hover .raffle-card-image.style-auto img {
    transform: scale(1.02);
}

/* No Image State */
.raffle-card-image.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.raffle-card-image.no-image i {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

/* === CARD BADGE === */
.raffle-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
    z-index: 2;
    animation: bounceIn 0.6s ease-out;
}

/* === CARD BODY === */
.raffle-card-body {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

.raffle-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.raffle-card-description {
    color: #718096;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.raffle-card-footer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: auto;
}

/* === PROGRESS BAR STYLES === */
.raffle-progress-container {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    padding: 1rem;
    border-radius: 16px;
    margin-top: 0.5rem;
}

.raffle-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
}

.raffle-progress-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #667eea;
}

.raffle-progress-label i {
    color: #764ba2;
}

.raffle-progress-percentage {
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.raffle-progress-bar-bg {
    width: 100%;
    height: 12px;
    background: rgba(102, 126, 234, 0.15);
    border-radius: 50px;
    overflow: hidden;
    position: relative;
}

.raffle-progress-bar-fill {
    height: 100%;
    border-radius: 50px;
    position: relative;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.raffle-progress-bar-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    animation: shine 2s ease-in-out infinite;
}

@keyframes shine {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.raffle-progress-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #718096;
    font-weight: 500;
}

/* === SECONDARY BUTTON (Verificar Tickets) === */
.raffle-card-btn-secondary {
    display: block;
    width: 100%;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.raffle-card-btn-secondary:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.raffle-card-btn-secondary i {
    transition: transform 0.3s ease;
}

.raffle-card-btn-secondary:hover i {
    transform: scale(1.1);
}

.raffle-card-btn {
    flex: 1;
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.raffle-card-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.raffle-card-btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    color: white;
}

/* === SWIPER NAVIGATION === */

/* Top Navigation Buttons */
.carousel-nav-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.carousel-nav-btn {
    min-width: 140px;
    height: 50px;
    padding: 0 24px;
    background: white;
    border: none;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    font-weight: 600;
    font-size: 1rem;
    color: #667eea;
}

.carousel-nav-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
    z-index: -1;
}

.carousel-nav-btn:hover::before {
    width: 100%;
    height: 100%;
}

.carousel-nav-btn i {
    font-size: 18px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.carousel-nav-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
    color: white;
}

.carousel-nav-btn:hover i {
    color: white;
}

.carousel-nav-btn:active {
    transform: translateY(-1px);
}

/* Bottom Navigation Buttons (Swiper default) */
.swiper-button-next,
.swiper-button-prev {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 20px;
    font-weight: 900;
    color: #667eea;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scale(1.1);
}

.swiper-button-next:hover:after,
.swiper-button-prev:hover:after {
    color: white;
}

/* === SWIPER PAGINATION === */
.swiper-pagination {
    bottom: 20px !important;
}

.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    background: white;
    width: 30px;
    border-radius: 6px;
}

/* === ANIMATIONS === */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
    }
}

/* === LOADING STATE === */
#loading-state .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
    color: white !important;
}

#loading-state p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
}

/* === EMPTY STATE === */
#empty-state i {
    color: rgba(255, 255, 255, 0.5);
}

#empty-state h3,
#empty-state p {
    color: rgba(255, 255, 255, 0.9);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .hero-section {
        padding: 40px 0 30px;
    }

    /* Logos más pequeños en tablet */
    .hero-logo,
    .catalog-logo {
        max-width: 160px !important;
    }

    .hero-decoration {
        gap: 1.5rem;
    }

    .hero-decoration i {
        font-size: 1.5rem;
    }

    .swiper {
        padding: 20px 10px 50px !important;
    }

    /* Top Navigation - Smaller on tablet */
    .carousel-nav-btn {
        min-width: 120px;
        height: 45px;
        padding: 0 20px;
        font-size: 0.9rem;
    }

    .carousel-nav-btn i {
        font-size: 16px;
    }

    .raffle-card-image {
        height: 220px;
    }

    .raffle-card-image.style-auto {
        min-height: auto;
        max-height: none;
    }

    .raffle-card-body {
        padding: 1.5rem;
    }

    .raffle-card-title {
        font-size: 1.3rem;
    }

    .raffle-card-btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }

    .swiper-button-next,
    .swiper-button-prev {
        width: 40px;
        height: 40px;
    }

    .swiper-button-next:after,
    .swiper-button-prev:after {
        font-size: 16px;
    }
}

@media (max-width: 576px) {

    /* Top Navigation - Keep visible on mobile */
    .carousel-nav-top {
        margin-bottom: 20px;
        padding: 0 10px;
    }

    /* Logos más pequeños en móvil */
    .hero-logo,
    .catalog-logo {
        max-width: 140px !important;
    }

    .carousel-nav-btn {
        min-width: 110px;
        height: 42px;
        padding: 0 16px;
        font-size: 0.85rem;
    }

    .carousel-nav-btn i {
        font-size: 14px;
    }

    .raffle-card-image {
        height: 200px;
    }

    .raffle-card-image.style-auto {
        min-height: auto;
        max-height: none;
    }

    .raffle-card-image.style-contain img {
        padding: 5px;
    }

    .raffle-badge {
        top: 15px;
        right: 15px;
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    /* Hide bottom navigation on small mobile */
    .swiper-button-next,
    .swiper-button-prev {
        display: none;
    }
}