.detail-container {
    display: flex;
    flex-direction: row;
    gap: 20px;
    background-color: #fff;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    max-width: 900px;
    margin: 10px auto;
    font-family: Arial, sans-serif;
    border-radius: 8px;
}

/* Основное изображение */
.image-gallery {
    display: flex;
    flex-direction: column;

}



/* Миниатюры */
.image-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.image-thumbnails img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 5px;
    transition: transform 0.2s ease;
    border: 2px solid transparent;
}

.image-thumbnails img:hover {
    transform: scale(1.1);
    border: 2px solid #0099cc;
}

/* Информация о товаре */
.detail-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.detail-info h2 {
    font-size: 24px;
    margin: 0 0 10px;
    color: #222;
}

.detail-price {
    font-size: 22px;
    font-weight: bold;
    color: #28a745;
    margin-bottom: 10px;
    margin-top: 0px;
}

.detail-shop {
    font-size: 14px;
    color: #888;
    margin-top: auto;
}

/* Описание */
.detail-description {
    max-width: 900px;
    margin: 20px auto;
    background-color: #fafafa;
    padding: 20px;
    border-radius: 8px;
}

.detail-description h3 {
    margin-top: 0;
    font-size: 22px;
}

.detail-description p {
    font-size: 16px;
    line-height: 1.5;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4); /* затемнение фона */
}

.modal-content {
    background-color: #fff;
    margin: 5% auto; /* было 10% */
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-sizing: border-box;
}


.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
}
.application-button-wrapper {
    display: flex;
    justify-content: center;
    margin: 10px 0;
}
.btn-za,
.write-button {
    background-color: #00b894;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 153, 204, 0.2);
    width: 100%;
    max-width: 3000px;
    text-align: center;
    text-decoration: none;
}

/* Эффекты при наведении и нажатии */
.btn-za:hover,
.write-button:hover {
    background-color: #01856b;
}

.btn-za:active,
.write-button:active {
    transform: scale(0.97);
}
.contact-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    margin-top: 20px;
}


#in-cart-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap; /* запрет переносов */
    margin-top: 10px;
}

#in-cart-section form {
    margin: 0; /* убрать лишние отступы */
    display: flex;
    align-items: center;
    height: 36px; /* совпадает с .quantity-control */
}

.cart-button {
    height: 40px;
    padding: 0 14px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    line-height: 40px;
    min-width: 120px;
    color: #fff;
    background-color: #2a9d8f;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-decoration: none;
}

.cart-button:hover {
    background-color: #23867d;
}
#add-to-cart-section button {
    background-color: #00b894;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 153, 204, 0.2);
    width: 100%;
    max-width: 300px;
    text-align: center;
}

#add-to-cart-section button:hover {
    background-color: #01856b;
}

#add-to-cart-section button:active {
    transform: scale(0.97);
}

.product-slider-wrapper {
    position: relative;
    overflow: hidden;
    width: clamp(280px, 45vw, 500px);
    margin: 0 auto 20px;
    border-radius: 8px;
    overflow: hidden;
}

.product-slider-track {
    display: flex;
    transition: transform 0.5s ease;
}

.product-slide-img,
.product-slide-video {
  min-width: 100%;
  object-fit: contain;
  aspect-ratio: 4 / 3;
}

.product-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0,0,0,0.4);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
}

#product-prev-btn { left: 0; }
#product-next-btn { right: 0; }

.delivery-button {
    background-color: #00b894;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 153, 204, 0.2);
    width: 100%;
    text-align: center;
}

.btn-za:hover,
.delivery-button:hover {
    background-color: #01856b;
}

.btn-za:active,
.delivery-button:active {
    transform: scale(0.97);
}

.user-profile-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    margin-top: 15px;
    margin-left: 15px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ccc;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.user-name {
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

.media-modal-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90%;
    max-height: 90vh;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border: none;
}

