/* ═══════════════════════════════════════
   PRODUCT PAGE
   ═══════════════════════════════════════ */

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 24px 0 0;
  flex-wrap: wrap;
}

.breadcrumb-item {
  font-size: 14px;
  font-weight: 400;
  color: var(--white-70);
  text-decoration: none;
  transition: color var(--transition);
  line-height: 1.3;
}

a.breadcrumb-item:hover { color: var(--white); }

.breadcrumb-current {
  color: var(--white);
  font-weight: 500;
}

.breadcrumb-sep {
  font-size: 14px;
  color: var(--white-40);
  flex-shrink: 0;
}

/* ── Product section ── */
.product-section { padding: 20px 0 0; }

/* ── Title row (inside .product-left) ── */
.product-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.product-h1 {
  font-family: 'Unbounded', 'RoadRadio', sans-serif;
  font-size: 28px;
  font-weight: 500;
  color: var(--white);
  line-height: 1.2;
  transition: color 0.3s;
  flex: 1;
  min-width: 0;
}

.btn-share {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

/* ── Price block (top of sidebar) ── */
.product-sidebar-price {
  flex-shrink: 0;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--white-14);
  border-radius: var(--r-l) var(--r-l) 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.3s;
}

.product-price-big {
  font-family: 'Unbounded', 'RoadRadio', sans-serif;
  font-size: 26px;
  font-weight: 500;
  color: var(--lime);
  line-height: 1.2;
  white-space: nowrap;
}

.product-price-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-offer-price {
  background: none;
  border: 1.5px solid var(--lime);
  border-radius: var(--r-xxl);
  padding: 8px 16px;
  color: var(--lime);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}

.btn-offer-price:hover  { background: rgba(178,239,44,0.1); }
.btn-offer-price:active { transform: scale(0.97); }

[data-theme="light"] .btn-offer-price {
  border-color: var(--purple);
  color: var(--purple);
}
[data-theme="light"] .btn-offer-price:hover { background: rgba(107,63,221,0.08); }

/* ── Two-column layout ── */
.product-layout {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin-bottom: 0;
}

/* ── Left column (title + gallery + params + map) ── */
.product-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ── Right column wrapper (sticky, contains above-card header + sidebar) ── */
.product-right {
  width: 333px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: calc(var(--header-h) + 32px);
  align-self: flex-start;
}

/* ── Above-sidebar row: offer btn + share icon (desktop only) ── */
.product-right-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  flex-shrink: 0;
}

.product-price-offer {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

/* ── Gallery ── */
.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.product-gallery-main {
  border-radius: var(--r-l);
  overflow: hidden;
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg-light);
  cursor: grab;
  user-select: none;
  transition: border-radius 0.3s;
}

.product-gallery-main:active { cursor: grabbing; }

/* Prev/Next arrows — desktop only */
.gallery-arrow {
  display: none;
}

@media (min-width: 861px) {
  .gallery-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.45);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
    padding: 0;
  }
  .gallery-arrow:hover { background: rgba(0, 0, 0, 0.72); }
  .gallery-arrow--prev { left: 10px; }
  .gallery-arrow--next { right: 10px; }
}

.product-gallery-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.product-gallery-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
}

.product-gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* ── Slide counter badge (shown on mobile only) ── */
.gallery-counter {
  display: none;
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 10, 18, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 20px;
  padding: 5px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--white);
  z-index: 2;
  pointer-events: none;
  letter-spacing: 0.02em;
}

