/* =========================================================
   TEBKADEH — PREMIUM 3D PRODUCT CARDS
   Version: 2.0
   Scope: WooCommerce product loops only
========================================================= */

body.woocommerce ul.products li.product,
body.post-type-archive-product ul.products li.product,
body.tax-product_cat ul.products li.product,
body.tax-product_tag ul.products li.product,
body.search ul.products li.product {

    --tk-card-radius: 22px;
    --tk-emerald: #15a978;
    --tk-deep-green: #087b5a;
    --tk-soft-green: #eaf9f3;

    position: relative;
    isolation: isolate;
    overflow: hidden;

    background:
        radial-gradient(
            circle at 85% 8%,
            rgba(21, 169, 120, 0.10),
            transparent 35%
        ),
        linear-gradient(
            145deg,
            #ffffff 0%,
            #fbfefd 55%,
            #f1f8f5 100%
        );

    border: 1px solid rgba(21, 169, 120, 0.13);
    border-radius: var(--tk-card-radius);

    padding: 14px 14px 16px;

    box-shadow:
        0 3px 8px rgba(16, 58, 43, 0.04),
        0 12px 26px rgba(16, 58, 43, 0.08),
        0 24px 42px rgba(16, 58, 43, 0.045),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);

    transition:
        transform 280ms ease,
        box-shadow 280ms ease,
        border-color 280ms ease,
        background 280ms ease;
}

/* نور و عمق تزئینی کارت */

body.woocommerce ul.products li.product::before,
body.post-type-archive-product ul.products li.product::before,
body.tax-product_cat ul.products li.product::before,
body.tax-product_tag ul.products li.product::before,
body.search ul.products li.product::before {

    content: "";
    position: absolute;
    z-index: -1;

    width: 155px;
    height: 155px;

    top: -75px;
    right: -65px;

    border-radius: 50%;

    background: radial-gradient(
        circle,
        rgba(21, 169, 120, 0.17),
        rgba(21, 169, 120, 0.025) 65%,
        transparent 72%
    );

    pointer-events: none;
}

/* نوار سبز ظریف بالای کارت */

body.woocommerce ul.products li.product::after,
body.post-type-archive-product ul.products li.product::after,
body.tax-product_cat ul.products li.product::after,
body.tax-product_tag ul.products li.product::after,
body.search ul.products li.product::after {

    content: "";
    position: absolute;

    top: 0;
    right: 22px;

    width: 48px;
    height: 3px;

    border-radius: 0 0 8px 8px;

    background: linear-gradient(
        90deg,
        #087b5a,
        #15a978,
        #8ce4c2
    );

    opacity: 0.9;
    pointer-events: none;
}

/* لینک اصلی محصول */

body.woocommerce ul.products li.product
a.woocommerce-LoopProduct-link,
body.woocommerce ul.products li.product
a.woocommerce-loop-product__link,
body.post-type-archive-product ul.products li.product
a.woocommerce-loop-product__link,
body.tax-product_cat ul.products li.product
a.woocommerce-loop-product__link,
body.tax-product_tag ul.products li.product
a.woocommerce-loop-product__link,
body.search ul.products li.product
a.woocommerce-loop-product__link {

    display: flex;
    flex-direction: column;

    position: relative;
    z-index: 1;

    color: inherit;
    text-decoration: none;

    border-radius: 15px;
}

/* پنل تصویر محصول */

body.woocommerce ul.products li.product img,
body.post-type-archive-product ul.products li.product img,
body.tax-product_cat ul.products li.product img,
body.tax-product_tag ul.products li.product img,
body.search ul.products li.product img {

    display: block;

    width: 100%;
    height: 205px;

    object-fit: contain;

    padding: 12px;
    margin: 0 0 15px;

    border-radius: 17px;

    background:
        radial-gradient(
            circle at 50% 42%,
            #ffffff 0%,
            #f8fcfa 52%,
            #eaf5f0 100%
        );

    box-shadow:
        inset 0 2px 5px rgba(255, 255, 255, 0.95),
        inset 0 -5px 12px rgba(19, 86, 62, 0.055),
        0 4px 10px rgba(20, 73, 54, 0.045);

    transition:
        transform 350ms ease,
        box-shadow 350ms ease;
}

/* عنوان محصول */

body.woocommerce ul.products li.product
.woocommerce-loop-product__title {

    color: #173b32;

    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.9;

    padding: 0 3px;
    margin: 0 0 9px;

    text-align: right;
}

/* قیمت */

body.woocommerce ul.products li.product .price {

    display: block;

    color: #087b5a;

    font-size: 14px;
    font-weight: 700;

    padding: 5px 3px 10px;
    margin: 0;

    text-align: right;
}

body.woocommerce ul.products li.product .price del {
    color: #9aa9a2;
    font-size: 12px;
    opacity: 0.75;
}

body.woocommerce ul.products li.product .price ins {
    color: #087b5a;
    text-decoration: none;
}

/* دکمه خرید و انتخاب گزینه‌ها */

