/* TH-038: classic cart + checkout, same look as the former block pages (green-soft summary, rounded fields, tiles). */
body.th-home.woocommerce-cart .page-main .page-content,body.th-home.woocommerce-checkout .page-main .page-content{max-width:none}

/* Fields */
body.th-home .woocommerce form .form-row{margin:0 0 14px;padding:0}
body.th-home .woocommerce form .form-row label{font-size:14px;font-weight:700;margin-bottom:5px;display:block;color:var(--ink)}
body.th-home .woocommerce form .form-row .optional{font-weight:400;color:var(--muted)}
body.th-home .woocommerce form .form-row .required{color:var(--cta);text-decoration:none;border:0}
body.th-home .woocommerce form .form-row input.input-text,body.th-home .woocommerce form .form-row textarea,body.th-home .woocommerce form .form-row select{width:100%;height:50px;border:1px solid #cfd6c4;border-radius:var(--radius-sm,10px);padding:0 14px;background:#fff;font:inherit;font-size:16px;color:var(--ink);box-sizing:border-box}
body.th-home .woocommerce form .form-row textarea{height:96px;padding:12px 14px}
body.th-home .woocommerce form .form-row input.input-text:focus,body.th-home .woocommerce form .form-row textarea:focus{border-color:var(--green-dark);outline:none;box-shadow:0 0 0 3px #4f7a0a33}
body.th-home .woocommerce form .form-row.woocommerce-invalid input.input-text{border-color:#c0392b}
body.th-home .woocommerce form .form-row .description{display:block;font-size:13px;color:var(--muted);margin-top:6px;line-height:1.45;background:none;padding:0;position:static}
body.th-home .woocommerce form .form-row .description::before{display:none}
body.th-home .woocommerce form .form-row-first,body.th-home .woocommerce form .form-row-last{width:calc(50% - 6px)}
body.th-home .woocommerce form .form-row-first{float:left}body.th-home .woocommerce form .form-row-last{float:right}
body.th-home #billing_country_field{display:none!important} /* one country — Bulgaria */

/* Checkout layout: form left, summary right (desktop); one column on phones */
body.th-home form.checkout{display:grid;grid-template-columns:minmax(0,1fr) 400px;gap:16px 40px;align-items:start}
body.th-home form.checkout>*{grid-column:1}
body.th-home form.checkout #order_review_heading{display:none}
body.th-home form.checkout #order_review{grid-column:2;grid-row:1 / span 20;position:sticky;top:24px;background:var(--green-soft);border:1px solid var(--green-tint);border-radius:var(--radius);padding:22px 26px 24px}
body.th-home form.checkout #order_review::before{content:"Обобщение на поръчката";display:block;font-size:20px;font-weight:700;color:var(--ink);margin:0 0 6px}
body.th-home form.checkout .woocommerce-NoticeGroup{grid-column:1 / -1}
body.th-home .woocommerce-checkout .col2-set{width:auto;float:none}
body.th-home .woocommerce-checkout .col2-set .col-1,body.th-home .woocommerce-checkout .col2-set .col-2{width:auto;float:none;padding:0;max-width:none}
body.th-home .woocommerce-checkout .col2-set::after{content:"";display:table;clear:both}
body.th-home form.checkout h3{font-size:20px;margin:8px 0 14px}
body.th-home .woocommerce-billing-fields__field-wrapper::after{content:"";display:table;clear:both}
body.th-home .woocommerce-checkout .woocommerce-shipping-fields:empty{display:none}

/* Delivery picker block */
body.th-home .twd-classic-wrap{margin:8px 0 6px}
body.th-home .twd-classic-wrap[hidden]{display:none}
body.th-home .twd-classic-title{font-size:20px;margin:8px 0 4px}
body.th-home #twd-classic{min-height:96px}

/* Order note toggle */
body.th-home .woocommerce-additional-fields>h3{display:none}
body.th-home .th-note-toggle{display:flex;align-items:center;gap:10px;font-size:15px;cursor:pointer;margin:6px 0 12px}
body.th-home .th-note-toggle input{width:20px;height:20px;accent-color:var(--green-dark)}

/* Summary table */
body.th-home .woocommerce-checkout-review-order-table{width:100%;border-collapse:collapse;margin:0 0 16px;font-size:15px;border:0;background:none}
body.th-home .woocommerce-checkout-review-order-table th,body.th-home .woocommerce-checkout-review-order-table td{padding:12px 0;border:0;border-bottom:1px solid var(--green-tint);background:none;text-align:left;vertical-align:top}
body.th-home .woocommerce-checkout-review-order-table thead{display:none}
body.th-home .woocommerce-checkout-review-order-table td.product-total,body.th-home .woocommerce-checkout-review-order-table tfoot td{text-align:right;white-space:nowrap}
body.th-home .woocommerce-checkout-review-order-table .product-name{font-weight:700;line-height:1.4;padding-right:12px}
body.th-home .woocommerce-checkout-review-order-table .product-quantity{font-weight:400;color:var(--muted)}
body.th-home .woocommerce-checkout-review-order-table tfoot th{font-weight:400}
body.th-home .woocommerce-checkout-review-order-table .order-total th,body.th-home .woocommerce-checkout-review-order-table .order-total td{font-size:20px;font-weight:700;border-bottom:0;padding-top:16px}
body.th-home .woocommerce-checkout-review-order-table .woocommerce-shipping-methods{list-style:none;margin:0;padding:0}
body.th-home .woocommerce-checkout-review-order-table .woocommerce-shipping-methods li{margin:0}
body.th-home .woocommerce-checkout-review-order-table .woocommerce-shipping-methods input[type=radio]{display:none}
body.th-home .woocommerce-checkout-review-order-table .woocommerce-shipping-totals td{white-space:normal}

/* Payment + button */
body.th-home #payment{background:none;border-radius:0}
body.th-home #payment ul.payment_methods{list-style:none;margin:0 0 14px;padding:0;border:0}
body.th-home #payment ul.payment_methods li{border:1.5px solid var(--green-dark);border-radius:var(--radius-sm,10px);background:#fff;padding:12px 14px;margin:0}
body.th-home #payment ul.payment_methods li label{font-weight:700;margin-left:6px}
body.th-home #payment ul.payment_methods li input{accent-color:var(--green-dark)}
body.th-home #payment div.payment_box{background:none;padding:6px 0 0;margin:0;font-size:14px;color:var(--muted)}
body.th-home #payment div.payment_box::before{display:none}
body.th-home #payment .form-row.place-order{padding:0;margin:0}
body.th-home .th-terms{font-size:13px;color:var(--muted);margin:0 0 14px;line-height:1.5}
body.th-home .th-terms a{color:var(--green-dark)}
body.th-home #place_order{display:block;width:100%;float:none;min-height:54px;border:0;border-radius:999px;background:var(--cta,#c2410c);color:#fff;font-size:17px;font-weight:700;cursor:pointer}
body.th-home #place_order:hover{filter:brightness(.95)}
/* WooCommerce на компютър: #payment #place_order{float:right} (2 ID) — бутонът плаваше и гаранциите лепнаха за него */
body.th-home #payment #place_order{float:none;width:100%;margin:0}
body.th-home #payment #place_order:hover,body.th-home #payment #place_order:focus{background:var(--cta,#c2410c);color:#fff;filter:brightness(.92)}
body.th-home .woocommerce-checkout .blockUI.blockOverlay{background:rgba(243,247,234,.6)!important}

/* Reassurance */
body.th-home .th-assure{list-style:none;margin:16px 0 0;padding:14px 16px;background:#fff;border:1px solid var(--line);border-radius:var(--radius);display:grid;gap:8px;font-size:13px;line-height:1.5;color:var(--muted)}
body.th-home .th-assure b{color:var(--ink)}
body.th-home .th-assure li{padding-left:22px;position:relative}
body.th-home .th-assure li::before{content:"✓";position:absolute;left:0;color:var(--green-dark);font-weight:700}
body.th-home .th-assure a{color:var(--green-dark);font-weight:700}
body.th-home .th-continue{display:inline-block;margin-top:14px;color:var(--green-dark);font-weight:700;font-size:14px}

/* Notices */
body.th-home .woocommerce-error,body.th-home .woocommerce-message,body.th-home .woocommerce-info{border-radius:var(--radius-sm,10px);border:0;padding:14px 16px;list-style:none;margin:0 0 16px}
body.th-home .woocommerce-error{background:#fde4e1;color:#8a1c12}
body.th-home .woocommerce-info{background:var(--green-soft);color:var(--ink)}
body.th-home .woocommerce-error::before,body.th-home .woocommerce-message::before,body.th-home .woocommerce-info::before{display:none}
body.th-home .woocommerce-form-coupon-toggle .woocommerce-info{font-size:14px}

/* Cart */
body.th-home .woocommerce-cart .woocommerce{display:grid;grid-template-columns:minmax(0,1fr) 400px;gap:24px 40px;align-items:start}
body.th-home .woocommerce-cart .woocommerce>*{grid-column:1}
body.th-home .woocommerce-cart .woocommerce>.cart-collaterals{grid-column:2;grid-row:1 / span 4}
body.th-home .woocommerce-cart .woocommerce>.woocommerce-notices-wrapper{grid-column:1 / -1}
body.th-home table.shop_table.cart{width:100%;border-collapse:collapse;border:0;margin:0}
body.th-home table.shop_table.cart thead th{font-size:12px;letter-spacing:.08em;color:var(--muted);text-transform:uppercase;font-weight:400;border-bottom:1px solid var(--line);padding:10px 8px;text-align:left}
body.th-home table.shop_table.cart td{border:0;border-bottom:1px solid var(--line);padding:20px 8px;vertical-align:middle;background:none}
body.th-home table.shop_table.cart td.product-thumbnail img{width:100px;height:100px;object-fit:contain;border:1px solid var(--line);border-radius:var(--radius-sm,10px);background:#fff;padding:6px;box-sizing:border-box}
body.th-home table.shop_table.cart td.product-name a{font-weight:700;color:var(--ink);text-decoration:none;font-size:15px;line-height:1.4}
body.th-home table.shop_table.cart td.product-remove a.remove{display:inline-grid;place-items:center;width:32px;height:32px;border-radius:50%;color:var(--muted)!important;font-size:22px;text-decoration:none}
body.th-home table.shop_table.cart td.product-remove a.remove:hover{background:#fde4e1;color:#8a1c12!important}
body.th-home table.shop_table.cart .quantity .qty{width:72px;height:44px;border:1px solid var(--line);border-radius:999px;text-align:center;font:inherit}
body.th-home table.shop_table.cart td.actions{padding:16px 0;text-align:right}
body.th-home table.shop_table.cart td.actions .coupon{float:left;display:flex;gap:8px}
body.th-home table.shop_table.cart td.actions .coupon input{height:44px;border:1px solid var(--line);border-radius:999px;padding:0 16px;font:inherit}
body.th-home table.shop_table.cart td.actions .button{height:44px;border-radius:999px;padding:0 18px;border:1px solid var(--line);background:#fff;color:var(--ink);font-weight:700;cursor:pointer}
body.th-home table.shop_table.cart td.actions .button:disabled{opacity:.5}
body.th-home .cart-collaterals .cart_totals{width:auto;float:none;background:var(--green-soft);border:1px solid var(--green-tint);border-radius:var(--radius);padding:24px 26px}
body.th-home .cart-collaterals .cart_totals h2{font-size:20px;margin:0 0 8px}
body.th-home .cart-collaterals .cart_totals table{width:100%;border:0;border-collapse:collapse;margin:0}
body.th-home .cart-collaterals .cart_totals th,body.th-home .cart-collaterals .cart_totals td{border:0;border-bottom:1px solid var(--green-tint);padding:12px 0;background:none;font-weight:400;text-align:left;vertical-align:top}
body.th-home .cart-collaterals .cart_totals td{text-align:right}
body.th-home .cart-collaterals .cart_totals .woocommerce-shipping-methods{list-style:none;margin:0;padding:0}
body.th-home .cart-collaterals .cart_totals .woocommerce-shipping-methods input{display:none}
body.th-home .cart-collaterals .cart_totals .woocommerce-shipping-destination{font-size:13px;color:var(--muted);margin:4px 0 0}
body.th-home .cart-collaterals .cart_totals .order-total th,body.th-home .cart-collaterals .cart_totals .order-total td{font-size:20px;font-weight:700;border-bottom:0;padding-top:16px}
body.th-home .cart-collaterals .cross-sells{display:none}
body.th-home .wc-proceed-to-checkout{padding:16px 0 0}
body.th-home .wc-proceed-to-checkout a.checkout-button{display:block;text-align:center;min-height:54px;line-height:54px;padding:0;border-radius:999px;background:var(--cta,#c2410c);color:#fff!important;font-size:17px;font-weight:700;text-decoration:none;margin:0}
/* WooCommerce оцветява a.button.alt:hover в лилаво — същият оранжев, малко по-тъмен */
body.th-home .wc-proceed-to-checkout a.checkout-button:hover,body.th-home .wc-proceed-to-checkout a.checkout-button:focus{background:var(--cta,#c2410c);color:#fff!important;filter:brightness(.92)}
body.th-home .cart-empty.woocommerce-info{font-size:16px}
/* TH-041 (17.11): .product-price от картите на продуктите (display:flex) правеше клетката „Цена“ блок с отделна линия;
   .woocommerce-cart е класът на body, затова двуколонната количка изисква body.woocommerce-cart (не потомък). */
body.th-home table.shop_table.cart td.product-price{display:table-cell;justify-content:normal}
body.th-home.woocommerce-cart .woocommerce{display:grid;grid-template-columns:minmax(0,1fr) 400px;gap:24px 40px;align-items:start}
body.th-home.woocommerce-cart .woocommerce>*{grid-column:1}
body.th-home.woocommerce-cart .woocommerce>.cart-collaterals{grid-column:2;grid-row:2 / span 3}
body.th-home.woocommerce-cart .woocommerce>.woocommerce-notices-wrapper{grid-column:1 / -1}
body.th-home table.shop_table.cart td.actions .coupon input{min-width:190px}

@media (max-width:980px){
  body.th-home form.checkout{grid-template-columns:minmax(0,1fr)}
  body.th-home form.checkout #order_review{grid-column:1;grid-row:auto;position:static}
  body.th-home .woocommerce-cart .woocommerce{grid-template-columns:minmax(0,1fr)}
  body.th-home .woocommerce-cart .woocommerce>.cart-collaterals{grid-column:1;grid-row:auto}
  body.th-home.woocommerce-cart .woocommerce{grid-template-columns:minmax(0,1fr)}
  body.th-home.woocommerce-cart .woocommerce>.cart-collaterals{grid-column:1;grid-row:auto}
}
@media (max-width:640px){
  body.th-home form.checkout #order_review{padding:20px 18px}
  body.th-home table.shop_table.cart thead{display:none}
  body.th-home table.shop_table.cart tr.cart_item{display:grid;grid-template-columns:84px 1fr auto;grid-template-areas:"img name rm" "img price price" "img qty sub";gap:4px 12px;padding:16px 0;border-bottom:1px solid var(--line)}
  body.th-home table.shop_table.cart tr.cart_item td{display:block;border:0;padding:0;text-align:left}
  body.th-home table.shop_table.cart tr.cart_item td::before{display:none}
  body.th-home table.shop_table.cart td.product-thumbnail{grid-area:img;display:block!important}
  body.th-home table.shop_table.cart td.product-thumbnail img{width:84px;height:84px}
  body.th-home table.shop_table.cart td.product-name{grid-area:name}
  body.th-home table.shop_table.cart td.product-remove{grid-area:rm}
  body.th-home table.shop_table.cart td.product-price{grid-area:price;color:var(--muted);font-size:14px;display:block}
  body.th-home table.shop_table.cart td.product-quantity{grid-area:qty}
  body.th-home table.shop_table.cart td.product-subtotal{grid-area:sub;font-weight:700;align-self:center}
  body.th-home table.shop_table.cart td.actions{display:block}
  body.th-home table.shop_table.cart td.actions .coupon{float:none;margin-bottom:10px}
  body.th-home table.shop_table.cart td.actions .coupon input{flex:1;min-width:0}
  body.th-home table.shop_table.cart td.actions>.button{width:100%}
  body.th-home .cart-collaterals .cart_totals{padding:20px 18px}
}

/* Delivery row: price, kind below */
body.th-home .woocommerce-shipping-totals td .th-ship-cost{display:block;font-weight:700}
body.th-home .woocommerce-shipping-totals td .th-ship-kind{display:block;font-size:12px;color:var(--muted);font-weight:400;line-height:1.35;margin-top:2px}
body.th-home .woocommerce-shipping-totals td,body.th-home .woocommerce-shipping-totals th{vertical-align:top}
body.th-home .woocommerce-form-coupon-toggle .woocommerce-info a{color:var(--green-dark);font-weight:700}
body.th-home form.checkout_coupon{display:flex;gap:8px;flex-wrap:wrap;border:1px solid var(--line);border-radius:var(--radius-sm,10px);padding:14px;margin:0 0 16px}
body.th-home form.checkout_coupon p:first-child{flex:1 1 100%;margin:0;font-size:14px;color:var(--muted)}
body.th-home form.checkout_coupon .form-row{margin:0;float:none;width:auto}
body.th-home form.checkout_coupon .form-row-first{flex:1}
body.th-home form.checkout_coupon .button{height:50px;border-radius:999px;padding:0 20px;border:1px solid var(--green-dark);background:#fff;color:var(--green-dark);font-weight:700}
body.th-home form.checkout_coupon .clear{display:none}

/* Cart fixes: WooCommerce's small-screen table forces right alignment and „label:“ prefixes */
body.th-home.woocommerce-cart .woocommerce-message .wc-forward{display:none}
body.th-home .cart-collaterals .cart_totals tr td,body.th-home .cart-collaterals .cart_totals tr th{background:none!important}
body.th-home .cart-collaterals .cart_totals .woocommerce-shipping-totals p{font-size:13px;color:var(--muted);margin:6px 0 0;text-align:right}
@media (max-width:768px){
  body.th-home table.shop_table.cart tr.cart_item td{text-align:left!important}
  body.th-home table.shop_table.cart tr.cart_item td.product-remove{text-align:right!important}
  body.th-home table.shop_table.cart tr.cart_item td.product-subtotal{text-align:right!important}
  body.th-home table.shop_table.cart tr.cart_item td::before,body.th-home .cart_totals tr td::before{display:none!important}
  body.th-home .cart-collaterals .cart_totals table,body.th-home .cart-collaterals .cart_totals tbody{display:block;width:100%}
  body.th-home .cart-collaterals .cart_totals tr{display:flex!important;justify-content:space-between;gap:12px;border-bottom:1px solid var(--green-tint)}
  body.th-home .cart-collaterals .cart_totals tr.order-total{border-bottom:0}
  body.th-home .cart-collaterals .cart_totals tr th,body.th-home .cart-collaterals .cart_totals tr td{display:block!important;border:0!important;width:auto!important;padding:12px 0!important}
  body.th-home .cart-collaterals .cart_totals tr td{text-align:right!important;flex:1}
  body.th-home table.shop_table.cart tr.cart_item:nth-child(2n) td{background:none}
}
body.th-home.th-cart-auto button[name=update_cart]{display:none!important}
