/* СТО Каталог для WoodMart - Полные стили */

/* Сброс стилей для страницы СТО */
.single-sto .entry-content {
    padding: 0;
}

.single-sto .entry-header {
    display: none;
}

/* Шапка страницы автосервиса */
.sto-page-header {
    background: #f8f9fa;
    padding: 40px 0;
    margin: 0 0 40px 0;
    border-bottom: 1px solid #e9ecef;
}

.sto-header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.sto-header-content {
    display: flex;
    align-items: flex-start;
    gap: 30px;
}

/* Изображение автосервиса */
.sto-header-image {
    flex-shrink: 0;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    background: #fff;
}

.sto-header-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sto-header-image.no-image {
    background: linear-gradient(135deg, #6c757d, #495057);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
}

/* Основная информация */
.sto-header-info {
    flex: 1;
    min-width: 0;
}

/* Метаданные (бейджи) */
.sto-header-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.sto-category-badge {
    background: #6c757d;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sto-status-badge {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sto-status-badge.closed {
    background: #dc3545;
    color: white;
}

.sto-status-badge.open {
    background: #28a745;
    color: white;
}

/* Рейтинг */
.sto-rating-badge {
    background: #ff6b35;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
}

.sto-rating-stars {
    display: flex;
    gap: 1px;
}

.sto-rating-star {
    color: #ffc107;
    font-size: 12px;
}

.sto-rating-star.empty {
    color: rgba(255, 255, 255, 0.3);
}

/* Название автосервиса */
.sto-header-title {
    font-size: 48px;
    font-weight: 900;
    color: #212529;
    margin: 0 0 12px 0;
    line-height: 1.1;
    letter-spacing: -1px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Адрес и социальные сети */
.sto-header-details {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.sto-address {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-size: 16px;
    font-weight: 500;
}

.sto-address i {
    color: #6c757d;
    font-size: 16px;
}

/* Социальные сети */
.sto-social-links {
    display: flex;
    gap: 8px;
}

.sto-social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.3s ease;
}

.sto-social-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.sto-social-link.facebook { background: #1877f2; }
.sto-social-link.instagram { background: #e4405f; }
.sto-social-link.twitter { background: #000000; }
.sto-social-link.youtube { background: #6c757d; }
.sto-social-link.telegram { background: #0088cc; }

/* Контактная информация справа */
.sto-header-contacts {
    flex-shrink: 0;
    text-align: right;
    min-width: 220px;
}

.sto-contact-item {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 16px;
    color: #212529;
    font-weight: 600;
}

.sto-contact-item i {
    color: #212529;
    width: 16px;
    text-align: center;
    font-size: 16px;
}

.sto-contact-item a {
    color: #212529;
    text-decoration: none;
    transition: color 0.3s ease;
}

.sto-contact-item a:hover {
    color: #007bff;
}

/* Дополнительные стили для остальной части страницы */
.sto-details-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.sto-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.sto-info-block {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.sto-info-block h3 {
    margin: 0 0 15px 0;
    color: #212529;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sto-info-block h3 i {
    color: #007bff;
}

/* Телефоны */
.sto-phones-list .phone-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 10px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.phone-number {
    font-weight: 600;
    color: #212529;
    text-decoration: none;
    font-size: 16px;
}

.phone-messengers {
    display: flex;
    gap: 5px;
}

.messenger {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-size: 12px;
    transition: transform 0.2s ease;
}

.messenger:hover {
    transform: scale(1.1);
}

.messenger.viber { background: #665CAC; }
.messenger.whatsapp { background: #25D366; }
.messenger.telegram { background: #0088cc; }

/* Рейтинг */
.sto-rating-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rating-value {
    font-size: 24px;
    font-weight: 700;
    color: #ff6b35;
}

.stars {
    color: #ffc107;
    font-size: 18px;
}

.reviews-count {
    color: #6c757d;
    font-size: 14px;
}

/* Бренды */
.sto-brands-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.sto-brands-section h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #212529;
}

.sto-brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.brand-item {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.brand-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.brand-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 10px;
}

.brand-placeholder {
    width: 60px;
    height: 60px;
    background: #e9ecef;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 24px;
    color: #6c757d;
}

.brand-name {
    font-size: 12px;
    font-weight: 600;
    color: #212529;
    text-transform: uppercase;
}

/* Галерея */
.sto-gallery-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.sto-gallery-section h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #212529;
}

.sto-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

/* Отзывы */
.sto-reviews-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.sto-reviews-section h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #212529;
}

.add-review-form {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.add-review-form h4 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #212529;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #212529;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Рейтинг в форме */
.rating-input {
    display: flex;
    flex-direction: row-reverse;
    gap: 5px;
    justify-content: flex-end;
}

.rating-input input {
    display: none;
}

.rating-input label {
    font-size: 24px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.3s ease;
}

.rating-input input:checked ~ label,
.rating-input label:hover,
.rating-input label:hover ~ label {
    color: #ffc107;
}

.submit-review-btn {
    background: #007bff;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.submit-review-btn:hover {
    background: #0056b3;
}

/* Карусель СТО на страницах товаров */
.woodmart-sto-integration {
    font-family: var(--wd-text-font, inherit);
}

.product-sto-carousel {
    margin: 30px 0;
    background: var(--wd-form-brd-color-focus, #f8f9fa);
    padding: 25px;
    border-radius: var(--wd-brd-radius, 8px);
    border: 1px solid var(--wd-form-brd-color, #e9ecef);
}

.sto-carousel-title {
    margin: 0 0 20px 0;
    font-size: 22px;
    color: var(--wd-text-color, #333);
    border-bottom: 2px solid var(--wd-primary-color, #007cba);
    padding-bottom: 10px;
    font-weight: 600;
}

.sto-carousel-track {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.sto-carousel-item {
    flex: 0 0 calc(25% - 15px);
    background: var(--wd-white-color, white);
    border: 1px solid var(--wd-form-brd-color, #ddd);
    border-radius: var(--wd-brd-radius, 8px);
    overflow: hidden;
    transition: all 0.3s ease;
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

.sto-carousel-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--wd-shadow, 0 8px 25px rgba(0,0,0,0.15));
}

.sto-carousel-content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sto-carousel-name {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.sto-carousel-name a {
    color: var(--wd-text-color, #333);
    text-decoration: none;
    transition: color 0.3s ease;
}

.sto-carousel-name a:hover {
    color: var(--wd-primary-color, #007cba);
}

.sto-carousel-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 8px;
}

.sto-carousel-rating .rating-value {
    font-weight: bold;
    color: var(--wd-orange-color, #ff6b35);
    font-size: 14px;
}

.sto-carousel-rating .stars {
    color: var(--wd-yellow-color, #ffd700);
    font-size: 12px;
}

.sto-carousel-address,
.sto-carousel-phone {
    margin: 4px 0;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 5px;
    line-height: 1.3;
}

.sto-carousel-address i,
.sto-carousel-phone i {
    color: var(--wd-primary-color, #007cba);
    width: 12px;
    font-size: 12px;
    margin-top: 2px;
    flex-shrink: 0;
}

.sto-carousel-phone a {
    color: var(--wd-primary-color, #007cba);
    text-decoration: none;
}

.sto-carousel-phone a:hover {
    text-decoration: underline;
}

.sto-carousel-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 10px;
}

.sto-carousel-actions .sto-details-btn,
.sto-carousel-actions .sto-call-btn {
    padding: 8px 12px;
    font-size: 12px;
    flex: 1;
    text-align: center;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.sto-details-btn {
    background: var(--wd-primary-color, #007cba);
    color: var(--wd-white-color, white);
}

.sto-details-btn:hover {
    background: var(--wd-primary-color-alt, #005a87);
    color: var(--wd-white-color, white);
}

.sto-call-btn {
    background: var(--wd-success-color, #28a745);
    color: var(--wd-white-color, white);
}

.sto-call-btn:hover {
    background: var(--wd-success-color-alt, #218838);
    color: var(--wd-white-color, white);
}

/* Карта */
.sto-map-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.sto-map-container h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #212529;
}

.sto-yandex-map {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .sto-carousel-item {
        flex: 0 0 calc(33.333% - 14px);
    }
}

@media (max-width: 992px) {
    .sto-header-content {
        flex-direction: column;
        text-align: center;
        gap: 25px;
    }
    
    .sto-header-contacts {
        text-align: center;
        min-width: auto;
    }
    
    .sto-contact-item {
        justify-content: center;
    }
    
    .sto-header-title {
        font-size: 36px;
    }
    
    .sto-header-details {
        justify-content: center;
    }
    
    .sto-carousel-item {
        flex: 0 0 calc(50% - 10px);
    }
}

@media (max-width: 768px) {
    .sto-page-header {
        padding: 30px 0;
    }
    
    .sto-header-image {
        width: 120px;
        height: 120px;
    }
    
    .sto-header-title {
        font-size: 28px;
    }
    
    .sto-header-details {
        flex-direction: column;
        gap: 15px;
    }
    
    .sto-header-meta {
        justify-content: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .sto-yandex-map {
        height: 300px;
    }
    
    .sto-carousel-item {
        flex: 0 0 calc(100% - 0px);
    }
    
    .product-sto-carousel {
        padding: 15px;
    }
    
    .sto-carousel-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .sto-header-container {
        padding: 0 15px;
    }
    
    .sto-header-image {
        width: 100px;
        height: 100px;
    }
    
    .sto-header-title {
        font-size: 24px;
    }
    
    .sto-social-link {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .sto-contact-item {
        font-size: 14px;
    }
    
    .sto-carousel-name {
        font-size: 14px;
    }
    
    .sto-carousel-address,
    .sto-carousel-phone {
        font-size: 12px;
    }
    
    .sto-carousel-actions .sto-details-btn,
    .sto-carousel-actions .sto-call-btn {
        font-size: 11px;
        padding: 6px 10px;
    }
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sto-carousel-item {
    animation: fadeIn 0.5s ease-out;
}

/* Совместимость с WoodMart */
.woodmart-sto-integration .sto-details-btn,
.woodmart-sto-integration .sto-call-btn {
    font-family: var(--wd-text-font, inherit);
}
/* Скрываем стандартный заголовок записи СТО */
.single-sto .entry-header {
    display: none !important;
}

/* Скрываем мета-информацию записи */
.single-sto .entry-meta {
    display: none !important;
}

/* Скрываем автора и дату публикации */
.single-sto .post-meta,
.single-sto .entry-date,
.single-sto .author-info,
.single-sto .posted-on {
    display: none !important;
}

/* Скрываем миниатюру записи если она дублируется */
.single-sto .post-thumbnail {
    display: none !important;
}

/* Скрываем заголовок страницы */
.single-sto .page-title,
.single-sto .entry-title {
    display: none !important;
}

/* Скрываем блок с информацией о комментариях */
.single-sto .comments-area,
.single-sto .comment-respond {
    display: none !important;
}

/* Дополнительно для WoodMart темы */
.single-sto .woodmart-post-header,
.single-sto .post-header-meta {
    display: none !important;
}
