/* pages/static/pages/css/shop_general.css */
/* ОБЩИЕ стили для всех страниц раздела «Визуализация интернет-магазина» */

/* ============================================================
   HERO
   ============================================================ */
.hero {
    background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--accent-soft) 100%);
    color: var(--text-heading);
    border-radius: 14px;
    padding: 42px 36px;
    margin-bottom: 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: background 0.35s ease, border-color 0.35s ease, color 0.35s ease;
}

:root[data-theme="light"] .hero {
    background: linear-gradient(135deg, #ffffff 0%, #e6ecff 100%);
    color: var(--text-heading);
}

.hero h1 {
    margin: 0 0 10px;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    line-height: 1.25;
    color: var(--text-heading);
    letter-spacing: -0.4px;
}

.hero p {
    margin: 0;
    opacity: 0.92;
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 720px;
    color: var(--text-muted);
    transition: color 0.35s ease;
}

/* ============================================================
   СЕКЦИИ
   ============================================================ */
section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    transition: background-color 0.35s ease, border-color 0.35s ease;
}

section > h2 {
    margin: 0 0 18px;
    font-size: 1.5rem;
    color: var(--text-heading);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-soft);
    letter-spacing: -0.3px;
    transition: color 0.35s ease, border-color 0.35s ease;
}

h3 {
    margin: 26px 0 10px;
    font-size: 1.15rem;
    color: var(--text-heading);
    transition: color 0.35s ease;
}

h4 {
    margin: 18px 0 8px;
    font-size: 1rem;
    color: var(--text-primary);
    transition: color 0.35s ease;
}

h5 {
    margin: 0 0 6px;
    font-size: 0.95rem;
    color: var(--text-heading);
    font-weight: 700;
}

p {
    margin: 0 0 12px;
    color: var(--text-primary);
    line-height: 1.7;
    transition: color 0.35s ease;
}

ul, ol {
    margin: 0 0 14px;
    padding-left: 22px;
}

li {
    margin-bottom: 6px;
    color: var(--text-primary);
    transition: color 0.35s ease;
}

/* ============================================================
   LEAD / MUTED / ABBR
   ============================================================ */
.lead {
    font-size: 1.08rem;
    line-height: 1.75;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.muted {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-style: italic;
}

abbr {
    text-decoration: underline dotted;
    cursor: help;
    color: var(--accent);
}

/* ============================================================
   CARD — универсальная карточка блока
   (используется как .block-card и .struct-card)
   ============================================================ */
.block-card,
.struct-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin: 20px 0;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform 0.3s ease, box-shadow 0.3s ease,
                background-color 0.35s ease, border-color 0.35s ease;
}

.block-card:hover,
.struct-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--border-strong);
}

.block-card__head,
.struct-card__head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 24px;
    background: linear-gradient(90deg, var(--accent-soft) 0%, transparent 100%);
    border-bottom: 1px solid var(--border);
    transition: background 0.35s ease, border-color 0.35s ease;
}

.block-card__num,
.struct-card__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--accent);
    color: var(--accent-contrast);
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-btn);
}

.block-card__head h3,
.struct-card__head h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-heading);
    letter-spacing: -0.2px;
}

.block-card__body,
.struct-card__body {
    padding: 22px 24px;
}

.block-card__body > p:last-child,
.struct-card__body > p:last-child {
    margin-bottom: 0;
}

.block-card__body p,
.struct-card__body p {
    margin: 0 0 14px;
    color: var(--text-primary);
    line-height: 1.7;
    transition: color 0.35s ease;
}

/* ============================================================
   CALLOUT — акцентные блоки
   ============================================================ */
.callout {
    display: flex;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 10px;
    margin: 16px 0;
    border-left: 4px solid;
    font-size: 0.98rem;
    line-height: 1.65;
    transition: background-color 0.35s ease, border-color 0.35s ease, color 0.35s ease;
}

.callout__icon {
    font-size: 1.15rem;
    flex-shrink: 0;
    line-height: 1.4;
}

.callout__body {
    flex: 1;
    color: var(--text-primary);
}

.callout strong,
.callout__body strong {
    color: var(--text-heading);
}

.callout--info {
    background: rgba(108, 140, 255, 0.08);
    border-color: var(--accent);
}

.callout--info .callout__icon {
    color: var(--accent);
}

.callout--good {
    background: rgba(34, 197, 94, 0.08);
    border-color: #22c55e;
}

.callout--good .callout__icon {
    color: #22c55e;
}

.callout--warn {
    background: rgba(249, 115, 22, 0.08);
    border-color: #f97316;
}

.callout--warn .callout__icon {
    color: #f97316;
}

