/* =========================================================
   ChinPars Pro AJAX Search
   Lightweight / RTL / Modam
   ========================================================= */
.cpas,
.cpas * {
    box-sizing: border-box;
}

.cpas {
    --cp-red: #971c20;
    --cp-red-dark: #741317;
    --cp-gold: #b99a7a;
    --cp-text: #2c2525;
    --cp-muted: #77706e;
    --cp-border: #eee8e3;
    --cp-soft: #fbf8f6;
    --cp-white: #fff;

    position: relative;
    width: 100%;
    direction: rtl;
    font-family: "modam", "Modam", var(--e-global-typography-primary-font-family), Tahoma, Arial, sans-serif;
    z-index: auto;
}

.cpas__form {
    margin: 0;
}

.cpas__field {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 58px;
    padding: 6px 7px 6px 6px;
    background: rgba(255,255,255,.98);
    border: 1px solid rgba(185,154,122,.32);
    border-radius: 17px;
    box-shadow: 0 8px 24px rgba(35,24,24,.055);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.cpas:focus-within .cpas__field {
    border-color: rgba(151,28,32,.42);
    box-shadow: 0 12px 30px rgba(151,28,32,.09), 0 0 0 3px rgba(151,28,32,.045);
}

.cpas__search-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--cp-red);
    background: linear-gradient(145deg, rgba(151,28,32,.08), rgba(185,154,122,.12));
}

.cpas__search-icon svg {
    width: 20px;
    height: 20px;
}

.cpas__input {
    appearance: none;
    -webkit-appearance: none;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    height: 46px;
    margin: 0 !important;
    padding: 0 13px !important;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--cp-text) !important;
    font: inherit !important;
    font-size: 14.5px !important;
    font-weight: 650 !important;
    line-height: 46px !important;
    text-align: right;
}

.cpas__input::placeholder {
    color: #9a9391;
    opacity: 1;
}

.cpas__input::-webkit-search-cancel-button {
    display: none;
}

.cpas__clear {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #9a9391;
    cursor: pointer;
    transition: background .18s ease, color .18s ease;
}

.cpas__clear:hover {
    color: var(--cp-red);
    background: rgba(151,28,32,.06);
}

.cpas__clear svg {
    width: 18px;
    height: 18px;
}

.cpas__loader {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin-left: 10px;
    border: 2px solid rgba(151,28,32,.16);
    border-top-color: var(--cp-red);
    border-radius: 50%;
    animation: cpas-spin .7s linear infinite;
}

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

.cpas__submit {
    height: 46px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 17px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--cp-red), var(--cp-red-dark));
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
    box-shadow: 0 7px 16px rgba(151,28,32,.17);
    transition: transform .18s ease, box-shadow .18s ease;
}

.cpas__submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 9px 20px rgba(151,28,32,.22);
}

.cpas__submit svg {
    width: 16px;
    height: 16px;
    transform: rotate(180deg);
}

.cpas__panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    width: 100%;
    max-height: min(660px, 72vh);
    overflow: hidden;
    background: rgba(255,255,255,.985);
    border: 1px solid var(--cp-border);
    border-radius: 18px;
    box-shadow: 0 22px 55px rgba(35,24,24,.14);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    animation: cpas-in .16s ease-out;
}

@keyframes cpas-in {
    from { opacity: 0; transform: translateY(-4px) scale(.995); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.cpas__panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 44px;
    padding: 10px 13px 8px;
    border-bottom: 1px solid #f2eeeb;
}

.cpas__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #675f5d;
    font-size: 11.5px;
    font-weight: 800;
}

.cpas__pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--cp-red);
    box-shadow: 0 0 0 4px rgba(151,28,32,.08);
}

.cpas__count {
    color: #9a9391;
    font-size: 11px;
    font-weight: 700;
}

.cpas__content {
    max-height: calc(min(660px, 72vh) - 98px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 7px;
    scrollbar-width: thin;
    scrollbar-color: rgba(151,28,32,.2) transparent;
}

.cpas__content::-webkit-scrollbar { width: 5px; }
.cpas__content::-webkit-scrollbar-thumb {
    background: rgba(151,28,32,.18);
    border-radius: 999px;
}

.cpas__section + .cpas__section {
    margin-top: 7px;
    padding-top: 7px;
    border-top: 1px solid #f3efec;
}

.cpas__section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 4px 7px 7px;
    color: #817977;
    font-size: 11px;
    font-weight: 850;
}

