*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --g1:       #1b7a3a;
  --g2:       #30b45b;
  --g3:       #45ce72;
  --g4:       #5ddf88;
  --g-light:  #e9f7ee;
  --g-pale:   #f2fbf4;
  --accent:   #e8a020;
  --teal:     #1ab0d8;
  --wa:       #25d366;
  --red:      #d94a00;
  --text:     #111111;
  --mid:      #4a5a4a;
  --muted:    #7a907a;
  --border:   #cce0cc;
  --white:    #ffffff;
}

/* =========================================
   ОБЩАЯ ОБЕРТКА И ЗАГОЛОВОК
========================================= */
.modern-product-page {
  width: clamp(320px, 100%, 1525px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: 14px 10px;
  font-family: 'Mulish', sans-serif;
  color: var(--text);
}

.card-title {
  font-size: 36px; 
  font-weight: 700; 
  line-height: 1.3;
  margin-bottom: 16px;
}

/* Настройки размера шрифта заголовка для мобильных устройств */
@media (max-width: 991px) {
    .card-title {
        font-size: 28px; /* Размер для планшетов и горизонтальных телефонов */
    }
}
@media (max-width: 576px) {
    .card-title {
        font-size: 22px; /* Размер для узких экранов (смартфоны) */
    }
}

.badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.badge {
  font-size: 11px; font-weight: 700;
  padding: 4px 11px; border-radius: 20px;
  border: 1.5px solid;
}
.badge--sort { color: var(--g2); border-color: var(--g2); }

/* =========================================
   СЕТКА КАРТОЧКИ (GRID / FLEX)
========================================= */
#product-card-grid {
    background: var(--white);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 6px 40px rgba(20,60,20,.15);
}

@media (min-width: 992px) {
    #product-card-grid {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        grid-template-rows: auto 1fr auto;
    }
    .col-photo {
        grid-column: 1 / 2;
        grid-row: 1 / 4;
        padding: 20px;
    }
    .col-header-span {
        grid-column: 2 / 4;
        grid-row: 1 / 2;
        border-left: 1px solid #ddeedd;
        padding: 24px 22px 10px 22px; 
padding-top: 0px;
    }
    .col-info {
        grid-column: 2 / 3;
        grid-row: 2 / 3;
        border-left: 1px solid #ddeedd;
        border-right: 1px solid #ddeedd;
        padding: 10px 22px 0 22px;
    }
    .col-side {
        grid-column: 3 / 4;
        grid-row: 2 / 4;
        padding: 10px 22px 20px 22px; 
    }
    .col-delivery {
        grid-column: 2 / 3;
        grid-row: 3 / 4;
        border-left: 1px solid #ddeedd;
        border-right: 1px solid #ddeedd;
        padding: 20px 22px 20px 22px;
    }
}

