/* Страницы услуг на общем шаблоне (service_page_template.php) */

.sp-section { padding: var(--section-y) 0; }
.sp-heading { text-align: left; margin-bottom: var(--heading-gap); color: var(--primary); }

.sp-price-text { font-size: 18px !important; }

/* Блок цен */
.sp-price-card {
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 25px 30px;
    background: #f8fbf9;
}
.sp-price-title {
    color: var(--primary);
    font-size: var(--fs-h2);
    font-weight: var(--fw-heavy);
    margin: 0 0 var(--space-4);
    line-height: 1.2;
}
.sp-price-body { overflow-x: auto; }
.sp-price-body h3 { color: var(--primary); font-size: var(--fs-h3); margin: var(--space-5) 0 var(--space-3); }
.sp-price-body h3:first-child { margin-top: 0; }
.sp-price-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: center;
    background: #fff;
}
.sp-price-body th {
    background: var(--primary);
    color: #fff;
    padding: 10px;
    border: 1px solid #ccc;
    font-weight: 700;
}
.sp-price-body td { padding: 10px; border: 1px solid #ccc; }
.sp-price-body td:first-child { font-weight: 700; }
.sp-price-body p { margin: 8px 0; line-height: 1.5; }
.sp-price-note {
    margin-top: 18px;
    padding: 14px 18px;
    border-left: 4px solid #f1810b;
    background: #fff7ee;
    font-size: 14px;
    line-height: 1.6;
}

/* Подробности */
.sp-info {
    background: #fff;
    border-radius: 12px;
    padding: 25px 30px;
    box-shadow: var(--shadow);
    font-size: var(--fs-base);
    line-height: 1.7;
}
.sp-info h3 { color: var(--primary); font-size: var(--fs-h3); margin: var(--space-5) 0 var(--space-2); }
.sp-info h3:first-child { margin-top: 0; }
.sp-info ul { padding-left: 22px; margin: 8px 0; }
.sp-info li { margin-bottom: 6px; }

/* Наши работы */
.sp-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}
.sp-gallery-item {
    padding: 0;
    border: 3px solid #e3efe9;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    cursor: zoom-in;
    aspect-ratio: 4 / 3;
    transition: var(--transition);
}
.sp-gallery-item:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.sp-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

.sp-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .88);
}
.sp-lightbox[hidden] { display: none; }
.sp-lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 6px; }
.sp-lb-close, .sp-lb-nav {
    position: absolute;
    border: 0;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    cursor: pointer;
    border-radius: 50%;
}
.sp-lb-close { top: 16px; right: 20px; width: 46px; height: 46px; font-size: 32px; line-height: 1; }
.sp-lb-nav { top: 50%; width: 52px; height: 52px; margin-top: -26px; font-size: 38px; line-height: 1; }
.sp-lb-prev { left: 16px; }
.sp-lb-next { right: 16px; }

/* Бегущая лента логотипов */
.sp-logos {
    overflow: hidden;
    padding: 10px 0 20px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.sp-logos-track {
    display: flex;
    align-items: center;
    gap: 56px;
    width: max-content;
    padding-right: 56px;
    animation: sp-logos-run 140s linear infinite;
}
.sp-logos:hover .sp-logos-track { animation-play-state: paused; }
.sp-logos-track img {
    height: 70px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    flex: 0 0 auto;
    opacity: .85;
    transition: opacity .3s ease;
}
.sp-logos-track img:hover { opacity: 1; }
@keyframes sp-logos-run { to { transform: translateX(-50%); } }
@media (max-width: 768px) {
    .sp-logos-track { gap: 36px; padding-right: 36px; animation-duration: 110s; }
    .sp-logos-track img { height: 48px; max-width: 160px; }
}
@media (prefers-reduced-motion: reduce) {
    .sp-logos { overflow-x: auto; }
    .sp-logos-track { animation: none; }
}

/* Окно заказа */
.sp-order-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 700;
    color: #333;
}
.sp-input {
    display: block;
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font: inherit;
    font-size: 14px;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .sp-price-card, .sp-info { padding: 18px 16px; }
    .sp-price-title { font-size: 21px; }
    .sp-gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .sp-lb-nav { width: 42px; height: 42px; font-size: 30px; }
}