/* Контейнер с медиа */
.zoom-media-container-product {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Стили фото и видео — уменьшены */
.zoom-media-container-product img,
.zoom-media-container-product video {
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    background-color: transparent;
}
.zoom-media-container-product img {
    max-height: 80vh;
}
.zoom-media-container-product video {
    max-height: 60vh;
}

/* Кнопки навигации */
.zoom-nav-btn {
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    font-size: 32px;
    cursor: pointer;
    padding: 10px 14px;
    margin: 0 8px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.zoom-nav-btn:hover {
    background: rgba(0, 0, 0, 0.5);
}

.product-slide-img {
  max-width: 100%;
  height: auto;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.product-slide-video {
  max-width: 100%;
  height: auto;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  transform: scale(0.9); /* 90% от обычного размера */
}
.product-review-stars {
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.product-star {
    font-size: 12px;
    color: #ccc;
}

.product-star.filled {
    color: #ffc107;
}

.product-rating-number {
    font-size: 14px;
    color: #333;
}

.product-user-info-rating {
    display: flex;
    flex-direction: column;
    margin-left: 8px;
}

.btn-sold {
    background-color: #d9534f;
}

.btn-sold.disabled {
    background-color: gray;
    cursor: not-allowed;
}
.sold-label {
    font-size: 28px;
    color: red;
    margin-top: 10px;
}

.detail-characteristics {
    margin-bottom: 15px;
    padding: 10px;
    border-left: 3px solid #ccc;
    background-color: #f9f9f9;
}

.detail-characteristics h4 {
    margin-bottom: 8px;
}

.detail-characteristics ul {
    list-style: none;
    padding-left: 0;
}

.detail-characteristics li {
    margin-bottom: 5px;
}


.pc-back-btn,
.desktop-actions {
    display: none;
}

.zoom-counter-product {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 14px;
  z-index: 20;
  pointer-events: none;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px; /* расстояние между категорией и тегами */
    color: grey;
}

.product-category {
    font-weight: bold;
}

.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px; /* расстояние между тегами */
}

.product-tag {
    display: inline-block;
    background-color: #e0e0e0;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 0.9em;
}

.download-btn {
    position: fixed;
    top: 10px;
    right: 60px;
    background: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 18px;
    color: #555;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    z-index: 12000; /* выше, чем у модалки */

}

.download-btn:hover {
    background: rgba(0,0,0,0.7);
}

.btn-sold:hover {
    background: #ad2c28;
}

.contact-buttons form {
  width: 100%;
}

@media screen and (min-width: 769px) {
    #zoomModal .zoom-content {
        max-width: 100vw !important;
        max-height: 100vh !important;
        display: flex;
        justify-content: center;
        align-items: center;
        overflow: hidden; /* скрываем скроллы, но сам элемент может трансформироваться */
        position: relative;
    }

    .zoom-media-container-product {
        width: 100vw;
        height: 100vh;
        overflow: hidden;
        touch-action: none;
        position: relative;
    }
    .pc-back-btn {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 8px 16px;
        font-size: 14px;
        background-color: #f5f5f5;
        border: 1px solid #ccc;
        border-radius: 6px;
        color: #333;
        text-decoration: none;
        cursor: pointer;
        transition: all 0.2s ease;
        position; absolute;
    }

    .pc-back-btn:hover {
        background-color: #e0e0e0;
        border-color: #999;
    }
    .back-btn {
        display: none;
    }
    .mobile-topbar {
        display: none !important;
    }

    .desktop-actions {
        display: flex;
        justify-content: center;
        gap: 10px;
        margin-top: 10px; /* можно под названием товара */
    }

    .desktop-actions button {
        padding: 8px 16px;
        font-size: 20px;
        border-radius: 6px;
        border: 1px solid #ccc;
        background: #fff;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 5px;
    }
}
.characteristic {
    font-size: 22px;
    margin: 0;
}
.image-counter {
    text-align: center;
    margin-top: 8px;
    font-size: 15px;
    font-weight: 500;
    opacity: 0.8;
}

#zoomMediaContainer { touch-action: none; }

.media-item-product{
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 4 / 3;  /* выбери своё: 1/1, 4/3, 16/9 */
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}

.media-loader{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(255,255,255,0.2);
  z-index:2;
  pointer-events:none;
}


.media-item-product.is-loaded img,
.media-item-product.is-loaded video{ opacity:1; }

.media-item-product.is-loaded .media-loader{ display:none; }

.report-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;

  display: flex;
  justify-content: center;
  align-items: flex-start;

  padding: 16px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);

  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

.report-modal__content {
  position: relative;
  width: 100%;
  max-width: 560px;

  margin: 24px 0;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
  padding: 22px 22px 18px;
  animation: reportModalShow .22s ease;

  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  box-sizing: border-box;
}


.guest-request-card {
    margin-top: 18px;
    padding: 18px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #e7e7e7;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.guest-request-card__head h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.guest-request-card__head p {
    margin: 0 0 16px;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.45;
}

.guest-request-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.guest-request-field {
    margin-bottom: 12px;
}

.guest-request-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
}

.guest-request-input,
.guest-request-textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d9dbe1;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 15px;
    background: #fff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.guest-request-input:focus,
