/* =========================
   Product capsule (desktop base)
   ========================= */
.gg-capsule{
  max-width:1100px; margin:32px auto 24px; padding:10px; border-radius:28px;
  background:radial-gradient(120% 120% at 0% 0%,#fff 0%,#fbfbff 70%,#f7f6ff 100%);
  box-shadow:0 10px 40px rgba(110,90,230,0.08);
}
.gg-capsule-inner{
  display:grid; grid-template-columns:400px 1fr; gap:32px;
  padding:28px; border-radius:24px; background:#fff; box-shadow:0 8px 26px rgba(17,16,102,.06);
}

/* Left column + gallery safety */
.gg-capsule-left{
  display:block; width:400px !important; max-width:400px !important;
  background:transparent !important; border:none !important; box-shadow:none !important; padding:0 !important;
  position:relative; padding-bottom:calc(0.5 * var(--gg-opt-row-h) + 36px) !important; overflow:visible !important;
}
.gg-capsule-left img,
.woocommerce div.product div.images img{
  display:block !important; width:100% !important; height:auto !important;
  border:none !important; box-shadow:none !important; border-radius:10px !important; background:transparent !important;
}
.woocommerce div.product div.images,
.woocommerce-product-gallery,
.woocommerce-product-gallery__wrapper,
.woocommerce-product-gallery__image{
  overflow:visible !important; clip-path:none !important; -webkit-mask:none !important; mask:none !important; padding:0 !important;
}
.woocommerce-product-gallery::after,
.woocommerce-product-gallery__wrapper::after,
.woocommerce-product-gallery__image::after{ pointer-events:none !important }

/* Options overlay and pills */
.gg-capsule-left > .gg-p-options--left{
  position:absolute !important; left:0 !important; right:0 !important; width:100% !important;
  bottom:0 !important; transform:translateY(calc(50% - 10px)) !important;
  display:flex !important; justify-content:center !important; flex-wrap:wrap !important;
  gap:10px 14px !important; margin:0 !important; overflow:visible !important; z-index:20;
}
.gg-p-options--left{ border:1px solid transparent !important; background:transparent !important; box-shadow:none !important; overflow:visible !important }
.gg-p-options--left .gg-pill + .gg-pill::before{ background:#e9e9ee !important }
.gg-pill{
  appearance:none; border:1px solid var(--gg-border-color) !important; background:#fff; color:#2a2756;
  padding:8px 16px; border-radius:999px; font-size:14px; font-weight:700; cursor:pointer; transition:all .18s ease; align-self:center; line-height:1;
}
.gg-pill.is-active{ background:#f2f2f7 !important; border-color:#e9e9ee !important; color:#111 !important }
.gg-pill-under,.gg-pill-price{ color:#4a4a55 !important; font-weight:500 !important }
.gg-p-options--left .gg-pill-wrap{
  position:relative; display:inline-flex; flex-direction:column; align-items:center; justify-content:flex-end;
  height:38px; padding-top:2px; padding-bottom:24px;
}
.gg-p-options--left .gg-pill-under{ position:absolute; left:50%; transform:translateX(-50%); bottom:2px; white-space:nowrap; pointer-events:none }

/* Right column (content) */
.gg-capsule-right{ position:relative }
.gg-p-title{ margin:0 0 12px; font-size:28px; line-height:1.2; font-weight:900; color:#111 }
.gg-p-desc,.gg-p-short{ font-size:15px; color:#6f6d92; line-height:1.55; margin:6px 0 14px }
.gg-p-short p{ margin:0 }
.gg-p-short a{ color:#6C5CE7; text-decoration:none }

/* Controls row (legacy) */
.gg-p-controls{ display:grid; grid-template-columns:1fr auto; gap:16px; align-items:start }
.gg-p-buy{ display:inline-flex; align-items:center; gap:14px }
.gg-total{ font-weight:500; font-size:16px; color:#4a4a55; margin-right:12px; min-width:92px; text-align:right }
.gg-qty{
  display:inline-flex; align-items:stretch; border:1px solid #e9e9ee; border-radius:10px; overflow:hidden; background:#fff; margin-left:8px;
}
.gg-qty__btn{ appearance:none; border:none; background:#fff; padding:6px 14px; font-size:16px; font-weight:800; color:#2a2756; cursor:pointer; line-height:1; user-select:none; display:inline-flex; align-items:center; justify-content:center }
.gg-qty__btn:hover{ background:#f4f2ff }
.gg-qty__val{ min-width:46px; padding:6px 12px; text-align:center; font-size:16px; font-weight:700; color:#2a2756; border-left:1px solid #e9e9ee; border-right:1px solid #e9e9ee; display:inline-flex; align-items:center; justify-content:center }

/* Misc tweaks */
.gg-capsule-right form.cart .price,
.gg-capsule-right .cart .price,
.gg-capsule-right .single_variation .price{ display:none !important }
.gg-capsule input[type="number"]::-webkit-inner-spin-button,
.gg-capsule input[type="number"]::-webkit-outer-spin-button{ -webkit-appearance:none; margin:0 }
.gg-capsule input[type="number"]{ -moz-appearance:textfield }
.gg-capsule .qty-btn:hover{ background:#f2f2f7 !important }
.gg-capsule .gg-tab:hover,.gg-capsule .gg-tab.is-active{ background:#f2f2f7; color:#111 }
.gg-capsule .gg-tab:focus-visible{ outline:none;  border-radius:inherit }

/* =========================
   Single product flat style
   ========================= */
.single-product .gg-capsule{
  background:#fff !important; border:1px solid #e9e9ee !important; border-radius:18px !important; box-shadow:none !important; padding-bottom:24px;
}
.single-product .gg-cat-media{ border-radius:17px 17px 0 0 !important; box-shadow:none !important }
.single-product .gg-cat-media::before,.single-product .gg-cat-media::after{ content:none !important }
.single-product .gg-cat-list{ box-shadow:none !important }
.single-product .gg-cat-media::after{ content:none !important; background:none !important }
.single-product .gg-cat-media,.single-product .gg-cat-media img{ background:none !important; filter:none !important; mix-blend-mode:normal !important; opacity:1 !important }

/* =========================
   Single product (moved inline styles)
   ========================= */
.gg-capsule.gg-capsule--single{
  max-width:660px; margin:38px auto 0; padding:0 0 28px;
  background:#fff; box-shadow:0 2px 17px rgba(98,108,113,.09); border-radius:22px;
}
.gg-cat-media--single{ aspect-ratio:3/1; overflow:hidden; border-radius:18px 18px 0 0 }
.gg-cat-media__img{ width:100%; height:100%; object-fit:cover; display:block; border-radius:18px 18px 0 0 }
.gg-cat-media__stub{ height:172px; background:#f6f7ff }

/* Inner content padding (both simple and variable) */
.gg-cat-list--single{
  padding:24px 20px 20px;
  display:flex; flex-direction:column; align-items:flex-start; gap:18px;
}
@media (min-width:769px){
  .gg-cat-list--single{ padding:32px 36px 24px }
}

/* Title */
.gg-p-wrap{ width:100% }
.gg-p-title--single{ font-size:2rem; line-height:1.2; font-weight:900; color:#111; margin:0 0 18px; text-align:center; }
@media (max-width:768px){.gg-p-title--single{font-size: 20px;}}

/* Variation tabs */
.gg-variation-group{ margin-bottom:8px; text-align:center }
.gg-tabs--single{
  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;
}
.gg-variation-option{
  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; position:relative;
}
.gg-variation-option .gg-tab__sep{ content:""; position:absolute; left:0; top:8px; bottom:8px; width:1px; background:#e9e9ee }
.gg-variation-select.gg-visually-hidden{
  position:absolute; width:1px; height:1px; padding:0; margin:0; border:0; clip:rect(0 0 0 0); clip-path:inset(50%); overflow:hidden; white-space:nowrap;
}

/* Short description */
.gg-p-short{ color:#6f6d92; font-size:15px; line-height:1.55; margin:0 0 18px }

/* ATC row (simple + variable) */
.single_variation_wrap .single_variation{ display:none }
.gg-atc-row{ display:flex; align-items:center; gap:12px; flex-wrap:nowrap; justify-content:center }
.gg-product-qty{
  display:inline-flex; align-items:stretch; border:1px solid #e9e9ee; border-radius:8px; overflow:hidden; background:#fff;
}
.gg-qty-minus,.gg-qty-plus{
  appearance:none; border:0; background:#fff; padding:5px 9px; font-size:14px; font-weight:700; color:#111; cursor:pointer; line-height:1; user-select:none;
  transition:background-color .18s ease;
}
.gg-qty-input{
  width:45px; text-align:center; border:0; border-left:1px solid #e9e9ee; border-right:1px solid #e9e9ee; padding:5px 4px; font-size:13px; font-weight:600; color:#111; background:#fff;
  -moz-appearance:textfield; appearance:textfield;
}

/* Price + button */
.gg-variation-price{ font-size:1.35rem; color:#111; font-weight:700; min-width:90px; text-align:center }
.gg-unit-price{ font-size:1.35rem; color:#111; font-weight:700; min-width:90px; text-align:center }
.single_add_to_cart_button.button.alt{
  background:#6C5CE7; color:#fff; border-radius:10px; padding:12px 24px; font-size:16px; font-weight:700; border:0; flex:0 0 auto; min-width:180px;
  opacity:.5; cursor:not-allowed;
}
.single_add_to_cart_button.button.alt:enabled{ opacity:1; cursor:pointer }

.gg-atc-row .button { font-size:16px !important; font-weight:700 !important; 
  border:1px solid #E1E1EE !important; font-weight: 500 !important; 
  font-size: 15px !important; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #f2f2f7 !important;
}

/* =========================
   Mobile adaptations
   ========================= */
@media (max-width:768px){
  /* Capsule */
  .gg-capsule{ padding:10px !important; margin:16px auto !important; box-shadow:0 8px 24px rgba(110,90,230,0.10) !important }
  .gg-capsule-inner{ padding:12px !important; border-radius:20px !important; box-shadow:0 6px 18px rgba(17,16,102,0.07) !important; grid-template-columns:1fr !important; gap:14px !important }

  /* Gallery */
  .woocommerce-product-gallery,
  .woocommerce-product-gallery__wrapper,
  .woocommerce-product-gallery__image{ width:100% !important; max-width:100% !important; margin:0 auto !important; overflow:hidden !important; border-radius:12px }
  .woocommerce-product-gallery__image img{ display:block !important; width:92% !important; max-width:92% !important; height:auto !important; object-fit:contain !important; object-position:center center !important; margin:0 auto !important }

  /* Left column reset */
  .gg-capsule-left{ width:100% !important; max-width:100% !important; padding:0 !important; margin:0 auto !important; overflow:hidden !important }
  .gg-capsule-left > .gg-p-options--left{
    position:static !important; transform:none !important; width:100% !important; max-width:100% !important;
    margin:12px auto 0 !important; padding:0 10px !important; display:flex !important; justify-content:center !important; align-items:flex-end !important;
    gap:10px 12px !important; flex-wrap:nowrap !important; overflow-x:auto !important; -webkit-overflow-scrolling:touch; box-sizing:border-box;
  }

  /* Single header without paddings */
  .single-product .gg-capsule{ padding:0 !important; border-radius:16px !important }
  .single-product .gg-cat-media{
    position:relative !important; display:block !important; width:100% !important; height:160px !important;
    aspect-ratio:auto !important; overflow:hidden !important; border-radius:18px 18px 0 0 !important; margin:0 !important;
  }
  .single-product .gg-cat-media img{ width:100% !important; height:100% !important; object-fit:cover !important; margin:0 !important }
  .single-product .woocommerce-product-gallery,
  .single-product .woocommerce-product-gallery__wrapper,
  .single-product .woocommerce-product-gallery__image{
    margin:0 !important; padding:0 !important; width:100% !important; max-width:100% !important; border-radius:18px 18px 0 0 !important; overflow:hidden !important;
  }
  .single-product .woocommerce-product-gallery__image img{ width:100% !important; max-width:100% !important; height:100% !important; object-fit:cover !important; margin:0 !important }

  /* ATC row wrap + full-width button (simple + variable) */
  .gg-atc-row{ flex-wrap:wrap !important; justify-content:center !important; gap:12px !important }
  .gg-atc-row .single_add_to_cart_button,
  .gg-atc-row .button{ flex-basis:100% !important; width:100% !important; }

  /* Variation tabs compact */
  .gg-tabs.gg-tabs--single{ border-width:1px }
  .gg-variation-option{
    font-size:13px !important; padding:6px 10px !important; line-height:1 !important;
    white-space:nowrap !important; overflow:hidden !important; text-overflow:ellipsis !important; min-height:30px;
  }
  .gg-variation-option .gg-tab__sep{ top:6px; bottom:6px }

  /* Price smaller by 3px */
  .gg-variation-price,.gg-unit-price{ font-size:calc(1.35rem - 3px) !important; line-height:1.1 }
  .gg-unit-suffix{ font-size:.9em }
}

/* Visual balance: page container paddings like homepage */
@media (max-width:720px){
  .single-product .container{ padding-left:0px; padding-right:0px; box-sizing:border-box }
}


/* Скрыть визуальный выбор первого атрибута на карточке товара */
.single-product .gg-variation-group-first {
  display:none !important;
}

/* Базовый тост уже есть, добавим модификатор для "закончился" */
.gg-toast.gg-toast--warning .gg-toast__inner{
  background:transparent;
  color:#4a3210;
}


/* контейнер по центру */
.gg-out-of-stock-wrap {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

/* базовое состояние disabled-кнопки */
.gg-out-of-stock-btn {
  cursor: default;          /* или not-allowed, как больше нравится */
  opacity: 0.6;
  pointer-events: none;     /* чтобы вообще не ловила события */
}

/* выключаем подсветку при ховере/фокусе у кнопки "Товар закончился" */
.gg-out-of-stock-btn:hover,
.gg-out-of-stock-btn:focus,
.gg-out-of-stock-btn:active {
  background-color: inherit;    /* или конкретный цвет, как в базовом .button */
  color: inherit;
  box-shadow: none;
}

/* Обёртка заголовка */
.gg-p-wrap{
  width:100%;
  text-align:center;
}

/* Заголовок товара — контейнер для иконки и подсказки */
.gg-p-title.gg-p-title--single{
  position:relative;
  display:inline-block;
  font-size:2rem;
  line-height:1.2;
  font-weight:900;
  color:#111;
  margin:0 0 18px;
}

/* Кнопка с вопросом (по умолчанию серая) */
.gg-title-help{
  display:inline-flex;
  justify-content:center;
  align-items:center;
  width:26px;
  height:26px;
  margin-left:8px;
  border-radius:10px;
  border:none;
  cursor:pointer;

  background:#f2f2f7;
  color:#888;
  font-size:14px;
  line-height:1;
  padding:0;

  vertical-align:middle;       /* по вертикали к тексту */
  transform:translateY(-1px);  /* тонкая подстройка по высоте */
}

/* Активная кнопка (когда подсказка открыта) — жёлтая */
.gg-title-help.is-active{
  background:rgba(255, 214, 102, 0.18);
  color:#F5A623;
}

/* Всплывающий блок с подсказкой */
.gg-title-help-box{
  position:absolute;
  top:100%;
  left:50%;
  transform:translateX(-50%);
  margin-top:6px;
  z-index:50;

  padding:10px 16px;
  min-width:360px;
  max-width:420px;

  border-radius:12px;
  border:1px solid rgba(0,0,0,.06);
  background:#fff;

  font-size:13px;
  line-height:1.5;
  font-weight:400;
  color:#555;
  text-align:center;
  box-shadow:0 6px 18px rgba(0,0,0,.06);
}

/* Обёртка заголовка и контента */
.gg-p-wrap{
  width:100%;
  /* убираем text-align:center отсюда */
}

/* Центруем только заголовок */
.gg-p-title.gg-p-title--single{
  position:relative;
  display:inline-block;
  font-size:2rem;
  line-height:1.2;
  font-weight:900;
  color:#111;
  margin:0 0 18px;
  text-align:center;          /* центрируем текст заголовка */
}


@media (max-width:768px) { 
  .gg-p-title.gg-p-title--single{ font-size:21px; }
  .gg-p-short p { font-size: 13px; }
}

/* Для всего текста описания возвращаем выравнивание по левому краю */
.gg-p-short,
.gg-p-desc,
.single-product .product .summary,
.single-product .gg-cat-list--single{
  text-align:left;
}
