/* .section-title */
.section-title {
    margin-bottom: 2rem;
    position: relative;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    display: flex;
    gap: 20px;
}

.section-title .h1 {
    font-size: 2.5rem;
    line-height: 50px;
    color: var(--text);
    z-index: 2;
    display: inline-block;
    margin-bottom: 0;
    position: relative;
}

.section-title .h1::before {
    content: "";
    position: absolute;
    right: -3rem;
    left: -3rem;
    bottom: 0;
    background-color: var(--bg);
    z-index: -1;
    top: 0;
}

@media (min-width:992px) and (max-width:1199.98px) {
    .section-title .h1::before {
        right: -1rem;
        left: -1rem;
    }
}

.section-title-text {
    position: relative;
    z-index: 1;
    width: 100%;
}

.section-title-text:after {
    content: "";
    position: absolute;
    right: 0;
    left: 0;
    border-top: 1px solid var(--border-color);
    top: 50%;
    transform: translateY(-50%);
    z-index: -1;
}

@media (max-width: 767.98px) {
    .section-title .h1 {
        font-size: 1.125rem;
        line-height: 37px;
    }







    .section-title {
        position: relative;
        width: 100%;
        height: 60px;
        overflow: visible;
    }

    .section-title .section-title-text {
        z-index: 2;
        font-size: 1.125rem;
        margin: 0;
        width: unset;
    }

    /* بک‌گراند سفید زیر متن */
    /* .section-title .section-title-text:before {
        content: "";
        position: absolute;
        right: -1rem;
        left: -1rem;
        bottom: 0;
        height: 1.5em;
        background-color: var(--bg);
        z-index: -1;
    } */
    .section-title .h1::before {
        left: -2rem;
        right: -2rem;
    }

    .section-title:after {
        content: "";
        position: absolute;
        left: 50%;
        bottom: -10px;
        transform: translateX(-50%) rotate(0deg);
        /* width: 120px; */
        height: 40px;
        background: url(../images/icons/curve-top.svg);
        z-index: 1;
        background-repeat: no-repeat;
        width: 100%;
        background-size: 100%;
        bottom: auto;
        top: -10px;
        transform: translateX(-50%) rotate(180deg);
    }

    [data-theme="dark"] .section-title-curve::after {
        background-image: url("../images/icons/curve-top-dark.svg");
    }

    .section-title-text:after {
        content: none;
    }
}


/* ===== کارت محصول ===== */
/* ===== تصویر همیشه مربعی ===== */
.product-image-box {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    order: 2;
    width: 120px;
    min-width: 120px;
    aspect-ratio: 1 / 1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    border: 1px solid var(--border-color);
    transition: border-color .25s ease, box-shadow .25s ease;
}

.product-image-box.no-image {
    background-image: url("../images/light-placeholder.webp");
    background-repeat: no-repeat;
    background-position: center;
}

[data-theme="dark"] .product-image-box.no-image {
    background-color: #011725;
    background-image: url("../images/dark-placeholder.webp");
}

/* فقط روی هاور */
.product-card:hover .product-image-box {
    /* box-shadow:
        0 14px 32px rgba(0, 0, 0, 0.08),
        0 6px 18px rgba(14, 182, 147, 0.18); */
    border-color: #0eb693;
    box-shadow: inset 0 -2px 0 rgba(14, 182, 147, 0.9);
}

.product-image-box a {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.4s ease;
    font-size: 0;
}

/* ===== کارت محصول ===== */
.product-card {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    background-color: var(--bg-white);
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: row;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    margin-bottom: 0.5rem;
}

.product-card:last-child {
    margin-bottom: 0;
}

/* هاور بسیار مینیمال: فقط کمی حرکت کارت */
.product-card:hover {
    transform: translateY(-2px);
    border-color: #0EB693;
    box-shadow: 0 4px 12px rgba(14, 182, 147, 0.1);
}

/* زوم تصویر محصول روی هاور */
.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-image-box a {
    position: relative;
}

