/* Сторінка товару — нова дизайн-система (novo-*), серпень 2026.
   Токени/шапка/футер/кошик-дровер уже в novo.css (підключений глобально
   в head.blade.php) — тут лише блоки, унікальні для /product/{uri}.
   Опт-вкладки/сходинки з макета навмисно НЕ перенесені: у товару в БД
   ОДНА ціна на ОДНУ фасовку, немає варіантів/тарифних сходинок — гілка
   "додати пізніше". Рейтинг/відгуки теж прибрані — на сайті немає системи
   відгуків (ні в БД, ні в коді), показувати вигадані цифри не варто. */

.product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
/* Грід-айтеми за спеком мають min-width:auto (= min-content) — .gallery
   містить <img> у скрол-контейнері, чий min-content, попри overflow-x:auto
   на самому .gallery-scroll, все одно роздував ТРЕК ГРІДА (обидва .gallery
   і .product-info, бо на мобайлі вони діляють ОДИН track 1fr) до ~1240px
   замість viewport-ширини — звідси й "з'їжджав" увесь page-wrap/футер. */
.product-layout > .gallery, .product-layout > .product-info { min-width: 0; }
@media (max-width: 767px) { .product-layout { grid-template-columns: 1fr; } }

/* ── Галерея ── */
.gallery { position: sticky; top: 100px; }
@media (max-width: 767px) { .gallery { position: static; } }

.gallery-main {
  border-radius: var(--r); overflow: hidden; background: var(--white);
  box-shadow: var(--shadow-md); aspect-ratio: 1; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.gallery-scroll { display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; width: 100%; height: 100%; -webkit-overflow-scrolling: touch; touch-action: pan-y pinch-zoom; }
.gallery-scroll::-webkit-scrollbar { display: none; }
/* -webkit-user-drag/-webkit-touch-callout — без цього дотик по <img>
   інколи перехоплюється браузером як "перетягнути/зберегти зображення"
   замість горизонтального скролу контейнера (типова пастка для
   touch-галерей із overflow-x:auto). */
.gallery-scroll img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: contain; padding: 0; scroll-snap-align: center; -webkit-user-drag: none; -webkit-touch-callout: none; user-select: none; }

.gallery-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; background: var(--white);
  border: 1.5px solid var(--border); box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--dark); transition: var(--tr); padding: 0;
}
.gallery-arrow:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.gallery-arrow--prev { left: 12px; }
.gallery-arrow--next { right: 12px; }
@media (max-width: 640px) { .gallery-arrow { width: 32px; height: 32px; } }

