/* Content is a full-width section, never a product-sized card or slide. */
.content-in-category{grid-column:1/-1;min-width:0;width:100%;box-sizing:border-box;}
.category-section > .content-in-category{margin-block:var(--section-gap,1.5rem);}
.content-between{width:calc(100% - 2rem);max-width:var(--container,70rem);margin:1.5rem auto;box-sizing:border-box;}
.content-split-grid{margin-block-start:1rem;}
#editorial:not(:has(> .editorial-block:not([hidden]))){display:none;}

/* «מרווחים» (owner 2026-11-01): a section's own outer room above, below and
   at the sides (app/section-design.js writes --block-space-*-desktop|phone
   only for a value the owner chose; no key = the margins above, as before).
   The owner's number beats a kit's margin (layouts-voice.css), hence the
   !important; 0 means touching. The sides: that much from the screen's
   edges, centred within the section's «רוחב» when it has one. */
@media (min-width:641px){
  html .editorial-block[style*="--block-space-above-desktop"]{margin-top:var(--block-space-above-desktop) !important;}
  html .editorial-block[style*="--block-space-below-desktop"]{margin-bottom:var(--block-space-below-desktop) !important;}
  html .editorial-block[style*="--block-space-side-desktop"]{width:auto !important; max-width:none !important;
    margin-inline:max(var(--block-space-side-desktop), calc((100% - var(--block-width-desktop, 100%)) / 2)) !important;}
}
@media (max-width:640px){
  html .editorial-block[style*="--block-space-above-phone"]{margin-top:var(--block-space-above-phone) !important;}
  html .editorial-block[style*="--block-space-below-phone"]{margin-bottom:var(--block-space-below-phone) !important;}
  html .editorial-block[style*="--block-space-side-phone"]{width:auto !important; max-width:none !important;
    margin-inline:max(var(--block-space-side-phone), calc((100% - var(--block-width-phone, 100%)) / 2)) !important;}
}
/* In the sections' own column (#editorial, «המיקום המקורי בדף»): past its
   row gap, its side padding and, for the first and the last, its margin
   (--ed-*, theme.css / layouts-voice.css), so 0 still touches. Between two
   sections the room is the lower one's «מעל» (or the gap) plus the upper
   one's «מתחת». */
.editorial{--ed-gap:28px; --ed-pad:18px; --ed-edge:36px;}
@media (max-width:640px){ .editorial{--ed-gap:18px; --ed-pad:12px; --ed-edge:24px;} }
@media (min-width:641px){
  html .editorial > .editorial-block[style*="--block-space-above-desktop"]{margin-top:calc(var(--block-space-above-desktop) - var(--ed-gap)) !important;}
  html .editorial > .editorial-block[style*="--block-space-above-desktop"]:not(.editorial-block:not([hidden]) ~ *){margin-top:calc(var(--block-space-above-desktop) - var(--ed-edge)) !important;}
  html .editorial > .editorial-block[style*="--block-space-below-desktop"]:not(:has(~ .editorial-block:not([hidden]))){margin-bottom:calc(var(--block-space-below-desktop) - var(--ed-edge)) !important;}
  html .editorial > .editorial-block[style*="--block-space-side-desktop"]{
    margin-inline:max(calc(var(--block-space-side-desktop) - var(--ed-pad)), calc((100% - var(--block-width-desktop, calc(100% + 2 * var(--ed-pad)))) / 2)) !important;}
}
@media (max-width:640px){
  html .editorial > .editorial-block[style*="--block-space-above-phone"]{margin-top:calc(var(--block-space-above-phone) - var(--ed-gap)) !important;}
  html .editorial > .editorial-block[style*="--block-space-above-phone"]:not(.editorial-block:not([hidden]) ~ *){margin-top:calc(var(--block-space-above-phone) - var(--ed-edge)) !important;}
  html .editorial > .editorial-block[style*="--block-space-below-phone"]:not(:has(~ .editorial-block:not([hidden]))){margin-bottom:calc(var(--block-space-below-phone) - var(--ed-edge)) !important;}
  html .editorial > .editorial-block[style*="--block-space-side-phone"]{
    margin-inline:max(calc(var(--block-space-side-phone) - var(--ed-pad)), calc((100% - var(--block-width-phone, calc(100% + 2 * var(--ed-pad)))) / 2)) !important;}
}
/* The preview's crop (builder/crop-chrome.js, app/section-design.js): the padding on one side, and a strip off a
   side: the box keeps its place so nothing else moves, the strip is clipped and the content stays out of it.
   Doubled class: above an edge code section's own padding:0 and clip-path:none.
   A cut off the top or the bottom (--block-cut-*): clipped here, and --block-space-above / -below already carry its
   negative margin (app/section-design.js watchCut measures the px), so the page closes up. */
@media (min-width:641px){
  html .editorial-block[style*="--block-pad-top-desktop"]{padding-top:var(--block-pad-top-desktop) !important;}
  html .editorial-block[style*="--block-pad-bottom-desktop"]{padding-bottom:var(--block-pad-bottom-desktop) !important;}
  html body .editorial-block.editorial-block.editorial-block[style*="--block-crop-desktop"]{clip-path:inset(-9999px var(--block-crop-desktop) -9999px var(--block-crop-left-desktop)) !important;
    padding-left:var(--block-pad-left-desktop) !important; padding-right:var(--block-pad-right-desktop) !important;}
  html body .editorial-block.editorial-block.editorial-block[style*="--block-cut-top-desktop"]{clip-path:inset(var(--block-cut-top-desktop) var(--block-crop-desktop,-9999px) var(--block-cut-bottom-desktop) var(--block-crop-left-desktop,-9999px)) !important;}
}
@media (max-width:640px){
  html .editorial-block[style*="--block-pad-top-phone"]{padding-top:var(--block-pad-top-phone) !important;}
  html .editorial-block[style*="--block-pad-bottom-phone"]{padding-bottom:var(--block-pad-bottom-phone) !important;}
  html body .editorial-block.editorial-block.editorial-block[style*="--block-crop-phone"]{clip-path:inset(-9999px var(--block-crop-phone) -9999px var(--block-crop-left-phone)) !important;
    padding-left:var(--block-pad-left-phone) !important; padding-right:var(--block-pad-right-phone) !important;}
  html body .editorial-block.editorial-block.editorial-block[style*="--block-cut-top-phone"]{clip-path:inset(var(--block-cut-top-phone) var(--block-crop-phone,-9999px) var(--block-cut-bottom-phone) var(--block-crop-left-phone,-9999px)) !important;}
}