.cpas__section-title strong {
    color: var(--cp-text);
    font-size: 12px;
    font-weight: 900;
}

.cpas__item {
    position: relative;
    display: grid;
    grid-template-columns: 58px minmax(0,1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 70px;
    padding: 7px;
    border: 1px solid transparent;
    border-radius: 13px;
    color: inherit !important;
    text-decoration: none !important;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.cpas__item:hover,
.cpas__item.is-active {
    background: linear-gradient(135deg, rgba(151,28,32,.045), rgba(185,154,122,.07));
    border-color: rgba(185,154,122,.20);
    transform: translateX(-2px);
}

.cpas__thumb {
    width: 58px;
    height: 58px;
    overflow: hidden;
    border-radius: 12px;
    background: #f7f3f1;
    border: 1px solid #efe9e5;
}

.cpas__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0 !important;
    border-radius: 0 !important;
}

.cpas__thumb--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(151,28,32,.48);
    background: linear-gradient(145deg, rgba(151,28,32,.05), rgba(185,154,122,.11));
}

.cpas__thumb--empty svg {
    width: 23px;
    height: 23px;
}

.cpas__info {
    min-width: 0;
}

.cpas__title {
    display: block;
    overflow: hidden;
    color: var(--cp-text);
    font-size: 13px;
    font-weight: 850;
    line-height: 1.75;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cpas__meta {
    display: block;
    overflow: hidden;
    margin-top: 2px;
    color: #918987;
    font-size: 10.8px;
    font-weight: 650;
    line-height: 1.65;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cpas__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 25px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 9.8px;
    font-weight: 900;
    white-space: nowrap;
}

.cpas__badge--product {
    color: var(--cp-red);
    background: rgba(151,28,32,.075);
}

.cpas__badge--post {
    color: #7a5d43;
    background: rgba(185,154,122,.16);
}

.cpas__state {
    padding: 28px 14px 30px;
    text-align: center;
}

.cpas__state-icon {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 9px;
    border-radius: 14px;
    color: var(--cp-red);
    background: linear-gradient(145deg, rgba(151,28,32,.06), rgba(185,154,122,.10));
}

.cpas__state-icon svg {
    width: 22px;
    height: 22px;
}

.cpas__state strong {
    display: block;
    color: var(--cp-text);
    font-size: 13px;
    font-weight: 900;
}

.cpas__state span {
    display: block;
    margin-top: 4px;
    color: #948c8a;
    font-size: 11px;
    font-weight: 650;
}

.cpas__all {
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 13px;
    border-top: 1px solid #f0ece9;
    background: linear-gradient(180deg, #fff, #fcfaf8);
    color: var(--cp-red) !important;
    font-size: 11.5px;
    font-weight: 900;
    text-decoration: none !important;
}

.cpas__all:hover {
    background: #fbf6f4;
}

.cpas__all svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 767px) {
    .cpas__field {
        min-height: 54px;
        border-radius: 15px;
    }

    .cpas__search-icon {
        width: 39px;
        height: 39px;
        flex-basis: 39px;
        border-radius: 11px;
    }

    .cpas__input {
        height: 42px;
        padding: 0 10px !important;
        font-size: 13.5px !important;
        line-height: 42px !important;
    }

    .cpas__submit {
        width: 42px;
        height: 42px;
        padding: 0;
        border-radius: 11px;
    }

    .cpas__submit span {
        display: none;
    }

    .cpas__submit svg {
        width: 18px;
        height: 18px;
    }

    .cpas__panel {
        top: calc(100% + 8px);
        max-height: min(610px, 68vh);
        border-radius: 15px;
    }

    .cpas__content {
        max-height: calc(min(610px, 68vh) - 96px);
        padding: 6px;
    }

    .cpas__item {
        grid-template-columns: 52px minmax(0,1fr) auto;
        gap: 8px;
        min-height: 64px;
        padding: 6px;
        border-radius: 12px;
    }

    .cpas__thumb {
        width: 52px;
        height: 52px;
        border-radius: 10px;
    }

    .cpas__title {
        font-size: 12.2px;
    }

    .cpas__meta {
        font-size: 10.2px;
    }

    .cpas__badge {
        min-width: 40px;
        height: 23px;
        padding: 0 7px;
        font-size: 9px;
    }
}


/* =========================================================
   Elementor / Theme hardening — v1.0.1
   Prevent global Elementor SVG/button rules from breaking CPAS.
   ========================================================= */
.cpas [hidden] {
    display: none !important;
}

.cpas .cpas__field {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0 !important;
}

.cpas .cpas__search-icon {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    flex: 0 0 42px !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

.cpas .cpas__search-icon > svg {
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    flex: 0 0 20px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.cpas .cpas__clear,
.cpas .cpas__submit {
    appearance: none !important;
    -webkit-appearance: none !important;
    line-height: 1 !important;
}

.cpas .cpas__clear {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    flex: 0 0 34px !important;
    padding: 0 !important;
    margin: 0 0 0 4px !important;
}

.cpas .cpas__clear > svg {
    display: block !important;
    width: 17px !important;
    height: 17px !important;
    min-width: 17px !important;
    max-width: 17px !important;
    min-height: 17px !important;
    max-height: 17px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.cpas .cpas__loader {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    min-height: 18px !important;
    max-height: 18px !important;
    flex: 0 0 18px !important;
}

.cpas .cpas__submit {
    min-height: 46px !important;
    height: 46px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 0 17px !important;
    margin: 0 !important;
    border: 0 !important;
}

.cpas .cpas__submit > svg {
    display: block !important;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    max-width: 16px !important;
    min-height: 16px !important;
    max-height: 16px !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Empty / hint states intentionally have no search illustration. */
.cpas .cpas__state {
    min-height: 86px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 14px 22px;
}

.cpas .cpas__state-icon {
    display: none !important;
}

/* Keep Elementor's generic SVG rules away from every icon in the widget. */
.cpas svg {
    max-width: none !important;
}

@media (max-width: 767px) {
    .cpas .cpas__search-icon {
        width: 39px !important;
        height: 39px !important;
        min-width: 39px !important;
        max-width: 39px !important;
        min-height: 39px !important;
        max-height: 39px !important;
        flex-basis: 39px !important;
    }

    .cpas .cpas__submit {
        width: 42px !important;
        min-width: 42px !important;
        max-width: 42px !important;
        height: 42px !important;
        min-height: 42px !important;
        max-height: 42px !important;
        padding: 0 !important;
    }

    .cpas .cpas__submit > svg {
        width: 18px !important;
        height: 18px !important;
        min-width: 18px !important;
        max-width: 18px !important;
        min-height: 18px !important;
        max-height: 18px !important;
    }
}

/* =========================================================
   AJAX result product placeholder
   ========================================================= */
.cpas__thumb--placeholder {
    background: #f4eee7;
}

.cpas__thumb--placeholder img {
    object-fit: cover !important;
}

/* =========================================================
   ChinPars scoped search results page — v1.1.0
   ========================================================= */
.cpas-page,
.cpas-page * {
    box-sizing: border-box;
}

.cpas-page {
    --cp-red: #971c20;
    --cp-red-dark: #741317;
    --cp-gold: #b99a7a;
    --cp-text: #2c2525;
    --cp-muted: #77706e;
    --cp-border: #eee8e3;
    --cp-soft: #fbf8f6;
    --cp-white: #fff;

    position: relative;
    overflow: hidden;
    direction: rtl;
    background:
        linear-gradient(180deg, #fff 0%, #fff 52%, #fcfaf8 100%);
    color: var(--cp-text);
    font-family: "modam", "Modam", var(--e-global-typography-primary-font-family), Tahoma, Arial, sans-serif;
}

.cpas-page__glow {
    position: absolute;
    pointer-events: none;
    border-radius: 999px;
    filter: blur(4px);
    opacity: .85;
}

.cpas-page__glow--one {
    top: 40px;
    right: -180px;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(151,28,32,.07), rgba(151,28,32,0) 70%);
}

.cpas-page__glow--two {
    top: 250px;
    left: -180px;
    width: 440px;
    height: 440px;
    background: radial-gradient(circle, rgba(185,154,122,.11), rgba(185,154,122,0) 70%);
}

.cpas-page__inner {
    position: relative;
    z-index: 1;
    width: min(1320px, calc(100% - 36px));
    margin: 0 auto;
    padding: 46px 0 74px;
}

.cpas-page__hero {
    position: relative;
    min-height: 190px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 34px;
    padding: 34px 38px;
    overflow: hidden;
    border: 1px solid rgba(185,154,122,.24);
    border-radius: 26px;
    background:
        radial-gradient(circle at 90% 0%, rgba(151,28,32,.08), transparent 34%),
        radial-gradient(circle at 10% 100%, rgba(185,154,122,.13), transparent 35%),
        rgba(255,255,255,.96);
    box-shadow: 0 18px 48px rgba(44,37,37,.07);
}

.cpas-page__hero::before {
    content: "";
    position: absolute;
    right: 0;
    top: 28px;
    bottom: 28px;
    width: 5px;
    border-radius: 999px 0 0 999px;
    background: linear-gradient(180deg, var(--cp-red), var(--cp-gold));
}

.cpas-page__hero-copy {
    position: relative;
    z-index: 2;
    min-width: 0;
}

.cpas-page__breadcrumb {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0;
    padding: 0;
    direction: rtl;
    color: #817774;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.8;
}

.cpas-page__breadcrumb a {
    color: #817774;
    text-decoration: none !important;
    border: 0 !important;
    transition: color .2s ease;
}

.cpas-page__breadcrumb a:hover {
    color: var(--cp-red);
}

.cpas-page__breadcrumb-separator {
    color: rgba(151,28,32,.55);
    font-weight: 900;
}

.cpas-page__title {
    margin: 12px 0 8px !important;
    color: #241d1d;
    font-size: clamp(25px, 3vw, 38px);
    font-weight: 950;
    line-height: 1.55;
}

.cpas-page__title strong {
    color: var(--cp-red);
    font-weight: 950;
}

.cpas-page__subtitle {
    max-width: 760px;
    margin: 0 !important;
    color: #7e7673;
    font-size: 14px;
    font-weight: 650;
    line-height: 2;
}

.cpas-page__hero-mark {
    position: relative;
    z-index: 1;
    width: 106px;
    height: 106px;
    flex: 0 0 106px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(151,28,32,.09);
    border-radius: 30px;
    background: linear-gradient(145deg, rgba(151,28,32,.065), rgba(185,154,122,.12));
    color: rgba(151,28,32,.77);
    transform: rotate(-5deg);
}

.cpas-page__hero-mark svg {
    width: 54px;
    height: 54px;
}

.cpas-page__searchbar {
    position: relative;
    z-index: 10;
    width: min(900px, calc(100% - 34px));
    margin: -28px auto 44px;
}

.cpas-page__searchbar .cpas__field {
    min-height: 64px;
    border-radius: 19px;
    box-shadow: 0 16px 36px rgba(44,37,37,.11);
}

.cpas-page__section {
    margin-top: 44px;
}

.cpas-page__section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    padding: 0 4px;
}

.cpas-page__section-label {
    display: block;
    margin-bottom: 4px;
    color: var(--cp-red);
    font-size: 11px;
    font-weight: 900;
}

.cpas-page__section-head h2 {
    margin: 0 !important;
    color: #2a2222;
    font-size: 23px;
    font-weight: 950;
    line-height: 1.6;
}

.cpas-page__section-count {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid rgba(185,154,122,.21);
    border-radius: 999px;
    background: #fff;
    color: #8a817e;
    font-size: 10.5px;
    font-weight: 800;
}

.cpas-products-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 17px;
}

.cpas-product-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--cp-border);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(44,37,37,.045);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.cpas-product-card:hover {
    transform: translateY(-4px);
    border-color: rgba(185,154,122,.38);
    box-shadow: 0 19px 42px rgba(44,37,37,.085);
}

.cpas-product-card__media {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(151,28,32,.045), transparent 50%),
        #fbfaf9;
    color: inherit !important;
    text-decoration: none !important;
}

.cpas-product-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 14px;
    object-fit: contain;
    object-position: center;
    border-radius: 0 !important;
    margin: 0 !important;
    transition: transform .28s ease;
}

