/* Кнопка корзины */
.cart-button {
    position: fixed;
    top: 50%;
    right: 60px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    padding: 16px 17px 16px 15px;
    align-items: center;
    gap: 10px;
    border-radius: 14px;
    border: 1px solid #FFF;
    background: rgba(12, 29, 62, 0.50);
    transition: transform 0.1s ease;
}
.cart-button:hover {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}
#cart-count {
    color: white;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    position: absolute;
    right: -8px;
    top: -8px;
    border-radius: 999px;
    border: 1px solid #FFF;
    background: #FF6939;
}

.fly-to-cart {
    pointer-events: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.fly-to-cart img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Анимация кнопки корзины */
.cart-bounce {
    animation: cartBounce 0.3s ease;
}

@keyframes cartBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Для плавного изменения счетчика */
#cart-count {
    transition: transform 0.3s ease;
}

.cart-bounce #cart-count {
    animation: countPop 0.3s ease;
}

@keyframes countPop {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.4); }
}

/* Модальное окно корзины */
.cart-modal {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100%;
    background: white;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    z-index: 1000;
    overflow-y: auto;
}

.cart-modal.open {
    display: block;
}

.cart-header {
    background: #007cba;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.cart-content {
    padding: 20px;
}

/* Элементы корзины */
#cart-modal .cart-item {
    border-radius: 14px;
    border: 1px solid #FFF;
    background: rgba(29, 43, 63, 0.50);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    align-self: stretch;
    overflow: hidden;
}

#cart-modal .cart-item-image {
    display: flex;
    width: 100px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    align-self: stretch;
}

#cart-modal .cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

#cart-modal .cart-item-details {
    display: flex;
    padding: 12px 20px;
    align-items: center;
    gap: 12px;
    flex: 1 0 0;
}
#cart-modal .cart-item-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    flex: 1 0 0;
}
#cart-modal .cart-item-description {
    display: flex;
    height: 48px;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    align-self: stretch;
}
#cart-modal .cart-item-options {
    font-size:12px;
}
#cart-modal .cart-item h4 {
    flex: 1 0 0;
	align-self: stretch;
	color: #FFF;
	font-family: Forum;
	font-size: 20px;
	font-style: normal;
	font-weight: 400;
	line-height: 24px;
	text-transform: uppercase;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	text-overflow: ellipsis;
}
#cart-modal .cart-item-prices {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    align-self: stretch;
}
#cart-modal .cart-item-price {
    color: #FFF;
    font-variant-numeric: lining-nums proportional-nums;
    font-family: Raleway;
    font-size: 17px;
    font-style: normal;
    font-weight: 600;
    line-height: 24px; /* 141.176% */
}
#cart-modal .cart-item-old-price {
    color: #FFF;
    font-variant-numeric: lining-nums proportional-nums;
    font-family: Raleway;
    font-size: 17px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px; /* 141.176% */
    text-decoration-line: line-through;
    opacity: 0.25;
}
/* #cart-modal .cart-item-quantity {
    margin: 10px 0;
} */
/* #cart-modal .cart-item-quantity input {
    width: 60px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
} */

/* #cart-modal .cart-item-total {
    font-weight: bold;
    color: #007cba;
} */
#cart-modal .cart-item-actions {
    display: flex;
    min-width: 80px;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    align-self: stretch;
}
#cart-modal .cart-item-counter {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    align-self: stretch;
}
#cart-modal .cart-item-minus {
    width: 20px;
    height: 20px;
    cursor: pointer;
    background: transparent;
	border: 0;
    padding: 0;
	margin: 0;
}
#cart-modal .cart-item-plus {
    width: 20px;
    height: 20px;
    cursor: pointer;
    background: transparent;
	border: 0;
    padding: 0;
	margin: 0;
}
#cart-modal .cart-inputs {
    align-items: flex-start;
    align-content: flex-start;
    gap: 12px;
    align-self: stretch;
    display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
#cart-modal .remove-item {
	background: transparent;
	color: white;
	border: none;
	width: 12px;
	height: 12px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	padding: 0;
	display: flex;
	margin-top: 6px;
	align-items: center;
}

#cart-modal .remove-item:hover svg {
    fill: #ff4757;
}
#cart-modal .cart__form {
    max-width: 580px;
}
/* Итоги и действия */
#cart-modal .total_price {
    padding-left: 10px;
	display: flex;
	align-items: center;
}

.cart-empty {
    text-align: center;
    padding: 40px 20px;
    color: #fff;
    font-size: 20px;
}

/* Уведомления */
.cart-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #4CAF50;
    color: white;
    padding: 15px 25px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1001;
}

.cart-notification.show {
    transform: translateY(0);
    opacity: 1;
}