.guest-request-textarea:focus {
    border-color: #2f80ed;
    box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.12);
}

.guest-request-textarea {
    resize: vertical;
    min-height: 110px;
}

.guest-request-note {
    margin-top: 4px;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

.guest-request-note a {
    color: #2f80ed;
    text-decoration: none;
    font-weight: 600;
}

.guest-request-note a:hover {
    text-decoration: underline;
}

.guest-request-error {
    margin-top: 6px;
    color: #d93025;
    font-size: 13px;
}

.guest-request-submit {
    width: 100%;
    margin-top: 14px;
}

.guest-request-card.is-hidden {
    display: none;
}

@media (max-width: 768px) {
    .guest-request-row {
        grid-template-columns: 1fr;
    }

    .guest-request-card {
        padding: 14px;
        border-radius: 14px;
    }
}


@media (max-width: 768px) {
  .report-modal {
    padding: 10px;
    align-items: flex-start;
  }

  .report-modal__content {
    margin: 10px 0;
    padding: 18px 16px 16px;
    border-radius: 18px;
    max-height: calc(100dvh - 20px);
  }

  .report-modal__title {
    font-size: 19px;
  }

  .report-modal__actions {
    flex-direction: column;
  }

  .report-modal__btn {
    width: 100%;
  }
}

@media screen and (max-width: 768px) {

    .pc-back-btn {
        display: none;
    }
    /* Контейнер карточки товара */
    .detail-container {
      display: flex;
      flex-direction: column;
      padding: 0px;
      background-color: #fff;
      gap: 0px;
      margin: 0px auto;
      border-radius: 0px;
    }

    /* Галерея */
    .detail-image {
      position: relative;
      width: 100%;
      overflow: hidden;
      border-radius: 10px;

    }

    .product-slider-wrapper {
      overflow: hidden;
      min-width: 0px;
      width: 100%;
      max-width: none;
    }

    .product-slider-track {
      display: flex;
      transition: transform 0.3s ease;
    }

    .product-slide-img,
    .product-slide-video {
      aspect-ratio: auto;
      width: 100%;
      height: auto;
      object-fit: contain;
      border-radius: 10px;
    }

    /* Стрелки */
    .gallery-click-area {
      position: absolute;
      top: 0;
      bottom: 0;
      width: 15%;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 2;
      background: rgba(0, 0, 0, 0.1);
      cursor: pointer;
    }

    .gallery-click-area.left {
      left: 0;
    }

    .gallery-click-area.right {
      right: 0;
    }

    .gallery-arrow {
      font-size: 24px;
      color: #fff;
    }

    /* Информация о товаре */
    .detail-info {
      display: flex;
      flex-direction: column;
      gap: 8px;
      padding: 16px;
    }


    .detail-info h2 {
      font-size: 20px;
      margin: 0;
    }

    .detail-price {
      font-size: 22px;
      font-weight: bold;
      color: #28a745;
    }

    .contact-buttons {
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin-top: 12px;
    }

    .contact-buttons button {
      padding: 12px;
      font-size: 16px;
      border: none;
      border-radius: 8px;
      color: white;

      cursor: pointer;
    }

    .contact-buttons .btn-sold {
      background-color: #f44336;
    }

    .contact-buttons .btn-sold.disabled {
      background-color: #ccc;
      cursor: not-allowed;
    }

    /* Профиль пользователя */
    .user-profile-link {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-top: 16px;
      text-decoration: none;
      color: inherit;
    }

    .user-avatar {
      width: 48px;
      height: 48px;
      border-radius: 50%;
      object-fit: cover;
    }

    .user-name {
      font-weight: bold;
      font-size: 16px;
    }

    .product-review-stars {
      font-size: 14px;
      color: #ffaa00;
    }

    .product-rating-number {
      color: #667;
    }

    /* Характеристики */
    .detail-characteristics {
      margin-top: 16px;
      background-color: #fafafa;
      padding: 10px;
      border-radius: 6px;
      font-size: 14px;
    }

    .detail-characteristics ul {
      list-style: none;
      padding: 0;
      margin: 0;
    }

    .detail-characteristics li {
      margin: 4px 0;
    }

    /* Описание */
    .detail-description {
      font-size: 14px;
      line-height: 1.5;
      padding: 10px;
      margin: 0px auto;
      border-radius: 0px;
    }



    /* Зум-модал */
    .u-modal {
      position: fixed;
      display: flex;
      justify-content: center;
      align-items: center;
      z-index: 2000;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.8);
    }

    .u-modal__close {
      position: absolute;
      top: 8px;
      right: 12px;
      font-size: 28px;
      color: #fff;
      cursor: pointer;
      z-index: 10000;
    }

    /* Модалка звонка */
    .modal {
      position: fixed;
      z-index: 2001;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      background: rgba(0,0,0,0.4);
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .modal-content {
      background: white;
      padding: 20px;
      width: 90%;
      max-width: 400px;
      border-radius: 8px;
      text-align: center;
    }

    .modal-close {
      position: absolute;
      top: 12px;
      right: 16px;
      font-size: 24px;
      cursor: pointer;
    }
    .contact-buttons {
        display: flex;           /* сделали флекс-контейнером */
        flex-direction: row;     /* расположение по горизонтали */
        justify-content: flex-start; /* выравнивание по левому краю */
        align-items: center;     /* выровнять кнопки по вертикали */
    }

    .btn-za,
    .write-button {

        padding: 12px 20px;
    }

    .mobile-topbar {
        display: flex !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 50px;
        background: #fff;
        border-bottom: 2px solid #ddd;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 10px;
        z-index: 1000;
    }

    .topbar-title {
        font-size: 16px;
        font-weight: 600;
        color: #222;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 60%;
        text-align: center;
    }

    .topbar-btn {
        background: none;
        border: none;
        cursor: pointer;
        padding: 0px 5px;
        text-decoration: none;
        color: black;
        display: flex;
        align-items: center;
        justify-content: center;

    }

    .topbar-btn::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: rgba(0,0,0,0.6);
        border-radius: 100%;
        transform: translate(-50%, -50%);
        transition: width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
        opacity: 0;
        z-index: 10000;
    }

    .topbar-actions {
        display: flex;
        gap: 5px;
    }
    .topbar-actions button {
        font-size: 21px;
    }

    .share-btn-product {
        background: none;
        border: none;
        cursor: pointer;
        color: #555;
        font-size: 16px;
        transition: color 0.3s;
    }

    .share-btn-product {
        color: #0077ff;
    }
    .media-item{
        aspect-ratio: auto;
        width: 100%;
        object-fit: contain;
        border-radius: 10px;
        max-height: 80vh;
    }

}

