/* ==========================================================================
   MATILDA — WordPress bridge

   style.css is the design and is copied verbatim from the prototype.
   Everything in THIS file exists only because WordPress, Astra, Elementor or
   WooCommerce inject markup the prototype never had. Nothing here should
   change the design; it should only stop the platform from changing it.
   ========================================================================== */

/* ---------------------------------------------------------------- astra --
   Astra ships its own container width, link colours and button skin. The
   prototype owns all three, so neutralise Astra rather than fight it later
   with !important on every component.                                      */
.ast-container,
.ast-container-fluid,
#primary,
#content .ast-container { max-width: none; width: 100%; padding: 0; margin: 0; }

#page,
#content,
#primary,
.site-content,
.entry-content,
.ast-page-builder-template .entry-header { margin: 0; padding: 0; border: 0; }

.ast-page-builder-template .site-content > .ast-container { display: block; }
.ast-separate-container #primary { padding: 0; margin: 0; }
body, .site, #page { background: var(--m-paper); }

/* Astra's h-tag and link resets */
.entry-content a { text-decoration: none; }
.entry-content > :last-child { margin-bottom: 0; }
h1, h2, h3, h4, h5, h6 { font-family: var(--f); }

/* Kill the theme header/footer if anything re-registers them */
.site-header.ast-primary-header,
.site-footer.ast-small-footer,
footer.site-footer[data-section="section-footer-builder"] { display: none; }

/* ------------------------------------------------------------ elementor --
   Our sections carry their own .section / .container padding, so Elementor's
   containers must contribute nothing but a wrapper.                         */
.elementor-widget-html,
.elementor-widget-shortcode,
.elementor-widget-container { margin: 0; padding: 0; }

.e-con, .e-con-inner, .elementor-section, .elementor-container {
	max-width: none;
}
.matilda-raw.e-con,
.matilda-raw > .e-con-inner {
	padding: 0 !important;
	margin: 0 !important;
	max-width: none !important;
	width: 100%;
}
/* Elementor adds a min-height:0 flex quirk that clips sticky children. */
.matilda-raw .elementor-widget { width: 100%; }

/* -------------------------------------------------------- sticky header --
   In the prototype .hdr's parent is <body>, so its sticky range is the whole
   page. Here Elementor wraps the header template in a chain of 76px-tall
   containers, so .hdr had nowhere to stick and simply scrolled away — while
   the filter bar (whose parent IS tall) stayed pinned 76px down with a bare
   strip of scrolling content above it. Stick the template's outermost
   wrapper instead; its parent is .site, which spans the page.               */
.elementor-location-header {
	position: sticky;
	inset-block-start: 0;
	z-index: 900;
}

/* ----------------------------------------------------------- admin bar --
   The sticky header must clear the admin bar for logged-in editors, or it
   sits under it on every page in the editor preview.                        */
body.admin-bar .elementor-location-header { inset-block-start: 32px; }
body.admin-bar .hdr { inset-block-start: 32px; }
body.admin-bar .filters { inset-block-start: calc(var(--header-h) + 32px); }
@media (max-width: 782px) {
	body.admin-bar .elementor-location-header { inset-block-start: 46px; }
	body.admin-bar .hdr { inset-block-start: 46px; }
	body.admin-bar .filters { inset-block-start: calc(var(--header-h) + 46px); }
}

/* ================================================== woocommerce: single ==
   The Woo single-product template is re-skinned into the prototype's .pdp
   rather than replaced, so Woo keeps owning add-to-cart, stock and prices. */
.woocommerce-notices-wrapper:empty { display: none; }