/* ---------- Стенды: схема расчёта + расшифровка цен (stendy.php) ---------- */
.stend-scheme { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-6, 32px); align-items: start; }
.stend-scheme__img { margin: 0; text-align: center; position: sticky; top: 90px; }
.stend-scheme__img img { width: 100%; max-width: 560px; height: auto; display: block; margin: 0 auto; }
.stend-scheme__img figcaption { font-size: var(--fs-small); color: var(--text-muted, #666); margin-top: 8px; }
.stend-scheme__legend h3 { margin-top: 0 !important; }
.stend-scheme__legend h3 + .stend-base { margin-top: 0; }
.stend-base, .stend-items li { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border, #e5e5e5); }
.stend-items { list-style: none; margin: 0 0 var(--space-5, 24px); padding: 0; }
.stend-price { font-weight: 800; color: var(--primary); white-space: nowrap; }
.stend-chip { display: inline-grid; place-items: center; justify-self: center; font-size: 11px; font-weight: 700; color: #456; background: linear-gradient(160deg, #dff1fb, #b9def2); border: 1.5px solid #8fb7cc; border-radius: 2px; position: relative; }
.stend-chip::before { content: ""; position: absolute; top: -1px; left: 50%; width: 8px; height: 4px; transform: translateX(-50%); background: #fff; border: 1.5px solid #8fb7cc; border-top: 0; border-radius: 0 0 6px 6px; }
.stend-chip--a3 { width: 40px; height: 52px; }
.stend-chip--a4 { width: 32px; height: 42px; }
.stend-chip--a5 { width: 24px; height: 32px; }
.stend-chip--a6 { width: 18px; height: 24px; font-size: 9px; }
.stend-chip--clip { width: 34px; height: 8px; background: #7d8a92; border-color: #5d6870; border-radius: 3px; }
.stend-chip--clip::before { display: none; }
.stend-chip--base { width: 42px; height: 50px; background: linear-gradient(160deg, #6f8fc7, #c9d8ef); border: 3px solid #3e4a63; border-radius: 1px; }
.stend-chip--base::before { display: none; }
.stend-calc { width: 100%; border-collapse: collapse; }
.stend-calc td { padding: 8px 6px; border-bottom: 1px solid var(--border, #e5e5e5); }
.stend-calc td:last-child { text-align: right; white-space: nowrap; font-weight: 700; }
.stend-calc td:nth-child(2) { color: var(--text-muted, #666); }
.stend-calc__total td { font-weight: 800; font-size: 1.1em; color: var(--primary); border-bottom: 0; }
.stend-note { margin-top: var(--space-4, 16px); font-size: var(--fs-small); }
@media (max-width: 900px) {
    .stend-scheme { grid-template-columns: minmax(0, 1fr); }
    .stend-scheme__img { position: static; }
    .stend-calc td:nth-child(2) { display: none; }
}
.sp-price-body .stend-calc td { border: 0 !important; border-bottom: 1px solid var(--border, #e5e5e5) !important; text-align: left !important; font-weight: 400; background: transparent !important; }
.sp-price-body .stend-calc td:last-child { text-align: right !important; font-weight: 700; }
.sp-price-body .stend-calc .stend-calc__total td { font-weight: 800; color: var(--primary); border-bottom: 0 !important; }
.sp-price-body .stend-calc { border: 0 !important; }
.sp-price-body .stend-calc { min-width: 0 !important; width: 100% !important; }
.sp-price-card--plain { border: 0; background: transparent; padding: 0; }
.stend-scheme__img { position: static; align-self: start; }
.stend-scheme__img figcaption { font-size: var(--fs-body, 17px); line-height: 1.45; color: var(--text); margin-top: 12px; }
.sp-price-body .stend-note { margin: var(--space-6, 32px) auto 0; max-width: 900px; text-align: center; color: var(--primary); font-size: 1.25rem; font-weight: 700; line-height: 1.45; }
.stend-calc-cta { margin-top: var(--space-5, 24px); }
