/* =========================================================
   Featured Product Card - Cart
   ========================================================= */

.wth-featured-product-row {
    width: 100%;
    margin: 16px 0 8px;
}

.wth-featured-product-card {
    position: relative;
    width: 100%;
    background: #fff;
    border: 1px solid #e0e0e2;
    border-radius: 16px;
    padding: 18px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
}

.wth-featured-product-card:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.07);
    transform: translateY(-1px);
}

.wth-featured-product-card::after {
    content: "";
    position: absolute;
    top: -40px;
    left: -40px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(239, 57, 78, 0.08) 0%, rgba(239, 57, 78, 0) 70%);
    pointer-events: none;
}

.wth-featured-product-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ef394e, #ff6b81);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 6px 16px rgba(239, 57, 78, 0.22);
    position: relative;
    z-index: 1;
}

.wth-featured-product-card__inner {
    display: flex;
    align-items: center;
    gap: 18px;
    position: relative;
    z-index: 1;
}

.wth-featured-product-card__image {
    flex: 0 0 120px;
    width: 120px;
}

.wth-featured-product-card__image a {
    display: block;
    text-decoration: none;
}

.wth-featured-product-card__image img,
.wth-featured-product-card__img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: 12px;
    background: #fafafa;
    border: 1px solid #f0f0f1;
    padding: 8px;
}

.wth-featured-product-card__content {
    flex: 1 1 auto;
    min-width: 0;
}

.wth-featured-product-card__title {
    display: inline-block;
    margin-bottom: 8px;
    color: #23254e;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.9;
    text-decoration: none;
    transition: color 0.2s ease;
}

.wth-featured-product-card__title:hover {
    color: #ef394e;
}

.wth-featured-product-card__desc {
    margin-bottom: 12px;
    color: #62666d;
    font-size: 13px;
    line-height: 2;
}

.wth-featured-product-card__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
}

.wth-featured-product-card__price {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: #23254e;
    font-size: 15px;
    font-weight: 800;
}

.wth-featured-product-card__price del {
    color: #a1a3a8;
    font-size: 13px;
    font-weight: 500;
    margin-left: 6px;
}

.wth-featured-product-card__price ins {
    color: #23254e;
    text-decoration: none;
    font-size: 18px;
    font-weight: 800;
}