.matilda-pdp .woocommerce-product-gallery {
	background: var(--m-tile);
	border: 1px solid var(--m-line);
	padding: clamp(20px, 2.6vw, 48px);
	margin: 0;
	width: 100% !important;
	float: none !important;
}
.matilda-pdp .woocommerce-product-gallery__image img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: contain;
}
.matilda-pdp .woocommerce-product-gallery__trigger { display: none; }
.matilda-pdp .flex-control-thumbs {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--s1);
	margin-top: var(--s1);
	padding: 0;
	list-style: none;
}
.matilda-pdp .flex-control-thumbs img {
	background: var(--m-tile);
	border: 1px solid var(--m-line);
	padding: 6px;
	aspect-ratio: 1;
	object-fit: contain;
	opacity: 1;
}

.matilda-pdp .summary { margin: 0 !important; width: 100% !important; float: none !important; }
.matilda-pdp .product_title {
	font-family: var(--f-display);
	font-size: clamp(2rem, 3.6vw, 2.75rem);
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1.16;
	color: var(--m-ink);
	margin: 0;
}
.matilda-pdp .woocommerce-product-details__short-description {
	font-size: var(--t-cap);
	letter-spacing: 0.16em;
	font-weight: 600;
	color: var(--m-faint);
	margin-top: var(--s2);
}
.matilda-pdp .summary > .price {
	display: block;
	margin-block: var(--s4);
	font-size: 1.375rem;
	font-weight: 400;
	color: var(--m-ink);
	font-variant-numeric: tabular-nums;
}
.matilda-pdp .summary > .price del { color: var(--m-faint); }
/* Astra injects `Availability: 1 in stock` into the add-to-cart widget in
   English. Hiding only the value left the orphan label on the page, so the
   whole line goes for in-stock items. */
.matilda-pdp .ast-stock-detail { display: none; }
.matilda-pdp .stock.in-stock { display: none; }

.matilda-pdp .ast-stock-detail:has(.out-of-stock),
.matilda-pdp p.stock.out-of-stock {
	display: block;
	color: var(--m-ink);
	font-size: 1.375rem;
	margin-block: var(--s4);
}
.matilda-pdp .ast-stock-avail { display: none; }

/* Prices are LTR runs inside Hebrew text; isolate them so bidi does not
   push the shekel sign to the wrong end. */
.matilda-pdp .summary > .price bdi,
.woocommerce .price bdi,
.woocommerce-Price-amount { direction: ltr; unicode-bidi: isolate; }

/* Spec table -> the prototype's .pdp__spec rows */
.matilda-pdp .woocommerce-product-attributes {
	width: 100%;
	margin-block: var(--s5);
	border: 0;
	border-block-start: 1px solid var(--m-line);
	border-collapse: collapse;
}
.matilda-pdp .woocommerce-product-attributes tr { border-block-end: 1px solid var(--m-line); }
.matilda-pdp .woocommerce-product-attributes th,
.matilda-pdp .woocommerce-product-attributes td {
	padding-block: 13px;
	font-size: 0.9375rem;
	font-weight: 400;
	border: 0;
	background: none;
}
.matilda-pdp .woocommerce-product-attributes th { color: var(--m-faint); text-align: start; }
.matilda-pdp .woocommerce-product-attributes td { color: var(--m-ink); text-align: end; }
.matilda-pdp .woocommerce-product-attributes td p { margin: 0; }

/* ------------------------------------------- .cart class collision --
   The prototype names its slide-in drawer `.cart`, and WooCommerce names
   the add-to-cart form `form.cart`. The drawer's `position: fixed` was
   therefore pinning the form to the viewport, collapsing the widget to
   zero height and taking the "הוספה לסל" button out of the page.
   The drawer is an <aside>, so restrict those rules to it and hand the
   form back its normal flow. */
form.cart {
	position: static !important;
	inset: auto !important;
	width: auto !important;
	transform: none !important;
	visibility: visible !important;
	border: 0 !important;
	background: none !important;
	transition: none !important;
	z-index: auto !important;
}

