/* ==========================================================================
   Single product page
   Layout: gallery | summary | buy box   (template: woocommerce/content-single-product.php)
   ========================================================================== */

:root {
    --hc-page: #f4f5f9;
    --hc-surface: #fff;
    --hc-surface-soft: #f7f8fb;
    --hc-border: #ebecf2;
    --hc-border-strong: #d9dbe5;
    --hc-text: var(--second);
    --hc-muted: #6b6a7e;
    --hc-subtle: #a2a1b2;
    --hc-primary: var(--main);
    --hc-primary-hover: #e4430e;
    --hc-primary-soft: #fff1ec;
    --hc-success: #12855a;
    --hc-success-soft: #e8f7f0;
    --hc-warning: #c26a00;
    --hc-warning-soft: #fff5e6;
    --hc-danger: #cc2b2b;
    --hc-danger-soft: #fdeeee;
    --hc-radius-lg: 20px;
    --hc-radius: 14px;
    --hc-radius-sm: 10px;
    --hc-shadow: 0 1px 2px rgba(22, 16, 50, .04), 0 6px 24px -8px rgba(22, 16, 50, .08);
    --hc-shadow-lg: 0 2px 4px rgba(22, 16, 50, .04), 0 18px 40px -12px rgba(22, 16, 50, .16);
    --hc-gap: 20px;
    --hc-sticky-top: 20px;
    --hc-display: Kalameh, yekan, sans-serif;
    /* اعداد با فونت یکان (ارقام فارسی) */
    --hc-numeric: yekan, sans-serif;
}

body.single-product main {
    background: var(--hc-page);
}

.hc-single {
    color: var(--hc-text);
}

.hc-single *:focus-visible {
    outline: 2px solid var(--hc-primary);
    outline-offset: 2px;
}

.hc-single [hidden] {
    display: none !important;
}

.hc-card,
.hc-product__top,
.hc-key-attrs,
.hc-single .hc-product.product .woocommerce-tabs {
    border: 1px solid var(--hc-border);
    border-radius: var(--hc-radius-lg);
    background: var(--hc-surface);
    box-shadow: var(--hc-shadow);
}

/* ---------------------------------------------------------------- Shared elements */
.hc-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    font-family: var(--hc-display);
    font-size: 1rem;
    font-weight: bold;
    color: var(--hc-text);
}

.hc-heading::before {
    content: '';
    width: 4px;
    height: 18px;
    border-radius: 4px;
    background: var(--hc-primary);
}

.hc-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--hc-primary);
    font-size: .8125rem;
    font-weight: bold;
}

.hc-link:hover {
    color: var(--hc-primary-hover);
}

.hc-btn,
.hc-single .hc-product.product form.cart .single_add_to_cart_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 50px;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: var(--hc-radius);
    font-family: yekan, sans-serif;
    font-size: .9375rem;
    font-weight: bold;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color .2s, box-shadow .2s, transform .2s, opacity .2s, color .2s;
}

.hc-btn--primary,
.hc-single .hc-product.product form.cart .single_add_to_cart_button {
    background: linear-gradient(135deg, #ff6a33 0%, var(--hc-primary) 55%, #ec4511 100%);
    color: #fff;
    box-shadow: 0 10px 22px -10px rgba(249, 80, 25, .75);
}

.hc-btn--primary:hover,
.hc-single .hc-product.product form.cart .single_add_to_cart_button:hover {
    background: var(--hc-primary-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 14px 26px -10px rgba(249, 80, 25, .8);
}

.hc-single .hc-product.product form.cart .single_add_to_cart_button::before {
    content: '';
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4h2l2.2 10.2a1.5 1.5 0 0 0 1.5 1.2h8.6a1.5 1.5 0 0 0 1.5-1.1L20.5 8H6.2'/%3E%3Ccircle cx='9.5' cy='19.5' r='1.3'/%3E%3Ccircle cx='17' cy='19.5' r='1.3'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4h2l2.2 10.2a1.5 1.5 0 0 0 1.5 1.2h8.6a1.5 1.5 0 0 0 1.5-1.1L20.5 8H6.2'/%3E%3Ccircle cx='9.5' cy='19.5' r='1.3'/%3E%3Ccircle cx='17' cy='19.5' r='1.3'/%3E%3C/svg%3E") center / contain no-repeat;
}

.hc-single .hc-product.product form.cart .single_add_to_cart_button.disabled,
.hc-single .hc-product.product form.cart .single_add_to_cart_button:disabled {
    background: #f8b8a2;
    box-shadow: none;
    transform: none;
    opacity: 1;
    cursor: not-allowed;
}

.hc-single .hc-product.product form.cart .single_add_to_cart_button.loading {
    opacity: .75;
}

.hc-single .hc-product.product form.cart .single_add_to_cart_button.loading::after {
    position: static;
    margin: 0;
}

.hc-btn--outline {
    border-color: var(--hc-primary);
    background: transparent;
    color: var(--hc-primary);
}

.hc-btn--outline:hover {
    background: var(--hc-primary);
    color: #fff;
}

.hc-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--hc-border);
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: var(--hc-muted);
    box-shadow: 0 2px 8px rgba(22, 16, 50, .06);
    cursor: pointer;
    transition: color .2s, border-color .2s, transform .2s;
}

