/* ═══════════════════════════════════════════════════════
   Flash Sales Pro — Frontend CSS
   ═══════════════════════════════════════════════════════ */

/* ── Variables ── */
:root {
    --fsp-red:     #e53935;
    --fsp-red-dk:  #b71c1c;
    --fsp-green:   #22c55e;
    --fsp-dark:    #1f2937;
    --fsp-gray:    #9ca3af;
    --fsp-shadow:  0 2px 12px rgba(0,0,0,.08);
}

/* ── Page wrapper ── */
.fsp-empty {
    text-align: center;
    padding: 40px;
    color: var(--fsp-gray);
    font-size: 1rem;
}

/* ── Bannière ── */
.fsp-banner {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 28px;
    line-height: 0;
}
.fsp-banner img {
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: cover;
    display: block;
}

/* ── Countdown global ── */
.fsp-global-cd {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    color: #fff;
    border-radius: 10px;
    padding: 14px 24px;
    margin-bottom: 32px;
}
.fsp-global-cd__label {
    font-size: 1rem;
    font-weight: 700;
}
.fsp-global-cd .fsp-u {
    background: rgba(255,255,255,.15);
    font-size: 1.1rem;
    min-width: 36px;
    padding: 5px 8px;
    border-radius: 7px;
}
.fsp-global-cd small        { color: rgba(255,255,255,.6); font-size: .6rem; }
.fsp-global-cd .fsp-sep     { color: rgba(255,255,255,.4); font-size: 1.2rem; }

/* ── Sections catégories ── */
.fsp-section { margin-bottom: 36px; }
.fsp-section-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--fsp-dark);
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 8px;
}
.fsp-section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1.2rem;
    background: var(--fsp-red);
    border-radius: 2px;
    flex-shrink: 0;
}

/* ── Grid ── */
.fsp-grid {
    display: grid;
    gap: 14px;
}
.fsp-cols-2 { grid-template-columns: repeat(2, 1fr); }
.fsp-cols-3 { grid-template-columns: repeat(3, 1fr); }
.fsp-cols-4 { grid-template-columns: repeat(4, 1fr); }
.fsp-cols-5 { grid-template-columns: repeat(5, 1fr); }
.fsp-cols-6 { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 1280px) {
    .fsp-cols-6 { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 1024px) {
    .fsp-cols-6, .fsp-cols-5 { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
    .fsp-cols-6, .fsp-cols-5, .fsp-cols-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
    .fsp-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }
}

/* ── Card ── */
.fsp-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--fsp-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform .22s ease, box-shadow .22s ease;
    animation: fspCardIn .35s ease both;
}
.fsp-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0,0,0,.13);
}
.fsp-card:nth-child(1) { animation-delay: .04s; }
.fsp-card:nth-child(2) { animation-delay: .08s; }
.fsp-card:nth-child(3) { animation-delay: .12s; }
.fsp-card:nth-child(4) { animation-delay: .16s; }
.fsp-card:nth-child(5) { animation-delay: .20s; }
.fsp-card:nth-child(6) { animation-delay: .24s; }
@keyframes fspCardIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Badge */
.fsp-badge {
    position: absolute;
    top: 9px; left: 9px;
    z-index: 5;
    background: var(--fsp-red);
    color: #fff;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .02em;
}

/* Image */
.fsp-card__img-link {
    display: block;
    overflow: hidden;
    aspect-ratio: 1;
    background: #f3f4f6;
}
.fsp-card__img-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}
.fsp-card:hover .fsp-card__img-link img { transform: scale(1.06); }

/* Body */
.fsp-card__body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}
.fsp-card__name {
    margin: 0;
    font-size: .85rem;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}
.fsp-card__name a {
    color: var(--fsp-dark);
    text-decoration: none;
}
.fsp-card__name a:hover { color: var(--fsp-red); }

/* Prix */
.fsp-card__prices {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.fsp-price-flash {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--fsp-red);
    line-height: 1;
}
.fsp-price-flash .woocommerce-Price-amount { color: var(--fsp-red) !important; font-weight: 800 !important; }
.fsp-price-reg {
    font-size: .82rem;
    color: var(--fsp-gray);
    text-decoration: line-through;
    line-height: 1;
}
.fsp-price-reg .woocommerce-Price-amount { color: var(--fsp-gray) !important; }

