﻿.hss-wrapper {
    --hss-cols: 4;
    --hss-gap: 16px;
    --hss-carousel-full: 4;
    --hss-carousel-peek: 0.9;
    --hss-orange: #FE5934;
    --hss-gray: #7A7A7A;
    --hss-stroke: #EDEDED;
    --hss-dark: #2F3E46;
    --hss-black: #1F1F1F;
    --hss-white: #FFFFFF;
    margin: 1rem 0;
    width: 100%;
    font-family: peyda !important;
}

.hss-wrapper * {
    font-family: peyda !important;
}

.hss-wrapper *::before,
.hss-wrapper *::after {
    font-family: peyda !important;
}

.hss-wrapper,
.hss-wrapper *,
.hss-wrapper *::before,
.hss-wrapper *::after {
    font-feature-settings: "ss02" 1 !important;
}

/* Force plugin UI to use site typography */
.hss-wrapper,
.hss-empty,
.hss-plp-filter,
.hss-like-button,
.hss-like-widget-button,
.product-card,
.product-card * {
    font-family: peyda !important;
}

.hss-like-button,
.hss-like-widget-button,
.hss-plp-filter-btn {
    font: inherit !important;
}

.hss-empty {
    padding: 1rem;
    background: #f6f7f7;
    border: 1px solid #e2e4e7;
    border-radius: 8px;
}

.hss-grid {
    display: grid;
    grid-template-columns: repeat(var(--hss-cols), minmax(0, 1fr));
    gap: var(--hss-gap);
}

.hss-carousel {
    position: relative;
}

.hss-carousel-viewport {
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    padding: 2px;
    cursor: grab;
}

.hss-carousel-viewport::-webkit-scrollbar {
    height: 7px;
}

.hss-carousel-viewport::-webkit-scrollbar-thumb {
    background: #c7ced8;
    border-radius: 20px;
}

.hss-carousel-viewport.is-dragging {
    cursor: grabbing;
    user-select: none;
}

.hss-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - (var(--hss-gap) * var(--hss-carousel-full))) / (var(--hss-carousel-full) + var(--hss-carousel-peek)));
    gap: var(--hss-gap);
    padding-bottom: 6px;
}

.hss-item {
    min-width: 0;
}

.hss-card {
    border: 1.5px solid var(--hss-stroke);
    border-radius: 16px;
    background: var(--hss-white);
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    direction: rtl;
    font-family: peyda;
    transition: box-shadow 0.3s ease;
}

.hss-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-color: var(--hss-stroke);
}

.hss-thumb {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
    background: #f8f8f8;
    position: relative;
}

.hss-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hss-thumb-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.hss-content {
    padding: 8px 16px;
    display: flex;
    flex-direction: column;
    font-family: peyda;
}

.hss-title-link {
    text-decoration: none;
    color: inherit;
}

