/* =====================================================
   CJTrader — Product View Page (redesign v2)
   ===================================================== */

/* ── Page wrapper ── */
.pv-page-wrap {
  max-width: 1280px;
  margin: 1.5rem auto;
  padding: 0 1.5rem;
}

/* ── Back button ── */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: #fff;
  font-size: .88rem;
  font-weight: 700;
  background: #C9A84C;
  border: 2px solid #C9A84C;
  border-radius: 8px;
  padding: .5rem 1.1rem;
  text-decoration: none;
  margin-bottom: .75rem;
  transition: background .2s, border-color .2s;
  box-shadow: 0 2px 8px rgba(201,168,76,.25);
}
.btn-back:hover { background: #A8873A; border-color: #A8873A; color: #fff; }

/* ── Breadcrumbs ── */
.breadcrumbs {
  background: linear-gradient(90deg, #C9A84C 0%, #A8873A 100%);
  border-radius: 10px;
  padding: .55rem 1.1rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 10px rgba(201,168,76,.25);
}
.breadcrumb { margin: 0; }
.breadcrumb-item a { color: #fff; font-size: .85rem; font-weight: 600; text-decoration: none; }
.breadcrumb-item a:hover { color: #FEF3C7; }
.breadcrumb-item.active { color: rgba(255,255,255,.85); font-size: .85rem; font-weight: 500; }
.breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.6); }

/* ── Main grid ── */
.pv-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}

/* ═══════════════════════════
   LEFT COLUMN
═══════════════════════════ */

/* Main photo */
.pv-main-photo {
  position: relative;
  background: #fff;
  border: 1px solid #E8E3D9;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pv-main-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: zoom-in;
  display: block;
}
.pv-photo-counter {
  position: absolute;
  left: .7rem; top: .7rem;
  background: rgba(0,0,0,.55);
  color: #fff;
  padding: .2rem .6rem;
  border-radius: .4rem;
  font-size: .78rem;
  font-weight: 700;
  z-index: 3;
}
.pv-zoom-btn {
  position: absolute;
  right: .7rem; top: .7rem;
  background: rgba(0,0,0,.5);
  border: none;
  color: #fff;
  border-radius: 50%;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  z-index: 3;
}

/* Кнопки навигации ← → на главном фото */
.pv-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.45);
  border: none;
  color: #fff;
  width: 38px; height: 56px;
  border-radius: 6px;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 4;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
  -webkit-tap-highlight-color: transparent;
}
.pv-nav-btn:hover { background: rgba(0,0,0,.7); }
.pv-nav-prev { left: .5rem; }
.pv-nav-next { right: .5rem; }
@media (max-width: 600px) {
  .pv-nav-btn { width: 32px; height: 48px; font-size: 1.6rem; }
}

