/* Houshmand Premium Categories v3.5.0
 * Smooth native carousel, RTL-safe, no jQuery/Swiper/Slick.
 */
.hspc-root,
.hspc-root * {
    box-sizing: border-box;
}

.hspc-root {
    --hspc-cols-desktop: 5;
    --hspc-cols-laptop: 4.5;
    --hspc-cols-tablet: 2.8;
    --hspc-cols-mobile: 1.5;
    --hspc-cols: var(--hspc-cols-desktop);
    --hspc-gap: 16px;
    --hspc-blue: #079fe3;
    --hspc-blue-2: #087cf1;
    --hspc-navy: #0b1237;
    --hspc-muted: #7180a8;
    --hspc-border: #e6ebf4;
    --hspc-intrinsic-size: 650px;
    --hspc-hover-lift: 4px;
    --hspc-hover-safe-top: 10px;
    --hspc-hover-safe-bottom: 30px;
    --hspc-image-hover-scale: 1.025;
    --hspc-mobile-edge-right: 8px;
    --hspc-mobile-edge-left: 0px;
    width: 100%;
    direction: rtl;
    font-family: inherit;
    background-color: #fff;
    background-image: none;
    padding: 60px 20px 64px;
    overflow: hidden;
}

@supports (content-visibility: auto) {
    body:not(.elementor-editor-active) .hspc-root.use-content-visibility {
        content-visibility: auto;
        contain-intrinsic-size: auto var(--hspc-intrinsic-size);
    }
}

.hspc-root a,
.hspc-root a:hover,
.hspc-root a:focus {
    text-decoration: none;
}

.hspc-root button,
.hspc-root a {
    -webkit-tap-highlight-color: transparent;
}

.hspc-root svg {
    display: block;
}

.hspc-shell {
    width: 100%;
    max-width: 1400px;
    margin-inline: auto;
}

/* ---------------- Header ---------------- */
.hspc-header {
    position: relative;
    min-height: 58px;
    margin-bottom: 30px;
}

.hspc-heading {
    width: 100%;
    text-align: center;
}

.hspc-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 7px 14px;
    border-radius: 999px;
    background: #eef3ff;
    color: #4167e8;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}

.hspc-badge-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: #168bff;
    box-shadow: 0 0 0 5px rgba(22, 139, 255, .14);
}

.hspc-title {
    margin: 12px 0 6px;
    color: var(--hspc-navy);
    font-family: inherit;
    font-size: clamp(29px, 2.45vw, 40px);
    font-weight: 900;
    line-height: 1.45;
    letter-spacing: -.7px;
}

.hspc-subtitle {
    max-width: 700px;
    margin: 0 auto;
    color: var(--hspc-muted);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.9;
}

.hspc-controls {
    position: absolute;
    left: 0;
    bottom: 0;
    z-index: 5;
    display: flex;
    direction: ltr;
    align-items: center;
    gap: 8px;
}

.hspc-navigation {
    display: flex;
    direction: ltr;
    align-items: center;
    gap: 8px;
}

.hspc-nav-button,
.hspc-autoplay-toggle {
    appearance: none;
    width: 46px;
    height: 46px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dfe6f1;
    border-radius: 14px;
    background: #fff;
    color: var(--hspc-navy);
    cursor: pointer;
    box-shadow: 0 5px 16px rgba(22, 34, 72, .04);
    transition:
        transform .24s cubic-bezier(.2,.8,.2,1),
        background-color .24s ease,
        color .24s ease,
        border-color .24s ease,
        box-shadow .24s ease;
}

.hspc-nav-button:hover:not(:disabled),
.hspc-autoplay-toggle:hover:not(:disabled) {
    transform: translateY(-2px);
    background: var(--hspc-blue);
    border-color: var(--hspc-blue);
    color: #fff;
    box-shadow: 0 10px 24px rgba(7, 159, 227, .20);
}

.hspc-nav-button:active:not(:disabled),
.hspc-autoplay-toggle:active:not(:disabled) {
    transform: translateY(0) scale(.96);
}

.hspc-nav-button:disabled,
.hspc-autoplay-toggle:disabled {
    opacity: .35;
    cursor: default;
    pointer-events: none;
    box-shadow: none;
}

