/* Poliana — количка. Само визия върху стандартния шаблон на WooCommerce (Astra). */

/* ---------- рамка: без бялата кутия на Astra ---------- */
.pl.woocommerce-cart #primary { margin-top: clamp(24px, 4vw, 56px); margin-bottom: clamp(48px, 6vw, 80px); }
.pl.woocommerce-cart #content > .ast-container { max-width: var(--pl-wrap); padding-left: var(--pl-gutter); padding-right: var(--pl-gutter); }
.pl.woocommerce-cart .ast-article-single, .pl.woocommerce-cart article.page { padding: 0 !important; background: transparent !important; box-shadow: none; }
.pl.woocommerce-cart .entry-header { display: none; }

/* ---------- заглавие ---------- */
.pl-cart-head { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: clamp(20px, 3vw, 36px); }
.pl .pl-cart-head__title { margin: 0; font-family: var(--pl-serif); font-weight: 500; font-size: clamp(44px, 6vw, 80px); line-height: 1; letter-spacing: -.025em; color: var(--pl-ink); }
.pl-cart-head__count { padding: 6px 14px; border-radius: 99px; background: var(--pl-paper); font-size: 14px; font-weight: 600; color: var(--pl-ink-soft); }

/* ---------- две колони: продукти | обобщение ---------- */
.pl.woocommerce-cart .entry-content > .woocommerce:has(.woocommerce-cart-form) { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); gap: 0 clamp(24px, 3vw, 48px); align-items: start; }
.pl.woocommerce-cart .woocommerce-notices-wrapper { grid-column: 1 / -1; }
.pl.woocommerce-cart .woocommerce-cart-form { grid-column: 1; margin: 0; }
.pl.woocommerce-cart .cart-collaterals { grid-column: 2; grid-row: span 3; position: sticky; top: 108px; width: auto; }
.pl.woocommerce-cart .cart-collaterals .cart_totals { float: none; width: 100%; }

/* продуктите като карти */
.pl.woocommerce-cart table.shop_table.cart { display: block; margin: 0; border: 0; border-radius: 0; background: none; }
.pl.woocommerce-cart table.shop_table.cart thead { display: none; }
.pl.woocommerce-cart table.shop_table.cart tbody { display: grid; gap: 12px; }
.pl.woocommerce-cart table.shop_table.cart tr.cart_item { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr) auto auto; grid-template-areas: "img name qty total" "img price qty total"; gap: 4px 24px; align-items: center; padding: 16px 56px 16px 16px; border-radius: 22px; background: var(--pl-paper); }
.pl.woocommerce-cart table.shop_table.cart td { display: block; padding: 0 !important; border: 0 !important; background: none !important; text-align: left !important; }
.pl.woocommerce-cart table.shop_table.cart td::before { display: none !important; }
.pl.woocommerce-cart td.product-thumbnail { grid-area: img; }
.pl.woocommerce-cart td.product-thumbnail a { display: block; width: 96px; height: 96px; border-radius: 16px; overflow: hidden; background: var(--pl-studio); }
.pl.woocommerce-cart td.product-thumbnail img { width: 100% !important; max-width: none !important; height: 100%; object-fit: cover; mix-blend-mode: multiply; }
.pl.woocommerce-cart td.product-name { grid-area: name; align-self: end; }
.pl.woocommerce-cart td.product-name a { font-family: var(--pl-serif); font-size: 21px; line-height: 1.2; color: var(--pl-ink); text-decoration: none; }
.pl.woocommerce-cart td.product-name a:hover { color: var(--pl-green); }
.pl.woocommerce-cart td.product-name .variation { margin: 4px 0 0; font-size: 13px; color: var(--pl-ink-soft); }
.pl.woocommerce-cart td.product-name .variation dt, .pl.woocommerce-cart td.product-name .variation dd { display: inline; margin: 0; float: none; }
.pl.woocommerce-cart td.product-name .variation dd p { display: inline; margin: 0; }
.pl.woocommerce-cart td.product-price { grid-area: price; align-self: start; font-size: 14px; color: var(--pl-ink-soft); }
.pl.woocommerce-cart td.product-quantity { grid-area: qty; }
.pl.woocommerce-cart td.product-subtotal { grid-area: total; min-width: 120px; text-align: right !important; font-weight: 600; font-size: 17px; color: var(--pl-ink); }
.pl.woocommerce-cart .entry-content .secondary-currency { font-size: .82em; font-weight: 500; color: var(--pl-ink-soft); }
.pl.woocommerce-cart td.product-subtotal .secondary-currency { display: block; }

