/* N1ceStudio — product page */
.product-section { padding: 60px 0 80px; }
.product-close {
  position: absolute; top: 16px; right: 24px; z-index: 30;
  width: 48px; height: 48px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(10, 12, 16, 0.5); border: 2px solid rgba(244, 63, 94, 0.65); color: #f43f5e;
  cursor: pointer; font-family: inherit;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease, border-color .2s ease;
  backdrop-filter: blur(4px);
}
.product-close:hover {
  background: rgba(244, 63, 94, 0.14);
  border-color: #f43f5e; color: #fff;
  transform: rotate(90deg) scale(1.06);
  box-shadow: 0 0 22px rgba(244, 63, 94, 0.55);
}
.product-close svg { transition: transform .2s ease; }
.product-close:hover svg { transform: rotate(90deg); }
.crumb { color: var(--text-dim); font-size: 13px; margin-bottom: 16px; }
.crumb a { color: var(--accent-2); }
.product-wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: start; position: relative; }
.product-close { top: 0; right: -8px; }
.product-media-col { position: sticky; top: 100px; height: calc(100vh - 160px); min-height: 320px; min-width: 0; }
.product-media { border-radius: 18px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--border); height: 100%; width: 100%; min-width: 0; position: relative; }
.product-media img.gallery-main { width: 100%; height: 100%; object-fit: contain; display: block; background: #0d0f1a; max-height: none; }
.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border);
  background: rgba(10,12,16,0.6); color: #fff; font-size: 26px; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background .15s ease, opacity .15s ease; opacity: 0; font-family: inherit;
}
.product-media:hover .gallery-nav { opacity: 1; }
.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }
.gallery-nav:hover { background: rgba(41,98,255,0.85); }
.gallery-thumbs-wrap { display: flex; align-items: center; gap: 6px; margin-top: 12px; max-width: 100%; }
.gallery-thumbs { display: flex; gap: 10px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; -ms-overflow-style: none; padding: 2px; }
.gallery-thumbs::-webkit-scrollbar { display: none; }
.gallery-thumb-scroll {
  flex: 0 0 auto; width: 30px; height: 72px; border-radius: 10px;
  border: 1px solid var(--border); background: rgba(255,255,255,.04); color: #fff;
  font-size: 20px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s ease, border-color .15s ease; font-family: inherit;
}
.gallery-thumb-scroll:hover { background: rgba(41,98,255,.15); border-color: rgba(41,98,255,.5); }
.gallery-thumb-scroll:disabled { opacity: .3; cursor: default; }
.gallery-thumb {
  flex: 0 0 72px; width: 72px; height: 72px; border-radius: 12px; overflow: hidden;
  border: 2px solid var(--border); background: var(--bg-2); padding: 0; cursor: pointer;
  transition: border-color .15s ease; display: block;
}
.gallery-thumb.active { border-color: #00b4ff; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumbs:has(> .gallery-thumb:nth-child(2)) { display: flex; }
.product-media-col:has(.gallery-thumbs) { height: auto; min-height: 320px; min-width: 0; }
.product-media-col:has(.gallery-thumbs) .product-media { height: calc(100vh - 300px); min-height: 280px; min-width: 0; }
.product-media-col:has(.gallery-thumbs) img.gallery-main { height: 100%; }
.product-cat {
  display: inline-block; padding: 6px 14px; background: rgba(41,98,255,0.15);
  border: 1px solid rgba(41,98,255,0.3); border-radius: 100px; font-size: 11px;
  font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #00b4ff; margin-bottom: 16px;
}
.product-title { font-size: 34px; font-weight: 800; line-height: 1.1; margin-bottom: 10px; }
.product-badge {
  display: inline-block; vertical-align: middle; margin-left: 10px;
  padding: 4px 12px; border-radius: 100px; font-size: 12px; font-weight: 800; letter-spacing: .03em;
  color: #fff; background: linear-gradient(135deg, #a855f7, #6366f1);
  box-shadow: 0 4px 14px rgba(168,85,247,.35);
}
.product-short { color: var(--text-dim); font-size: 16px; margin-bottom: 18px; }
.product-price-row { display: flex; align-items: baseline; gap: 12px; margin: 18px 0 10px; }
.product-price { font-size: 36px; font-weight: 900; background: linear-gradient(135deg,#4a7cff,#a855f7); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.product-old { font-size: 20px; color: #f50d0d; text-decoration: line-through; }
.product-buy-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 16px; }
.buy-note { margin-top: 16px; color: var(--text-dim); font-size: 14px; }
.buy-note.success { color: #4ade80; }
.product-desc { margin-top: 32px; color: var(--text-dim); line-height: 1.75; font-size: 15px; white-space: pre-line; }
.product-desc h1, .product-desc h2, .product-desc h3 { color: #fff; margin: 20px 0 8px; }
.product-desc ul { padding-left: 22px; margin: 8px 0; }
.product-desc li { margin: 5px 0; }
.product-desc strong { color: #fff; }
.product-desc p { margin-bottom: 12px; }

/* --- Лайки и комментарии --- */
.product-purchases {
  display: inline-flex; align-items: center; gap: 8px; align-self: center;
  padding: 8px 14px; border-radius: 100px;
  background: rgba(74,222,128,.08); border: 1px solid rgba(74,222,128,.25);
  color: #b6ecc8; font-size: 13.5px; font-weight: 500;
}
.product-purchases b { color: #4ade80; font-weight: 800; }
.prod-purch-ico { font-size: 15px; line-height: 1; }
.product-social { display: flex; gap: 12px; margin: 22px 0 0; flex-wrap: wrap; align-items: center; }
.product-like-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 100px; cursor: pointer;
  background: rgba(255,255,255,.05); border: 1px solid var(--border);
  color: var(--text-dim); font-size: 15px; font-weight: 600; transition: all .25s;
  font-family: 'Inter', sans-serif;
}
.product-like-btn:hover { border-color: rgba(244,63,94,.5); color: #fff; }
.product-like-btn.liked { background: rgba(244,63,94,.15); border-color: rgba(244,63,94,.6); color: #fff; }
.like-icon { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform .2s, fill .2s; flex-shrink: 0; }
.product-like-btn.liked .like-icon { fill: #f43f5e; stroke: #f43f5e; animation: pop .3s ease; }
@keyframes pop { 0% { transform: scale(1); } 50% { transform: scale(1.4); } 100% { transform: scale(1); } }
.product-comment-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 100px; cursor: pointer;
  background: rgba(255,255,255,.05); border: 1px solid var(--border);
  color: var(--text-dim); font-size: 15px; font-weight: 600; transition: all .25s;
  font-family: 'Inter', sans-serif;
}
.product-comment-toggle:hover { border-color: rgba(41,98,255,.5); color: #fff; }

.product-comments {
  margin-top: 40px; padding: 32px; background: #0d0f1a;
  border: 1px solid var(--border); border-radius: 20px;
}
.comments-title { font-size: 22px; font-weight: 800; margin-bottom: 20px; color: #fff; }
.comments-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.comment-item {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px; padding: 16px 18px;
}
.comment-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.comment-head b { color: #fff; font-size: 14px; }
.comment-loyalty-ico { width: 15px; height: 15px; object-fit: contain; margin-left: 6px; vertical-align: middle; }
.comment-loyalty-name { color: var(--text-dim); font-size: 12px; margin-left: 4px; vertical-align: middle; }
.comment-date { color: var(--text-dim); font-size: 12px; margin-left: auto; }
.comment-text { color: #c0c5e0; font-size: 14px; line-height: 1.6; word-break: break-word; }
.comments-form { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.comments-form textarea {
  flex: 1; min-width: 220px; background: rgba(255,255,255,.04);
  border: 1px solid var(--border); border-radius: 12px; color: #fff;
  padding: 12px 14px; font-size: 14px; font-family: 'Inter', sans-serif; resize: vertical;
}
.comments-form textarea:focus { outline: none; border-color: rgba(41,98,255,.5); }
.comments-auth-note { width: 100%; font-size: 13px; color: var(--text-dim); }
.muted { color: var(--text-dim); font-size: 14px; }

/* Рейтинг товара */
.product-rating { display: flex; align-items: center; gap: 12px; margin: 14px 0; flex-wrap: wrap; }
.rating-stars { display: inline-flex; align-items: center; gap: 2px; }
.rating-stars .star {
  cursor: pointer; font-size: 26px; line-height: 1; color: rgba(255,255,255,.18);
  transition: transform .12s ease, color .12s ease; user-select: none;
}
.rating-stars .star.on { color: #ffc53d; }
.rating-stars .star:hover { transform: scale(1.15); color: #ffc53d; }
.star-clear {
  cursor: pointer; margin-left: 6px; font-size: 16px; line-height: 1; color: rgba(255,255,255,.18);
  opacity: 0; transition: opacity .12s ease, color .12s ease; user-select: none;
}
.star-clear.on { opacity: 1; }
.star-clear:hover { color: #ff5a5a; }
.rating-info { font-size: 14px; }
.rating-note { width: 100%; font-size: 13px; color: var(--text-dim); }

/* Голосование и ответы на комментарии */
.comment-actions { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.cvote {
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer; border: none;
  background: rgba(255,255,255,.04); color: var(--text-dim); font-size: 13px; font-family: inherit;
  padding: 4px 10px; border-radius: 999px; transition: color .12s ease, background .12s ease;
}
.cvote span { font-weight: 600; min-width: 14px; text-align: center; }
.cvote:hover { color: #fff; background: rgba(255,255,255,.1); }
.cvote-up.active { color: #4c8dff; background: rgba(76,141,255,.14); }
.cvote-down.active { color: #ff5a5a; background: rgba(255,90,90,.14); }
.c-reply {
  cursor: pointer; background: none; border: none; color: #4c8dff; font-size: 13px;
  font-family: inherit; padding: 4px 8px; border-radius: 8px;
}
.c-reply:hover { text-decoration: underline; }
.c-del {
  cursor: pointer; background: none; border: none; color: var(--text-dim); font-size: 12px;
  font-family: inherit; padding: 2px 6px; margin-left: auto; border-radius: 6px; transition: color .12s ease;
}
.c-del:hover { color: #ff5a5a; }
.comment-replies { margin: 12px 0 0 22px; padding-left: 14px; border-left: 2px solid rgba(255,255,255,.08); }
.comment-replies .comment-item { margin-bottom: 12px; }
.reply-form { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; flex-wrap: wrap; }
.reply-form textarea {
  flex: 1; min-width: 200px; background: rgba(255,255,255,.04);
  border: 1px solid var(--border); border-radius: 10px; color: #fff;
  padding: 10px 12px; font-size: 14px; font-family: 'Inter', sans-serif; resize: vertical;
}
.reply-form textarea:focus { outline: none; border-color: rgba(41,98,255,.5); }

/* Кнопка «Поделиться» */
.product-buy-row .btn[data-share] { cursor: pointer; }
.product-buy-row .btn[data-share].shared {
  color: #3ddc84; border-color: rgba(61,220,132,.5); background: rgba(61,220,132,.1);
}

@media (max-width: 860px) { .product-wrap { grid-template-columns: 1fr; } .product-media-col, .product-media-col:has(.gallery-thumbs) { position: static; height: auto; min-height: 0; } .product-media, .product-media img.gallery-main, .product-media-col:has(.gallery-thumbs) .product-media { height: auto; max-height: none; } .product-media img.gallery-main, .product-media-col:has(.gallery-thumbs) .gallery-main { max-height: none; } .gallery-nav { opacity: 1; } }