@media (max-width: 991px) {
    #product-card-grid {
        display: flex;
        flex-direction: column;
    }
    /* Строгий порядок вывода на мобилках */
    .col-photo          { order: 1; padding: 20px; }
    .col-header-span    { order: 2; padding: 20px 20px 10px; border-top: 1px solid #ddeedd; }
    .col-info           { order: 3; padding: 0 20px 10px; border: none; }
    .col-side           { order: 4; padding: 15px 20px 25px; border-top: 1px solid #ddeedd; }
    .col-delivery       { order: 5; padding: 15px 20px 20px; border-top: 1px solid #ddeedd; }
}

/* =========================================
   ФОТО И СЛАЙДЕР МИНИАТЮР
========================================= */
.photo-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
  background: #f9f9f9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-wrap img { width: 100%; height: 100%; object-fit: contain; }

.thumbs-slider-wrap {
    position: relative; display: flex; align-items: center; margin-top: 10px; width: 100%;
}
.thumbs {
    display: flex; overflow-x: auto; gap: 10px; flex-grow: 1;
    scrollbar-width: none; -ms-overflow-style: none;
}
.thumbs::-webkit-scrollbar { display: none; }

#thumbs-track { cursor: grab; }
#thumbs-track.grabbing { cursor: grabbing; user-select: none; }

.thumb {
    flex: 0 0 calc(25% - 7.5px); 
    position: relative; border-radius: 8px; cursor: pointer;
    border: 2px solid transparent; transition: border-color .18s;
    overflow: hidden; aspect-ratio: 1 / 1; 
}
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb:hover { border-color: var(--g3); }
.thumb.active { border-color: var(--g2); }

.thumb-arrow {
    background: #fff; border: 1px solid var(--border); border-radius: 50%;
    width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; position: absolute; top: 50%; transform: translateY(-50%);
    z-index: 2; color: var(--mid); box-shadow: 0 2px 6px rgba(20,60,20,.1);
    transition: all 0.2s; padding: 0;
}
.thumb-arrow:hover { color: var(--g2); border-color: var(--g2); }
.thumb-arrow.prev { left: -15px; }
.thumb-arrow.next { right: -15px; }
@media (max-width: 768px) { .thumb-arrow { display: none; } }

/* =========================================
   ИНФО БЛОК: ЯНДЕКС, ХАРАКТЕРИСТИКИ
========================================= */
/* --- Яндекс Отзывы --- */
.yandex-reviews-block {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--g-pale); border: 1px solid #e9ecef; border-radius: 8px;
    padding: 20px 15px; text-decoration: none; color: var(--text);
    margin-bottom: 22px; flex-wrap: wrap; gap: 15px;
}
.yandex-reviews-block:hover { border-color: #d3d9df; }

/* Группа для выравнивания в одну линию */
.ya-info-group {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.ya-logo-box { font-family: Arial, sans-serif; font-weight: 800; font-size: 17px; letter-spacing: -0.5px; }
.ya-separator { width: 1px; height: 26px; background: #dee2e6; }
.ya-stars { color: #f2c94c; font-size: 18px; letter-spacing: 2px; line-height: 1; margin-top: -2px; }

/* Цифры */
.ya-center { display: flex; flex-direction: column; line-height: 1.1; }
.ya-rating-val { font-size: 16px; font-weight: 800; }
.ya-rating-count { font-size: 12px; color: var(--muted); }

/* Кнопка */
.ya-right { margin-left: auto; }
.ya-btn {
    font-size: 12px; font-weight: 600; color: #30b45b;
    border: 1px solid #b7e3c6; border-radius: 20px;
    padding: 6px 14px; background: transparent; transition: all 0.2s; white-space: nowrap;
}
.yandex-reviews-block:hover .ya-btn { background: #eaf6ed; }

/* Адаптив для мобильных устройств */
@media(max-width: 500px) {
    .yandex-reviews-block { 
        flex-direction: column; 
        justify-content: center; 
        gap: 14px; 
        padding: 18px 15px; 
    }
    .ya-info-group { 
        justify-content: center; 
        gap: 10px; 
    }
    .ya-separator { display: none; } /* Скрываем палочку на мобильных для компактности */
    .ya-right { 
        margin-left: 0; 
        width: 100%; 
        display: flex; 
        justify-content: center; 
    }
}
.section-title-line {
    display: flex; align-items: center; font-size: 10px; font-weight: 800; 
    text-transform: uppercase; letter-spacing: .08em; color: var(--muted); 
    margin-bottom: 12px; white-space: nowrap;
}
.section-title-line::after {
    content: ""; flex-grow: 1; height: 1px; background: var(--border); margin-left: 15px;
}

.specs { margin-bottom: 16px; }
.spec-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; padding: 6px 0; border-bottom: 1px dashed #d8e8d8;
}
.spec-key { color: var(--muted); }
.spec-val { font-weight: 700; }

/* =========================================
   ПРАВЫЙ БЛОК: КАЛЬКУЛЯТОР, ЦЕНЫ, УСЛУГИ
========================================= */
.price-strip { display: flex; gap: 8px; margin-bottom: 16px; }
.price-box {
  flex: 1; background: var(--g-pale); border: 1.5px solid var(--border);
  border-radius: 10px; padding: 12px;
}
.price-lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; margin-bottom: 4px; }
.price-val { font-size: 22px; font-weight: 700; color: var(--text); }

.calc-card {
  background: var(--g-pale); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px; margin-bottom: 16px;
}
.calc-tabs { display: flex; background: var(--white); border-radius: 7px; padding: 4px; margin-bottom: 12px; }
.calc-tab {
  flex: 1; text-align: center; font-size: 13px; font-weight: 700;
  padding: 8px 0; border-radius: 5px; cursor: pointer; color: var(--mid); transition: .2s;
}
.calc-tab.active { background: var(--g2); color: #fff; }
.calc-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.calc-input {
  flex: 1; border: 1.5px solid var(--border); border-radius: 7px;
  padding: 10px; font-size: 16px; font-weight: 700; background: var(--white); outline: none;
}
.calc-input:focus { border-color: var(--g3); background: #fff; }
.calc-eq { font-size: 13px; color: var(--muted); text-align: right; min-width: 90px; }
.calc-total {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 12px; border-top: 1px solid var(--border);
}
.calc-total-label { font-size: 14px; font-weight: 600; color: var(--mid); }
.calc-total-price { font-size: 24px; font-weight: 700; color: #000; }

.action-btns-wrap { margin-top: 0px; display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }
.action-btns { display: flex; gap: 8px; width: 100%; }
.btn-cart, .btn-buy {
  flex: 1; padding: 14px 0; border-radius: 10px; border: none; cursor: pointer;
  font-family: 'Mulish', sans-serif; font-size: 14px; font-weight: 700;
  color: #fff; display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: filter .15s;
}
.btn-cart { background: #30B45B; }
.btn-buy  { background: #fff; color: #30B45B !important; text-decoration: none; border: 1px solid #30B45B; }
.btn-cart:hover, .btn-buy:hover { filter: brightness(1.15); }
.btn-cart:disabled, .btn-cart.disabled { background: #cccccc; cursor: not-allowed; }

.btn-upload {
  width: 100%; padding: 12px 0; border-radius: 10px; border: 1.5px solid var(--border);
  background: var(--white); font-family: 'Mulish', sans-serif; font-size: 13px; font-weight: 600;
  color: var(--mid); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: border-color .15s, color .15s;
}
.btn-upload:hover { border-color: var(--g2); color: var(--g2); }

.svc-title {
  font-size: 13px; font-weight: 700; color: var(--mid);
  display: flex; align-items: center; gap: 6px; margin-bottom: 10px;
}
.svc-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.svc-item {
  display: flex; align-items: center; gap: 8px; background: var(--g-pale); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px; transition: border-color .14s;
}
.svc-item:hover { border-color: var(--g3); }
.svc-item input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--g2); cursor: pointer; flex-shrink: 0; margin: 0; }
.svc-item label { flex: 1; font-size: 13px; font-weight: 500; cursor: pointer; margin: 0; }
.svc-price { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* =========================================
   ДОСТАВКА И МЕССЕНДЖЕРЫ
========================================= */
.delivery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 22px; }
.dlv-card {
    background: var(--g-pale); border-radius: 8px; padding: 20px;
    display: flex; align-items: flex-start; gap: 12px; border: 1px solid #e9ecef;
}
.dlv-icon { flex-shrink: 0; color: #30b45b; width: 22px; height: 22px; margin-top: 2px; }
.dlv-icon.blue { color: #4285f4; }
.dlv-title { font-size: 13px; font-weight: 800; color: var(--text); margin-bottom: 3px;}
.dlv-desc { font-size: 11px; color: var(--muted); line-height: 1.2; }

@media(max-width: 500px) { .delivery-grid { grid-template-columns: 1fr; } }

.contact-box-green {
    background: var(--g-pale); border: 1px solid #cde9d4; border-radius: 8px; padding: 16px; margin-bottom: 20px;
}
.contact-box-green .contact-hint-title { font-size: 14px; font-weight: 800; margin-bottom: 5px; color: var(--text);}
.contact-box-green .contact-hint-sub { font-size: 13px; color: var(--mid); margin-bottom: 14px;}
.contact-btns-new { display: flex; gap: 10px; }
.contact-btns-new .btn-social {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 0; border-radius: 6px; text-decoration: none;
    font-size: 14px; font-weight: 700; color: #fff !important; transition: filter .15s, transform .12s;
}
.contact-btns-new .btn-social:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-wa-new { background: #6641E3; }
.btn-tg-new { background: #2aa1db; }

/* =========================================
   НИЖНЯЯ ЧАСТЬ: ТАБЫ И ТЕКСТЫ
========================================= */
.modern-tabs-nav {
    display: flex !important; flex-direction: row !important; flex-wrap: wrap !important; 
    gap: 12px !important; margin-bottom: 30px !important; width: 100% !important;
    background: transparent !important; padding: 0 !important; border: none !important;
}
.modern-tabs-nav a {
    display: inline-flex !important; align-items: center !important; justify-content: center !important;
    padding: 12px 25px !important; background: #f4fbf4 !important; color: #333333 !important;
    border-radius: 8px !important; font-weight: 600 !important; text-decoration: none !important;
    transition: all 0.2s ease !important; font-size: 15px !important; border: 1px solid #cce0cc !important;
    width: auto !important; margin: 0 !important;
}
.modern-tabs-nav a:hover { border-color: #30b45b !important; color: #30b45b !important; }
.modern-tabs-nav a.product-list-active {
    background: #30b45b !important; border-color: #30b45b !important; color: #ffffff !important;
}

.modern-section-title {
    font-size: 24px; color: #2c3e50; border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px; margin-top: 0; margin-bottom: 20px; font-weight: 700;
}

/* --- Стили для текста (ОПИСАНИЕ) --- */
.product-detail-content { font-family: 'Inter', 'Mulish', sans-serif; line-height: 1.6; color: #333; font-size: 15px; }
.product-detail-content h3 { font-size: 1.5em; color: #2c3e50; margin-top: 1.5em; margin-bottom: 1em; font-weight: 700; }
.product-detail-content p { margin-bottom: 1em; }
.product-detail-content b, .product-detail-content strong { font-weight: 700; color: #34495e; }
.product-detail-content i, .product-detail-content em { font-style: italic; color: #555; }
.product-detail-content ul, .product-detail-content ol { padding-left: 20px; margin-bottom: 1em; }
.product-detail-content li { margin-bottom: 0.5em; }
.product-detail-content dl { margin-bottom: 1.5em; }
.product-detail-content dt { font-weight: bold; color: #2c3e50; margin-top: 1em; }
.product-detail-content dd { margin-left: 20px; margin-bottom: 1em; }
.product-detail-content blockquote {
    background-color: #f2fbf4; border-left: 5px solid #30B45B; margin: 1.5em 0; padding: 1em 1.5em; font-style: italic; color: #555;
}
.product-detail-content a { color: #3498db; text-decoration: none; }
.product-detail-content a:hover { text-decoration: underline; }

/* --- Спойлеры --- */
.product-detail-content details { background-color: #f2fbf4; border: 1px solid #ddd; border-radius: 8px; padding: 1em; margin: 1.5em 0; }
.product-detail-content summary {
    font-weight: bold; cursor: pointer; color: #30B45B; outline: none; list-style: none; position: relative; padding-left: 24px; 
}
.product-detail-content summary::-webkit-details-marker { display: none; }
.product-detail-content summary::before {
    content: ''; position: absolute; left: 4px; top: 50%; transform: translateY(-50%);
    width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent;
    border-left: 7px solid #30B45B; transition: transform 0.2s ease;
}
.product-detail-content details[open] summary::before { transform: translateY(-50%) rotate(90deg); }
.product-detail-content details p { margin-top: 15px; margin-bottom: 0; }

/* --- Таблицы --- */
.table-responsive { width: 100%; overflow-x: auto; margin-bottom: 1rem; border-radius: 8px; border: 1px solid #dee2e6; }
.product-detail-content table, .product-detail-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.product-detail-content th, .product-detail-content td, .product-detail-table th, .product-detail-table td {
    padding: 12px 15px; text-align: left; border-bottom: 1px solid #dee2e6; color: #333;
}
.product-detail-content thead th, .product-detail-table thead th { background-color: #f2fbf4; color: #343a40; font-weight: 700; }
.product-detail-content tbody tr:nth-of-type(even), .product-detail-table tbody tr:nth-of-type(even) { background-color: #f2fbf4; }
.product-detail-content tbody tr:hover, .product-detail-table tbody tr:hover { background-color: #f2fbf4; }
.product-detail-table td:first-child { color: var(--muted, #7a907a); width: 50%; }
.product-detail-table td:last-child { font-weight: 600; }