/* ================= Карточка товара ================= */
.g-prodpage{padding-bottom:20px}
.g-prod{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(360px,.85fr);gap:28px;align-items:start;margin-top:6px}

/* галерея */
.g-prod-gallery.row{display:grid!important;grid-template-columns:92px minmax(0,1fr);gap:14px;margin:0!important;padding:0;background:none;border:0;align-items:start;--bs-gutter-x:0}
.g-prod-gallery .product-gallery{display:flex!important;flex-direction:column;gap:10px;width:auto!important;max-width:none!important;padding:0!important;flex:none}
.g-prod-gallery .product-gallery .image{height:92px!important;width:92px;border:1.5px solid var(--line);border-radius:14px;background:#fff center/contain no-repeat;cursor:pointer;transition:.15s;margin:0}
.g-prod-gallery .product-gallery .image:hover{border-color:#9db6e6}
.g-prod-gallery .product-gallery .image.active{border:2px solid var(--accent)!important;box-shadow:0 4px 14px rgba(22,100,245,.18)}
.g-prod-gallery .product-image{width:auto!important;max-width:none!important;padding:0!important}
.g-prod-gallery .product-image .image{height:clamp(320px,38vw,560px)!important;border:1px solid var(--line);border-radius:22px;background:#fff center/contain no-repeat;box-shadow:0 10px 36px rgba(22,60,140,.07)}

/* покупка */
.g-buy{display:grid;gap:14px;position:sticky;top:92px}
.g-buy-card{background:#fff;border:1px solid var(--line);border-radius:22px;padding:24px;box-shadow:0 10px 36px rgba(22,60,140,.08)}
.g-brand-tag{display:inline-block;font-family:var(--head);font-weight:800;font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:var(--accent);background:#e4edff;padding:5px 12px;border-radius:8px}
.g-buy-card h1{font-size:clamp(21px,2vw,28px);line-height:1.2;font-weight:800;margin:12px 0 8px}
.g-buy-meta{display:flex;gap:14px;flex-wrap:wrap;align-items:center;color:var(--muted);font-size:13.5px;margin-bottom:16px}
.g-buy-meta b{color:var(--ink);font-weight:700}
.g-order-note{background:#fff7e8;border:1px solid #fde5b6;color:#7a4b00;padding:4px 10px;border-radius:8px;font-weight:600;font-size:12.5px}
.g-buy-price{font-family:var(--head);font-weight:800;font-size:clamp(32px,3.2vw,44px);line-height:1.1;color:var(--ink);margin:4px 0 18px;font-variant-numeric:tabular-nums}
.g-buy-price span{color:inherit}
.g-buy-onreq{font-size:clamp(22px,2.2vw,28px)}
.g-buy-onreq small{display:block;font-family:var(--font);font-weight:500;font-size:13.5px;color:var(--muted);margin-top:6px}
.g-buy-actions{display:flex;gap:10px;align-items:center}
.g-buy-actions .btn-brand{flex:1;height:56px;font-size:16px!important;display:flex;align-items:center;justify-content:center}
.g-buy-actions .favorite-icon{flex:none;width:56px;height:56px;border-radius:14px;border:1.5px solid var(--line);display:grid;place-items:center;font-size:26px;color:var(--muted);cursor:pointer;transition:.15s;background:#fff}
.g-buy-actions .favorite-icon:hover{border-color:#e0245e;color:#e0245e}
.g-buy-actions .favorite-icon[name="heart"]{color:#e0245e;border-color:#f3b6c6;background:#fff3f6}
.g-ask{display:flex;align-items:center;justify-content:center;gap:10px;height:48px;margin-top:10px;border:1.5px solid var(--line);border-radius:14px;font-family:var(--head);font-weight:700;font-size:14px;color:var(--ink);transition:.15s}
.g-ask svg{color:#12a150}
.g-ask:hover{border-color:var(--accent);color:var(--accent)}

.g-perks{background:var(--soft);border:1px solid var(--line);border-radius:20px;padding:20px;display:grid;gap:18px}
.g-perk{display:flex;gap:14px;align-items:flex-start}
.g-perk>i{flex:none;width:44px;height:44px;border-radius:13px;background:#fff;border:1px solid var(--line);display:grid;place-items:center;color:var(--accent);font-style:normal}
.g-perk>div{min-width:0;flex:1}
.g-perk b{font-family:var(--head);font-size:15px;display:block;margin-bottom:6px}
.g-perk ul{list-style:none;margin:0 0 6px;padding:0;display:grid;gap:5px}
.g-perk li{display:flex;justify-content:space-between;gap:10px;font-size:13.5px;color:#33405a}
.g-perk li em{font-style:normal;font-weight:700;color:var(--accent);white-space:nowrap}
.g-perk small{color:var(--muted);font-size:12.5px}
.g-pay-list li{justify-content:flex-start;gap:8px}
.g-pay-list li::before{content:"";flex:none;width:16px;height:16px;border-radius:50%;margin-top:2px;background:var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center/11px no-repeat}
.g-perks .g-link-ext{padding-top:0}

/* описание + характеристики */
.g-prod-info{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:24px;margin-top:30px}
.g-prod-desc,.g-prod-specs{background:#fff;border:1px solid var(--line);border-radius:22px;padding:clamp(20px,2.4vw,32px)}
.g-prod-desc h2,.g-prod-specs h2{font-size:22px;font-weight:800;margin:0 0 16px;display:flex;align-items:center;gap:10px}
.g-prod-desc h2::before,.g-prod-specs h2::before{content:"";width:6px;height:22px;border-radius:3px;background:var(--accent)}
.g-desc-body{font-size:15.5px;line-height:1.7;color:#27334a;overflow-wrap:anywhere}
.g-desc-body h1,.g-desc-body h2,.g-desc-body h3,.g-desc-body h4{font-family:var(--head);margin:18px 0 8px;font-size:18px}
.g-desc-body ul,.g-desc-body ol{padding-left:1.3em}
.g-desc-body img{max-width:100%;height:auto;border-radius:12px}
.g-desc-body table{width:100%;display:block;overflow-x:auto}
.g-muted{color:var(--muted);margin:0}
.g-muted a{color:var(--accent);font-weight:600}
.g-spec-list{margin:0}
.g-spec-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;padding:12px 14px;border-radius:10px;font-size:14.5px}
.g-spec-row:nth-child(odd){background:var(--soft)}
.g-spec-row dt{color:var(--muted);font-weight:500}
.g-spec-row dd{margin:0;font-weight:700;font-family:var(--head);text-align:right;overflow-wrap:anywhere}

/* похожие товары */
.g-related{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.g-related .product{background:#fff;border:1px solid var(--line);border-radius:18px;padding:16px;transition:.2s}
.g-related .product:hover{border-color:#bcd0f5;box-shadow:0 14px 34px rgba(22,100,245,.13);transform:translateY(-3px)}
.g-related .product-image{height:160px;background-size:contain;background-repeat:no-repeat;background-position:center;margin-bottom:12px}
.g-related .product-name{font-family:var(--head);font-weight:700;font-size:14px;line-height:1.35;margin:0 0 8px;min-height:38px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.g-related .product-price{font-family:var(--head);font-weight:800;font-size:18px;margin:0}
.g-related .product-price.g-onrequest{font-size:13.5px;color:var(--muted);font-weight:700}

@media (max-width:1199px){.g-prod{grid-template-columns:minmax(0,1fr) 380px}.g-related{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:991px){
  .g-prod{grid-template-columns:1fr}
  .g-buy{position:static}
  .g-prod-info{grid-template-columns:1fr}
}
@media (max-width:640px){
  .g-prod-gallery.row{grid-template-columns:1fr}
  .g-prod-gallery .product-image{order:-1}
  .g-prod-gallery .product-gallery{flex-direction:row;overflow-x:auto;scrollbar-width:none}
  .g-prod-gallery .product-gallery .image{height:68px!important;width:68px;flex:none}
  .g-buy-card{padding:18px}
  .g-spec-row{grid-template-columns:1fr;gap:2px}
  .g-spec-row dd{text-align:left}
  .g-related{gap:10px}
}
.g-prod-gallery .product-image{width:100%!important;min-width:0}
.g-prod-gallery .product-image .image{width:100%!important;max-width:none!important}
@media (max-width:640px){
  .g-prod-gallery .product-gallery{flex-direction:row!important;flex-wrap:nowrap!important;overflow-x:auto;gap:8px;padding-bottom:4px!important}
  .g-prod-gallery .product-gallery .image{flex:0 0 68px!important;height:68px!important;width:68px!important}
}

/* выравнивание: верх галереи и карточки покупки на одной линии */
.g-prod-gallery .product-image{margin:0!important}
.g-prod-gallery .product-image .image{margin:0!important}
.g-prod-gallery.row.product{margin:0!important;padding:0!important}
.g-prod>.g-buy{margin-top:0}
@media (min-width:992px){.g-buy{top:96px}}
.g-prod-gallery .product-gallery .image{margin:0!important}
.g-prod-gallery .product-gallery{margin:0!important;align-self:start}
.g-prod-gallery .product-image{height:auto!important;display:block!important;margin:0!important}

/* счётчик фото и лёгкая анимация при листании */
.g-gal-count{position:absolute;right:12px;bottom:12px;background:rgba(16,25,43,.62);color:#fff;font:600 12.5px/1 var(--font);padding:6px 10px;border-radius:999px;letter-spacing:.02em;pointer-events:none}
@keyframes g-gal-in-l{from{opacity:.35;transform:translateX(26px)}to{opacity:1;transform:none}}
@keyframes g-gal-in-r{from{opacity:.35;transform:translateX(-26px)}to{opacity:1;transform:none}}
.g-prod-gallery .product-image .image.g-gal-l{animation:g-gal-in-l .26s ease}
.g-prod-gallery .product-image .image.g-gal-r{animation:g-gal-in-r .26s ease}