.cpas-product-card:hover .cpas-product-card__media img {
    transform: scale(1.025);
}

.cpas-product-card.is-placeholder .cpas-product-card__media img {
    padding: 0;
    object-fit: cover;
}

.cpas-product-card.is-placeholder:hover .cpas-product-card__media img {
    transform: none;
}

.cpas-product-card__type,
.cpas-post-card__type {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(255,255,255,.5);
    border-radius: 999px;
    background: rgba(255,255,255,.88);
    color: var(--cp-red);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 9.5px;
    font-weight: 950;
    box-shadow: 0 4px 14px rgba(0,0,0,.05);
}


.cpas-product-card__body {
    padding: 15px 16px 16px;
}

.cpas-product-card__meta {
    min-height: 20px;
    overflow: hidden;
    margin-bottom: 6px;
    color: #978e8b;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.8;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.cpas-product-card__title {
    min-height: 54px;
    margin: 0 0 13px !important;
    font-size: 14.5px;
    font-weight: 900;
    line-height: 1.85;
}

.cpas-product-card__title a {
    color: #2c2525 !important;
    text-decoration: none !important;
}

.cpas-product-card__cta,
.cpas-post-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--cp-red) !important;
    font-size: 11px;
    font-weight: 900;
    text-decoration: none !important;
}

