/* ── Прогресс к подаркам ───────────────────────── */
.mc-mini__gifts {
    padding: 14px 24px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.mc-mini__gifts-line {
    font-size: 13px;
    line-height: 1.4;
    color: #666;
    margin-bottom: 6px;
}

.mc-mini__gifts-line:last-of-type {
    margin-bottom: 8px;
}

.mc-mini__gifts-line strong,
.mc-mini__gifts-line em {
    font-style: normal;
    font-weight: 600;
    color: #1a1a1a;
}

.mc-mini__gifts-track {
    height: 4px;
    background: #e8e8e8;
    border-radius: 2px;
    overflow: hidden;
}

.mc-mini__gifts-fill {
    height: 100%;
    background: #548048;
    border-radius: 2px;
    transition: width .4s ease;
}

.mc-mini__gifts-fill--done {
    background: #548048;
}

.mc-mini__gifts-note {
    margin-top: 8px;
    font-size: 12px;
    color: #999;
}

.mc-mini__gifts-note a {
    color: #548048;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.mc-mini__gifts-note a:hover {
    color: #1a1a1a;
}

/*   Checkout — позиция подарка (.cart_item--gift)  */

.cart_item--gift {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    background: #f0f6ee;
    border: 1px dashed #548048;
    border-radius: 8px;
    margin: 10px 0;
}

.cart_item--gift .item-thumbnail .img-wrap {
    width: 40px;
    height: 40px;
    margin: 5px;
}

.cart_item--gift .item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cart_item--gift .item-info {
    flex: 1;
    min-width: 0;
}

.cart_item--gift .item-name {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
}

.item-gift-options {
    font-size: 12px;
    color: #888;
}

.gift-badge {
    display: inline-block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #548048;
    background: #e3efdf;
    border-radius: 4px;
    padding: 2px 8px;
}

.gift-badge--muted {
    color: #999;
    background: #f0f0f0;
    font-weight: 500;
}

.cart_item--gift-declined {
    padding: 8px 12px;
    margin-bottom: 10px;
}

@media (max-width: 767px) {
    .cart_item--gift {
        gap: 10px;
        padding: 10px;
    }

    .cart_item--gift .item-name {
        font-size: 13px;
    }
}

/* строка подарка в аккаунте */

tr.order-item--gift .gift-item-label {
    display: block;
    color: #999;
    font-size: 0.82em;
    font-weight: normal;
    margin-bottom: 2px;
}


tr.order-item--gift .product-total .woocommerce-Price-amount {
    color: #548048;
    font-weight: 600;
}

@media (max-width: 767px) {
    tr.order-item--gift td {
        padding-top: 6px;
        padding-bottom: 6px;
    }

    tr.order-item--gift .wc-item-meta {
        margin-top: 2px;
    }

    tr.order-item--gift .product-name a {
        display: inline;
        word-break: break-word;
    }
}
/* Unified promotion color and checkout layout. */
.mc-mini__gifts-fill, .mc-mini__gifts-fill--done,
.cp__gifts-fill, .cp__gifts-fill--done { background: #548048; }
.fungiline-promo-checkout-gifts .mc-mini__gifts { padding: 12px 0 14px; border-bottom: none; }
.fungiline-promo-checkout-gifts .mc-mini__gifts-note { margin-top: 10px; }
.fungiline-promo-gift-change { padding: 8px 0 14px; color: #777; font-size: 13px; }
.fungiline-promo-gift-change a { color: #548048; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* The WooCommerce hook is INSIDE the product list (<ul>): valid <li> markup. */
.fungiline-promo-mini-gift-slot {
    list-style: none !important;
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0 !important;
    padding: 0 !important;
    border: 0;
}
.fungiline-promo-mini-gift-slot .mc-mini__gifts {
    box-sizing: border-box;
    width: 100%;
    padding: 14px 16px;
}
.fungiline-promo-checkout-gifts .mc-mini__gifts { padding: 0 0 12px; }
.fungiline-promo-gift-change { color: #777; font-size: 14px; margin: 12px 0; }
.fungiline-promo-gift-change a { color: #548048; text-decoration: underline; }

/* ===== 2.1.1: self-contained mini-cart / checkout presentation =====
 * Stronger, plugin-scoped selectors prevent the theme's list/button styles
 * from collapsing the progress track or overriding the link styles.
 * They apply both before and after the mini-cart <li> is repositioned.
 */
.mc-mini .fungiline-promo-mini-gift-panel,
.mc-mini .fungiline-promo-mini-gift-slot {
    display: block;
    width: 100%;
    box-sizing: border-box;
    flex: 0 0 auto;
    margin: 0;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
}
.mc-mini .fungiline-promo-mini-gift-panel > .mc-mini__gifts,
.mc-mini .fungiline-promo-mini-gift-slot > .mc-mini__gifts {
    display: block;
    box-sizing: border-box;
    width: 100%;
    padding: 16px 24px 18px;
    border: 0;
    margin: 0;
    background: transparent;
}
.mc-mini .mc-mini__gifts .mc-mini__gifts-line {
    display: block;
    margin: 0 0 7px;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
    color: #666;
}
.mc-mini .mc-mini__gifts .mc-mini__gifts-line strong {
    color: #1a1a1a;
    font-weight: 600;
}
.mc-mini .mc-mini__gifts .mc-mini__gifts-track,
.fungiline-promo-checkout-gifts .mc-mini__gifts-track {
    display: block;
    width: 100%;
    height: 5px;
    min-height: 5px;
    margin: 10px 0 0;
    padding: 0;
    background: #e8e8e8;
    border-radius: 5px;
    overflow: hidden;
}
.mc-mini .mc-mini__gifts .mc-mini__gifts-fill,
.fungiline-promo-checkout-gifts .mc-mini__gifts-fill {
    display: block;
    height: 100%;
    min-height: 5px;
    background: #548048;
    border-radius: 5px;
}
.mc-mini .mc-mini__gifts .mc-mini__gifts-note {
    display: block;
    margin: 12px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: #999;
}
.mc-mini .mc-mini__gifts-note a,
.fungiline-promo-checkout-gifts .fungiline-promo-gift-change a {
    color: #548048;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.fungiline-promo-checkout-gifts {
    display: block;
    box-sizing: border-box;
    width: 100%;
    margin: 10px 0 14px;
    padding: 0;
    color: #666;
}
.fungiline-promo-checkout-gifts > .mc-mini__gifts {
    display: block;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
}
.fungiline-promo-checkout-gifts .mc-mini__gifts-line {
    font-size: 13px;
    line-height: 1.45;
    margin-bottom: 7px;
}
.fungiline-promo-checkout-gifts .fungiline-promo-gift-change {
    margin: 12px 0 0;
    padding: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #777;
}
/* The theme switches to its mobile checkout at 991px. */
@media (min-width: 992px) {
    #fungiline-promo-mobile-gifts { display: none; }
}
@media (max-width: 991px) {
    #fungiline-promo-desktop-gifts { display: none; }
    .mc-mini .fungiline-promo-mini-gift-panel > .mc-mini__gifts,
    .mc-mini .fungiline-promo-mini-gift-slot > .mc-mini__gifts {
        padding: 14px 20px 16px;
    }
    #fungiline-promo-mobile-gifts {
        margin: 10px 0 14px;
    }
}
