/* Hezar Fish Product Cards — custom WooCommerce shop v2.0 */
body:has(.hfp-shop-section) {
    overflow-x: hidden;
}

body.hfp-shop-drawer-open {
    overflow: hidden;
}

.hfp-shop-page {
    --hfp-shop-container: 1240px;
    --hfp-shop-sidebar: 260px;
    --hfp-shop-gap: 20px;
    --hfp-shop-cols: 3;
    --hfp-shop-cols-tablet: 2;
    --hfp-shop-cols-mobile: 2;
    --hfp-shop-radius: 16px;
    --hfp-shop-font: 'IRANSansX','Vazirmatn',Tahoma,sans-serif;
    --hfp-shop-navy: #002E5D;
    --hfp-shop-navy-50: #F0F6FC;
    --hfp-shop-navy-700: #002851;
    --hfp-shop-gold: #E1AD01;
    --hfp-shop-teal: #00555A;
    --hfp-shop-line: #E4E9EE;
    --hfp-shop-ink: #20262C;
    width: 100%;
    direction: rtl;
    color: var(--hfp-shop-ink);
    background: #fff;
    font-family: var(--hfp-shop-font);
    -webkit-font-smoothing: antialiased;
}

.hfp-shop-page *,
.hfp-shop-page *::before,
.hfp-shop-page *::after {
    box-sizing: border-box;
}

.hfp-shop-page button,
.hfp-shop-page select,
.hfp-shop-page input {
    font-family: inherit;
}

.hfp-shop-page :focus-visible {
    outline: 2px solid var(--hfp-shop-gold);
    outline-offset: 3px;
}

.hfp-shop-container {
    width: min(100% - 48px, var(--hfp-shop-container));
    margin-inline: auto;
}

.hfp-shop-head {
    padding-top: 34px;
}

.hfp-shop-breadcrumb,
.hfp-shop-breadcrumb .woocommerce-breadcrumb {
    margin: 0 0 10px !important;
    color: #8A96A0 !important;
    font-size: 13px !important;
    line-height: 1.8;
}

.hfp-shop-head h1 {
    margin: 0;
    color: var(--hfp-shop-navy-700);
    font-size: clamp(26px, 3.2vw, 36px);
    font-weight: 800;
    line-height: 1.35;
}

.hfp-shop-head p {
    max-width: 620px;
    margin: 8px 0 0;
    color: #5C6A76;
    font-size: 14.5px;
    line-height: 1.9;
}

.hfp-shop-layout {
    display: grid;
    grid-template-columns: var(--hfp-shop-sidebar) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
    padding-top: 28px;
    padding-bottom: 90px;
}

.hfp-shop-sidebar {
    position: sticky;
    top: 92px;
    z-index: 8;
    display: flex;
    flex-direction: column;
    gap: 22px;
    min-width: 0;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--hfp-shop-line);
    border-radius: var(--hfp-shop-radius);
}

.hfp-shop-sidebar__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hfp-shop-sidebar__head h2 {
    margin: 0;
    color: var(--hfp-shop-navy-700);
    font-size: 16px;
    font-weight: 800;
}

.hfp-shop-sidebar__close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    color: var(--hfp-shop-navy-700);
    font-size: 26px;
    line-height: 1;
    background: var(--hfp-shop-navy-50);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.hfp-shop-filter-group h3 {
    margin: 0 0 12px;
    color: var(--hfp-shop-navy-700);
    font-size: 13.5px;
    font-weight: 800;
    line-height: 1.6;
}

.hfp-shop-categories {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hfp-shop-categories button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 44px;
    padding: 9px 10px;
    color: var(--hfp-shop-ink);
    font-size: 14px;
    text-align: right;
    background: transparent;
    border: 0;
    border-radius: 9px;
    cursor: pointer;
    transition: color .16s ease, background-color .16s ease;
}

.hfp-shop-categories button:hover {
    background: var(--hfp-shop-navy-50);
}

.hfp-shop-categories button.is-active {
    color: #fff;
    font-weight: 700;
    background: var(--hfp-shop-navy);
}

.hfp-shop-categories button b {
    flex: none;
    min-width: 24px;
    opacity: .72;
    font-size: 12px;
    font-weight: 500;
    text-align: left;
}

.hfp-shop-select,
.hfp-shop-sort select {
    width: 100%;
    min-height: 45px;
    padding: 8px 12px;
    color: var(--hfp-shop-ink);
    font-size: 13.5px;
    background: #fff;
    border: 1.5px solid var(--hfp-shop-line);
    border-radius: 10px;
    box-shadow: none;
    cursor: pointer;
}

