/* ZAPO store UI: sticky footer layout, header search, page heroes, cart, checkout, wishlist. */

/* ---------- Footer pinned to the bottom when content is short ---------- */
html { min-height: 100%; }
body { min-height: 100vh; display: flex; flex-direction: column; }
body.admin-bar { min-height: calc(100vh - 32px); }
@media (max-width: 782px) { body.admin-bar { min-height: calc(100vh - 46px); } }
body > main, body > #content, body > .site-main, body > .elementor-location-single, body > .elementor-location-archive { flex: 1 0 auto; width: 100%; }
body > .elementor-location-footer { margin-top: auto; flex: none; }

/* ---------- Header search ---------- */
form.zapo-search { position: relative; display: flex; align-items: center; gap: 8px; width: 100%; background: #F5F5F5; border: 1px solid transparent; border-radius: 999px; padding: 0 20px; box-sizing: border-box; transition: border-color .15s ease, background-color .15s ease; }
form.zapo-search:focus-within { background: #fff; border-color: var(--zapo-green); box-shadow: 0 0 0 3px rgba(5, 64, 44, .12); }
form.zapo-search input[type="search"] { flex: 1 1 auto; min-width: 0; height: 44px; border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 0 !important; font: 400 14px 'Noto Sans Hebrew', sans-serif; color: var(--zapo-black); outline: none; border-radius: 0; }
form.zapo-search input[type="search"]::-webkit-search-cancel-button { display: none; }
form.zapo-search button[type="submit"], form.zapo-search button[type="submit"]:focus { flex: none; width: 32px; height: 32px; padding: 0; margin-inline-end: -8px; border: 0; border-radius: 50%; background: transparent; color: var(--zapo-gray); display: grid; place-items: center; cursor: pointer; }
form.zapo-search button[type="submit"]:hover { background: var(--zapo-green); color: #fff; }
form.zapo-search svg { width: 18px; height: 18px; display: block; }

/* ---------- Page hero (cart, checkout, wishlist) ---------- */
body.woocommerce-cart .page-header, body.woocommerce-checkout .page-header, body.page-id-140 .page-header { display: none; }
body.woocommerce-cart .site-main, body.woocommerce-checkout .site-main, body.page-id-140 .site-main { max-width: none !important; }
body.woocommerce-cart .page-content, body.woocommerce-checkout .page-content, body.page-id-140 .page-content { width: 100%; max-width: 1280px !important; margin-inline: auto; padding-inline: clamp(16px, 3vw, 40px); box-sizing: border-box; padding-block: clamp(16px, 2vw, 32px) clamp(32px, 4vw, 64px); }
.zapo-page-hero { background: var(--zapo-green-soft); padding: clamp(24px, 3.4vw, 48px); display: flex; flex-direction: column; gap: 10px; border-top: 8px solid var(--zapo-green); margin-bottom: clamp(16px, 2.4vw, 32px); }
.zapo-page-hero__title { margin: 0; font: 900 clamp(30px, 4vw, 52px)/1.05 'Noto Sans Hebrew', sans-serif; color: var(--zapo-black); letter-spacing: -.01em; }
.zapo-page-hero__text { margin: 0; font: 400 clamp(14px, 0.9vw + 11px, 17px)/1.6 'Noto Sans Hebrew', sans-serif; color: var(--zapo-gray); max-width: 620px; }

/* ---------- Cart ---------- */
body.woocommerce-cart .woocommerce { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: clamp(16px, 2.4vw, 32px); align-items: start; }
body.woocommerce-cart .woocommerce > .zapo-page-hero, body.woocommerce-cart .woocommerce > .woocommerce-notices-wrapper, body.woocommerce-cart .woocommerce > .cart-empty, body.woocommerce-cart .woocommerce > .return-to-shop { grid-column: 1 / -1; }
body.woocommerce-cart .woocommerce-cart-form { grid-column: 1; margin: 0; }
body.woocommerce-cart .cart-collaterals { grid-column: 2; float: none; width: auto; }
body.woocommerce-cart .cart-collaterals .cart_totals { float: none; width: auto; border: 1px solid var(--zapo-line); border-top: 6px solid var(--zapo-green); background: #fff; padding: clamp(18px, 2.4vw, 28px); }
body.woocommerce-cart .cart_totals h2 { margin: 0 0 12px; font: 800 22px/1.2 'Noto Sans Hebrew', sans-serif; color: var(--zapo-black); }
body.woocommerce-cart table.cart { border: 0; border-top: 2px solid var(--zapo-black); border-radius: 0; }
body.woocommerce-cart table.cart th { background: transparent; font-weight: 800; }
body.woocommerce-cart table.cart td, body.woocommerce-cart table.cart th { border-color: var(--zapo-line); padding: 16px 10px; vertical-align: middle; }
body.woocommerce-cart table.cart img { width: 84px; height: 84px; object-fit: cover; }
body.woocommerce-cart table.cart td.product-name a { font-weight: 800; color: var(--zapo-black); }
body.woocommerce-cart table.cart a.remove { color: var(--zapo-gray) !important; background: transparent; font-size: 22px; }
body.woocommerce-cart table.cart a.remove:hover { background: var(--zapo-green); color: #fff !important; }
body.woocommerce-cart .quantity input.qty { height: 44px; width: 70px; border: 1px solid var(--zapo-line); border-radius: 999px; text-align: center; }
body.woocommerce-cart td.actions .coupon { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
body.woocommerce-cart td.actions .coupon input.input-text { height: 44px; border-radius: 999px; padding: 0 18px; width: 180px; }
body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button { display: block; text-align: center; background: var(--zapo-green); color: #fff; border-radius: 999px; font: 700 16px/1 'Noto Sans Hebrew', sans-serif; padding: 18px 24px; margin: 0; }
body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover { background: var(--zapo-green-dark); color: #fff; }
body.woocommerce-cart .return-to-shop a.button { display: inline-block; }
body.woocommerce-cart .cart-empty { font-weight: 700; }

/* ---------- Checkout ---------- */
body.woocommerce-checkout form.checkout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: 0 clamp(16px, 2.4vw, 32px); align-items: start; }
body.woocommerce-checkout form.checkout #customer_details { grid-column: 1; grid-row: 1 / span 2; float: none; width: auto; }
body.woocommerce-checkout form.checkout #customer_details .col-1, body.woocommerce-checkout form.checkout #customer_details .col-2 { float: none; width: auto; }
body.woocommerce-checkout #order_review_heading { grid-column: 2; grid-row: 1; margin: 0; padding: clamp(18px, 2.4vw, 28px) clamp(18px, 2.4vw, 28px) 0; border: 1px solid var(--zapo-line); border-bottom: 0; border-top: 6px solid var(--zapo-green); background: #fff; font: 800 22px/1.2 'Noto Sans Hebrew', sans-serif; color: var(--zapo-black); }
body.woocommerce-checkout #order_review { grid-column: 2; grid-row: 2; border: 1px solid var(--zapo-line); border-top: 0; background: #fff; padding: 12px clamp(18px, 2.4vw, 28px) clamp(18px, 2.4vw, 28px); }
body.woocommerce-checkout h3 { font: 800 22px/1.2 'Noto Sans Hebrew', sans-serif; color: var(--zapo-black); margin: 0 0 14px; }
body.woocommerce-checkout #place_order { width: 100%; background: var(--zapo-green); color: #fff; border-radius: 999px; font: 700 16px/1 'Noto Sans Hebrew', sans-serif; padding: 18px 24px; border: 0; }
body.woocommerce-checkout #place_order:hover { background: var(--zapo-green-dark); }
body.woocommerce-checkout .woocommerce-checkout-review-order-table { border: 0; }
@media (max-width: 900px) {
	body.woocommerce-cart .woocommerce, body.woocommerce-checkout form.checkout { grid-template-columns: 1fr; }
	body.woocommerce-cart .cart-collaterals { grid-column: 1; }
	body.woocommerce-checkout form.checkout #customer_details, body.woocommerce-checkout #order_review_heading, body.woocommerce-checkout #order_review { grid-column: 1; grid-row: auto; }
}

/* ---------- Wishlist ---------- */
body.page-id-140 .tinv-wishlist h2, body.page-id-140 .tinv-header { display: none; }
body.page-id-140 .tinv-wishlist table { border: 0; border-top: 2px solid var(--zapo-black); }
body.page-id-140 .tinv-wishlist td, body.page-id-140 .tinv-wishlist th { border-color: var(--zapo-line); }
body.page-id-140 .woocommerce-info { background: var(--zapo-green-soft); }

/* Header search sits centered between the menu and the account button (equal gaps). */
.elementor-location-header form.zapo-search { flex: 1 1 auto; width: auto; max-width: 480px; min-width: 0; margin-inline: auto; }
@media (max-width: 767px) {
	.elementor-location-header form.zapo-search { order: 5; flex: 1 1 100%; max-width: none; margin-inline: 0; }
}

/* Checkout: heading row hugs its content, review box sits right under it. */
body.woocommerce-checkout form.checkout { grid-template-rows: auto 1fr; }
/* Notice icons: WooCommerce icon font renders as a square here, so drop it and keep the green rule. */
.woocommerce-info::before { display: none; }
.woocommerce-info { padding-inline-start: 1.4em; }

/* ---------- Live search suggestions ---------- */
.zapo-suggest { position: absolute; z-index: 1001; top: calc(100% + 8px); inset-inline: 0; background: #fff; border: 1px solid var(--zapo-line); border-top: 4px solid var(--zapo-green); box-shadow: 0 12px 32px rgba(0, 0, 0, .14); max-height: min(70vh, 520px); overflow-y: auto; padding: 6px; text-align: start; font-family: 'Noto Sans Hebrew', sans-serif; border-radius: 0; }
.zapo-suggest[hidden] { display: none; }
.zapo-suggest__head { font-size: 11px; font-weight: 800; color: var(--zapo-gray); letter-spacing: .06em; padding: 10px 10px 4px; }
a.zapo-suggest__item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; color: var(--zapo-black); text-decoration: none; }
a.zapo-suggest__item:hover, a.zapo-suggest__item.is-active { background: var(--zapo-green-soft); color: var(--zapo-black); }
a.zapo-suggest__item img, .zapo-suggest__noimg { flex: none; width: 48px; height: 48px; object-fit: cover; background: #f5f5f5; display: block; }
.zapo-suggest__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.zapo-suggest__title { font-weight: 800; font-size: 14px; line-height: 1.3; }
.zapo-suggest__sub { font-size: 12px; color: var(--zapo-gray); line-height: 1.3; }
.zapo-suggest__price { flex: none; font-weight: 900; font-size: 14px; white-space: nowrap; }
.zapo-suggest__price .zapo-price { font-size: 14px; }
.zapo-suggest__price .zapo-price del { display: none; }
a.zapo-suggest__item--cat { flex-direction: row; justify-content: space-between; }
a.zapo-suggest__item--cat::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--zapo-green); flex: none; }
a.zapo-suggest__item--cat .zapo-suggest__title { flex: 1 1 auto; }
a.zapo-suggest__all { display: block; text-align: center; padding: 12px; margin-top: 4px; border-top: 1px solid var(--zapo-line); font-weight: 700; font-size: 13px; color: var(--zapo-green); text-decoration: none; }
a.zapo-suggest__all:hover { color: var(--zapo-green-dark); background: var(--zapo-green-soft); }
.zapo-suggest__empty { padding: 16px; font-size: 14px; color: var(--zapo-gray); }
