/* =========================================================
   VOLTANA WISHLIST DRAWER
========================================================= */

.vt-wl {
	position: fixed;
	inset: 0;
	z-index: 1200;
	pointer-events: none;
}

.vt-wl__overlay {
	position: absolute;
	inset: 0;
	background: rgba(8, 16, 26, .42);
	backdrop-filter: blur(2px);
	opacity: 0;
	transition: opacity .25s ease;
}

.vt-wl__panel {
	position: absolute;
	top: 0;
	right: 0;
	width: min(460px, 100vw);
	height: 100%;
	background: #fff;
	box-shadow: -12px 0 28px rgba(7, 17, 27, .14);
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform .28s ease;
	border-left: 1px solid #e9eef4;
}

.vt-wl.is-open {
	pointer-events: auto;
}

.vt-wl.is-open .vt-wl__overlay {
	opacity: 1;
}

.vt-wl.is-open .vt-wl__panel {
	transform: translateX(0);
}

/* Head */
.vt-wl__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	border-bottom: 1px solid #edf2f7;
	background: linear-gradient(180deg, #fbfdff 0%, #f8fbff 100%);
}

.vt-wl__title {
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
	color: #111;
}

.vt-wl__close {
	width: 34px;
	height: 34px;
	border-radius: 999px;
	border: 1px solid #dfe7ef;
	background: #fff;
	color: #51606f;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	line-height: 1;
	transition: .2s ease;
}

.vt-wl__close:hover {
	color: #111;
	border-color: #cfd9e3;
	background: #f7fbff;
}

/* Body */
.vt-wl__body {
	flex: 1 1 auto;
	min-height: 0;
	overflow: auto;
	padding: 12px;
}

.vt-wl__items {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* Empty */
.vt-wl__empty {
	border: 1px dashed #dce7f0;
	border-radius: 16px;
	padding: 24px 16px;
	text-align: center;
	background: #fbfdff;
}

.vt-wl__empty-ic {
	font-size: 34px;
	line-height: 1;
	margin-bottom: 10px;
	color: #0d7edc;
}

.vt-wl__empty-title {
	font-size: 18px;
	font-weight: 700;
	color: #111;
	margin-bottom: 6px;
}

.vt-wl__empty-text {
	font-size: 13px;
	line-height: 1.5;
	color: #667586;
	margin-bottom: 14px;
}

.vt-wl__empty-btn {
	display: inline-flex;
}

/* Foot */
.vt-wl__foot {
	border-top: 1px solid #edf2f7;
	padding: 12px 16px 14px;
	background: #fff;
}

.vt-wl__all-btn {
	width: 100%;
	justify-content: center;
}

/* Item */
.vt-wl-item {
	position: relative;
	display: grid;
	grid-template-columns: 82px 1fr;
	gap: 10px;
	padding: 10px;
	border: 1px solid #e7edf3;
	border-radius: 14px;
	background: #fff;
	transition: box-shadow .2s ease, border-color .2s ease;
}

.vt-wl-item:hover {
	border-color: #d8e4f0;
	box-shadow: 0 8px 18px rgba(17, 17, 17, .05);
}

.vt-wl-item__img {
	width: 82px;
	height: 82px;
	border-radius: 10px;
	background: #f7fbff;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	text-decoration: none;
	border: 1px solid #edf2f7;
}

body.woocommerce-cart .wc-block-cart__sidebar .wc-block-components-title, body.woocommerce-cart .wc-block-cart__sidebar .wc-block-cart__totals-title {
    font-weight: 500;
}

.vt-wl-item__img img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
}

.vt-wl-item__info {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding-right: 28px;
}

.vt-wl-item__name {
	color: #111;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	text-decoration: none;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.vt-wl-item__name:hover {
	color: #0d7edc;
}

.vt-wl-item__meta {
	font-size: 12px;
	color: #72808e;
	line-height: 1.3;
}

.vt-wl-item__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.vt-wl-item__price {
	text-align: right;
	margin-left: auto;
}

.vt-wl-item__price-now {
	font-size: 14px;
	font-weight: 700;
	color: #111;
	white-space: nowrap;
}

.vt-wl-item__actions {
	margin-top: 2px;
}

.vt-wl-item__cart {
	min-height: 34px;
	padding: 0 12px;
	font-size: 13px;
	width: 100%;
	justify-content: center;
}

.vt-wl-item__cart.is-in-cart {
	background: #eaf7ee;
	color: #207a3b;
	border-color: #cfead7;
	box-shadow: none;
}

.vt-wl-item__remove {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 26px;
	height: 26px;
	border-radius: 999px;
	border: 1px solid #dee7f0;
	background: #fff;
	color: #5f6d7a;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	line-height: 1;
	transition: .2s ease;
}

.vt-wl-item__remove:hover {
	color: #c62828;
	border-color: #f0c7c7;
	background: #fff6f6;
}

/* Qty */
.vt-wl-qty {
	display: inline-flex;
	align-items: center;
	border: 1px solid #dbe5ef;
	border-radius: 999px;
	height: 32px;
	background: #fff;
}

.vt-wl-qty__btn {
	width: 30px;
	height: 30px;
	border: 0;
	background: transparent;
	color: #425364;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: .15s ease;
}

.vt-wl-qty__btn:hover {
	color: #0d7edc;
	background: #f5faff;
}

.vt-wl-qty__input {
	width: 34px;
	min-width: 34px;
	text-align: center;
	border: 0;
	background: transparent;
	font-size: 13px;
	font-weight: 600;
	color: #111;
	padding: 0;
	outline: none;
	-moz-appearance: textfield;
}

.vt-wl-qty__input::-webkit-outer-spin-button,
.vt-wl-qty__input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Busy states */
.vt-wl.is-loading .vt-wl__panel {
	cursor: progress;
}

