/* ===== ESTILOS PARA EL DIÁLOGO DE PROMOCIÓN ===== */
/* Diálogo de promoción elegante y moderno */
.promotion-dialog {
    display: none;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    background: linear-gradient(145deg, var(--theme-modal-bg), rgba(15, 20, 25, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: clamp(20px, 3vw, 28px);
    box-sizing: border-box;
    z-index: 10001 !important;
    box-shadow:
        0 30px 60px -15px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 0 25px var(--theme-shadow-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    pointer-events: auto !important;
    backdrop-filter: blur(16px) saturate(120%);
    animation: promotionDialogFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    width: min(340px, calc(100vw - 48px));
    max-width: 340px;
    max-height: calc(100vh - 48px);
    overflow: hidden;
    text-align: center;
    color: var(--theme-text-primary);
    transition: all var(--transition-theme);
}

.promotion-dialog--black {
    box-shadow:
        0 30px 60px -15px rgba(0, 0, 0, 0.9),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 0 30px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.promotion-dialog::before {
    content: "Elige tu promoción";
    display: block;
    color: var(--theme-text-primary);
    font-family: var(--font-main);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: clamp(16px, 2.5vw, 22px);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 12px var(--theme-shadow-glow), 0 2px 4px rgba(0,0,0,0.6);
    transition: color var(--transition-theme);
}

.promotion-dialog::after {
    content: "";
    position: absolute;
    top: 56px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--theme-accent-primary), var(--theme-text-primary), transparent);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--theme-shadow-glow), 0 0 20px var(--theme-accent-primary);
    transition: all var(--transition-theme);
}

.promotion-dialog--black::after {
    background: linear-gradient(90deg, transparent, #fff, rgba(255,255,255,0.5), transparent);
    box-shadow: 0 0 10px rgba(255,255,255,0.5), 0 0 20px rgba(255,255,255,0.3);
}

.promotion-dialog__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(12px, 2.5vw, 18px);
    padding: clamp(14px, 2.5vw, 20px);
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: all var(--transition-theme);
    position: relative;
}

.promotion-dialog--black .promotion-dialog__grid {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 4px 20px rgba(0, 0, 0, 0.6);
}

.promotion-piece {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    width: 100%;
    min-height: clamp(100px, 20vw, 120px);
    padding: clamp(12px, 2.5vw, 16px);
    box-sizing: border-box;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--theme-text-primary);
    font-family: var(--font-main);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    cursor: pointer;
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    outline: none;
    overflow: hidden;
}

.promotion-piece::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at center, var(--theme-accent-primary) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
    pointer-events: none;
}

.promotion-piece:hover,
.promotion-piece:focus-visible {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--theme-accent-primary);
    background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.03) 100%);
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.5),
        0 0 20px var(--theme-shadow-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.promotion-piece:hover::before,
.promotion-piece:focus-visible::before {
    opacity: 0.2;
}

.promotion-dialog--black .promotion-piece {
    background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.03) 100%);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.promotion-dialog--black .promotion-piece:hover,
.promotion-dialog--black .promotion-piece:focus-visible {
    border-color: #fff;
    background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.05) 100%);
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.6),
        0 0 25px rgba(255, 255, 255, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.promotion-dialog--black .promotion-piece::before {
    background: radial-gradient(circle at center, #fff 0%, transparent 70%);
}

.promotion-piece:active {
    transform: translateY(-1px);
    transition: transform 0.12s ease;
}

.promotion-piece__image {
    width: clamp(48px, 14vw, 56px);
    height: clamp(48px, 14vw, 56px);
    object-fit: contain;
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.6));
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
    max-width: 100%;
    position: relative;
    z-index: 1;
}

.promotion-piece:hover .promotion-piece__image,
.promotion-piece:focus-visible .promotion-piece__image {
    transform: scale(1.1) translateY(-2px);
    filter:
        drop-shadow(0 10px 20px rgba(0,0,0,0.7)) 
        drop-shadow(0 0 15px var(--theme-shadow-glow));
}

.promotion-dialog--black .promotion-piece__image {
    /* Critical fix: add bright glow to black pieces for contrast */
    filter:
        drop-shadow(0 4px 8px rgba(0,0,0,0.9))
        drop-shadow(0 0 14px rgba(255, 255, 255, 0.5))
        drop-shadow(0 0 25px rgba(255, 255, 255, 0.2));
}