.gallery-heart {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 48px;
  height: 48px;
  background: rgba(30,30,42,0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 50%;
  border: 1px solid var(--white-14);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  color: var(--white-70);
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform 0.12s;
  -webkit-tap-highlight-color: transparent;
}

.gallery-heart:hover  { background: rgba(139,93,246,0.7); color: var(--white); border-color: var(--purple); }
.gallery-heart:active { transform: scale(0.9); }
.gallery-heart.liked  { background: rgba(139,93,246,0.85); color: var(--white); border-color: var(--purple); }
.gallery-heart.liked path { fill: currentColor; }

[data-theme="light"] .gallery-heart {
  background: rgba(255,255,255,0.82);
  border-color: rgba(0,0,0,0.1);
  color: #1a1a2e;
}

.product-gallery-dots {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.gallery-dot {
  height: 10px;
  border-radius: 3px;
  background: rgba(217,217,217,0.35);
  transition: width 0.3s, background 0.3s;
  width: 10px;
  cursor: pointer;
  flex-shrink: 0;
  border: none;
  padding: 0;
}

.gallery-dot.active {
  width: 40px;
  background: var(--white);
}

[data-theme="light"] .gallery-dot        { background: rgba(0,0,0,0.2); }
[data-theme="light"] .gallery-dot.active { background: rgba(0,0,0,0.7); }

/* ── Sidebar card (sticky via .product-right parent) ── */
.product-sidebar {
  width: 100%;
  background: var(--bg-card);
  border-radius: var(--r-l);
  border: 1px solid var(--white-14);
  display: flex;
  flex-direction: column;
  transition: background 0.3s, border-color 0.3s;
}

/* Scrollable content area inside sidebar */
.product-sidebar-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 24px 24px 0;
}

.product-sidebar-scroll::-webkit-scrollbar { display: none; }

/* ── Sidebar seller wrapper ── */
.product-sidebar-seller {
  flex-shrink: 0;
  padding: 16px 24px;
  border-bottom: 1px solid var(--white-14);
  transition: border-color 0.3s;
}

/* Hide offer btn row in sidebar on desktop (it lives in .product-right-header) */
.product-sidebar-price .product-price-actions { display: none; }

/* ── Seller block ── */
.seller-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.seller-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Share button in seller block — only on mobile */
.btn-share-mobile { display: none; }

.seller-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
  cursor: pointer;
  border-radius: 10px;
  padding: 6px 8px;
  margin: -6px -8px;
  transition: background 0.18s;
}

.seller-info:hover {
  background: var(--white-08);
}

.seller-info:hover .seller-name {
  color: var(--purple);
}

.seller-info:hover .seller-avatar {
  background: rgba(139, 93, 246, 0.25);
}

.seller-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--white-14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--white);
  flex-shrink: 0;
  transition: background 0.3s;
}

.seller-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.seller-name {
  font-size: 14px;
  font-weight: 400;
  color: var(--white);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.3s;
}

.seller-name a {
  font-size: 14px;
  font-weight: 400;
  color: var(--white);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.3s;
}

.seller-stars {
  display: flex;
  gap: 2px;
  align-items: center;
}

.seller-stars svg {
  width: 13px;
  height: 13px;
  display: block;
  flex-shrink: 0;
}

.btn-subscribe {
  background: none;
  border: 1px solid var(--purple);
  border-radius: var(--r-xxl);
  padding: 8px 16px;
  color: var(--purple);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--transition), transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}

.btn-subscribe:hover  { background: rgba(139,93,246,0.12); }
.btn-subscribe:active { transform: scale(0.97); }

/* ── Description block ── */
.product-desc-block {
  display: flex;
  flex-direction: column;
  padding-bottom: 20px;
}

.product-desc-heading {
  font-family: 'Unbounded', 'RoadRadio', sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 12px;
  transition: color 0.3s;
  display: none; /* shown only on mobile via media query */
}

.product-desc {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: var(--white-70);
  line-height: 1.6;
  max-height: 120px;
  overflow: hidden;
  position: relative;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s;
}

.product-desc::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--bg-card));
  pointer-events: none;
  transition: opacity 0.3s;
}

.product-desc.expanded { max-height: 1000px; }
.product-desc.expanded::after { opacity: 0; }

.product-desc p { margin-bottom: 10px; }
.product-desc p:last-child { margin-bottom: 0; }