/* количество */
.pl.woocommerce-cart td.product-quantity .quantity { display: inline-flex; align-items: center; height: 44px; margin: 0 !important; border: 1px solid var(--pl-line); border-radius: 12px; background: var(--pl-field); overflow: hidden; }
.pl.woocommerce-cart td.product-quantity .quantity .minus, .pl.woocommerce-cart td.product-quantity .quantity .plus { display: grid; place-items: center; width: 36px; height: 100%; border: 0; background: none; color: var(--pl-ink); font-size: 18px; text-decoration: none; }
.pl.woocommerce-cart td.product-quantity .quantity .minus:hover, .pl.woocommerce-cart td.product-quantity .quantity .plus:hover { background: var(--pl-field-deep); }
.pl.woocommerce-cart td.product-quantity .quantity input.qty { width: 36px; height: 100%; padding: 0; border: 0; background: none; text-align: center; font: 600 15px var(--pl-sans); color: var(--pl-ink); box-shadow: none; }

/* махане */
.pl.woocommerce-cart td.product-remove { position: absolute !important; top: 12px; right: 12px; }
.pl.woocommerce-cart td.product-remove a.remove { position: relative; display: grid !important; place-items: center; width: 38px !important; height: 38px !important; border-radius: 12px !important; background: var(--pl-field) !important; color: transparent !important; font-size: 0 !important; line-height: 0 !important; transition: background .2s; }
.pl.woocommerce-cart td.product-remove a.remove > *, .pl.woocommerce-cart td.product-remove a.remove svg { display: none !important; } /* иконката на Astra е обвита в span, който заема втори ред */
.pl.woocommerce-cart td.product-remove a.remove::before { content: ""; position: static !important; display: block; width: 22px !important; height: 22px !important; margin: 0 !important; background: var(--pl-ink); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6.5 6.5l11 11M17.5 6.5l-11 11'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6.5 6.5l11 11M17.5 6.5l-11 11'/%3E%3C/svg%3E") center / contain no-repeat; } /* Astra позиционира иконката абсолютно в ъгъла */
.pl.woocommerce-cart td.product-remove a.remove:hover { background: #F4E6E8 !important; }
.pl.woocommerce-cart td.product-remove a.remove:hover::before { background: var(--pl-wine); }

/* ред с промо код и обновяване */
.pl.woocommerce-cart table.shop_table.cart tr:not(.cart_item) { display: block; margin-top: 4px; }
.pl.woocommerce-cart table.shop_table.cart td.actions { display: flex !important; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 0 !important; }
.pl.woocommerce-cart td.actions .coupon { position: relative; display: flex; gap: 8px; flex: 1 1 320px; max-width: 460px; margin: 0 !important; padding: 0 !important; float: none; } /* Astra му дава отстъп отляво */
.pl.woocommerce-cart td.actions .coupon::before { content: ""; position: absolute; left: 14px; top: 50%; z-index: 1; width: 18px; height: 18px; margin-top: -9px; background: var(--pl-ink-soft); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12V4h8l9 9-8 8-9-9z'/%3E%3Ccircle cx='7.5' cy='7.5' r='1.5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12V4h8l9 9-8 8-9-9z'/%3E%3Ccircle cx='7.5' cy='7.5' r='1.5'/%3E%3C/svg%3E") center / contain no-repeat; pointer-events: none; }
.pl.woocommerce-cart td.actions .coupon input#coupon_code { flex: 1; width: auto !important; min-width: 0; height: 46px; margin: 0; padding: 0 14px 0 42px; border: 1px solid var(--pl-line); border-radius: 12px; background: var(--pl-paper); font: 400 15px var(--pl-sans); color: var(--pl-ink); }
.pl.woocommerce-cart td.actions .coupon input#coupon_code:focus { outline: none; border-color: var(--pl-green); }
.pl.woocommerce-cart td.actions .button { height: 46px; margin: 0 !important; padding: 0 20px !important; border: 1px solid var(--pl-ink) !important; border-radius: 12px !important; background: transparent !important; color: var(--pl-ink) !important; font: 600 14px/1 var(--pl-sans) !important; text-transform: none !important; letter-spacing: normal !important; white-space: nowrap; }
.pl.woocommerce-cart td.actions .button:hover { background: var(--pl-ink) !important; color: var(--pl-field) !important; }
.pl.woocommerce-cart td.actions .button:disabled, .pl.woocommerce-cart td.actions .button[disabled] { opacity: .35; border-color: var(--pl-line) !important; background: transparent !important; color: var(--pl-ink) !important; cursor: default; }

/* ---------- обобщение ---------- */
.pl.woocommerce-cart .cart_totals { padding: clamp(22px, 2.6vw, 32px); border: 0; border-radius: 26px; background: var(--pl-paper); }
.pl.woocommerce-cart .cart_totals > h2 { margin: 0 0 16px; padding: 0; border: 0; background: none; font-family: var(--pl-serif); font-weight: 500; font-size: 26px; line-height: 1.2; color: var(--pl-ink); }
.pl.woocommerce-cart .cart_totals table.shop_table { margin: 0 0 18px; border: 0; border-radius: 0; }
.pl.woocommerce-cart .cart_totals table.shop_table tr { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-top: 1px solid var(--pl-line); }
.pl.woocommerce-cart .cart_totals table.shop_table th, .pl.woocommerce-cart .cart_totals table.shop_table td { padding: 0 !important; border: 0 !important; background: none !important; width: auto; font-size: 15px; font-weight: 500; color: var(--pl-ink-soft); }
.pl.woocommerce-cart .cart_totals table.shop_table td { text-align: right !important; color: var(--pl-ink); }
.pl.woocommerce-cart .cart_totals table.shop_table td::before { display: none !important; }
.pl.woocommerce-cart .cart_totals table.shop_table tr.order-total th { font-weight: 600; color: var(--pl-ink); }
.pl.woocommerce-cart .cart_totals table.shop_table tr.order-total td { font-size: 24px; font-weight: 700; }
.pl.woocommerce-cart .cart_totals table.shop_table tr.order-total td strong { font-weight: 700; }
.pl.woocommerce-cart .cart_totals table.shop_table tr.order-total .secondary-currency { display: block; font-size: 15px; }
.pl.woocommerce-cart .cart_totals .woocommerce-shipping-totals td { font-size: 14px; }
.pl.woocommerce-cart .wc-proceed-to-checkout { padding: 0; }
.pl.woocommerce-cart .wc-proceed-to-checkout a.checkout-button { display: flex !important; align-items: center; justify-content: center; gap: 10px; height: 56px; margin: 0 !important; padding: 0 24px !important; border: 0; border-radius: 14px !important; background: var(--pl-primary) !important; color: var(--pl-paper) !important; font: 600 17px/1 var(--pl-sans) !important; text-transform: none !important; letter-spacing: normal !important; transition: background .2s; }
.pl.woocommerce-cart .wc-proceed-to-checkout a.checkout-button::after { content: ""; width: 18px; height: 18px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform .2s; }
.pl.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover { background: var(--pl-primary-hover) !important; }
.pl.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover::after { transform: translateX(3px); }

.pl-cart-notes { list-style: none; margin: 18px 0 0; padding: 16px 0 0; display: grid; gap: 10px; border-top: 1px solid var(--pl-line); }
.pl-cart-notes li { position: relative; padding-left: 30px; font-size: 14px; line-height: 1.45; color: var(--pl-ink-soft); }
.pl-cart-notes li::before { content: ""; position: absolute; left: 0; top: 1px; width: 18px; height: 18px; background: var(--pl-green); }
.pl-cart-notes__truck::before { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h11v10H3z'/%3E%3Cpath d='M14 10h4l3 3v3h-7'/%3E%3Ccircle cx='7' cy='17.5' r='1.8'/%3E%3Ccircle cx='17.5' cy='17.5' r='1.8'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h11v10H3z'/%3E%3Cpath d='M14 10h4l3 3v3h-7'/%3E%3Ccircle cx='7' cy='17.5' r='1.8'/%3E%3Ccircle cx='17.5' cy='17.5' r='1.8'/%3E%3C/svg%3E") center / contain no-repeat; }
.pl-cart-notes__leaf::before { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 5C11 5 5 9 5 15.5c0 1.5.5 2.7 1.2 3.7C13.5 19 19 14 19 5z'/%3E%3Cpath d='M4 21c3-4.5 6.5-7.5 11-10'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 5C11 5 5 9 5 15.5c0 1.5.5 2.7 1.2 3.7C13.5 19 19 14 19 5z'/%3E%3Cpath d='M4 21c3-4.5 6.5-7.5 11-10'/%3E%3C/svg%3E") center / contain no-repeat; }

/* ---------- празна количка ---------- */
.pl.woocommerce-cart .cart-empty { margin: 0 0 20px; padding: 28px 28px 28px 28px !important; border: 0 !important; border-radius: 22px; background: var(--pl-paper) !important; font-size: 18px; color: var(--pl-ink); }
.pl.woocommerce-cart .cart-empty::before { display: none !important; }
.pl.woocommerce-cart .return-to-shop .button { display: inline-flex; align-items: center; height: 50px; padding: 0 24px !important; border-radius: 99px !important; background: var(--pl-ink) !important; color: var(--pl-field) !important; font: 600 15px/1 var(--pl-sans) !important; text-transform: none !important; }

@media (max-width: 960px) {
	.pl.woocommerce-cart .entry-content > .woocommerce:has(.woocommerce-cart-form) { grid-template-columns: 1fr; gap: 24px; }
	.pl.woocommerce-cart .cart-collaterals { grid-column: 1; grid-row: auto; position: static; }
}
@media (max-width: 600px) {
	.pl.woocommerce-cart table.shop_table.cart tr.cart_item { grid-template-columns: 76px minmax(0, 1fr); grid-template-areas: "img name" "img price" "qty total"; gap: 6px 14px; padding: 14px 50px 14px 14px; }
	.pl.woocommerce-cart td.product-thumbnail a { width: 76px; height: 76px; }
	.pl.woocommerce-cart td.product-name a { font-size: 18px; }
	.pl.woocommerce-cart td.product-quantity { margin-top: 8px; }
	.pl.woocommerce-cart td.product-subtotal { margin-top: 8px; min-width: 0; }
	.pl.woocommerce-cart td.actions .coupon { max-width: none; }
	.pl.woocommerce-cart td.actions .button[name="update_cart"] { width: 100%; }
}