.promotion-dialog--black .promotion-piece:hover .promotion-piece__image,
.promotion-dialog--black .promotion-piece:focus-visible .promotion-piece__image {
    filter:
        drop-shadow(0 8px 16px rgba(0,0,0,0.9))
        drop-shadow(0 0 20px rgba(255, 255, 255, 0.8))
        drop-shadow(0 0 40px rgba(255, 255, 255, 0.4));
}

.promotion-piece__label {
    margin-top: 10px;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
    transition: all var(--transition-theme);
    position: relative;
    z-index: 1;
}

/* Animación de entrada del diálogo */
@keyframes promotionDialogFadeIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.promotion-piece::after {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: skewX(-20deg);
    transition: none;
    opacity: 0;
    z-index: 2;
    pointer-events: none;
}

.promotion-piece:hover::after,
.promotion-piece:focus-visible::after {
    animation: shine 0.7s ease forwards;
}

@keyframes shine {
    0% { left: -100%; opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { left: 200%; opacity: 0; }
}

@media only screen and (max-width: 767px) {
    .promotion-dialog {
        width: min(88vw, 300px) !important;
        max-width: 300px;
        padding: clamp(16px, 4vw, 20px) !important;
        border-radius: 18px !important;
    }

    .promotion-dialog::before {
        font-size: 0.95rem !important;
        margin-bottom: clamp(12px, 3vw, 16px) !important;
    }

    .promotion-dialog::after {
        top: 50px;
        width: 72px;
    }

    .promotion-dialog__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: clamp(10px, 3vw, 14px) !important;
        padding: clamp(10px, 3vw, 14px) !important;
    }

    .promotion-piece {
        min-height: clamp(92px, 22vw, 110px);
    }

    .promotion-piece__image {
        width: clamp(38px, 15vw, 48px);
        height: clamp(38px, 15vw, 48px);
    }
}

@media only screen and (max-width: 480px) {
    .promotion-dialog {
        width: min(94vw, 260px) !important;
        max-width: 260px;
        padding: clamp(14px, 5vw, 18px) !important;
    }

    .promotion-dialog__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: clamp(8px, 4vw, 12px) !important;
        padding: clamp(8px, 4vw, 12px) !important;
    }

    .promotion-piece {
        min-height: clamp(88px, 26vw, 102px);
        padding: 9px 8px;
    }

    .promotion-piece__image {
        width: clamp(34px, 18vw, 44px);
        height: clamp(34px, 18vw, 44px);
    }

    .promotion-piece__label {
        font-size: 0.66rem;
        letter-spacing: 1.2px;
    }
}

@media only screen and (max-width: 360px) {
    .promotion-dialog {
        width: min(92vw, 240px) !important;
        padding: clamp(12px, 5vw, 16px) !important;
    }

    .promotion-dialog__grid {
        grid-template-columns: 1fr;
        gap: clamp(8px, 4.5vw, 12px) !important;
        padding: clamp(8px, 4.5vw, 12px) !important;
    }

    .promotion-piece {
        min-height: clamp(84px, 32vw, 104px);
    }
}

/* ===== MÓVILES HORIZONTALES ===== */
@media (max-width: 768px) and (orientation: landscape) {
    .promotion-dialog {
        width: min(260px, calc(100vw - 32px)) !important;
        max-width: 260px !important;
        padding: clamp(12px, 2vw, 16px) !important;
    }

    .promotion-dialog::before {
        font-size: 0.85rem !important;
        margin-bottom: clamp(10px, 1.5vw, 14px) !important;
    }

    .promotion-dialog__grid {
        gap: clamp(8px, 1.8vw, 12px) !important;
        padding: clamp(10px, 1.8vw, 14px) !important;
    }

    .promotion-piece {
        min-height: clamp(80px, 16vw, 96px) !important;
        padding: clamp(8px, 1.6vw, 10px) !important;
    }

    .promotion-piece__image {
        width: clamp(36px, 11vw, 44px) !important;
        height: clamp(36px, 11vw, 44px) !important;
    }

    .promotion-piece__label {
        font-size: 0.65rem !important;
        letter-spacing: 1.2px !important;
    }
}