.hss-title {
    margin: 0 0 16px;
    color: var(--hss-dark);
    font-family: peyda;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 1.5;
    min-height: 3em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hss-meta {
    margin-top: auto;
    align-self: flex-end;
}

.hss-price-stack {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-family: peyda;
    align-items: flex-end;
}

.hss-price-row {
    display: inline-flex;
    align-items: center;
    flex-direction: row-reverse;
    gap: 4px;
    direction: ltr;
}

.hss-price-row .hss-price-value {
    direction: ltr;
    unicode-bidi: plaintext;
}

.hss-price-special {
    color: var(--hss-black);
    font-family: peyda;
    font-size: 18px;
    font-style: normal;
    font-weight: 600;
    line-height: 1;
}

.hss-price-special .hss-currency-icon {
    width: 16px;
    height: 16px;
    background-image: url("../img/toman.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    display: inline-block;
    flex: 0 0 16px;
}

.hss-price-regular {
    color: var(--hss-gray);
    text-decoration: line-through;
    font-family: peyda;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 1;
}

.hss-price-regular .hss-currency-icon {
    width: 14px;
    height: 14px;
    background-image: url("../img/toman-gray.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    display: inline-block;
    flex: 0 0 14px;
}

.hss-like-wrap {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 0;
    margin-top: 0;
}

.hss-like-button {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    background: var(--hss-white);
    color: var(--hss-dark);
    border-radius: 50%;
    padding: 10px 14px;
    font-size: 0;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.hss-like-button .hss-like-icon {
    width: 22px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 22px;
    position: relative;
}

.hss-like-button .like-icon-outline,
.hss-like-button .like-icon-filled {
    width: 22px;
    height: 18px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.hss-like-button .like-icon-outline {
    display: block;
    background-image: url("../img/like.svg");
}

.hss-like-button .like-icon-filled {
    display: none;
    background-image: url("../img/like-active.svg");
}

.hss-like-button.is-liked {
    color: var(--hss-white);
    background: var(--hss-orange);
}

.hss-like-button.is-liked,
.hss-like-button.active,
.hss-like-button:active {
    background-color: #FE5934 !important;
    border-color: #FE5934 !important;
}

.hss-like-button.is-liked .like-icon-outline,
.hss-like-button.active .like-icon-outline {
    display: none;
}

.hss-like-button.is-liked .like-icon-filled,
.hss-like-button.active .like-icon-filled {
    display: block;
    filter: brightness(0) invert(1);
}

.hss-like-button.is-loading {
    opacity: 0.65;
    pointer-events: none;
}

.hss-like-widget-button {
    width: auto;
    height: auto;
    border-radius: 999px;
    font-size: 13px;
    padding: 8px 14px;
    gap: 6px;
}

.hss-plp-filter {
    display: block;
    width: fit-content;
    margin: 0 auto 16px;
}

.hss-filter-dropdown {
    position: relative;
}

.hss-filter-summary {
    list-style: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: fit-content;
    max-width: 100%;
    padding: 16px;
    border-radius: 22px;
    border: 1px solid #DEDEDE;
    background: #F5F5F5;
    color: #8B8F94;
    cursor: pointer;
    user-select: none;
    min-width: 0;
}

.hss-filter-summary::-webkit-details-marker {
    display: none;
}

.hss-filter-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hss-filter-icon::before {
    content: "";
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
}

.hss-filter-text {
    font-size: 18px;
    font-weight: 500;
    line-height: 28px;
    direction: rtl;
    white-space: nowrap;
}

.hss-filter-dropdown[open] .hss-filter-icon::before {
    transform: rotate(-135deg) translateY(-1px);
}

.hss-plp-filter--product-type .hss-filter-summary {
    background: #243340;
    border-color: #243340;
    color: #FFFFFF;
}

.hss-filter-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 30;
    min-width: 100%;
    padding: 8px;
    background: #FFFFFF;
    border: 1px solid #E8E8E8;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.hss-plp-filter-buttons {
    display: grid;
    gap: 8px;
    justify-items: stretch;
}

.hss-plp-filter-btn {
    display: block;
    width: 100%;
    border: 1px solid #E6E6E6;
    border-radius: 12px;
    padding: 16px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    color: #2F3E46;
    text-decoration: none;
    background: #fff;
    text-align: center;
}

.hss-filter-menu .hss-plp-filter-btn:not(.is-active),
.hss-filter-menu .hss-plp-filter-btn:not(.is-active):link,
.hss-filter-menu .hss-plp-filter-btn:not(.is-active):visited,
.hss-filter-menu .hss-plp-filter-btn:not(.is-active):hover,
.hss-filter-menu .hss-plp-filter-btn:not(.is-active):focus {
    color: #000000 !important;
}

.hss-plp-filter-btn.is-active {
    background: #000000;
    color: #fff;
    border-color: #000000;
}

.hss-grid-pagination {
    margin-top: 20px;
    text-align: center;
}

.hss-grid-pagination-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.hss-grid-pagination-item a,
.hss-grid-pagination-item span {
    width: 40px;
    height: 40px;
    border-radius: 16px;
    background: var(--variable-collection-border, #E7E7E7);
    color: var(--variable-collection-sec, #2F3E46);
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    text-decoration: none;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}

.hss-grid-pagination-item.is-active a,
.hss-grid-pagination-item.is-active span,
.hss-grid-pagination-item .current {
    background: var(--variable-collection-color-pry, #000000);
    color: #FFFFFF;
}

.hss-grid-pagination-item .dots {
    background: transparent;
    width: auto;
    height: auto;
    border-radius: 0;
    font-size: 22px;
    color: var(--variable-collection-sec, #2F3E46);
}

.hss-grid-pagination-item a:hover {
    opacity: 0.8;
}

.hss-grid-pagination-item a:active {
    transform: scale(0.95);
}

/* Product Card Exact Overrides */
.product-card {
    padding: 0;
    border-radius: 16px;
    border: 1.5px solid #EDEDED;
    background-color: #FFFFFF;
    overflow: hidden;
    position: relative;
    direction: rtl;
    font-family: peyda;
    transition: box-shadow 0.3s ease;
}

.product-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-color: #EDEDED;
}

.product-card .product-image-wrapper {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: auto !important;
    margin: 0;
    padding: 0;
}

.product-card .hss-thumb {
    aspect-ratio: auto !important;
    height: auto;
}

.product-card .product-image-wrapper img {
    width: 100%;
    height: auto !important;
    display: block;
    object-fit: cover;
    border-radius: 16px 16px 0 0;
    margin: 0;
    padding: 0;
}

.product-card .like-button {
    position: static;
    top: auto;
    left: auto;
    width: 40px;
    height: 40px;
    padding: 10px 14px;
    border-radius: 50%;
    background-color: #FFFFFF;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 0;
}

.product-card .hss-like-wrap {
    top: 8px !important;
    left: 8px !important;
}

.product-card .like-button .hss-like-icon {
    width: 22px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.product-card .like-button .like-icon-outline {
    display: block;
    width: 22px;
    height: 18px;
    background-image: url("../img/like.svg") !important;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.product-card .like-button .like-icon-filled {
    display: none;
    width: 22px;
    height: 18px;
    background-image: url("../img/like-active.svg") !important;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.product-card .like-button.active,
.product-card .like-button.is-liked {
    background-color: #FE5934;
}

.product-card .like-button.active,
.product-card .like-button.is-liked,
.product-card .like-button:active {
    background-color: #FE5934 !important;
    border-color: #FE5934 !important;
}

.product-card .like-button.active .like-icon-outline,
.product-card .like-button.is-liked .like-icon-outline {
    display: none;
}

.product-card .like-button.active .like-icon-filled,
.product-card .like-button.is-liked .like-icon-filled {
    display: block;
    filter: brightness(0) invert(1);
}

.product-card .product-content {
    padding: 8px 16px;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    align-items: stretch;
}

.product-card .hss-meta {
    margin-top: auto !important;
    width: 100%;
    margin-left: auto !important;
    margin-right: 0 !important;
    align-self: auto;
    display: block;
    text-align: right;
}

.product-card .product-title {
    font-family: peyda;
    font-size: 16px;
    font-weight: 400;
    color: #2F3E46;
    margin: 0 0 16px 0;
    padding: 0;
    line-height: 1.5;
}

.product-card .product-prices {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    margin-top: 0;
    align-items: flex-end !important;
    align-self: auto !important;
}

.product-card .regular-price {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: flex-start !important;
    width: 100%;
    gap: 4px;
    direction: ltr;
    order: 1;
}

.product-card .regular-price .price-value {
    font-family: peyda;
    font-size: 16px;
    color: #7A7A7A;
    text-decoration: line-through;
    font-weight: 400;
    line-height: 1;
    font-variant-numeric: normal;
    font-feature-settings: "ss02" 1 !important;
}

.product-card .regular-price .toman-icon {
    width: 14px;
    height: 14px;
    min-width: 14px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-image: url("../img/toman-gray.svg") !important;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.product-card .sale-price {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: flex-start !important;
    width: 100%;
    gap: 4px;
    direction: ltr;
    order: 2;
}

.hss-like-button:hover,
.product-card .like-button:hover {
    transform: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

.product-card .sale-price .price-value {
    font-family: peyda;
    font-size: 18px;
    color: #1F1F1F;
    font-weight: 600;
    line-height: 1;
    font-variant-numeric: normal;
    font-feature-settings: "ss02" 1 !important;
}

.product-card .sale-price .toman-icon {
    width: 16px;
    height: 16px;
    min-width: 16px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-image: url("../img/toman.svg") !important;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.elementor-widget-container .product-card {
    margin: 0;
}

.elementor-widget-container .product-card .product-image-wrapper img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 1024px) {
    .hss-wrapper {
        --hss-cols: 3;
        --hss-carousel-full: 3;
        --hss-carousel-peek: 0.9;
    }
}

@media (min-width: 1025px) and (max-width: 1366px) {
    .hss-carousel-viewport {
        margin-left: 24px;
        margin-right: 24px;
    }
}

@media (max-width: 767px) {
    .hss-wrapper {
        --hss-cols: 2;
        --hss-gap: 8px;
        --hss-carousel-full: 1;
        --hss-carousel-peek: 0.9;
    }

    .product-card .product-content {
        padding: 8px 8px;
    }

    .product-card .like-button {
        width: 38px;
        height: 38px;
        min-width: 38px;
        min-height: 38px;
    }

    .product-card .like-button .hss-like-icon,
    .product-card .like-button .like-icon-outline,
    .product-card .like-button .like-icon-filled {
        width: 20px;
        height: 16px;
    }

    .product-card .product-title {
        font-size: 14px;
    }

    .product-card .regular-price .price-value {
        font-size: 14px;
    }

    .product-card .regular-price .toman-icon {
        width: 12px;
        height: 12px;
        min-width: 12px;
    }

    .product-card .sale-price .price-value {
        font-size: 16px;
    }

    .product-card .sale-price .toman-icon {
        width: 14px;
        height: 14px;
        min-width: 14px;
    }

    .hss-plp-filter {
        display: block;
        width: fit-content;
        max-width: calc(100vw - 24px);
        margin: 0 auto 12px;
    }

    .hss-filter-dropdown {
        width: 100%;
        max-width: 100%;
    }

    .hss-filter-summary {
        min-width: 0;
        width: 100%;
        max-width: 100%;
        justify-content: center;
        gap: 4px;
        padding: 8px;
        box-sizing: border-box;
        border-radius: 16px;
    }

    .hss-filter-icon {
        width: 22px;
        height: 22px;
    }

    .hss-filter-icon::before {
        width: 8px;
        height: 8px;
    }

    .hss-filter-text {
        font-size: 14px;
        line-height: 1.6;
        max-width: calc(100vw - 120px);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .hss-filter-menu {
        width: 100%;
        min-width: 100%;
        box-sizing: border-box;
    }

    .hss-plp-filter-btn {
        width: 100%;
        padding: 8px;
        font-size: 13px;
        box-sizing: border-box;
    }

    .hss-grid-pagination-list {
        gap: 8px;
    }

    .hss-grid-pagination-item a,
    .hss-grid-pagination-item span {
        width: 40px;
        height: 40px;
        border-radius: 16px;
        font-size: 14px;
    }

    .hss-grid-pagination-item .dots {
        font-size: 22px;
    }

}

/* Desktop/Laptop final overrides */
@media (min-width: 768px) {
    .hss-wrapper .hss-carousel-viewport {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
}


