/* ==========================================================================
   Sri Vinayaga Crackers - Special Offer Today Popup
   Color Theme: Site Primary Purple (#56298a) with Cyan (#52bae1) accents
   ========================================================================== */

/* Overlay Backdrop */
.v-special-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(22, 13, 38, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s ease;
}

.v-special-popup-overlay.v-active {
    opacity: 1;
    visibility: visible;
}

/* Modal Card */
.v-special-popup-card {
    position: relative;
    width: 100%;
    max-width: 500px;
    background: linear-gradient(145deg, #ffffff 0%, #fbf9ff 60%, #f5effe 100%);
    border-radius: 24px;
    box-shadow: 
        0 25px 60px -10px rgba(86, 41, 138, 0.35),
        0 10px 30px -5px rgba(86, 41, 138, 0.2),
        0 0 0 1px rgba(86, 41, 138, 0.15);
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.35s ease;
    opacity: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1e293b;
    box-sizing: border-box;
}

.v-special-popup-overlay.v-active .v-special-popup-card {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Header Banner - Site Primary Purple Gradient */
.v-special-popup-header {
    background: linear-gradient(135deg, #431e6d 0%, #56298a 55%, #7b3ebf 100%);
    border-bottom: 2px solid #52bae1;
    padding: 16px 20px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.v-special-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    animation: vBadgeGlow 2s ease-in-out infinite alternate;
}

@keyframes vBadgeGlow {
    0% {
        box-shadow: 0 0 8px rgba(82, 186, 225, 0.3);
    }
    100% {
        box-shadow: 0 0 16px rgba(255, 255, 255, 0.7);
    }
}

.v-special-close-x {
    background: rgba(255, 255, 255, 0.22);
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    line-height: 1;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.v-special-close-x:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1) rotate(90deg);
}

/* Title Area */
.v-special-title-area {
    padding: 18px 24px 12px;
    text-align: center;
}

.v-special-title {
    margin: 0;
    font-size: 1.7rem;
    font-weight: 900;
    line-height: 1.2;
    background: linear-gradient(135deg, #38165c 0%, #56298a 50%, #6e2fae 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
    text-transform: capitalize;
}

.v-special-subtitle {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

/* Product Box */
.v-special-product-box {
    margin: 8px 20px 14px;
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #e2d4f5;
    padding: 16px;
    display: flex;
    gap: 16px;
    align-items: center;
    box-shadow: 0 6px 18px -4px rgba(86, 41, 138, 0.1);
    position: relative;
    overflow: hidden;
}

.v-special-product-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #56298a, #52bae1, #7b3ebf);
}

.v-special-image-col {
    flex-shrink: 0;
    width: 110px;
    height: 110px;
}

.v-special-image-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.v-special-image-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.v-special-product-box:hover .v-special-image-wrap img {
    transform: scale(1.08);
}

.v-special-discount-tag {
    position: absolute;
    top: 4px;
    left: 4px;
    background: linear-gradient(135deg, #56298a, #7b3ebf);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(86, 41, 138, 0.4);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.v-special-info-col {
    flex: 1;
    min-width: 0;
}

.v-special-category {
    font-size: 0.7rem;
    font-weight: 700;
    color: #56298a;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.v-special-product-name {
    margin: 0 0 4px;
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.v-special-unit-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    padding: 1px 7px;
    border-radius: 4px;
    margin-bottom: 6px;
}

.v-special-price-wrap {
    margin-top: 2px;
}

.v-special-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.v-special-old-price {
    font-size: 0.85rem;
    color: #94a3b8;
    text-decoration: line-through;
    font-weight: 500;
}

.v-special-new-price {
    font-size: 1.35rem;
    font-weight: 900;
    color: #56298a;
    letter-spacing: -0.01em;
}

.v-special-savings {
    font-size: 0.75rem;
    font-weight: 700;
    color: #16a34a;
    margin-top: 1px;
}

/* Inform Message & Urgency Section */
.v-special-urgency-box {
    margin: 0 20px 16px;
    background: linear-gradient(135deg, #f7f1fd 0%, #f0f8fd 100%);
    border-radius: 16px;
    padding: 12px 14px;
    border: 1px dashed #d1b8f0;
    text-align: center;
}

.v-special-inform-msg {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #56298a;
    line-height: 1.35;
    margin-bottom: 8px;
}

.v-urgent-icon {
    font-size: 1.1rem;
    animation: vFlamePulse 1.2s ease-in-out infinite alternate;
}

@keyframes vFlamePulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.25); }
}

/* Countdown Timer */
.v-special-countdown-timer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #ffffff;
    padding: 6px 14px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(86, 41, 138, 0.08);
    border: 1px solid #e2d4f5;
}

.v-timer-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.v-timer-digits {
    display: flex;
    align-items: center;
    gap: 4px;
}

.v-timer-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 28px;
}