.cpas-product-card__cta svg,
.cpas-post-card__cta svg {
    width: 15px;
    height: 15px;
    transition: transform .18s ease;
}

.cpas-product-card:hover .cpas-product-card__cta svg,
.cpas-post-card:hover .cpas-post-card__cta svg {
    transform: translateX(-3px);
}

.cpas-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.cpas-post-card {
    overflow: hidden;
    border: 1px solid var(--cp-border);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(44,37,37,.045);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.cpas-post-card:hover {
    transform: translateY(-4px);
    border-color: rgba(185,154,122,.38);
    box-shadow: 0 19px 42px rgba(44,37,37,.085);
}

.cpas-post-card__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f7f3f0;
    color: inherit !important;
    text-decoration: none !important;
}

.cpas-post-card__media::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(180deg, transparent, rgba(38,27,27,.16));
    pointer-events: none;
}

.cpas-post-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0 !important;
    border-radius: 0 !important;
    transition: transform .3s ease;
}

.cpas-post-card:hover .cpas-post-card__media img {
    transform: scale(1.035);
}

.cpas-post-card__fallback {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: rgba(151,28,32,.52);
    background:
        radial-gradient(circle at top right, rgba(151,28,32,.08), transparent 52%),
        linear-gradient(135deg, #fbf7f4, #f5eee8);
}

.cpas-post-card__fallback svg {
    width: 58px;
    height: 58px;
}

.cpas-post-card__body {
    padding: 16px 17px 17px;
}

.cpas-post-card__meta {
    margin-bottom: 6px;
    color: #9a918e;
    font-size: 10.3px;
    font-weight: 700;
}

.cpas-post-card__title {
    margin: 0 0 8px !important;
    font-size: 16px;
    font-weight: 950;
    line-height: 1.8;
}

.cpas-post-card__title a {
    color: #2b2424 !important;
    text-decoration: none !important;
}

.cpas-post-card__excerpt {
    min-height: 58px;
    margin: 0 0 12px !important;
    color: #7d7572;
    font-size: 11.7px;
    font-weight: 600;
    line-height: 1.95;
}

.cpas-page__empty {
    margin-top: 36px;
    padding: 54px 20px;
    border: 1px dashed rgba(185,154,122,.42);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(151,28,32,.035), rgba(185,154,122,.075));
    text-align: center;
}