.hspc-nav-button svg,
.hspc-autoplay-toggle svg,
.hspc-card-arrow svg,
.hspc-all-button svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hspc-autoplay-toggle .hspc-icon-play { display: none; }
.hspc-autoplay-toggle[aria-pressed="true"] .hspc-icon-pause { display: none; }
.hspc-autoplay-toggle[aria-pressed="true"] .hspc-icon-play { display: block; }
.hspc-autoplay-toggle[hidden] { display: none !important; }

.hspc-nav-button:focus-visible,
.hspc-autoplay-toggle:focus-visible,
.hspc-slider:focus-visible,
.hspc-all-button:focus-visible,
.hspc-card:focus-visible {
    outline: 2px solid var(--hspc-blue-2);
    outline-offset: 3px;
}

.hspc-root.auto-hide-no-overflow.no-overflow .hspc-controls,
.hspc-root.auto-hide-no-overflow.no-overflow .hspc-progress,
.hspc-root.auto-hide-no-overflow.no-overflow .hspc-swipe-hint {
    display: none !important;
}

/* ---------------- Smooth native carousel ---------------- */
.hspc-slider {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 6px 2px 18px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
    scroll-behavior: auto;
    cursor: grab;
}

.hspc-root.hide-scrollbar .hspc-slider {
    scrollbar-width: none;
}

.hspc-root.hide-scrollbar .hspc-slider::-webkit-scrollbar {
    display: none;
}

.hspc-root.has-scrollbar .hspc-slider {
    scrollbar-width: thin;
}

.hspc-root.is-snap.snap-proximity .hspc-slider {
    scroll-snap-type: inline proximity;
}

.hspc-root.is-snap.snap-mandatory .hspc-slider {
    scroll-snap-type: inline mandatory;
}

.hspc-root.no-snap .hspc-slider {
    scroll-snap-type: none;
}

.hspc-slider.is-dragging {
    cursor: grabbing;
    user-select: none;
    scroll-snap-type: none !important;
}

.hspc-track {
    width: 100%;
    min-width: 100%;
    margin: 0;
    padding: calc(var(--hspc-hover-lift) + var(--hspc-hover-safe-top)) 0 var(--hspc-hover-safe-bottom);
    list-style: none;
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: var(--hspc-gap);
}


.hspc-root.no-hover .hspc-track {
    padding-top: 6px;
    padding-bottom: 14px;
}

.hspc-slide {
    flex: 0 0 calc((100% - (var(--hspc-gap) * (var(--hspc-cols) - 1))) / var(--hspc-cols));
    min-width: 0;
    display: flex;
    scroll-snap-align: start;
    scroll-snap-stop: normal;
}

/* ---------------- Card ---------------- */
.hspc-card {
    position: relative;
    isolation: isolate;
    width: 100%;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--hspc-border);
    border-radius: 24px;
    background: #fff;
    color: inherit;
    box-shadow: 0 7px 24px rgba(15, 28, 70, .055);
    transform: translateY(0);
    transform-origin: center center;
    transition:
        transform .32s cubic-bezier(.2,.75,.3,1),
        border-color .28s ease,
        box-shadow .32s ease;
}

.hspc-card::before {
    content: "";
    position: absolute;
    z-index: 4;
    top: 0;
    right: 24px;
    left: 24px;
    height: 2px;
    border-radius: 0 0 99px 99px;
    background: linear-gradient(90deg, transparent, rgba(16, 143, 255, .9), transparent);
    opacity: 0;
    transform: scaleX(.35);
    pointer-events: none;
    transition: opacity .28s ease, transform .32s cubic-bezier(.2,.8,.2,1);
}

.hspc-root.has-hover .hspc-card:hover {
    transform: translateY(calc(-1 * var(--hspc-hover-lift)));
    border-color: #a8ddff;
    box-shadow: 0 13px 30px rgba(15, 28, 70, .105);
}

.hspc-root.has-hover .hspc-card:hover::before {
    opacity: 1;
    transform: scaleX(1);
}

.hspc-card:focus-visible {
    border-color: #9fd9ff;
    box-shadow: 0 12px 28px rgba(15, 28, 70, .10);
}

.hspc-card:focus-visible::before {
    opacity: 1;
    transform: scaleX(1);
}

.hspc-card.is-disabled {
    cursor: default;
}