.v-digit-num {
    font-size: 1rem;
    font-weight: 900;
    color: #56298a;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    font-family: "Courier New", Courier, monospace, sans-serif;
}

.v-digit-label {
    font-size: 0.55rem;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-top: 1px;
}

.v-timer-sep {
    font-weight: 900;
    color: #cbd5e1;
    margin: 0 1px;
    line-height: 1;
}

/* Action Buttons */
.v-special-actions {
    padding: 0 20px 20px;
    display: grid;
    grid-template-columns: 1fr 100px;
    gap: 10px;
}

.v-btn-special-view {
    background: linear-gradient(135deg, #431e6d 0%, #56298a 50%, #7b3ebf 100%);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    padding: 13px 18px;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 18px -2px rgba(86, 41, 138, 0.45);
    transition: all 0.25s ease;
    text-decoration: none !important;
}

.v-btn-special-view:hover {
    background: linear-gradient(135deg, #321554 0%, #461f73 50%, #682ba7 100%);
    box-shadow: 0 8px 24px -2px rgba(86, 41, 138, 0.65);
    transform: translateY(-2px);
    color: #ffffff;
}

.v-btn-special-view:active {
    transform: translateY(0);
}

.v-btn-special-view svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    transition: transform 0.2s ease;
}

.v-btn-special-view:hover svg {
    transform: translateX(3px);
}

.v-btn-special-close {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 13px 14px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.v-btn-special-close:hover {
    background: #e2e8f0;
    color: #1e293b;
    border-color: #cbd5e1;
}

/* Scrolled Target Glow Highlight Animation */
@keyframes vSpecialGlowPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(86, 41, 138, 0.7), 0 0 25px rgba(82, 186, 225, 0.6);
        background-color: #f6edff !important;
    }
    50% {
        box-shadow: 0 0 0 8px rgba(86, 41, 138, 0.25), 0 0 35px rgba(82, 186, 225, 0.8);
        background-color: #ede0fc !important;
    }
    100% {
        box-shadow: 0 0 0 0 rgba(86, 41, 138, 0), 0 0 10px rgba(82, 186, 225, 0);
        background-color: inherit;
    }
}

.v-special-scrolled-glow {
    animation: vSpecialGlowPulse 1.2s ease-in-out 3;
    border-radius: 8px;
    position: relative;
    z-index: 10;
}

/* Mobile Responsiveness */
@media (max-width: 520px) {
    .v-special-popup-card {
        max-width: 95vw;
        border-radius: 20px;
    }

    .v-special-popup-header {
        padding: 12px 16px;
    }

    .v-special-title-area {
        padding: 14px 16px 8px;
    }

    .v-special-title {
        font-size: 1.4rem;
    }

    .v-special-product-box {
        margin: 6px 14px 12px;
        padding: 12px;
        gap: 12px;
    }

    .v-special-image-col {
        width: 85px;
        height: 85px;
    }

    .v-special-product-name {
        font-size: 1rem;
    }

    .v-special-new-price {
        font-size: 1.15rem;
    }

    .v-special-urgency-box {
        margin: 0 14px 14px;
        padding: 10px 12px;
    }

    .v-special-inform-msg {
        font-size: 0.78rem;
    }

    .v-special-actions {
        padding: 0 14px 16px;
        grid-template-columns: 1fr 85px;
    }

    .v-btn-special-view {
        padding: 11px 12px;
        font-size: 0.88rem;
    }

    .v-btn-special-close {
        padding: 11px 10px;
        font-size: 0.85rem;
    }
}
