/* static/css/model_detail.css */
.model-detail {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    padding: 2rem 0;
}

/* Галерея */
.model-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.model-gallery__main {
    position: relative;
    width: 100%;
    max-width: 340px;
    max-height: 380px;
    margin: 0 auto;
    aspect-ratio: 3/4;
    border-radius: 12px;
    overflow: hidden;
    background-color: #2d2d2d;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.model-gallery__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Миниатюры */
.model-gallery__thumbs {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}

.gallery-nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #2d2d2d;
    border: 1px solid #555;
    color: #ffffff;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.gallery-nav-btn:hover {
    background-color: #6c5ce7;
    transform: scale(1.1);
}

.gallery-nav-btn--left {
    order: -1;
}

.model-gallery__thumbs-container {
    display: flex;
    gap: 0.5rem;
    overflow: hidden;
    scroll-behavior: smooth;
    flex: 1;
    padding: 0.25rem 0;
    min-height: 90px;
}

.model-gallery__thumb {
    width: 56px;
    height: 74px;
    border: 2px solid transparent;
    border-radius: 6px;
    background: #2d2d2d;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.model-gallery__thumb:hover,
.model-gallery__thumb.active {
    border-color: #6c5ce7;
    transform: scale(1.05);
}

.model-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

/* Информация о модели */
.model-detail__info {
    background-color: #1e1e1e;
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* === АДАПТИВНЫЕ КНОПКИ === */
.model-detail__actions-top {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #333;
}

.model-detail__actions-row {
    display: flex;
    gap: 0.75rem;
    width: 100%;
}

.btn--phone {
    flex: 2;
    min-width: 0;
}

.btn--telegram,
.btn--whatsapp {
    flex: 1;
    min-width: 0;
}

.model-detail__actions-row:last-child {
    justify-content: center;
}

.model-detail__actions-top .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.8rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.25s ease;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    justify-content: center;
}

.model-detail__actions-top .btn svg {
    flex-shrink: 0;
}

.model-detail__actions-top .btn span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Цвета кнопок */
.btn--phone {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: white;
    border: none;
    box-shadow: 0 2px 6px rgba(108, 92, 231, 0.3);
}
.btn--phone:hover {
    background: linear-gradient(135deg, #5b4bd3, #8a7dff);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(108, 92, 231, 0.4);
}

.btn--telegram {
    background: linear-gradient(135deg, #0088cc, #00aaff);
    color: white;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 136, 204, 0.3);
}
.btn--telegram:hover {
    background: linear-gradient(135deg, #0077b3, #0095e0);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 136, 204, 0.4);
}

.btn--whatsapp {
    background: linear-gradient(135deg, #128C7E, #25D366);
    color: white;
    border: none;
    box-shadow: 0 2px 6px rgba(37, 211, 102, 0.3);
}
.btn--whatsapp:hover {
    background: linear-gradient(135deg, #0d7a6f, #1eb957);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(37, 211, 102, 0.4);
}

.btn--favorite {
    background: linear-gradient(135deg, #ff416c, #ff6b6b);
    color: white;
    border: none;
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.3);
}
.btn--favorite:hover {
    background: linear-gradient(135deg, #e03a5f, #ff5252);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 107, 107, 0.4);
}

/* Заголовок */
.model-detail__header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.model-detail__name {
    font-size: 1.4rem;
    font-weight: bold;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
}

.model-detail__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.model-detail__location {
    font-size: 1rem;
    color: #aaaaaa;
    font-style: italic;
}

/* Параметры */
.model-detail__params {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    font-size: 0.95rem;
}

.param-item {
    display: flex;
    justify-content: space-between;
}

.param-label {
    color: #aaaaaa;
    font-weight: 600;
}

.param-value {
    color: #ffffff;
    text-align: right;
}

/* Разделы */
.model-detail__section h3 {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
    font-weight: 600;
}

.model-detail__section p {
    color: #e0e0e0;
    line-height: 1.5;
    font-size: 0.95rem;
}

.services-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.service-tag {
    padding: 0.25rem 0.5rem;
    background-color: #6c5ce7;
    color: #ffffff;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
}

.prices-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
}

.price-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    background-color: #2d2d2d;
    border-radius: 6px;
    font-size: 0.9rem;
}

.price-label {
    color: #aaaaaa;
}

.price-value {
    color: #ffffff;
    font-weight: bold;
}

/* === АДАПТИВНОСТЬ === */
@media (max-width: 768px) {
    .model-detail {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem 0;
    }

    .model-gallery__main {
        max-width: 100%;
        max-height: 400px;
    }

    .model-detail__info {
        padding: 1rem;
        gap: 1rem;
    }

    .model-detail__actions-top {
        padding-bottom: 1rem;
        gap: 0.6rem;
    }

    .model-detail__actions-row {
        gap: 0.6rem;
    }

    .model-detail__actions-top .btn {
        padding: 0.55rem 0.7rem;
        font-size: 0.85rem;
    }

    .model-detail__name {
        font-size: 1.3rem;
    }

    .model-detail__params,
    .prices-grid {
        grid-template-columns: 1fr;
    }

    .param-item,
    .price-item {
        padding: 0.4rem;
        font-size: 0.9rem;
    }

    .service-tag {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }
}

.model-detail__params {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  font-size: 0.95rem;
  width: 100%;
}

.param-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  min-width: 0;
  word-break: break-word;
  overflow-wrap: break-word;
  line-height: 1.4;
}

.param-label {
  color: #aaaaaa;
  font-weight: 600;
  flex-shrink: 0;
  white-space: nowrap;
  padding-top: 0.1rem;
}

.param-value {
  color: #ffffff;
  flex: 1;
  min-width: 0;
  word-break: break-word;
  overflow-wrap: break-word;
  text-align: left;
}

@media (max-width: 480px) {
    .model-detail {
        padding: 1rem 0;
    }

    .model-gallery__main {
        max-height: 350px;
    }

    .model-detail__name {
        font-size: 1.2rem;
    }

    .model-detail__actions-top .btn {
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
    }

    .model-detail__section h3 {
        font-size: 1rem;
    }

    .model-detail__location {
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
  .model-detail__params {
    grid-template-columns: 1fr;
  }

  .param-item {
    flex-direction: column;
    gap: 0.25rem;
  }

  .param-label {
    white-space: normal;
    text-align: left;
  }

  .param-value {
    text-align: left;
  }
}
.btn--extra-services {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.btn--extra-services:hover {
    background: linear-gradient(135deg, #ff5252, #ff7575);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 107, 0.4);
}

.btn--extra-services svg {
    flex-shrink: 0;
}