/* Add-to-cart, in the prototype's button skin */
.matilda-pdp form.cart {
	margin: 0 0 var(--s3);
	display: flex;
	flex-wrap: wrap;
	gap: var(--s2);
	align-items: stretch;
}
.matilda-pdp form.cart::before,
.matilda-pdp form.cart::after { content: none; }
.matilda-pdp form.cart .quantity { display: none; }        /* sold individually */
.matilda-pdp form.cart .button { float: none !important; }

.woocommerce button.button,
.woocommerce a.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce button.button.alt,
.woocommerce a.button.alt,
.woocommerce input.button.alt {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 0 var(--s5);
	font-family: var(--f);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	line-height: 1;
	border: 1px solid var(--m-accent);
	border-radius: 0;
	background: var(--m-accent);
	color: #F4F3EE;
	transition: background var(--d-ui) var(--e), color var(--d-ui) var(--e), border-color var(--d-ui) var(--e);
}
.woocommerce button.button:hover,
.woocommerce a.button:hover,
.woocommerce input.button:hover,
.woocommerce button.button.alt:hover,
.woocommerce a.button.alt:hover {
	background: var(--m-accent-h);
	border-color: var(--m-accent-h);
	color: #F4F3EE;
}
.woocommerce button.button:disabled,
.woocommerce button.button.disabled { opacity: .35; }

/* Woo tabs and related products are noise on a one-of-a-kind art page */
.matilda-pdp .woocommerce-tabs,
.matilda-pdp .related.products,
.matilda-pdp .up-sells { display: none; }

/* ==================================================== woocommerce: misc ==
   The shop archive is replaced by the [matilda_shop] page, so the default
   archive only ever shows if someone lands on a category URL. Give it the
   same card look rather than leaving it themed by Astra.                    */
.woocommerce ul.products {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: clamp(32px, 3.5vw, 56px) clamp(20px, 2.2vw, 32px);
	margin: 0;
	padding: 0;
	list-style: none;
}
.woocommerce ul.products::before,
.woocommerce ul.products::after { display: none; }
.woocommerce ul.products li.product {
	width: auto !important;
	margin: 0 !important;
	float: none !important;
	text-align: start;
}
.woocommerce ul.products li.product a img {
	aspect-ratio: 4 / 5;
	object-fit: contain;
	background: var(--m-tile);
	border: 1px solid var(--m-line);
	padding: clamp(14px, 1.8vw, 30px);
	margin-bottom: var(--s3);
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--f-display);
	font-size: 1.125rem;
	font-weight: 500;
	line-height: 1.35;
	color: var(--m-ink);
	padding: 0;
	margin: 0;
}
.woocommerce ul.products li.product .price {
	font-size: var(--t-cap);
	color: var(--m-muted);
	font-variant-numeric: tabular-nums;
	margin-top: var(--s1);
	display: block;
}
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .onsale { display: none; }

@media (max-width: 1024px) { .woocommerce ul.products { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px)  { .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); gap: var(--s4) var(--s2); } }

/* Woo message / error banners */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	border-top: 0;
	border-inline-start: 2px solid var(--m-accent);
	background: var(--m-band);
	color: var(--m-body);
	font-size: 0.9375rem;
	border-radius: 0;
	padding: var(--s3) var(--s4);
}
.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before { display: none; }

/* Cart / checkout tables kept quiet and on-grid */
.woocommerce table.shop_table {
	border: 1px solid var(--m-line);
	border-radius: 0;
	border-collapse: collapse;
}
.woocommerce table.shop_table th,
.woocommerce table.shop_table td { border-color: var(--m-line); font-family: var(--f); }
.woocommerce .cart_totals h2,
.woocommerce-checkout h3 {
	font-size: var(--t-h3);
	font-weight: 500;
	letter-spacing: 0.02em;
	color: var(--m-ink);
}
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
	font-family: var(--f);
	border: 0;
	border-block-end: 1px solid var(--m-line);
	border-radius: 0;
	padding: 11px 0;
	background: transparent;
}
.woocommerce form .form-row label { font-size: var(--t-cap); color: var(--m-faint); letter-spacing: 0.08em; }