.wth-featured-product-card__actions {
    flex: 0 0 220px;
    width: 220px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

.wth-featured-product-card__view,
.wth-featured-product-card__add {
    width: 100%;
    min-height: 44px;
    border-radius: 12px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.wth-featured-product-card__view {
    background: #fff !important;
    color: #3f4064 !important;
    border: 1px solid #d0d3d9 !important;
}

.wth-featured-product-card__view:hover {
    border-color: #b7bbc3 !important;
    background: #f8f8f8 !important;
    color: #23254e !important;
}

.wth-featured-product-card__add {
    background: #ef394e !important;
    color: #fff !important;
    border: 1px solid #ef394e !important;
    box-shadow: 0 8px 18px rgba(239, 57, 78, 0.18);
}

.wth-featured-product-card__add:hover {
    background: #d92f44 !important;
    border-color: #d92f44 !important;
    color: #fff !important;
}

.wth-featured-product-card__add:disabled,
.wth-featured-product-card__add.is-loading {
    opacity: 0.85;
    cursor: not-allowed;
}

.wth-featured-product-card__status {
    min-height: 20px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.7;
    text-align: center;
}

.wth-featured-product-card__status.is-success {
    color: #19a974;
}

.wth-featured-product-card__status.is-error {
    color: #d32f2f;
}

/* =========================================================
   Desktop
   ========================================================= */

@media (min-width: 992px) {
    .woocommerce-cart .wth-featured-product-card {
        margin-top: 4px;
    }

    .woocommerce-cart .wth-featured-product-card__content {
        padding-left: 8px;
    }
}

/* =========================================================
   Tablet
   ========================================================= */

@media (max-width: 991px) {
    .wth-featured-product-card {
        padding: 16px;
        border-radius: 14px;
    }

    .wth-featured-product-card__inner {
        gap: 14px;
    }

    .wth-featured-product-card__image,
    .wth-featured-product-card__image img,
    .wth-featured-product-card__img {
        width: 100px;
        height: 100px;
        flex-basis: 100px;
    }

    .wth-featured-product-card__actions {
        width: 190px;
        flex-basis: 190px;
    }
}

/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 767px) {
    .wth-featured-product-row {
        margin: 12px 0 6px;
    }

    .wth-featured-product-card {
        padding: 14px;
        border-radius: 14px;
        box-shadow: 0 3px 14px rgba(0, 0, 0, 0.04);
    }

    .wth-featured-product-card__badge {
        font-size: 12px;
        padding: 6px 10px;
        margin-bottom: 12px;
    }

    .wth-featured-product-card__inner {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .wth-featured-product-card__image {
        width: 100%;
        flex: unset;
        text-align: center;
    }

    .wth-featured-product-card__image img,
    .wth-featured-product-card__img {
        width: 96px;
        height: 96px;
    }

    .wth-featured-product-card__content {
        width: 100%;
    }

    .wth-featured-product-card__title {
        display: block;
        font-size: 15px;
        line-height: 1.9;
        margin-bottom: 6px;
        text-align: right;
    }

    .wth-featured-product-card__desc {
        font-size: 12px;
        line-height: 1.9;
        margin-bottom: 10px;
        text-align: right;
    }

    .wth-featured-product-card__meta {
        justify-content: flex-start;
    }

    .wth-featured-product-card__price {
        font-size: 14px;
    }

    .wth-featured-product-card__price ins {
        font-size: 16px;
    }

    .wth-featured-product-card__actions {
        width: 100%;
        flex: unset;
        gap: 8px;
    }

    .wth-featured-product-card__view,
    .wth-featured-product-card__add {
        width: 100%;
        min-height: 42px;
        font-size: 13px;
        border-radius: 10px !important;
    }

    .wth-featured-product-card__status {
        font-size: 11px;
    }
}

/* ==========================================================================
   Featured Product Card — Single Product Only
   نمایش کنترل‌شده کارت پیشنهاد ویژه در صفحه تک‌محصول
   ========================================================================== */

.single-product .wth-featured-product-row--single {
    clear: both;
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 18px 0 0 !important;
    padding: 0 !important;
}

.single-product .wth-featured-product-row--single .wth-featured-product-card {
    position: relative;
    box-sizing: border-box;
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 !important;
    padding: 14px !important;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
}

/* برچسب پیشنهاد ویژه */
.single-product .wth-featured-product-row--single .wth-featured-product-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    margin: 0 0 12px !important;
    padding: 5px 9px;
    color: #d92d20;
    background: #fff1f0;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
}

/* ساختار داخلی کارت */
.single-product .wth-featured-product-row--single .wth-featured-product-card__inner {
    display: grid !important;
    grid-template-columns: 78px minmax(0, 1fr) 132px;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 100%;
}

/* تصویر */
.single-product .wth-featured-product-row--single .wth-featured-product-card__image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    min-width: 78px;
    height: 78px;
    margin: 0 !important;
    padding: 0;
}

.single-product .wth-featured-product-row--single .wth-featured-product-card__image a {
    display: block;
    width: 100%;
    height: 100%;
}

.single-product .wth-featured-product-row--single .wth-featured-product-card__image img,
.single-product .wth-featured-product-row--single .wth-featured-product-card__img {
    display: block;
    width: 78px !important;
    max-width: 78px !important;
    height: 78px !important;
    max-height: 78px !important;
    margin: 0 !important;
    padding: 4px;
    object-fit: contain;
    background: #fafafa;
    border-radius: 10px;
}

/* بخش متن */
.single-product .wth-featured-product-row--single .wth-featured-product-card__content {
    display: block;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
}

