/* Общие стили футера и баннера cookies для всех страниц. */
:root{
  --gmt-footer-bg:#ffffff;
  --gmt-footer-line:#e6eaf2;
  --gmt-footer-text:#2c3340;
  --gmt-footer-muted:#6b7280;
  --gmt-footer-accent:#f99761;
}

html,
body{
  max-width:100%;
  overflow-x:hidden;
}

img,
svg,
video,
canvas{
  max-width:100%;
}

.gmt-footer{
  /* Каркас единого "правильного" футера. */
  width:100%;
  background:var(--gmt-footer-bg);
  border-top:1px solid var(--gmt-footer-line);
  box-shadow:0 -4px 12px rgba(15,23,42,0.05);
}

/* На некоторых шаблонах фон страницы может "просвечивать" под футером.
   Фиксируем единый белый фон, как у шапки. */
body .gmt-footer,
body .gmt-footer__inner,
body .gmt-footer__bottom{
  background-color:#ffffff !important;
}

.gmt-footer__inner{
  max-width:1200px;
  margin:0 auto;
  padding:40px 24px 24px;
  display:grid;
  grid-template-columns:minmax(220px, 1.3fr) repeat(3, minmax(160px, 1fr));
  gap:24px;
}

.gmt-footer__brand{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.gmt-footer__logo{
  font-weight:700;
  font-size:20px;
  color:var(--gmt-footer-text);
  letter-spacing:0.02em;
}

.gmt-footer__tagline{
  color:var(--gmt-footer-muted);
  font-size:14px;
  line-height:1.5;
}

.gmt-footer__col-title{
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:var(--gmt-footer-muted);
  margin-bottom:10px;
}

.gmt-footer__links{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.gmt-footer__links a{
  color:var(--gmt-footer-text);
  text-decoration:none;
  font-weight:500;
  font-size:14px;
}

.gmt-footer__links a:hover{
  color:var(--gmt-footer-accent);
}

.gmt-footer__bottom{
  max-width:1200px;
  margin:-40px auto 0;
  padding:0 24px 32px;
  border-top:none;
  display:flex;
  flex-wrap:wrap;
  gap:12px 24px;
  justify-content:flex-start;
  align-items:center;
  color:var(--gmt-footer-muted);
  font-size:13px;
}

.gmt-footer__bottom-links{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
}

.gmt-footer__bottom-links a{
  color:var(--gmt-footer-muted);
  text-decoration:none;
}

.gmt-footer__bottom-links a:hover{
  color:var(--gmt-footer-accent);
}

.gmt-cookie{
  /* Баннер согласия с cookies: показывается поверх страницы внизу. */
  position:fixed;
  left:24px;
  right:24px;
  bottom:24px;
  background:#ffffff;
  border:1px solid var(--gmt-footer-line);
  border-radius:16px;
  box-shadow:0 20px 40px rgba(0,0,0,0.12);
  padding:18px 20px;
  display:none;
  z-index:9999;
}

.gmt-cookie.is-visible{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}

.gmt-cookie__text{
  color:var(--gmt-footer-text);
  font-size:14px;
  line-height:1.5;
  max-width:720px;
}

.gmt-cookie__text a{
  color:var(--gmt-footer-accent);
  text-decoration:none;
  font-weight:600;
  padding:2px 4px;
  border-radius:6px;
  background:rgba(249,151,97,0.12);
}

.gmt-cookie__actions{
  display:flex;
  gap:10px;
  flex-shrink:0;
}

.gmt-cookie__btn{
  border:none;
  border-radius:10px;
  padding:10px 14px;
  font-weight:600;
  cursor:pointer;
}

.gmt-cookie__btn--accept{
  background:#f99761;
  color:#fff;
  box-shadow:0 10px 20px rgba(249,151,97,0.25);
}

.gmt-cookie__btn--reject{
  background:#f3f4f6;
  color:#2c3340;
  border:1px solid var(--gmt-footer-line);
}

@media (max-width:900px){
  .gmt-footer__inner{
    grid-template-columns:1fr 1fr;
  }

  .gmt-footer__bottom{
    margin:0 auto;
    padding:8px 24px 32px;
  }
}

@media (max-width:640px){
  .gmt-footer__inner{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:16px 14px;
    padding:26px 16px 16px;
  }

  .gmt-footer__brand{
    grid-column:1 / -1;
    gap:8px;
  }

  .gmt-footer__logo{
    font-size:18px;
  }

  .gmt-footer__tagline{
    font-size:13px;
    line-height:1.4;
  }

  .gmt-footer__inner > .gmt-footer__col:last-child{
    grid-column:1 / -1;
  }

  .gmt-footer__col--docs{
    grid-column:1 / -1;
    text-align:left;
  }

  .gmt-footer__col--docs .gmt-footer__col-title{
    text-align:left;
  }

  .gmt-footer__col--docs .gmt-footer__links{
    display:grid;
    grid-template-columns:1fr;
    gap:6px;
    max-width:none;
    margin:0;
    justify-items:start;
  }

  .gmt-footer__col-title{
    font-size:11px;
    margin-bottom:8px;
  }

  .gmt-footer__links{
    gap:6px;
  }

  .gmt-footer__links a{
    font-size:13px;
    line-height:1.35;
  }

  .gmt-footer__bottom{
    margin:0 auto;
    padding:8px 16px 20px;
    gap:8px 14px;
    font-size:12px;
  }

  .gmt-footer__bottom-links{
    gap:10px;
  }

  .gmt-cookie.is-visible{
    flex-direction:column;
    align-items:flex-start;
  }

  .gmt-cookie__actions{
    width:100%;
  }

  .gmt-cookie__btn{
    flex:1;
    text-align:center;
  }
}

@media (max-width:420px){
  .gmt-footer__inner{
    grid-template-columns:1fr;
    gap:12px;
    padding:22px 14px 14px;
  }

  .gmt-footer__inner > .gmt-footer__col:last-child{
    grid-column:auto;
  }

  .gmt-footer__col--docs .gmt-footer__links{
    gap:6px;
  }

  .gmt-footer__bottom{
    padding:8px 14px 18px;
  }
}

/* Защита от переполнения в мобильной версии кастомных блоков маркетплейса. */
@media (max-width:980px){
  .gk-search{
    margin-left:12px;
    margin-right:12px;
    padding:16px;
  }

  .gk-search__layout{
    grid-template-columns:minmax(0,1fr) !important;
    gap:16px;
  }

  .gk-search__layout .gk-search__sidebar{
    position:static !important;
    top:auto !important;
    order:-1;
  }

  .gk-search__grid{
    grid-template-columns:repeat(2, minmax(0,1fr)) !important;
    gap:14px;
  }

  .gk-card__bottom{
    flex-wrap:wrap;
  }

  .gk-pagination{
    flex-wrap:wrap;
    padding-left:8px;
    padding-right:8px;
  }

  .gk-excel-import{
    padding:0 14px;
  }

  .gk-excel-import__controls{
    flex-direction:column;
    align-items:stretch;
  }

  .gk-excel-import__threshold{
    min-width:0;
  }

  .gk-excel-import__search-btn{
    width:100%;
  }

  .gk-excel-import__results-header{
    flex-direction:column;
    align-items:flex-start;
    gap:8px;
  }
}

@media (max-width:768px){
  .gk-excel-import__upload-area{
    padding:36px 14px;
  }

  .gk-excel-import__upload-text{
    font-size:16px;
  }

  .gk-excel-import__file-info{
    flex-direction:column;
    align-items:flex-start;
    gap:8px;
  }

  .gk-excel-import__grid{
    grid-template-columns:minmax(0,1fr) !important;
    gap:16px;
  }

  .gk-excel-import__card-footer{
    flex-direction:column;
    align-items:stretch;
    gap:10px;
  }
}

@media (max-width:640px){
  .t-slds__container,
  .t-slds__items-wrapper{
    overflow:hidden;
  }

  .gk-search{
    margin-left:10px;
    margin-right:10px;
    border-radius:16px;
  }

  .gk-search__grid{
    grid-template-columns:minmax(0,1fr) !important;
  }

  .gk-card__btn{
    width:100%;
    white-space:normal;
  }
}