/* --------------------------------------------------------- cart drawer --
   .cart / .cart__hd / .cart__body come from style.css; only the Woo mini-cart
   markup inside needs mapping onto the prototype's .cart__row look.         */
.cart-scrim {
	position: fixed; inset: 0; z-index: 991;
	background: rgba(19, 19, 18, .4);
	opacity: 0; visibility: hidden;
	transition: opacity 300ms var(--e), visibility 300ms;
}
.cart-scrim[data-open="true"] { opacity: 1; visibility: visible; }
.cart-scrim[hidden] { display: block; }        /* [hidden] would kill the fade */

.cart .woocommerce-mini-cart {
	list-style: none;
	margin: 0;
	padding: 0;
}
.cart .woocommerce-mini-cart-item {
	display: grid;
	grid-template-columns: 60px 1fr auto;
	gap: var(--s3);
	align-items: center;
	padding-block: var(--s3) !important;
	border-block-end: 1px solid var(--m-line);
	margin: 0;
}
.cart .woocommerce-mini-cart-item a:not(.remove) {
	grid-column: 2;
	grid-row: 1;
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--m-ink);
	display: block;
}
.cart .woocommerce-mini-cart-item img {
	grid-column: 1;
	grid-row: 1;
	width: 60px !important;
	height: 75px;
	object-fit: contain;
	background: var(--m-white);
	border: 1px solid var(--m-line);
	margin: 0 !important;
	float: none !important;
}
.cart .woocommerce-mini-cart-item .quantity {
	grid-column: 2;
	grid-row: 1;
	align-self: end;
	font-size: var(--t-cap);
	color: var(--m-muted);
}
.cart .woocommerce-mini-cart-item a.remove {
	grid-column: 3;
	grid-row: 1;
	position: static !important;
	font-size: 18px;
	color: var(--m-faint) !important;
	background: none !important;
	width: auto; height: auto;
}
.cart .woocommerce-mini-cart-item a.remove:hover { color: var(--m-accent) !important; }

.cart .woocommerce-mini-cart__total {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-block: var(--s3);
	padding-block-start: var(--s3);
	border-block-start: 1px solid var(--m-line);
	font-size: 1.0625rem;
	color: var(--m-ink);
}
.cart .woocommerce-mini-cart__total strong { font-weight: 400; }
.cart .woocommerce-mini-cart__buttons {
	display: flex;
	flex-direction: column;
	gap: var(--s1);
	margin: 0;
}
.cart .woocommerce-mini-cart__buttons a { width: 100%; }
.cart .woocommerce-mini-cart__buttons a.checkout { order: -1; }
.cart .woocommerce-mini-cart__empty-message {
	color: var(--m-muted);
	font-size: 0.9375rem;
	padding-block: var(--s4);
}

/* ------------------------------------------------------------ a11y bits -- */
.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.skip-link:focus {
	position: fixed;
	inset-block-start: 8px;
	inset-inline-start: 8px;
	z-index: 1000;
	background: var(--m-ink);
	color: var(--m-paper);
	padding: 12px 20px;
	clip: auto;
	width: auto;
	height: auto;
}

/* --------------------------------------------------- overflow guards --
   Found by the responsive audit: two Woo elements render wider than a
   390px viewport. They were clipped rather than scrolling, but a clipped
   button is still a button someone cannot fully read.                    */

/* Woo's zoom plugin clones the full-size image at its natural width. */
.zoomImg { max-width: 100%; height: auto; }

/* The add-to-cart button's fixed inline padding beat the phone viewport. */
.matilda-pdp form.cart { flex-wrap: wrap; }
.matilda-pdp form.cart .button,
.woocommerce .matilda-pdp button.single_add_to_cart_button {
	width: 100%;
	max-width: 100%;
	padding-inline: var(--s3);
	text-align: center;
}

