/* ========================================
   FLASH SALE CSS — DropBiz.vn
   Bổ sung các class Tailwind chưa có trong app-compiled.css
   ======================================== */

/* --- Progress bar --- */
.fs-progress-bar {
    position: relative;
    width: 100%;
    height: 16px;
    background: #fff3e0;
    border-radius: 9999px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fs-progress-bar .fs-bar-fill {
    position: absolute;
    top: 0; left: 0; bottom: 0;
    background: linear-gradient(90deg, #ff234b, #f9a61a);
    border-radius: 9999px;
    transition: width 0.5s ease;
}
.fs-progress-bar .fs-bar-text {
    position: relative;
    z-index: 2;
    font-size: 9px;
    font-weight: 900;
    color: #ea580c; /* Cam đậm dễ nhìn */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 0 0 2px #fff, 0 0 2px #fff;
}

/* --- Flash Sale product card (Homepage + /flash-sale page) --- */
.fs-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.fs-card:hover {
    border-color: #ff234b33;
    box-shadow: 0 4px 20px rgba(255,35,75,0.1);
    transform: translateY(-2px);
}

/* Homepage carousel card - fixed width */
.fs-card-carousel {
    flex-shrink: 0;
    width: 160px;
}
@media (min-width: 768px) {
    .fs-card-carousel { width: 180px; }
}

.fs-card .fs-card-img {
    position: relative;
    aspect-ratio: 1/1;
    background: #f8fafc;
    overflow: hidden;
}
.fs-card .fs-card-img img {
    width: 100%; height: 100%;
    object-fit: contain;
    padding: 8px;
    transition: transform 0.5s ease;
}
.fs-card:hover .fs-card-img img {
    transform: scale(1.05);
}

/* Discount badge */
.fs-badge-discount {
    position: absolute;
    top: 6px; right: 6px;
    background: linear-gradient(135deg, #ff234b, #f37326);
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 3;
    box-shadow: 0 1px 4px rgba(255,35,75,0.3);
}

/* Brand badge */
.fs-badge-brand {
    position: absolute;
    top: 6px; left: 6px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 3;
    max-width: 80%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fs-card .fs-card-body {
    padding: 10px 12px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.fs-card .fs-card-title {
    font-size: 13px;
    font-weight: 700;
    color: #27272a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}
.fs-card:hover .fs-card-title { color: #ff234b; }

.fs-card .fs-price-section {
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid #f4f4f5;
}
.fs-price-sale {
    font-size: 16px;
    font-weight: 900;
    color: #ee4d2d;
    line-height: 1;
}
.fs-price-sale .fs-price-symbol { font-size: 12px; text-decoration: underline; }
.fs-price-original {
    font-size: 11px;
    color: #a1a1aa;
    text-decoration: line-through;
    font-weight: 500;
    margin-left: 4px;
}
.fs-prices-row {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    margin-bottom: 6px;
}

/* --- Flash Sale header (Homepage section) --- */
.fs-header {
    background: linear-gradient(90deg, #ff234b 0%, #f37326 50%, #f9a61a 100%);
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}
@media (min-width: 768px) {
    .fs-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        border-radius: 0;
    }
}
.fs-header::before {
    content: '';
    position: absolute; inset: 0;
    background-image: radial-gradient(#fff 15%, transparent 16%), radial-gradient(#fff 15%, transparent 16%);
    background-size: 10px 10px;
    background-position: 0 0, 5px 5px;
    opacity: 0.12;
    pointer-events: none;
}
.fs-header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    position: relative;
    z-index: 2;
}
@media (min-width: 768px) {
    .fs-header-left { flex-direction: row; align-items: center; gap: 16px; }
}
.fs-header-title {
    font-style: italic;
    font-weight: 900;
    font-size: 24px;
    color: #fff;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    text-shadow: 0 1px 3px rgba(0,0,0,0.15);
    line-height: 1;
}
.fs-header-title svg {
    width: 28px; height: 28px;
    fill: #fde047;
    margin: 0 -2px;
}
.fs-timer-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.fs-timer-label {
    font-size: 14px;
    color: #fff;
    font-weight: 500;
}
.fs-timer-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    background: #2a2a2a;
    border-radius: 6px;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.fs-timer-sep {
    color: rgba(255,255,255,0.8);
    font-weight: 700;
    font-size: 18px;
    animation: pulse 2s infinite;
}
.fs-header-link {
    position: relative;
    z-index: 2;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.fs-header-link:hover { color: #fde047; }

/* --- Product list container (homepage) --- */
.fs-products-scroll {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 16px 16px 12px;
    scroll-snap-type: x mandatory;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.fs-products-scroll::-webkit-scrollbar { display: none; }
.fs-products-scroll > * { scroll-snap-align: start; }

/* --- Flash Sale section container (homepage) --- */
.fs-section {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(255,35,75,0.06);
    border: 1px solid #fee2e2;
    background: #fff;
}

/* --- Flash Sale full page (/flash-sale) --- */
.fs-page-bg {
    min-height: 100vh;
    background: #F5F5FA;
    padding-bottom: 64px;
}
.fs-page-banner {
    background: linear-gradient(90deg, #ff234b 0%, #f37326 50%, #f9a61a 100%);
    padding: 40px 16px 64px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.fs-page-banner::before {
    content: '';
    position: absolute; inset: 0;
    background-image: radial-gradient(#fff 15%, transparent 16%), radial-gradient(#fff 15%, transparent 16%);
    background-size: 12px 12px;
    background-position: 0 0, 6px 6px;
    opacity: 0.15;
    pointer-events: none;
}
.fs-page-title {
    font-style: italic;
    font-weight: 900;
    font-size: 40px;
    color: #fff;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.15);
    position: relative;
    z-index: 2;
}
.fs-page-title svg {
    width: 44px; height: 44px;
    fill: #fde047;
    margin: 0 -4px;
}
.fs-page-subtitle {
    font-size: 15px;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    position: relative;
    z-index: 2;
}

/* --- Tabs (Today/Tomorrow) --- */
.fs-tabs-wrap {
    display: flex;
    justify-content: center;
    margin-top: 24px;
    position: relative;
    z-index: 5;
}
.fs-tabs-container {
    background: rgba(0,0,0,0.2);
    padding: 6px;
    border-radius: 9999px;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    max-width: 100%;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.fs-tabs-container::-webkit-scrollbar { display: none; }
.fs-tab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 24px;
    border-radius: 9999px;
    min-width: 120px;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    outline: none;
    background: transparent;
}
.fs-tab-btn.active {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.fs-tab-time {
    font-weight: 700;
    font-size: 15px;
    line-height: 1.2;
}
.fs-tab-btn.active .fs-tab-time { color: #e11d48; }
.fs-tab-btn:not(.active) .fs-tab-time { color: #fff; }
.fs-tab-label {
    font-size: 11px;
    font-weight: 600;
}
.fs-tab-btn.active .fs-tab-label { color: #71717a; }
.fs-tab-btn:not(.active) .fs-tab-label { color: rgba(255,255,255,0.7); }
.fs-tab-status {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}
.fs-tab-btn.active .fs-tab-status { color: #e11d48; }
.fs-tab-btn:not(.active) .fs-tab-status { color: #fde047; }

/* --- Countdown floating pill --- */
.fs-countdown-pill {
    background: #fff;
    padding: 10px 24px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #fee2e2;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.fs-countdown-pill .fs-cd-label {
    font-size: 14px;
    font-weight: 700;
    color: #27272a;
    letter-spacing: 0.02em;
}
.fs-countdown-pill .fs-timer-box {
    width: 32px; height: 36px;
    font-size: 18px;
    border-radius: 6px;
}

/* --- Products grid (/flash-sale page) --- */
.fs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
@media (min-width: 768px) {
    .fs-grid { grid-template-columns: repeat(4, 1fr); }
}

/* --- Empty state --- */
.fs-empty {
    text-align: center;
    padding: 64px 16px;
    background: #fff;
    border-radius: 24px;
    border: 1px solid #f4f4f5;
    max-width: 560px;
    margin: 0 auto;
}
.fs-empty-icon {
    width: 80px; height: 80px;
    background: #fff1f2;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: #fb7185;
}
.fs-empty h3 { font-size: 20px; font-weight: 700; color: #27272a; margin-bottom: 8px; }
.fs-empty p { color: #71717a; }
.fs-empty-cta {
    display: inline-block;
    margin-top: 24px;
    background: #ff234b;
    color: #fff;
    font-weight: 700;
    padding: 10px 24px;
    border-radius: 9999px;
    text-decoration: none;
    transition: background 0.2s;
}
.fs-empty-cta:hover { background: #e11d48; }

/* --- Product detail page: Flash Sale banner --- */
.fs-detail-banner {
    background: linear-gradient(90deg, #ff234b 0%, #f37326 50%, #f9a61a 100%);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: relative;
    overflow: hidden;
    margin-bottom: 16px;
}
.fs-detail-banner::before {
    content: '';
    position: absolute; inset: 0;
    background-image: radial-gradient(#fff 15%, transparent 16%), radial-gradient(#fff 15%, transparent 16%);
    background-size: 10px 10px;
    background-position: 0 0, 5px 5px;
    opacity: 0.1;
    pointer-events: none;
}
.fs-detail-left {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 2;
}
.fs-detail-fs-text {
    font-style: italic;
    font-weight: 900;
    font-size: 16px;
    color: #fff;
    display: flex;
    align-items: center;
}
.fs-detail-fs-text svg {
    width: 18px; height: 18px;
    fill: #fde047;
    margin: 0 -2px;
}
.fs-detail-right {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 2;
}

/* --- Product detail: Price row --- */
.fs-detail-price-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.fs-detail-price-sale {
    font-size: 28px;
    font-weight: 900;
    color: #ee4d2d;
    line-height: 1;
}
.fs-detail-price-sale .fs-symbol { font-size: 18px; text-decoration: underline; }
.fs-detail-price-orig {
    font-size: 14px;
    color: #a1a1aa;
    text-decoration: line-through;
    font-weight: 500;
}
.fs-detail-badge-pct {
    font-size: 10px;
    font-weight: 900;
    color: #ee4d2d;
    background: rgba(238,77,45,0.1);
    border: 1px solid rgba(238,77,45,0.2);
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- Utility: no-scrollbar --- */
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
