:root{
  --gg-border-thin:1px;
  --gg-border-color:#e9e9ee;
  --gg-opt-row-h:54px;
  --gg-cart-max:660px;
  --gg-cart-thumb-size:70px;
  --gg-page-max:1240px;
  --gg-side-pad:24px;
}

/* Layout helpers */
.container{ width:min(1200px,100% - 32px); margin-inline:auto }

.gg-container{
  max-width:var(--gg-page-max);
  padding-left:var(--gg-side-pad);
  padding-right:var(--gg-side-pad);
  margin:0 auto;
  width:100%;
}

/* Header */
.gg-site-header{
  position:sticky;
  top:0;
  z-index:1000;
  backdrop-filter:blur(6px);
  background:rgba(255,255,255,.9);
  border-bottom:1px solid #eee;
  margin-top:0 !important;
  padding-top:0 !important;
}

/* Alias .gg-header-inner — в разметке используется .gg-header__inner */
.gg-header__inner,
.gg-header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:12px 0;
}

.gg-header{background:#fff;border-bottom:1px solid #f0f0f5}

.gg-header__left{display:flex;align-items:center;gap:10px;min-width:0}

.gg-logo{display:inline-flex;align-items:center;gap:10px;text-decoration:none;color:#111;line-height:1}
.gg-logo img{display:block;max-height:28px;width:auto}
.gg-logo__title{
  font-weight:700 !important;
  font-size:18px;
  margin-left:15px;
  color:#111;
  white-space:nowrap;
}

.gg-header__catalog{
  display:inline-flex;align-items:center;gap:9px;
  padding:9px 14px;border-radius:12px;background:#111214;color:#fff;
  text-decoration:none;font-weight:800;font-size:14.5px;line-height:1;
  box-shadow:0 2px 10px rgba(0,0,0,.08), inset 0 -1px 0 rgba(255,255,255,.06);
  transition:background-color .18s ease, transform .06s ease, box-shadow .18s ease;
}
.gg-header__catalog:hover{background:#0c0d10;box-shadow:0 3px 14px rgba(0,0,0,.12), inset 0 -1px 0 rgba(255,255,255,.06)}
.gg-header__catalog:active{transform:translateY(1px)}
.gg-header__catalog:focus-visible{outline:none;box-shadow:0 0 0 3px rgba(108,92,231,.3),0 2px 10px rgba(0,0,0,.08)}
.gg-header__catalog-icon{width:17px;height:17px;color:#fff;opacity:.95}

.gg-header__right{
  display:flex;
  align-items:center;
  gap:14px;
}

.gg-top-link{color:#111;text-decoration:none;font-weight:600;font-size:15px;transition:opacity .15s ease}
.gg-top-link:hover{opacity:.75}

.gg-cart{
  position:relative;display:inline-flex;align-items:center;gap:8px;text-decoration:none;color:#111;font-weight:700;font-size:15px;transition:opacity .15s ease;
}
.gg-cart:hover{opacity:.8}
.gg-cart svg{ opacity:.95; }
.gg-cart:hover svg{ opacity:1; }

.gg-cart__bubble{
  position:absolute;
  right:-6px;
  top:-6px;
  min-width:18px;
  height:18px;
  border-radius:9px;
  background:#fafbff;
  color:#1a1a2e;
  border:1px solid #e9e9ee;
  font-size:11px;
  font-weight:700;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 5px;
  line-height:1;
  box-shadow:0 2px 6px rgba(108,92,231,.25);
}

.gg-header__right a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:36px;
  height:36px;
  border-radius:10px;
  color:#111;
  text-decoration:none;
  transition:background-color .15s ease, opacity .15s ease, box-shadow .15s ease;
  position:relative;
}
.gg-header__right a:hover{background:#f5f6fa}
.gg-header__right a:focus-visible{
  outline:none;
  box-shadow:0 0 0 3px rgba(108,92,231,.28);
}

.gg-account svg{ opacity:.95; }
.gg-account:hover svg{ opacity:1; }

.gg-cart.flash{
  background:rgba(34,197,94,.12);
  box-shadow:0 0 0 3px rgba(34,197,94,.28), 0 8px 22px rgba(34,197,94,.20);
  transition:background-color .25s ease, box-shadow .25s ease;
}
.gg-cart.flash svg{ color:#16a34a; }

@media (max-width:640px){
  :root{ --gg-side-pad:16px; }
  .gg-header__inner,
  .gg-header-inner{padding:10px 0}
  .gg-header__left{gap:8px}
  .gg-logo__title{font-size:16px}
  .gg-header__catalog{padding:8px 12px;border-radius:10px;font-size:14px;gap:7px}
  .gg-header__catalog-icon{width:16px;height:16px}
  .gg-header__right{gap:10px}
  .gg-top-link,.gg-cart{font-size:14px}
  .gg-header__right a{
    width:34px;
    height:34px;
    border-radius:9px;
  }
  .gg-cart__bubble{
    right:-5px;top:-5px;
    min-width:17px;height:17px;font-size:10.5px;
  }
}

/* Brand / nav / main */
.gg-brand{ text-decoration:none; color:#111 }
.gg-brand-mark{ font-weight:700; letter-spacing:.2px }
.gg-brand.small{ font-weight:700; font-size:14px }
.gg-nav{ margin-left:auto; display:flex; align-items:center; gap:14px }
.gg-nav a{ color:#111; text-decoration:none; padding:6px 8px; border-radius:8px; transition:background-color .2s, box-shadow .2s }
.gg-nav a:hover{ background:#f6f7fb; box-shadow:inset 0 0 0 9999px rgba(0,0,0,.03) }
.gg-main{ padding-top:12px }

/* Footer */
.gg-site-footer{ border-top:1px solid #eee; margin-top:40px; padding:18px 0; background:#fff }
.gg-footer-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.gg-site-footer .gg-footer-inner{ gap:14px }

.gg-footer-left{ display:flex; align-items:center; gap:10px; color:#111 }
.gg-footer-left .muted{ color:#666; font-size:12px }
.gg-footer-right{ display:flex; gap:12px; align-items:center }
.gg-footer-right a{ color:#333; text-decoration:none; padding:4px 6px; border-radius:8px; transition:background-color .2s, box-shadow .2s }
.gg-footer-right a:hover{ background:#f6f7fb; box-shadow:inset 0 0 0 9999px rgba(0,0,0,.03) }
.gg-mini-cart{ display:inline-flex; align-items:center; gap:6px }
.gg-mini-cart .count{
  display:inline-block; min-width:18px; padding:0 6px; text-align:center; background:#6C5CE7; color:#fff; border-radius:999px; font-size:12px; line-height:18px;
}

.gg-site-footer .gg-footer-left,
.gg-site-footer .gg-footer-right{
  display:flex;
  align-items:center;
}
.gg-site-footer .gg-footer-right{ gap:10px }

/* Footer icons */
.gg-footer-right .gg-f-icon{
  width:38px; height:38px; display:inline-flex; align-items:center; justify-content:center;
  border:0 !important; border-radius:10px; background:#f9f9fc; color:#111; text-decoration:none;
  box-shadow:0 1px 2px rgba(0,0,0,.02); transition:transform .12s, box-shadow .18s, background-color .18s, color .18s;
}
.gg-site-footer .gg-footer-right .gg-f-icon{
  width:38px; height:38px;
  display:inline-flex; align-items:center; justify-content:center;
  border-radius:10px;
}
.gg-footer-right .gg-f-icon svg{ width:18px; height:18px; fill:currentColor }
.gg-footer-right .gg-f-icon.is-telegram{ color:#229ED9; background:#eaf6fd }
.gg-footer-right .gg-f-icon.is-support{ color:#6C5CE7; background:#f1efff }
.gg-footer-right .gg-f-icon.is-reviews{ color:#F4B400; background:#FFF7DA }
.gg-footer-right .gg-f-icon:hover{ transform:translateY(-1px); box-shadow:0 3px 10px rgba(17,16,30,.08); filter:saturate(1.05) }

@media (max-width:720px){
  .gg-header__inner,
  .gg-header-inner{ padding:8px 0 }
  .gg-nav{ gap:10px }
  .gg-site-footer{ padding:14px 0 }
  .gg-footer-inner{ flex-direction:column; align-items:flex-start; gap:8px }
}

@media (max-width:768px){
  .gg-site-footer .gg-footer-inner{
    flex-direction:column;
    align-items:center;
    text-align:center;
  }
  .gg-site-footer .gg-footer-right{
    order:1;
    justify-content:center;
    width:100%;
  }
  .gg-site-footer .gg-footer-left{
    order:2;
    justify-content:center;
    width:100%;
  }
  .gg-site-footer .gg-footer-left .muted{
    display:block;
    margin-top:6px;
  }
}

@media (min-width:769px){
  .gg-site-footer .gg-footer-inner{
    flex-direction:row;
    align-items:flex-start;
    justify-content:space-between;
  }
  .gg-site-footer .gg-footer-left{ order:1; text-align:left }
  .gg-site-footer .gg-footer-right{ order:2; justify-content:flex-end }
}

/* Buttons (neutral) + Accent CTA shared */
.woocommerce a.button,.button,button[type=submit],
.gg-mini-btn.button,.gg-p-buy .single_add_to_cart_button{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  background:#f2f2f7 !important; color:#111 !important;
  border:1px solid var(--gg-border-color) !important; border-radius:12px;
  padding:10px 22px; font-size:16px; font-weight:700;
}
.woocommerce a.button:hover,.button:hover,button[type=submit]:hover,
.gg-mini-btn.button:hover,.gg-p-buy .single_add_to_cart_button:hover{ background:#ededf3 !important }

.cart-totals-compact .wc-proceed-to-checkout .checkout-button,
.checkout-right #place_order{
  display:block; width:100%; background:#6C5CE7; color:#fff; border:0; border-radius:10px;
  padding:11px 16px; font-size:14px; font-weight:700; text-align:center; text-decoration:none;
  box-shadow:0 6px 16px rgba(108,92,231,.18); transition:background-color .18s ease;
}

/* Tabs (shared) */
.gg-tabs{
  display:inline-grid; grid-auto-flow:column; grid-auto-columns:1fr; gap:0;
  border:1px solid #e9e9ee; border-radius:999px; background:#fff; box-shadow:0 1px 2px rgba(0,0,0,.02);
  overflow:hidden; margin:8px 0 12px; justify-self:center;
}
.gg-tab{
  appearance:none; border:0; background:transparent; color:#111;
  padding:10px 18px; font-weight:700; font-size:14px; line-height:1; cursor:pointer;
  transition:background-color .18s ease,color .18s ease;
}
.gg-tab + .gg-tab{ position:relative }
.gg-tab + .gg-tab::before{ content:""; position:absolute; left:0; top:8px; bottom:8px; width:1px; background:#e9e9ee }
.gg-tab:hover,.gg-tab.is-active{ background:#f2f2f7; box-shadow:inset 0 0 0 9999px rgba(0,0,0,.035); color:#111 }
.gg-tab:focus-visible{ outline:none; box-shadow:inset 0 0 0 2px rgba(108,92,231,.35), inset 0 0 0 9999px rgba(0,0,0,.035); border-radius:inherit }

/* Category listing — порядок @media сохраняет прежний каскад */
.gg-cat-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:24px;
  margin:16px 0 32px;
  align-items:start;
  justify-content:center;
  justify-items:stretch;
}
.container .gg-cat-grid{
  margin-left:auto;
  margin-right:auto;
  width:100%;
}

@media (max-width:1200px){
  .gg-cat-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:720px){
  .gg-cat-grid{
    justify-content:center;
    grid-template-columns:minmax(0, 560px);
    padding-left:0;
    padding-right:0;
    box-sizing:border-box;
  }
  .gg-cat-card{ overflow:hidden }
  .gg-cat-card.is-collapsed .gg-cat-list{ display:none }
  .gg-cat-card.is-expanded  .gg-cat-list{ display:grid }
  .gg-cat-media{ cursor:pointer }
  .gg-cat-media:active{ filter:saturate(1.02) brightness(0.98) }
}

@media (min-width:721px){
  .gg-cat-grid{
    grid-template-columns:repeat(3, minmax(280px, 1fr));
    gap:24px;
  }
}
@media (max-width:1200px) and (min-width:721px){
  .gg-cat-grid{ grid-template-columns:repeat(2, minmax(280px, 1fr)); }
}

.gg-cat-card{ border:1px solid #e9e9ee; border-radius:14px; overflow:hidden; background:#fff; box-shadow:0 1px 2px rgba(0,0,0,.02) }
.gg-cat-media{ position:relative; display:block; aspect-ratio:3/1; overflow:hidden }
.gg-cat-media img{ width:100%; height:100%; object-fit:cover; display:block }
.gg-cat-media::after{ content:""; position:absolute; inset:0; background:linear-gradient(90deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.15) 60%, rgba(0,0,0,0) 100%); z-index:1 }
.gg-cat-overlay{ position:absolute; left:18px; bottom:14px; z-index:2; color:#fff; font-weight:700; font-size:18px; letter-spacing:.2px; line-height:1.1; text-align:left; pointer-events:none }
.gg-cat-list{ display:grid; padding:12px }
.gg-subcat{ border-bottom:1px solid #f0f0f4 }
.gg-subcat:last-child{ border-bottom:0 }
.gg-subcat-toggle{
  display:flex; align-items:center; justify-content:space-between; width:100%; text-align:left;
  padding:10px 8px; background:transparent; border:0; border-bottom:1px solid #eee; border-radius:0;
  cursor:default; color:#111; font-weight:600; font-size:14px; line-height:1.3;
}
.gg-subcat-toggle::after{ content:'\2192'; color:#aaa; font-weight:600 }
.gg-subcat-panel{ padding:4px 0 10px }
.gg-loading{ padding:10px; color:#7a7a86 }
.gg-cat-item{
  display:flex; justify-content:space-between; gap:12px; padding:10px 8px; border-bottom:1px solid #f2f2f5; text-decoration:none; color:#111; position:relative; border-radius:10px; transition:background-color .2s, box-shadow .2s;
}
.gg-cat-item:last-child{ border-bottom:0 }
.gg-cat-item:hover{ background:#f6f7fb; text-decoration:none }
.gg-subcat-content .gg-cat-item:hover,.gg-cat-list > .gg-cat-item:hover{ box-shadow:inset 0 0 0 9999px rgba(0,0,0,.035) }
.gg-cat-item-name{ color:#111; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:70%; font-size:14px }
.gg-cat-item-price{ color:#111; font-weight:700; white-space:nowrap; font-feature-settings:"tnum" 1 }

/* Toasts & Modal */
.gg-modal{ position:fixed; inset:0; display:none; z-index:9999 }
.gg-modal.is-open{ display:block }
.gg-modal__backdrop{ position:absolute; inset:0; background:rgba(17,16,30,.45); backdrop-filter:blur(2px) }
.gg-modal__dialog{
  position:relative; z-index:1; width:min(440px, calc(100% - 32px));
  margin:10vh auto 0; padding:16px; border-radius:14px; background:#fff;
  box-shadow:0 16px 40px rgba(17,16,102,.22);
}
.gg-modal__dialog h3{ margin:0 0 8px; font-size:18px; font-weight:800; color:#111 }
.gg-modal__text{ margin:0 0 14px; color:#555; font-size:14px; line-height:1.5 }
.gg-modal__actions{ display:flex; justify-content:flex-end; gap:10px }
.gg-modal__actions .button{ background:#f2f2f7; color:#111; border:1px solid #e9e9ee; border-radius:10px; padding:9px 14px; font-weight:700 }
.gg-modal__actions .gg-modal__confirm{ background:#e74c3c; border-color:#e74c3c; color:#fff }
.gg-modal__actions .gg-modal__confirm:hover{ background:#cf3f31 }

.gg-toast{
  position:fixed; left:50%; top:100px; transform:translateX(-50%) translateY(-8px);
  z-index:2147483647; background:rgba(17,16,30,.78); color:#fff; border-radius:10px; padding:10px 14px; min-width:280px; max-width:min(820px,94vw);
  box-shadow:0 10px 28px rgba(17,16,102,.22); opacity:0; pointer-events:none; transition:opacity .18s, transform .18s; white-space:normal; overflow-wrap:anywhere;
}
.gg-toast.is-open{ opacity:1; transform:translateX(-50%) translateY(0) }
.gg-toast__inner{ display:block }
.gg-toast__title{ margin:0; font-weight:700; font-size:13px; line-height:1.45 }
#gg-add-to-cart-toast{
  position:fixed; left:50%; top:75px; transform:translateX(-50%) translateY(-8px);
  z-index:2147483647; background:rgba(34,197,94,.95); color:#fff; border-radius:10px; padding:12px 20px; min-width:280px; max-width:min(420px,94vw);
  box-shadow:0 10px 28px rgba(34,197,94,.35); opacity:0; pointer-events:none; transition:opacity .25s, transform .25s; white-space:normal; overflow-wrap:anywhere;
}
#gg-add-to-cart-toast.is-open{ opacity:1; transform:translateX(-50%) translateY(0) }
#gg-add-to-cart-toast .gg-toast__inner{ display:flex; align-items:center; justify-content:center }
#gg-add-to-cart-toast .gg-toast__title{ margin:0; font-weight:700; font-size:14px; line-height:1.45 }

html.gg-toast-open > .blockUI,html.gg-toast-open > .blockMsg,
body.gg-toast-open > .blockUI,body.gg-toast-open > .blockMsg{ display:none !important; opacity:0 !important; pointer-events:none !important }
body.gg-toast-open > .gg-modal__backdrop,body.gg-toast-open > .gg-overlay,body.gg-toast-open > .gg-backdrop{ display:none !important }
#gg-add-toast::before,#gg-add-toast::after{ content:none !important }

.gg-toast.gg-toast--warning {
  background:#ffe08a;
  border:2px solid #f4c542;
  color:#4a3210;
}

#gg-add-to-cart-toast.gg-toast--warning {
  background:#ffe08a;
  color:#4a3210;
  box-shadow:0 10px 28px rgba(244,197,66,.35);
  border:2px solid #f4c542;
}
#gg-add-to-cart-toast.gg-toast--warning .gg-toast__title,
#gg-add-to-cart-toast.gg-toast--warning .gg-toast__icon {
  color:#4a3210;
}

/* Telegram login */
.gg-login-tg{
  display:flex !important;
  justify-content:center !important;
  align-items:center !important;
  width:100% !important;
}
.gg-login-tg .button,
.gg-login-tg a{
  border-radius:999px !important;
  font-weight:800 !important;
  padding:12px 20px !important;
}

#tgma-chat-login.button,
#tgma-chat-login{
  appearance:none !important;
  border:0 !important;
  outline:0 !important;
  text-decoration:none !important;
  cursor:pointer !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:10px !important;
  background:#229ED9 !important;
  color:#fff !important;
  border-radius:999px !important;
  padding:12px 20px !important;
  font-weight:800 !important;
  font-size:15px !important;
  line-height:1 !important;
  box-shadow:none !important;
  transition:background-color .12s !important;
}
#tgma-chat-login:hover{
  background:#1f90c6 !important;
  transform:none !important;
  box-shadow:none !important;
}
#tgma-chat-login:active{
  transform:none !important;
  box-shadow:none !important;
}
#tgma-chat-login.is-busy { opacity:.7; pointer-events:none; }

@media (max-width:768px){
  html{ overflow-y:scroll; scrollbar-gutter:stable; }
  .site{ scrollbar-gutter:stable }
  body.woocommerce-cart html,
  body.woocommerce-checkout html{
    overflow-y:auto !important;
    scrollbar-gutter:auto !important;
  }
  body.gg-no-scrollbar-gutter .site{ scrollbar-gutter:auto }
  .gg-capsule{
    padding:0 !important;
    margin:16px auto !important;
  }
  .gg-capsule-inner{
    padding:20px !important;
  }
  .gg-login-tg > *{
    display:flex;
    justify-content:center;
  }
}

/* === 404 === */
@keyframes gg-404-scale{
  from{ opacity:0; transform:scale(.15); }
  to  { opacity:1; transform:scale(1);   }
}
@keyframes gg-404-spin{
  from{ transform:rotate(0deg);    }
  to  { transform:rotate(360deg); }
}

.gg-404-wrap{
  max-width:660px;
  width:100%;
  margin:24px auto;
  background:#fff;
  border:1px solid #e9e9ee;
  border-radius:18px;
  overflow:hidden;
}

.woocommerce-account .gg-404-wrap{
  border:none;
  border-radius:0;
  background:transparent;
  margin:0 auto;
}
.gg-404{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:60px 24px;
  text-align:center;
}
.gg-404__icon{
  width:156px;
  height:156px;
  margin-bottom:24px;
  animation:gg-404-scale 4.5s cubic-bezier(.34,1.56,.64,1) both;
}
.gg-404__icon-spin{
  width:100%;
  height:100%;
  animation:gg-404-spin 4.5s ease-out both;
}
.gg-404__icon img{
  width:100%;
  height:100%;
  object-fit:contain;
}
.gg-404__title{
  font-size:22px;
  font-weight:700;
  color:#111;
  margin:0 0 10px;
}
.gg-404__subtitle{
  font-size:14px;
  color:#888;
  margin:0 0 28px;
  max-width:320px;
  line-height:1.5;
}
.gg-404__btn{
  display:inline-flex;
  align-items:center;
  padding:12px 28px;
  background:#111;
  color:#fff;
  font-size:14px;
  font-weight:600;
  border-radius:999px;
  text-decoration:none;
  transition:background .15s;
}
.gg-404__btn:hover{
  background:#333;
  color:#fff;
}