.cpas-page__empty-icon {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    margin: 0 auto 12px;
    border-radius: 19px;
    background: #fff;
    color: var(--cp-red);
    box-shadow: 0 8px 24px rgba(44,37,37,.06);
}

.cpas-page__empty-icon svg {
    width: 34px;
    height: 34px;
}

.cpas-page__empty h2 {
    margin: 0 0 5px !important;
    color: #2b2424;
    font-size: 20px;
    font-weight: 950;
}

.cpas-page__empty p {
    margin: 0 !important;
    color: #867d7a;
    font-size: 12px;
    font-weight: 650;
}

.cpas-page__pagination {
    margin-top: 38px;
}

.cpas-page__pagination ul.page-numbers {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.cpas-page__pagination li {
    margin: 0 !important;
    padding: 0 !important;
}

.cpas-page__pagination .page-numbers:not(ul) {
    min-width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1px solid var(--cp-border);
    border-radius: 11px;
    background: #fff;
    color: #655d5b !important;
    font-size: 11px;
    font-weight: 900;
    text-decoration: none !important;
    transition: all .17s ease;
}

.cpas-page__pagination .page-numbers.current,
.cpas-page__pagination a.page-numbers:hover {
    border-color: var(--cp-red);
    background: var(--cp-red);
    color: #fff !important;
    box-shadow: 0 7px 18px rgba(151,28,32,.16);
}

@media (max-width: 1100px) {
    .cpas-products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 850px) {
    .cpas-page__inner {
        width: min(100% - 26px, 1320px);
        padding-top: 28px;
    }

    .cpas-page__hero {
        min-height: 166px;
        padding: 28px 24px;
        border-radius: 22px;
    }

    .cpas-page__hero-mark {
        width: 82px;
        height: 82px;
        flex-basis: 82px;
        border-radius: 23px;
    }

    .cpas-page__hero-mark svg {
        width: 42px;
        height: 42px;
    }

    .cpas-page__searchbar {
        width: calc(100% - 24px);
        margin-bottom: 36px;
    }

    .cpas-products-grid,
    .cpas-posts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .cpas-page__inner {
        width: calc(100% - 20px);
        padding: 18px 0 52px;
    }

    .cpas-page__hero {
        min-height: 0;
        align-items: flex-start;
        padding: 24px 19px 48px;
        border-radius: 18px;
    }

    .cpas-page__hero::before {
        top: 22px;
        bottom: 22px;
        width: 4px;
    }

    .cpas-page__hero-mark {
        display: none;
    }

    .cpas-page__title {
        font-size: 24px;
        line-height: 1.65;
    }

    .cpas-page__subtitle {
        font-size: 12.3px;
        line-height: 1.9;
    }

    .cpas-page__searchbar {
        width: calc(100% - 18px);
        margin-top: -28px;
        margin-bottom: 32px;
    }

    .cpas-page__section {
        margin-top: 34px;
    }

    .cpas-page__section-head {
        align-items: flex-start;
        margin-bottom: 13px;
    }

    .cpas-page__section-head h2 {
        font-size: 19px;
    }

    .cpas-page__section-count {
        display: none;
    }

    .cpas-products-grid,
    .cpas-posts-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .cpas-product-card {
        display: grid;
        grid-template-columns: 128px minmax(0, 1fr);
        align-items: stretch;
        border-radius: 16px;
    }

    .cpas-product-card__media {
        aspect-ratio: auto;
        min-height: 146px;
    }

    .cpas-product-card__media img {
        padding: 8px;
    }

    .cpas-product-card.is-placeholder .cpas-product-card__media img {
        padding: 0;
    }

    .cpas-product-card__type {
        top: 8px;
        right: 8px;
        min-height: 24px;
        padding: 0 8px;
        font-size: 8.5px;
    }

    .cpas-product-card__body {
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-width: 0;
        padding: 12px 13px;
    }

    .cpas-product-card__title {
        min-height: 0;
        margin-bottom: 10px !important;
        font-size: 13px;
        line-height: 1.8;
    }

    .cpas-post-card {
        border-radius: 16px;
    }

    .cpas-post-card__body {
        padding: 14px 14px 15px;
    }

    .cpas-post-card__title {
        font-size: 14.5px;
    }

    .cpas-post-card__excerpt {
        min-height: 0;
        font-size: 11px;
    }
}

/* =========================================================
   AJAX panel viewport / mega-menu hardening — v1.1.4
   The result box is rendered as a fixed portal so Elementor
   mega-menu overflow/z-index cannot clip it. Only the result
   content scrolls; the page itself is locked while open.
   ========================================================= */
body.cpas-search-open {
    overflow: hidden !important;
}


.cpas__panel.cpas__panel--portal {
    --cp-red: #971c20;
    --cp-red-dark: #741317;
    --cp-gold: #b99a7a;
    --cp-text: #2c2525;
    --cp-muted: #77706e;
    --cp-border: #eee8e3;
    --cp-soft: #fbf8f6;
    --cp-white: #fff;

    position: fixed !important;
    top: auto;
    right: auto;
    left: auto;
    bottom: auto;
    width: auto;
    max-width: none;
    max-height: none;
    z-index: 999999 !important;
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
    direction: rtl;
    font-family: "modam", "Modam", var(--e-global-typography-primary-font-family), Tahoma, Arial, sans-serif;
    isolation: isolate;
    contain: layout paint style;
}

.cpas__panel.cpas__panel--portal[hidden] {
    display: none !important;
}

.cpas__panel.cpas__panel--portal .cpas__panel-head,
.cpas__panel.cpas__panel--portal .cpas__all {
    flex: 0 0 auto;
}

.cpas__panel.cpas__panel--portal .cpas__content {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
}

/* Prevent menu/theme scrollbars from visually competing with results. */
.cpas__panel.cpas__panel--portal {
    scrollbar-width: none;
}


@media (max-width: 767px) {
    .cpas__panel.cpas__panel--portal {
        border-radius: 15px;
    }
}