.hfp-shop-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hfp-shop-chips button {
    min-height: 37px;
    padding: 7px 13px;
    color: var(--hfp-shop-ink);
    font-size: 13px;
    line-height: 1.35;
    background: #fff;
    border: 1.5px solid var(--hfp-shop-line);
    border-radius: 999px;
    cursor: pointer;
    transition: color .16s ease, background-color .16s ease, border-color .16s ease;
}

.hfp-shop-chips button:hover,
.hfp-shop-chips button.is-active {
    color: var(--hfp-shop-navy-700);
    font-weight: 700;
    background: var(--hfp-shop-navy-50);
    border-color: var(--hfp-shop-navy);
}

.hfp-shop-clear {
    align-self: flex-start;
    padding: 0;
    color: var(--hfp-shop-navy-700);
    font-size: 13px;
    text-decoration: underline;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.hfp-shop-drawer-actions {
    display: none;
}

.hfp-shop-drawer-scrim {
    display: none;
}

.hfp-shop-main {
    min-width: 0;
}

.hfp-shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 46px;
    margin-bottom: 18px;
}

.hfp-shop-result-count {
    color: #5C6A76;
    font-size: 13.5px;
}

.hfp-shop-toolbar__actions,
.hfp-shop-sort {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hfp-shop-sort {
    color: var(--hfp-shop-ink);
    font-size: 13.5px;
}

.hfp-shop-sort select {
    width: 180px;
}

.hfp-shop-mobile-filter {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 43px;
    padding: 8px 14px;
    color: var(--hfp-shop-navy-700);
    font-size: 13px;
    font-weight: 700;
    background: #fff;
    border: 1.5px solid var(--hfp-shop-line);
    border-radius: 10px;
    cursor: pointer;
}

.hfp-shop-mobile-filter svg {
    width: 17px;
    height: 17px;
}

.hfp-shop-products {
    position: relative;
    --hfp-card-width: auto;
}

.hfp-shop-products .hfp-shop-grid,
.hfp-shop-products.hfp-products--grid .hfp-products__track {
    display: grid !important;
    grid-template-columns: repeat(var(--hfp-shop-cols), minmax(0, 1fr)) !important;
    gap: var(--hfp-shop-gap) !important;
    transform: none !important;
    transition: none !important;
}

.hfp-shop-card {
    min-width: 0;
    height: 100%;
    border-color: var(--hfp-shop-line) !important;
    border-radius: var(--hfp-shop-radius) !important;
}

.hfp-shop-page .hfp-shop-card .hfp-card__media {
    width: 100%;
    height: auto !important;
    aspect-ratio: 1 / 1;
    background: linear-gradient(160deg, #EAF1F7, #F6F9FC) !important;
}

.hfp-shop-page .hfp-shop-card .hfp-card__image,
.hfp-shop-page .hfp-shop-card .hfp-card__image img {
    width: 100%;
    height: 100%;
}

.hfp-shop-page .hfp-shop-card .hfp-card__image img {
    object-fit: cover;
}

.hfp-shop-page .hfp-shop-card .hfp-card__content {
    min-height: 200px;
    padding: 16px;
}

.hfp-shop-card__category {
    margin-bottom: 3px;
    color: var(--hfp-shop-teal);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.6;
}

.hfp-shop-card__category a {
    color: inherit;
}

.hfp-shop-page .hfp-shop-card .hfp-card__title {
    margin-bottom: 5px;
    color: var(--hfp-shop-navy-700);
    font-size: 15.5px;
    line-height: 1.7;
}

.hfp-shop-page .hfp-shop-card .hfp-card__meta {
    color: #8A96A0;
    font-size: 12px;
}

.hfp-shop-page .hfp-shop-card .hfp-card__rating-row {
    margin: 2px 0 8px;
}

.hfp-shop-page .hfp-shop-card .hfp-card__footer {
    min-height: 42px;
    padding-inline-end: 46px;
}

.hfp-shop-page .hfp-shop-card .hfp-card__price {
    color: var(--hfp-shop-navy-700);
    font-size: 15.5px;
    font-weight: 800;
}

.hfp-shop-page .hfp-shop-card .hfp-card__add {
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    bottom: 16px !important;
    border-radius: 50% !important;
    aspect-ratio: 1 / 1 !important;
    background: var(--hfp-shop-navy) !important;
}

.hfp-shop-page .hfp-shop-card .hfp-card__add:hover {
    color: var(--hfp-shop-navy-700) !important;
    background: var(--hfp-shop-gold) !important;
}

.hfp-shop-page .hfp-shop-card .hfp-card__add svg {
    width: 18px !important;
    height: 18px !important;
}

.hfp-shop-page .hfp-shop-card .hfp-card__wishlist {
    width: 32px !important;
    height: 32px !important;
    top: 9px !important;
    left: 9px !important;
    right: auto !important;
}

.hfp-shop-page .hfp-shop-card .hfp-card__wishlist svg {
    width: 16px !important;
    height: 16px !important;
}

.hfp-shop-page .hfp-shop-card .hfp-card__badge {
    top: 10px !important;
    right: 10px !important;
    left: auto !important;
    padding: 5px 11px !important;
    color: #001526 !important;
    font-size: 10.5px !important;
    background: var(--hfp-shop-gold) !important;
}

.hfp-shop-page .hfp-shop-card .hfp-card__badge.is-low-stock {
    color: #fff !important;
    background: var(--hfp-shop-teal) !important;
}

.hfp-shop-loading {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding-top: 90px;
    color: var(--hfp-shop-navy-700);
    font-size: 13px;
    background: rgba(255,255,255,.78);
    backdrop-filter: blur(2px);
    border-radius: var(--hfp-shop-radius);
}

.hfp-shop-loading[hidden] {
    display: none !important;
}

.hfp-shop-loading span {
    width: 34px;
    height: 34px;
    border: 3px solid var(--hfp-shop-navy-50);
    border-top-color: var(--hfp-shop-navy);
    border-radius: 50%;
    animation: hfp-shop-spin .7s linear infinite;
}

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

.hfp-shop-empty {
    grid-column: 1 / -1;
    padding: 70px 20px;
    color: #5C6A76;
    text-align: center;
    border: 1px dashed var(--hfp-shop-line);
    border-radius: var(--hfp-shop-radius);
}

.hfp-shop-empty h3 {
    margin: 0 0 8px;
    color: var(--hfp-shop-navy-700);
    font-size: 19px;
}

.hfp-shop-empty p {
    margin: 0;
}

.hfp-shop-empty button {
    margin-top: 16px;
    padding: 10px 18px;
    color: #fff;
    font-weight: 700;
    background: var(--hfp-shop-navy);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
}

.hfp-shop-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 44px;
}

.hfp-shop-pagination button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    color: var(--hfp-shop-ink);
    font-size: 14px;
    background: #fff;
    border: 1px solid var(--hfp-shop-line);
    border-radius: 10px;
    cursor: pointer;
}

