/**
 * Flash Sale Widget — Velour Pro Addons
 */

/* ========================================
   Section
   ======================================== */
.vnpa-flash-sale {
    padding: 2.5rem 0;
    background: #FAFBFC;
}

@media (min-width: 1024px) {
    .vnpa-flash-sale {
        padding: 3.5rem 0;
    }
}

/* ========================================
   Container
   ======================================== */
.vnpa-flash-sale__container {
    max-width: 1440px;
    margin: 0 auto;
}

/* ========================================
   Animated Gradient Border
   ======================================== */
.vnpa-flash-sale__border {
    background: linear-gradient(135deg, #FF3D81, #FFB800, #FF3D81);
    background-size: 200% 200%;
    animation: vnpaShimmer 3s linear infinite;
    border-radius: 1rem;
    padding: 1.5px;
}

@keyframes vnpaShimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ========================================
   Inner Card
   ======================================== */
.vnpa-flash-sale__card {
    background: #ffffff;
    border-radius: 1rem;
    padding: 1.5rem;
}

@media (min-width: 1024px) {
    .vnpa-flash-sale__card {
        padding: 2.5rem;
    }
}

/* ========================================
   Header
   ======================================== */
.vnpa-flash-sale__header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (min-width: 1024px) {
    .vnpa-flash-sale__header {
        flex-direction: row;
        align-items: center;
    }
}

/* Header left — badge row */
.vnpa-flash-sale__badge-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.vnpa-flash-sale__pulse-dot {
    width: 0.5rem;
    height: 0.5rem;
    background: #FF3D81;
    border-radius: 9999px;
    animation: vnpaPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    flex-shrink: 0;
}

@keyframes vnpaPulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.5; }
}

.vnpa-flash-sale__badge-text {
    font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.2em;
    color: #FF3D81;
    text-transform: uppercase;
    font-weight: 700;
    margin: 0;
    line-height: 1;
}

/* Header left — title */
.vnpa-flash-sale__title {
    font-family: 'Sora', 'Segoe UI', sans-serif;
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
    line-height: 1.3;
}

/* Header left — description */
.vnpa-flash-sale__description {
    font-size: 0.875rem;
    color: #6B7280;
    margin: 0.25rem 0 0;
    line-height: 1.5;
}

/* ========================================
   Countdown Timer
   ======================================== */
.vnpa-flash-sale__countdown {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.vnpa-flash-sale__countdown-label {
    font-size: 0.75rem;
    color: #6B7280;
    margin-right: 0.25rem;
}

.vnpa-flash-sale__countdown-box {
    background: #ffffff;
    border: 1px solid #E5E7EB;
    border-radius: 0.75rem;
    padding: 6px 12px;
    text-align: center;
    min-width: 52px;
}

.vnpa-flash-sale__countdown-number {
    font-family: 'Sora', 'Segoe UI', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #FF3D81;
    display: block;
    line-height: 1.2;
}

.vnpa-flash-sale__countdown-unit {
    font-size: 8px;
    color: #6B7280;
    margin: 0.125rem 0 0;
    line-height: 1;
}

.vnpa-flash-sale__countdown-sep {
    color: #FF3D81;
    font-weight: 700;
    font-size: 1.125rem;
    line-height: 1;
}

/* ========================================
   Product Grid
   ======================================== */
.vnpa-flash-sale__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (min-width: 500px) {
    .vnpa-flash-sale__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .vnpa-flash-sale__grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 1rem;
    }
}

/* ========================================
   Product Card
   ======================================== */
.vnpa-flash-sale__product {
    background: #FAFBFC;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid #E5E7EB;
    position: relative;
    transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

.vnpa-flash-sale__product:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
}

/* Discount Badge */
.vnpa-flash-sale__discount {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 10;
    background: #FF3D81;
    color: #ffffff;
    font-size: 10px;
    letter-spacing: 0.08em;
    padding: 0.125rem 0.5rem;
    border-radius: 0.375rem;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.5;
}

/* Wishlist Button */
.vnpa-flash-sale__wishlist {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 10;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6B7280;
    border: none;
    cursor: pointer;
    transition: color 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 0;
}

.vnpa-flash-sale__wishlist:hover {
    color: #FF3D81;
}

.vnpa-flash-sale__wishlist svg {
    width: 0.875rem;
    height: 0.875rem;
}

.vnpa-flash-sale__wishlist.is-active {
    color: #FF3D81;
}

.vnpa-flash-sale__wishlist.is-active svg {
    fill: currentColor;
}

/* Image */
.vnpa-flash-sale__image-wrap {
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
}

.vnpa-flash-sale__image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

.vnpa-flash-sale__product:hover .vnpa-flash-sale__image-wrap img {
    transform: scale(1.06);
}

/* Product Info */
.vnpa-flash-sale__info {
    padding: 0.75rem;
}

.vnpa-flash-sale__brand {
    font-size: 10px;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
    line-height: 1.4;
}

.vnpa-flash-sale__product-title {
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0.125rem 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #111827;
    line-height: 1.4;
}

.vnpa-flash-sale__product-title a {
    color: inherit;
    text-decoration: none;
}

.vnpa-flash-sale__product-title a:hover {
    color: #111827;
}

.vnpa-flash-sale__price-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.375rem;
}

.vnpa-flash-sale__sale-price {
    font-size: 0.875rem;
    font-weight: 700;
    color: #FF3D81;
}

.vnpa-flash-sale__sale-price .woocommerce-Price-amount {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

.vnpa-flash-sale__original-price {
    font-size: 0.75rem;
    color: #6B7280;
    text-decoration: line-through;
}

.vnpa-flash-sale__original-price .woocommerce-Price-amount {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    text-decoration: inherit;
}

/* ========================================
   No Products Fallback
   ======================================== */
.vnpa-flash-sale__empty {
    text-align: center;
    color: #9CA3AF;
    padding: 2.5rem 1rem;
    font-size: 0.875rem;
}

/* ========================================
   Elementor Editor Override
   ======================================== */
.elementor-element-edit-mode .vnpa-flash-sale__product {
    pointer-events: none;
}
