/* MPES theme. Colours come from CSS variables printed by the theme from "הגדרות האתר". */

:root {
  --c-primary: #548c60;
  --c-accent: #61ce70;
  --c-bg: #fdf5e6;
  --c-text: #0e0000;
  --c-btn: #3f7a2c;
  --c-notice: #6d2ee0;
  --c-price: #6b5e1a;
  --c-title: #3f6948; /* green text: darker than --c-primary so it passes contrast on white and cream */
  --c-field: #8f8672; /* borders of inputs (3:1 against white) */
  --c-card: #fff;
  --c-line: #e3d9c2;
  --c-danger: #b3261e;
  --radius: 24px;
  --radius-sm: 14px;
  --shadow: 0 10px 28px rgba(14, 0, 0, 0.1);
  --shadow-sm: 0 4px 14px rgba(14, 0, 0, 0.08);
  --container: 1280px;
  --header-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: "Heebo", "Assistant", "Segoe UI", system-ui, -apple-system, "Noto Sans Hebrew", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
img { max-width: 100%; height: auto; }
a { color: var(--c-title); }
h1, h2, h3 { line-height: 1.25; }
button { font: inherit; }

.container { width: min(100% - 2rem, var(--container)); margin-inline: auto; }
.icon { display: block; flex: none; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed !important; inset-block-start: 8px; inset-inline-start: 8px; z-index: 1000;
  width: auto; height: auto; margin: 0; clip: auto; padding: 0.6rem 1rem; background: #fff; color: var(--c-text); border-radius: 8px;
}
:focus-visible { outline: 3px solid var(--c-primary); outline-offset: 2px; }

/* ---------- notice bars ---------- */
.woocommerce-store-notice,
p.demo_store {
  position: static !important;
  margin: 0;
  padding: 0.65rem 1rem;
  background: var(--c-notice);
  color: #fff;
  text-align: center;
  font-size: 1rem;
}
.woocommerce-store-notice a { color: #fff; text-decoration: underline; margin-inline-start: 0.5rem; }
.announce { background: var(--c-primary); color: #fff; text-align: center; padding: 0.55rem 1rem; font-weight: 600; }
.announce a { color: inherit; }

/* ---------- header ---------- */
.site-header {
  position: sticky; inset-block-start: 0; z-index: 50;
  background: #fff; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}
body.admin-bar .site-header { inset-block-start: 32px; }
@media (max-width: 782px) { body.admin-bar .site-header { inset-block-start: 46px; } }

.site-header__inner {
  display: flex; align-items: center; gap: 1rem;
  min-height: var(--header-h); padding: 0.4rem 1rem; max-width: 1600px; margin-inline: auto;
}
.site-logo { display: inline-flex; align-items: center; flex: none; text-decoration: none; }
.site-logo__img { height: 58px; width: auto; display: block; }
.site-logo__text { font-weight: 800; font-size: 1.4rem; color: var(--c-primary); }

.cat-strip {
  flex: 1; display: flex; justify-content: center; gap: 0.15rem;
  overflow-x: auto; scrollbar-width: none; min-width: 0;
}
.cat-strip::-webkit-scrollbar { display: none; }
.cat-strip__item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 72px; padding: 0.2rem 0.3rem; border-radius: 12px;
  color: var(--c-title); text-decoration: none; font-size: 0.8rem; font-weight: 700; text-align: center; line-height: 1.15;
}
.cat-strip__item:hover, .cat-strip__item:focus-visible { background: rgba(84, 140, 96, 0.1); }
.cat-strip__icon { width: 40px; height: 40px; display: grid; place-items: center; }
.cat-strip__icon img, .cat-icon { width: 100%; height: 100%; object-fit: contain; display: block; }

.header-actions { display: flex; align-items: center; gap: 0.25rem; margin-inline-start: auto; }
.header-actions__link {
  position: relative; display: grid; place-items: center; width: 46px; height: 46px;
  border-radius: 50%; color: var(--c-primary); text-decoration: none;
}
.header-actions__link:hover { background: rgba(84, 140, 96, 0.1); }
.header-actions__link .icon { width: 28px; height: 28px; }
.site-cart-count {
  position: absolute; inset-block-start: 2px; inset-inline-end: 0; min-width: 20px; height: 20px; padding: 0 5px;
  display: grid; place-items: center; border-radius: 10px; background: var(--c-btn); color: #fff; font-size: 0.8rem; font-weight: 700; line-height: 1;
}
.site-cart-count.is-empty { display: none; }

.menu-toggle, .cat-drawer__close {
  display: none; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%;
  background: transparent; color: var(--c-primary); cursor: pointer;
}
.menu-toggle .icon, .cat-drawer__close .icon { width: 28px; height: 28px; }

@media (max-width: 960px) {
  .menu-toggle { display: grid; }
  .cat-strip { display: none; }
  .site-logo { margin-inline: auto; }
  .site-logo__img { height: 48px; }
  .header-actions { margin-inline-start: 0; }
}

/* mobile category menu */
.cat-drawer { position: fixed; inset: 0; z-index: 100; background: var(--c-bg); overflow-y: auto; padding: 0 1rem 2rem; }
.cat-drawer[hidden] { display: none; }
.cat-drawer__bar { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 0; font-size: 1.2rem; color: var(--c-primary); }
.cat-drawer__close { display: grid; }
body.drawer-open { overflow: hidden; }

.cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem 0.5rem; }
.cat-grid__item {
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
  color: var(--c-title); text-decoration: none; font-weight: 700; text-align: center; font-size: 0.95rem; line-height: 1.2;
}
.cat-grid__item img { width: 76px; height: 76px; object-fit: contain; }
.cat-grid--home { display: none; margin: 1.5rem 0; }
@media (max-width: 960px) { .cat-grid--home { display: grid; } }
@media (min-width: 540px) and (max-width: 960px) { .cat-grid--home { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- home ---------- */
.home, .shop-wrap, .page-wrap { padding-block: 1.25rem 2rem; }

.product-search { display: flex; max-width: 520px; margin: 1.25rem auto; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow); background: #f1f1f4; }
.product-search__input { flex: 1; border: 0; background: transparent; padding: 0.9rem 1.1rem; font: inherit; min-width: 0; }
.product-search__input:focus { outline: none; }
.product-search:focus-within { outline: 3px solid var(--c-primary); }
.product-search__btn { border: 0; background: var(--c-text); color: #fff; width: 56px; display: grid; place-items: center; cursor: pointer; }
.product-search__btn .icon { width: 24px; height: 24px; }

.banners { position: relative; margin: 1.5rem 0; }
.banners__track {
  display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.banners__track::-webkit-scrollbar { display: none; }
.banners__slide { flex: 0 0 100%; scroll-snap-align: center; }
.banners__slide img { display: block; width: 100%; height: auto; border-radius: var(--radius); }
.banners__controls { display: flex; justify-content: center; align-items: center; gap: 0.75rem; margin-top: 0.5rem; }
.banners__dots { display: flex; gap: 0.35rem; }
.banners__dot { position: relative; width: 14px; height: 14px; padding: 0; border: 0; border-radius: 50%; background: #b9ad92; cursor: pointer; }
.banners__dot::after { content: ""; position: absolute; inset: -15px; } /* 44px touch area */
.banners__dot.is-active { background: var(--c-title); }
.banners__toggle { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--c-title); cursor: pointer; }
.banners__toggle[hidden] { display: none; }
.banners__toggle-icon { width: 14px; height: 16px; border-inline: 4px solid currentColor; } /* pause bars */
.banners__toggle[aria-pressed="true"] .banners__toggle-icon { width: 0; height: 0; border-inline: 0; border-block: 8px solid transparent; border-inline-start: 13px solid currentColor; border-inline-end: 0; } /* play triangle */

.home-products__title {
  display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
  margin: 2rem 0 1rem; color: var(--c-title); font-size: 1.5rem;
}
.home-products__title .icon { width: 36px; height: 36px; }

/* ---------- product grids ---------- */
ul.products {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem;
  list-style: none; margin: 1.5rem 0; padding: 0;
}
@media (min-width: 600px) { ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; } }
@media (min-width: 900px) { ul.products { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1100px) { ul.products { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
/* WooCommerce's clearfix pseudo-elements would take the first cell of the grid */
ul.products::before, ul.products::after,
.woocommerce ul.products::before, .woocommerce ul.products::after,
.woocommerce-page ul.products::before, .woocommerce-page ul.products::after { content: none !important; display: none !important; }
ul.products li.product {
  position: relative; display: flex; flex-direction: column; float: none; width: auto; margin: 0; padding: 1rem;
  background: var(--c-card); border-radius: var(--radius); box-shadow: var(--shadow-sm); text-align: center; overflow: hidden;
}
ul.products li.product a.woocommerce-LoopProduct-link { display: flex; flex-direction: column; flex: 1; color: inherit; text-decoration: none; }
ul.products li.product img { width: 100%; aspect-ratio: 1; object-fit: contain; margin: 0 0 0.6rem; }
/* equal title height (max 3 lines) and price pinned above the button, so every card in a row lines up */
.woocommerce-loop-product__title {
  margin: 0.25rem 0 0.4rem; font-size: 1rem; font-weight: 600; color: var(--c-title); line-height: 1.3;
  min-height: 3.9em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.woocommerce ul.products li.product .price,
ul.products li.product .price { display: block; margin: auto 0 0.7rem; color: var(--c-price); font-size: 1rem; font-weight: 700; }
.woocommerce ul.products li.product .price .woocommerce-Price-currencySymbol,
.price .woocommerce-Price-currencySymbol { font-size: inherit; }
.woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--c-price); }
.price del { opacity: 0.7; margin-inline-end: 0.35rem; }
.price ins { text-decoration: none; }
.onsale {
  position: absolute; inset-block-start: 0.6rem; inset-inline-start: 0.6rem; z-index: 2;
  padding: 0.15rem 0.7rem; border-radius: 999px; background: var(--c-danger); color: #fff; font-size: 0.8rem; font-weight: 700;
}

.button, button.button, a.button, input[type="submit"], .woocommerce a.button, .woocommerce button.button, .woocommerce #respond input#submit,
.add_to_cart_button, .single_add_to_cart_button {
  display: inline-block; min-height: 44px; margin-top: auto; padding: 0.6rem 1.4rem; border: 0; border-radius: 999px;
  background: var(--c-btn); color: #fff; font-weight: 700; line-height: 1.3; text-align: center; text-decoration: none; cursor: pointer;
}
/* WooCommerce paints ".alt" buttons purple; keep every button in the theme colour */
.woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt, .woocommerce #respond input#submit.alt,
.woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .woocommerce input.button.alt:hover,
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover {
  background-color: var(--c-btn); color: #fff;
}
.button:hover, .add_to_cart_button:hover, .single_add_to_cart_button:hover { filter: brightness(0.92); color: #fff; }
.button.disabled, .button:disabled { opacity: 0.5; cursor: not-allowed; }
a.added_to_cart { display: block; margin-top: 0.5rem; font-size: 0.9rem; }

.woocommerce-result-count { margin: 0; float: none; }
.woocommerce-ordering { margin: 0; float: none; }
.woocommerce-ordering select { width: auto; }
.shop-wrap .woocommerce-result-count, .shop-wrap .woocommerce-ordering { display: inline-block; margin-block: 0.5rem; }
.shop-wrap .woocommerce-ordering { margin-inline-start: 1rem; }

.woocommerce-pagination, .page-numbers-wrap { margin: 2rem 0; text-align: center; }
.woocommerce-pagination ul, .navigation .nav-links { display: inline-flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; margin: 0; padding: 0; border: 0; }
.woocommerce-pagination ul li { border: 0; float: none; }
/* page numbers: each number is its own pill; the list around them must stay plain (it carries the same class) */
.woocommerce nav.woocommerce-pagination ul, ul.page-numbers {
  display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; height: auto; min-width: 0; overflow: visible;
}
.woocommerce nav.woocommerce-pagination ul li { float: none; border: 0; overflow: visible; background: none; }
.woocommerce nav.woocommerce-pagination ul li a, .woocommerce nav.woocommerce-pagination ul li span,
.navigation .nav-links a.page-numbers, .navigation .nav-links span.page-numbers {
  display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 0.8rem; border: 0; border-radius: 12px;
  background: #fff; color: var(--c-title); font-size: 1rem; font-weight: 700; line-height: 1; text-decoration: none; box-shadow: var(--shadow-sm);
}
.woocommerce nav.woocommerce-pagination ul li a:hover, .woocommerce nav.woocommerce-pagination ul li a:focus { background: #f4fbf3; color: var(--c-title); }
.woocommerce nav.woocommerce-pagination ul li span.current, .navigation .nav-links span.current { background: var(--c-title); color: #fff; }

/* category page */
.page-title, .woocommerce-products-header__title { margin: 1rem 0; text-align: center; color: var(--c-title); font-size: clamp(1.8rem, 4vw, 2.6rem); }
.term-description { text-align: center; margin-bottom: 1rem; }
.subcats { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin: 1rem 0 1.5rem; }
.subcats__item {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 0.3rem; width: 112px; min-height: 118px; padding: 0.7rem 0.4rem;
  background: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); color: var(--c-title); text-decoration: none; font-weight: 700; font-size: 0.9rem; text-align: center; line-height: 1.2;
}
.subcats__item img { width: 56px; height: 56px; object-fit: contain; }
.subcats__item:hover { box-shadow: var(--shadow); }
.subcats__item--text { flex-direction: row; justify-content: center; width: auto; min-height: 44px; padding: 0.5rem 1.1rem; border-radius: 999px; }
@media (max-width: 600px) {
  .subcats { gap: 0.5rem; }
  .subcats__item { width: calc((100% - 1rem) / 3); min-height: 92px; padding: 0.5rem 0.25rem; font-size: 0.85rem; }
  .subcats__item img { width: 44px; height: 44px; }
  .subcats__item--text { width: auto; min-height: 44px; }
}

/* kosher labels (markup comes from the kosher plugin) */
.labels-in-product { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0; }
.labels-in-product img { height: 64px; width: auto; }

/* ---------- single product ---------- */
.back-btn {
  display: inline-flex; align-items: center; gap: 0.15rem; margin: 0.5rem 0; padding: 0.35rem 1rem 0.35rem 0.7rem;
  border-radius: 999px; background: var(--c-title); color: #fff; text-decoration: none; font-weight: 700;
}
.woocommerce div.product p.stock, .woocommerce div.product .in-stock, .stock.in-stock { color: var(--c-title); }
.woocommerce div.product .out-of-stock, .stock.out-of-stock { color: var(--c-danger); }
.back-btn .icon { width: 22px; height: 22px; }
.woocommerce-breadcrumb { margin: 0.5rem 0 1rem; font-size: 0.9rem; opacity: 0.85; }
.single-product div.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
.single-product div.product > .back-btn { grid-column: 1 / -1; justify-self: start; }
.single-product div.product .woocommerce-product-gallery { margin: 0; background: #fff; border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow-sm); }
.single-product div.product .woocommerce-product-gallery img { border-radius: var(--radius-sm); }
.woocommerce-product-gallery__image img { max-height: min(62vh, 560px); width: auto !important; max-width: 100%; margin-inline: auto; object-fit: contain; }
.woocommerce-product-gallery .flex-viewport { height: auto !important; }
.woocommerce-product-gallery__trigger { position: absolute; inset-block-start: 0.75rem; inset-inline-start: 0.75rem; z-index: 5; text-decoration: none; }
.single-product .summary { margin: 0; }
.product_title { margin: 0 0 0.5rem; color: var(--c-title); font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
.product-cats { margin: 0 0 0.5rem; }
.summary .price { display: block; margin: 0.6rem 0 1rem; color: var(--c-price); font-size: 1.6rem; font-weight: 800; }
.product-content { margin: 1rem 0; }
form.cart { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin: 1rem 0; }
.quantity input.qty { width: 5.5rem; text-align: center; }
.single_add_to_cart_button { margin-top: 0; padding: 0.8rem 2.2rem; font-size: 1.1rem; }
@media (max-width: 780px) { .single-product div.product { grid-template-columns: 1fr; } }

/* ---------- forms and notices ---------- */
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], input[type="search"], input[type="url"], select, textarea {
  width: 100%; min-height: 44px; padding: 0.7rem 1rem; border: 1px solid var(--c-field); border-radius: var(--radius-sm); background: #fff; color: var(--c-text); font: inherit;
}
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--c-primary); }
label { font-weight: 600; }
.woocommerce form .form-row { margin: 0 0 1rem; padding: 0; }
.woocommerce form .form-row-first, .woocommerce form .form-row-last { width: 48%; }
.woocommerce form .form-row-first { float: inline-start; }
.woocommerce form .form-row-last { float: inline-end; }
.woocommerce form .form-row-wide, .woocommerce form .form-row.notes { clear: both; }
.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-notice {
  list-style: none; margin: 0 0 1rem; padding: 1rem 1.25rem; background: #fff; border-radius: var(--radius-sm);
  border-inline-start: 5px solid var(--c-primary); box-shadow: var(--shadow-sm);
}
.woocommerce-error { border-inline-start-color: var(--c-danger); }
.woocommerce-info, .woocommerce-message, .woocommerce-error { border-top: 0; color: var(--c-text); }
.woocommerce-info a, .woocommerce-message a { color: var(--c-title); }
.woocommerce-message::before, .woocommerce-info::before, .woocommerce-error::before { display: none; }
.woocommerce-message .button, .woocommerce-info .button { float: inline-end; margin: 0; }

/* ---------- cart, checkout, account ---------- */
.page-content { background: transparent; }
table.shop_table, .woocommerce table.shop_table {
  width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: 0; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-sm);
}
table.shop_table th, table.shop_table td { padding: 0.8rem 1rem; text-align: start; border-bottom: 1px solid var(--c-line); vertical-align: middle; }
table.shop_table tr:last-child td, table.shop_table tr:last-child th { border-bottom: 0; }
table.cart img { width: 64px; height: 64px; object-fit: contain; }
table.cart td.actions { text-align: end; }
table.cart .product-remove a { color: var(--c-danger); font-size: 1.4rem; text-decoration: none; }
.cart-collaterals { margin-top: 1.5rem; display: flex; justify-content: flex-end; }
.cart_totals { width: min(100%, 420px); }
.cart_totals h2 { color: var(--c-primary); }
.wc-proceed-to-checkout .button { width: 100%; padding: 0.9rem; font-size: 1.1rem; }

form.checkout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.5rem 2rem; align-items: start; }
form.checkout #customer_details { grid-column: 1; }
form.checkout #order_review_heading, form.checkout #order_review { grid-column: 2; }
form.checkout #order_review_heading { margin: 0; color: var(--c-primary); }
form.checkout .col2-set .col-1, form.checkout .col2-set .col-2 { float: none; width: 100%; }
#payment { background: #fff; border-radius: var(--radius-sm); padding: 1rem; box-shadow: var(--shadow-sm); }
#payment ul.payment_methods { list-style: none; margin: 0 0 1rem; padding: 0; }
#payment .place-order .button { width: 100%; padding: 0.9rem; font-size: 1.1rem; }
@media (max-width: 860px) {
  form.checkout { grid-template-columns: 1fr; }
  form.checkout #customer_details, form.checkout #order_review_heading, form.checkout #order_review { grid-column: 1; }
  .woocommerce form .form-row-first, .woocommerce form .form-row-last { width: 100%; float: none; }
  table.shop_table_responsive thead { display: none; }
}

.woocommerce-account .woocommerce { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 0.5rem; background: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.woocommerce-MyAccount-navigation a { display: block; padding: 0.65rem 0.9rem; border-radius: 10px; color: var(--c-text); text-decoration: none; font-weight: 600; }
.woocommerce-MyAccount-navigation .is-active a, .woocommerce-MyAccount-navigation a:hover { background: var(--c-primary); color: #fff; }
.woocommerce-MyAccount-content { background: #fff; border-radius: var(--radius-sm); padding: 1.25rem; box-shadow: var(--shadow-sm); }
.woocommerce-account .woocommerce-MyAccount-navigation, .woocommerce-account .woocommerce-MyAccount-content { float: none; width: auto; }
@media (max-width: 780px) { .woocommerce-account .woocommerce { grid-template-columns: minmax(0, 1fr); } }
.woocommerce-MyAccount-navigation, .woocommerce-MyAccount-content { min-width: 0; }
mark, .woocommerce mark { background: transparent; color: inherit; font-weight: 700; }
.woocommerce-orders-table__cell-order-actions .button, .woocommerce-account .woocommerce-button { min-height: 44px; }
@media (max-width: 780px) {
  /* account menu becomes one scrolling row of pills instead of six stacked lines */
  .woocommerce-MyAccount-navigation ul { display: flex; gap: 0.4rem; overflow-x: auto; padding: 0.4rem; scrollbar-width: none; }
  .woocommerce-MyAccount-navigation ul::-webkit-scrollbar { display: none; }
  .woocommerce-MyAccount-navigation li { flex: none; }
  .woocommerce-MyAccount-navigation a { display: flex; align-items: center; min-height: 44px; padding: 0.5rem 1rem; border-radius: 999px; white-space: nowrap; }
  /* orders list: one block per order (the WooCommerce small-screen stylesheet is not loaded) */
  table.shop_table_responsive.my_account_orders, table.shop_table_responsive.my_account_orders tbody { display: block; }
  table.shop_table_responsive.my_account_orders thead { display: none; }
  table.shop_table_responsive.my_account_orders tr { display: block; padding: 0.5rem 0; border-bottom: 1px solid var(--c-line); }
  table.shop_table_responsive.my_account_orders tr:last-child { border-bottom: 0; }
  table.shop_table_responsive.my_account_orders td, table.shop_table_responsive.my_account_orders th {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.4rem 1rem; border: 0; text-align: end;
  }
  table.shop_table_responsive.my_account_orders td::before, table.shop_table_responsive.my_account_orders th::before { content: attr(data-title) ": "; font-weight: 700; text-align: start; }
  table.shop_table_responsive.my_account_orders td.woocommerce-orders-table__cell-order-actions::before { content: none; }
  table.shop_table_responsive.my_account_orders td.woocommerce-orders-table__cell-order-actions { justify-content: flex-end; }
}

/* cart items on small screens: one block per product (the WooCommerce small-screen stylesheet is not loaded) */
.woocommerce-cart-form, .cart_totals, .woocommerce-checkout-review-order { max-width: 100%; }
table.cart .product-remove a { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; }
@media (max-width: 768px) {
  table.shop_table_responsive.cart, table.shop_table_responsive.cart tbody { display: block; }
  table.shop_table_responsive.cart thead { display: none; }
  table.shop_table_responsive.cart tr { display: block; padding: 0.5rem 0; border-bottom: 1px solid var(--c-line); }
  table.shop_table_responsive.cart tr:last-child { border-bottom: 0; }
  table.shop_table_responsive.cart td {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 0.4rem 1rem; border: 0; text-align: end;
  }
  table.shop_table_responsive.cart td::before { content: attr(data-title) ": "; font-weight: 700; text-align: start; }
  table.shop_table_responsive.cart td.product-remove::before,
  table.shop_table_responsive.cart td.product-thumbnail::before,
  table.shop_table_responsive.cart td.actions::before { content: none; }
  table.shop_table_responsive.cart td.product-thumbnail { justify-content: center; }
  table.shop_table_responsive.cart td.actions { display: block; text-align: start; }
  table.shop_table_responsive.cart td.actions .coupon { display: grid; gap: 0.5rem; margin-bottom: 0.75rem; }
  table.shop_table_responsive.cart td.actions .button { width: 100%; }
  table.shop_table_responsive.cart .quantity input.qty { width: 5rem; }
  .cart_totals { width: 100%; }
}

/* ---------- review fixes ---------- */
/* The category icon files already contain their own small caption at the bottom; the real text label is printed
   next to them, so the caption inside the picture is cropped away to avoid showing every name twice. */
/* (the caption is now removed from the icon file itself, see inc/icons.php) - clean copies have their own proportions, so fit them in a fixed box */
.cat-strip__icon { width: 44px; height: 44px; }
.cat-strip__icon img { width: auto; height: auto; max-width: 44px; max-height: 44px; }
.cat-grid__item img { width: auto; height: auto; max-width: 76px; max-height: 76px; }
.subcats__item img { width: auto; height: auto; max-width: 56px; max-height: 56px; }
@media (max-width: 600px) { .subcats__item img { max-width: 44px; max-height: 44px; } }
.woocommerce-account .woocommerce::before, .woocommerce-account .woocommerce::after { content: none !important; display: none !important; }
.cat-drawer__links { display: grid; gap: 0.25rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--c-line); }
.cat-drawer__links a { display: flex; align-items: center; gap: 0.75rem; min-height: 48px; padding: 0 0.5rem; color: var(--c-title); font-weight: 700; text-decoration: none; }
.cat-drawer__links .icon { width: 24px; height: 24px; }
ul.products li.product .price, .woocommerce ul.products li.product .price { font-size: 1.15rem; }
@media (min-width: 961px) { .cat-strip__item { font-size: 0.85rem; min-width: 78px; } }
@media (max-width: 780px) {
  .site-main { padding-bottom: 5.5rem; }                       /* the floating cart button no longer sits on the last row */
  #mpes-cart-icon-wrap { transform: scale(0.82); transform-origin: bottom left; }
  .single-product #mpes-cart-icon-wrap { bottom: 88px !important; }
  /* product page: the buy button stays at the bottom of the screen */
  .single-product form.cart:not(:has(.bulk-discount-details)) {
    position: sticky; bottom: 0; z-index: 40; margin: 0 -1rem; padding: 0.75rem 1rem; background: #fff; box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.12); justify-content: space-between;
  }
  .single-product form.cart:not(:has(.bulk-discount-details)) .single_add_to_cart_button { flex: 1; }
  table.shop_table_responsive.cart td.product-thumbnail img { width: 96px; height: 96px; object-fit: contain; }
}

/* ---------- weight dialog, side cart steppers, "already in cart" marking, RTL checkout ---------- */

/* bulk-discount ("הנחת מארז") on product cards: one small tag and a compact outlined button instead of two big blocks */
ul.products li.product form.cart { display: block; margin: 0 0 0.5rem; }
ul.products li.product .bulk-discount-promo {
  display: inline-block; margin: 0 0 0.3rem; padding: 0.1rem 0.6rem; border-radius: 999px;
  background: #fde8e4; color: #a3271b; font-size: 0.8rem; font-weight: 800; box-shadow: none;
}
ul.products li.product .bulk-discount-details {
  display: flex; align-items: center; justify-content: center; gap: 0.35rem; width: 100%; min-height: 40px; margin: 0; padding: 0.3rem 0.6rem;
  background: #fff !important; color: var(--c-title) !important; border: 2px solid var(--c-title) !important; border-radius: 999px; font-size: 0.85rem; font-weight: 700; line-height: 1.2;
}
ul.products li.product .bulk-discount-details:hover { background: #f4fbf3 !important; }
ul.products li.product .bulk-discount-details .woocommerce-Price-amount { font-size: inherit; }   /* captions inside the icon files are cropped */

/* unit "ק"ג" to the left of the number, bigger and clearer controls (dialog, side cart and cart page) */
.mpes-input-unit { flex-direction: row-reverse; align-items: center; justify-content: center; gap: 0.35rem; }
.mpes-unit-label { color: var(--c-title); font-weight: 700; font-size: 1.05rem; }
.mpes-weight-controls .mpes-btn, .mpes-cart-item-weight-wrap .mpes-btn, .mpes-cart-weight-wrap .mpes-btn {
  min-width: 44px; min-height: 44px; border-radius: 50%; border: 2px solid var(--c-line); background: var(--c-bg); color: var(--c-title); font-weight: 700; cursor: pointer;
}
.mpes-weight-controls .mpes-btn:hover, .mpes-cart-item-weight-wrap .mpes-btn:hover { background: var(--c-accent); color: #fff; }
.mpes-weight-input { font-weight: 800; text-align: center; color: var(--c-text); border: 0; background: transparent; }
.mpes-modal-overlay { backdrop-filter: blur(2px); }
.mpes-modal-box { border-radius: var(--radius); padding: 1.6rem 1.4rem 1.4rem; max-width: 400px; }
.mpes-modal-title { color: var(--c-title); font-size: 1.3rem; }
.mpes-modal-product-name { color: var(--c-text); font-size: 1.15rem; font-weight: 700; }
.mpes-modal-price-per-kg { color: #5f5a4e; font-size: 0.95rem; }
.mpes-modal-box .mpes-weight-controls { padding: 0.6rem; border-radius: var(--radius-sm); background: var(--c-bg); align-items: center; gap: 0.4rem; }
.mpes-modal-box .mpes-weight-input { font-size: 1.8rem; }
.mpes-modal-box .mpes-price-preview { align-items: baseline; justify-content: space-between; padding: 0.6rem 0.2rem 0; }
.mpes-modal-box .mpes-price-value { color: var(--c-title); font-size: 1.6rem; font-weight: 800; }
.mpes-modal-confirm-btn { border-radius: 999px !important; background: var(--c-btn) !important; color: #fff !important; min-height: 52px; }

/* a product that is already in the cart is unmistakable: green frame, "✓ בסל" tag and a different button */
ul.products li.product.product-in-cart { outline: 3px solid var(--c-accent); outline-offset: -3px; background: #f4fbf3; }
ul.products li.product.product-in-cart::after {
  content: "✓ בסל"; position: absolute; top: 0.6rem; left: 0.6rem; z-index: 3;
  padding: 0.2rem 0.75rem; border-radius: 999px; background: var(--c-title); color: #fff; font-size: 0.9rem; font-weight: 800;
}
ul.products li.product.product-in-cart .button, ul.products li.product .mpes-archive-btn.mpes-in-cart { background: var(--c-title) !important; }
ul.products li.product .mpes-archive-btn.mpes-in-cart::before { content: "✓ "; }

/* checkout leans right (RTL) */
.woocommerce-checkout #payment, .woocommerce-checkout #order_review, .woocommerce-checkout form.checkout { direction: rtl; text-align: right; }
.woocommerce-checkout #payment ul.payment_methods li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.woocommerce-checkout #payment div.payment_box { margin: 0.75rem 0 0; padding: 1rem; width: 100%; text-align: right; border-radius: var(--radius-sm); background: var(--c-bg); color: var(--c-text); }
.woocommerce-checkout #payment div.payment_box::before { left: auto; right: 2rem; margin: -1rem 0 0; border-inline: 0.75rem solid transparent; border-block-end-color: var(--c-bg); }
.woocommerce-checkout #payment ul.payment_methods li > input[type="radio"] { order: -1; margin: 0; }
.woocommerce-checkout #payment ul.payment_methods li > label { margin: 0; }
.woocommerce-checkout #order_review_heading, .woocommerce-checkout #customer_details h3 { text-align: right; }
.woocommerce-checkout #payment .place-order { text-align: right; }
.woocommerce-checkout .form-row label { display: block; text-align: right; }

/* ---------- search box: one rounded field, round green button inside it ---------- */
form.product-search {
  display: flex; align-items: center; gap: 0.35rem; max-width: 560px; margin: 1.25rem auto; padding: 0.3rem;
  background: #fff; border: 2px solid var(--c-field); border-radius: 999px; box-shadow: var(--shadow-sm); overflow: visible;
  transition: border-color 0.15s, box-shadow 0.15s;
}
form.product-search:focus-within { border-color: var(--c-title); box-shadow: 0 0 0 4px rgba(63, 105, 72, 0.18), var(--shadow-sm); outline: none; }
form.product-search input.product-search__input[type="search"] {
  flex: 1; min-width: 0; min-height: 46px; padding: 0.5rem 1.1rem; border: 0; border-radius: 999px; background: transparent; box-shadow: none; font-size: 1.05rem; outline: none;
}
form.product-search input.product-search__input::placeholder { color: #6f6a5c; opacity: 1; }
form.product-search .product-search__btn { flex: none; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--c-btn); color: #fff; display: grid; place-items: center; cursor: pointer; }
form.product-search .product-search__btn:hover { filter: brightness(0.92); }
form.product-search .product-search__btn .icon { width: 22px; height: 22px; }

/* ---------- search suggestions and filters ---------- */
.search-wrap { position: relative; max-width: 520px; margin: 1.25rem auto; }
.search-wrap .product-search { margin: 0; max-width: none; }
.search-suggest {
  position: absolute; inset-inline: 0; top: calc(100% + 6px); z-index: 70; max-height: 70vh; overflow-y: auto;
  background: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 0.4rem;
}
.search-suggest[hidden] { display: none; }
.search-suggest a { display: flex; align-items: center; gap: 0.75rem; min-height: 52px; padding: 0.35rem 0.6rem; border-radius: 10px; color: var(--c-text); text-decoration: none; }
.search-suggest a:hover, .search-suggest a.is-active { background: #f4fbf3; }
.search-suggest img { width: 44px; height: 44px; object-fit: contain; flex: none; border-radius: 8px; background: #fff; }
.search-suggest__title { flex: 1; font-weight: 600; line-height: 1.25; }
.search-suggest__price { flex: none; color: var(--c-price); font-weight: 800; }
.search-suggest__cat { color: var(--c-title) !important; font-weight: 700; }
.search-suggest__all { justify-content: center; color: var(--c-title) !important; font-weight: 800; border-top: 1px solid var(--c-line); border-radius: 0 !important; }
.search-suggest__empty { margin: 0; padding: 0.9rem; text-align: center; }

.shop-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem; margin: 1rem 0; padding: 0.9rem 1rem; background: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.shop-filters__field { display: grid; gap: 0.25rem; flex: 1 1 180px; font-size: 0.9rem; font-weight: 700; color: var(--c-title); }
.shop-filters select { width: 100%; }
.shop-filters .button { margin: 0; }
.shop-filters__reset { align-self: center; font-weight: 700; }

/* ---------- order tracking ---------- */
.order-badge { display: inline-block; padding: 0.15rem 0.8rem; border-radius: 999px; background: #eee; font-weight: 800; font-size: 0.9rem; }
.order-badge--received { background: #e8eef9; color: #274a8a; }
.order-badge--picking { background: #fff3d6; color: #7a5200; }
.order-badge--ready { background: #dff3dc; color: #1f5a1b; }
.order-badge--done { background: #ececec; color: #444; }
.order-badge--cancelled { background: #fde8e4; color: #a3271b; }
.order-tracker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.25rem; margin: 0 0 1.5rem; padding: 0; list-style: none; counter-reset: none; }
.order-tracker li { position: relative; display: grid; justify-items: center; gap: 0.35rem; text-align: center; font-size: 0.9rem; font-weight: 700; color: #6f6a5c; }
.order-tracker li::before { content: ""; position: absolute; top: 15px; inset-inline-start: -50%; width: 100%; height: 4px; background: var(--c-line); z-index: 0; }
.order-tracker li:first-child::before { display: none; }
.order-tracker li.is-done::before, .order-tracker li.is-current::before { background: var(--c-title); }
.order-tracker__dot { position: relative; z-index: 1; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 3px solid var(--c-line); color: #6f6a5c; }
.order-tracker li.is-done .order-tracker__dot { background: var(--c-title); border-color: var(--c-title); color: #fff; }
.order-tracker li.is-current { color: var(--c-title); }
.order-tracker li.is-current .order-tracker__dot { border-color: var(--c-title); color: var(--c-title); box-shadow: 0 0 0 5px rgba(63, 105, 72, 0.18); }
.order-tracker__cancelled { padding: 0.6rem 1rem; border-radius: var(--radius-sm); background: #fde8e4; color: #a3271b; font-weight: 800; }

/* ---------- login / register ---------- */
.auth-card { max-width: 520px; margin: 1.5rem auto; padding: 1.75rem; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; margin-bottom: 1.25rem; padding: 0.3rem; background: var(--c-bg); border-radius: 999px; }
.auth-tabs button { padding: 0.6rem; border: 0; border-radius: 999px; background: transparent; color: var(--c-primary); font-weight: 700; cursor: pointer; }
.auth-tabs button.is-active { background: var(--c-primary); color: #fff; }
.auth-panel[hidden] { display: none; }
/* The User Registration plugin draws its own card and purple button; flatten them inside our card. */
.auth-card .user-registration, .auth-card .ur-frontend-form, .auth-card div.ur-frontend-form.login {
  max-width: none !important; margin: 0 !important; padding: 0 !important; border: 0 !important; box-shadow: none !important; background: transparent !important;
}
.auth-card .ur-submit-button, .auth-card .user-registration-Button.button, .auth-card button[type="submit"] {
  width: 100%; padding: 0.8rem; border: 0 !important; border-radius: 999px !important; background: var(--c-btn) !important; color: #fff !important; font-weight: 700; cursor: pointer;
}
.auth-card input[type="text"], .auth-card input[type="email"], .auth-card input[type="password"] { border-radius: var(--radius-sm) !important; }

/* ---------- footer ---------- */
.site-footer { margin-top: 3rem; padding: 2rem 0 2rem; background: #fff; border-top: 3px solid var(--c-accent); }
@media (max-width: 780px) { .site-footer { padding-bottom: 5.5rem; } } /* room for the floating cart button */
.site-footer__inner { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.5rem; align-items: center; justify-items: center; text-align: center; }
.site-footer h2 { margin: 0 0 0.5rem; font-size: 1.4rem; }
.site-footer__contact a { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0.15rem 0.6rem; color: var(--c-title); text-decoration: none; font-weight: 600; }
.site-footer__contact .icon { width: 20px; height: 20px; }
.site-footer__links { list-style: none; margin: 0.75rem 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1rem; }
.site-footer__logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1.25rem; }
.site-footer__logos img { max-height: 70px; width: auto; }
@media (max-width: 780px) { .site-footer__inner { grid-template-columns: 1fr; } }

/* ---------- shop closed (set by "ניהול השבתת קניות") ---------- */
.mpes-shop-closed .price,
.mpes-shop-closed .add_to_cart_button,
.mpes-shop-closed .single_add_to_cart_button,
.mpes-shop-closed form.cart,
.mpes-shop-closed .mpes-archive-btn,
.mpes-shop-closed #mpes-cart-icon-wrap,
.mpes-shop-closed #mpes-sidebar-cart,
.mpes-shop-closed #mpes-cart-overlay,
.mpes-shop-closed .mpes-modal-overlay,
.mpes-shop-closed .header-actions__cart,
.mpes-shop-closed .store_status { display: none !important; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
