/* style-theme.css — стили для страниц тем */
/* Архив тем */

.site-main.page-themes h1.page-title {
margin: 15px 0px;}

.site-main.page-themes p.page-description {
margin: 15px 0px;}

/* Двухколоночный макет */
.single-theme .theme-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

/* Современное оформление каталога и страницы темы. */
.theme-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.theme-card { background: var(--bga); color: var(--text); border: 1px solid color-mix(in srgb, var(--text) 14%, transparent); border-radius: 16px; box-shadow: 0 12px 28px rgba(0,0,0,.16); }
.theme-card:hover { transform: translateY(-6px); box-shadow: 0 18px 34px rgba(0,0,0,.25); }
.theme-card .card-image { height: 190px; background: color-mix(in srgb, var(--text) 8%, transparent); }
.theme-card .card-content { padding: 20px; }
.theme-card .card-title, .theme-card .card-title a, .theme-card .card-excerpt, .theme-card .card-meta { color: var(--text); }
.theme-card .card-title { font-size: 1.3rem; line-height: 1.25; }
.theme-card .card-excerpt { opacity: .76; }
.theme-card .card-meta { border-top-color: color-mix(in srgb, var(--text) 14%, transparent); }
.theme-card .card-meta .version { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--text); }
.theme-card .card-download a, .load-more-btn { background: var(--accent); border-radius: 10px; padding: .65rem 1.35rem; }
.theme-card .card-download a:hover, .load-more-btn:hover { background: var(--accent); filter: brightness(1.1); }

.single-theme { max-width: 1180px; margin: 0 auto; padding: 36px 24px 56px; color: var(--text); }
.single-theme .entry-title { color: var(--text); border: 0; text-align: left; padding: 0; margin: 0 0 26px; }
.single-theme .theme-layout { gap: 28px; align-items: stretch; }
.single-theme .theme-left { flex-basis: 52%; max-width: 52%; }
.single-theme .theme-screenshot { margin: 0; height: 100%; }
.single-theme .theme-screenshot img { display: block; width: 100%; max-height: 680px; object-fit: contain; background: var(--bga); border-color: color-mix(in srgb, var(--text) 14%, transparent); }
.single-theme .theme-right { display: flex; flex-direction: column; gap: 18px; padding: 24px; border-radius: 16px; background: var(--bga); border: 1px solid color-mix(in srgb, var(--text) 14%, transparent); box-shadow: 0 12px 28px rgba(0,0,0,.14); }
.single-theme .theme-description, .single-theme .theme-meta { margin: 0; padding: 0; background: transparent; box-shadow: none; color: var(--text); }
.single-theme .theme-description h2, .single-theme .theme-meta h2 { color: var(--text); font-size: 1.25rem; border-bottom-color: color-mix(in srgb, var(--text) 16%, transparent); }
.single-theme .theme-meta li { border-bottom-color: color-mix(in srgb, var(--text) 14%, transparent); }
.single-theme .theme-meta strong { color: var(--text); }
.single-theme .theme-meta a { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--text); }
.single-theme .entry-footer { text-align: left; margin-top: 28px; }
.single-theme .entry-footer a { background: var(--accent); border-radius: 10px; padding: .8rem 1.2rem; }
.single-theme .entry-footer a:hover { background: var(--accent); filter: brightness(1.1); }
@media (max-width: 768px) { .single-theme { padding: 24px 16px 40px; } .single-theme .theme-left { max-width: 100%; } .single-theme .theme-right { padding: 18px; } }

.single-theme .theme-left {
    flex: 0 0 60%; /* ширина левой колонки */
    max-width: 60%;
}

.single-theme .theme-right {
    flex: 1 1 auto;
}

.single-theme .theme-screenshot img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* На мобильных устройствах колонки становятся вертикальными */
@media (max-width: 768px) {
    .single-theme .theme-layout {
        flex-direction: column;
    }
    .single-theme .theme-left {
        flex: 1 1 auto;
        max-width: 100%;
    }
    .single-theme .theme-right {
        flex: 1 1 auto;
    }
}

.page-themes .container {
    max-width: 100%;
    margin: 0 15%; /* отступы слева и справа 15% */
    padding: 2rem 0; /* вертикальные отступы */
}

/* Адаптация для мобильных — уменьшаем отступы */
@media (max-width: 1024px) {
    .page-themes .container {
        margin: 0 5%;
    }
}

@media (max-width: 600px) {
    .page-themes .container {
        margin: 0 2%;
        padding: 1rem 0;
    }
}
.post-type-archive-theme .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.post-type-archive-theme .page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.post-type-archive-theme .page-title {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.post-type-archive-theme .page-description {
    font-size: 1.1rem;
    color: #666;
}

/* Сетка карточек */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Карточка темы */
.theme-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.theme-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.theme-card .card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f0f0f0;
}

