/* ספרי תורה ירושלים — גיליונות (קטגוריות, סינון, סל), סרגל סינון מעל המוצרים, עמוד הסל והקופה (6.10.2026) */

/* ---- sheets: bottom sheet on phones, dialog / side panel on desktop ---- */
.stj-sheet { position: fixed; inset: 0; z-index: 100020; background: rgba(36, 20, 11, .45); visibility: hidden; opacity: 0; transition: opacity .22s, visibility 0s .25s; }
.stj-sheet.is-open { visibility: visible; opacity: 1; transition: opacity .22s; }
.stj-sheet-panel { position: absolute; inset-inline: 0; bottom: 0; max-height: 88vh; max-height: 88dvh; display: flex; flex-direction: column; background: #fff; border-radius: 22px 22px 0 0; box-shadow: 0 -18px 50px rgba(36, 20, 11, .25); transform: translateY(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); padding-bottom: env(safe-area-inset-bottom); }
.stj-sheet.is-open .stj-sheet-panel { transform: none; }
.stj-sheet-grip { width: 44px; height: 5px; border-radius: 999px; background: #d9cdbd; margin: 10px auto 0; flex: 0 0 auto; }
.stj-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px 6px 20px; padding-inline-start: 20px; border-bottom: 1px solid var(--stj-line); flex: 0 0 auto; touch-action: none; }
.stj-sheet-head p { margin: 0; font: 700 20px/1.3 var(--stj-serif); color: var(--stj-brown); }
.stj-sheet .stj-sheet-head .stj-icon-btn { background: transparent !important; color: var(--stj-brown) !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; }
.stj-sheet .stj-sheet-head .stj-icon-btn:hover { background: var(--stj-cream) !important; }
.stj-sheet-body { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 8px 18px 18px; flex: 1 1 auto; }
.stj-sheet-foot { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--stj-line); flex: 0 0 auto; background: #fff; }
.stj-sheet-foot .stj-btn { flex: 1; }
@media (min-width: 922px) {
  .stj-sheet-grip { display: none; }
  .stj-sheet-panel { inset: auto; top: 50%; left: 50%; width: min(880px, calc(100vw - 48px)); max-height: 84vh; border-radius: 20px; transform: translate(-50%, -46%); opacity: 0; transition: transform .22s, opacity .22s; padding-bottom: 0; }
  .stj-sheet.is-open .stj-sheet-panel { transform: translate(-50%, -50%); opacity: 1; }
}

/* ---- categories ---- */
.stj-cats-title { margin: 14px 2px 10px; font: 700 13.5px/1.3 var(--stj-sans); color: var(--stj-gold); letter-spacing: .02em; }
.stj-cats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stj-cats-tile { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 8px 6px 10px; border-radius: 14px; background: var(--stj-cream2); border: 1px solid #f0e8dc; text-decoration: none; color: var(--stj-ink); text-align: center; transition: background .15s, border-color .15s; }
.stj-cats-tile:hover, .stj-cats-tile:focus-visible { background: var(--stj-cream); border-color: var(--stj-gold2); color: var(--stj-brown); }
.stj-cats-img { width: 100%; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #efe6d8; display: block; }
.stj-cats-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stj-cats-name { font: 600 13.5px/1.3 var(--stj-sans); }
.stj-cats-all { display: flex; align-items: center; gap: 14px; margin: 18px 0 4px; padding: 14px 16px; border-radius: 14px; background: linear-gradient(120deg, var(--stj-brown), #3a1f11); color: #fff; text-decoration: none; }
.stj-cats-all .stj-ic { width: 30px; height: 30px; color: var(--stj-gold2); }
.stj-cats-all span { display: grid; gap: 2px; } .stj-cats-all strong { font-size: 16px; } .stj-cats-all small { color: #e6d8c3; font-size: 13.5px; }
.stj-cats-all:hover { color: #fff; }
@media (min-width: 600px) { .stj-cats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 922px) { .stj-cats-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } .stj-cats .stj-sheet-body { padding: 8px 24px 24px; } }

/* ---- filter bar above the products ---- */
.woocommerce .stj-fbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 14px; position: relative; z-index: 20; }
.stj-fbar-end { display: flex; align-items: center; gap: 14px; margin-inline-start: auto; }
.woocommerce .stj-fbar-end .woocommerce-result-count, .woocommerce .stj-fbar-end .woocommerce-ordering { float: none; margin: 0; }
.woocommerce .stj-fbar-end .woocommerce-result-count { color: var(--stj-muted); font-size: 14.5px; }
.woocommerce .stj-fbar-end .woocommerce-ordering select { min-height: 44px; padding: 0 14px; border: 1.5px solid var(--stj-line); border-radius: 999px; background-color: #fff; font: 600 14.5px var(--stj-sans); color: var(--stj-ink); }
.stj-fbtn { display: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--stj-brown); background: #fff; color: var(--stj-brown); font: 700 15px var(--stj-sans); cursor: pointer; }
.stj-fbtn .stj-i { width: 20px; height: 20px; }
.stj-fn { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--stj-gold); color: #fff; font: 700 12px/1 var(--stj-sans); }
.stj-fgroup { margin: 0; }
.stj-fgroup > summary { list-style: none; cursor: pointer; }
.stj-fgroup > summary::-webkit-details-marker { display: none; }
.stj-fgroup .woocommerce-widget-layered-nav-list { list-style: none; margin: 0; padding: 0; }
.stj-fgroup .woocommerce-widget-layered-nav-list li { margin: 0; padding: 0; display: flex; align-items: center; border-radius: 10px; }
.stj-fgroup .woocommerce-widget-layered-nav-list li:hover { background: var(--stj-cream); }
.stj-fgroup .woocommerce-widget-layered-nav-list li .count { padding-inline-end: 10px; }
.stj-fgroup .woocommerce-widget-layered-nav-list li a { flex: 1; display: flex; align-items: center; gap: 10px; padding: 10px 10px; border-radius: 10px; color: var(--stj-ink); text-decoration: none; font-size: 15.5px; }
.stj-fgroup .woocommerce-widget-layered-nav-list li a:hover { background: var(--stj-cream); }
.stj-fgroup .woocommerce-widget-layered-nav-list li a::before { content: ""; width: 20px; height: 20px; border: 2px solid #b9a48f; border-radius: 6px; flex: 0 0 auto; box-sizing: border-box; }
.stj-fgroup .woocommerce-widget-layered-nav-list li.chosen a { font-weight: 700; color: var(--stj-brown); }
.stj-fgroup .woocommerce-widget-layered-nav-list li.chosen a::before { background: var(--stj-brown) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / 14px no-repeat; border-color: var(--stj-brown); box-shadow: none; }
.stj-fgroup .woocommerce-widget-layered-nav-list li .count { color: var(--stj-muted); font-size: 13px; margin-inline-start: auto; }
@media (min-width: 922px) { /* desktop: the "sheet" is just a row of dropdown pills */
  .stj-filters { position: static; display: contents; visibility: visible; opacity: 1; background: none; }
  .stj-filters .stj-sheet-panel { all: unset; display: contents; }
  .stj-filters .stj-sheet-head, .stj-filters .stj-sheet-foot, .stj-filters .stj-sheet-grip { display: none; }
  .stj-filters .stj-fgroups { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; overflow: visible; }
  .stj-fgroup { position: relative; }
  .stj-fgroup > summary { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--stj-line); background: #fff; font: 700 15px var(--stj-sans); color: var(--stj-ink); transition: border-color .15s; }
  .stj-fgroup > summary:hover, .stj-fgroup[open] > summary { border-color: var(--stj-brown); color: var(--stj-brown); }
  .stj-fgroup.has-on > summary { border-color: var(--stj-brown); background: var(--stj-cream); color: var(--stj-brown); }
  .stj-fgroup > summary .stj-i { width: 16px; height: 16px; transition: transform .2s; }
  .stj-fgroup[open] > summary .stj-i { transform: rotate(180deg); }
  .stj-fpop { position: absolute; top: calc(100% + 8px); inset-inline-start: 0; min-width: 250px; max-height: 360px; overflow-y: auto; padding: 8px; background: #fff; border: 1px solid var(--stj-line); border-radius: 14px; box-shadow: 0 18px 44px rgba(36, 20, 11, .16); z-index: 30; }
}
@media (max-width: 921px) {
  .stj-fbtn { display: inline-flex; }
  .woocommerce .stj-fbar { gap: 8px; margin-bottom: 10px; }
  .stj-fbar-end { gap: 8px; }
  .woocommerce .stj-fbar-end .woocommerce-result-count { display: none; }
  .woocommerce .stj-fbar-end .woocommerce-ordering select { max-width: 190px; }
  .stj-fgroup { border-bottom: 1px solid #f0e8dc; padding: 6px 0 10px; }
  .stj-fgroup > summary { display: flex; align-items: center; gap: 8px; padding: 12px 2px 6px; font: 700 16.5px var(--stj-sans); color: var(--stj-brown); pointer-events: none; }
  .stj-fgroup > summary .stj-i { display: none; }
  .stj-fgroup .woocommerce-widget-layered-nav-list li a { padding: 12px 8px; font-size: 16px; }
  .stj-fclear { color: var(--stj-brown); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
}
.stj-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -4px 0 16px; }
.stj-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px 0 14px; padding-inline: 14px 10px; border-radius: 999px; background: var(--stj-brown); color: #fff; text-decoration: none; font: 600 14px var(--stj-sans); }
.stj-chip:hover { background: var(--stj-brown2); color: #fff; }
.stj-chip .stj-i { width: 16px; height: 16px; }
.stj-chip-clear { color: var(--stj-muted); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
/* no sidebar on product archives any more: full-width grid */
.woocommerce-shop #secondary, .tax-product_cat #secondary, .tax-product_tag #secondary { display: none; }

/* ---- cart drawer ---- */
@media (min-width: 922px) {
  .stj-mc .stj-sheet-panel { top: 0; bottom: 0; left: 0; right: auto; width: 440px; max-height: none; border-radius: 0; transform: translateX(-100%); opacity: 1; transition: transform .26s cubic-bezier(.2, .8, .2, 1); }
  [dir=ltr] .stj-mc .stj-sheet-panel { left: auto; right: 0; transform: translateX(100%); }
  .stj-mc.is-open .stj-sheet-panel, [dir=ltr] .stj-mc.is-open .stj-sheet-panel { transform: none; }
  .stj-mc .stj-sheet-head { padding-top: calc(var(--stj-top) + 10px); }
}
.stj-mc .stj-sheet-panel { min-height: 0; }
.stj-mc-added { display: none; align-items: center; gap: 8px; margin: 0; padding: 10px 20px; background: #eaf6ef; color: var(--stj-green); font-weight: 700; font-size: 15px; flex: 0 0 auto; }
.stj-mc-added .stj-ic { width: 22px; height: 22px; }
.stj-mc.is-added .stj-mc-added { display: flex; animation: stj-pop .35s ease; }
@keyframes stj-pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.stj-mc-body { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.stj-mc-items { list-style: none; margin: 0; padding: 4px 16px; overflow-y: auto; overscroll-behavior: contain; flex: 1 1 auto; }
.stj-mc-item { display: grid; grid-template-columns: 76px minmax(0, 1fr) 32px; gap: 12px; align-items: start; padding: 14px 0; border-bottom: 1px solid #f0e8dc; margin: 0; transition: opacity .2s; }
.stj-mc-item.is-busy { opacity: .5; pointer-events: none; }
.stj-mc-img img { width: 76px; height: 95px; object-fit: cover; border-radius: 10px; display: block; }
.stj-mc-name { display: block; color: var(--stj-ink); font-weight: 700; font-size: 15px; line-height: 1.35; text-decoration: none; }
.stj-mc-meta { margin: 3px 0 0; color: var(--stj-muted); font-size: 13px; }
.stj-mc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.stj-mc-price { color: var(--stj-brown); font-size: 16px; }
.stj-qty { display: inline-flex; align-items: center; border: 1.5px solid var(--stj-line); border-radius: 999px; overflow: hidden; }
.stj-qty button { width: 38px; height: 36px; border: 0; background: #fff; color: var(--stj-brown); font: 700 18px/1 var(--stj-sans); cursor: pointer; padding: 0; }
.stj-qty button:disabled { color: #cbbfb1; cursor: default; }
.stj-qty span { min-width: 26px; text-align: center; font-weight: 700; }
.stj-mc-del { width: 32px; height: 32px; border-radius: 50%; border: 0; background: none; color: var(--stj-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.stj-mc-del:hover { background: var(--stj-cream); color: var(--stj-brown); }
.stj-mc-del .stj-i { width: 18px; height: 18px; }
.stj-mc-foot { padding: 14px 18px 16px; border-top: 1px solid var(--stj-line); background: var(--stj-cream2); flex: 0 0 auto; }
.stj-mc-sum { display: flex; justify-content: space-between; align-items: baseline; font-size: 16px; }
.stj-mc-sum strong { font-size: 20px; color: var(--stj-brown); }
.stj-mc-note { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0 12px; color: var(--stj-muted); font-size: 13.5px; line-height: 1.45; }
.stj-mc-note .stj-i { width: 18px; height: 18px; flex: 0 0 auto; color: var(--stj-gold); }
.stj-mc-go { width: 100%; min-height: 54px; font-size: 17px; }
.stj-mc-cartlink { display: block; text-align: center; margin-top: 10px; color: var(--stj-brown); font-size: 14.5px; text-decoration: underline; text-underline-offset: 3px; }
.stj-mc-empty { display: grid; justify-items: center; gap: 12px; padding: 34px 20px 40px; text-align: center; color: var(--stj-muted); }
.stj-mc-empty .stj-i { width: 44px; height: 44px; color: #cbb89f; }
.stj-mc-empty p { margin: 0; font-size: 17px; }
/* "adding…" state on the product page button */
.single_add_to_cart_button.is-adding { opacity: .7; pointer-events: none; }
.stj-toast { position: fixed; z-index: 100040; inset-inline: 16px; bottom: calc(var(--stj-bbar) + 16px + env(safe-area-inset-bottom)); max-width: 520px; margin: 0 auto; padding: 14px 18px; border-radius: 14px; background: #3b1f12; color: #fff; font-size: 15px; box-shadow: 0 14px 40px rgba(0,0,0,.3); }
@media (min-width: 922px) { .stj-toast { bottom: 24px; } }

/* ---- cart page ---- */
.woocommerce-cart .woocommerce-cart-form [name=update_cart] { display: none !important; }
.woocommerce-cart .woocommerce .cart-collaterals .cart_totals { float: none; width: 100%; }
@media (min-width: 922px) {
  .woocommerce-cart .woocommerce:has(.woocommerce-cart-form) { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
  .woocommerce-cart .woocommerce:has(.woocommerce-cart-form) > .woocommerce-notices-wrapper { grid-column: 1 / -1; }
  .woocommerce-cart .cart-collaterals { position: sticky; top: 100px; width: auto; }
}
@media (max-width: 921px) {
  .woocommerce-cart table.shop_table_responsive thead { display: none; }
  .woocommerce-cart table.shop_table_responsive tr.cart_item { display: grid !important; grid-template-columns: 84px minmax(0, 1fr) 34px; grid-template-areas: "img name del" "img price del" "img qty del"; column-gap: 12px; row-gap: 4px; padding: 14px; border-bottom: 1px solid var(--stj-line); }
  .woocommerce-cart table.shop_table_responsive tr.cart_item td { display: block; padding: 0 !important; border: 0 !important; text-align: start !important; background: none !important; }
  .woocommerce-cart table.shop_table_responsive tr.cart_item td::before { display: none !important; }
  .woocommerce-cart tr.cart_item td.product-thumbnail { grid-area: img; display: block !important; }
  .woocommerce-cart tr.cart_item td.product-thumbnail img { width: 84px !important; height: 104px; object-fit: cover; border-radius: 10px; }
  .woocommerce-cart tr.cart_item td.product-name { grid-area: name; font-size: 15.5px; }
  .woocommerce-cart tr.cart_item td.product-price { display: none !important; }
  .woocommerce-cart tr.cart_item td.product-subtotal { grid-area: price; font-weight: 700; color: var(--stj-brown); }
  .woocommerce-cart tr.cart_item td.product-quantity { grid-area: qty; }
  .woocommerce-cart tr.cart_item td.product-quantity .qty { width: 72px; min-height: 40px; }
  .woocommerce-cart tr.cart_item td.product-remove { grid-area: del; text-align: center !important; }
  .woocommerce-cart table.shop_table_responsive tr:has(td.actions) { display: none; }
  .woocommerce-cart .wc-proceed-to-checkout { display: none; }
  .stj-cartbar { position: fixed; z-index: 9500; inset-inline: 0; bottom: calc(var(--stj-bbar) + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 16px; background: #fff; border-top: 1px solid var(--stj-line); box-shadow: 0 -6px 20px rgba(36, 20, 11, .1); }
  .stj-cartbar div { display: grid; line-height: 1.2; } .stj-cartbar small { color: var(--stj-muted); font-size: 12.5px; } .stj-cartbar strong { font-size: 19px; color: var(--stj-brown); }
  .stj-cartbar .stj-btn { min-height: 48px; padding: 0 20px; }
  .woocommerce-cart .stj-footer { padding-bottom: 72px; }
}
@media (min-width: 922px) { .stj-cartbar { display: none; } }

.woocommerce-cart .woocommerce-shipping-calculator { display: none; }

/* ---- checkout ---- */
.stj-co-sum { display: none; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; padding: 12px 16px; border-radius: 12px; background: var(--stj-cream); color: var(--stj-ink); font-size: 15px; }
.stj-co-sum strong { color: var(--stj-brown); }
.stj-co-sum a { color: var(--stj-brown); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 921px) { .stj-co-sum { display: flex; } }
.woocommerce-checkout .woocommerce-form-coupon-toggle { display: none; }
.woocommerce-checkout form.checkout #customer_details .col-1, .woocommerce-checkout form.checkout #customer_details .col-2 { float: none; width: 100%; }
.woocommerce-checkout form.checkout #customer_details { background: #fff; border: 1px solid var(--stj-line); border-radius: 16px; padding: 20px 22px 8px; }
.woocommerce-checkout #order_review_heading { margin: 0 0 10px; font: 700 22px var(--stj-serif); color: var(--stj-brown); }
.woocommerce-checkout #payment { background: transparent !important; border-radius: 0; }
.woocommerce-checkout #payment ul.payment_methods { border: 0 !important; padding: 0 0 10px !important; }
.woocommerce-checkout #payment ul.payment_methods li { list-style: none; padding: 14px 16px; border: 1.5px solid var(--stj-line); border-radius: 12px; background: var(--stj-cream2); margin: 0 0 8px; }
.woocommerce-checkout #payment div.payment_box { background: transparent !important; padding: 6px 0 0 !important; margin: 0 !important; color: var(--stj-muted); font-size: 14px; }
.woocommerce-checkout #payment div.payment_box::before { display: none !important; }
.woocommerce-checkout #payment .place-order { padding: 4px 0 0 !important; }
.woocommerce-checkout #place_order { width: 100%; float: none; min-height: 58px; font-size: 18px !important; }
.stj-secure { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; color: var(--stj-muted); font-size: 13.5px; line-height: 1.5; }
.stj-secure .stj-i { width: 18px; height: 18px; flex: 0 0 auto; color: var(--stj-green); }
.woocommerce-checkout .woocommerce-shipping-methods li { margin: 0 0 6px !important; }
.woocommerce-checkout .woocommerce-shipping-methods label { font-weight: 600; }
@media (min-width: 922px) {
  .woocommerce-checkout form.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 420px; grid-template-rows: auto 1fr; column-gap: 28px; align-items: start; }
  .woocommerce-checkout form.checkout > .woocommerce-NoticeGroup { grid-column: 1 / -1; }
  .woocommerce-checkout form.checkout #customer_details { grid-column: 1; grid-row: 1 / span 2; }
  .woocommerce-checkout form.checkout #order_review_heading { grid-column: 2; grid-row: 1; float: none; width: auto; }
  .woocommerce-checkout form.checkout #order_review { grid-column: 2; grid-row: 2; float: none; width: auto; position: sticky; top: 100px; }
}
@media (max-width: 921px) {
  .woocommerce-checkout form.checkout #customer_details { padding: 16px 14px 4px; }
  .woocommerce-checkout #order_review_heading { margin-top: 22px; }
}