.hc-icon-btn:hover,
.hc-icon-btn.added {
    border-color: var(--hc-primary);
    color: var(--hc-primary);
    transform: scale(1.05);
}

.hc-icon-btn.added svg path {
    fill: var(--hc-primary);
}

/* ---------------------------------------------------------------- Breadcrumb */
.hc-single .hc-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    margin: 0 0 18px;
    font-size: .8125rem;
    color: var(--hc-subtle);
}

.hc-single .hc-breadcrumb a {
    color: var(--hc-muted);
    transition: color .2s;
}

.hc-single .hc-breadcrumb a:hover {
    color: var(--hc-primary);
}

.hc-breadcrumb__sep {
    font-size: 0;
}

.hc-breadcrumb__sep::before {
    content: '‹';
    font-size: 1rem;
    color: var(--hc-border-strong);
}

/* ---------------------------------------------------------------- Notices */
.hc-single .woocommerce-notices-wrapper:not(:empty) {
    margin-bottom: 18px;
}

.hc-single .woocommerce-message,
.hc-single .woocommerce-error,
.hc-single .woocommerce-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 12px;
    padding: 12px 18px;
    border: 1px solid #c9ecdb;
    border-radius: var(--hc-radius);
    background: var(--hc-success-soft);
    color: var(--hc-success);
    font-size: .875rem;
}

.hc-single .woocommerce-error {
    border-color: #f5cccc;
    background: var(--hc-danger-soft);
    color: var(--hc-danger);
    list-style: none;
}

.hc-single .woocommerce-info {
    border-color: var(--hc-border);
    background: var(--hc-surface);
    color: var(--hc-text);
}

.hc-single .woocommerce-message::before,
.hc-single .woocommerce-error::before,
.hc-single .woocommerce-info::before {
    content: none;
}

.hc-single .woocommerce-message .button,
.hc-single .woocommerce-error .button,
.hc-single .woocommerce-info .button {
    order: 2;
    float: none;
    padding: 6px 16px;
    border-radius: var(--hc-radius-sm);
    background: var(--hc-success);
    color: #fff;
    font-size: .8125rem;
}

/* ---------------------------------------------------------------- Layout */
.hc-single .hc-product.product {
    margin: 0;
}

/* بخش بالا: یک کارت واحد شامل گالری و ستون محصول */
.hc-product__top {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    padding: 28px;
}

.hc-single .hc-product.product div.images,
.hc-single .hc-product.product div.summary {
    float: none;
    width: 100%;
    margin: 0;
}

@media (min-width: 992px) {
    .hc-product__top {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 40px;
        padding: 32px;
    }
}

@media (min-width: 1200px) {
    .hc-product__top {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
        gap: 48px;
    }
}

/* ---------------------------------------------------------------- Gallery */
.hc-product__gallery {
    --hc-thumb: 76px;
    --hc-thumbs-h: calc(var(--hc-thumb) + 18px);
    position: relative;
    min-width: 0;
}