.theme-card .card-content {
    padding: 1.2rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.theme-card .card-title {
    font-size: 1.3rem;
    margin: 0 0 0.5rem;
    color: #333;
}

.theme-card .card-title a {
    color: #333;
    text-decoration: none;
}
.theme-card .card-title a:hover {
    color: #4CAF50;
}

.theme-card .card-excerpt {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
    flex: 1;
    margin-bottom: 1rem;
}

.theme-card .card-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #777;
    border-top: 1px solid #eee;
    padding-top: 0.8rem;
}

.theme-card .card-meta .author {
    font-weight: 500;
}
.theme-card .card-meta .version {
    background: #e8f5e9;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    color: #2e7d32;
}

.theme-card .card-download {
    margin-top: 0.8rem;
    text-align: center;
}
.theme-card .card-download a {
    display: inline-block;
    padding: 0.4rem 1.5rem;
    background: #4CAF50;
    color: #fff !important;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}
.theme-card .card-download a:hover {
    background: #388E3C;
}

/* Кнопка "Загрузить ещё" и индикатор */
.load-more-wrapper {
    text-align: center;
    margin: 2rem 0;
}

.load-more-btn {
    padding: 0.8rem 2.5rem;
    background: #4CAF50;
    color: #fff !important;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}
.load-more-btn:hover {
    background: #388E3C;
}
.load-more-btn:disabled {
    background: #aaa;
    cursor: not-allowed;
}

#loading-indicator {
    font-size: 1.1rem;
    color: #666;
    padding: 1rem;
}

/* Адаптив */
@media (max-width: 600px) {
    .theme-grid {
        grid-template-columns: 1fr;
    }
}
/* Общие настройки контейнера */
.single-theme .site-main {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Заголовок */
.single-theme .entry-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
    color: #333;
    border-bottom: 3px solid #4CAF50;
    padding-bottom: 0.5rem;
}

/* Блок скриншота */
.single-theme .theme-screenshot {
    text-align: center;
    margin: 2rem 0;
}

.single-theme .theme-screenshot img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border: 1px solid #e0e0e0;
    transition: transform 0.3s ease;
}

.single-theme .theme-screenshot img:hover {
    transform: scale(1.02);
}

/* Описание */
.single-theme .theme-description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #444;
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 8px;
    margin: 2rem 0;
}

.single-theme .theme-description h2 {
    color: #4CAF50;
    font-size: 1.6rem;
    border-bottom: 2px solid #ddd;
    padding-bottom: 0.3rem;
    margin-top: 0;
}

/* Мета-данные (детали) */
.single-theme .theme-meta {
    background: #fff;
    padding: 1.5rem 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin: 2rem 0;
}

.single-theme .theme-meta h2 {
    color: #4CAF50;
    font-size: 1.6rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.3rem;
    margin-top: 0;
}

.single-theme .theme-meta ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
}

.single-theme .theme-meta li {
    padding: 0.6rem 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
}

.single-theme .theme-meta li:last-child {
    border-bottom: none;
}

.single-theme .theme-meta strong {
    display: inline-block;
    width: 120px;
    color: #555;
    font-weight: 600;
}

.single-theme .theme-meta a {
    color: #4CAF50;
    text-decoration: none;
    font-weight: 500;
    padding: 0.4rem 1.2rem;
    background: #e8f5e9;
    border-radius: 30px;
    transition: background 0.2s;
}

.single-theme .theme-meta a:hover {
    background: #c8e6c9;
}

/* Футер статьи */
.single-theme .entry-footer {
    margin-top: 3rem;
    text-align: center;
}

