/* The builder uses a full-width background and its original copy/CTA.
 * Remove the old artwork entirely; reserve the left side on wide screens
 * so a future user-provided full-bleed background can be added cleanly. */
body[data-bsg-page="home"]:not(.admin-page) .pc-builder-campaign {
  grid-template-columns:minmax(0,.76fr) minmax(0,1.24fr) !important;
}
body[data-bsg-page="home"]:not(.admin-page) .pc-builder-campaign__content {
  grid-column:2 !important;
  min-width:0 !important;
}
@media (max-width:800px) {
  body[data-bsg-page="home"]:not(.admin-page) .pc-builder-campaign {
    grid-template-columns:minmax(0,1fr) !important;
    min-height:0 !important;
  }
  body[data-bsg-page="home"]:not(.admin-page) .pc-builder-campaign__content {
    grid-column:1 / -1 !important;
    width:100% !important;
    box-sizing:border-box !important;
    padding:26px clamp(16px,5vw,26px) !important;
  }
}

/* Headlines must remain on a single line at 320px, 360px, 393px, and up.
 * Earlier styles added a 40px decorative line INSIDE the headline and
 * allowed the heading/action pair to wrap; that broke Persian words.
 * Reduce (rather than remove) the line and text spacing at phone widths. */
@media (max-width:760px) {
  body:not(.admin-page) .page-body .section-head-row {
    display:flex !important;
    flex-flow:row nowrap !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:clamp(4px,1.4vw,8px) !important;
    min-width:0 !important;
    max-width:100% !important;
  }
  body:not(.admin-page) .page-body .section-head-row > .section-head-copy {
    flex:1 1 auto !important;
    width:auto !important;
    min-width:0 !important;
    max-width:100% !important;
  }
  body:not(.admin-page) .page-body .section-head-row h2 {
    display:inline-flex !important;
    flex-flow:row nowrap !important;
    align-items:center !important;
    justify-content:flex-start !important;
    gap:clamp(3px,.9vw,6px) !important;
    width:auto !important;
    min-width:0 !important;
    max-width:100% !important;
    margin:0 !important;
    font-size:clamp(.82rem,3.65vw,1.08rem) !important;
    line-height:1.4 !important;
    white-space:nowrap !important;
    text-wrap:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    overflow-wrap:normal !important;
    word-break:keep-all !important;
  }
  body:not(.admin-page) .page-body .section-head-row h2 > * {
    flex-shrink:0 !important;
    white-space:nowrap !important;
  }
  body:not(.admin-page) .page-body .section-head-row h2::after {
    display:block !important;
    width:clamp(8px,2.3vw,14px) !important;
    min-width:0 !important;
    height:2px !important;
    flex:0 0 clamp(8px,2.3vw,14px) !important;
    margin:0 !important;
  }
  body:not(.admin-page) .page-body .section-head-row > .section-link {
    flex:0 0 auto !important;
    min-width:0 !important;
    max-width:45% !important;
    display:inline-flex !important;
    align-items:center !important;
    gap:4px !important;
    padding:2px 0 !important;
    margin:0 !important;
    font-size:clamp(.59rem,2.35vw,.72rem) !important;
    white-space:nowrap !important;
    text-wrap:nowrap !important;
    line-height:1.4 !important;
  }
  body:not(.admin-page) .page-body .section-head-row > .section-link i {
    flex-shrink:0 !important;
    font-size:.7em !important;
  }
  /* Orange vertical accent, previously 7x29px, took extra text space. */
  body[data-bsg-page="home"]:not(.admin-page) .pc-hardware-showcase .section-head-row h2::before {
    width:3px !important;
    height:18px !important;
    flex:0 0 3px !important;
    box-shadow:none !important;
  }
}
@media (max-width:360px) {
  /* Reclaim every pixel on narrow 320px devices while keeping decoration. */
  body:not(.admin-page) .page-body .section-head-row {
    gap:3px !important;
  }
  body:not(.admin-page) .page-body .section-head-row h2 {
    gap:2px !important;
    font-size:clamp(.76rem,3.65vw,.9rem) !important;
  }
  body:not(.admin-page) .page-body .section-head-row h2::after {
    width:6px !important;
    flex-basis:6px !important;
  }
  body:not(.admin-page) .page-body .section-head-row > .section-link {
    gap:2px !important;
    font-size:.57rem !important;
  }
}
/* Mobile stability: enforce an ordinary, equal-height two-column category
 * grid. Older hover and nth-child styles should not create staggered cards. */
@media (max-width:760px) {
  body[data-bsg-page="home"]:not(.admin-page) .pc-home-categories .home-category-grid {
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    grid-auto-flow:row !important;
    grid-auto-rows:1fr !important;
    align-items:stretch !important;
    justify-content:stretch !important;
    gap:10px !important;
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    margin:0 !important;
    padding:0 !important;
  }
  body[data-bsg-page="home"]:not(.admin-page) .pc-home-categories .home-category-grid > .home-category-link {
    box-sizing:border-box !important;
    display:block !important;
    position:relative !important;
    grid-row:auto !important;
    grid-column:auto !important;
    align-self:stretch !important;
    justify-self:stretch !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    height:auto !important;
    min-height:0 !important;
    aspect-ratio:1.2 / 1 !important;
    margin:0 !important;
    padding:0 !important;
    top:auto !important;
    left:auto !important;
    right:auto !important;
    translate:none !important;
    transform:none !important;
    animation:none !important;
  }
  body[data-bsg-page="home"]:not(.admin-page) .pc-home-categories .home-category-grid > .home-category-link:is(:hover,:active,:focus-visible) {
    translate:none !important;
    transform:none !important;
    top:auto !important;
  }
  body[data-bsg-page="home"]:not(.admin-page) .pc-home-categories .home-category-grid > .home-category-link .pc-hardware-scene {
    transform:none !important;
    transition:none !important;
  }
  body[data-bsg-page="home"]:not(.admin-page) .pc-home-categories .home-category-grid > .home-category-link:is(:hover,:active,:focus-visible) .pc-hardware-scene {
    transform:none !important;
  }
}
/* Touch devices should not preserve desktop hover translations after a tap. */
@media (hover:none) and (pointer:coarse) {
  body:not(.admin-page) :is(.product-card,.category-mini-card,.home-category-link):is(:hover,:active) {
    translate:none !important;
    transform:none !important;
  }
}