body.woocommerce ul.products li.product > a.button,
body.woocommerce ul.products li.product
a.add_to_cart_button,
body.woocommerce ul.products li.product
a.product_type_variable,
body.woocommerce ul.products li.product
a.product_type_simple,
body.post-type-archive-product ul.products li.product > a.button,
body.tax-product_cat ul.products li.product > a.button,
body.tax-product_tag ul.products li.product > a.button,
body.search ul.products li.product > a.button {

    display: flex;
    align-items: center;
    justify-content: center;

    position: relative;
    z-index: 2;

    width: 100%;
    min-height: 46px;

    padding: 11px 14px;
    margin: 9px 0 0;

    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 13px;

    background: linear-gradient(
        145deg,
        #20bd89 0%,
        #15a978 48%,
        #087b5a 100%
    );

    color: #ffffff;

    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.6;

    text-align: center;
    text-decoration: none;

    box-shadow:
        0 5px 0 #076b50,
        0 8px 15px rgba(8, 123, 90, 0.20),
        inset 0 1px 1px rgba(255, 255, 255, 0.35);

    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        filter 180ms ease;
}

/* حالت هاور */

@media (hover: hover) and (pointer: fine) {

    body.woocommerce ul.products li.product:hover,
    body.post-type-archive-product ul.products li.product:hover,
    body.tax-product_cat ul.products li.product:hover,
    body.tax-product_tag ul.products li.product:hover,
    body.search ul.products li.product:hover {

        transform: translateY(-7px);

        border-color: rgba(21, 169, 120, 0.35);

        box-shadow:
            0 7px 12px rgba(16, 58, 43, 0.06),
            0 20px 38px rgba(16, 58, 43, 0.13),
            0 32px 52px rgba(16, 58, 43, 0.07),
            inset 0 1px 0 #ffffff;
    }

    body.woocommerce ul.products li.product:hover img,
    body.post-type-archive-product ul.products li.product:hover img,
    body.tax-product_cat ul.products li.product:hover img,
    body.tax-product_tag ul.products li.product:hover img,
    body.search ul.products li.product:hover img {

        transform: translateY(-3px) scale(1.035);

        box-shadow:
            inset 0 2px 5px rgba(255, 255, 255, 0.95),
            0 9px 18px rgba(19, 86, 62, 0.10);
    }

    body.woocommerce ul.products li.product a.button:hover,
    body.woocommerce ul.products li.product
    a.add_to_cart_button:hover,
    body.woocommerce ul.products li.product
    a.product_type_variable:hover,
    body.woocommerce ul.products li.product
    a.product_type_simple:hover {

        transform: translateY(2px);

        filter: brightness(1.06);

        box-shadow:
            0 3px 0 #076b50,
            0 5px 10px rgba(8, 123, 90, 0.18),
            inset 0 1px 1px rgba(255, 255, 255, 0.3);
    }
}

/* حالت فشردن دکمه */

body.woocommerce ul.products li.product a.button:active,
body.woocommerce ul.products li.product
a.add_to_cart_button:active {

    transform: translateY(4px);

    box-shadow:
        0 1px 0 #076b50,
        0 2px 5px rgba(8, 123, 90, 0.15);
}

/* نشان تخفیف ووکامرس */

body.woocommerce ul.products li.product .onsale {

    position: absolute;
    z-index: 3;

    top: 13px;
    left: 13px;
    right: auto;

    min-width: 48px;
    min-height: 27px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 4px 9px;
    margin: 0;

    border-radius: 9px;

    background: linear-gradient(145deg, #087b5a, #15a978);

    color: #ffffff;

    font-size: 11px;
    font-weight: 700;

    box-shadow:
        0 4px 10px rgba(8, 123, 90, 0.20),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* موبایل و تبلت */

@media (max-width: 767px) {

    body.woocommerce ul.products li.product,
    body.post-type-archive-product ul.products li.product,
    body.tax-product_cat ul.products li.product,
    body.tax-product_tag ul.products li.product,
    body.search ul.products li.product {

        padding: 10px;
        border-radius: 17px;
    }

    body.woocommerce ul.products li.product img,
    body.post-type-archive-product ul.products li.product img,
    body.tax-product_cat ul.products li.product img,
    body.tax-product_tag ul.products li.product img,
    body.search ul.products li.product img {

        height: 155px;
        padding: 8px;
        margin-bottom: 10px;
    }

    body.woocommerce ul.products li.product
    .woocommerce-loop-product__title {

        font-size: 13px;
        line-height: 1.8;
    }

    body.woocommerce ul.products li.product .price {

        font-size: 12px;
    }

    body.woocommerce ul.products li.product > a.button,
    body.woocommerce ul.products li.product
    a.add_to_cart_button,
    body.woocommerce ul.products li.product
    a.product_type_variable,
    body.woocommerce ul.products li.product
    a.product_type_simple {

        min-height: 42px;
        padding: 9px 7px;
        font-size: 12px;
        border-radius: 11px;
    }
}

/* احترام به تنظیم کاهش حرکت کاربر */

@media (prefers-reduced-motion: reduce) {

    body.woocommerce ul.products li.product,
    body.woocommerce ul.products li.product img,
    body.woocommerce ul.products li.product a.button,
    body.woocommerce ul.products li.product a.add_to_cart_button {

        transition: none !important;
        transform: none !important;
    }
}