.hc-product__actions {
    position: absolute;
    top: 14px;
    inset-inline-start: 14px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hc-single .hc-product.product div.images {
    position: relative;
    opacity: 1 !important;
}

.hc-single .hc-product.product div.images .flex-viewport,
.hc-single .hc-product.product div.images > .woocommerce-product-gallery__wrapper {
    border: 1px solid var(--hc-border);
    border-radius: var(--hc-radius-lg);
    background: #fff;
}

.hc-single .hc-product.product div.images .woocommerce-product-gallery__wrapper {
    margin: 0;
}

.hc-single .hc-product.product div.images .woocommerce-product-gallery__image a {
    display: block;
    cursor: zoom-in;
}

.hc-single .hc-product.product div.images .woocommerce-product-gallery__image img {
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 5%;
    object-fit: contain;
}

/* ذره‌بین (لایت‌باکس) */
.hc-single .hc-product.product div.images .woocommerce-product-gallery__trigger {
    top: 14px;
    right: auto;
    bottom: auto;
    left: 14px;
    z-index: 10;
    width: 42px;
    height: 42px;
    border: 1px solid var(--hc-border);
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 2px 8px rgba(22, 16, 50, .06);
    font-size: 0;
}

.hc-single .hc-product.product div.images .woocommerce-product-gallery__trigger::before {
    top: 11px;
    left: 11px;
    border-color: var(--hc-muted);
}

.hc-single .hc-product.product div.images .woocommerce-product-gallery__trigger::after {
    top: 23px;
    left: 25px;
    background: var(--hc-muted);
}

/* فلش‌های قبلی/بعدی */
.hc-single .hc-product.product div.images .flex-direction-nav {
    margin: 0;
    padding: 0;
    list-style: none;
}

.hc-single .hc-product.product div.images .flex-direction-nav a {
    position: absolute;
    top: calc((100% - var(--hc-thumbs-h)) / 2);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    border: 1px solid var(--hc-border);
    border-radius: 50%;
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 4px 14px rgba(22, 16, 50, .1);
    color: var(--hc-text);
    font-size: 0;
    opacity: 0;
    transition: opacity .2s, color .2s, border-color .2s;
}

.hc-single .hc-product.product div.images .flex-direction-nav a::before {
    content: '';
    width: 10px;
    height: 10px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
}

/* RTL: «قبلی» سمت راست، «بعدی» سمت چپ */
.hc-single .hc-product.product div.images .flex-direction-nav .flex-prev {
    right: 14px;
}

.hc-single .hc-product.product div.images .flex-direction-nav .flex-prev::before {
    transform: translateX(-2px) rotate(45deg);
}

.hc-single .hc-product.product div.images .flex-direction-nav .flex-next {
    left: 14px;
}

.hc-single .hc-product.product div.images .flex-direction-nav .flex-next::before {
    transform: translateX(2px) rotate(-135deg);
}

.hc-single .hc-product.product div.images:hover .flex-direction-nav a {
    opacity: 1;
}

.hc-single .hc-product.product div.images .flex-direction-nav a:hover {
    border-color: var(--hc-primary);
    color: var(--hc-primary);
}

.hc-single .hc-product.product div.images .flex-direction-nav a.flex-disabled {
    opacity: 0 !important;
    pointer-events: none;
}

/* شمارنده‌ی تصویر */
.hc-gallery-counter {
    position: absolute;
    bottom: calc(var(--hc-thumbs-h) + 14px);
    left: 14px;
    z-index: 10;
    padding: 2px 12px;
    border-radius: 999px;
    background: rgba(22, 16, 50, .65);
    color: #fff;
    font-size: .75rem;
    line-height: 1.9;
    pointer-events: none;
}

/* تصاویر کوچک */
.hc-single .hc-product.product div.images .flex-control-thumbs {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin: 16px 0 0;
    padding: 2px 2px 0;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none;
}

.hc-single .hc-product.product div.images .flex-control-thumbs::-webkit-scrollbar {
    display: none;
}

.hc-single .hc-product.product div.images .flex-control-thumbs li {
    flex: 0 0 var(--hc-thumb);
    float: none;
    width: var(--hc-thumb);
    margin: 0;
}

.hc-single .hc-product.product div.images .flex-control-thumbs li img {
    width: var(--hc-thumb);
    height: var(--hc-thumb) !important;
    padding: 6px;
    border: 1.5px solid var(--hc-border);
    border-radius: var(--hc-radius);
    background: #fff;
    object-fit: contain;
    opacity: .6;
    cursor: pointer;
    transition: opacity .2s, border-color .2s, box-shadow .2s;
}

.hc-single .hc-product.product div.images .flex-control-thumbs li img:hover {
    opacity: 1;
}

.hc-single .hc-product.product div.images .flex-control-thumbs li img.flex-active {
    border-color: var(--hc-primary);
    box-shadow: 0 0 0 3px var(--hc-primary-soft);
    opacity: 1;
}

/* ---------------------------------------------------------------- Product column */
.hc-product__summary {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.hc-product__eyebrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: .8125rem;
}

.hc-product__eyebrow a {
    padding: 2px 12px;
    border-radius: 999px;
    background: var(--hc-primary-soft);
    color: var(--hc-primary);
    font-weight: bold;
}

.hc-product__eyebrow > span {
    display: none;
}

.hc-product__eyebrow a:nth-of-type(2) {
    background: var(--hc-surface-soft);
    color: var(--hc-muted);
}

.hc-single .hc-product.product .product_title {
    margin: 0 0 12px;
    font-family: var(--hc-display);
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1.7;
    color: var(--hc-text);
}

.hc-product__subline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    margin: 0 0 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--hc-border);
    font-size: .8125rem;
    color: var(--hc-subtle);
}

.hc-single .hc-product.product .hc-product__subline .woocommerce-product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    line-height: 1;
}

.hc-single .hc-product.product .woocommerce-product-rating .star-rating {
    float: none;
    margin: 0;
}

.hc-single .hc-product.product .woocommerce-review-link {
    color: var(--hc-muted);
}

.hc-single .hc-product.product .woocommerce-review-link:hover {
    color: var(--hc-primary);
}

.hc-product__subline > * + *::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    margin-inline-end: 18px;
    border-radius: 50%;
    background: var(--hc-border-strong);
    vertical-align: middle;
}

.hc-product__sku .sku {
    color: var(--hc-text);
    font-weight: bold;
}