/* The product column layout, matching the prototype's .pdp breakpoints. */
@media (max-width: 1024px) {
	.matilda-pdp { flex-direction: column !important; }
	.matilda-pdp > .e-con { width: 100% !important; }
}

/* ------------------------------------------------ elementor pro forms --
   The contact form is a real Elementor Pro form (it emails AND stores the
   submission). These rules map its markup onto the prototype's .field look
   so the page is indistinguishable from the approved design.              */
.matilda-contact .elementor-form .elementor-field-group {
	margin-bottom: var(--s3);
	padding: 0;
}
.matilda-contact .elementor-field-group > label.elementor-field-label {
	display: block;
	font-size: var(--t-cap);
	letter-spacing: 0.08em;
	color: var(--m-faint);
	margin-bottom: 6px;
	font-weight: 400;
}
.matilda-contact .elementor-field-group .elementor-field-textual {
	width: 100%;
	padding: 11px 0;
	font-family: var(--f);
	font-size: var(--t-body);
	line-height: 1.7;
	color: var(--m-ink);
	background: transparent;
	border: 0;
	border-block-end: 1px solid var(--m-line);
	border-radius: 0;
	box-shadow: none;
	transition: border-color var(--d-ui) var(--e);
}
.matilda-contact .elementor-field-group .elementor-field-textual:focus {
	outline: none;
	border-block-end-color: var(--m-accent);
	box-shadow: none;
}
.matilda-contact .elementor-field-group textarea { resize: vertical; min-height: 110px; }
.matilda-contact .elementor-field-group select {
	appearance: none;
	background-image: none;
}
.matilda-contact .elementor-field-type-acceptance .elementor-field-option {
	display: flex;
	align-items: flex-start;
	gap: var(--s1);
}
.matilda-contact .elementor-field-type-acceptance input { width: auto; margin-top: 6px; }
.matilda-contact .elementor-field-type-acceptance label {
	margin: 0;
	font-size: var(--t-body);
	color: var(--m-body);
}
.matilda-contact .elementor-field-required .elementor-field-label::after { content: " *"; }

.matilda-contact .elementor-form .elementor-button {
	width: 100%;
	min-height: 52px;
	padding-inline: var(--s5);
	font-family: var(--f);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	background: var(--m-accent);
	color: #F4F3EE;
	border: 1px solid var(--m-accent);
	border-radius: 0;
	transition: background var(--d-ui) var(--e), border-color var(--d-ui) var(--e);
}
.matilda-contact .elementor-form .elementor-button:hover {
	background: var(--m-accent-h);
	border-color: var(--m-accent-h);
}
.matilda-contact .elementor-message {
	font-family: var(--f);
	font-size: 0.9375rem;
	margin-top: var(--s2);
}
.matilda-contact .elementor-message.elementor-message-success { color: var(--m-accent); }

/* `.split` is a CSS grid; an Elementor container defaults to flex, so the
   two columns need the grid re-asserted at container specificity. */
.matilda-split.e-con,
.matilda-split > .e-con-inner {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(32px, 5vw, 88px);
	align-items: start;
}
@media (max-width: 860px) {
	.matilda-split.e-con,
	.matilda-split > .e-con-inner { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
	.matilda-split.e-con,
	.matilda-split > .e-con-inner { display: flex; flex-direction: column; }
	.matilda-split .formwrap { order: -1; }
}

/* -------------------------------------------------------- accessibility --
   axe, 25.10.2026. Text that only a screen reader needs (the cart button
   reads "סל הקניות, פריטים: 0" while the eye sees "סל 0").                  */
.sr-only {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0);
	white-space: nowrap; border: 0;
}
/* The product description widget took Elementor's global text colour
   #7A7A7A (4.1:1 on the paper ground). */
.matilda-pdp .elementor-widget-woocommerce-product-content,
.matilda-pdp .elementor-widget-woocommerce-product-content p { color: var(--m-body); }