/* Media */
.hspc-media {
    position: relative;
    height: 208px;
    margin: 8px 8px 0;
    overflow: hidden;
    border-radius: 18px;
    background-color: #0d1737;
    background-image:
        radial-gradient(circle at 50% 73%, rgba(17, 132, 255, .38), transparent 30%),
        radial-gradient(circle at 50% 46%, #21375f 0%, #111e42 49%, #081126 100%);
    isolation: isolate;
    contain: layout paint;
}

.hspc-media::marker { display: none; }

.hspc-root.has-media-fx .hspc-media::before {
    content: "";
    position: absolute;
    z-index: 0;
    left: 9%;
    right: 9%;
    bottom: -5%;
    height: 39%;
    border: 1px solid rgba(66, 165, 255, .48);
    border-radius: 50%;
    box-shadow:
        0 -2px 18px rgba(22, 125, 255, .29),
        inset 0 0 24px rgba(14, 86, 198, .18);
    transform: perspective(380px) rotateX(69deg);
    pointer-events: none;
}

.hspc-root.has-media-fx .hspc-media::after {
    content: "";
    position: absolute;
    z-index: 0;
    left: 24%;
    right: 24%;
    bottom: 10%;
    height: 7%;
    border-radius: 50%;
    background: rgba(0, 0, 0, .28);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .22);
    pointer-events: none;
}

.hspc-media img,
.hspc-media .hspc-img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    padding: 14px;
    user-select: none;
    -webkit-user-drag: none;
    transform: translateY(0) scale(1);
    transform-origin: center center;
    transition:
        transform .42s cubic-bezier(.2,.75,.3,1),
        filter .32s ease;
}

.hspc-root.has-hover .hspc-card:hover .hspc-media img,
.hspc-root.has-hover .hspc-card:hover .hspc-media .hspc-img {
    transform: translateY(-2px) scale(var(--hspc-image-hover-scale));
    filter: drop-shadow(0 12px 15px rgba(0, 0, 0, .18));
}

/* Optimized preset for Houshmand Shop's square WooCommerce category artwork.
 * This intentionally overrides legacy v3.1 media height/padding settings so
 * existing widgets upgrade to a clean full-bleed image without dark framing. */
.hspc-root.media-category-preset .hspc-media {
    aspect-ratio: 1 / 1;
    height: auto !important;
    background: #f7f9fd !important;
    background-image: none !important;
}

.hspc-root.media-category-preset .hspc-media::before,
.hspc-root.media-category-preset .hspc-media::after {
    content: none !important;
    display: none !important;
}

.hspc-root.media-category-preset .hspc-media img,
.hspc-root.media-category-preset .hspc-media .hspc-img {
    width: 100%;
    height: 100%;
    padding: 0 !important;
    object-fit: cover !important;
    object-position: center center;
    filter: none;
}

.hspc-root.media-category-preset.has-hover .hspc-card:hover .hspc-media img,
.hspc-root.media-category-preset.has-hover .hspc-card:hover .hspc-media .hspc-img {
    transform: scale(var(--hspc-image-hover-scale));
    filter: none;
}

.media-category-preset .hspc-number {
    background: rgba(255, 255, 255, .90);
    color: #13224a;
    border-color: rgba(17, 82, 168, .12);
    box-shadow: 0 5px 16px rgba(34, 60, 110, .08);
    backdrop-filter: blur(7px);
}

/* Attractive fallback instead of Elementor's grey placeholder */
.hspc-fallback-art {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    color: #d9edff;
    pointer-events: none;
}

.hspc-fallback-art svg {
    position: relative;
    z-index: 2;
    width: 58%;
    max-width: 132px;
    height: auto;
    filter: drop-shadow(0 14px 20px rgba(0, 0, 0, .24));
    transform: translateY(-3px) scale(1);
    transition: transform .38s cubic-bezier(.2,.75,.3,1), filter .32s ease;
}

.hspc-fallback-art svg g {
    fill: none;
    stroke: currentColor;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hspc-fallback-orb {
    position: absolute;
    z-index: 1;
    width: 66%;
    aspect-ratio: 1;
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(23, 140, 255, .28) 0%, rgba(23, 140, 255, .08) 44%, transparent 72%);
    transform: translateY(-3%);
}

.hspc-root.has-hover .hspc-card:hover .hspc-fallback-art svg {
    transform: translateY(-6px) scale(1.025);
    filter: drop-shadow(0 17px 21px rgba(0, 0, 0, .26));
}