/* نکات کلیدی (توضیح کوتاه) */
.hc-single .hc-product.product .woocommerce-product-details__short-description {
    margin: 0 0 22px;
    font-size: .875rem;
    line-height: 2;
    color: var(--hc-muted);
}

.hc-single .hc-product.product .woocommerce-product-details__short-description h2,
.hc-single .hc-product.product .woocommerce-product-details__short-description h3,
.hc-single .hc-product.product .woocommerce-product-details__short-description h4 {
    margin: 0 0 10px;
    font-family: var(--hc-display);
    font-size: .9375rem;
    color: var(--hc-text);
}

.hc-single .hc-product.product .woocommerce-product-details__short-description p:last-child {
    margin-bottom: 0;
}

.hc-single .hc-product.product .woocommerce-product-details__short-description ul {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hc-single .hc-product.product .woocommerce-product-details__short-description ul li {
    position: relative;
    padding-inline-start: 26px;
}

.hc-single .hc-product.product .woocommerce-product-details__short-description ul li::before {
    content: '';
    position: absolute;
    top: 7px;
    inset-inline-start: 0;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: var(--hc-success-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312855a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E") center / 11px no-repeat;
}

/* توضیح کوتاه طولانی جمع می‌شود */
.hc-single .hc-product.product .hc-collapsible {
    margin-bottom: 6px;
}

.hc-collapsible.is-collapsed {
    position: relative;
    max-height: 170px;
    overflow: hidden;
}

.hc-collapsible.is-collapsed::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 48px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff);
    pointer-events: none;
}

.hc-collapse-toggle {
    align-self: flex-start;
    margin: 0 0 22px;
    padding: 0;
    border: 0;
    background: none;
    font-family: yekan, sans-serif;
    cursor: pointer;
}

/* ---------------------------------------------------------------- Key specs strip */
.hc-key-attrs {
    margin: 0 0 24px;
    padding: 24px 28px;
}

.hc-key-attrs__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.hc-key-attrs__head .hc-heading {
    margin: 0;
}

.hc-key-attrs ul {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.hc-key-attrs li {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px 16px;
    border-radius: var(--hc-radius);
    background: var(--hc-surface-soft);
    line-height: 1.6;
}

.hc-key-attrs__label {
    font-size: .75rem;
    color: var(--hc-subtle);
}

.hc-key-attrs__value {
    overflow: hidden;
    font-size: .875rem;
    font-weight: bold;
    color: var(--hc-text);
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------------------------------------------------------------- Buy box */
.hc-buybox {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 22px;
    border-radius: var(--hc-radius-lg);
    background: var(--hc-surface-soft);
    transition: box-shadow .3s;
}

.hc-buybox--attention {
    box-shadow: 0 0 0 4px rgba(249, 80, 25, .22);
}

.hc-stock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 12px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: bold;
    line-height: 1.8;
    white-space: nowrap;
}

.hc-stock::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 20%, transparent);
}

.hc-stock.is-success {
    background: var(--hc-success-soft);
    color: var(--hc-success);
}

.hc-stock.is-warning {
    background: var(--hc-warning-soft);
    color: var(--hc-warning);
}

/* موجودی محصول ساده در پنل قیمت نمایش داده می‌شود */
.hc-buybox > p.stock {
    display: none;
}

.hc-price {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hc-price__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.hc-price__label {
    font-size: .8125rem;
    color: var(--hc-muted);
}

.hc-price__body {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
}

.hc-price__badge {
    flex: 0 0 auto;
    margin-bottom: 6px;
    padding: 2px 10px;
    border-radius: 8px;
    background: var(--hc-primary);
    color: #fff;
    font-family: var(--hc-numeric);
    font-size: .875rem;
    line-height: 1.7;
}

.hc-single .hc-price__amount.price,
.hc-single .hc-price__amount > .price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin: 0 0 0 auto;
    color: var(--hc-text);
    font-family: var(--hc-numeric);
    font-size: 1.75rem;
    font-weight: bold;
    line-height: 1.4;
}

.hc-price__amount .woocommerce-Price-amount,
.hc-sticky-buy__price .woocommerce-Price-amount {
    white-space: nowrap;
}

.hc-price__amount del {
    font-family: yekan, sans-serif;
    font-size: .875rem;
    font-weight: normal;
    color: var(--hc-subtle);
    opacity: 1;
}

.hc-price__amount del .woocommerce-Price-currencySymbol {
    display: none;
}

.hc-price__amount ins {
    text-decoration: none;
    font-weight: bold;
}

.hc-price__amount .woocommerce-Price-currencySymbol {
    margin-inline-start: 4px;
    font-family: yekan, sans-serif;
    font-size: .8125rem;
    font-weight: normal;
    color: var(--hc-muted);
}

.hc-price__saving {
    align-self: flex-end;
    padding: 2px 12px;
    border-radius: 999px;
    background: var(--hc-success-soft);
    color: var(--hc-success);
    font-size: .75rem;
}