.guest-request-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(15, 23, 42, 0.34);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity .22s ease;
}

.guest-request-overlay.open {
    opacity: 1;
}

.guest-request-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -10px 35px rgba(0, 0, 0, 0.16);
    transform: translateY(110%);
    transition: transform .22s ease;
    will-change: transform;
}

.guest-request-panel.open {
    transform: translateY(0);
}

.guest-request-panel__handle {
    width: 44px;
    height: 5px;
    border-radius: 999px;
    background: #d1d5db;
    margin: 10px auto 8px;
    flex-shrink: 0;
}

.guest-request-panel__head {
    padding: 0 16px 10px;
    border-bottom: 1px solid #edf0f3;
}

.guest-request-panel__head h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
}

.guest-request-panel__close {
    position: absolute;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: none;
    cursor: pointer;
    font-size: 16px;
    flex-shrink: 0;
    top: 16px;
    left: 10px;
}

.guest-request-panel__content {
    padding: 14px 16px 18px;
    overflow-y: auto;
    max-height: calc(100vh - 78px);
    -webkit-overflow-scrolling: touch;
}

.guest-request-panel__subtitle {
    margin: 0 0 14px;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.45;
}

.guest-request-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0 12px;
}

.guest-request-field {
    margin-bottom: 12px;
}

.guest-request-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
}

.guest-request-input,
.guest-request-textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d9dbe1;
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 15px;
    background: #fff;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.guest-request-input:focus,
.guest-request-textarea:focus {
    border-color: #2f80ed;
    box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.12);
}

.guest-request-textarea {
    resize: vertical;
    min-height: 120px;
}

.guest-request-note {
    margin-top: 6px;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.45;
}

.guest-request-note a {
    color: #2f80ed;
    text-decoration: none;
    font-weight: 600;
}

.guest-request-error {
    margin-top: 6px;
    color: #dc2626;
    font-size: 13px;
}

.guest-request-submit {
    width: 100%;
    margin-top: 14px;
}