.hspc-number {
    position: absolute;
    z-index: 5;
    top: 14px;
    right: 14px;
    min-width: 38px;
    min-height: 30px;
    padding: 4px 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .30);
    border-radius: 10px;
    background: rgba(12, 24, 55, .58);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 5px 16px rgba(0, 0, 0, .10);
}

/* Card copy */
.hspc-card-content {
    min-height: 108px;
    padding: 17px 17px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex: 1 1 auto;
}

.hspc-card-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.hspc-card-title {
    margin: 0 0 4px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    color: var(--hspc-navy);
    font-family: inherit;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.7;
    transition: color .25s ease;
}

.hspc-card-title:last-child {
    margin-bottom: 0 !important;
}

.hspc-card-subtitle {
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    color: #7a83a2;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.75;
}

.hspc-card-arrow {
    width: 38px;
    height: 38px;
    min-width: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e8eef7;
    border-radius: 12px;
    background: #f6f8fc;
    color: #147cff;
    box-shadow: 0 4px 12px rgba(21, 52, 103, .035);
    transition:
        transform .28s cubic-bezier(.2,.8,.2,1),
        background-color .25s ease,
        color .25s ease,
        border-color .25s ease;
}

.hspc-root.has-hover .hspc-card:hover .hspc-card-title {
    color: #087cf1;
}

.hspc-root.has-hover .hspc-card:hover .hspc-card-arrow {
    transform: translateX(-4px);
    background: var(--hspc-blue);
    border-color: var(--hspc-blue);
    color: #fff;
}

/* ---------------- Footer ---------------- */
.hspc-footer {
    position: relative;
    z-index: 4;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.hspc-progress {
    position: relative;
    width: 170px;
    height: 5px;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 999px;
    background: #e9edf7;
}

.hspc-progress-bar {
    position: absolute;
    top: 0;
    right: 0;
    width: 28%;
    height: 100%;
    border-radius: inherit;
    background: #237cff;
    transform: translate3d(0, 0, 0);
    transition: transform .08s linear;
    will-change: transform;
}

.hspc-all-button {
    position: relative;
    z-index: 6;
    isolation: isolate;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 12px 20px;
    border: 1px solid #dfe6f1;
    border-radius: 14px;
    background: #fff;
    color: var(--hspc-navy);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.5;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 6px 18px rgba(15, 28, 70, .045);
    transition:
        transform .26s cubic-bezier(.2,.8,.2,1),
        color .24s ease,
        background-color .24s ease,
        border-color .24s ease,
        box-shadow .26s ease;
}

.hspc-all-button::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: -50%;
    bottom: -50%;
    left: -35%;
    width: 26%;
    background: linear-gradient(90deg, transparent, rgba(7, 159, 227, .12), transparent);
    transform: translateX(520%) rotate(14deg);
    pointer-events: none;
    transition: transform .62s cubic-bezier(.2,.7,.2,1);
}

.hspc-all-button > span,
.hspc-all-button > svg {
    position: relative;
    z-index: 1;
}

.hspc-all-button:hover {
    transform: translateY(-3px);
    color: var(--hspc-blue-2);
    background: #f8fbff;
    border-color: #a9d7ff;
    box-shadow: 0 12px 28px rgba(17, 86, 166, .11);
}

.hspc-all-button:hover::before {
    transform: translateX(-420%) rotate(14deg);
}

.hspc-all-button svg {
    width: 17px;
    height: 17px;
    transition: transform .25s cubic-bezier(.2,.8,.2,1);
}

.hspc-all-button:hover svg {
    transform: translateX(-4px);
}

.hspc-all-button:active {
    transform: translateY(0) scale(.98);
}

.hspc-all-button.is-disabled {
    opacity: .5;
    cursor: default;
    pointer-events: none;
}

.hspc-swipe-hint {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 24px;
    color: #7a83a2;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.7;
    text-align: center;
}

.hspc-swipe-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--hspc-blue-2);
    font-size: 22px;
    line-height: 1;
}

.hspc-empty {
    padding: 22px;
    border: 1px dashed #d9e1ef;
    border-radius: 16px;
    background: #f8fbff;
    color: #6f7896;
    text-align: center;
    font-size: 13px;
}