.btn-read-all {
  background: none;
  border: none;
  color: var(--purple);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 10px 0 0;
  text-align: left;
  width: fit-content;
  transition: color var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.btn-read-all:hover { color: #a078f8; }

/* ── Action buttons (pinned to bottom of sidebar) ── */
.product-actions {
  flex-shrink: 0;
  padding: 16px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--white-14);
  background: var(--bg-card);
  transition: border-color 0.3s, background 0.3s;
}

/* ── Report link at the bottom of sidebar ── */
.btn-report {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 4px 24px 14px;
  background: none;
  border: none;
  border-radius: 0 0 var(--r-l) var(--r-l);
  color: var(--white-40);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.btn-report:hover { color: var(--white-70); }
.btn-report:active { opacity: 0.7; }

/* ── Report reason list ── */
.report-reasons {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.report-reason {
  display: block;
  width: 100%;
  text-align: left;
  padding: 11px 16px;
  background: var(--bg-light);
  border: 1px solid var(--white-14);
  border-radius: var(--r-s);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.report-reason:hover { background: var(--white-08); border-color: var(--white-40); }
.report-reason.selected {
  background: rgba(139,93,246,0.12);
  border-color: var(--purple);
  color: var(--purple);
  font-weight: 500;
}

/* Disable submit until reason chosen */
#btnSendReport:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-phone {
  width: 100%;
  background: var(--lime);
  border: none;
  border-radius: var(--r-xxl);
  padding: 13px 20px;
  color: var(--bg);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}

.btn-phone:hover  { background: #c8ff30; }
.btn-phone:active { transform: scale(0.97); }

.btn-message {
  width: 100%;
  background: var(--purple);
  border: none;
  border-radius: var(--r-xxl);
  padding: 13px 20px;
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  text-align: center;
}

.btn-message:hover  { background: #7a4de8; }
.btn-message:active { transform: scale(0.97); }

/* ── Parameters section ── */
.product-params {
  margin-top: 40px;
}

.product-params-title {
  font-family: 'Unbounded', 'RoadRadio', sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 20px;
  transition: color 0.3s;
}

.product-params-address {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 16px;
  line-height: 1.4;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.product-params-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 48px;
}

.params-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.param-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 16px;
  line-height: 1.4;
  flex-wrap: wrap;
}

.param-label { color: var(--white-70); flex-shrink: 0; transition: color 0.3s; }
.param-value { color: var(--white); transition: color 0.3s; }

/* ── Map section ── */
.product-map {
  margin-top: 48px;
}

.product-map-label {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 16px;
  line-height: 1.4;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.product-map-img {
  border-radius: var(--r-l);
  overflow: hidden;
  height: 200px;
}

.product-map-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Description in left column (always visible) ── */
.product-desc-left {
  display: block;
  margin-top: 40px;
}

.product-desc-label {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--white-70);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.product-desc-left-text {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: var(--white-70);
  line-height: 1.6;
  transition: color 0.3s;
}

.product-desc-left-text p { margin-bottom: 10px; }
.product-desc-left-text p:last-child { margin-bottom: 0; }

@media (max-width: 1440px) {
  .product-sidebar { overflow: visible; }
}

/* ── Responsive: tablet ── */
@media (max-width: 900px) {
  .product-h1 { font-size: 22px; }
  .product-price-big { font-size: 22px; }
  .product-right { width: 280px; }
}

@media (max-width: 700px) {
  .btn-share-mobile { display: flex; }

  /* Dissolve columns → all children flow directly in product-layout */
  .product-layout  { flex-direction: column; gap: 0; align-items: stretch; margin-bottom: 0; }
  .product-left    { display: contents; }
  .product-right   { display: contents; }
  .product-sidebar { display: contents; }
  .product-right-header { display: none; }

  /* Order: title → seller → gallery → price+offer → actions → params → map → desc */
  .product-head           { order: 1; margin-bottom: 16px; margin-top: 8px; }
  .product-sidebar-seller { order: 2; padding: 0 0 16px; border-bottom: none; background: transparent; }
  .product-gallery        { order: 3; }
  .product-sidebar-price  { order: 4; padding: 24px 0 0; border-bottom: none; background: transparent;
                            flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
  .product-sidebar-price .product-price-actions { display: flex; margin-left: auto; }
  .product-price-big      { font-size: 30px; }
  .btn-offer-price        { font-size: 13px; padding: 9px 16px; }
  .product-actions        { order: 5; position: static; padding: 20px 0 0;
                            background: transparent; border-top: none; border-radius: 0;
                            flex-direction: row; gap: 10px; width: 100%; margin-top: 0; }
  .btn-phone, .btn-message { flex: 1; font-size: 15px; padding: 13px 10px; width: auto; }
  .btn-report        { order: 5; padding: 24px 0 4px; border-radius: 0; justify-content: center; }
  .product-params    { order: 6; margin-top: 28px; }
  .product-desc-left { order: 7; margin-top: 28px; }
  .product-map       { order: 8; margin-top: 28px; margin-bottom: 28px; }

  /* Gallery */
  .product-gallery-dots { display: none; }
  .gallery-counter { display: block; }

  .product-params-grid { grid-template-columns: 1fr; gap: 0; }
  .params-col + .params-col { margin-top: 12px; }

  /* Breadcrumb + section spacing */
  .breadcrumb { padding: 14px 0 0; gap: 4px; }
  .breadcrumb-item, .breadcrumb-sep { font-size: 12px; }
  .product-section { padding: 10px 0 0; padding-bottom: 8px; }
  .seller-block { margin-bottom: 0; }
  .product-map-img { height: 150px; border-radius: var(--r-m); }
  .product-gallery-main { border-radius: var(--r-m); }
}

/* ══════════════════════════════════════════
   LIGHTBOX
   ══════════════════════════════════════════ */

/* Курсор на галерее — намекает что можно открыть */
.product-gallery-main { cursor: zoom-in; }
.product-gallery-main:active { cursor: grabbing; }

.lb-overlay {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(0, 0, 0, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s;
}
.lb-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* Область под картинкой — клик закрывает */
.lb-overlay  { touch-action: none; } /* отключает нативный зум страницы */
.lb-img-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
}

.lb-img {
  max-width: 90vw;
  max-height: 90dvh;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  display: block;
  will-change: transform;
  transform-origin: center center;
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}
.lb-img.is-zoomed          { cursor: grab; }
.lb-img.is-zoomed:active   { cursor: grabbing; }

/* Кнопка закрытия */
.lb-close {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.14);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 601;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.lb-close:hover { background: rgba(255,255,255,0.25); }

/* Стрелки навигации */
.lb-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 601;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.lb-nav:hover  { background: rgba(255,255,255,0.22); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }

/* Счётчик снизу */
.lb-counter {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  color: rgba(255,255,255,0.55);
  background: rgba(0,0,0,0.45);
  padding: 5px 14px;
  border-radius: 20px;
  z-index: 601;
  pointer-events: none;
  white-space: nowrap;
}

/* ── Анимации: вход и выход ── */
@keyframes lb-img-enter {
  from { opacity: 0; transform: scale(0.88) translateY(12px); }
  to   { opacity: 1; transform: scale(1)    translateY(0);    }
}
@keyframes lb-img-leave {
  from { opacity: 1; transform: scale(1)    translateY(0);    }
  to   { opacity: 0; transform: scale(0.92) translateY(8px);  }
}

.lb-img.is-entering {
  animation: lb-img-enter 0.28s cubic-bezier(.25,.46,.45,.94) both;
}
.lb-img.is-leaving {
  animation: lb-img-leave 0.2s cubic-bezier(.55,0,1,.45) both;
  pointer-events: none;
}

/* Зум всегда через inline-стиль, сбрасываем анимации */
.lb-img.is-zoomed { animation: none; }

/* Мобайл: изображение на весь экран, стрелки скрыты */
@media (max-width: 700px) {
  .lb-img {
    max-width: 100vw;
    max-height: 100dvh;
    width: 100vw;
  }
  .lb-nav { display: none; }
}

/* ══════════════════════════════════════════ */

/* ── Mobile (≤510px): reorder hierarchy ── */
@media (max-width: 510px) {
  .breadcrumb { padding: 14px 0 0; gap: 4px; }
  .breadcrumb-item { font-size: 12px; }
  .breadcrumb-sep { font-size: 12px; }

  .product-section { padding: 10px 0 0; }

  /* Dissolve columns so all children flow directly in product-layout */
  .product-layout { flex-direction: column; gap: 0; align-items: stretch; margin-bottom: 0; }
  .product-left   { display: contents; }
  .product-right  { display: contents; }
  .product-sidebar { display: contents; }
  .product-right-header { display: none; }

  /* Order: title → seller → gallery → price → actions → params → map → desc */
  .product-head              { order: 1; margin-bottom: 16px; margin-top: 8px; }
  .product-h1                { font-size: 22px; }
  .product-sidebar-seller    { order: 2; padding: 0 0 12px; border-bottom: none; background: transparent; }
  .product-gallery           { order: 3; }
  .product-sidebar-price     { order: 4; padding: 28px 0 0; border-bottom: none; background: transparent; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
  .product-sidebar-price .product-price-actions { margin-left: auto; display: flex; }
  .product-actions           { order: 5; padding-top: 32px; flex-direction: column; gap: 10px; }
  .btn-report        { order: 5; padding: 24px 0 4px; border-radius: 0; justify-content: center; }
  .product-params    { order: 6; }
  .product-desc-left { order: 7; margin-top: 24px; }
  .product-map       { order: 8; }

  /* Action buttons: static, column, full width */
  .product-actions {
    position: static;
    padding: 16px 0 0;
    background: transparent;
    border-top: none;
    border-radius: 0;
    flex-direction: column;
    gap: 10px;
    margin-top: 0;
    width: 100%;
  }

  .btn-phone, .btn-message { flex: unset; font-size: 15px; padding: 14px 20px; width: 100%; }

  .product-price-big { font-size: 32px; }
  .btn-offer-price { font-size: 13px; padding: 8px 14px; }

  .product-gallery-dots { display: none; }
  .gallery-counter { display: block; }

  .seller-block { margin-bottom: 0; }
  .product-section { padding-bottom: 8px; }

  .product-params { margin-top: 28px; }
  .product-params-title { font-size: 15px; }
  .param-row { font-size: 14px; }
  .product-params-address { font-size: 14px; }

  .product-map { margin-top: 20px; margin-bottom: 28px; }
  .product-map-label { font-size: 14px; }
  .product-map-img { height: 150px; border-radius: var(--r-m); }

  .product-desc-left-text { font-size: 15px; }
  .product-desc-left-text p { margin-bottom: 8px; }
}

/* ══════════════════════════════════════════
   MODALS
   ══════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.22s;
}
.modal-overlay.open {
  opacity: 1; pointer-events: all;
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--white-14);
  border-radius: var(--r-xl, 20px);
  padding: 32px 28px 28px;
  width: 100%; max-width: 440px;
  position: relative;
  display: flex; flex-direction: column; gap: 16px;
  transform: translateY(12px);
  transition: transform 0.22s, background 0.3s, border-color 0.3s;
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}
.modal-overlay.open .modal-box { transform: translateY(0); }

.modal-close {
  position: absolute; top: 14px; right: 16px;
  width: 34px; height: 34px;
  border-radius: 50%; border: none;
  background: var(--white-08); color: var(--white-70);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 0.7;
  transition: opacity 0.15s, background 0.15s;
}
.modal-close:hover { opacity: 1; background: var(--white-14); }

.modal-seller {
  display: flex; align-items: center; gap: 12px;
}
.modal-seller .seller-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--purple); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; flex-shrink: 0;
}
.modal-seller-name {
  font-size: 14px; font-weight: 600; color: var(--white);
  transition: color 0.3s;
}
.modal-product-name {
  font-size: 12px; color: var(--white-40);
  margin-top: 2px; transition: color 0.3s;
}

.modal-title {
  font-family: 'Inter', sans-serif;
  font-size: 18px; font-weight: 700;
  color: var(--white); margin: 0;
  transition: color 0.3s;
}

.modal-textarea {
  width: 100%; box-sizing: border-box;
  background: var(--bg-light);
  border: 1px solid var(--white-14);
  border-radius: var(--r-m);
  padding: 14px 16px;
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 14px; line-height: 1.5;
  resize: none; height: 120px;
  outline: none;
  transition: border-color 0.2s, background 0.3s, color 0.3s;
}
.modal-textarea--sm { height: 80px; }
.modal-textarea:focus { border-color: var(--purple); }
.modal-textarea::placeholder { color: var(--white-40); }

.modal-hint {
  font-size: 12px; color: var(--white-40);
  line-height: 1.5; transition: color 0.3s;
}

.modal-btn-primary {
  width: 100%;
  background: var(--lime); color: #1a1a2e;
  border: none; border-radius: var(--r-xxl);
  padding: 14px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.modal-btn-primary:hover  { background: #c8ff30; }
.modal-btn-primary:active { transform: scale(0.98); }

/* ── Price offer row ── */
.modal-price-row {
  display: flex; align-items: center; gap: 12px;
}
.modal-price-current {
  flex: 1; display: flex; flex-direction: column; gap: 6px;
}
.modal-price-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--white-40);
  transition: color 0.3s;
}
.modal-price-value {
  font-size: 22px; font-weight: 700; color: var(--white);
  transition: color 0.3s;
}
.modal-price-input-wrap {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg-light);
  border: 1.5px solid var(--purple);
  border-radius: var(--r-m);
  padding: 8px 12px;
  transition: background 0.3s;
}
.modal-price-input {
  background: none; border: none; outline: none;
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 20px; font-weight: 700;
  width: 100%; min-width: 0;
  caret-color: var(--purple);
  transition: color 0.3s;
}
.modal-price-input::placeholder { color: var(--white-40); }
.modal-price-input::-webkit-inner-spin-button,
.modal-price-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.modal-price-currency {
  font-size: 18px; font-weight: 700; color: var(--white-70);
  flex-shrink: 0; transition: color 0.3s;
}


@media (max-width: 500px) {
  .modal-box { padding: 28px 20px 24px; }
  .modal-price-row { flex-direction: column; align-items: stretch; }
  .modal-price-row > svg { display: none; }
}

/* Дополнительные стили для формы предложения */
.modal-field {
  margin-bottom: 16px;
}

.modal-field .modal-price-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--white-40);
}

.modal-field .modal-price-input-wrap {
  background: var(--bg-light);
  border: 1px solid var(--white-14);
  border-radius: var(--r-m);
  padding: 10px 14px;
  transition: border-color 0.2s, background 0.3s;
}

.modal-field .modal-price-input-wrap:focus-within {
  border-color: var(--purple);
}

.modal-field .modal-price-input {
  width: 100%;
  background: none;
  border: none;
  outline: none;
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
}

.modal-field .modal-price-input::placeholder {
  color: var(--white-40);
}