.hc-price__saving strong {
    font-weight: bold;
}

.hc-soldout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 22px 16px;
    border: 1px dashed #f0c4c4;
    border-radius: var(--hc-radius);
    background: var(--hc-danger-soft);
    color: var(--hc-danger);
    text-align: center;
    font-size: .8125rem;
}

.hc-soldout strong {
    font-family: var(--hc-display);
    font-size: 1.125rem;
}

/* گارانتی‌ها و خدمات */
.hc-guarantees {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.hc-guarantees li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--hc-border);
    border-radius: var(--hc-radius);
    background: var(--hc-surface);
    color: var(--hc-text);
    font-size: .8125rem;
    line-height: 1.6;
}

.hc-guarantees__icon {
    display: inline-flex;
    flex: 0 0 32px;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--hc-radius-sm);
    background: var(--hc-success-soft);
    color: var(--hc-success);
}

.hc-guarantees li p {
    margin: 0;
}

.hc-buybox__support {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    font-size: .75rem;
    color: var(--hc-muted);
}

.hc-buybox__support li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hc-buybox__support svg {
    flex: 0 0 auto;
    color: var(--hc-subtle);
}

.hc-buybox__support a {
    color: var(--hc-text);
    font-weight: bold;
}

.hc-buybox__support a:hover {
    color: var(--hc-primary);
}

/* ---------------------------------------------------------------- Add to cart form */
.hc-single .hc-product.product form.cart {
    display: block;
    margin: 0;
}

.hc-single .hc-product.product form.cart:not(.variations_form),
.hc-single .hc-product.product form.cart .woocommerce-variation-add-to-cart {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.hc-single .hc-product.product form.cart::before,
.hc-single .hc-product.product form.cart::after {
    content: none;
}

.hc-single .hc-product.product form.cart .single_add_to_cart_button {
    flex: 1 1 auto;
    float: none;
    min-width: 0;
    margin: 0;
    padding: 0 12px;
    white-space: nowrap;
}

.hc-single .hc-product.product form.cart div.quantity {
    flex: 0 0 auto;
    float: none;
    margin: 0;
}

.hc-single .hc-product.product form.cart div.quantity.hidden {
    display: none;
}

.hc-qty {
    display: inline-flex;
    align-items: center;
    height: 50px;
    border: 1px solid var(--hc-border-strong);
    border-radius: var(--hc-radius);
    background: var(--hc-surface);
    overflow: hidden;
}

.hc-single .hc-product.product .hc-qty input.qty {
    width: 32px;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--hc-text);
    font-family: var(--hc-numeric);
    font-size: 1.0625rem;
    text-align: center;
    -moz-appearance: textfield;
    appearance: textfield;
}

.hc-qty input.qty::-webkit-outer-spin-button,
.hc-qty input.qty::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.hc-qty input.qty:focus {
    outline: none;
}

.hc-qty__btn {
    width: 36px;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--hc-primary);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color .2s, color .2s;
}

.hc-qty__btn:hover {
    background: var(--hc-primary-soft);
}

.hc-qty__btn:disabled {
    color: var(--hc-border-strong);
    background: transparent;
    cursor: not-allowed;
}

/* Variations */
.hc-single .hc-product.product form.variations_form table.variations {
    width: 100%;
    margin: 0 0 14px;
    border: 0;
}

.hc-single .hc-product.product form.variations_form table.variations tr {
    display: block;
    margin-bottom: 16px;
}

.hc-single .hc-product.product form.variations_form table.variations tr:last-child {
    margin-bottom: 0;
}

.hc-single .hc-product.product form.variations_form table.variations th,
.hc-single .hc-product.product form.variations_form table.variations td {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: start;
    line-height: 1.6;
}

.hc-single .hc-product.product form.variations_form table.variations th.label label {
    margin: 0 0 10px;
    font-size: .8125rem;
    font-weight: bold;
    color: var(--hc-text);
}

.hc-single .hc-product.product form.variations_form table.variations select {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid var(--hc-border-strong);
    border-radius: var(--hc-radius);
    background-color: var(--hc-surface);
    color: var(--hc-text);
    font-family: yekan, sans-serif;
    font-size: .875rem;
    cursor: pointer;
}

.hc-single .hc-product.product form.variations_form table.variations select:focus {
    outline: none;
    border-color: var(--hc-primary);
}

.hc-single .hc-product.product form.variations_form.has-pills table.variations select {
    display: none !important;
}

.variation-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.variation-pill {
    position: relative;
    min-width: 60px;
    padding: 8px 16px;
    border: 1.5px solid var(--hc-border-strong);
    border-radius: var(--hc-radius-sm);
    background: var(--hc-surface);
    color: var(--hc-text);
    font-family: yekan, sans-serif;
    font-size: .8125rem;
    line-height: 1.5;
    cursor: pointer;
    transition: border-color .2s, background-color .2s, color .2s, box-shadow .2s;
}

