/* =========================================================
   Гриль Центр — кнопки мессенджеров (WhatsApp, Telegram, MAX)
   Все классы с префиксом gcm-, чтобы не пересекаться со стилями сайта.
   ========================================================= */

:root {
  --gcm-accent: #f65c0d;            /* фирменный оранжевый */
  --gcm-font: Geometria, -apple-system, "Segoe UI", Arial, sans-serif;
  --gcm-fab-right: 28px;            /* отступ плавающей кнопки справа */
  --gcm-fab-bottom: 28px;           /* отступ снизу на компьютере */
  --gcm-fab-bottom-mobile: 96px;    /* на телефоне — над нижним меню сайта */
  --gcm-z: 9990;
}

.gcm, .gcm *, .gcm-sheet, .gcm-sheet * { box-sizing: border-box; }

/* Сайт сбрасывает у button:hover/:focus/:active border-radius, border и box-shadow */
.gcm-fab__btn:hover, .gcm-fab__btn:focus, .gcm-fab__btn:active {
  border: 0; border-radius: 50%; box-shadow: 0 6px 20px rgba(246, 92, 13, .45); outline: 0;
}
.gcm-header-mobile:hover, .gcm-header-mobile:focus, .gcm-header-mobile:active {
  border: 0; border-radius: 4px; outline: 0;
}
.gcm-drop__btn:hover, .gcm-drop__btn:focus, .gcm-drop__btn:active {
  border: 1px solid var(--gcm-accent); border-radius: 18px; outline: 0;
}
.gcm-drop--accent .gcm-drop__btn:hover, .gcm-drop--accent .gcm-drop__btn:focus, .gcm-drop--accent .gcm-drop__btn:active {
  border: 1.5px solid var(--gcm-accent); border-radius: 8px;
}
.gcm-fab__btn:focus-visible, .gcm-header-mobile:focus-visible, .gcm-drop__btn:focus-visible {
  outline: 2px solid #fff; outline-offset: 2px;
}
.gcm a, .gcm-sheet a { text-decoration: none !important; }

