/* Home-only density changes keep the existing type, colors and hero animation. */
body.home-compact:not(.admin-body) main > section.global-section:not(#home),
body.home-compact:not(.admin-body) #factory.factory-summary-section { padding: 40px 0 !important; }
/* Blend the artwork below the copy, without fading the hero actions. */
body.home-compact:not(.admin-body) #home { isolation: isolate; margin-bottom: 40px; }
body.home-compact:not(.admin-body) #home .hero-panel { z-index: auto; }
body.home-compact:not(.admin-body) #home .hero-copy { z-index: 5; }
@media (min-width: 1021px) {
  body.home-compact:not(.admin-body) #home .hero-panel {
    width: 100% !important;
    max-width: none !important;
    margin-inline: 0 !important;
    aspect-ratio: auto;
    height: auto;
    min-height: max(620px, min(900px, calc(100vh - 100px), calc(100vw * .5625)));
    max-height: none;
  }
  /* Size media from its height, so browser zoom cannot create letterboxed slabs. */
  body.home-compact:not(.admin-body) #home .hero-media > .hero-background-video,
  body.home-compact:not(.admin-body) #home .hero-media > .hero-fallback-image {
    width: auto !important;
    max-width: none !important;
    height: 100%;
    right: max(0px, calc((100% - 1920px) / 2)) !important;
    object-fit: contain !important;
  }
}
@media (min-width: 1921px) {
  body.home-compact:not(.admin-body) #home .hero-panel,
  body.home-compact:not(.admin-body) #home .hero-media,
  body.home-compact:not(.admin-body) #home .hero-media::before {
    background: var(--site-warm-paper) !important;
  }
  body.home-compact:not(.admin-body) #home .hero-copy {
    margin-left: max(4%, calc((100% - 1600px) / 2));
  }
  body.home-compact:not(.admin-body) #home .hero-media > .hero-background-video-backdrop {
    display: none;
  }
  body.home-compact:not(.admin-body) #home .hero-media.is-video::after {
    max-width: 1920px;
    margin-inline: auto;
    background: linear-gradient(90deg, var(--site-warm-paper), rgba(247,236,210,.96) 31%, rgba(247,236,210,.48) 54%, transparent 78%);
  }
  body.home-compact:not(.admin-body) #home .hero-media > .hero-background-video,
  body.home-compact:not(.admin-body) #home .hero-media > .hero-fallback-image {
    mask-image: linear-gradient(90deg, transparent, #000 34%, #000 90%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 34%, #000 90%, transparent);
  }
}
@media (max-width: 768px) {
  body.home-compact:not(.admin-body) #home { margin-bottom: 24px; }
}
/* Keep category text above the hero's existing bottom fade. */
body.home-compact #products > .container { position: relative; z-index: 5; }
body.home-compact .home-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
body.home-compact main .home-section-heading h2,
body.home-compact #evidence h2,
body.home-compact #faq .faq-head h2 { margin: 0; padding: 0; width: auto; max-width: none; font-size: 32px !important; line-height: 1.25 !important; color: #202327; text-align: start; }
.home-section-heading > a, .home-evidence-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; line-height: 1.5; color: #a53f0c; }
.home-section-heading > a svg, .home-evidence-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.home-categories { display: grid; grid-template-columns: minmax(0, 2fr) repeat(2,minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 24px; }
.home-category-group { position: relative; border: 1px solid #ccc5b9; min-width: 0; min-height: 440px; border-radius: 8px; background: #f7ecd2; transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease; }
.home-category-main { display: block; padding: 20px 22px 60px; }
.home-category-main > span { display: block; min-width: 0; }
.home-category-main strong { display: block; font-size: 22px; line-height: 1.25; color: #202327; overflow-wrap: anywhere; }
.home-category-main small { display: block; font-size: 13px; line-height: 1.5; color: #53595f; margin-top: 10px; }
.home-category-main .home-category-oem { color: #ad430d; font-size: 12px; }
.home-category-main > svg { position: absolute; inset-inline-start: 22px; bottom: 20px; width: 24px; height: 24px; color: #ed641d; transition: transform 180ms ease; }
.home-category-secondary { display: grid; grid-template-rows: 52% minmax(0,1fr); }
.home-category-secondary > .evidence-media { min-height: 0; padding: 12px 10px 0; }
.home-category-secondary .evidence-media img { display: block; width: 100%; height: 100%; object-fit: contain; }
.home-category-cordless { aspect-ratio: 3 / 2; align-self: stretch; background: #161719; }
.home-category-cordless > .evidence-media { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; }
.home-category-cordless .evidence-media img {
  display: block; width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: contain;
  border-radius: 0;
}
.home-category-cordless .home-category-main { position: static; }
.home-category-cordless .home-category-main > span { position: relative; display: block; width: 39%; z-index: 1; }
.home-category-cordless .home-category-main strong { color: #fff; }
.home-category-cordless .home-category-main small { color: #dedede; }
.home-category-cordless .home-category-main .home-category-oem { color: #ff8a42; }
.home-category-cordless .media-fallback img { width: 60%; margin-left: auto; }
/* The artwork's empty text area is on the left in every language. */
html[dir="rtl"] .home-category-cordless .home-category-main > span { margin-right: auto; margin-left: 0; }
/* Stretch the link across the card, keeping the image retry control independent. */
.home-category-main::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.home-category-group .media-load-error { z-index: 2; }
.home-category-group:focus-within { outline: 2px solid #bb4e18; outline-offset: 4px; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .home-category-group:hover { transform: translateY(-4px); border-color: #ed641d; box-shadow: 0 8px 20px #392c1314; }
  .home-category-group:hover .home-category-main > svg { transform: translateX(4px); }
  html[dir="rtl"] .home-category-group:hover .home-category-main > svg { transform: translateX(-4px); }
}
.home-category-children { display: flex; flex-wrap: wrap; gap: 4px 20px; padding-inline-start: 100px; margin-top: 8px; }
.home-category-children a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; color: #9c3b10; text-decoration: underline; text-underline-offset: 4px; }
.home-featured-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 18px; }
.home-featured-card { background: #fffdf8; border: 1px solid #dfd9cf; border-radius: 8px; padding: 14px; display: flex; flex-direction: column; min-width: 0; }
.home-featured-product { display: flex; flex: 1; flex-direction: column; }
.home-featured-product img { width: 100%; height: 156px; object-fit: contain; }
body.home-compact #featured h3 { font-size: 16px !important; line-height: 1.45 !important; margin: 14px 0 10px; color: #202327; }
.home-featured-details { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding-top: 10px; margin-top: auto; border-top: 1px solid #ddd; font-size: 14px; color: #9c3b10; }
.home-featured-details svg { width: 17px; height: 17px; flex-shrink: 0; }
.home-advantages { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 36px; }
.home-advantages article { border-inline-start: 2px solid #ec621b; padding-inline-start: 20px; }
.home-advantages svg { width: 24px; height: 24px; color: #b74913; margin-bottom: 12px; }
body.home-compact #why h3 { font-size: 19px !important; line-height: 1.4 !important; margin: 0 0 12px; color: #202327; }
body.home-compact #why p { font-size: 15px !important; line-height: 1.7 !important; color: #53595f; }
.home-buyer-tags { display: flex; justify-content: flex-start; flex-wrap: wrap; list-style: none; gap: 8px 24px; margin: 28px 0 0; padding: 20px 0 0; border-top: 1px solid #ccc5b9; }
.home-buyer-tags li { font-size: 15px; line-height: 1.5; color: #53595f; }
.home-buyer-tags li + li::before { content: '\00b7'; margin-inline-end: 24px; }
.home-customer-support { display: flex; align-items: center; gap: 20px; margin: 24px 0 0; padding-top: 20px; border-top: 1px solid #ccc5b9; }
.home-customer-support .evidence-media { flex: 0 0 160px; aspect-ratio: 4 / 3; }
.home-customer-support img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.home-customer-support figcaption { min-width: 0; }
body.home-compact #why .home-customer-support h3 { margin-bottom: 8px; }
body.home-compact #why .home-customer-support p { margin: 0; }
@media (max-width: 600px) {
  .home-customer-support { gap: 14px; align-items: flex-start; }
  .home-customer-support .evidence-media { flex-basis: 96px; }
  body.home-compact #why .home-customer-support h3 { font-size: 16px !important; }
  body.home-compact #why .home-customer-support p { font-size: 14px !important; }
}
body.home-compact #factory .factory-summary-grid { gap: 36px; }
body.home-compact #factory .factory-summary-heading { margin-bottom: 28px; }
body.home-compact #factory .factory-summary-heading h2 { font-size: 32px !important; }
body.home-compact #factory .factory-summary-link { margin-top: 22px; }
.home-evidence-heading { margin-bottom: 24px; }
.home-evidence-cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.home-evidence-card { margin: 0; min-width: 0; border-radius: 8px; background: #fffdf8; overflow: hidden; }
.home-evidence-card .evidence-media { aspect-ratio: 4 / 3; }
.home-evidence-card img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.home-evidence-card figcaption { padding: 18px 20px; border-top: 2px solid #ec621b; }
body.home-compact #evidence .home-evidence-card h3 { font-size: 19px !important; line-height: 1.4 !important; margin: 0 0 8px; color: #202327; }
body.home-compact #evidence .home-evidence-card p { margin: 0; }
.home-evidence-cards + .home-evidence-actions { margin-top: 20px; }
@media (max-width: 600px) { .home-evidence-cards { grid-template-columns: 1fr; gap: 20px; } }
body.home-compact #evidence h2 { margin-bottom: 16px; }
body.home-compact #evidence p { font-size: 15px !important; line-height: 1.7 !important; margin: 0 0 16px; color: #53595f; }
body.home-compact #faq .faq-head { margin-bottom: 28px; text-align: start; }
body.home-compact #faq .faq-sub { font-size: 16px; margin-top: 12px; }
body.home-compact #faq .faq-grid { gap: 16px; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; }
body.home-compact:not(.admin-body) #faq .faq-card { border-radius: 8px; padding: 12px 18px !important; box-shadow: none; }
body.home-compact #faq .faq-q { margin: 0; min-height: 44px; align-items: center; text-align: start; }
body.home-compact #faq .faq-card.active .faq-a { max-height: none; margin-top: 18px; }
body.home-compact #faq .faq-more { margin-top: 20px; }
body.home-compact #cooperation .cta-wrap { padding: 36px !important; }
body.home-compact main a:focus-visible { outline: 2px solid #bb4e18; outline-offset: 4px; }
body.home-compact .oem-summary-options li { padding: 18px 0; }
body.home-compact .oem-summary-options svg { margin-bottom: 12px; }
body.home-compact .download-center-heading { margin-bottom: 24px; }
body.home-compact .download-center-resources { padding-top: 20px; gap: 24px; }
@media (max-width: 1100px) {
  .home-featured-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .home-categories { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .home-category-cordless { grid-column: 1 / -1; }
}

/* Procurement detail pass: retain the compact sections and existing palette. */
body.home-compact:not(.admin-body) #home .hero-copy h1 {
  max-width: 100%; font-size: 50px !important; line-height: 1.12 !important;
  white-space: normal; overflow-wrap: normal; word-break: normal; text-wrap: balance; letter-spacing: 0; font-family: Arial, 'Microsoft YaHei', sans-serif;
}
body.home-compact:not(.admin-body) #home .hero-subtitle {
  max-width: 640px; font-size: 22px !important; line-height: 1.5 !important; font-weight: 500;
}
body.home-compact:not(.admin-body) #home .hero-benefits { gap: 10px; line-height: 1.55 !important; }
body.home-compact:not(.admin-body) #home .hero-benefits li { white-space: normal; }
.home-product-groups { display: flex; flex-wrap: wrap; gap: 4px 28px; margin-top: 14px; }
.home-product-groups a { display: inline-flex; align-items: center; min-height: 44px; color: #9c3b10; font-size: 15px; text-decoration: underline; text-underline-offset: 4px; }
body.home-compact .home-featured-product { flex: none; }
body.home-compact #featured .home-featured-specs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 4px; margin: 0 0 12px; font-size: 13px !important; line-height: 1.6 !important; color: #53595f; text-align: start; }
.home-featured-specs > span { white-space: nowrap; }
.home-featured-actions { display: flex; align-items: stretch; justify-content: space-between; gap: 8px; margin-top: auto; border-top: 1px solid #ddd; }
body.home-compact .home-featured-details { padding: 8px 0; margin: 0; border: 0; }
.home-featured-inquiry { display: grid; place-items: center; flex: 0 0 40px; min-height: 44px; color: #9c3b10; border-inline-start: 1px solid #ddd; }
.home-featured-inquiry svg { width: 20px; height: 20px; }
.home-featured-inquiry:hover { background: #f9ecd9; color: #76300e; }
.home-evidence-actions { display: flex; flex-wrap: wrap; gap: 4px 24px; }
body.home-compact .oem-summary-footer > div { flex: 1 1 480px; max-width: 720px; }
body.home-compact .oem-summary-footer small { display: block; margin-top: 8px; color: #656565; font-size: 13px; line-height: 1.6; }
body.home-compact:not(.admin-body) #factory .factory-summary-capabilities h3 { font-size: 19px !important; font-weight: 700; }
body.home-compact:not(.admin-body) #factory .factory-summary-capabilities p { font-size: 16px !important; line-height: 1.6 !important; }
body.home-compact .download-center-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,2.2fr); gap: 32px; border-top: 1px solid #cbc7c1; padding-top: 24px; }
body.home-compact .download-center-resources { border: 0; padding-top: 0; grid-template-columns: repeat(3,minmax(0,1fr)); }
body.home-compact .download-center-resources article > div { min-width: 0; }
body.home-compact .download-center-resources h3 a { max-width: 100%; overflow-wrap: anywhere; }
body.home-compact .download-center-primary { min-width: 0; gap: 12px; }
body.home-compact:not(.admin-body) #downloads .download-center-primary h3 { margin: 0; }
body.home-compact:not(.admin-body) #cooperation .cta-wrap { grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr) !important; }
body.home-compact #cooperation .rfq-group { min-width: 0; margin: 0; padding: 12px 0 0; border: 0; border-top: 1px solid #d4cabc; }
body.home-compact #cooperation .rfq-group legend { padding: 0; padding-inline-end: 12px; font-size: 17px; font-weight: 700; line-height: 1.5; color: #24292f; }
body.home-compact #cooperation .rfq-contact-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; align-items: end; }
body.home-compact #cooperation .rfq-project-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; align-items: end; }
body.home-compact #cooperation .rfq-full { grid-column: 1 / -1; }
body.home-compact:not(.admin-body) #cooperation .rfq-field { font-size: 14px; line-height: 1.5; }
body.home-compact:not(.admin-body) #cooperation .rfq-required-legend { margin: 0; font-size: 13px !important; line-height: 1.5 !important; color: #62676c; }
body.home-compact #cooperation .rfq-attachment { margin-top: 16px; }
body.home-compact:not(.admin-body) #cooperation .rfq-upload-picker { min-height: 60px; border-color: #be7b4e; background: #fffaf4; }
body.home-compact:not(.admin-body) #cooperation .contact-form textarea { min-height: 84px !important; height: 84px; }
@media (min-width: 1021px) {
  body.home-compact:not(.admin-body) #home .hero-copy { width: min(720px,60vw) !important; max-width: 720px !important; }
  body.home-compact #factory .factory-summary-grid { grid-template-columns: minmax(0,1.14fr) minmax(0,.86fr); }
}
@media (max-width: 1020px) {
  body.home-compact:not(.admin-body) #home .hero-copy h1 { font-size: 40px !important; }
  body.home-compact:not(.admin-body) #cooperation .cta-wrap { grid-template-columns: 1fr !important; }
  body.home-compact .download-center-grid { grid-template-columns: 1fr; gap: 28px; }
  body.home-compact .oem-summary-footer > div { flex-basis: auto; }
}
@media (max-width: 600px) {
  body.home-compact:not(.admin-body) #home .hero-copy h1 { font-size: 32px !important; line-height: 1.18 !important; }
  html[lang="ru"] body.home-compact:not(.admin-body) #home .hero-copy h1 { font-size: 30px !important; }
  body.home-compact:not(.admin-body) #home .hero-subtitle { font-size: 17px !important; }
  body.home-compact .home-categories { grid-template-columns: minmax(0,1fr); }
  body.home-compact .home-category-group { min-height: 400px; aspect-ratio: auto; }
  body.home-compact .home-category-cordless .evidence-media img { position: absolute; bottom: 0; height: auto; object-fit: contain; mask-image: linear-gradient(to bottom, transparent, #000 18%); }
  body.home-compact .home-category-cordless .home-category-main > span { width: 100%; }
  .home-product-groups { gap: 0 20px; }
  body.home-compact .download-center-resources { grid-template-columns: 1fr; }
  body.home-compact #cooperation .rfq-contact-grid,
  body.home-compact #cooperation .rfq-project-grid { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .home-advantages { gap: 24px; }
  body.home-compact #cooperation .cta-wrap { padding: 28px !important; }
}
@media (min-width: 601px) and (max-width: 800px) {
  body.home-compact #factory .factory-summary-grid { grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); gap: 24px; }
  body.home-compact .download-center-resources { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
  body.home-compact .download-center-resources article { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 600px) {
  body.home-compact:not(.admin-body) main > section.global-section:not(#home) { padding: 32px 0 !important; }
  body.home-compact #cooperation .cta-wrap { padding: 20px !important; }
  body.home-compact main .home-section-heading { flex-wrap: wrap; gap: 12px; }
  body.home-compact main .home-section-heading h2,
  body.home-compact #factory .factory-summary-heading h2,
  body.home-compact #evidence h2,
  body.home-compact #faq .faq-head h2 { font-size: 28px !important; }
  .home-categories { gap: 16px; }
  .home-category-main strong { font-size: 20px; }
  .home-category-children { padding-inline-start: 0; gap: 0 16px; }
  .home-featured-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
  .home-featured-card { padding: 12px; }
  .home-featured-product img { height: 160px; }
  .home-advantages { grid-template-columns: 1fr; gap: 24px; }
  .home-buyer-tags { gap: 10px 18px; }
  .home-buyer-tags li + li::before { margin-inline-end: 18px; }
  body.home-compact #faq .faq-grid { grid-template-columns: 1fr; }
}