@media (min-width: 769px) {
    .guest-request-panel {
        top: 50%;
        bottom: auto;
        left: 50%;
        right: auto;
        width: min(640px, calc(100vw - 32px));
        border-radius: 24px;
        transform: translate(-50%, calc(-50% + 40px)) scale(.98);
        opacity: 0;
        transition: transform .22s ease, opacity .22s ease;
    }

    .guest-request-panel.open {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    .guest-request-panel__handle {
        display: none;
    }

    .guest-request-panel__content {
        max-height: min(70vh, 720px);
    }

    .guest-request-row {
        grid-template-columns: 1fr 1fr;
    }
    .guest-request-panel__head {
        padding: 10px 16px 10px;
    }
    .guest-request-panel__close {
        top: 5px;
    }
}

.detail-description {
    max-width: 900px;
    margin: 20px auto;
    padding: 0;
    background: transparent;
    display: grid;
    gap: 14px;
}

.detail-section {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    padding: 18px 20px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.detail-section h3,
.detail-section .characteristic {
    margin: 0 0 14px;
    font-size: 22px;
    line-height: 1.2;
    color: #111827;
}

/* Характеристики */
.detail-section--specs ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
}

.detail-section--specs li {
    display: grid;
    grid-template-columns: minmax(120px, 165px) 1fr;
    gap: 10px;
    align-items: start;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #edf2f7;
    margin: 0;
}

/* Описание */
.product-description-text {
    font-size: 16px;
    line-height: 1.7;
    color: #1f2937;
    white-space: normal;
    word-break: break-word;
}

/* Мета */
.product-meta-list {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
}

.product-meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #4b5563;
    font-size: 15px;
}

.product-meta-item i {
    width: 18px;
    text-align: center;
    color: #6b7280;
}

.product-meta--bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    padding-top: 14px;
    border-top: 1px solid #eef2f7;
}

.product-meta-label {
    color: #6b7280;
    font-weight: 600;
}

.product-category {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eef6ff;
    color: #1d4ed8;
    font-weight: 700;
    font-size: 14px;
}

.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.product-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
}

.product-tag--empty {
    opacity: 0.8;
}

.detail-section--specs li {
    display: grid;
    grid-template-columns: minmax(120px, 165px) 1fr;
    gap: 10px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #edf2f7;
    margin: 0;
}

.spec-label {
    color: #6b7280;
    font-weight: 600;
    line-height: 1.35;
}

.spec-value {
    justify-self: center;
    text-align: center;
    font-weight: 500;
    color: #111827;
    line-height: 1.35;
    word-break: break-word;
}

.spec-item--full {
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: start;
}

.spec-item--full .spec-value,
.spec-value--text {
    justify-self: stretch;
    text-align: left;
}

/* Тёмная тема */
body.dark-theme .detail-section {
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

body.dark-theme .detail-section--specs li {
    border-color: rgba(255, 255, 255, 0.06);
}

body.dark-theme .product-category {
    background: rgba(59, 130, 246, 0.16);
    color: #93c5fd;
}

body.dark-theme .product-tag {
    background: #2b2f36;
    color: #e5e7eb;
}

body.dark-theme .spec-label {
    color: #a1a1aa;
}

body.dark-theme .spec-value {
    color: #f3f4f6;
}

body.dark-theme .product-meta--bottom {
    border-top-color: rgba(255, 255, 255, 0.08);
}


/* Мобилка */
@media (max-width: 768px) {
    .detail-description {
        gap: 10px;
        margin: 0px auto 0;
    }

    .detail-section {
        border-radius: 14px;
        padding: 14px;
    }

    .detail-section h3,
    .detail-section .characteristic {
        font-size: 19px;
        margin-bottom: 12px;
    }

    .detail-section--specs ul {
        grid-template-columns: 1fr;
    }



    .product-description-text {
        font-size: 15px;
        line-height: 1.6;
    }

    .product-meta-item {
        font-size: 14px;
    }

    .detail-section--specs ul {
        grid-template-columns: 1fr;
    }

    .detail-section--specs li {
        grid-template-columns: 120px 1fr;
        gap: 8px;
        padding: 11px 12px;
        align-items: start;
    }

    .spec-label {
        font-size: 13px;
    }

    .spec-value {
        justify-self: end;
        text-align: right;
        font-size: 14px;
    }

    .spec-item--full {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .spec-item--full .spec-value,
    .spec-value--text {
        justify-self: stretch;
        text-align: left;
    }
}
.product-owner-avatar-wrap {
    position: relative;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
}

.product-owner-avatar-wrap .user-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.user-avatar--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;
    color: #111827;
    font-weight: 700;
}

.chat-online-dot {
    position: absolute;
    right: 1px;
    bottom: 1px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.06);
    opacity: 0;
    transform: scale(0.85);
    transition: opacity .18s ease, transform .18s ease;
    pointer-events: none;
}

.chat-online-dot.is-online {
    opacity: 1;
    transform: scale(1);
}

body.dark-theme .chat-online-dot {
    border-color: #1f2937;
}