#cart-modal .modal__content {
    max-width: 840px;
    padding: 50px 130px;
}
#cart-modal svg.bg__svg {
    position:absolute;
    top: 0;
    left: 0;
}
#cart-modal .modal__body, #cart-modal .modal__header {
    position: relative;
	z-index: 10;
}
#cart-modal .cart-wrapper {
    display: flex;
    max-width: 580px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    width: 100%;
}
#cart-modal .text-center {
    text-align: center;
}
#cart-modal .cart-delivery .inputs-group {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    align-self: stretch;
}
#cart-modal .cart-delivery {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
#cart-modal .cdek-info-wrap {
	width: 100%;
}
#cart-modal .cart-delivery-info .delivery-option {
    display: none;
}
#cart-modal .cart-delivery-info .delivery-option.active {
    display: flex;
}
#cart-modal .delivery-option {
	flex-direction: column;
	gap: 12px;
}
#cart-modal .cdek-types {
	display: flex;
	align-items: center;
	justify-content: center;
    gap:20px;
}
#cart-modal .cdek-option {
    display: none;
    flex-direction: column;
    gap:12px;    
}
#cart-modal .cdek-option.active {
    display: flex;
}
.cart__form .form__row-wrap_promocode .promocode__btn_apply {
	-ms-flex-negative: 0;
	flex-shrink: 0;
	background-color: var(--color-2);
	-webkit-transition: background-color .3s ease-in-out;
	transition: background-color .3s ease-in-out;
	color: #fff;
	font-size: 14px;
	text-transform: uppercase;
	border-radius: 100px;
	padding: 0 17px;
	width: auto;
}
.cart__form .form__row-wrap_promocode .promocode__btn_apply, .cart__form .form__row-wrap_promocode .promocode__btn_delete {
	position: absolute;
	top: 0;
	right: 0;
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-pack: center;
	-ms-flex-pack: center;
	justify-content: center;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	width: 58px;
	height: 58px;
	padding: 0;
	border: 0;
	outline: 0;
	background-color: rgba(0,0,0,0);
	cursor: pointer;
}
.cart__form .form__row-wrap_promocode .promocode__btn_apply:focus-visible, .cart__form .form__row-wrap_promocode .promocode__btn_apply:hover {
	background-color: var(--color-2-hover);
}
.cart__form .form__row-wrap_promocode .promocode__btn_delete {
	display: none;
}
.product_option {
	margin-bottom: 20px;
}
.product_option .custom-select.open .select-content {
    width:100% !important;
}
#cart-modal .cart-item-minus:disabled {
	cursor: unset;
	opacity: 0.2;
}
.post-type-archive-products main, .post-type-archive-products footer, .single-products main, .single-products footer {
    z-index: unset;
}
button.btn.link.add-to-cart:active {
	transform: scale(0.95);
}
.link.form-submit:after {
    content: unset;
}
.link.form-submit span.total_price::before {
	content: "";
	width: 28px;
	height: 28px;
	background: url(/wp-content/themes/astrooma/new-astrooma/img/icons/ic_star_white.svg) center no-repeat rgba(0, 0, 0, 0);
	display: inline-flex;
	margin-right: 10px;
}
.link.form-submit span.total_old_price {
    color: #FFF;
    text-align: center;
    font-variant-numeric: lining-nums proportional-nums;
    font-family: Raleway;
    font-size: 17px;
    font-style: normal;
    font-weight: 500;
    line-height: 24px; /* 141.176% */
    text-decoration-line: line-through;
    opacity: 0.5;
}
.cdek-map .mobile {
    display: block !important;
}
.form-input.error {
    border-color: red !important;
}
input.error + .custom-checkbox__checkbox:after {
	border-color: red;
}

#cart-modal .cart-delivery-info {
	width: 100%;
}

/* Автокомплит */
#cart-modal .autocomplete-wrapper {
    position: relative;
}

#cart-modal .autocomplete-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: transparent;
    border: 1px solid var(--color-4);
	border-radius: 30px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    transition: opacity .3s ease-in-out;
    overflow-y: scroll;
    -webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	scrollbar-width: thin;
	scrollbar-color: var(--color-4) var(--color-3);
    margin-top: 10px;
}

#cart-modal .autocomplete-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--color-4);
    transition: background 0.2s;
}

#cart-modal .autocomplete-item:hover,
#cart-modal .autocomplete-item.hover {
    background: var(--color-1);
}

#cart-modal .autocomplete-item:last-child {
    border-bottom: none;
}

#cart-modal .autocomplete-item strong {
    display: block;
    margin-bottom: 2px;
    color: #333;
}

#cart-modal .autocomplete-item small {
    color: #666;
    font-size: 12px;
}

#cart-modal .autocomplete-item.no-results {
    color: #999;
    font-style: italic;
    cursor: default;
}

.autocomplete-item mark {
    background: #fff9c4;
    padding: 0 2px;
    border-radius: 2px;
}

.dots-loader {
	justify-content: center;
	align-items: center;
	height: 15px;
	position: absolute;
	right: 23px;
	top: 37%;
    display: none;
}
.preloader .dots-loader {
    display: flex;
}
.dots-loader div {
    width: 8px;
    height: 8px;
    margin: 0 3px;
    background-color: #3498db;
    border-radius: 50%;
    animation: dots 1.4s infinite ease-in-out both;
}

.dots-loader div:nth-child(1) {
    animation-delay: -0.32s;
}

.dots-loader div:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes dots {
    0%, 80%, 100% { 
        transform: scale(0);
        opacity: 0.3;
    } 40% { 
        transform: scale(1);
        opacity: 1;
    }
}

@media(max-width: 580px) {
    #cart-modal .modal__content {
        max-width: 840px;
        padding: 10px 10px;
    }
    #cart-modal .link.form-submit span.total_old_price {
        display: none;
    }
    .cart-button {
        right: 12px;
    }
    #cart-modal .modal__title {
		font-size: 22px;
	}
}