.hfp-shop-pagination button:hover,
.hfp-shop-pagination button.is-active {
    color: #fff;
    background: var(--hfp-shop-navy);
    border-color: var(--hfp-shop-navy);
}

/* هماهنگی پاپ‌آپ‌ها با تم فروشگاه */
.hfp-shop-page .hfp-variation-modal,
.hfp-shop-page .hfp-cart-modal {
    font-family: var(--hfp-shop-font);
}

.hfp-shop-page .hfp-variation-modal__dialog,
.hfp-shop-page .hfp-cart-modal__dialog {
    border-radius: calc(var(--hfp-shop-radius) + 4px);
}

@media (max-width: 1100px) {
    .hfp-shop-layout {
        grid-template-columns: 235px minmax(0, 1fr);
        gap: 24px;
    }

    .hfp-shop-products .hfp-shop-grid,
    .hfp-shop-products.hfp-products--grid .hfp-products__track {
        grid-template-columns: repeat(var(--hfp-shop-cols-tablet), minmax(0, 1fr)) !important;
    }
}

@media (max-width: 900px) {
    .hfp-shop-container {
        width: min(100% - 32px, var(--hfp-shop-container));
    }

    .hfp-shop-layout {
        display: block;
        padding-top: 20px;
        padding-bottom: 70px;
    }

    .hfp-shop-sidebar {
        position: fixed;
        inset: auto 0 0 0;
        z-index: 99992;
        display: flex;
        width: 100%;
        max-height: min(82vh, 760px);
        overflow-y: auto;
        padding: 18px 18px 0;
        border: 0;
        border-radius: 22px 22px 0 0;
        box-shadow: 0 -18px 50px rgba(0,21,38,.18);
        transform: translateY(105%);
        visibility: hidden;
        transition: transform .26s ease, visibility .26s ease;
    }

    .hfp-shop-page.is-drawer-open .hfp-shop-sidebar {
        transform: translateY(0);
        visibility: visible;
    }

    .hfp-shop-sidebar__close {
        display: inline-flex;
    }

    .hfp-shop-drawer-scrim {
        position: fixed;
        inset: 0;
        z-index: 99991;
        display: block;
        background: rgba(0,21,38,.55);
        opacity: 0;
        visibility: hidden;
        transition: opacity .2s ease, visibility .2s ease;
    }

    .hfp-shop-page.is-drawer-open .hfp-shop-drawer-scrim {
        opacity: 1;
        visibility: visible;
    }

    .hfp-shop-drawer-actions {
        position: sticky;
        bottom: 0;
        display: block;
        margin: 0 -18px;
        padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
        background: #fff;
        border-top: 1px solid var(--hfp-shop-line);
    }

    .hfp-shop-drawer-actions button {
        width: 100%;
        min-height: 48px;
        color: #fff;
        font-size: 14px;
        font-weight: 800;
        background: var(--hfp-shop-navy);
        border: 0;
        border-radius: 12px;
    }

    .hfp-shop-mobile-filter {
        display: inline-flex;
    }

    .hfp-shop-toolbar {
        align-items: flex-start;
    }

    .hfp-shop-result-count {
        padding-top: 11px;
    }

    .hfp-shop-products .hfp-shop-grid,
    .hfp-shop-products.hfp-products--grid .hfp-products__track {
        grid-template-columns: repeat(var(--hfp-shop-cols-tablet), minmax(0, 1fr)) !important;
    }
}

