/* =========================================
       تصميم الكروت (Cards) والمؤثرات
       ========================================= */
    .custom-aqar-card { 
        background-color: #ffffff !important; 
        border: 1px solid rgba(96, 99, 100, 0.15) !important; 
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04) !important; 
        transition: box-shadow 0.3s ease, border-color 0.3s ease, background-color 0.3s ease; 
        position: relative; 
        z-index: 1; 
        overflow: hidden !important; 
    }

    .custom-aqar-card:has(.show) {
        z-index: 99999 !important;
        overflow: visible !important;
    }

    .custom-aqar-card .ratio,
    .custom-aqar-card .aqar-media-shell {
        overflow: hidden !important;
        border-top-right-radius: inherit;
        border-top-left-radius: inherit;
    }

    .custom-aqar-card .ratio img,
    .custom-aqar-card .aqar-media-img {
        transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    @media (hover: hover) {
        .custom-aqar-card:not(.status-archived):not(.status-deleted):hover { 
            box-shadow: 0 6px 18px rgba(32, 43, 47, 0.08) !important;
            border-color: #d5dade !important;
            z-index: 999 !important;
        }
        
        .custom-aqar-card:hover .ratio img,
        .custom-aqar-card:hover .aqar-media-img {
            transform: none;
        }
    }

    /* زر الخيارات الملون بالكامل (التعديل الجديد) */
    .btn-brand-solid {
        background-color: var(--brand-gold) !important;
        color: #ffffff !important;
        border: 1px solid var(--brand-gold) !important;
        transition: all 0.3s ease;
    }
    /* تأثير الهوفر: لون أغمق مع ظل ناعم */
    .btn-brand-solid:hover, .btn-brand-solid:focus, .btn-brand-solid:active, .btn-brand-solid.show {
        background-color: #e6a414 !important; /* درجة أغمق بقليل */
        border-color: #e6a414 !important;
        color: #ffffff !important;
        box-shadow: 0 4px 10px rgba(230, 164, 20, 0.4) !important;
    }

    .text-brand-price { color: var(--brand-gold) !important; }

    .hover-title { transition: color 0.2s ease; }
    a:hover .hover-title { color: var(--brand-gold) !important; }

    /* =========================================
       تصميم سلايدر الصور (الشرطات الذهبية)
       ========================================= */
    .custom-aqar-card .carousel-indicators,
    .custom-aqar-card .swiper-pagination {
        margin-bottom: 0.5rem;
        gap: 4px;
    }
    .custom-aqar-card .carousel-indicators [data-bs-target] {
        width: 14px;
        height: 4px;
        background-color: rgba(255, 255, 255, 0.6);
        border: none;
        border-radius: 10px;
        transition: all 0.3s ease;
    }
    .custom-aqar-card .carousel-indicators .active {
        background-color: var(--brand-gold) !important;
        width: 24px !important;
        opacity: 1;
    }

    .custom-aqar-card .carousel a,
    .custom-aqar-card .carousel img,
    .custom-aqar-card .swiper img,
    .custom-aqar-card .lc-img-square {
        -webkit-user-drag: none;
        -khtml-user-drag: none;
        -moz-user-drag: none;
        -o-user-drag: none;
        user-drag: none;
    }

    /* =========================================
       تصميم الجدول (Table Mode) الفخم والناعم
       ========================================= */
    table#mainAqarTable,
    table.aqar-card-table { 
        border-collapse: separate !important; 
        border-spacing: 0 12px !important; 
        width: 100% !important; 
        table-layout: fixed !important;
        background-color: transparent !important; 
        border: none !important; 
    }
    table#mainAqarTable thead,
    table.aqar-card-table thead { display: none !important; }

    table#mainAqarTable tr.data-card-row,
    table.aqar-card-table tr.data-card-row { 
        border-radius: 0.75rem; 
        transition: box-shadow 0.22s ease;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important; 
    }

    table#mainAqarTable td,
    table.aqar-card-table td { 
        position: relative; 
        width: 25% !important;
        vertical-align: middle !important; 
        padding: 12px 10px !important; 
        text-align: center !important; 
        background-color: #ffffff; 
        border-top: 1px solid rgba(96, 99, 100, 0.15) !important; 
        border-bottom: 1px solid rgba(96, 99, 100, 0.15) !important; 
        transition: border-color 0.3s ease, background-color 0.3s ease;
    }

    table#mainAqarTable td:first-child,
    table.aqar-card-table td:first-child { 
        border-right: 1px solid rgba(96, 99, 100, 0.15) !important; 
        border-top-right-radius: 0.75rem !important; 
        border-bottom-right-radius: 0.75rem !important; 
    }
    
    table#mainAqarTable td:last-child,
    table.aqar-card-table td:last-child { 
        border-left: 1px solid rgba(96, 99, 100, 0.15) !important; 
        border-top-left-radius: 0.75rem !important; 
        border-bottom-left-radius: 0.75rem !important; 
    }

    table#mainAqarTable td:not(:first-child),
    table.aqar-card-table td:not(:first-child) { 
        border-right: 1px solid rgba(96, 99, 100, 0.08) !important; 
    }

    .lc-title { font-size: 0.85rem !important; font-weight: bold !important; color: #2b2b2b !important; margin-bottom: 8px !important; line-height: 1.3 !important; display: block; }
    .lc-img-square { width: 70px !important; height: 70px !important; aspect-ratio: 1 / 1 !important; object-fit: cover !important; border-radius: 8px !important; box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important; display: inline-block; transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
    .lc-img-square.is-default { background-color: #eef2f3; border: 1px solid rgba(32, 43, 47, 0.08); padding: 6px; }
    .lc-label { font-size: 0.7rem !important; color: #606364 !important; margin-bottom: 2px !important; display: block !important; }

    @media (min-width: 992px) {
        .lc-title {
            font-size: 0.94rem !important;
        }

        .aqar-table-main-value {
            font-size: 0.94rem !important;
            line-height: 1.35;
        }

        .aqar-table-price-value {
            font-size: 1.08rem !important;
            line-height: 1.3;
        }

        .aqar-table-price-per-meter {
            font-size: 0.69rem !important;
            font-weight: 400 !important;
            color: #606364;
            line-height: 1.35 !important;
        }
    }

    html[data-bs-theme="dark"] .lc-img-square.is-default {
        content: url('/assets/img/default-property-dark.svg');
        background-color: #20272b;
        border-color: rgba(255, 255, 255, 0.12);
    }

    @media (hover: hover) {
        table#mainAqarTable tr.data-card-row:not(.status-archived):not(.status-deleted):hover,
        table.aqar-card-table tr.data-card-row:not(.status-archived):not(.status-deleted):hover { 
            box-shadow: 0 6px 18px rgba(32, 43, 47, 0.06) !important;
        }
        table#mainAqarTable tr.data-card-row:not(.status-archived):not(.status-deleted):hover td,
        table.aqar-card-table tr.data-card-row:not(.status-archived):not(.status-deleted):hover td {
            background-color: var(--aqar-surface-soft) !important;
            border-top-color: var(--aqar-border) !important;
            border-bottom-color: var(--aqar-border) !important;
        }
        table#mainAqarTable tr.data-card-row:not(.status-archived):not(.status-deleted):hover td:first-child,
        table.aqar-card-table tr.data-card-row:not(.status-archived):not(.status-deleted):hover td:first-child {
            border-right-color: var(--aqar-border) !important;
        }
        table#mainAqarTable tr.data-card-row:not(.status-archived):not(.status-deleted):hover td:last-child,
        table.aqar-card-table tr.data-card-row:not(.status-archived):not(.status-deleted):hover td:last-child {
            border-left-color: var(--aqar-border) !important;
        }
        table#mainAqarTable tr.data-card-row:not(.status-archived):not(.status-deleted):hover td:not(:first-child),
        table.aqar-card-table tr.data-card-row:not(.status-archived):not(.status-deleted):hover td:not(:first-child) {
            border-right-color: var(--aqar-border) !important;
        }
        table#mainAqarTable tr.data-card-row:hover .lc-img-square,
        table.aqar-card-table tr.data-card-row:hover .lc-img-square {
            transform: none;
        }
    }

    /* تكبير وتوضيح الزر في الجوال (التعديل الجديد) */
    @media (max-width: 768px) {
        .options-btn {
            font-size: 0.8rem !important;
            padding-left: 14px !important;
            padding-right: 14px !important;
            padding-top: 6px !important;
            padding-bottom: 6px !important;
        }
    }

    /* =========================================
       تلوين الكروت حسب الحالة (مؤرشف / محذوف)
       ========================================= */
    .status-archived {
        background-color: #fffdf2 !important; 
        border-color: #fce192 !important;
    }
    table#mainAqarTable tr.status-archived td,
    table.aqar-card-table tr.status-archived td {
        background-color: #fffdf2 !important;
        border-top-color: #fce192 !important;
        border-bottom-color: #fce192 !important;
    }
    table#mainAqarTable tr.status-archived td:first-child,
    table.aqar-card-table tr.status-archived td:first-child { border-right-color: #fce192 !important; }
    table#mainAqarTable tr.status-archived td:last-child,
    table.aqar-card-table tr.status-archived td:last-child { border-left-color: #fce192 !important; }

    .status-deleted {
        background-color: #fff5f5 !important; 
        border-color: #ffcaca !important;
    }
    table#mainAqarTable tr.status-deleted td,
    table.aqar-card-table tr.status-deleted td {
        background-color: #fff5f5 !important;
        border-top-color: #ffcaca !important;
        border-bottom-color: #ffcaca !important;
    }
    table#mainAqarTable tr.status-deleted td:first-child,
    table.aqar-card-table tr.status-deleted td:first-child { border-right-color: #ffcaca !important; }
    table#mainAqarTable tr.status-deleted td:last-child,
    table.aqar-card-table tr.status-deleted td:last-child { border-left-color: #ffcaca !important; }

    @media (hover: hover) {
        .status-archived:hover { background-color: #fff8d6 !important; box-shadow: 0 10px 25px rgba(252, 225, 146, 0.4) !important; }
        table#mainAqarTable tr.status-archived:hover td,
        table.aqar-card-table tr.status-archived:hover td { background-color: #fff8d6 !important; }
        
        .status-deleted:hover { background-color: #ffe8e8 !important; box-shadow: 0 10px 25px rgba(255, 202, 202, 0.4) !important; }
        table#mainAqarTable tr.status-deleted:hover td,
        table.aqar-card-table tr.status-deleted:hover td { background-color: #ffe8e8 !important; }
    }



 
    /* ✅ حل نظيف: الصورة تبدأ شفافة وتظهر بتحول ناعم لما تكتمل */
/* يعمل مع الكاش تلقائياً بدون JavaScript */
.carousel-item img,
.swiper-slide img,
.lc-img-square {
    opacity: 0;
    transition: opacity 0.35s ease;
    background-color: #e9ecef;
}

/* لما الصورة تكتمل — المتصفح يطبق هذا تلقائياً */
.carousel-item img.img-loaded,
.swiper-slide img.img-loaded,
.lc-img-square.img-loaded {
    opacity: 1;
}

.lc-img-square:not(img) {
    opacity: 1;
}

/* تحديث كرت الصفحة الرئيسية */
.custom-aqar-card {
    border-color: #d6dce1 !important;
    border-radius: 14px !important;
    box-shadow: 0 7px 20px rgba(32, 43, 47, 0.09) !important;
    width: 100%;
}

html[data-bs-theme="dark"] .custom-aqar-card {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
}

.card-wrapper {
    margin-bottom: 0 !important;
    align-self: stretch;
}

.data-card-wrapper .custom-aqar-card,
.data-card-wrapper .grid-layout {
    height: 100% !important;
    min-height: 0;
}

.custom-aqar-card .card-body {
    padding: 14px !important;
}

.aqar-card-media {
    cursor: pointer;
    aspect-ratio: 16 / 9;
    flex: 0 0 auto;
    min-height: 0;
    background:
        linear-gradient(135deg, rgba(32, 43, 47, 0.04), rgba(230, 164, 20, 0.10)),
        #eef1f2;
}

.aqar-media-shell {
    position: absolute !important;
    inset: 0;
    display: block !important;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden !important;
    background:
        linear-gradient(135deg, rgba(32, 43, 47, 0.04), rgba(230, 164, 20, 0.10)),
        #eef1f2;
}

.aqar-media-shell::before {
    content: none !important;
    display: none !important;
}

.aqar-media-shell > .aqar-swiper,
.aqar-media-shell > .aqar-no-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.aqar-media-img {
    width: 100%;
    height: 100% !important;
    min-height: 0;
    object-fit: cover;
    object-position: center;
    display: block;
}

.aqar-swiper {
    width: 100%;
    height: 100%;
    overflow: hidden;
    direction: rtl;
    touch-action: pan-y;
}

.aqar-swiper .swiper-wrapper {
    align-items: stretch;
}

.aqar-swiper .swiper-slide {
    height: 100%;
    min-height: 0;
    flex-shrink: 0;
    overflow: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.aqar-swiper img {
    -webkit-user-drag: none;
    user-drag: none;
    pointer-events: none;
}

.aqar-swiper-card,
.aqar-swiper-card .swiper-wrapper,
.aqar-swiper-card .swiper-slide {
    width: 100%;
    height: 100% !important;
    min-height: 0 !important;
}

.aqar-swiper-card .img-skeleton {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    background-color: #e7eaec;
}

.aqar-swiper-card .img-skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        105deg,
        transparent 24%,
        rgba(255, 255, 255, 0.72) 42%,
        rgba(255, 255, 255, 0.72) 54%,
        transparent 72%
    );
    background-size: 220% 100%;
    animation: aqarCardImageShimmer 1.35s linear infinite;
    transition: opacity 0.22s ease;
}

.aqar-swiper-card .img-skeleton .aqar-media-img {
    opacity: 0;
    transition: opacity 0.28s ease;
}

.aqar-swiper-card .img-skeleton.img-done::after {
    opacity: 0;
    animation: none;
}

.aqar-swiper-card .img-skeleton.img-done .aqar-media-img.img-loaded {
    opacity: 1;
}

html[data-bs-theme="dark"] .aqar-swiper-card .img-skeleton {
    background-color: #252d31;
}

html[data-bs-theme="dark"] .aqar-swiper-card .img-skeleton::after {
    background: linear-gradient(
        105deg,
        transparent 24%,
        rgba(255, 255, 255, 0.10) 42%,
        rgba(255, 255, 255, 0.10) 54%,
        transparent 72%
    );
    background-size: 220% 100%;
}

@keyframes aqarCardImageShimmer {
    from { background-position: 200% 0; }
    to { background-position: -20% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .aqar-swiper-card .img-skeleton::after {
        animation: none;
    }
}

.aqar-swiper-card .swiper-pagination {
    bottom: 8px !important;
    display: flex;
    justify-content: center;
    gap: 4px;
    pointer-events: auto;
}

.aqar-swiper-card .swiper-pagination-bullet {
    width: 14px;
    height: 4px;
    border-radius: 999px;
    margin: 0 !important;
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.62);
    transition: width 0.25s ease, background-color 0.25s ease, opacity 0.25s ease;
}

.aqar-swiper-card .swiper-pagination-bullet-active {
    width: 24px;
    background-color: var(--brand-gold);
}

.aqar-media-shell.has-no-photo .carousel,
.aqar-media-shell.has-no-photo .swiper {
    display: none !important;
}

.aqar-no-photo {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    color: #5f6f72;
    background:
        radial-gradient(circle at 30% 20%, rgba(230, 164, 20, 0.16), transparent 12rem),
        linear-gradient(135deg, #eef2f3 0%, #f8faf9 100%);
    text-align: center;
}

html[data-bs-theme="dark"] .aqar-no-photo {
    color: #dce2e5;
    background:
        radial-gradient(circle at 30% 20%, rgba(230, 164, 20, 0.13), transparent 12rem),
        linear-gradient(135deg, #20272b 0%, #182024 100%);
}

.aqar-broken-photo-state {
    display: none;
}

.aqar-media-shell.has-no-photo .aqar-broken-photo-state {
    display: flex;
}

.aqar-no-photo i {
    color: var(--brand-gold);
    font-size: 2.45rem;
    transform: translateY(8px);
}

.aqar-no-photo-logo {
    display: block;
    width: min(44%, 145px);
    height: auto;
    max-height: 72px;
    object-fit: contain;
}

.aqar-no-photo-logo-dark {
    display: none;
}

html[data-bs-theme="dark"] .aqar-no-photo-logo-light {
    display: none;
}

html[data-bs-theme="dark"] .aqar-no-photo-logo-dark {
    display: block;
}

    .aqar-no-photo span {
        font-size: 0.82rem;
        font-weight: 800;
    }

.aqar-media-tags {
    max-width: calc(100% - 1rem);
}

.aqar-media-tag {
    align-items: center;
    background-color: rgba(255, 255, 255, 0.94);
    color: #566064;
    border: 1px solid rgba(32, 43, 47, 0.12);
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    min-height: 27px;
    padding: 0.24rem 0.55rem;
    backdrop-filter: blur(8px);
}

.aqar-media-tag,
.aqar-media-tag .aqar-media-tag-text,
.aqar-media-tag .aqar-media-tag-text * {
    font-family: 'Almarai', sans-serif;
    font-weight: 700 !important;
    line-height: 1;
}

.aqar-media-tag .bi {
    flex: 0 0 auto;
    font-size: 0.76rem;
    line-height: 1;
}

/* Keep every media badge visually consistent, including the relative-time badge. */
.aqar-media-tag.is-time {
    background-color: rgba(255, 255, 255, 0.94);
    color: #566064;
    border-color: rgba(32, 43, 47, 0.12);
}

.aqar-media-tag.is-ad-number {
    background-color: rgba(43, 52, 55, 0.94);
    color: #fff;
    border-color: rgba(43, 52, 55, 0.94);
}

html[data-bs-theme="dark"] .aqar-media-tag,
html[data-bs-theme="dark"] .aqar-media-tag.is-time {
    background-color: rgba(32, 43, 47, 0.84);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.18);
}

html[data-bs-theme="dark"] .aqar-media-tag.is-ad-number {
    background-color: rgba(43, 52, 55, 0.96);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.16);
}

.aqar-card-meta-row {
    border-bottom: 1px solid rgba(32, 43, 47, 0.08);
    padding-bottom: 0.75rem;
    margin-bottom: 0.85rem;
}

.aqar-card-meta-tags {
    min-width: 0;
}

.aqar-card-meta-chip {
    background-color: #f7f8f9;
    border: 1px solid rgba(32, 43, 47, 0.08);
    border-radius: 999px;
    color: #4c5a5d;
    font-size: 0.66rem;
    font-weight: 800;
    padding: 0.25rem 0.5rem;
    white-space: nowrap;
}

.aqar-table-record-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.3rem;
    line-height: 1.2;
}

.aqar-table-record-chip {
    align-items: center;
    background-color: #ffffff;
    border: 1px solid rgba(32, 43, 47, 0.12);
    border-radius: 5px;
    color: #4c5a5d;
    display: inline-flex;
    font-size: clamp(0.55rem, 1.2vw, 0.66rem);
    font-weight: 700;
    gap: 0.25rem;
    min-height: 25px;
    padding: 0.24rem 0.42rem;
    white-space: nowrap;
}

.aqar-table-record-chip i {
    color: var(--brand-gold);
    font-size: 0.72rem;
}

@media (min-width: 992px) {
    .aqar-table-price-value {
        font-size: 1.08rem !important;
    }
}

html[data-bs-theme="dark"] .aqar-table-record-chip {
    background-color: #20272b;
    border-color: rgba(255, 255, 255, 0.12);
    color: #e7eaec;
}

.aqar-card-title {
    color: #202b2f !important;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: normal;
    overflow-wrap: anywhere;
    min-height: auto;
}

.aqar-card-title.aqar-viewed-title,
.aqar-card-title.aqar-viewed-title *,
.lc-title.aqar-viewed-title,
.lc-title.aqar-viewed-title * {
    color: var(--brand-gold, #e9a20b) !important;
}

.custom-aqar-card .card-body > a {
    margin-bottom: 12px !important;
}

.aqar-card-facts {
    background-color: #ffffff;
    border: 1px solid #eceef0;
    border-radius: 10px;
    padding: 10px 3px;
    margin-bottom: 8px !important;
}

.aqar-card-facts .col {
    position: relative;
    min-width: 0;
}

.aqar-card-facts .col + .col {
    border-right: 0;
}

.aqar-card-facts .col + .col::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 50%;
    height: 28px;
    border-inline-start: 1px solid #f0f1f3;
    transform: translateY(-50%);
}

html[data-bs-theme="dark"] .custom-aqar-card .aqar-card-facts {
    background-color: var(--aqar-surface) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-bs-theme="dark"] .aqar-card-facts .col + .col::before {
    border-color: rgba(255, 255, 255, 0.06);
}

.aqar-price-row {
    min-height: 48px;
    gap: 0.65rem;
}

.aqar-price-stack {
    flex: 1 1 auto;
    height: auto !important;
    min-height: 48px;
    min-width: 0;
    justify-content: flex-end !important;
    padding-block: 3px;
}

.aqar-price-row > :last-child {
    flex-shrink: 0;
}

.aqar-card-meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 3px;
}

.aqar-card-meta-badge {
    align-items: center;
    background-color: #ffffff;
    border: 1px solid rgba(32, 43, 47, 0.12);
    border-radius: 5px;
    color: #202b2f;
    display: inline-flex;
    font-size: 0.68rem;
    font-weight: 500;
    line-height: 1;
    padding: 0.2rem 0.38rem;
}

.aqar-card-meta-badge.is-price-per-meter,
.aqar-table-price-per-meter {
    color: #202b2f;
}

.aqar-card-meta-badge.is-price-per-meter {
    background: transparent;
    border: 0;
    border-radius: 0;
    font-weight: 500;
    padding: 0;
    line-height: 1.5;
    gap: 3px;
    display: inline;
    overflow-wrap: anywhere;
}

.aqar-table-price-per-meter {
    font-weight: 600;
}

html[data-bs-theme="dark"] .aqar-card-meta-badge {
    background-color: #20272b;
    border-color: rgba(255, 255, 255, 0.12);
    color: #f2f3f4;
}

html[data-bs-theme="dark"] .aqar-card-meta-badge.is-price-per-meter {
    background: transparent;
    border: 0;
}

html[data-bs-theme="dark"] .aqar-card-meta-badge.is-price-per-meter,
html[data-bs-theme="dark"] .aqar-table-price-per-meter {
    color: #f2f3f4;
}

.aqar-price {
    color: var(--brand-gold) !important;
    font-size: clamp(1.06rem, 1.3vw, 1.24rem);
    white-space: nowrap;
}

html[data-bs-theme="dark"] .aqar-price {
    color: var(--brand-gold) !important;
}

.aqar-price .aqar-price-currency,
.aqar-price .aqar-price-label {
    color: #202b2f !important;
    font-weight: 500 !important;
}

html[data-bs-theme="dark"] .aqar-price .aqar-price-currency,
html[data-bs-theme="dark"] .aqar-price .aqar-price-label {
    color: #f2f3f4 !important;
}

.aqar-icon-button {
    background-color: #ffffff;
    color: #202b2f;
    border: 1px solid rgba(32, 43, 47, 0.12);
    box-shadow: 0 6px 16px rgba(32, 43, 47, 0.10);
    transition: all 0.2s ease;
}

.aqar-details-button {
    background-color: var(--brand-gold) !important;
    color: #ffffff !important;
    border: 1px solid var(--brand-gold);
    box-shadow: none;
    transition: all 0.2s ease;
}

.aqar-icon-button:hover {
    color: #ffffff;
    background-color: var(--brand-gold);
    border-color: var(--brand-gold);
}

.aqar-details-button:hover,
.aqar-details-button:focus-visible {
    color: #ffffff !important;
    background-color: #d99400 !important;
    border-color: #d99400;
}

.aqar-details-button {
    min-width: 92px;
    height: 36px;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 700;
    gap: 0.45rem !important;
    padding-inline: 1rem;
}

.aqar-table-actions {
    gap: 0.45rem;
}

table#mainAqarTable tr.data-card-row:has(.dropdown-menu.show) td,
table.aqar-card-table tr.data-card-row:has(.dropdown-menu.show) td {
    overflow: visible !important;
    z-index: 1060 !important;
}

table#mainAqarTable .aqar-table-actions .dropdown-menu,
table.aqar-card-table .aqar-table-actions .dropdown-menu {
    z-index: 1070 !important;
}

.aqar-table-circle-action {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    padding: 0 !important;
    border-radius: 999px !important;
    background-color: #ffffff !important;
    color: #202b2f !important;
    border: 1px solid rgba(32, 43, 47, 0.14) !important;
    box-shadow: 0 6px 16px rgba(32, 43, 47, 0.08) !important;
    transition: all 0.2s ease;
}

.aqar-table-circle-action:hover,
.aqar-table-circle-action:focus,
.aqar-table-circle-action.show {
    background-color: var(--brand-gold) !important;
    border-color: var(--brand-gold) !important;
    color: #ffffff !important;
}

.aqar-table-view-pill {
    min-width: 68px;
    height: 34px;
    background-color: var(--brand-gold) !important;
    color: #ffffff !important;
    border: 1px solid var(--brand-gold) !important;
    box-shadow: none !important;
    font-size: 0.875rem !important;
    transition: all 0.2s ease;
}

.aqar-table-view-pill:hover,
.aqar-table-view-pill:focus {
    background-color: #f2b631 !important;
    border-color: #f2b631 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .aqar-details-button,
html[data-bs-theme="dark"] .aqar-table-view-pill {
    background-color: var(--brand-gold) !important;
    border-color: var(--brand-gold) !important;
    color: #202b2f !important;
}

html[data-bs-theme="dark"] .aqar-table-circle-action[href] {
    background-color: var(--aqar-surface) !important;
    border-color: var(--aqar-border) !important;
    color: var(--aqar-text) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18) !important;
}

html[data-bs-theme="dark"] .aqar-table-circle-action[href]:hover,
html[data-bs-theme="dark"] .aqar-table-circle-action[href]:focus-visible {
    background-color: var(--brand-gold) !important;
    border-color: var(--brand-gold) !important;
    color: #202b2f !important;
}

html[data-bs-theme="dark"] .aqar-details-button:hover,
html[data-bs-theme="dark"] .aqar-details-button:focus-visible {
    background-color: #d99400 !important;
    border-color: #d99400 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .aqar-table-view-pill:hover,
html[data-bs-theme="dark"] .aqar-table-view-pill:focus-visible {
    background-color: #f2b631 !important;
    border-color: #f2b631 !important;
    color: #202b2f !important;
}

.aqar-card-action {
    width: 38px !important;
    height: 38px !important;
    background-color: #ffffff !important;
    color: #202b2f !important;
    border-color: rgba(32, 43, 47, 0.14) !important;
    box-shadow: none !important;
}

.aqar-card-action i {
    color: #202b2f !important;
    font-size: 1rem !important;
    line-height: 1 !important;
    opacity: 1 !important;
}

.aqar-card-action .bi::before {
    color: inherit !important;
    -webkit-text-fill-color: currentColor;
}

.aqar-card-staff-actions {
    gap: 0.45rem;
}

    .aqar-card-action:hover,
    .aqar-card-action:focus,
    .aqar-card-action:active,
.aqar-card-action.show {
    color: #ffffff !important;
    background-color: var(--brand-gold) !important;
        border-color: var(--brand-gold) !important;
    }

    /* Keep the dark listing action visible without changing its compact shape. */
    html[data-bs-theme="dark"] .aqar-card-action {
        background-color: #20272b !important;
        color: #ffffff !important;
        border-color: #374147 !important;
    }

    html[data-bs-theme="dark"] .aqar-card-action i {
        color: #f4f6f7 !important;
        opacity: 1 !important;
    }

    html[data-bs-theme="dark"] .aqar-card-action .bi::before {
        color: #f4f6f7 !important;
        -webkit-text-fill-color: #f4f6f7 !important;
    }

    html[data-bs-theme="dark"] .aqar-card-action:hover,
    html[data-bs-theme="dark"] .aqar-card-action:focus,
    html[data-bs-theme="dark"] .aqar-card-action:active,
    html[data-bs-theme="dark"] .aqar-card-action.show {
        background-color: var(--brand-gold) !important;
        color: #202b2f !important;
        border-color: var(--brand-gold) !important;
    }

    .aqar-card-action:hover i,
    .aqar-card-action:focus i,
    .aqar-card-action:active i,
    .aqar-card-action.show i {
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
    }

    html[data-bs-theme="dark"] .aqar-card-action:hover i,
    html[data-bs-theme="dark"] .aqar-card-action:focus i,
    html[data-bs-theme="dark"] .aqar-card-action:active i,
    html[data-bs-theme="dark"] .aqar-card-action.show i {
        color: #202b2f !important;
        -webkit-text-fill-color: #202b2f !important;
    }

    html[data-bs-theme="dark"] .aqar-table-circle-action:hover,
    html[data-bs-theme="dark"] .aqar-table-circle-action:focus,
    html[data-bs-theme="dark"] .aqar-table-circle-action.show {
        background-color: var(--brand-gold) !important;
        border-color: var(--brand-gold) !important;
        color: #202b2f !important;
    }

    html[data-bs-theme="dark"] .aqar-table-circle-action:hover i,
    html[data-bs-theme="dark"] .aqar-table-circle-action:focus i,
    html[data-bs-theme="dark"] .aqar-table-circle-action.show i {
        color: #202b2f !important;
        -webkit-text-fill-color: #202b2f !important;
    }

@media (max-width: 575.98px) {
    .card-wrapper {
        display: flex;
        justify-content: center;
    }

    .card-wrapper .custom-aqar-card {
        max-width: 420px;
    }

    .aqar-card-title {
        min-height: auto;
    }

    .aqar-card-facts {
        padding: 10px 3px;
    }

    .aqar-price-row .aqar-details-button,
    .aqar-price-row .aqar-card-action {
        min-height: 42px;
    }

    .aqar-price {
        font-size: clamp(1.08rem, 4.8vw, 1.28rem);
    }
}



.aqar-match-new-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 3;
    min-height: 27px;
    padding: 0.28rem 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 999px;
    background: #c62838;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
    font-family: 'Almarai', sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}