.variation-pill:hover {
    border-color: var(--hc-primary);
}

.variation-pill.active {
    border-color: var(--hc-primary);
    background: var(--hc-primary-soft);
    color: var(--hc-primary);
    font-weight: bold;
    box-shadow: 0 0 0 3px rgba(249, 80, 25, .1);
}

.variation-pill:disabled {
    border-style: dashed;
    color: var(--hc-subtle);
    text-decoration: line-through;
    cursor: not-allowed;
}

.hc-single .hc-product.product form.variations_form .reset_variations {
    display: inline-block;
    margin-top: 10px;
    font-size: .75rem;
    color: var(--hc-muted);
}

.hc-single .hc-product.product form.variations_form .reset_variations:hover {
    color: var(--hc-primary);
}

.hc-single .hc-product.product .single_variation_wrap .woocommerce-variation {
    margin-bottom: 12px;
}

/* قیمت وارییشن در باکس قیمت بالا نمایش داده می‌شود */
.hc-single .hc-product.product .single_variation_wrap .woocommerce-variation-price {
    display: none;
}

.hc-single .hc-product.product .woocommerce-variation-description {
    font-size: .8125rem;
    color: var(--hc-muted);
}

.hc-single .hc-product.product .woocommerce-variation-availability p.stock {
    display: inline-block;
    margin: 0;
    padding: 2px 12px;
    border-radius: 999px;
    background: var(--hc-success-soft);
    color: var(--hc-success);
    font-size: .75rem;
}

.hc-single .hc-product.product .woocommerce-variation-availability p.stock.out-of-stock {
    background: var(--hc-danger-soft);
    color: var(--hc-danger);
}

/* ---------------------------------------------------------------- Tabs */
.hc-product__details {
    margin-top: 24px;
}

.hc-single .hc-product.product .woocommerce-tabs {
    padding: 0;
}

.hc-single .hc-product.product .woocommerce-tabs ul.tabs {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 10px 14px;
    border-bottom: 1px solid var(--hc-border);
    border-radius: var(--hc-radius-lg) var(--hc-radius-lg) 0 0;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(8px);
    overflow-x: auto;
    scrollbar-width: none;
}

.hc-single .hc-product.product .woocommerce-tabs ul.tabs::-webkit-scrollbar {
    display: none;
}

.hc-single .hc-product.product .woocommerce-tabs ul.tabs::before,
.hc-single .hc-product.product .woocommerce-tabs ul.tabs li::before,
.hc-single .hc-product.product .woocommerce-tabs ul.tabs li::after {
    content: none;
    display: none;
}

.hc-single .hc-product.product .woocommerce-tabs ul.tabs li {
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.hc-single .hc-product.product .woocommerce-tabs ul.tabs li a {
    display: block;
    padding: 10px 18px;
    border-radius: var(--hc-radius-sm);
    color: var(--hc-muted);
    font-size: .875rem;
    font-weight: normal;
    white-space: nowrap;
    transition: background-color .2s, color .2s;
}

.hc-single .hc-product.product .woocommerce-tabs ul.tabs li a:hover {
    background: var(--hc-surface-soft);
    color: var(--hc-text);
}

.hc-single .hc-product.product .woocommerce-tabs ul.tabs li.active a {
    background: var(--hc-primary-soft);
    color: var(--hc-primary);
    font-weight: bold;
}

.hc-single .hc-product.product .woocommerce-tabs .panel {
    margin: 0;
    padding: 28px 32px 32px;
    font-size: .9375rem;
    line-height: 2.2;
    color: #3c3854;
}

.hc-single .hc-product.product .woocommerce-tabs #tab-description {
    max-width: 920px;
}

.hc-single .hc-product.product .woocommerce-tabs .panel h2,
.hc-single .hc-product.product .woocommerce-tabs .panel h3,
.hc-single .hc-product.product .woocommerce-tabs .panel h4 {
    margin: 1.6em 0 .6em;
    font-family: var(--hc-display);
    color: var(--hc-text);
    line-height: 1.7;
}

.hc-single .hc-product.product .woocommerce-tabs .panel img {
    border-radius: var(--hc-radius);
}

.hc-single .hc-product.product .woocommerce-tabs .panel > :first-child {
    margin-top: 0;
}

.hc-single .hc-product.product .woocommerce-tabs .panel > :last-child {
    margin-bottom: 0;
}

/* Specifications */
.hc-single .hc-product.product table.shop_attributes {
    width: 100%;
    max-width: 920px;
    margin: 0;
    border: 0;
    border-collapse: collapse;
}

.hc-single .hc-product.product table.shop_attributes tr {
    border-bottom: 1px solid var(--hc-border);
}

.hc-single .hc-product.product table.shop_attributes tr:last-child {
    border-bottom: 0;
}

