/* ==========================================================
   DIGBANG PRODUCT CARD
========================================================== */

.db-product-card {
    position: relative;
    box-sizing: border-box;

    width: 312px;
    max-width: 100%;
    height: 407.58px;

    background: #ffffff;
    border: 1px solid transparent;
    border-radius: 24px;
    overflow: hidden;

    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.db-product-card:hover {
    border-color: #ffe0cc;
}

.db-product-card.is-added-to-cart {
    border-color: #ffe0cc;
    box-shadow: 0 10px 28px rgba(255, 255, 255, 0.85);
}

/* =======================
   IMAGE
======================= */

.db-product-card__media {
    position: relative;
}

.db-product-card__image-link {
    display: block;
    width: 273px;
    height: 260px;
    margin: 20px auto 0;
}

.db-product-card__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =======================
   BADGE
======================= */

.db-product-card__badge {
    position: absolute;
    top: 40px;
    left: 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 49px;
    height: 21px;

    background: #ffffff;
    border-radius: 100px;

    font-family: Vazirmatn, sans-serif;
    font-size: 11px;
    font-weight: 400;
    line-height: 1;
}

.db-product-card__badge.is-best-seller {
    color: #992900;
}

.db-product-card__badge.is-custom {
    color: #c99d00;
}

.db-product-card__badge.is-new {
    color: #43828a;
}

.db-product-card__badge.is-low-stock {
    color: #ff4400;
}

.db-product-card__badge.is-out-of-stock {
    color: #ada221;
}

.db-product-card__badge.is-special-offer {
    color: #ff4400;
}

/* =======================
   WISHLIST
======================= */

.db-product-card__wishlist-engine {
    position: absolute !important;

    width: 1px !important;
    height: 1px !important;

    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;

    opacity: 0 !important;
    pointer-events: none !important;
    white-space: nowrap !important;
}

.db-product-card__wishlist {
    position: absolute;
    top: 40px;
    right: 32px;
    z-index: 3;
}

.db-product-card__wishlist-button {
    position: relative;

    display: block;
    width: 20px;
    height: 20px;

    margin: 0;
    padding: 0;

    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;

    cursor: pointer;
}

.db-product-card__wishlist-icon {
    position: absolute;
    inset: 0;

    display: block;
    width: 20px;
    height: 20px;

    transition: opacity 0.2s ease;
}

.db-product-card__wishlist-icon--default {
    opacity: 1;
}

.db-product-card__wishlist-icon--active {
    opacity: 0;
}

.db-product-card__wishlist-button.is-active
.db-product-card__wishlist-icon--default {
    opacity: 0;
}

.db-product-card__wishlist-button.is-active
.db-product-card__wishlist-icon--active {
    opacity: 1;
}

/* =======================
   CONTENT
======================= */

.db-product-card__content {
    min-width: 0;
    padding-inline: 20px;
}

.db-product-card__title {
    margin: 12px 0 0;

    font-family: Vazirmatn, sans-serif;
    font-size: 22.38px;
    font-weight: 700;
    line-height: 1.3;
}

.db-product-card__title a {
    color: #000000;
    text-decoration: none;
}

.db-product-card__weight {
    margin: 3.58px 0 0;

    color: #7a6c61;

    font-family: Vazirmatn, sans-serif;
    font-size: 12.53px;
    font-weight: 400;
    line-height: 1.6;
}

/* =======================
   FOOTER AND PRICES
======================= */

.db-product-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    width: 100%;
    min-width: 0;
    margin-top: 12px;
}

.db-product-card__prices {
    display: flex;
    flex: 1 1 auto;
    align-items: baseline;
    gap: 8px;

    min-width: 0;
    max-width: calc(100% - 40px);

    direction: rtl;
    overflow: hidden;
}

.db-product-card__current-price {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: baseline;
    gap: 4px;

    color: #3d3631;

    font-family: Vazirmatn, sans-serif;
    font-size: 19.69px;
    font-weight: 700;
    line-height: 1;

    white-space: nowrap;
}

.db-product-card__current-price .db-product-card__currency {
    font-size: 14px;
    font-weight: 700;
}

.db-product-card__old-price {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;

    min-width: 0;
    margin: 0;

    color: #b8a292;

    font-family: Vazirmatn, sans-serif;
    font-size: 14.32px;
    font-weight: 200;
    line-height: 1;

    text-decoration: line-through;
    text-decoration-thickness: 1px;
    white-space: nowrap;
}

.db-product-card__old-price .db-product-card__currency {
    font-size: 11px;
    font-weight: 200;
}

/* =======================
   ADD TO CART
======================= */

.db-product-card__add-to-cart {
    position: relative !important;

    display: inline-flex !important;
    flex: 0 0 28.64px;
    align-items: center !important;
    justify-content: center !important;

    width: 28.64px !important;
    min-width: 28.64px !important;
    height: 28.64px !important;

    margin: 0 !important;
    padding: 0 !important;

    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;

    font-size: 0 !important;
    line-height: 0 !important;
    text-decoration: none !important;
}

.db-product-card__add-to-cart::before,
.db-product-card__add-to-cart::after {
    content: none !important;
    display: none !important;
}

.db-product-card__cart-icon {
    position: static !important;

    width: 28.64px !important;
    height: 28.64px !important;
    max-width: none !important;

    margin: 0 !important;
    padding: 0 !important;
}

/* حالت اولیه */
.db-product-card__cart-icon--default {
    display: block !important;
}

/* حالت اضافه‌شده در شروع مخفی است */
.db-product-card__cart-icon--added {
    display: none !important;
}

/* بعد از موفقیت افزودن به سبد */
.db-product-card.is-added-to-cart
.db-product-card__cart-icon--default {
    display: none !important;
}

.db-product-card.is-added-to-cart
.db-product-card__cart-icon--added {
    display: block !important;
}

.db-product-card .db-product-card__add-to-cart.loading > .db-product-card__cart-icon {
    display: none !important;
}

.db-product-card .db-product-card__add-to-cart.loading::after {
    content: '' !important;
    display: block !important;
    position: static !important;
    width: 18px;
    height: 18px;
    box-sizing: border-box;
    border: 2px solid currentColor;
    border-inline-end-color: transparent;
    border-radius: 50%;
    animation: db-product-card-cart-spin .7s linear infinite;
}

@keyframes db-product-card-cart-spin {
    to { transform: rotate(360deg); }
}

/* لینک تزریقی ووکامرس */
.db-product-card .added_to_cart {
    display: none !important;
}