/* Мобильная карточка товара v2 — см. inc/15-mobile-card-v2.php. Десктоп не меняется.
   Единые правила (мобайл): кнопки 48px, скругление 12px; основная — заливка #0091bf, второстепенные — белые
   с рамкой rgba(11,133,169,.24) и текстом #0095cb; ссылки #0095cb 600; секции разделены линией #e6eaec, отступ 20px;
   заголовки секций 18px 700 #211c1d. */
.smg-card-help { display: none !important; }

/* Крестик модалки «Добавить в комплект» (все ширины): общее правило кнопок из style-part-02e перебивало
   прозрачный фон из 04c, а значка × в стилях не было — получался синий квадрат. */
.extra-products-modal .window button.extra-modal-close,
.extra-products-modal .window button.extra-modal-close:focus {
    background: transparent !important; color: #211c1d !important; border-radius: 50% !important;
    display: flex !important; align-items: center; justify-content: center;
}
.extra-products-modal .window button.extra-modal-close:hover,
.extra-products-modal .window button.extra-modal-close:active { background: #f0f0f0 !important; }
.extra-products-modal .window button.extra-modal-close::before {
    content: "\00d7"; font: 400 30px/1 Arial, sans-serif; color: #211c1d;
}

@media (max-width: 768px) {
    .single-product.smg-card-v2 .summary {
        --smg-accent: #0095cb;
        --smg-fill: #0091bf;
        --smg-line: #e6eaec;
        --smg-soft-border: rgba(11, 133, 169, .24);
        --smg-ink: #211c1d;
        --smg-muted: #6b6f74;
    }

    /* ---------- лишнее под комплектацией ---------- */
    .single-product.smg-card-v2 .summary .smogus-mobile-product-pick-summary,
    .single-product.smg-card-v2 .summary .single-product__notice { display: none !important; }

    /* ---------- состав комплектации ---------- */
    .single-product.smg-card-v2 .summary .smogus-mobile-variation-description.smg-card-collapsed { display: none !important; }
    .smg-card-sostav { margin: 10px 0 0; font-size: 14px; line-height: 1.4; color: var(--smg-muted, #6b6f74); }
    .smg-card-sostav__text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .smg-card-sostav__toggle {
        display: inline-block; padding-top: 4px; color: var(--smg-accent, #0095cb);
        font-weight: 600; font-size: 14px; cursor: pointer;
    }

    /* ---------- блок покупки: цена, «Добавить к заявке», «В 1 клик», гравировка ---------- */
    .single-product.smg-card-v2 .summary .smogus-mobile-inline-wrap {
        margin-top: 20px !important; padding-top: 20px !important; border-top: 1px solid var(--smg-line) !important;
    }
    .single-product.smg-card-v2 .summary .smogus-mobile-inline-cta,
    body.single-product.smg-card-v2 .summary .single_variation_wrap .woocommerce-variation-add-to-cart.smogus-mobile-inline-cta {
        background: none !important; box-shadow: none !important; border: 0 !important;
        padding: 0 !important; border-radius: 0 !important;
    }
    .single-product.smg-card-v2 .summary .smogus-mobile-inline-cta .woocommerce-variation-price,
    .single-product.smg-card-v2 .summary .smogus-mobile-inline-cta .standard_price { padding-left: 0 !important; }
    .single-product.smg-card-v2 .summary .smogus-mobile-inline-cta .single_add_to_cart_button {
        height: 48px !important; border-radius: 12px !important; border: 0 !important; background: var(--smg-fill) !important;
    }
    .single-product.smg-card-v2 .summary .smg-q1-open { border-radius: 12px !important; }
    .single-product.smg-card-v2 .summary .engraving-button-wrapper { margin: 10px 0 0 !important; padding: 0 !important; text-align: left; }
    .single-product.smg-card-v2 .summary .engraving-button-wrapper .button {
        width: auto !important; height: auto !important; min-height: 0 !important;
        padding: 4px 0 !important; border: 0 !important; background: none !important; box-shadow: none !important;
        color: var(--smg-accent) !important; font: 600 14px/1.3 Montserrat, sans-serif !important; text-decoration: none !important;
    }
    .single-product.smg-card-v2 .summary .engraving-button-wrapper .add-engraving::before { content: "+\00a0"; }

    /* ---------- «Нужна помощь с выбором?» ---------- */
    .single-product.smg-card-v2 .summary .smg-card-help {
        display: block !important; order: 31;
        margin: 20px 0 0; padding: 20px 0 0; border: 0; border-top: 1px solid var(--smg-line); border-radius: 0; background: none;
    }
    .smg-card-help__title { font: 700 18px/1.25 Montserrat, sans-serif; color: var(--smg-ink, #211c1d); margin: 0 0 6px; }
    .smg-card-help__text { font-size: 14px; line-height: 1.4; color: var(--smg-muted, #6b6f74); margin: 0 0 12px; }
    .smg-card-help__btns { display: flex; gap: 10px; }
    .single-product .summary a.smg-card-help__btn {
        flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 8px;
        height: 48px; border: 1px solid var(--smg-soft-border, rgba(11,133,169,.24)); border-radius: 12px; background: #fff;
        color: var(--smg-accent, #0095cb) !important; font: 600 15px/1 Montserrat, sans-serif; text-decoration: none !important;
    }
    .single-product .summary a.smg-card-help__btn:active { background: #f1f9fc; }

    /* ---------- «Добавить в комплект» ---------- */
    .single-product.smg-card-v2 .summary .extra-products.smg-card-extras {
        order: 31; margin: 20px 0 0; padding: 20px 0 4px; border-bottom: 0; border-top: 1px solid var(--smg-line);
    }
    .single-product.smg-card-v2 .summary .extra-products.smg-card-extras h2 {
        font: 700 18px/1.25 Montserrat, sans-serif !important; color: var(--smg-ink) !important; margin: 0 0 12px !important;
    }
    .single-product.smg-card-v2 .summary .tobacco_shipping_warning { margin-top: 20px !important; }

    /* ---------- липкая панель: наличие над ценой, кнопка в том же стиле ---------- */
    .smg-card-stock { font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap; }
    .smg-card-stock::before {
        content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
        margin-right: 5px; vertical-align: 1px; background: currentColor;
    }
    .smg-card-stock--in { color: #1f9d55; }
    .smg-card-stock--out { color: #8a8f94; }
    .smogus-mobile-sticky-cta.smg-card-sticky { align-items: center; padding-top: 22px; }
    .smg-card-sticky__stock { position: absolute; left: 14px; top: 7px; }
    .smogus-mobile-sticky-cta.smg-card-sticky .smogus-mobile-sticky-cta__button { height: 40px !important; border-radius: 12px !important; }

    /* ---------- модалка «Добавить в комплект»: кнопки в общем стиле ---------- */
    body.smg-card-v2 .extra-products-modal .window .add_to_cart_button {
        display: flex !important; align-items: center; justify-content: center;
        height: 44px !important; min-height: 0 !important; padding: 0 12px !important; line-height: 1.2 !important;
        border: 0 !important; border-radius: 12px !important; background: #0091bf !important; color: #fff !important;
        font: 700 15px/1.2 Montserrat, sans-serif !important; white-space: nowrap;
    }

    .smg-card-toast {
        position: fixed; left: 16px; right: 16px; bottom: 96px; z-index: 10000; padding: 12px 14px;
        border-radius: 12px; background: #211c1d; color: #fff; font-size: 14px; line-height: 1.35;
        opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .2s, transform .2s;
    }
    .smg-card-toast.is-on { opacity: 1; transform: none; }
}
