/* --- 1. ОФОРМЛЕНИЕ КАРТОЧЕК ТОВАРОВ (Светлый фон) --- */

/* Заголовки */
.detail-text h2, .news-detail h2 {
    color: #000 !important;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin: 30px 0 15px 0;
    font-size: 24px;
    font-weight: bold;
}

.detail-text h3, .news-detail h3 {
    margin-top: 25px;
    color: #444 !important;
    font-size: 20px;
    font-weight: bold;
}

/* Списки и точки (Исправлено) */
.detail-text ul, .news-detail ul {
    padding-left: 25px !important;
    margin-bottom: 20px !important;
    list-style-type: disc !important;
    display: block !important;
}

.detail-text li, .news-detail li {
    display: list-item !important;
    margin-bottom: 10px !important;
    line-height: 1.6 !important;
    list-style: disc inside !important;
    color: #333;
}

/* Таблицы характеристик */
.detail-text table, .news-detail table {
    width: 100% !important;
    border-collapse: collapse;
    margin: 25px 0;
    border: 1px solid #ddd;
}

.detail-text table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
    line-height: 1.5;
    color: #333;
}

.detail-text table tr:nth-child(odd) {
    background-color: #fcfcfc;
}

.detail-text table td:first-child {
    font-weight: bold;
    width: 35%;
}

/* Цитаты (для светлого фона в товарах) */
.detail-text blockquote, .news-detail blockquote {
    margin: 25px 0;
    padding: 20px;
    /* Цвет #ADA090 с прозрачностью 15% (последняя цифра 0.15) */
    background: rgba(173, 160, 144, 0.15) !important; 
    border-left: 5px solid #ADA090 !important;
    font-style: italic;
    color: #333 !important; /* Делаем текст чуть темнее для читаемости */
    border-radius: 0 4px 4px 0; /* Легкое закругление углов справа */
}

/* Ссылки (Золотисто-бежевый) */
.detail-text a {
    color: #ADA090;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
    font-weight: 600;
}

.detail-text a:hover {
    color: #8C7D71;
    border-bottom: 1px solid #8C7D71;
}

/* --- 2. ГАЛЕРЕЯ В ИНТЕРЬЕРАХ --- */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin: 30px 0 45px 0;
}

.gallery-item {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: transform 0.3s ease;
}

.gallery-item img:hover {
    transform: scale(1.03);
}

.image-caption {
    font-size: 13px;
    color: #888;
    line-height: 1.4;
    text-align: left;
    padding: 0 5px;
}

/* --- 3. СПЕЦИАЛЬНАЯ АДАПТАЦИЯ ДЛЯ ТЕМНОГО ФОНА (Интерьеры) --- */

/* Если на странице есть галерея, делаем весь последующий текст белым */
.gallery-grid ~ p, 
.gallery-grid ~ .detail-text,
.gallery-grid ~ .detail-text p,
.gallery-grid ~ .detail-text li,
.gallery-grid ~ ul li {
    color: #ffffff !important;
}

/* Заголовки на темном фоне */
.gallery-grid ~ h2, .gallery-grid ~ .detail-text h2,
.gallery-grid ~ h3, .gallery-grid ~ .detail-text h3 {
    color: #ffffff !important;
    border-bottom-color: #ADA090 !important;
}

/* Цитата на темном фоне (с полупрозрачной подложкой) */
.gallery-grid ~ blockquote,
.gallery-grid ~ .detail-text blockquote {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border-left: 5px solid #ADA090 !important;
}

/* Ссылки на темном фоне (чуть светлее для контраста) */
.gallery-grid ~ a,
.gallery-grid ~ .detail-text a,
.gallery-grid ~ p a {
    color: #D6CBBF !important;
}