/* Скрываем стандартную кнопку "В корзину" на странице магазина */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product a.button {
    display: none !important;
}

.custom-modal {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.custom-modal-content {
    background: #1d1d1f;
    display: flex;
    max-width: auto;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    flex-direction: row;
}

.custom-modal-left {
    flex: 1 0 100%;
    width: 100%;
    max-width: 560px;
}

.custom-modal-left img {
    width: 100%;
    max-width: 560px;
    height: auto;
    object-fit: cover;
}

.custom-modal-right {
    flex: 1;
    color: #fff;
    padding: 30px 25px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 400px;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 22px;
    color: #fff;
    cursor: pointer;
    
    background-color: #333333  !important;
    border-radius: 0px !important;
    padding: 15px !important;
}

.product-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 8px;
}

.product-weight {
    font-size: 14px;
    margin-bottom: 6px;
    color: #ccc;
}

.product-description {
    font-size: 14px;
    margin-bottom: 20px;
    color: #aaa;
}

.product-options {
    margin-bottom: auto;
}

.option-title {
    font-weight: 600;
    margin-bottom: 10px;
}

.product-options label {
    display: block;
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 15px;
}

.product-options input[type="radio"] {
    margin-right: 8px;
}

.add-button {
    color: #000 !important;
    background-color: #f2f2f2 !important;
    border: #1c5834 !important;
    position: relative;
    overflow: hidden;
    cursor: pointer !important;
    -webkit-user-select: none !important;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none !important;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: center;
    justify-content: center;
    width: 100% !important;
    height: 100%;
   /* padding: 0 8px 0 12px !important;*/
    font-size: 15px;
    font-weight: 500 !important;
    line-height: 20px !important;
    letter-spacing: -.15px;
    border-radius:10px !important;
}

.add-button:hover {
    background: #eee;
}

/* Стили для всплывающего сообщения */
.success-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #d4edda;
    color: #155724;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 10001; /* Выше модального окна */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    font-size: 14px;
}

.success-icon {
    margin-right: 10px;
    font-size: 16px;
}

.success-message a {
    color: #155724;
    text-decoration: underline;
    margin-left: 10px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .custom-modal-content {
        flex-direction: column;
    }

    .custom-modal-left,
    .custom-modal-right {
        width: 100%;
        flex: none;
    }

    .custom-modal-left img {
        height: auto;

    }

    .custom-modal-right {
        padding: 20px;
    }

    .add-button {
        width: 100%;
    }
}