/* ================================================================
   Featured Donations Block  –  fd-* namespace
   Matches the "تبرعات مميزة" screenshot design
================================================================ */

/* ── Section wrapper ── */
.fd-section {
    padding: 56px 0;
    background-color: #f4f6f9;
    direction: rtl;
    font-family: inherit;
}

/* ── Header ── */
.fd-header {
    margin-bottom: 28px;
}

.fd-title {
    font-size: 26px;
    font-weight: 800;
    color: #1a2b4a;
    margin: 0;
    letter-spacing: -0.3px;
}

.fd-view-all {
    font-size: 14px;
    color: #6b7c93;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.fd-view-all:hover {
    color: #1a2b4a;
    border-color: #1a2b4a;
}

/* ── Donations page ordering ── */
.donations-order-header {
    padding: 8px 0 24px;
    text-align: center;
    direction: rtl;
}

.donations-order-title {
    margin: 0 0 18px;
    color: #1a2b4a;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.4;
}

.donations-order-pills {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.donations-order-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 20px;
    color: #4c5d77;
    background: #ffffff;
    border: 1px solid #e4e9f0;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(26, 43, 74, 0.06);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none !important;
    transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.donations-order-pill:hover {
    color: #1a2b4a;
    border-color: #cbd5e1;
    box-shadow: 0 5px 14px rgba(26, 43, 74, 0.11);
}

.donations-order-pill.active {
    color: #ffffff;
    background: #1a2b4a;
    border-color: #1a2b4a;
    box-shadow: 0 6px 16px rgba(26, 43, 74, 0.20);
}

/* ── Card ── */
.fd-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 5px 18px rgba(26, 43, 74, 0.13);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.fd-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(26, 43, 74, 0.18);
}

/* ── Image area ── */
.fd-img-wrap {
    position: relative;
    height: 172px;
    overflow: hidden;
    flex-shrink: 0;
    background: #edf2f7;
}

.fd-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.fd-card:hover .fd-img {
    transform: scale(1.025);
}

/* Category badge – top-right corner of image */
.fd-badge {
    position: absolute;
    top: 10px;
    right: 12px;
    background: rgba(255, 255, 255, 0.86);
    color: #1a2b4a;
    font-size: 10px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
    letter-spacing: 0;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 3px 10px rgba(26, 43, 74, 0.10);
}

/* ── Card body ── */
.fd-body {
    padding: 18px 22px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.fd-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 26px;
    direction: ltr;
    width: 100%;
}

.fd-share-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    color: #111827;
    background: transparent;
    border: 0;
    border-radius: 50%;
    font-size: 15px;
    line-height: 1;
    cursor: default;
}

.donconfirmpage .fd-share-btn {
    width: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    height: 24px !important;
}

.fd-share-btn:hover {
    color: #1a2b4a;
    background: #f3f6fb;
}

/* Product name */
.fd-name {
    flex: 1 1 auto;
    min-width: 0;
    width: calc(100% - 36px);
    font-size: 18px;
    font-weight: 700;
    color: #2f3544;
    direction: rtl;
    text-align: right;
    margin: 0;
    line-height: 1.55;
    word-break: normal;
    overflow-wrap: normal;
    white-space: normal;
}

.donconfirmpage .fd-name {
    width: calc(100% - 36px) !important;
    max-width: calc(100% - 36px) !important;
    font-size: 18px !important;
    color: #2f3544 !important;
    text-align: right !important;
    line-height: 1.55 !important;
}

/* ── Progress bar ── */
.fd-progress-row {
    position: relative;
    padding-top: 18px;
}

.fd-bar-wrap {
    width: 100%;
}

.fd-bar {
    background: #edf0f4;
    border-radius: 999px;
    height: 6px;
    overflow: hidden;
    width: 100%;
}

.fd-bar-fill {
    height: 100%;
    border-radius: 10px;
    background: #73c8c7;
    transition: width 0.55s ease;
    min-width: 4px;
}

.fd-pct-label {
    position: absolute;
    top: -4px;
    right: 0;
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 4px 12px;
    border-radius: 999px;
    background: #dff3ef;
    font-size: 11px;
    font-weight: 700;
    color: #4b8f86;
    white-space: nowrap;
}

/* ── Amounts row ── */
.fd-amounts {
    border-top: 0;
    border-bottom: 0;
    padding: 6px 0 14px;
    margin-bottom: 0;
    align-items: center;
}

.fd-amt-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

/* Thin vertical divider between columns */
.fd-divider {
    width: 1px;
    height: 34px;
    background: #edf0f4;
    flex-shrink: 0;
}

.fd-amt {
    font-size: 13px;
    font-weight: 800;
    display: block;
    letter-spacing: -0.2px;
}

/* Target – dark neutral */
.fd-amt-target {
    color: #4aa080;
}

/* Collected – teal/green */
.fd-amt-collected {
    color: #e17d45;
}

/* Remaining – warm orange */
.fd-amt-remaining {
    color: #6ca6bf;
}

.fd-amt-lbl {
    font-size: 10px;
    color: #526071;
    font-weight: 600;
}

/* ── Donate button ── */
.fd-btn-donate {
    margin-top: auto;
    background: #32497f;
    color: #ffffff !important;
    border: none;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 700;
    padding: 10px 0;
    cursor: pointer;
    text-decoration: none !important;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    letter-spacing: 0.3px;
}

.fd-btn-donate:hover {
    background: #293e72;
    box-shadow: 0 4px 14px rgba(49, 71, 124, 0.28);
    color: #ffffff !important;
}

/* ── Donations listing page compatibility ── */
.oe_product .modeem-donation-card {
    min-height: 100%;
}

.oe_product .modeem-donation-card .fd-img-wrap {
    display: block;
    color: inherit;
    text-decoration: none;
}

.oe_product .modeem-donation-card .fd-img-wrap .o_image_product {
    width: 100%;
    height: 100%;
}

.oe_product .modeem-donation-card .fd-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.modeem-donation-card-title-link,
.modeem-donation-card-title-link:hover {
    color: inherit !important;
    text-decoration: none;
}

.modeem-donation-card .fd-name {
    min-height: 52px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none;
}

.modeem-donation-card .fd-name a,
.modeem-donation-card .fd-name span {
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none;
}

/* Final scoped lock for /donations. This prevents broad website/page CSS from
   mutating the card after late stylesheets or lazy assets finish loading. */
.modeem-donation-card.fd-card {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    overflow: hidden !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    box-shadow: 0 5px 18px rgba(26, 43, 74, 0.13) !important;
}

.modeem-donation-card .fd-img-wrap {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    height: 172px !important;
    overflow: hidden !important;
    flex: 0 0 172px !important;
}

.modeem-donation-card .fd-body {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    padding: 18px 22px 20px !important;
}

.modeem-donation-card .fd-title-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 12px !important;
    direction: ltr !important;
    width: 100% !important;
    margin-bottom: 26px !important;
}

.modeem-donation-card .fd-share-btn {
    display: inline-flex !important;
    flex: 0 0 24px !important;
    width: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    height: 24px !important;
    padding: 0 !important;
}

.modeem-donation-card .fd-name {
    display: -webkit-box !important;
    flex: 1 1 auto !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 52px !important;
    margin: 0 !important;
    color: #2f3544 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1.55 !important;
    text-align: right !important;
    direction: rtl !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* ── Responsive ── */
@media (max-width: 767px) {
    .fd-section {
        padding: 36px 0;
    }

    .fd-title {
        font-size: 20px;
    }

    .fd-img-wrap {
        height: 180px;
    }

    .fd-cards-row .col-md-6 {
        margin-bottom: 20px;
    }
}