/* ---------- Цветные круглые иконки ---------- */
.gcm-ic {
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
}
.gcm-ic svg { width: 60%; height: 60%; }
.gcm-ic--wa  { background: #25D366; }
.gcm-ic--tg  { background: #2AABEE; }
.gcm-ic--max { overflow: hidden; }
.gcm-ic--max img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- 1. Шапка (компьютер) ---------- */
.gcm-header {
  display: flex; flex-direction: column; justify-content: center; align-self: center;
  margin-left: 20px; padding-left: 18px; border-left: 1px solid #2e2e2e;
  font-family: var(--gcm-font); flex-shrink: 0;
}
.gcm-header__title { font-size: 11px; color: #9a9a9a; margin-bottom: 6px; white-space: nowrap; }
.gcm-header__row { display: flex; gap: 8px; }
.gcm-header__row .gcm-ic { width: 28px; height: 28px; transition: transform .15s; }
.gcm-header__row .gcm-ic:hover { transform: scale(1.08); }

/* ---------- 1б. Шапка (телефон): оранжевая иконка чата ---------- */
.gcm-header-mobile {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 4px; background: var(--gcm-accent);
  border: 0; padding: 0; cursor: pointer; vertical-align: middle;
}
.gcm-header-mobile svg { width: 12px; height: 12px; }
/* Мобильная шапка сайта (#sTop): в одну линию с иконкой телефона */
#sTop .s-top-actions { display: flex; flex-direction: row-reverse; flex-wrap: nowrap; align-items: flex-start; }
.gcm-s-top { line-height: 0; padding: 5px 0; margin-right: 6px; }
@media (max-width: 359px) {
  .gcm-s-top { margin-right: 0; }
  #sTop .header-logo img { max-width: calc(50vw - 30px); height: auto; }
}
.gcm-s-top .gcm-header-mobile,
.gcm-s-top .gcm-header-mobile:hover, .gcm-s-top .gcm-header-mobile:focus, .gcm-s-top .gcm-header-mobile:active {
  display: flex; width: 24px; height: 24px; border-radius: 5px;
}
.gcm-s-top .gcm-header-mobile svg { width: 16px; height: 16px; }

/* ---------- 2. Плавающая кнопка + панель «Связаться с нами» ---------- */
.gcm-fab {
  position: fixed; right: var(--gcm-fab-right); bottom: var(--gcm-fab-bottom);
  z-index: var(--gcm-z); display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  font-family: var(--gcm-font);
}
.gcm-fab__btn {
  width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--gcm-accent); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(246, 92, 13, .45); transition: transform .15s;
}
.gcm-fab__btn:hover { transform: scale(1.05); }
.gcm-fab__btn svg { width: 28px; height: 28px; }
.gcm-fab__btn .gcm-x { display: none; width: 24px; height: 24px; }
.gcm-fab.is-open .gcm-fab__btn .gcm-chat { display: none; }
.gcm-fab.is-open .gcm-fab__btn .gcm-x { display: block; }

.gcm-fab__panel {
  display: none; width: 260px; padding: 16px; border-radius: 16px;
  background: #161616; border: 1px solid #2e2e2e; box-shadow: 0 12px 40px rgba(0,0,0,.5);
}
.gcm-fab.is-open .gcm-fab__panel { display: block; animation: gcm-up .18s ease-out; }
.gcm-fab__title { color: #fff; font-weight: 700; font-size: 15px; }
.gcm-fab__sub { display: flex; align-items: center; gap: 6px; color: #9a9a9a; font-size: 12px; margin: 3px 0 12px; }
.gcm-fab__sub::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #2ecc71; box-shadow: 0 0 0 3px rgba(46,204,113,.18); }
.gcm-fab__link {
  display: flex; align-items: center; gap: 10px; height: 42px; margin-top: 8px; padding: 0 12px 0 6px;
  border: 1px solid #3b3b3b; border-radius: 21px; color: #fff !important; font-size: 14px; font-weight: 500;
  transition: border-color .15s;
}
.gcm-fab__link:hover { border-color: var(--gcm-accent); }
.gcm-fab__link .gcm-ic { width: 30px; height: 30px; }
.gcm-fab__phone { display: block; margin-top: 12px; text-align: center; color: var(--gcm-accent) !important; font-weight: 600; font-size: 14px; }

/* ---------- 3. Вариант A: однотонные иконки ---------- */
.gcm-icons { display: flex; align-items: center; gap: 10px; margin-top: 12px; font: 13px var(--gcm-font); color: #8a8a8a; }
.gcm-icons__btn {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid #3a3a3a; color: #cfcfcf !important;
  display: flex; align-items: center; justify-content: center; transition: .15s;
}
.gcm-icons__btn svg { width: 17px; height: 17px; }
.gcm-icons__btn:hover { border-color: var(--gcm-accent); color: var(--gcm-accent) !important; }
.gcm--light .gcm-icons { color: #777; }
.gcm--light .gcm-icons__btn { border-color: #d9d9d9; color: #555 !important; }

/* ---------- 4. Вариант B: кнопка + выпадающий список ---------- */
.gcm-drop { position: relative; display: inline-block; margin-top: 14px; font-family: var(--gcm-font); }
.gcm-drop__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; border: 1px solid #3a3a3a; border-radius: 18px;
  background: transparent; color: #fff; font: 500 13px var(--gcm-font); cursor: pointer; white-space: nowrap;
  transition: border-color .15s;
}
.gcm-drop__btn:hover, .gcm-drop.is-open .gcm-drop__btn { border-color: var(--gcm-accent); }
.gcm-drop__dot { display: flex; color: var(--gcm-accent); }
.gcm-drop__dot svg { width: 18px; height: 18px; }
.gcm-drop__chev { width: 12px; height: 12px; transition: transform .2s; }
.gcm-drop.is-open .gcm-drop__chev { transform: rotate(180deg); }

.gcm-menu {
  display: none; position: absolute; left: 0; top: calc(100% + 8px); z-index: 50; width: 230px; padding: 6px;
  background: #1c1c1c; border: 1px solid #2f2f2f; border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.5);
}
.gcm-drop.is-open .gcm-menu { display: block; animation: gcm-up .15s ease-out; }
.gcm-menu a {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px; border-radius: 8px;
  color: #e8e8e8 !important; font-size: 14px;
}
.gcm-menu a:hover { background: #262626; }

.gcm--light .gcm-drop__btn { color: #222; border-color: #d0d0d0; }
.gcm--light .gcm-menu { background: #fff; border-color: #e6e6e6; box-shadow: 0 12px 30px rgba(0,0,0,.12); }
.gcm--light .gcm-menu a { color: #222 !important; }
.gcm--light .gcm-menu a:hover { background: #f4f4f4; }

/* Акцентная версия для карточки товара: оранжевая обводка, высота как у «В корзину» */
.gcm-drop--accent .gcm-drop__btn {
  height: var(--gcm-btn-h, 58px); padding: 0 22px; border-radius: 8px; font-size: 17px;
  border: 1.5px solid var(--gcm-accent); color: var(--gcm-accent);
}
.gcm-drop--accent.gcm-drop { margin-top: 0; vertical-align: top; }

/* ---------- 5. Нижняя панель (только телефон) ---------- */
.gcm-sheet-bg { position: fixed; inset: 0; z-index: calc(var(--gcm-z) + 1); background: rgba(0,0,0,.6); animation: gcm-fade .2s; }
.gcm-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: calc(var(--gcm-z) + 2);
  padding: 10px 16px calc(24px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0;
  background: #1c1c1c; font-family: var(--gcm-font); box-shadow: 0 -10px 40px rgba(0,0,0,.4);
  animation: gcm-sheet .25s ease-out;
}
.gcm-sheet__grip { width: 40px; height: 4px; border-radius: 2px; background: #444; margin: 0 auto 14px; }
.gcm-sheet__title { color: #fff; font-weight: 700; font-size: 18px; }
.gcm-sheet__sub { color: #9a9a9a; font-size: 13px; margin: 3px 0 14px; }
.gcm-sheet__link {
  display: flex; align-items: center; gap: 12px; height: 54px; margin-top: 8px; padding: 0 14px;
  border-radius: 14px; background: #262626; color: #fff !important; font-size: 16px; font-weight: 500;
}
.gcm-sheet__link .gcm-ic { width: 32px; height: 32px; }
.gcm-sheet__arr { margin-left: auto; color: #666; font-size: 22px; line-height: 1; }
.gcm-sheet__call {
  display: flex; align-items: center; justify-content: center; height: 54px; margin-top: 12px;
  border: 1px solid #333; border-radius: 14px; color: var(--gcm-accent) !important; font-size: 16px; font-weight: 500;
}
.gcm-sheet--light { background: #fff; }
.gcm-sheet--light .gcm-sheet__grip { background: #ddd; }
.gcm-sheet--light .gcm-sheet__title { color: #111; }
.gcm-sheet--light .gcm-sheet__sub { color: #777; }
.gcm-sheet--light .gcm-sheet__link { background: #f3f3f3; color: #111 !important; }
.gcm-sheet--light .gcm-sheet__call { border-color: #e3e3e3; }
body.gcm-lock { overflow: hidden; }

/* ---------- Телефон ---------- */
@media (max-width: 767px) {
  .gcm-header { display: none; }
  .gcm-fab { right: 16px; bottom: var(--gcm-fab-bottom-mobile); }
  .gcm-fab__panel { width: calc(100vw - 32px); max-width: 320px; }
  .gcm-drop--accent.gcm-drop, .gcm-drop--accent .gcm-drop__btn { display: flex; width: 100%; }
  .gcm-drop--accent.gcm-drop { margin-top: 10px; }
  .gcm-drop--accent .gcm-drop__btn { font-size: 16px; }
  .gcm-only-desktop { display: none; }
}
@media (min-width: 768px) {
  .gcm-header-mobile { display: none; }
  .gcm-only-mobile { display: none !important; }
}

@keyframes gcm-up    { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes gcm-fade  { from { opacity: 0; } to { opacity: 1; } }
@keyframes gcm-sheet { from { transform: translateY(100%); } to { transform: none; } }
