@import url('https://fonts.googleapis.com/css2?family=PT+Serif:wght@700&display=swap');

.rs-qm-wrapper {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 15px;
    width: 100%;
}

.rs-qm-btn,
.rs-qm-input {
    font-family: 'PT Serif', serif;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 3px;
    border: 1px solid #391002;
    cursor: pointer;
    padding: 6px 12px;
    transition: background-color 0.3s ease, color 0.3s ease, opacity 0.2s ease;
    white-space: nowrap;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    outline: none;
}

.rs-qm-btn:not(.active),
.rs-qm-input {
    color: #391002;
    background-color: #EDCCA8;
}

.rs-qm-btn.active,
.rs-qm-btn:hover {
    color: #EDCCA8;
    background-color: #391002;
}

.rs-qm-input {
    cursor: text;
    text-align: center;
    width: 65px;
    padding-right: 0;
}

.rs-qm-input::-webkit-outer-spin-button,
.rs-qm-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.rs-qm-input[type=number] {
    -moz-appearance: textfield;
}

/* Убираем стандартную ссылку WooCommerce "Просмотр корзины" */
a.added_to_cart,
.added_to_cart.wc-forward {
    display: none !important;
}

.to-cart a.loading,
.to-cart .elementor-button.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Toast */
.rs-qm-toast-container {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    pointer-events: none;
    width: calc(100% - 32px);
    max-width: 560px;
}

.rs-qm-toast {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #2e7d32;
    color: #ffffff;
    border-radius: 10px;
    padding: 14px 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: auto;
}

.rs-qm-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.rs-qm-toast.is-hiding {
    opacity: 0;
    transform: translateY(20px);
}

.rs-qm-toast__icon {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    line-height: 1;
}

.rs-qm-toast__content {
    flex: 1 1 auto;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
}

.rs-qm-toast__close {
    flex: 0 0 auto;
    appearance: none;
    border: none;
    background: transparent;
    color: #ffffff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    margin: 0;
    opacity: 0.9;
}

.rs-qm-toast__close:hover {
    opacity: 1;
}

@media (min-width: 769px) {
    .rs-qm-btn,
    .rs-qm-input {
        font-size: 0.83vw;
    }
}

@media (max-width: 768px) {
    .rs-qm-btn,
    .rs-qm-input {
        font-size: 4.2vw;
    }

    .rs-qm-toast-container {
        width: calc(100% - 20px);
        bottom: 16px;
    }

    .rs-qm-toast {
        padding: 12px 14px;
    }

    .rs-qm-toast__content {
        font-size: 13px;
    }
}
.rs-qm-cart-item-pack {
    font-weight: inherit;
    white-space: nowrap;
}