.callout--tip {
    background: rgba(108, 140, 255, 0.08);
    border-color: var(--accent);
}

.callout--tip .callout__icon {
    color: var(--accent);
}

:root[data-theme="light"] .callout--info,
:root[data-theme="light"] .callout--tip {
    background: rgba(79, 110, 247, 0.08);
}

:root[data-theme="light"] .callout--good {
    background: rgba(22, 163, 74, 0.08);
}

:root[data-theme="light"] .callout--warn {
    background: rgba(234, 88, 12, 0.08);
}

/* ============================================================
   NOTE (заметка)
   ============================================================ */
.note {
    background: rgba(249, 115, 22, 0.08);
    border-left: 4px solid #f97316;
    padding: 14px 18px;
    border-radius: 8px;
    margin: 16px 0;
    font-size: 0.97rem;
    color: var(--text-primary);
    transition: background-color 0.35s ease, color 0.35s ease;
}

.note strong {
    color: #fb923c;
}

:root[data-theme="light"] .note {
    background: rgba(249, 115, 22, 0.1);
}

:root[data-theme="light"] .note strong {
    color: #ea580c;
}

/* ============================================================
   PROS / CONS
   ============================================================ */
.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 14px 0;
}

.pros,
.cons {
    border-radius: 10px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    transition: background-color 0.35s ease, border-color 0.35s ease;
}

.pros {
    background: rgba(34, 197, 94, 0.06);
    border-color: rgba(34, 197, 94, 0.2);
}

.cons {
    background: rgba(239, 68, 68, 0.06);
    border-color: rgba(239, 68, 68, 0.2);
}

:root[data-theme="light"] .pros {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.3);
}

:root[data-theme="light"] .cons {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.3);
}

.pros h4,
.cons h4,
.pros h5,
.cons h5 {
    margin: 0 0 10px;
    font-weight: 700;
}

.pros h4, .pros h5 { color: #16a34a; }
.cons h4, .cons h5 { color: #dc2626; }

:root[data-theme="dark"] .pros h4,
:root[data-theme="dark"] .pros h5 { color: #4ade80; }

:root[data-theme="dark"] .cons h4,
:root[data-theme="dark"] .cons h5 { color: #f87171; }

.pros ul,
.cons ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.pros li,
.cons li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 6px;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--text-primary);
    transition: color 0.35s ease;
}

.pros li::before {
    content: '+';
    position: absolute;
    left: 0;
    color: #22c55e;
    font-weight: 800;
}

.cons li::before {
    content: '−';
    position: absolute;
    left: 0;
    color: #ef4444;
    font-weight: 800;
}

.pros li:last-child,
.cons li:last-child {
    margin-bottom: 0;
}

.pros li strong,
.cons li strong {
    color: var(--text-heading);
}

/* ============================================================
   DIVIDER
   ============================================================ */
.divider {
    height: 1px;
    background: var(--border);
    margin: 26px 0;
    transition: background-color 0.35s ease;
}

/* ============================================================
   GLOSSARY
   ============================================================ */
.glossary dt {
    font-weight: 700;
    margin-top: 12px;
    color: var(--text-heading);
    transition: color 0.35s ease;
}

.glossary dd {
    margin: 4px 0 0 0;
    color: var(--text-muted);
    transition: color 0.35s ease;
}

/* ============================================================
   ПЛАВНЫЕ ПЕРЕХОДЫ ТЕМЫ
   ============================================================ */
.theme-transition,
.theme-transition *,
.theme-transition *::before,
.theme-transition *::after {
    transition: background-color 0.45s ease,
                color 0.45s ease,
                border-color 0.45s ease,
                box-shadow 0.45s ease !important;
}

/* ============================================================
   СКРОЛЛ К ЯКОРЯМ (компенсация sticky-хедера)
   ============================================================ */
section[id] {
    scroll-margin-top: 90px;
}

/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (max-width: 900px) {
    .method-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .hero {
        padding: 30px 22px;
        border-radius: 12px;
    }

    section {
        padding: 22px 18px;
        border-radius: 12px;
    }

    section > h2 {
        font-size: 1.3rem;
    }

    .pros-cons {
        grid-template-columns: 1fr;
    }

    .block-card__head,
    .struct-card__head {
        padding: 16px 18px;
    }

    .block-card__body,
    .struct-card__body {
        padding: 18px;
    }

    .block-card__num,
    .struct-card__num {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }

    .block-card__head h3,
    .struct-card__head h3 {
        font-size: 1.1rem;
    }

    .callout {
        padding: 14px 16px;
        font-size: 0.94rem;
    }
}