.hc-single .hc-product.product table.shop_attributes th,
.hc-single .hc-product.product table.shop_attributes td {
    padding: 14px 4px;
    border: 0;
    background: transparent !important;
    font-style: normal;
    line-height: 1.8;
    vertical-align: top;
}

.hc-single .hc-product.product table.shop_attributes th {
    width: 32%;
    padding-inline-end: 24px;
    font-size: .8125rem;
    font-weight: normal;
    color: var(--hc-subtle);
}

.hc-single .hc-product.product table.shop_attributes td {
    font-size: .875rem;
    font-weight: bold;
    color: var(--hc-text);
}

.hc-single .hc-product.product table.shop_attributes td p {
    margin: 0;
    padding: 0;
}

/* Reviews */
.hc-rating-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
    margin-bottom: 28px;
    padding: 20px 24px;
    border-radius: var(--hc-radius);
    background: var(--hc-surface-soft);
}

.hc-rating-summary__score {
    display: flex;
    align-items: baseline;
    gap: 6px;
    line-height: 1;
}

.hc-rating-summary__score strong {
    font-family: var(--hc-numeric);
    font-size: 2.5rem;
    color: var(--hc-text);
}

.hc-rating-summary__score span {
    font-size: .8125rem;
    color: var(--hc-subtle);
}

.hc-rating-summary__meta {
    display: flex;
    flex: 1 1 200px;
    flex-direction: column;
    gap: 8px;
    font-size: .8125rem;
    color: var(--hc-muted);
    line-height: 1.4;
}

.hc-single .hc-rating-summary .star-rating {
    float: none;
    margin: 0;
    font-size: 1.1rem;
}

.hc-rating-summary .hc-btn {
    min-height: 44px;
}

.hc-single .hc-product.product #reviews {
    display: grid;
    gap: 28px;
}

@media (min-width: 992px) {
    .hc-single .hc-product.product #reviews {
        grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
        align-items: start;
    }
}

.hc-single .hc-product.product #reviews #comments h2,
.hc-single .hc-product.product #reviews #reply-title {
    margin: 0 0 16px;
    font-family: var(--hc-display);
    font-size: 1rem;
    font-weight: bold;
    text-align: start;
}

.hc-single .hc-product.product #reviews ol.commentlist {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.hc-single .hc-product.product #reviews ol.commentlist li {
    margin: 0 0 12px;
}

.hc-single .hc-product.product #reviews ol.commentlist li .comment_container {
    position: relative;
    padding: 18px;
    border: 1px solid var(--hc-border);
    border-radius: var(--hc-radius);
    background: var(--hc-surface);
}

.hc-single .hc-product.product #reviews ol.commentlist li img.avatar {
    top: 18px;
    right: 18px;
    left: auto;
    width: 42px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
}

.hc-single .hc-product.product #reviews ol.commentlist li .comment-text {
    margin: 0 58px 0 0;
    padding: 0;
    border: 0;
}

.hc-single .hc-product.product #reviews ol.commentlist li .comment-text .star-rating {
    float: left;
}

.hc-single .hc-product.product #reviews ol.commentlist li .comment-text p.meta {
    margin-bottom: 6px;
    font-size: .8125rem;
    color: var(--hc-muted);
}

.hc-single .hc-product.product #reviews ol.commentlist li .comment-text .woocommerce-review__author {
    color: var(--hc-text);
}

.hc-single .hc-product.product #reviews .woocommerce-noreviews {
    padding: 18px;
    border: 1px dashed var(--hc-border-strong);
    border-radius: var(--hc-radius);
    color: var(--hc-muted);
    text-align: center;
}

.hc-single .hc-product.product #review_form #respond {
    padding: 22px;
    border: 1px solid var(--hc-border);
    border-radius: var(--hc-radius);
    background: var(--hc-surface);
}

.hc-single .hc-product.product form#commentform {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
}

.hc-single .hc-product.product #respond span#reply-title {
    display: block;
    margin: 0 0 14px;
}

.hc-single .hc-product.product form#commentform p.comment-form-author,
.hc-single .hc-product.product form#commentform p.comment-form-email {
    display: block;
    width: 100%;
}

.hc-single .hc-product.product form#commentform label {
    display: block;
    margin-bottom: 6px;
    font-size: .8125rem;
    color: var(--hc-muted);
}

.hc-single .hc-product.product form#commentform input[type="text"],
.hc-single .hc-product.product form#commentform input[type="email"],
.hc-single .hc-product.product form#commentform textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--hc-border-strong);
    border-radius: var(--hc-radius-sm);
    background: var(--hc-surface-soft);
    font-family: yekan, sans-serif;
    font-size: .875rem;
    transition: border-color .2s, background-color .2s;
}

.hc-single .hc-product.product form#commentform input:focus,
.hc-single .hc-product.product form#commentform textarea:focus {
    outline: none;
    border-color: var(--hc-primary);
    background: var(--hc-surface);
}

