/* ==========================================================================
   ĐUCĐẠT FLASH DEAL – Frontend CSS (Luxury Edition)
   ========================================================================== */

/* Section */
.ddfd-section {
    background: linear-gradient(160deg, #1a1c23 0%, #24262e 40%, #1e2028 100%);
    padding: 60px 0 70px;
    position: relative;
    overflow: hidden;
}
.ddfd-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 60%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(212,175,55,0.04) 0%, transparent 70%);
    pointer-events: none;
}
.ddfd-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Header */
.ddfd-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}
.ddfd-header-left {
    display: flex;
    align-items: center;
    gap: 18px;
}
.ddfd-flash-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #d4af37, #f0d060);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(212,175,55,0.3);
    animation: ddfd-pulse 2s ease-in-out infinite;
}
.ddfd-flash-icon svg {
    width: 26px;
    height: 26px;
    stroke: #1a1c23;
    fill: #1a1c23;
}
@keyframes ddfd-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 25px rgba(212,175,55,0.3); }
    50% { transform: scale(1.05); box-shadow: 0 12px 35px rgba(212,175,55,0.5); }
}
.ddfd-title {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    margin: 0;
    letter-spacing: 1px;
    line-height: 1.2;
}
.ddfd-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    margin: 5px 0 0;
}

/* Countdown */
.ddfd-countdown {
    display: flex;
    align-items: center;
    gap: 12px;
}
.ddfd-cd-label {
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.ddfd-cd-boxes {
    display: flex;
    align-items: center;
    gap: 6px;
}
.ddfd-cd-box {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 10px;
    padding: 8px 12px;
    text-align: center;
    min-width: 58px;
    backdrop-filter: blur(5px);
}
.ddfd-cd-num {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: #d4af37;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.ddfd-cd-unit {
    display: block;
    font-size: 10px;
    color: rgba(255,255,255,0.45);
    text-transform: uppercase;
    margin-top: 4px;
    letter-spacing: 0.5px;
}
.ddfd-cd-sep {
    color: #d4af37;
    font-size: 24px;
    font-weight: 700;
    animation: ddfd-blink 1s step-end infinite;
}
@keyframes ddfd-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Products Grid */
.ddfd-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Product Card */
.ddfd-product-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
}
.ddfd-product-card:hover {
    transform: translateY(-6px);
    border-color: rgba(212,175,55,0.3);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3), 0 0 30px rgba(212,175,55,0.08);
}
.ddfd-card-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-decoration: none !important;
    color: inherit !important;
}

/* Card Image */
.ddfd-card-image {
    position: relative;
    overflow: hidden;
    background: #fff;
    aspect-ratio: 1 / 1;
}
.ddfd-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.ddfd-product-card:hover .ddfd-card-image img {
    transform: scale(1.08);
}

/* Badge */
.ddfd-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #d4af37, #f0d060);
    color: #1a1c23;
    font-size: 11px;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(212,175,55,0.4);
    z-index: 2;
}

/* Card Body */
.ddfd-card-body {
    padding: 20px 18px 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.ddfd-card-title {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px;
    line-height: 1.4;
    letter-spacing: 0.3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ddfd-card-price {
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 700;
}
.ddfd-card-price .woocommerce-Price-amount {
    color: #d4af37;
    font-size: 16px;
}
.ddfd-card-price del {
    color: rgba(255,255,255,0.35);
    font-size: 13px;
    font-weight: 400;
}
.ddfd-card-price ins {
    text-decoration: none;
    color: #d4af37;
    font-weight: 700;
}

/* Progress Bar */
.ddfd-progress-wrap {
    margin-top: auto;
}
.ddfd-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.08);
    border-radius: 6px;
    overflow: hidden;
}
.ddfd-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #d4af37, #f0d060);
    border-radius: 6px;
    position: relative;
    transition: width 1.5s ease-out;
}
.ddfd-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: ddfd-shimmer 2s infinite;
}
@keyframes ddfd-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
.ddfd-sold-text {
    display: block;
    font-size: 11px;
    color: rgba(255,255,255,0.45);
    margin-top: 6px;
    text-align: right;
}

/* Buy Button */
.ddfd-btn-buy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    margin: 0 18px 18px;
    background: transparent;
    border: 1px solid rgba(212,175,55,0.4);
    border-radius: 10px;
    color: #d4af37 !important;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none !important;
    transition: all 0.3s ease;
    cursor: pointer;
}
.ddfd-btn-buy svg {
    stroke: #d4af37;
    transition: stroke 0.3s;
}
.ddfd-btn-buy:hover {
    background: linear-gradient(135deg, #d4af37, #f0d060);
    color: #1a1c23 !important;
    border-color: transparent;
    box-shadow: 0 8px 25px rgba(212,175,55,0.3);
    transform: translateY(-1px);
}
.ddfd-btn-buy:hover svg {
    stroke: #1a1c23;
}

/* ===== Responsive ===== */
@media (max-width: 1199px) {
    .ddfd-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 991px) {
    .ddfd-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .ddfd-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .ddfd-title {
        font-size: 22px;
    }
}
@media (max-width: 575px) {
    .ddfd-section {
        padding: 40px 0 50px;
    }
    .ddfd-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .ddfd-cd-box {
        min-width: 42px;
        padding: 4px 6px;
    }
    .ddfd-cd-num {
        font-size: 16px;
    }
    .ddfd-title {
        font-size: 18px;
    }
    .ddfd-card-body {
        padding: 12px 10px 10px;
    }
    .ddfd-card-title {
        font-size: 12px;
        margin-bottom: 8px;
    }
    .ddfd-card-price {
        font-size: 12px;
        margin-bottom: 10px;
    }
    .ddfd-card-price .woocommerce-Price-amount {
        font-size: 14px;
    }
    .ddfd-btn-buy {
        padding: 8px;
        margin: 0 10px 10px;
        font-size: 11px;
        gap: 4px;
    }
    .ddfd-btn-buy svg {
        width: 14px;
        height: 14px;
    }
}