.single-theme .entry-footer a {
    display: inline-block;
    padding: 0.6rem 2rem;
    background: #4CAF50;
    color: #fff !important;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}

.single-theme .entry-footer a:hover {
    background: #388E3C;
    text-decoration: none;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .single-theme .entry-title {
        font-size: 1.8rem;
    }
    .single-theme .theme-meta li {
        flex-direction: column;
        align-items: flex-start;
    }
    .single-theme .theme-meta strong {
        width: auto;
        margin-bottom: 0.2rem;
    }
    .single-theme .theme-meta {
        padding: 1rem;
    }
}

/* Overrides loaded last so they win over legacy light-theme rules. */
.theme-card{background:var(--bga);color:var(--text);border:1px solid color-mix(in srgb,var(--text) 14%,transparent);border-radius:16px;box-shadow:0 12px 28px #0003}.theme-card:hover{transform:translateY(-6px);box-shadow:0 18px 34px #0005}.theme-card .card-title,.theme-card .card-title a,.theme-card .card-excerpt,.theme-card .card-meta{color:var(--text)}.theme-card .card-excerpt{opacity:.76}.theme-card .card-meta{border-top-color:color-mix(in srgb,var(--text) 14%,transparent)}.theme-card .card-meta .version{background:color-mix(in srgb,var(--accent) 18%,transparent);color:var(--text)}.theme-card .card-download a,.load-more-btn{background:var(--accent);border-radius:10px}.theme-card .card-download a:hover,.load-more-btn:hover{background:var(--accent);filter:brightness(1.1)}
.single-theme{max-width:1180px;margin:0 auto;padding:36px 24px 56px;color:var(--text)}.single-theme .entry-title{color:var(--text);border:0;text-align:left;padding:0;margin:0 0 26px}.single-theme .theme-layout{gap:28px;align-items:stretch}.single-theme .theme-left{flex-basis:52%;max-width:52%}.single-theme .theme-screenshot{margin:0}.single-theme .theme-screenshot img{display:block;width:100%;max-height:680px;object-fit:contain;background:var(--bga);border-color:color-mix(in srgb,var(--text) 14%,transparent)}.single-theme .theme-right{display:flex;flex-direction:column;gap:18px;padding:24px;border-radius:16px;background:var(--bga);border:1px solid color-mix(in srgb,var(--text) 14%,transparent);box-shadow:0 12px 28px #0003}.single-theme .theme-description,.single-theme .theme-meta{margin:0;padding:0;background:transparent;box-shadow:none;color:var(--text)}.single-theme .theme-description h2,.single-theme .theme-meta h2{color:var(--text);border-bottom-color:color-mix(in srgb,var(--text) 16%,transparent)}.single-theme .theme-meta li{border-bottom-color:color-mix(in srgb,var(--text) 14%,transparent)}.single-theme .theme-meta strong{color:var(--text)}.single-theme .theme-meta a{background:color-mix(in srgb,var(--accent) 18%,transparent);color:var(--text)}.single-theme .entry-footer{text-align:left;margin-top:28px}.single-theme .entry-footer a{background:var(--accent);border-radius:10px}.single-theme .entry-footer a:hover{background:var(--accent);filter:brightness(1.1)}
.theme-card .card-meta .version{border-radius:7px;padding:.22rem .55rem}.theme-card .card-download a{border-radius:8px;padding:.55rem 1.15rem}.theme-card .card-download a:hover,.theme-card .card-download a:focus{background:var(--accent);color:#fff!important;filter:brightness(1.12);outline:2px solid color-mix(in srgb,var(--accent) 50%,transparent);outline-offset:2px}
/* WordPress also uses .single-theme on <body>; do not constrain the global page. */
body.single-theme{max-width:none;margin:0;padding:0}
.single-theme .theme-meta a:hover,.single-theme .theme-meta a:focus{background:var(--accent);color:#fff;filter:brightness(1.1);outline:2px solid color-mix(in srgb,var(--accent) 50%,transparent);outline-offset:2px}
.single-theme .theme-meta a{border-radius:8px;padding:.5rem 1rem}
.theme-edit-button,.theme-edit-form button{border:0;border-radius:8px;background:var(--accent);color:#fff;padding:.7rem 1rem;font:inherit;font-weight:700;cursor:pointer}.theme-edit-button{margin-left:12px}.theme-edit-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:22px;padding:22px;background:var(--bga);border:1px solid color-mix(in srgb,var(--text) 14%,transparent);border-radius:14px}.theme-edit-form label{display:grid;gap:6px;color:var(--text);font-weight:600}.theme-edit-form input,.theme-edit-form textarea{box-sizing:border-box;width:100%;padding:10px;border:1px solid color-mix(in srgb,var(--text) 25%,transparent);border-radius:7px;background:transparent;color:var(--text);font:inherit}.theme-edit-wide,.theme-edit-actions,.theme-edit-error{grid-column:1/-1}.theme-edit-actions{display:flex;gap:10px}.theme-edit-cancel{background:transparent!important;border:1px solid var(--accent)!important;color:var(--accent)!important}.theme-edit-error{color:#ef4444;margin:0}@media(max-width:650px){.theme-edit-form{grid-template-columns:1fr}.theme-edit-button{margin:12px 0 0;display:block}}
.theme-edit-form[hidden]{display:none!important}
.single-theme .entry-footer{display:flex;align-items:center;gap:12px}.single-theme .entry-footer a,.single-theme .theme-edit-button{box-sizing:border-box;height:44px;padding:0 18px;display:inline-flex;align-items:center;justify-content:center}.single-theme .entry-footer a{background:transparent;border:1px solid var(--accent);color:var(--accent)!important}.single-theme .entry-footer a:hover,.single-theme .entry-footer a:focus{background:var(--accent);color:#fff!important}.single-theme .theme-edit-button{margin:0;background:var(--accent);color:#fff}
.theme-edit-form input[type=file]{padding:6px!important;cursor:pointer}.theme-edit-form input[type=file]::file-selector-button{margin-right:10px;padding:8px 12px;border:0;border-radius:7px;background:var(--accent);color:#fff;font:inherit;font-weight:700;cursor:pointer}.theme-edit-form input[type=file]::file-selector-button:hover{filter:brightness(1.1)}.theme-edit-form input[type=file]:focus{outline:2px solid var(--accent);outline-offset:2px}
.theme-edit-progress{grid-column:1/-1;margin-top:4px}.theme-edit-progress b{display:block;margin-bottom:7px}.theme-edit-progress span{display:block;width:0;height:8px;border-radius:4px;background:var(--accent);transition:width .2s}