.hc-single .hc-product.product form#commentform input#submit {
    width: 100%;
    min-height: 50px;
    border-radius: var(--hc-radius);
    font-family: yekan, sans-serif;
    font-size: .9375rem;
    font-weight: bold;
}

.hc-single .hc-product.product p.stars a {
    color: #f5b301;
}

/* Up-sells */
.hc-single .hc-product.product .up-sells {
    margin-top: 32px;
}

.hc-single .hc-product.product .up-sells > h2 {
    margin-bottom: 16px;
    font-family: var(--hc-display);
    font-size: 1.2rem;
}

/* ---------------------------------------------------------------- Related products */
body.single-product .hc-related {
    background: var(--hc-page);
}

.hc-related .title-bar h3 {
    font-family: var(--hc-display);
}

.hc-related .arrow {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border-color: var(--hc-border-strong) !important;
    background: var(--hc-surface);
    color: var(--hc-muted);
    cursor: pointer;
    transition: border-color .2s, color .2s;
}

.hc-related .arrow:hover {
    border-color: var(--hc-primary) !important;
    color: var(--hc-primary);
}

.hc-related .arrow.swiper-button-disabled {
    opacity: .4;
    cursor: default;
}

.hc-related .arrow.swiper-button-lock {
    display: none !important;
}

.hc-related .wrapper {
    border: 1px solid var(--hc-border);
    box-shadow: var(--hc-shadow) !important;
    transition: transform .25s, box-shadow .25s;
}

.hc-related .wrapper:hover {
    transform: translateY(-4px);
    box-shadow: var(--hc-shadow-lg) !important;
}

/* ---------------------------------------------------------------- Sticky buy bar (mobile) */
.hc-sticky-buy {
    position: fixed;
    right: 0;
    bottom: var(--hc-sticky-offset, 0px);
    left: 0;
    z-index: 1035;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    border-top: 1px solid var(--hc-border);
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(8px);
    box-shadow: 0 -8px 24px rgba(22, 16, 50, .08);
    animation: hc-slide-up .25s ease-out;
}

@keyframes hc-slide-up {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.hc-sticky-buy[hidden] {
    display: none;
}

.hc-sticky-buy__price {
    display: flex;
    flex-direction: column;
    min-width: 0;
    color: var(--hc-text);
    font-family: var(--hc-numeric);
    font-size: 1.0625rem;
    line-height: 1.4;
}

.hc-sticky-buy__price del {
    font-family: yekan, sans-serif;
    font-size: .75rem;
    color: var(--hc-subtle);
}

.hc-sticky-buy__price ins {
    text-decoration: none;
}

.hc-sticky-buy__price .woocommerce-Price-currencySymbol {
    font-family: yekan, sans-serif;
    font-size: .75rem;
    color: var(--hc-muted);
}

.hc-sticky-buy__btn {
    flex: 0 0 auto;
    min-height: 46px;
}

@media (min-width: 992px) {
    .hc-sticky-buy {
        display: none !important;
    }
}

body.hc-sticky-buy-visible {
    padding-bottom: 72px;
}

body.hc-sticky-buy-visible .bale-float-btn {
    bottom: calc(var(--hc-sticky-offset, 0px) + 82px);
}

/* ---------------------------------------------------------------- Toast */
.hc-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    z-index: 2000;
    padding: 10px 18px;
    border-radius: var(--hc-radius-sm);
    background: var(--second);
    color: #fff;
    font-size: .875rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -12px);
    transition: opacity .25s, transform .25s, visibility .25s;
}

.hc-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

/* ---------------------------------------------------------------- Tablet / mobile */
@media (max-width: 991.98px) {
    .hc-key-attrs ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* فلش‌های گالری در لمسی همیشه دیده شوند */
    .hc-single .hc-product.product div.images .flex-direction-nav a {
        opacity: 1;
    }
}

@media (max-width: 767.98px) {
    .hc-product__top {
        gap: 20px;
        padding: 14px;
        border-radius: var(--hc-radius);
    }

    .hc-product__gallery {
        --hc-thumb: 58px;
    }

    .hc-single .hc-product.product div.images .flex-direction-nav a {
        width: 36px;
        height: 36px;
        margin-top: -18px;
    }

    .hc-single .hc-product.product .product_title {
        font-size: 1.125rem;
    }

    .hc-buybox {
        padding: 16px;
    }

    .hc-single .hc-price__amount.price,
    .hc-single .hc-price__amount > .price {
        font-size: 1.5rem;
    }

    .hc-key-attrs {
        padding: 18px;
        border-radius: var(--hc-radius);
    }

    .hc-product__details {
        margin-top: 20px;
    }

    .hc-single .hc-product.product .woocommerce-tabs .panel {
        padding: 20px 18px;
    }

    .hc-single .hc-product.product table.shop_attributes th {
        width: 40%;
        padding-inline-end: 12px;
    }

    .hc-rating-summary {
        padding: 16px;
    }
}