/* Progress */
.fsp-progress {
    background: #e5e7eb;
    border-radius: 999px;
    height: 5px;
    overflow: hidden;
}
.fsp-progress__bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--fsp-green), #86efac);
    transition: width .6s ease;
}
.fsp-progress__label {
    margin: 0;
    font-size: .66rem;
    color: var(--fsp-gray);
}

/* Countdown */
.fsp-cd {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap;
}
.fsp-cd__label {
    font-size: .7rem;
    color: var(--fsp-gray);
    white-space: nowrap;
    margin-right: 2px;
}
.fsp-u {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--fsp-dark);
    color: #fff;
    border-radius: 5px;
    padding: 3px 5px;
    min-width: 26px;
    font-size: .82rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    transition: background .4s;
}
.fsp-cd small { font-size: .55rem; color: #6b7280; }
.fsp-sep      { color: var(--fsp-gray); font-weight: 700; padding-bottom: 2px; }

.fsp-cd--urgent .fsp-u { background: #f59e0b; }
.fsp-cd--hot    .fsp-u { background: var(--fsp-red); animation: fspPulse 1s infinite; }
@keyframes fspPulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.07); }
}

/* Bouton Ajouter au panier */
.fsp-atc {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
    padding: 9px 6px;
    margin-top: auto;
    background: var(--fsp-red);
    color: #fff !important;
    border: none;
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none !important;
    text-align: center;
    transition: background .18s, transform .12s;
    line-height: 1.2;
}
.fsp-atc:hover { background: var(--fsp-red-dk) !important; transform: scale(1.02); color: #fff !important; }
.fsp-atc:active { transform: scale(.98); }
.fsp-atc--out   { background: var(--fsp-gray) !important; cursor: not-allowed; }
.fsp-atc--loading { opacity: .75; pointer-events: none; }
.fsp-atc--done  { background: var(--fsp-green) !important; }

/* Mobile compact */
@media (max-width: 600px) {
    .fsp-card__body  { padding: 7px 8px 8px; gap: 4px; }
    .fsp-card__name  { font-size: .76rem; }
    .fsp-price-flash { font-size: .92rem; }
    .fsp-atc         { font-size: .74rem; padding: 8px 4px; }
    .fsp-u           { min-width: 22px; font-size: .72rem; padding: 2px 3px; }
    .fsp-badge       { font-size: .65rem; padding: 2px 6px; }
    .fsp-banner img  { max-height: 200px; }
    .fsp-global-cd   { padding: 10px 14px; gap: 8px; }
    .fsp-global-cd__label { font-size: .85rem; }
}

/* ── Sticky bar ── */
#fsp-bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 999999;
    background: var(--fsp-dark);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 9px 20px;
    font-size: .88rem;
    font-weight: 600;
    animation: fspBarIn .4s ease;
}
@keyframes fspBarIn {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}
body.fsp-bar-on { padding-top: 48px !important; }

.fsp-bar__text { letter-spacing: .01em; }

#fsp-bar .fsp-cd--mini .fsp-u {
    background: rgba(255,255,255,.15);
    font-size: .8rem;
    min-width: 24px;
    padding: 2px 5px;
    border-radius: 5px;
}
#fsp-bar .fsp-cd--mini small { color: rgba(255,255,255,.55); font-size: .55rem; }
#fsp-bar .fsp-cd--mini .fsp-sep { color: rgba(255,255,255,.4); }

.fsp-bar__cta {
    background: var(--fsp-red);
    color: #fff !important;
    text-decoration: none !important;
    padding: 5px 14px;
    border-radius: 6px;
    font-size: .82rem;
    font-weight: 700;
    transition: background .18s;
    white-space: nowrap;
}
.fsp-bar__cta:hover { background: var(--fsp-red-dk) !important; }

#fsp-bar__close {
    background: none;
    border: none;
    color: rgba(255,255,255,.45);
    cursor: pointer;
    font-size: 1rem;
    margin-left: auto;
    padding: 0;
    transition: color .18s;
    line-height: 1;
}
#fsp-bar__close:hover { color: #fff; }

@media (max-width: 600px) {
    #fsp-bar        { padding: 7px 12px; gap: 8px; font-size: .78rem; }
    .fsp-bar__cta   { padding: 4px 10px; font-size: .74rem; }
    body.fsp-bar-on { padding-top: 44px !important; }
}