/* ---------------- Tablet ---------------- */
@media (min-width: 1025px) and (max-width: 1440px) {
    .hspc-root {
        --hspc-cols: var(--hspc-cols-laptop);
    }
}

@media (max-width: 1024px) {
    .hspc-root {
        --hspc-cols: var(--hspc-cols-tablet);
        --hspc-gap: 14px;
        padding: 50px 18px 54px;
    }

    .hspc-media {
        height: 198px;
    }
}

/* ---------------- Mobile ---------------- */
@media (max-width: 767px) {
    .hspc-root {
        --hspc-cols: var(--hspc-cols-mobile);
        --hspc-gap: 12px;
        padding: 40px 0 44px;
    }

    .hspc-header {
        min-height: 0;
        margin-bottom: 22px;
        padding-inline: 18px;
    }

    .hspc-title {
        font-size: 26px;
        line-height: 1.48;
        letter-spacing: -.4px;
    }

    .hspc-subtitle {
        max-width: 330px;
        font-size: 11.5px;
        line-height: 1.9;
    }

    .hspc-badge {
        padding: 6px 12px;
        font-size: 10.5px;
    }

    .hspc-navigation {
        display: none;
    }

    .hspc-slider {
        padding: 5px 18px 17px;
        cursor: default;
        scroll-padding-inline: 18px;
    }

    /* Mobile-first edge treatment: the carousel can bleed to the physical
     * viewport edges without changing the safe spacing of the heading/footer.
     * Dedicated Elementor controls set the right/left gutters. */
    .hspc-root.mobile-full-bleed {
        overflow: visible;
    }

    .hspc-root.mobile-full-bleed .hspc-slider {
        width: 100vw;
        max-width: none;
        margin-right: calc(50% - 50vw);
        margin-left: calc(50% - 50vw);
        padding-right: var(--hspc-mobile-edge-right) !important;
        padding-left: var(--hspc-mobile-edge-left) !important;
        scroll-padding-right: var(--hspc-mobile-edge-right);
        scroll-padding-left: var(--hspc-mobile-edge-left);
    }

    .hspc-card {
        border-radius: 22px;
        box-shadow: 0 8px 25px rgba(15, 28, 70, .07);
    }

    .hspc-media {
        height: 238px;
        margin: 7px 7px 0;
        border-radius: 17px;
    }

    .hspc-card-content {
        min-height: 112px;
        padding: 17px 16px 18px;
    }

    .hspc-card-title {
        font-size: 16px;
    }

    .hspc-card-subtitle {
        font-size: 10.8px;
        line-height: 1.85;
    }

    .hspc-card-arrow {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }

    .hspc-footer {
        margin-top: 18px;
        padding-inline: 18px;
        flex-direction: column;
        justify-content: center;
        gap: 17px;
    }

    .hspc-progress {
        width: 126px;
        order: 1;
    }

    .hspc-all-button {
        order: 2;
        width: min(100%, 330px);
        min-height: 48px;
    }

    .hspc-swipe-hint {
        padding-inline: 18px;
        display: flex;
    }
}

@media (max-width: 380px) {
    .hspc-title {
        font-size: 24px;
    }

    .hspc-media {
        height: 224px;
    }
}

@media (hover: none) {
    .hspc-root .hspc-track {
        padding-top: 5px;
        padding-bottom: 14px;
    }

    .hspc-root.has-hover .hspc-card:hover {
        transform: none;
        border-color: var(--hspc-border);
        box-shadow: 0 8px 25px rgba(15, 28, 70, .07);
    }

    .hspc-root.has-hover .hspc-card:hover::before {
        opacity: 0;
    }

    .hspc-root.has-hover .hspc-card:hover .hspc-media img,
    .hspc-root.has-hover .hspc-card:hover .hspc-media .hspc-img {
        transform: none;
        filter: none;
    }

    .hspc-root.has-hover .hspc-card:hover .hspc-card-arrow {
        transform: none;
    }

    .hspc-root.has-hover .hspc-card:hover .hspc-fallback-art svg {
        transform: translateY(-3px) scale(1);
        filter: drop-shadow(0 14px 20px rgba(0, 0, 0, .24));
    }
}

@media (prefers-reduced-motion: reduce) {
    .hspc-root *,
    .hspc-root *::before,
    .hspc-root *::after {
        scroll-behavior: auto !important;
        transition-duration: .001ms !important;
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
    }
}
