/* Claude v3: блок покупки, основные параметры, отметки и доставка на карточке и в быстром просмотре (inc/pdp-buy-v3.php). Токены — hub.css. */

/* Отметки лота: только данные (純正, материал, сезон, разные оси). Красный не используется — он у действия и SOLD. */
.hg-store .hg-sticker{display:inline-flex;align-items:center;gap:4px;min-height:24px;box-sizing:border-box;padding:2px 9px;border-radius:999px;background:var(--hg-soft);color:var(--hg-ink);box-shadow:inset 0 0 0 1px var(--hg-line);font-size:12px;font-weight:700;line-height:1.3;white-space:nowrap}
.hg-store .hg-sticker svg{flex:none}
.hg-store .hg-sticker[data-sticker=oem]{background:#fbf2dc;color:#634400;box-shadow:inset 0 0 0 1px #e8d29a}
.hg-store .hg-sticker[data-sticker=forged]{background:#202327;color:#f4f2ee;box-shadow:none}
.hg-store .hg-sticker[data-sticker=steel]{background:#eceef0;color:#33373c;box-shadow:inset 0 0 0 1px #d5d9de}
.hg-store .hg-sticker[data-sticker=season-winter]{background:#e7f1fa;color:#14496f;box-shadow:inset 0 0 0 1px #c6dcee}
.hg-store .hg-sticker[data-sticker=season-summer]{background:#fcefe4;color:#813a04;box-shadow:inset 0 0 0 1px #f0d3ba}
.hg-store .hg-sticker:is([data-sticker=season-mt],[data-sticker=season-at]){background:#edf0e2;color:#465019;box-shadow:inset 0 0 0 1px #d6dbbc}
html[data-theme=dark] .hg-store .hg-sticker[data-sticker=oem]{background:#3a2f14;color:#f6d27e;box-shadow:inset 0 0 0 1px #5c4a1f}
html[data-theme=dark] .hg-store .hg-sticker[data-sticker=forged]{background:#f1efea;color:#16181a}
html[data-theme=dark] .hg-store .hg-sticker[data-sticker=steel]{background:#2b2e32;color:#dfe2e5;box-shadow:inset 0 0 0 1px #3d4146}
html[data-theme=dark] .hg-store .hg-sticker[data-sticker=season-winter]{background:#16293a;color:#a9d3f5;box-shadow:inset 0 0 0 1px #24415a}
html[data-theme=dark] .hg-store .hg-sticker[data-sticker=season-summer]{background:#3a2414;color:#ffc59a;box-shadow:inset 0 0 0 1px #573620}
html[data-theme=dark] .hg-store .hg-sticker:is([data-sticker=season-mt],[data-sticker=season-at]){background:#2a2f18;color:#d3dca2;box-shadow:inset 0 0 0 1px #414a24}
.hg-store .jp-product-meta{flex-wrap:wrap;row-gap:6px}

/* Основные параметры: строки «метка …… значение»; на ширине от 460 px — две колонки, заполнение по столбцам (шины слева, диски справа) */
.hg-store .hg-keyspecs{container-type:inline-size;margin:14px 0 2px}
.hg-store .hg-keyspecs dl{display:grid;grid-template-columns:minmax(0,1fr);margin:0}
.hg-store .hg-keyspecs dl>div{display:grid;grid-template-columns:auto minmax(14px,1fr) auto;align-items:baseline;column-gap:8px;min-width:0;padding:4px 0}
.hg-store .hg-keyspecs dl>div::before{content:"";grid-column:2;grid-row:1;align-self:end;margin-bottom:.42em;border-bottom:1px dotted color-mix(in srgb,var(--hg-muted) 60%,transparent)}
.hg-store .hg-keyspecs dt{grid-column:1;grid-row:1;margin:0;color:var(--hg-muted);font-size:13px;font-weight:500;line-height:1.5;white-space:nowrap}
.hg-store .hg-keyspecs dd{grid-column:3;grid-row:1;min-width:0;margin:0;color:var(--hg-ink);font-size:14px;font-weight:700;line-height:1.5;text-align:right;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
@container (min-width:460px){.hg-store .hg-keyspecs dl{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(var(--rows,4),auto);grid-auto-flow:column;column-gap:28px}}
.hg-store .hg-keyspecs__all{display:inline-flex;align-items:center;gap:4px;min-height:32px;margin-top:2px;color:var(--hg-ink);font-size:13px;font-weight:700;text-decoration:underline;text-decoration-color:var(--hg-red);text-underline-offset:3px}

/* Блок покупки */
.hg-store .hg-buy{position:relative;margin:14px 0 0;padding:16px 18px;border:1px solid var(--hg-line);border-radius:14px;background:var(--hg-white)}
.hg-store .hg-buy p{margin:0}
.hg-store .hg-buy__head{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"label stock" "price price" "unit unit";align-items:center;column-gap:12px}
.hg-store .hg-buy__label{grid-area:label;color:var(--hg-muted);font-size:13px;font-weight:700;line-height:1.45}
.hg-store .hg-buy__stock.hg-stock{grid-area:stock;justify-self:end}
.hg-store .hg-buy__price{grid-area:price;display:flex;flex-wrap:wrap;align-items:baseline;column-gap:8px;margin-top:2px!important;line-height:1.15}
.hg-store .hg-buy__price strong{color:var(--hg-ink);font-size:clamp(30px,2.5vw,36px);font-weight:800;letter-spacing:-.01em;font-variant-numeric:tabular-nums}
.hg-store .hg-buy__price .gtyres-pack-tax{color:var(--hg-muted);font-size:13px;font-weight:600}
.hg-store .hg-buy__price.is-request strong{font-size:20px}
.hg-store .hg-buy__unit{grid-area:unit;margin-top:3px!important;color:var(--hg-muted);font-size:13px;line-height:1.5;font-variant-numeric:tabular-nums}
.hg-store .hg-buy__form{margin:14px 0 0}
.hg-store .hg-buy__fixed{display:flex;align-items:center;gap:7px;margin:0 0 10px!important;color:var(--hg-ink);font-size:13px;font-weight:600;line-height:1.5}
.hg-store .hg-buy__fixed::before{content:"";flex:none;width:18px;height:18px;border-radius:50%;background:var(--hg-ok-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23157a3c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center/12px no-repeat}
.hg-store .hg-buy__qty{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 12px;padding:0;border:0;min-width:0}
.hg-store .hg-buy__qty legend{float:left;margin:0 6px 0 0;padding:0;color:var(--hg-muted);font-size:13px;font-weight:700}
.hg-store .hg-buy__qty label{position:relative;display:inline-flex}
.hg-store .hg-buy__qty input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.hg-store .hg-buy__qty span{display:inline-flex;align-items:center;min-height:42px;padding:6px 18px;border:1px solid var(--hg-line);border-radius:999px;color:var(--hg-ink);font-size:14px;font-weight:700;transition:border-color .15s ease,box-shadow .15s ease}
.hg-store .hg-buy__qty input:checked+span{border-color:var(--hg-ink);box-shadow:inset 0 0 0 1px var(--hg-ink)}
.hg-store .hg-buy__qty input:focus-visible+span{outline:2px solid var(--hg-red);outline-offset:2px}
.hg-store .hg-buy .jp-button{width:100%;min-height:50px;height:auto;margin:0;padding:12px 16px;justify-content:center;gap:8px;white-space:normal;text-align:center}
.hg-store .hg-buy .jp-button svg{flex:none;width:20px;height:20px}
.hg-store .hg-buy__ask.jp-button{margin-top:8px;min-height:46px}
.hg-store .hg-buy__sold{margin:12px 0 10px!important;color:var(--hg-ink);font-size:14px;line-height:1.7}
.hg-store .hg-buy__fine{margin-top:10px!important;color:var(--hg-muted);font-size:12px;line-height:1.6}

/* Доставка: префектура → регион тарифа, сумма — тот же расчёт, что на /delivery/ */
.hg-store .hg-buy-ship{margin:14px 0 0;padding:12px 0 0;border-top:1px solid var(--hg-line)}
.hg-store .hg-buy-ship__row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:8px 12px}
.hg-store .hg-buy-ship__title{display:inline-flex;align-items:center;gap:6px;color:var(--hg-ink);font-size:13px;font-weight:700;white-space:nowrap}
.hg-store .hg-buy-ship__to{display:block;min-width:0;margin:0}
.hg-store .hg-buy-ship select{display:block;width:100%;min-width:0;min-height:40px;margin:0;padding:6px 28px 6px 10px;border:1px solid var(--hg-line);border-radius:8px;background-color:var(--hg-white);color:var(--hg-ink);font-size:14px;line-height:1.3;text-overflow:ellipsis}
.hg-store .hg-buy-ship select:focus-visible{outline:2px solid var(--hg-red);outline-offset:2px}
.hg-store .hg-buy-ship__price{color:var(--hg-ink);font-size:16px;font-weight:800;white-space:nowrap;font-variant-numeric:tabular-nums}
.hg-store .hg-buy-ship__note{display:flex;flex-wrap:wrap;gap:2px 10px;margin-top:6px!important;color:var(--hg-muted);font-size:12px;line-height:1.55}
.hg-store .hg-buy-ship__note a{color:var(--hg-ink);font-weight:700;text-decoration:underline;text-decoration-color:var(--hg-red);text-underline-offset:3px}
.hg-store .hg-buy-ship__note [data-hg-ship-plan]:empty{display:none}
.hg-store .hg-buy-ship__total{margin:6px 0 0!important;color:var(--hg-ink);font-size:14px;font-weight:700;line-height:1.5;font-variant-numeric:tabular-nums}
.hg-store .hg-buy-ship__total[hidden]{display:none}
@media (max-width:480px){
  .hg-store .hg-buy{padding:14px 14px 13px}
  .hg-store .hg-buy-ship__row{grid-template-columns:minmax(0,1fr) auto}
  .hg-store .hg-buy-ship__title{grid-column:1/-1}
}
html[data-theme=dark] .hg-store .hg-buy__fixed::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2369d391' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E")}
@media (prefers-reduced-motion:reduce){.hg-store .hg-buy__qty span{transition:none}}

/* Быстрый просмотр: варианты с превью (переключение в том же окне) и плотнее блок цены */
.hg-qv-variants{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0 0 14px}
.hg-qv-variant{display:grid;grid-template-columns:44px minmax(0,1fr);align-items:center;gap:4px 8px;min-width:0;min-height:60px;box-sizing:border-box;margin:0;padding:7px 8px;border:1px solid var(--hg-line);border-radius:10px;background:var(--hg-white);color:var(--hg-ink);font:inherit;text-align:left;cursor:pointer;transition:border-color .15s ease,transform .15s ease}
@media (hover:hover){.hg-qv-variant:not(.is-current):hover{border-color:var(--hg-ink);transform:translateY(-1px)}}
.hg-qv-variant:focus-visible{outline:2px solid var(--hg-red);outline-offset:2px}
.hg-qv-variant.is-current{border-color:var(--hg-red);box-shadow:inset 0 0 0 1px var(--hg-red);cursor:default}
.hg-qv-variant__thumb{grid-row:1/span 2;width:44px;height:44px;border-radius:8px;overflow:hidden;background:var(--hg-soft)}
.hg-qv-variant__thumb img{display:block;width:100%;height:100%;object-fit:cover}
.hg-qv-variant__text{display:grid;gap:1px;min-width:0}
.hg-qv-variant__type{font-size:11.5px;font-weight:700;line-height:1.3;word-break:keep-all;overflow-wrap:anywhere}
.hg-qv-variant.is-current .hg-qv-variant__type{color:var(--hg-red)}
.hg-qv-variant__price{font-size:13px;font-weight:800;line-height:1.3;font-variant-numeric:tabular-nums;white-space:nowrap}
.hg-qv-variant__sold{grid-column:2;justify-self:start;padding:1px 7px;border-radius:999px;background:var(--hg-ink);color:var(--hg-paper);font-size:10.5px;font-weight:700;line-height:1.5}
.hg-qv-info .hg-qv-code{margin-bottom:12px}
.hg-qv-info .hg-qv-specs{margin-bottom:14px}
.hg-qv-info .hg-qv-tags .hg-sticker{min-height:22px;font-size:11.5px}
.hg-buy--qv{margin:0!important;padding:14px 16px!important}
.hg-buy--qv .hg-buy__price strong{font-size:30px}
.hg-buy--qv .hg-buy__form{margin-top:12px}
@media (max-width:480px){.hg-qv-variants{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}.hg-qv-variant{min-height:52px}}
@media (prefers-reduced-motion:reduce){.hg-qv-variant{transition:none}}
/* плитки: линии между клетками тенью, пустое место последней строки — цвет фона, а не серой подложки */
.hg-qv-info .hg-qv-specs{gap:0;background:var(--hg-white)}
.hg-qv-info .hg-qv-specs>div{box-shadow:1px 0 0 var(--hg-line),0 1px 0 var(--hg-line)}
