/* Szmutka – cart and checkout */

/* ---------- shipping options as cards ---------- */
tr.woocommerce-shipping-totals { display: flex; flex-direction: column; gap: 12px; padding: 16px 0; }
tr.woocommerce-shipping-totals > th,
tr.woocommerce-shipping-totals > td { display: block; width: 100% !important; padding: 0 !important; text-align: left !important; border: 0 !important; }
tr.woocommerce-shipping-totals > td::before { display: none !important; }
tr.woocommerce-shipping-totals > th { font-family: 'Jost', sans-serif; font-weight: 500; color: var(--szw-ink); }
ul.woocommerce-shipping-methods { width: 100% !important; align-items: stretch; list-style: none; margin: 0 !important; padding: 0 !important; display: flex; flex-direction: column; gap: 8px; }
ul.woocommerce-shipping-methods li { position: relative; margin: 0 !important; padding: 0 !important; text-indent: 0 !important; }
ul.woocommerce-shipping-methods li input[type="radio"] { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); margin: 0 !important; width: 18px; height: 18px; accent-color: var(--szw-teal); }
ul.woocommerce-shipping-methods li label { display: block !important; margin: 0 !important; padding: 14px 16px 14px 46px !important; border: 1px solid var(--szw-line); border-radius: 8px; background: #fff; cursor: pointer; transition: border-color .2s, box-shadow .2s, background .2s; }
ul.woocommerce-shipping-methods li label:hover { border-color: var(--szw-field); }
ul.woocommerce-shipping-methods li:has(input:checked) label,
ul.woocommerce-shipping-methods li:only-child label { border-color: var(--szw-teal); box-shadow: inset 0 0 0 1px var(--szw-teal); background: #F7FBFC; }
ul.woocommerce-shipping-methods li input[type="hidden"] + label { padding-left: 16px !important; }
.sz-ship { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-family: 'Jost', sans-serif; text-align: left; }
.sz-ship__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sz-ship__name { font-size: 15px; font-weight: 500; color: var(--szw-ink); line-height: 1.3; }
.sz-ship__note { font-size: 13px; font-weight: 400; color: var(--szw-ink-2); line-height: 1.35; }
.sz-ship__price { font-size: 15px; font-weight: 500; color: var(--szw-ink); white-space: nowrap; }
.woocommerce-shipping-destination,
.woocommerce-shipping-calculator { font-size: 13px; color: var(--szw-ink-2); margin: 8px 0 0 !important; text-align: left; }

/* ---------- payment options as cards ---------- */
#payment ul.payment_methods { list-style: none; padding: 0 !important; margin: 0 0 16px !important; border: 0 !important; display: flex; flex-direction: column; gap: 8px; }
#payment ul.payment_methods li.wc_payment_method { position: relative; padding: 0 !important; margin: 0 !important; border: 0 !important; }
#payment ul.payment_methods li.wc_payment_method > input { position: absolute; left: 16px; top: 17px; margin: 0 !important; width: 18px; height: 18px; accent-color: var(--szw-teal); }
#payment ul.payment_methods li.wc_payment_method > label { display: block !important; padding: 14px 16px 14px 46px !important; border: 1px solid var(--szw-line); border-radius: 8px; background: #fff; font-family: 'Jost', sans-serif; font-size: 15px; font-weight: 500; color: var(--szw-ink); cursor: pointer; margin: 0 !important; }
#payment ul.payment_methods li.wc_payment_method:has(> input:checked) > label { border-color: var(--szw-teal); box-shadow: inset 0 0 0 1px var(--szw-teal); background: #F7FBFC; }
#payment ul.payment_methods li.wc_payment_method .payment_box { margin: 8px 0 0 !important; padding: 12px 16px !important; font-size: 14px; }

/* ---------- cart table ---------- */
.woocommerce-cart-form table.shop_table { border: 0 !important; border-collapse: collapse; font-family: 'Jost', sans-serif; }
.woocommerce-cart-form table.shop_table thead th { font-family: 'Jost', sans-serif !important; font-size: 12px !important; font-weight: 500 !important; letter-spacing: .1em; text-transform: uppercase; color: var(--szw-ink-2) !important; padding: 0 12px 14px !important; border-bottom: 1px solid var(--szw-line) !important; }
.woocommerce-cart-form table.shop_table td { padding: 20px 12px !important; border-top: 0 !important; border-bottom: 1px solid var(--szw-line) !important; vertical-align: middle; font-family: 'Jost', sans-serif; font-size: 15px; color: var(--szw-ink); }
.woocommerce-cart-form table.shop_table tr:last-child td { border-bottom: 0 !important; }
.woocommerce-cart-form td.product-thumbnail { width: 104px; }
.woocommerce-cart-form td.product-thumbnail img { width: 88px !important; height: 110px !important; max-width: none; object-fit: cover; display: block; }
.woocommerce-cart-form td.product-name a { font-family: var(--e-global-typography-primary-font-family), 'Open Sans', sans-serif !important; font-size: 19px !important; line-height: 1.2; font-weight: 500; color: var(--szw-ink) !important; text-decoration: none; }
.woocommerce-cart-form td.product-name a:hover { color: var(--szw-teal) !important; }
.woocommerce-cart-form td.product-name dl.variation { margin: 6px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 6px; font-size: 13px; color: var(--szw-ink-2); }
.woocommerce-cart-form td.product-name dl.variation dt,
.woocommerce-cart-form td.product-name dl.variation dd { margin: 0; padding: 0; font-weight: 400; }
.woocommerce-cart-form td.product-name dl.variation dd p { margin: 0; }
.woocommerce-cart-form td.product-price,
.woocommerce-cart-form td.product-subtotal { font-weight: 500; white-space: nowrap; }
.woocommerce-cart-form td.product-subtotal,
.woocommerce-cart-form thead th.product-subtotal { text-align: right; }
.woocommerce-cart-form td.product-remove { width: 40px; }
.woocommerce-cart-form td.product-remove a.remove { display: inline-flex !important; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--szw-line); color: var(--szw-ink-2) !important; font-size: 18px; line-height: 1; background: #fff; }
.woocommerce-cart-form td.product-remove a.remove:hover { border-color: #A3402F; color: #A3402F !important; background: #fff !important; }

/* checkout order summary: product names with variation details */
.woocommerce-checkout-review-order-table td.product-name { font-family: 'Jost', sans-serif; }
.woocommerce-checkout-review-order-table dl.variation { margin: 4px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 0 6px; font-size: 13px; color: var(--szw-ink-2); }
.woocommerce-checkout-review-order-table dl.variation dt,
.woocommerce-checkout-review-order-table dl.variation dd { display: block; float: none; margin: 0; padding: 0; font-weight: 400; }
.woocommerce-checkout-review-order-table dl.variation dd p { margin: 0; }

@media (max-width: 760px) {
	.woocommerce-cart-form table.shop_table_responsive thead { display: none; }
	.woocommerce-cart-form table.shop_table_responsive tr.cart_item { display: grid; grid-template-columns: 88px 1fr auto; grid-template-areas: "thumb name remove" "thumb price price" "thumb qty sub"; gap: 6px 14px; padding: 18px 0; border-bottom: 1px solid var(--szw-line); }
	.woocommerce-cart-form table.shop_table_responsive tr.cart_item td { display: block; padding: 0 !important; border: 0 !important; text-align: left !important; }
	.woocommerce-cart-form table.shop_table_responsive tr.cart_item td::before { display: none !important; }
	.woocommerce-cart-form tr.cart_item td.product-thumbnail { grid-area: thumb; display: block !important; width: auto; }
	.woocommerce-cart-form tr.cart_item td.product-name { grid-area: name; }
	.woocommerce-cart-form tr.cart_item td.product-name a { font-size: 19px !important; }
	.woocommerce-cart-form tr.cart_item td.product-remove { grid-area: remove; width: auto; }
	.woocommerce-cart-form tr.cart_item td.product-price { grid-area: price; color: var(--szw-ink-2); font-weight: 400; font-size: 14px; }
	.woocommerce-cart-form tr.cart_item td.product-quantity { grid-area: qty; }
	.woocommerce-cart-form tr.cart_item td.product-subtotal { grid-area: sub; align-self: center; text-align: right !important; }
}

/* checkout order summary as stacked rows (lets the shipping cards use the full width) */
table.woocommerce-checkout-review-order-table,
table.woocommerce-checkout-review-order-table thead,
table.woocommerce-checkout-review-order-table tbody,
table.woocommerce-checkout-review-order-table tfoot { display: block; width: 100%; }
table.woocommerce-checkout-review-order-table tr { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
table.woocommerce-checkout-review-order-table tr > th,
table.woocommerce-checkout-review-order-table tr > td { display: block; border: 0; }
table.woocommerce-checkout-review-order-table tr > .product-total,
table.woocommerce-checkout-review-order-table tfoot tr > td { text-align: right; margin-left: auto; }
table.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals { flex-direction: column; align-items: stretch; }
table.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals > td { margin-left: 0; text-align: left; max-width: none !important; width: 100% !important; }
table.woocommerce-checkout-review-order-table td.product-name,
table.woocommerce-checkout-review-order-table th.product-name { max-width: none !important; flex: 1 1 auto; min-width: 0; }
table.woocommerce-checkout-review-order-table td.product-total { flex: none; white-space: nowrap; }
table.woocommerce-checkout-review-order-table tbody tr.cart_item { padding: 14px 0; border-bottom: 1px solid var(--szw-line); }
table.woocommerce-checkout-review-order-table tbody tr.cart_item > td { padding: 0 !important; }

/* ---------- pickup point picker (Csomagpontok plugin) ---------- */
.vp-woo-pont-modal, .vp-woo-pont-modal input, .vp-woo-pont-modal button { font-family: 'Jost', sans-serif !important; }
.vp-woo-pont-modal-sidebar-search input { border-radius: 999px !important; border: 1px solid var(--szw-field) !important; min-height: 44px; }
.vp-woo-pont-modal-sidebar-result-select, .vp-woo-pont-modal .button { border-radius: 999px !important; font-weight: 500 !important; }
tr.vp-woo-pont-review-order { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; }
tr.vp-woo-pont-review-order > th, tr.vp-woo-pont-review-order > td { display: block; width: 100% !important; max-width: none !important; padding: 0 !important; text-align: left !important; margin: 0 !important; }
tr.vp-woo-pont-review-order > td::before { display: none !important; }
.vp-woo-pont-review-order-selected { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--szw-teal); border-radius: 8px; background: #F7FBFC; font-family: 'Jost', sans-serif; font-size: 14px; color: var(--szw-ink-2); }
.vp-woo-pont-review-order-selected strong { color: var(--szw-ink); font-weight: 500; }
.vp-woo-pont-review-order-selected a { color: var(--szw-teal); font-weight: 500; }

/* checkout totals: prices in the same Jost style as the rest of the shop */
table.woocommerce-checkout-review-order-table tfoot th,
table.woocommerce-checkout-review-order-table tfoot td,
table.woocommerce-checkout-review-order-table tfoot .amount,
table.woocommerce-checkout-review-order-table td.product-total .amount { font-family: 'Jost', sans-serif !important; font-variant-numeric: tabular-nums; }
table.woocommerce-checkout-review-order-table tfoot .cart-subtotal .amount { font-size: 16px !important; font-weight: 500 !important; color: var(--szw-ink); }
table.woocommerce-checkout-review-order-table tfoot .order-total .amount { font-size: 24px !important; font-weight: 600 !important; color: var(--szw-ink); }
.cart_totals .cart-subtotal .amount, .cart_totals .order-total .amount { font-family: 'Jost', sans-serif !important; font-variant-numeric: tabular-nums; }
.cart_totals .order-total .amount { font-size: 22px; font-weight: 600; }

/* checkout address: country, postcode and city on one row (billing and gift/shipping address) */
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper,
.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper { display: grid !important; grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: 16px; align-items: start; }
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper::before, .woocommerce-checkout .woocommerce-billing-fields__field-wrapper::after,
.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper::before, .woocommerce-checkout .woocommerce-shipping-fields__field-wrapper::after { display: none !important; content: none !important; }
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper > .form-row,
.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper > .form-row { grid-column: span 6; width: auto !important; float: none !important; margin-left: 0 !important; margin-right: 0 !important; min-width: 0; }
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper > .form-row-first, .woocommerce-checkout .woocommerce-billing-fields__field-wrapper > .form-row-last,
.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper > .form-row-first, .woocommerce-checkout .woocommerce-shipping-fields__field-wrapper > .form-row-last { grid-column: span 3; }
.woocommerce-checkout #billing_country_field, .woocommerce-checkout #billing_postcode_field, .woocommerce-checkout #billing_city_field,
.woocommerce-checkout #shipping_country_field, .woocommerce-checkout #shipping_postcode_field, .woocommerce-checkout #shipping_city_field { grid-column: span 2 !important; }
.woocommerce-checkout #billing_country_field select, .woocommerce-checkout #shipping_country_field select,
.woocommerce-checkout #billing_country_field .select2-container, .woocommerce-checkout #shipping_country_field .select2-container { width: 100% !important; }
.woocommerce-checkout #billing_country_field strong, .woocommerce-checkout #shipping_country_field strong { display: flex; align-items: center; min-height: 46px; padding: 0 14px; border: 1px solid var(--szw-line); border-radius: 6px; background: var(--szw-paper); font-weight: 500; }
@media (max-width: 760px) {
	.woocommerce-checkout #billing_country_field, .woocommerce-checkout #shipping_country_field { grid-column: span 6 !important; }
	.woocommerce-checkout #billing_postcode_field, .woocommerce-checkout #shipping_postcode_field { grid-column: span 3 !important; }
	.woocommerce-checkout #billing_city_field, .woocommerce-checkout #shipping_city_field { grid-column: span 3 !important; }
}

/* checkout summary rows like the cart table */
table.woocommerce-checkout-review-order-table thead tr { padding-bottom: 12px; border-bottom: 1px solid var(--szw-line); }
table.woocommerce-checkout-review-order-table thead th { font-family: 'Jost', sans-serif !important; font-size: 12px !important; font-weight: 500 !important; letter-spacing: .1em; text-transform: uppercase; color: var(--szw-ink-2) !important; }
table.woocommerce-checkout-review-order-table tbody tr.cart_item { align-items: center; }
.sz-co-item { display: grid; grid-template-columns: 64px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 14px; align-items: center; }
.sz-co-item img.sz-co-thumb { grid-row: 1 / span 3; width: 64px !important; height: 80px !important; object-fit: cover; display: block; margin: 0 !important; }
.sz-co-name { font-family: var(--e-global-typography-primary-font-family), 'Open Sans', sans-serif; font-size: 17px; line-height: 1.2; font-weight: 500; color: var(--szw-ink); }
table.woocommerce-checkout-review-order-table td.product-name { display: grid !important; grid-template-columns: 64px minmax(0, 1fr); column-gap: 14px; row-gap: 2px; align-items: start; }
table.woocommerce-checkout-review-order-table td.product-name > .sz-co-item { display: contents; }
table.woocommerce-checkout-review-order-table td.product-name > .sz-co-item > .sz-co-name { grid-column: 2; align-self: end; }
table.woocommerce-checkout-review-order-table td.product-name > .sz-co-qty,
table.woocommerce-checkout-review-order-table td.product-name > dl.variation { grid-column: 2; }
table.woocommerce-checkout-review-order-table td.product-name > dl.variation { margin: 0 !important; }
.sz-co-qty { font-family: 'Jost', sans-serif; font-size: 13px; color: var(--szw-ink-2); font-weight: 400; }
table.woocommerce-checkout-review-order-table td.product-total .amount { font-weight: 500 !important; color: var(--szw-ink); }
table.woocommerce-checkout-review-order-table td.product-name { align-content: start; grid-auto-rows: min-content; }
table.woocommerce-checkout-review-order-table td.product-name > .sz-co-item > .sz-co-name { align-self: start; order: 1; }
table.woocommerce-checkout-review-order-table td.product-name > dl.variation { order: 2; margin-top: 4px !important; }
table.woocommerce-checkout-review-order-table td.product-name > .sz-co-qty { order: 3; margin-top: 2px; }
.sz-co-item img.sz-co-thumb { order: 0; grid-row: 1 / span 4; }
@media (max-width: 760px) {
	.woocommerce-cart-form table.shop_table_responsive tr.cart_item { grid-template-areas: "thumb name remove" "thumb price sub" "thumb qty qty"; row-gap: 8px; }
	.woocommerce-cart-form tr.cart_item td.product-subtotal { align-self: center; font-weight: 600; }
	.woocommerce-cart-form tr.cart_item td.product-quantity { min-width: 0; width: auto !important; }
}

/* quantity stepper in the cart table (beats the Cart widget's own input styles) */
.elementor-widget-woocommerce-cart .woocommerce .quantity.sz-stepper .input-text.qty { width: 40px !important; max-width: 40px; flex: 0 0 40px; min-height: 0 !important; max-height: none !important; height: 40px !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; text-align: center !important; font-family: 'Jost', sans-serif !important; font-size: 15px !important; font-weight: 500; color: var(--szw-ink) !important; }
.elementor-widget-woocommerce-cart .woocommerce .quantity.sz-stepper { width: auto; }

/* Cart table must fit its card: narrower helper columns, the name column takes what is left. */
@media (min-width: 761px) {
	.woocommerce-cart-form table.shop_table { width: 100% !important; max-width: 100%; table-layout: auto; }
	.woocommerce-cart-form table.shop_table thead th,
	.woocommerce-cart-form table.shop_table td { padding-left: 8px !important; padding-right: 8px !important; }
	.woocommerce-cart-form td.product-remove,
	.woocommerce-cart-form th.product-remove { width: 32px; }
	.woocommerce-cart-form td.product-thumbnail,
	.woocommerce-cart-form th.product-thumbnail { width: 76px; }
	.woocommerce-cart-form td.product-thumbnail img { width: 72px !important; height: 90px !important; }
	.woocommerce-cart-form td.product-name { min-width: 120px; }
}
/* Product name looks the same with or without a link (hidden products like tickets have no link). */
.woocommerce-cart-form table.shop_table td.product-name { font-family: var(--e-global-typography-primary-font-family), 'Open Sans', sans-serif !important; font-size: 19px !important; line-height: 1.2 !important; font-weight: 500 !important; color: var(--szw-ink); }
.woocommerce-cart-form table.shop_table td.product-name dl.variation { font-family: 'Jost', sans-serif !important; line-height: 1.4; }
@media (max-width: 760px) {
	.woocommerce-cart-form table.shop_table tr.cart_item td.product-name { font-size: 19px !important; }
}
/* Two-column cart on narrower desktops (1101–1299px): the table column is too narrow for the unit price;
   subtotal and quantity stay. */
@media (min-width: 1101px) and (max-width: 1299px) {
	.woocommerce-cart-form table.shop_table th.product-price,
	.woocommerce-cart-form table.shop_table td.product-price { display: none !important; }
}

/* Personal pickup selected: no "Szállítás ide: …" address and no "Cím megváltoztatása" in the cart. */
.woocommerce-shipping-totals td:has(input.shipping_method[value^="local_pickup"]:checked) .woocommerce-shipping-destination,
.woocommerce-shipping-totals td:has(input.shipping_method[value^="local_pickup"]:checked) .woocommerce-shipping-calculator,
.woocommerce-shipping-totals td:has(input[type="hidden"].shipping_method[value^="local_pickup"]) .woocommerce-shipping-destination,
.woocommerce-shipping-totals td:has(input[type="hidden"].shipping_method[value^="local_pickup"]) .woocommerce-shipping-calculator { display: none !important; }