.gallery-badge-wrap { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 4px; z-index: 2; }
.gb { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 100px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; }
.gb-sale { background: #ff0e7d linear-gradient(90deg, #ff4747, #ff0e7d); color: #fff; }

.video-btn {
  position: absolute; bottom: 14px; right: 14px; width: 44px; height: 44px;
  background: var(--white); border-radius: 50%; border: 1.5px solid var(--border);
  box-shadow: var(--shadow-md); display: flex; align-items: center; justify-content: center;
  color: var(--primary); font-size: 20px; transition: var(--tr); z-index: 2; padding: 0;
}
.video-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; overflow-y: hidden; }
.gallery-thumbs::-webkit-scrollbar { display: none; }
.thumb {
  width: 70px; height: 70px; border-radius: var(--r-xs); overflow: hidden; flex-shrink: 0;
  background: var(--white); border: 1.5px solid var(--border); cursor: pointer; transition: var(--tr); padding: 0;
}
.thumb.active { border-color: var(--primary); }
.thumb:hover { border-color: #c0d8f0; }
.thumb img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.thumb-vid { display: flex; align-items: center; justify-content: center; color: var(--mid); font-size: 18px; }
.thumb-vid:hover { color: var(--primary); border-color: var(--primary); }

/* ── Product info ── */
.product-info { display: flex; flex-direction: column; gap: 0; }

.product-meta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.badge-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 100px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.bp-stock { background: var(--green-bg); color: #1f9b5e; border: 1px solid #d4f0e2; }
.bp-stock::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--green); display: block; }
.bp-id { background: var(--light); color: var(--mid); border: 1px solid var(--border); }
.bp-opt { background: #fff8ee; color: #c47a00; border: 1px solid #fce8cd; }
.bp-opt::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #f0a800; display: block; }
.bp-out { background: #fff1f1; color: var(--red); border: 1px solid #ffd9dc; }

/* font-weight:800!important — легасі-бандл (novoplast-style.css →
   minifyx cache) містить сайтове правило "h1,h2,h3{font-weight:400
   !important}"; тег h1 у нас саме тут, тому без !important цей
   заголовок завжди програвав би легасі-скиду ваги шрифту. */
.product-title { font-size: 22px; font-weight: 800 !important; line-height: 1.3; color: var(--dark); letter-spacing: -.4px; margin: 0 0 10px; }
@media (max-width: 640px) { .product-title { font-size: 19px; } }

.pspecs-inline { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.pspec-chip { font-size: 11.5px; font-weight: 600; color: var(--mid); background: var(--light); padding: 4px 10px; border-radius: 100px; }
.pspec-chip b { color: var(--dark); }

/* ── Purchase box (pbox) ── */
.pbox { background: var(--white); border-radius: var(--r); box-shadow: var(--shadow-md); padding: 20px; margin-bottom: 14px; }
.price-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.price-main { font-size: 32px; font-weight: 800; line-height: 1; color: var(--dark); }
/* position/top/vertical-align:baseline — легасі-бандл (Bootstrap reboot
   "sub,sup{position:relative;vertical-align:baseline} sup{top:-.5em}")
   ламає звичайну браузерну поведінку <sup>, на яку розраховував макет;
   скидаємо назад до природного vertical-align:super. */
.price-main sup { font-size: 15px; font-weight: 700; margin-left: 2px; position: static; top: auto; vertical-align: super; }
.price-main.on-request { font-size: 20px; }
.price-old-line { font-size: 14px; color: var(--mid); text-decoration: line-through; }
.price-per { font-size: 13px; color: var(--mid); font-weight: 600; }
.price-pack { font-size: 12.5px; color: var(--mid); margin-bottom: 14px; }
.price-pack strong { color: var(--dark); }

.buy-row { display: flex; gap: 10px; }
.buy-row form, .buy-row > .btn-add { flex: 1; min-width: 0; }
.buy-row .card-stepper { flex: 1; }
.qty-box { display: flex; align-items: center; flex-shrink: 0; background: var(--light); border: 1px solid transparent; border-radius: var(--r-xs); padding: 4px; height: 48px; transition: var(--tr); box-sizing: border-box; }
.qty-btn { width: 40px; height: 40px; flex-shrink: 0; background: #fff; border: 1px solid var(--border); border-radius: 6px; display: flex; align-items: center; justify-content: center; color: var(--dark); transition: var(--tr); padding: 0; outline: none; box-sizing: border-box; }
@media (hover: hover) { .qty-btn:hover { background: #f4f4f6; } }
.qty-btn:active { transform: scale(.92); }
.qty-btn:disabled { opacity: .35; cursor: default; }
.qty-btn .icon-trash3 { fill: var(--mid); }
.qty-val { width: 44px; min-width: 0; text-align: center; font-size: 15px; font-weight: 800; color: var(--dark); background: none; border: none; outline: none; font-family: inherit; -moz-appearance: textfield; padding: 0; }
.qty-val::-webkit-outer-spin-button, .qty-val::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Товар вже в кошику — той самий зелений контракт, що й .card-stepper
   картки каталогу (public/novo.css), лише вищі розміри під purchase-box. */
.qty-box--in-cart { background: var(--green); border-color: var(--green); }
.qty-box--in-cart .qty-btn { border-color: transparent; }
.qty-box--in-cart .qty-btn .icon-trash3 { fill: var(--mid); }
.qty-box--in-cart .qty-val { color: #fff; }

.btn-call { width: 100%; height: 46px; margin-top: 10px; background: none; border: 1.5px solid var(--border); border-radius: var(--r-xs); color: var(--dark); font-size: 13.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; transition: var(--tr); text-decoration: none; }
.btn-call:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }

.hl-bar { background: #fff8ee; border: 1px solid #ffe3bd; color: #a15c00; font-size: 12.5px; font-weight: 600; padding: 10px 14px; border-radius: var(--r-xs); margin-bottom: 14px; }

/* Реактивний степпер/кнопка "В кошик" усередині pbox — той самий
   .card-add[data-line-id]/.card-stepper/.btn-add контракт з cart.js
   (картка каталогу), тут лише вищі розміри під контекст purchase-box. */
.pbox .card-add { width: 100%; }
.pbox .btn-add { height: 48px; font-size: 15px; }
/* "Вже в кошику" — зелена, як .btn-buy.added у макеті (не синя btn-add) */
.pbox .btn-add.btn-add--in-cart { background: var(--green); }
.pbox .btn-add.btn-add--in-cart:hover { background: #25b376; }
.pbox .card-stepper { height: 48px; padding: 4px; }
.pbox .cs-btn { width: 40px; height: 40px; }
.pbox .cs-qty { font-size: 15px; }

.trust { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.trust-item { display: flex; gap: 9px; align-items: flex-start; }
.ticon { font-size: 17px; line-height: 1.2; }
.ttext { display: flex; flex-direction: column; }
.ttext strong { font-size: 12px; font-weight: 700; color: var(--dark); }
.ttext span { font-size: 11px; color: var(--mid); }

.mgr { display: flex; flex-direction: column; gap: 10px; background: var(--light); border-radius: var(--r-xs); padding: 12px 14px; }
.mgr-top { display: flex; align-items: center; gap: 10px; }
.mgr-ava { width: 38px; height: 38px; border-radius: 50%; background: var(--primary-soft); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; color: var(--primary); }
.mgr-info { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.mgr-info strong { font-size: 12.5px; font-weight: 700; color: var(--dark); }
.mgr-info span { font-size: 11.5px; color: var(--mid); }
/* Підписані пілюлі (варіант 3 з макета) — по одній на канал зв'язку, рівна ширина на всю картку */
.mgr-channels { display: flex; gap: 7px; }
.mgr-channel { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; background: var(--white); border: 1px solid var(--border); border-radius: var(--r-xs); padding: 9px 6px; font-size: 11.5px; font-weight: 700; color: var(--dark); text-decoration: none; transition: var(--tr); }
/* Явний override — базовий a:hover{text-decoration:underline} у novo.css специфічніший
   за голий .mgr-channel{text-decoration:none} (тег+псевдоклас б'є клас), інакше "просвічує" (28.07 [[feedback_css_specificity_scope_leak]]) */
.mgr-channel:hover, .mgr-channel:focus { text-decoration: none; }
.mgr-channel .icon { flex-shrink: 0; }
.mgr-channel-telegram .icon { color: #20a4e2; }
.mgr-channel-viber .icon { color: #9a5aca; }
.mgr-channel-phone .icon { color: var(--green); }
@media (hover: hover) {
    .mgr-channel-telegram:hover { border-color: #20a4e2; }
    .mgr-channel-viber:hover { border-color: #9a5aca; }
    .mgr-channel-phone:hover { border-color: var(--green); }
}

/* ── Delivery card (на всю ширину) ── */
.delivery-card { background: var(--white); border-radius: var(--r); padding: 24px; box-shadow: var(--shadow-md); margin-top: 28px; }
.info-list { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 24px; margin: 0; padding: 0; }
@media (max-width: 640px) { .info-list { grid-template-columns: 1fr; } }
.info-item { display: flex; align-items: flex-start; gap: 13px; }
.info-icon { width: 40px; height: 40px; flex-shrink: 0; background: var(--primary-soft); border-radius: var(--r-xs); display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 18px; }
.info-title { font-weight: 700; font-size: 13.5px; color: var(--dark); margin-bottom: 3px; }
.info-desc { font-size: 12.5px; color: var(--mid); line-height: 1.5; margin: 0; }

/* ── Tabs ── */
.tabs-section { border-top: 1px solid var(--border); margin-top: 32px; }
.tabs-bar { display: flex; gap: 0; border-bottom: 2px solid var(--border); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs-bar::-webkit-scrollbar { display: none; }
.tab-btn { padding: 14px 22px; font-size: 14px; font-weight: 700; color: var(--mid); border-bottom: 2px solid transparent; margin-bottom: -2px; cursor: pointer; transition: var(--tr); white-space: nowrap; background: none; border-left: none; border-right: none; border-top: none; }
.tab-btn.active { color: var(--dark); border-bottom-color: var(--primary); }
.tab-btn:hover { color: var(--dark); }
.tab-content { padding-top: 28px; display: none; }
.tab-content.active { display: block; }

.desc-text { font-size: 14px; line-height: 1.8; color: var(--dark2); max-width: 760px; }
.desc-text h1, .desc-text h2, .desc-text h3 { font-size: 16px; font-weight: 800 !important; color: var(--dark); margin: 22px 0 10px; }
.desc-text > :first-child { margin-top: 0; }
.desc-text ul, .desc-text ol { padding-left: 18px; display: flex; flex-direction: column; gap: 7px; margin: 12px 0; }
.desc-text li::marker { color: var(--primary); }
.desc-text p { margin: 0 0 12px; }

.specs-table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; max-width: 680px; }
.specs-table tr:nth-child(even) { background: var(--light); }
.specs-table td { padding: 12px 18px; font-size: 13.5px; border-bottom: 1px solid var(--border); }
.specs-table tr:last-child td { border-bottom: none; }
.specs-table td:first-child { font-weight: 600; color: var(--mid); width: 40%; }
.specs-table td:last-child { color: var(--dark); font-weight: 700; }

/* "Схожі товари" тепер той самий .prow-section/.novo-card, що й на головній
   (спільні стилі в novo.css) — розмітка в product.blade.php. */

@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.fadeup { animation: fadeUp .35s ease both; }