.product-image-box a::before {
    position: absolute;
    left: 0;
    right: 0;
    content: "";
    top: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(1, 23, 37, 0) 50%, rgba(1, 23, 37, 0.5) 100%);
    z-index: 1;
}

@media (max-width: 767.98px) {
    .product-card {
        border: none;
        background: transparent;
        /* padding: 0; */
        border-radius: 0;
        border-bottom: 1px solid #D0D4DB;
        /* padding-bottom: 1rem; */
        /* margin-bottom: 1rem; */
        box-shadow: none;
        /* height: 100%; */
        padding-left: 0;
        padding-right: 0;

    }

    [data-theme="dark"] .product-card {
        border-color:
            #011725
    }

    .product-card:hover {
        box-shadow: none;
        transform: none;
    }

    /* .product-card:hover .product-image {
        transform: scale(1.02);
    } */
}

/* ===== دکمه علاقه‌مندی ===== */
.favorite-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    background-color: transparent;
    transition: all 0.25s ease;
    z-index: 5;
}

.favorite-btn svg {
    width: 22px;
    height: 22px;
}

.favorite-btn svg path {
    fill: transparent;
    stroke: #3D4452;
    transition: all 0.25s ease;
}

.favorite-btn.active svg path {
    fill: #DB2C65;
    stroke: #DB2C65;
}

/* ===== متن و قیمت ===== */
.product-body {
    text-align: right;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.product-title {
    margin: 0 0 0.5rem;
}

.product-weight {
    font-size: 0.813rem;
    margin: 0 0 0.75rem;
    color: #828A99;

}

.divider {
    height: 1px;
    background: #E7E9EC;
    margin: 0 0 0.75rem -1rem;
}

[data-theme="dark"] .divider {
    background-color: #0D2C40;
}

.price-original {
    font-size: 0.688rem;
    color: #DB2C65;
    text-decoration: line-through;
    margin: 0;
}

.price-final {
    font-size: 0.938rem;
    font-weight: 700;
    color: #0EB693;
    margin: 0;
}

.price-unit {
    font-weight: 500;
}

.delete-btn {
    color: #DB2C65;
    font-size: 0.813rem;
    display: inline-flex;
    align-items: center;
    margin-left: 1rem;
    flex-shrink: 0;
}




/* === کامپوننت پرداخت هوشمند === */
.checkout-panel {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    border-radius: 20px;
    display: flex;
    gap: 1.5rem;
}

.checkout-panel .title {
    font-size: 0.688rem;
    color: #828A99;
    margin-bottom: 0.5rem;
}

.checkout-panel .value {
    margin: 0;
    font-size: 1.5rem;
}

.checkout-panel .value .unit {
    margin: 0;
    font-size: 0.938rem;
    font-weight: 400;
}

@media (max-width: 991.98px) {
    .checkout-panel {
        margin: 1rem 0 0 0;
        border-radius: 1rem;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        padding: 1rem 0;
    }

    [data-theme="light"] .checkout-panel {
        border-color: #D0D4DB;
    }

    .checkout-panel .title,
    .checkout-panel .value {
        text-align: right;
    }

    .checkout-panel .value {
        font-size: 1.125rem;
    }

    .checkout-panel>* {
        flex-basis: 40%;
    }
}

@media (min-width: 992px) {
    .checkout-panel {

        flex-direction: column;
    }

    .checkout-panel .title,
    .checkout-panel .value {
        text-align: center;
    }

}


.quantity-controls {
    border-radius: 10px;
    border: 1px solid var(--border-color-light);
    background-color: var(--bg-white);
    padding: 0.25rem;
    max-width: max-content;
    height: 40px;
}

.btn-minus,
.btn-plus {
    width: 25px;
    height: 25px;
    color: #565D6B;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-input {
    border-width: 0px !important;
    max-width: 60px;
    text-align: center;
    box-shadow: none !important;
    font-size: 0.688rem;
    text-align: center;
    direction: ltr;
    -moz-appearance: textfield;
    /* فایرفاکس */
    background-color: transparent;
    color: var(--text);
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}


@media (min-width: 992px) {
    .quantity-controls {}
}