/* Badges on photo */
.pv-badges {
  position: absolute;
  top: 0; left: 0;
  display: flex;
  gap: .3rem;
  padding: .5rem;
  z-index: 2;
}
.pvb {
  padding: .35rem .7rem;
  border-radius: 6px;
  color: #fff;
  font-weight: 800;
  font-size: .85rem;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.pvb-sale  { background: #16A34A; font-size: 1rem; padding: .45rem .85rem; }
.pvb-new   { background: #DC2626; }
.pvb-promo { background: #2563EB; }

/* Thumbnails */
.pv-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .75rem;
}
.pv-thumb {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid #E8E3D9;
  transition: border-color .2s;
}
.pv-thumb:hover { border-color: #C9A84C; }
.pv-thumb.active { border-color: #C9A84C; box-shadow: 0 0 0 2px rgba(201,168,76,.3); }
/* ── Video thumbnails ── */
.pv-thumb-video {
  width: 80px;
  height: 60px;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid #E8E3D9;
  transition: border-color .2s;
  position: relative;
  display: inline-flex;
  overflow: hidden;
  flex-shrink: 0;
}
.pv-thumb-video:hover { border-color: #C9A84C; }
.pv-thumb-video.active { border-color: #C9A84C; box-shadow: 0 0 0 2px rgba(201,168,76,.3); }
.pv-thumb-video video { width:100%; height:100%; object-fit:cover; pointer-events:none; }
.pv-vid-badge {
  position: absolute;
  bottom: 3px; left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 10px;
  pointer-events: none;
}

/* ── Main video player ── */
#mainVideo {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 8px;
  display: block;
  margin: auto;
}


/* Title */
.pv-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #1A1A1A;
  line-height: 1.3;
  margin: .8rem 0 .5rem;
}

/* Stats row */
.pv-stats {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  margin-bottom: .5rem;
}
.pv-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: #fff;
  border: 1px solid #E8E3D9;
  border-radius: 20px;
  padding: .28rem .7rem;
  font-size: .82rem;
  color: #6B7280;
}
.btn-like {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  transition: transform .15s;
  padding: 0;
}
.btn-like.liked { color: #DC2626; transform: scale(1.2); }
.pv-share-btn { cursor: pointer; background: #fff; font-size: .82rem; color: #6B7280; }
.pv-share-btn:hover { border-color: #C9A84C; color: #C9A84C; }

/* Stars */
.pv-stars-pill { gap: .3rem; }
.pv-stars { color: #F59E0B; font-size: 1rem; letter-spacing: .05em; }
.pv-stars-val { font-weight: 700; color: #1A1A1A; }
.pv-stars-cnt { color: #9CA3AF; font-size: .78rem; }
.pv-no-reviews { font-style: italic; }

/* ── Tabs ── */
.pv-tabs-wrap { margin-top: 1rem; }
.pv-tabs {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 0;
  border-bottom: 2px solid #E8E3D9;
}
.pv-tabs li { }
.pv-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: .6rem 1.1rem;
  font-size: .88rem;
  font-weight: 600;
  color: #6B7280;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.pv-tab:hover { color: #C9A84C; }
.pv-tab.active { color: #C9A84C; border-bottom-color: #C9A84C; }
.pv-tab-badge {
  display: inline-block;
  background: #E8E3D9;
  color: #6B7280;
  border-radius: 10px;
  padding: .1rem .45rem;
  font-size: .72rem;
  font-weight: 700;
  margin-left: .3rem;
}

.pv-tab-content {
  background: #fff;
  border: 1px solid #E8E3D9;
  border-top: none;
  border-radius: 0 0 10px 10px;
  padding: 1.25rem;
}
.pv-section-title { font-size: .95rem; font-weight: 700; color: #1A1A1A; margin-bottom: .75rem; }
.pv-desc-text { font-size: .88rem; color: #374151; line-height: 1.65; }
.pv-desc-list { padding-left: 1.2rem; margin: 0; }
.pv-desc-list li { margin-bottom: .25rem; color: #6B7280; font-size: .85rem; }

/* Feedback form (comments / reviews) */
.pv-feedback-form {
  background: #F9F6F0;
  border: 1px solid #E8E3D9;
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  margin-top: .5rem;
}
.pv-ff-row {
  display: flex;
  gap: .75rem;
  align-items: center;
  flex-wrap: wrap;
}
.pv-feedback-form input[type="text"],
.pv-feedback-form textarea {
  width: 100%;
  padding: .6rem .9rem;
  border: 1px solid #E8E3D9;
  border-radius: 8px;
  font-size: .88rem;
  background: #fff;
  color: #1A1A1A;
  box-sizing: border-box;
  transition: border-color .2s;
}
.pv-feedback-form input[type="text"] { flex: 1; width: auto; min-width: 160px; }
.pv-feedback-form input:focus,
.pv-feedback-form textarea:focus { border-color: #C9A84C; outline: none; box-shadow: 0 0 0 3px rgba(201,168,76,.1); }
.pv-anon-label { font-size: .82rem; color: #6B7280; white-space: nowrap; cursor: pointer; display: flex; align-items: center; gap: .35rem; }
.pv-ff-btn {
  background: #1A1A1A;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: .7rem 1.5rem;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  align-self: flex-start;
  transition: background .2s;
}
.pv-ff-btn:hover { background: #374151; }
.pv-ff-btn-review { background: #C9A84C; }
.pv-ff-btn-review:hover { background: #A8873A; }

/* Star picker in review form */
.pv-star-pick {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.pv-sp-label { font-size: .82rem; color: #6B7280; }
.pv-sp-star { font-size: 1.3rem; color: #D1C4A8; cursor: pointer; transition: color .15s; }
.pv-sp-star.active { color: #F59E0B; }

/* ═══════════════════════════
   RIGHT COLUMN
═══════════════════════════ */

.pv-right { position: sticky; top: 84px; display: flex; flex-direction: column; gap: .9rem; }

/* Price box */
.pv-price-box {
  background: #fff;
  border: 1.5px solid #E8E3D9;
  border-radius: 14px;
  padding: 1.25rem;
}
.pv-price-old {
  font-size: 1rem;
  color: #9CA3AF;
  text-decoration: line-through;
  font-weight: 500;
  margin-bottom: .15rem;
}
.pv-price-now {
  font-size: 2rem;
  font-weight: 900;
  color: #1A1A1A;
  line-height: 1.1;
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.pv-disc-badge {
  background: #DCFCE7;
  color: #16A34A;
  border: 1px solid #86EFAC;
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 800;
  padding: .2rem .55rem;
}
.pv-price-saving {
  font-size: .9rem;
  font-weight: 700;
  color: #DC2626;
  margin-top: .25rem;
}
.pv-price-usd {
  font-size: .8rem;
  color: #9CA3AF;
  margin-top: .2rem;
  margin-bottom: .75rem;
}

/* Trust items */
.pv-trust {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  margin: .75rem 0 1rem;
}
.pv-trust-item {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: .82rem;
  font-weight: 600;
  color: #374151;
}
.pv-ti { font-size: 1rem; flex-shrink: 0; }

/* Add to cart button */
.pv-btn-cart {
  width: 100%;
  background: linear-gradient(135deg, #C9A84C 0%, #A8873A 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 800;
  padding: 1rem;
  cursor: pointer;
  transition: opacity .2s, transform .1s;
  margin-bottom: .5rem;
  box-shadow: 0 4px 16px rgba(201,168,76,.35);
  letter-spacing: .02em;
}
.pv-btn-cart:hover { opacity: .9; transform: translateY(-1px); }
.pv-btn-cart:active { transform: translateY(0); }
.pv-btn-cart.in-cart { background: #1A1A1A; box-shadow: none; }

/* Checkout link */
.pv-btn-checkout {
  display: block;
  width: 100%;
  text-align: center;
  border: 2px solid #C9A84C;
  color: #C9A84C;
  border-radius: 10px;
  font-size: .95rem;
  font-weight: 700;
  padding: .75rem;
  text-decoration: none;
  transition: background .2s, color .2s;
  box-sizing: border-box;
}
.pv-btn-checkout:hover { background: #C9A84C; color: #fff; }

/* Info cards (right panel) */
.pv-info-card {
  background: #fff;
  border: 1px solid #E8E3D9;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  font-size: .85rem;
}
.pv-ic-title {
  font-size: .9rem;
  font-weight: 700;
  color: #1A1A1A;
  margin: 0 0 .6rem;
}
.pv-ic-row {
  display: flex;
  align-items: center;
  gap: .4rem;
  color: #374151;
  margin-bottom: .35rem;
  font-size: .85rem;
}
.pv-ic-label { font-weight: 700; color: #1A1A1A; }
.pv-ic-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.pv-ic-list li {
  padding: .2rem 0;
  border-bottom: 1px solid #F3EFE8;
  font-size: .85rem;
  color: #374151;
}
.pv-ic-list li:last-child { border-bottom: none; }
.pv-format-dot {
  width: 6px; height: 6px;
  background: #C9A84C;
  border-radius: 50%;
  flex-shrink: 0;
}
.pv-ic-sub { font-size: .8rem; color: #6B7280; margin: 0 0 .6rem; }

/* Free demo card */
.pv-free-demo { background: #F0FFF4; border-color: #86EFAC; }
.pv-btn-free {
  display: block;
  background: #16A34A;
  color: #fff;
  border-radius: 8px;
  padding: .65rem;
  text-align: center;
  font-weight: 700;
  font-size: .88rem;
  text-decoration: none;
  transition: background .2s;
}
.pv-btn-free:hover { background: #15803D; color: #fff; }

/* ═══════════════════════════
   RESPONSIVE
═══════════════════════════ */
@media (max-width: 992px) {
  .pv-grid { grid-template-columns: 1fr; }
  .pv-right { position: static; }
}
@media (max-width: 600px) {
  .pv-page-wrap { padding: 0 .75rem; }
  .pv-price-now { font-size: 1.6rem; }
  .pv-thumb { width: 64px; height: 48px; }
  .pv-title { font-size: 1.15rem; }
}

/* ── Like burst animation ── */
.like-burst {
  position: absolute; width: 40px; height: 40px;
  left: 50%; top: 50%;
  transform: translate(-50%,-50%) scale(1);
  background: radial-gradient(circle, #ff557a 20%, transparent 70%);
  opacity: .7; border-radius: 50%;
  animation: burst .6s ease-out forwards;
  pointer-events: none;
}
@keyframes burst {
  0%   { transform: translate(-50%,-50%) scale(.3); opacity: 1; }
  100% { transform: translate(-50%,-50%) scale(2);  opacity: 0; }
}

/* ── Zoom modal ── */
.carousel-control-prev-icon,
.carousel-control-next-icon { filter: invert(0); }

/* ── Review / comment items (ajax) ── */
.review-item, .comment-item {
  border: 1px solid #E8E3D9;
  border-radius: 10px;
  padding: .85rem 1rem;
  margin-bottom: .6rem;
  background: #fff;
  font-size: .88rem;
}
.review-item .ri-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .4rem; }
.review-item .ri-stars { color: #F59E0B; font-size: 1rem; }
.review-item .ri-name { font-weight: 700; color: #1A1A1A; }
.review-item .ri-date { font-size: .75rem; color: #9CA3AF; }
.review-item .ri-text { color: #374151; line-height: 1.55; }

/* ── Below-product sections (related / recently viewed) ── */
/* ── Diamond divider ── */
.diamond-divider {
  display: flex;
  align-items: center;
  width: 100%;
  margin: 8.5rem 0 ;
}
.diamond-divider::before,
.diamond-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #D9D0C5;
}
.diamond-divider::before { margin-right: 14px; }
.diamond-divider::after  { margin-left:  14px; }
.diamond-divider .dd-shape {
  width: 50px;
  height: 50px;
  background: #c9a84c;
  transform: rotate(45deg);
  flex-shrink: 0;
}

.pv-below-wrap {
  max-width: 1280px;
  margin: 0 auto 2rem;
  padding: 0 1.5rem;
  /* override global container flex */
  display: block !important;
  width: 100%;
  box-sizing: border-box;
}
.pv-below-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #1A1A1A;
  margin: 2rem 0 .9rem;
  padding-left: .75rem;
  border-left: 4px solid #C9A84C;
}
.pv-mini-grid {
  display: grid !important;
  grid-template-columns: repeat(6, 1fr);
  gap: .75rem;
  width: 100%;
  align-items: start;
}
@media (max-width: 1100px) { .pv-mini-grid { grid-template-columns: repeat(4,1fr) !important; } }
@media (max-width:  700px) { .pv-mini-grid { grid-template-columns: repeat(3,1fr) !important; } }
@media (max-width:  480px) { .pv-mini-grid { grid-template-columns: repeat(2,1fr) !important; } }

.pv-mini-card {
  background: #fff;
  border: 1px solid #E8E3D9;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex !important;
  flex-direction: column;
  transition: box-shadow .2s, transform .15s;
  width: 100%;
}
.pv-mini-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); transform: translateY(-2px); }

.pv-mini-img {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 75%; /* 4:3 ratio */
  overflow: hidden;
  background: #F9F6F0;
  flex-shrink: 0;
}
.pv-mini-img img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}
.pv-mini-card:hover .pv-mini-img img { transform: scale(1.05); }
.pv-mini-badge {
  position: absolute; top:.35rem; left:.35rem; z-index:2;
  background: #16A34A; color:#fff;
  font-size:.62rem; font-weight:800; padding:.12rem .38rem; border-radius:4px;
}
.pv-mini-body { padding:.55rem .65rem; }
.pv-mini-name {
  font-size:.72rem; font-weight:700; color:#1A1A1A; line-height:1.3; margin-bottom:.3rem;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.pv-mini-old { font-size:.68rem; color:#9CA3AF; text-decoration:line-through; line-height:1.2; }
.pv-mini-price { font-size:.82rem; font-weight:800; color:#1A1A1A; }

/* ── Фото клиента в форме отзыва ── */
.pv-photo-upload-wrap { margin: .6rem 0; }
.pv-photo-upload-label {
  display: inline-flex; align-items: center; gap: .5rem;
  cursor: pointer; font-size: .82rem; color: #666;
  border: 1.5px dashed #ccc; border-radius: 8px;
  padding: .45rem .85rem; transition: border-color .2s;
}
.pv-photo-upload-label:hover { border-color: #c9a84c; color: #c9a84c; }
.pv-photo-upload-input { display: none; }
.pv-photo-preview { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .4rem; }
.pv-photo-preview img {
  width: 60px; height: 60px; object-fit: cover;
  border-radius: 6px; border: 1.5px solid #e0e0e0;
}