@media (max-width: 600px) {
    .hfp-shop-head {
        padding-top: 22px;
    }

    .hfp-shop-head h1 {
        font-size: 25px;
    }

    .hfp-shop-head p {
        font-size: 13.5px;
    }

    .hfp-shop-toolbar {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .hfp-shop-result-count {
        order: 2;
        padding-top: 0;
    }

    .hfp-shop-toolbar__actions {
        justify-content: space-between;
        width: 100%;
    }

    .hfp-shop-sort {
        flex: 1;
    }

    .hfp-shop-sort span {
        display: none;
    }

    .hfp-shop-sort select {
        width: 100%;
        min-width: 0;
    }

    .hfp-shop-products .hfp-shop-grid,
    .hfp-shop-products.hfp-products--grid .hfp-products__track {
        grid-template-columns: repeat(var(--hfp-shop-cols-mobile), minmax(0, 1fr)) !important;
        gap: 14px !important;
    }

    .hfp-shop-page .hfp-shop-card .hfp-card__content {
        min-height: 176px;
        padding: 13px;
    }

    .hfp-shop-page .hfp-shop-card .hfp-card__title {
        font-size: 14px;
        line-height: 1.65;
    }

    .hfp-shop-card__category {
        font-size: 10px;
    }

    .hfp-shop-page .hfp-shop-card .hfp-card__meta {
        font-size: 10.5px;
    }

    .hfp-shop-page .hfp-shop-card .hfp-card__price {
        font-size: 14px;
    }

    .hfp-shop-page .hfp-shop-card .hfp-card__footer {
        min-height: 38px;
        padding-inline-end: 41px;
    }

    .hfp-shop-page .hfp-shop-card .hfp-card__add {
        width: 34px !important;
        min-width: 34px !important;
        max-width: 34px !important;
        height: 34px !important;
        min-height: 34px !important;
        max-height: 34px !important;
        bottom: 13px !important;
        left: 13px !important;
    }

    .hfp-shop-page .hfp-shop-card .hfp-card__wishlist {
        width: 29px !important;
        height: 29px !important;
    }

    .hfp-shop-page .hfp-shop-card .hfp-card__badge {
        max-width: calc(100% - 56px);
        overflow: hidden;
        padding: 4px 8px !important;
        font-size: 9px !important;
        text-overflow: ellipsis;
    }
}

@media (max-width: 420px) {
    .hfp-shop-container {
        width: min(100% - 22px, var(--hfp-shop-container));
    }

    .hfp-shop-products .hfp-shop-grid,
    .hfp-shop-products.hfp-products--grid .hfp-products__track {
        grid-template-columns: 1fr !important;
    }

    .hfp-shop-page .hfp-shop-card .hfp-card__content {
        min-height: 184px;
        padding: 15px;
    }

    .hfp-shop-page .hfp-shop-card .hfp-card__title {
        font-size: 16px;
    }

    .hfp-shop-page .hfp-shop-card .hfp-card__meta {
        font-size: 12px;
    }

    .hfp-shop-page .hfp-shop-card .hfp-card__price {
        font-size: 15.5px;
    }
}

/* Elementor section mode */
.hfp-shop-section.hfp-shop-layout{width:100%;margin:0;padding-top:0;}
.elementor-widget-hfp-shop-section{width:100%;}

/* ===== v2.2.0: hierarchical category filters, Persian digits and compact cards ===== */
.hfp-shop-filter-group--categories > h3,
.hfp-shop-category-parent {
    color: var(--hfp-shop-navy-700);
    font-size: 13.5px;
    font-weight: 800;
    line-height: 1.6;
}

.hfp-shop-category-branch {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hfp-shop-category-parent {
    margin: 10px 10px 3px;
}

.hfp-shop-category-children {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hfp-shop-category-children--nested {
    margin-top: 2px;
}

.hfp-shop-categories .hfp-shop-category-option {
    padding-inline-start: calc(10px + (var(--hfp-cat-depth, 0) * 12px));
}

.hfp-shop-categories .hfp-shop-category-all {
    margin-bottom: 2px;
}

.hfp-shop-page,
.hfp-shop-page button,
.hfp-shop-page select,
.hfp-shop-page option,
.hfp-shop-page .hfp-card__price,
.hfp-shop-page .hfp-card__meta,
.hfp-shop-page .hfp-shop-result-count {
    font-variant-numeric: normal;
}

/* Cards in the shop grid should end immediately after the price row. */
.hfp-shop-products .hfp-shop-grid,
.hfp-shop-products.hfp-products--grid .hfp-products__track {
    align-items: start !important;
}

.hfp-shop-page .hfp-shop-card {
    align-self: start !important;
    height: auto !important;
}

.hfp-shop-page .hfp-shop-card .hfp-card__content {
    flex: 0 0 auto !important;
    min-height: 0 !important;
    padding: 16px !important;
}

.hfp-shop-page .hfp-shop-card .hfp-card__footer {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    min-height: 36px !important;
    margin-top: 8px !important;
    padding: 0 !important;
    gap: 12px;
}

.hfp-shop-page .hfp-shop-card .hfp-card__footer .hfp-card__add,
.hfp-shop-page .hfp-shop-card .hfp-card__footer > a.hfp-card__add.button,
.hfp-shop-page .hfp-shop-card .hfp-card__footer > button.hfp-card__add.button {
    position: static !important;
    inset: auto !important;
    flex: 0 0 36px !important;
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    padding: 0 !important;
    margin: 0 !important;
    color: #fff !important;
    background: var(--hfp-shop-navy) !important;
    border: 0 !important;
    border-radius: 50% !important;
    aspect-ratio: 1 / 1 !important;
    box-shadow: none !important;
}

.hfp-shop-page .hfp-shop-card .hfp-card__footer .hfp-card__add:hover {
    color: var(--hfp-shop-navy-700) !important;
    background: var(--hfp-shop-gold) !important;
}

.hfp-shop-page .hfp-shop-card .hfp-card__price {
    min-width: 0;
}

@media (min-width: 901px) {
    .hfp-shop-sidebar > .hfp-shop-sidebar__close {
        display: none !important;
    }
}

@media (max-width: 900px) {
    .hfp-shop-sidebar > .hfp-shop-sidebar__close {
        position: absolute;
        top: 14px;
        left: 14px;
        z-index: 2;
    }

    .hfp-shop-sidebar {
        padding-top: 24px;
    }

    .hfp-shop-filter-group--categories {
        padding-top: 4px;
    }
}

@media (max-width: 600px) {
    .hfp-shop-page .hfp-shop-card .hfp-card__content {
        min-height: 0 !important;
        padding: 13px !important;
    }

    .hfp-shop-page .hfp-shop-card .hfp-card__footer {
        min-height: 34px !important;
        margin-top: 7px !important;
    }

    .hfp-shop-page .hfp-shop-card .hfp-card__footer .hfp-card__add,
    .hfp-shop-page .hfp-shop-card .hfp-card__footer > a.hfp-card__add.button,
    .hfp-shop-page .hfp-shop-card .hfp-card__footer > button.hfp-card__add.button {
        flex-basis: 34px !important;
        width: 34px !important;
        min-width: 34px !important;
        max-width: 34px !important;
        height: 34px !important;
        min-height: 34px !important;
        max-height: 34px !important;
    }
}

@media (max-width: 420px) {
    .hfp-shop-page .hfp-shop-card .hfp-card__content {
        min-height: 0 !important;
        padding: 15px !important;
    }
}