.vt-wl-item.is-loading {
	opacity: .66;
	pointer-events: none;
}

.vt-wl-item button[disabled],
.vt-wl-item input[disabled] {
	cursor: not-allowed;
}

.vt-wl .vt-btn.is-loading,
.vt-wl-item__cart.is-loading {
	opacity: .72;
	pointer-events: none;
}

/* Header wishlist badge helper (если нет своих стилей) */
.voltana-header__icon-btn--wishlist {
	position: relative;
}

.voltana-header__badge--wishlist {
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 23px;
    height: 23px;
    border-radius: 999px;
    background: var(--color-light-blue);
    color: var(--color-white);
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    border: 2px solid var(--color-white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.voltana-header__badge--wishlist.is-empty {
	opacity: 0;
	transform: scale(.7);
}

/* Fallback buttons (если на странице нет общих vt-btn) */
.vt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 25px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--color-white);
    background: var(--light-gradient);
    box-shadow: 0 12px 28px rgba(28, 70, 93, .22);
    font-weight: 400;
    font-size: 16px;
    white-space: nowrap;
    transition: transform .2s 
ease, box-shadow .2s 
ease;
    border: none;
    cursor: pointer;
}



.vt-btn--primary:hover {
	transform: translateY(-1px);
}

.vt-btn--light {
	background: #fff;
	color: #1a2a3a;
	border-color: #dce7f0;
}

/* Mobile */
@media (max-width: 575px) {
	.vt-wl__panel {
		width: 100vw;
	}

	.vt-wl__body {
		padding: 10px;
	}

	.vt-wl-item {
		grid-template-columns: 72px 1fr;
		padding: 9px;
		gap: 9px;
	}

	.vt-wl-item__img {
		width: 72px;
		height: 72px;
	}

	.vt-wl-item__name {
		font-size: 13px;
	}

	.vt-wl-item__row {
		align-items: flex-start;
		flex-direction: column;
		gap: 6px;
	}

	.vt-wl-item__price {
		text-align: left;
		margin-left: 0;
	}
	body.woocommerce-cart .wp-block-woocommerce-cart, body.woocommerce-cart .wc-block-cart {
    max-width: 1440px;
    margin-inline: auto;
    padding: 10px;
    color: var(--vt-cart-text);
}
    body.woocommerce-cart .wc-block-cart {
        padding: 0;
    }
    .is-medium table.wc-block-cart-items .wc-block-cart-items__row, .is-mobile table.wc-block-cart-items .wc-block-cart-items__row, .is-small table.wc-block-cart-items .wc-block-cart-items__row {
    display: flex;
    grid-template-columns: 80px 132px;
    padding: 16px 16px;
    flex-direction: column;
}
    body.woocommerce-cart .wc-block-cart__submit-container .wc-block-cart__submit-button, body.woocommerce-cart .wc-block-cart__submit-container .wc-block-components-button {
        min-height: 52px;
        font-size: 14px;
    }
  body.woocommerce-cart .wc-block-cart-item__image a {
    width: 76px !important;
    height: 76px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 4px;
    box-sizing: border-box;
    overflow: hidden; /* можно visible, но обычно hidden аккуратнее */
  }

 /* Ячейка картинки */
  body.woocommerce-cart .wc-block-cart-item__image {
    width: 84px !important;
    min-width: 84px !important;
    max-width: 84px !important;
    padding: 10px !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

 /* 1) Ячейка с картинкой */
  body.woocommerce-cart .wc-block-cart-item__image {
    width: 86px !important;
    min-width: 86px !important;
    max-width: 86px !important;
    padding: 8px !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  /* 2) Ссылка/обертка картинки (Woo blocks) */
  body.woocommerce-cart .wc-block-cart-item__image a,
  body.woocommerce-cart .wc-block-cart-item__image a.wc-block-components-product-image,
  body.woocommerce-cart .wc-block-cart-item__image .wc-block-components-product-image {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 70px !important;
    min-width: 70px !important;
    max-width: 70px !important;
    height: 70px !important;
    min-height: 70px !important;
    max-height: 70px !important;

    margin: 0 !important;
    padding: 4px !important;
    box-sizing: border-box !important;

    overflow: hidden !important;
    position: relative !important;

    border-radius: 8px !important;
    line-height: 0 !important;
  }

  /* 3) Часто Woo сует внутреннюю обертку/спан */
  body.woocommerce-cart .wc-block-cart-item__image .wc-block-components-product-image__image,
  body.woocommerce-cart .wc-block-cart-item__image picture,
  body.woocommerce-cart .wc-block-cart-item__image figure,
  body.woocommerce-cart .wc-block-cart-item__image span {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;

    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    position: static !important;
    inset: auto !important;
  }

  /* 4) САМА КАРТИНКА: убиваем все absolute/cover/inline размеры */
  body.woocommerce-cart .wc-block-cart-item__image img,
  body.woocommerce-cart .wc-block-cart-item__image a img,
  body.woocommerce-cart .wc-block-cart-item__image .wc-block-components-product-image__image,
  body.woocommerce-cart .wc-block-components-product-image img {
    position: static !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;

    display: block !important;
    margin: 0 auto !important;
    padding: 0 !important;

    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 100% !important;
    max-height: 100% !important;

    object-fit: contain !important;
    object-position: center center !important;
    aspect-ratio: auto !important;
  }

  /* 5) Перебиваем width/height атрибуты <img width="..." height="..."> */
  body.woocommerce-cart .wc-block-cart-item__image img[width],
  body.woocommerce-cart .wc-block-cart-item__image img[height] {
    width: auto !important;
    height: auto !important;
  }
}