/* ==========================================================================
   ALM Deals — Public Styles (v2.2)
   Uses high-specificity selectors + !important to override theme styles.
   ========================================================================== */

/* ─── Wrapper ─── */
.alm-deals-wrapper {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ─── Search Row ─── */
.alm-deals-wrapper .alm-search-row {
    margin-bottom: 12px;
}

.alm-deals-wrapper .alm-search-box {
    position: relative;
    width: 100%;
}

.alm-deals-wrapper .alm-search-input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    color: #000;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.alm-deals-wrapper .alm-search-input:focus {
    outline: none;
    border-color: #2e2ee5;
}

.alm-deals-wrapper .alm-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}

/* ─── Label Filters ─── */
.alm-deals-wrapper .alm-label-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.alm-deals-wrapper .alm-label-filter {
    padding: 6px 14px;
    border: none;
    border-radius: 20px;
    background: transparent;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.alm-deals-wrapper .alm-label-filter:hover {
    color: #2e2ee5;
}

.alm-deals-wrapper .alm-label-filter.active {
    background: #2e2ee5;
    color: #fff;
}

/* ─── Deals List ─── */
.alm-deals-wrapper .alm-deals-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ─── Deal Card ─── */
.alm-deals-wrapper .alm-deal-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px 28px;
    transition: box-shadow 0.2s, transform 0.15s;
}

.alm-deals-wrapper .alm-deal-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

/* ─── Title — styled as pcliveblog-title, using <div> to avoid theme h3 overrides ─── */
.alm-deals-wrapper .alm-deal-card .alm-deal-title {
    font-family: var(--pchead-font, 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif) !important;
    color: var(--pcheading-cl, #000000) !important;
    font-size: 18px !important;
    font-weight: var(--pchead-wei, 700) !important;
    margin: 0 0 10px 0 !important;
    line-height: 1.3 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

/* ─── Content Images (extracted from content, always visible) ─── */
.alm-deals-wrapper .alm-deal-images {
    margin-bottom: 12px !important;
    text-align: center !important;
    overflow: hidden !important;
}

.alm-deals-wrapper .alm-deal-images a {
    display: block !important;
    text-decoration: none !important;
}

.alm-deals-wrapper .alm-deal-images img {
    max-width: 100% !important;
    max-height: 400px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    border-radius: 4px !important;
}

/* ─── Labels ─── */
.alm-deals-wrapper .alm-deal-labels {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    align-items: flex-start;
}

.alm-deals-wrapper .alm-label {
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
    padding: 3px 8px !important;
    border-radius: 4px !important;
    line-height: 1.3 !important;
    display: inline-block !important;
    background: #f0f0f0;
    color: #666;
}

.alm-deals-wrapper .alm-label--moins_20 {
    background: #e8f5e9 !important;
    color: #2e7d32 !important;
}

.alm-deals-wrapper .alm-label--prix_record {
    background: #ffebee !important;
    color: #c62828 !important;
}

.alm-deals-wrapper .alm-label--immanquable {
    background: #fff3e0 !important;
    color: #e65100 !important;
}

.alm-deals-wrapper .alm-label--essentiel {
    background: #f3e5f5 !important;
    color: #7b1fa2 !important;
}

.alm-deals-wrapper .alm-label--coupon {
    background: #e8f5e9 !important;
    color: #2e7d32 !important;
}

.alm-deals-wrapper .alm-label--code_promo {
    background: #e3f2fd !important;
    color: #1565c0 !important;
}

/* ─── Content (text portion) ─── */
.alm-deals-wrapper .alm-deal-content {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 17px !important;
    line-height: 1.5 !important;
    color: #000000 !important;
    margin-bottom: 16px !important;
}

.alm-deals-wrapper .alm-deal-content strong {
    font-weight: 700 !important;
}

/* "Afficher la suite" — inline text link */
.alm-deals-wrapper a.alm-show-more {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #2e2ee5 !important;
    cursor: pointer !important;
    text-decoration: none !important;
    display: inline !important;
}

.alm-deals-wrapper a.alm-show-more:hover {
    text-decoration: underline !important;
}

.alm-deals-wrapper a.alm-show-more.alm-hidden {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* ─── CTA Button ─── */
.alm-deals-wrapper .alm-deal-cta {
    text-align: center;
    margin-top: 4px;
}

.alm-deals-wrapper .alm-deal-cta .alm-deal-btn {
    display: inline-block !important;
    padding: 14px 32px !important;
    background-color: #2e2ee5 !important;
    color: #ffffff !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    border-radius: 8px !important;
    border: none !important;
    line-height: 1.3 !important;
    transition: background-color 0.2s !important;
    cursor: pointer !important;
}

.alm-deals-wrapper .alm-deal-cta .alm-deal-btn:hover {
    background-color: #2424b8 !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

/* ─── No Deals ─── */
.alm-deals-wrapper .alm-no-deals {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

/* ─── Load More ─── */
.alm-deals-wrapper .alm-load-more-wrap {
    text-align: center;
    margin: 24px 0;
}

.alm-deals-wrapper .alm-load-more-btn {
    padding: 12px 32px;
    background: #2e2ee5;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 23px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.alm-deals-wrapper .alm-load-more-btn:hover {
    background: #2424b8;
}

.alm-deals-wrapper .alm-load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ─── Loading ─── */
.alm-deals-wrapper .alm-loading {
    text-align: center;
    padding: 20px;
}

.alm-deals-wrapper .alm-spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid #e0e0e0;
    border-top-color: #2e2ee5;
    border-radius: 50%;
    animation: alm-spin 0.7s linear infinite;
}

@keyframes alm-spin {
    to { transform: rotate(360deg); }
}

/* ─── Responsive ─── */
@media (max-width: 600px) {
    .alm-deals-wrapper {
        padding: 0 12px;
    }

    .alm-deals-wrapper .alm-deal-card {
        padding: 18px 18px;
    }

    .alm-deals-wrapper .alm-deal-card .alm-deal-title {
        font-size: 16px !important;
    }

    .alm-deals-wrapper .alm-deal-content {
        font-size: 15px !important;
    }

    .alm-deals-wrapper .alm-label-filters {
        flex-wrap: wrap;
        gap: 6px;
    }

    .alm-deals-wrapper .alm-label-filter {
        padding: 5px 12px;
        font-size: 13px;
    }

    .alm-deals-wrapper .alm-deal-cta .alm-deal-btn {
        font-size: 15px !important;
        padding: 12px 24px !important;
    }
}
