/* Original Bitrix resources and measured primary Figma frame 142:850.
 * Provenance/limits: design/storefront-tokens.json. No guessed Figma exports.
 * Existing responsive rules and functional component states remain in charge.
 */
:root {
  --sibrs-font-body: "CoFoSans", sans-serif;
  --sibrs-font-display: "IgraSans", sans-serif;
  --sibrs-font-size-body: 1.0625rem;
  --sibrs-font-size-hero-desktop: 3.3125rem;
  --sibrs-line-height-body: 1;
  --sibrs-line-height-copy: 1.5;
  --sibrs-line-height-hero: 1.3;
  --sibrs-weight-regular: 400;
  --sibrs-weight-medium: 500;
  --sibrs-weight-bold: 700;
  --sibrs-color-text: #000;
  --sibrs-color-muted: #373737;
  --sibrs-color-accent: #5d91fe;
  --sibrs-color-on-accent: #fff;
  --sibrs-color-page: #fbfbfb;
  --sibrs-color-header-top: #fafbfa;
  --sibrs-color-divider: #e8e8e8;
  /* Source palette/radius; field sizes measured on primary Figma at100%.
   * Exact Figma property export remains unavailable; see component provenance.
   */
  --sibrs-color-component-field: #fafafa;
  --sibrs-component-field-size: 2.8125rem;
  --sibrs-component-field-size-mobile: 2.5rem;
  --sibrs-radius-button: .625rem;
  --sibrs-radius-header: 1.25rem;
  --sibrs-container-content: 103.75rem;
  --sibrs-container-gutter: 1.25rem;
  --sibrs-header-top-padding: .375rem;
  --sibrs-header-middle-padding: .75rem;
  --sibrs-header-bottom-padding-top: .75rem;
  --sibrs-header-bottom-padding-bottom: .75rem;
  --sibrs-hero-image-offset-y: .625rem;
  --sibrs-hero-badges-bottom: -1.375rem;
  --sibrs-hero-padding-bottom-desktop: 9.3125rem;
}

body,
input,
button,
textarea { font-family: var(--sibrs-font-body); }
body { color: var(--sibrs-color-text); background-color: var(--sibrs-color-page); }
.hero__title { font-family: var(--sibrs-font-display); }
.hero__descr { color: var(--sibrs-color-muted); }
.sibrs-stock-label { display: flex; align-items: center; }
.sibrs-stock-label.sibrs-stock-unavailable { color: var(--sibrs-color-muted); }
.sibrs-stock-label.sibrs-stock-unavailable::before { content: none; }
/* Figma616:4357 uppercases group labels while component values keep their
 * original spelling; the supporting Source rule uppercases the whole row.
 */
[data-sibrs-configuration-summary] .config__item > span:last-child { text-transform: none; }
/* The original shared .btn rules already use these exact token values. Keep
 * their cascade: a later base declaration masks Source variants and :hover.
 */
.header { border-radius: 0 0 var(--sibrs-radius-header) var(--sibrs-radius-header); }
.top-header { background-color: var(--sibrs-color-header-top); }
.middle-header { border-bottom-color: var(--sibrs-color-divider); }
.sibrs-quickview-head button { display: flex; align-items: center; justify-content: center; }

/* Header spacing is the user02Nov Bitrix exception, measured at1920/375px.
 * Other tokens continue to follow Figma.
 * Primary desktop frame only. Tablet/mobile retain their original rules until
 * their own frame comparisons; do not apply desktop geometry indiscriminately.
 */
@media (min-width: 106.24875em) {
  body { font-size: var(--sibrs-font-size-body); line-height: var(--sibrs-line-height-body); }
  .top-header { padding: var(--sibrs-header-top-padding) 0; }
  .middle-header { padding: var(--sibrs-header-middle-padding) 0; }
  .bottom-header {
    padding: var(--sibrs-header-bottom-padding-top) 0 var(--sibrs-header-bottom-padding-bottom);
  }
  .hero__image_pc { position: relative; top: var(--sibrs-hero-image-offset-y); }
  .hero__cols { bottom: var(--sibrs-hero-badges-bottom); }
  .hero { padding-bottom: var(--sibrs-hero-padding-bottom-desktop); }
  .hero__title { font-size: var(--sibrs-font-size-hero-desktop); line-height: var(--sibrs-line-height-hero); }
  .hero__descr { line-height: var(--sibrs-line-height-copy); }
}

/* Keep the original home component's330px minimum when it fits. Narrow
 * viewports must retain all cards without forcing horizontal page scrolling.
 */
@media (max-width: 47.99875em) {
  .servers__list,
  .catalog__cols,
  .favs__cols { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20.625rem), 1fr)); }
  .catalog__body .catalog__right { min-width: 0; }
  .top-catalog > .sibrs-catalog-tools label { min-width: 0; max-width: 100%; }
  .top-catalog > .sibrs-catalog-tools select { min-width: 0; flex-shrink: 1; }
}

/* Primary mobile home782:7713,375px canvas; its44px drawn iOS status bar
 * belongs to the device, not the store. Measurements/provenance are recorded
 * in design/mobile-home-measurements.json. Original image/font/icon bytes stay.
 */
@media (max-width: 29.99875em) {
  :root {
    --sibrs-header-mobile-padding-top: 3.125rem;
    --sibrs-header-mobile-padding-bottom: 1.25rem;
    --sibrs-hero-mobile-image-width: 154.666667vw;
    --sibrs-hero-mobile-image-left: -17.333333vw;
    --sibrs-hero-mobile-image-top: -13.866667vw;
    --sibrs-hero-mobile-image-slot: 48.533333vw;
  }
  /* User02Nov exception: preserve original Bitrix sticky top and shrink state. */
  .header { top: -1.875rem; }
  .bottom-header {
    padding: var(--sibrs-header-mobile-padding-top) 0 var(--sibrs-header-mobile-padding-bottom);
  }
  .header-scroll .bottom-header { padding: 1.25rem 0; }
  .hero__btn .btn__icon { flex: 0 0 1rem; width: 1rem; height: 1rem; }
  .hero__image_mob { position: relative; height: var(--sibrs-hero-mobile-image-slot); }
  .hero__image_mob img {
    position: absolute;
    width: var(--sibrs-hero-mobile-image-width);
    max-width: none;
    height: auto;
    left: var(--sibrs-hero-mobile-image-left);
    top: var(--sibrs-hero-mobile-image-top);
  }
}

/* Real names may exceed the two-line Figma sample: keep every line readable.
 * Only cards with the new actual-attribute summary use the measured compact
 * label column; existing catalogue/news cards retain their own presentation.
 */
.server__label { height: auto; }
@media (min-width: 61.99875em) { .server__label { min-height: 3.5625rem; } }
@media (min-width: 47.99875em) and (max-width: 61.99875em) { .server__label { min-height: 2.9375rem; } }
.server__descr[data-sibrs-card-spec] span:first-child { flex: 0 0 auto; }
.server__descr[data-sibrs-card-spec] span:last-child { min-width: 0; overflow-wrap: anywhere; }
@media (min-width: 106.24875em) {
  .servers__list { grid-template-columns: repeat(4, minmax(0, 25rem)); }
}
