/**
 * Promo Herb — Как применить промокод
 * v6.0 — Три стиля: карточки, список, компактный
 */

/* =============================================
   СТИЛЬ 1: КАРТОЧКИ СО СКРИНШОТАМИ
============================================= */

.how-to-apply {
    margin: 40px 0;
}

.how-to-apply .section-header {
    text-align: center;
    margin-bottom: 16px;
}

.how-to-apply .section-header h3 {
    font-size: 24px;
    font-weight: 600;
    color: #222;
    margin: 0 0 8px 0;
}

.how-to-apply .section-header p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.step-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 12px;
}

.step-num,
.step-icon {
    display: none;
}

.step-card h4 {
    font-size: 15px;
    font-weight: 600;
    color: #222;
    margin: 0 0 8px 0;
    order: 1;
}

.step-card:nth-child(1) h4::before { content: "1. "; color: #2e7d32; }
.step-card:nth-child(2) h4::before { content: "2. "; color: #2e7d32; }
.step-card:nth-child(3) h4::before { content: "3. "; color: #2e7d32; }
.step-card:nth-child(4) h4::before { content: "4. "; color: #2e7d32; }

.step-image {
    width: 100%;
    height: 140px;
    margin: 0 0 8px 0;
    border-radius: 6px;
    overflow: hidden;
    background: #fafafa;
    display: block;
    order: 2;
}

.step-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.step-card p {
    font-size: 14px;
    color: #666;
    line-height: 1.45;
    margin: 0;
    order: 3;
}

.step-card a {
    color: inherit;
    text-decoration: underline;
}

.promo-tip-inline {
    margin-top: 16px;
    font-size: 14px;
    color: #666;
    text-align: center;
}

/* =============================================
   СТИЛЬ 2: ТЕКСТОВЫЙ СПИСОК (ul/li)
============================================= */

.howto-list {
    max-width: 800px;
    margin: 32px auto;
    padding: 0 16px;
}

.howto-list-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: center;
}

.howto-list-steps {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
}

.howto-list-steps li {
    display: flex;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 15px;
    line-height: 1.45;
}

.howto-list-steps li:last-child {
    border-bottom: none;
}

.list-step-num {
    font-weight: 600;
    color: #2e7d32;
    min-width: 22px;
}

.list-step-text a {
    color: inherit;
    text-decoration: underline;
}

.list-step-text a:hover {
    text-decoration: underline;
}

.howto-list-note {
    font-size: 13px;
    color: #666;
    margin-top: 12px;
    text-align: center;
}

/* =============================================
   СТИЛЬ 3: КОМПАКТНЫЙ GRID
============================================= */

.howto-compact {
    margin: 10px auto 40px;
    padding: 16px 16px 14px;
    background: #f9fafb;
    border-radius: 8px;
}

.howto-compact-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 12px;
    text-align: center;
}

.howto-compact-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.howto-compact-step {
    display: flex;
    gap: 10px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.45;
}

.compact-step-num {
    font-weight: 600;
    color: #2e7d32;
    min-width: 16px;
}

.compact-step-text strong {
    display: block;
    margin-bottom: 2px;
}

.compact-step-text a {
    color: #2e7d32;
    text-decoration: none;
}

.compact-step-text a:hover {
    text-decoration: underline;
}

.howto-compact-note {
    font-size: 13px;
    color: #666;
    margin-top: 10px;
    text-align: center;
}

/* =============================================
   РЕДАКТОР GUTENBERG
============================================= */

.step-image-placeholder,
.step-image-upload {
    width: 100%;
    height: 140px;
    background: #f5f5f5;
    border: 2px dashed #ddd;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    cursor: pointer;
    margin-bottom: 8px;
}

.step-image-preview {
    position: relative;
    margin-bottom: 8px;
}

.step-image-preview img {
    width: 100%;
    height: 140px;
    object-fit: contain;
    border-radius: 6px;
    background: #fafafa;
}

.step-image-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    background: rgba(0,0,0,0.5) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50%;
    cursor: pointer;
    font-size: 11px;
}

/* =============================================
   АДАПТИВ
============================================= */

@media (max-width: 900px) {
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .howto-compact-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .howto-compact-row {
        grid-template-columns: 1fr;
    }
}