.single-product .wth-featured-product-row--single .wth-featured-product-card__title {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 5px !important;
    color: #242424;
    font-size: 13px !important;
    font-weight: 700;
    line-height: 1.8;
    text-decoration: none;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.single-product .wth-featured-product-row--single .wth-featured-product-card__desc {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 7px !important;
    color: #777;
    font-size: 10px !important;
    line-height: 1.8;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.single-product .wth-featured-product-row--single .wth-featured-product-card__meta {
    margin: 0 !important;
    padding: 0 !important;
}

.single-product .wth-featured-product-row--single .wth-featured-product-card__price {
    display: block;
    color: #d92d20;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.7;
}

.single-product .wth-featured-product-row--single .wth-featured-product-card__price del {
    margin-left: 4px;
    color: #999;
    font-size: 10px;
    font-weight: 400;
}

/* دکمه‌ها */
.single-product .wth-featured-product-row--single .wth-featured-product-card__actions {
    display: flex !important;
    flex-direction: column;
    gap: 7px;
    width: 132px;
    min-width: 132px;
    margin: 0 !important;
    padding: 0 !important;
}

.single-product .wth-featured-product-row--single .wth-featured-product-card__view,
.single-product .wth-featured-product-row--single .wth-featured-product-card__add {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    min-height: 36px !important;
    margin: 0 !important;
    padding: 7px 8px !important;
    border-radius: 8px !important;
    font-size: 11px !important;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.single-product .wth-featured-product-row--single .wth-featured-product-card__view {
    color: #555 !important;
    background: #fff !important;
    border: 1px solid #d9d9d9 !important;
}

.single-product .wth-featured-product-row--single .wth-featured-product-card__add {
    color: #fff !important;
    background: #ef4056 !important;
    border: 1px solid #ef4056 !important;
}

.single-product .wth-featured-product-row--single .wth-featured-product-card__add:hover {
    background: #d93449 !important;
    border-color: #d93449 !important;
}

.single-product .wth-featured-product-row--single .wth-featured-product-card__add:disabled {
    opacity: 0.7;
    cursor: wait;
}

/* پیام موفقیت یا خطا */
.single-product .wth-featured-product-row--single .wth-featured-product-card__status {
    width: 100%;
    margin: 0 !important;
    font-size: 10px;
    line-height: 1.6;
    text-align: center;
}

.single-product .wth-featured-product-row--single .wth-featured-product-card__status.is-success {
    color: #14804a;
}

.single-product .wth-featured-product-row--single .wth-featured-product-card__status.is-error {
    color: #d92d20;
}


/* ==========================================================================
   موبایل
   ========================================================================== */

@media (max-width: 767px) {

    .single-product .wth-featured-product-row--single {
        margin-top: 15px !important;
    }

    .single-product .wth-featured-product-row--single .wth-featured-product-card {
        padding: 12px !important;
        border-radius: 12px;
    }

    .single-product .wth-featured-product-row--single .wth-featured-product-card__badge {
        margin-bottom: 10px !important;
        font-size: 10px;
    }

    .single-product .wth-featured-product-row--single .wth-featured-product-card__inner {
        grid-template-columns: 68px minmax(0, 1fr) !important;
        gap: 10px;
    }

    .single-product .wth-featured-product-row--single .wth-featured-product-card__image {
        width: 68px;
        min-width: 68px;
        height: 68px;
    }

    .single-product .wth-featured-product-row--single .wth-featured-product-card__image img,
    .single-product .wth-featured-product-row--single .wth-featured-product-card__img {
        width: 68px !important;
        max-width: 68px !important;
        height: 68px !important;
        max-height: 68px !important;
    }

    .single-product .wth-featured-product-row--single .wth-featured-product-card__title {
        font-size: 12px !important;
        line-height: 1.75;
    }

    .single-product .wth-featured-product-row--single .wth-featured-product-card__desc {
        display: none;
    }

    .single-product .wth-featured-product-row--single .wth-featured-product-card__price {
        font-size: 12px;
    }

    .single-product .wth-featured-product-row--single .wth-featured-product-card__actions {
        grid-column: 1 / -1;
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 7px;
        width: 100%;
        min-width: 0;
        margin-top: 2px !important;
    }

    .single-product .wth-featured-product-row--single .wth-featured-product-card__view,
    .single-product .wth-featured-product-row--single .wth-featured-product-card__add {
        min-height: 39px !important;
        font-size: 11px !important;
    }

    .single-product .wth-featured-product-row--single .wth-featured-product-card__status {
        grid-column: 1 / -1;
    }
}
