/*
Theme Name: Первоцвет 2026
Theme URI: https://pervocvet43.ru
Description: Новая чистая тема садового центра «Первоцвет». Демонстрация переноса главной страницы со старого сайта (insteria) на современный стек (PHP 8.x, WooCommerce). Картинки тянутся ссылками с боевого https://pervocvet43.ru/u/.
Author: Pervocvet dev
Version: 0.1.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: pervocvet-2026
*/

/* ---- Brand palette (взято из логотипа боевой темы) ---- */
:root {
    --pc-green: #21a73f;
    --pc-green-dark: #00843e;
    --pc-lime: #78b833;
    --pc-purple: #5d3d8d;
    --pc-ink: #2b2b2b;
    --pc-muted: #6b7280;
    --pc-bg: #ffffff;
    --pc-bg-soft: #f4f7f2;
    --pc-border: #e5e9e1;
    --pc-radius: 16px;
    --pc-container: 1200px;
}

* { box-sizing: border-box; }

body.pc-body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--pc-ink);
    background: var(--pc-bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--pc-green-dark); text-decoration: none; }
a:hover { color: var(--pc-green); }

.pc-container {
    max-width: var(--pc-container);
    margin: 0 auto;
    padding: 0 20px;
}

/* ---- Header (3 ряда, как на боевой) ---- */
.pc-header { background: #fff; }

/* Ряд 1 — инфо-строка */
.pc-topbar { border-bottom: 1px solid var(--pc-border); font-size: 13px; }
.pc-topbar__inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 20px; padding: 9px 20px;
}
.pc-topbar__delivery { color: var(--pc-muted); white-space: nowrap; }
.pc-topnav { display: flex; gap: 22px; flex-wrap: wrap; }
.pc-topnav a { color: var(--pc-ink); }
.pc-topnav a:hover { color: var(--pc-green); }
.pc-topbar__account { color: var(--pc-ink); white-space: nowrap; }

/* Ряд 2 — логотип + поиск + телефоны */
.pc-header__main-inner {
    display: flex; align-items: center; gap: 32px;
    padding: 18px 20px;
}
.pc-logo img { height: 52px; width: auto; }
.pc-search {
    flex: 1; display: flex; align-items: center;
    border: 1px solid var(--pc-border); border-radius: 10px;
    overflow: hidden; background: #fff; max-width: 640px;
}
.pc-search__input {
    flex: 1; border: 0; outline: 0; padding: 13px 16px; font-size: 15px;
}
.pc-search__btn {
    border: 0; background: var(--pc-green); cursor: pointer;
    padding: 0 18px; align-self: stretch;
    display: flex; align-items: center; justify-content: center;
}
.pc-search__btn img { filter: brightness(0) invert(1); }
.pc-search__btn:hover { background: var(--pc-green-dark); }
.pc-header__contacts {
    display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
    white-space: nowrap;
}
.pc-phone { font-weight: 700; font-size: 17px; color: var(--pc-purple); }
.pc-phone--secondary { font-size: 15px; }
.pc-hours { font-size: 12px; color: var(--pc-muted); }

/* Ряд 3 — зелёная навигация */
.pc-catnav { background: var(--pc-green); }
.pc-catnav__inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; padding: 0 20px;
}
.pc-catnav__list, .pc-catnav__actions {
    list-style: none; margin: 0; padding: 0;
    display: flex; align-items: center; gap: 4px;
}
.pc-catnav__list a, .pc-catnav__action {
    display: flex; align-items: center; gap: 9px;
    color: #fff; font-weight: 600; font-size: 13px; text-transform: uppercase;
    padding: 16px 14px; line-height: 1.1;
}
.pc-catnav__list a:hover, .pc-catnav__action:hover {
    background: var(--pc-green-dark); color: #fff;
}
.pc-catnav__icon { font-size: 20px; }
.pc-catnav__actions { gap: 0; }

/* ---- Buttons ---- */
.pc-btn {
    display: inline-block;
    background: var(--pc-green);
    color: #fff;
    padding: 14px 28px;
    border-radius: 999px;
    font-weight: 600;
    transition: background .15s ease;
}
.pc-btn:hover { background: var(--pc-green-dark); color: #fff; }
.pc-btn--ghost {
    background: transparent;
    color: var(--pc-green-dark);
    border: 2px solid var(--pc-green);
}
.pc-btn--ghost:hover { background: var(--pc-green); color: #fff; }

/* ---- Section ---- */
.pc-section { padding: 56px 0; }
.pc-section--soft { background: var(--pc-bg-soft); }
.pc-section__title {
    text-align: center;
    font-size: clamp(28px, 4vw, 40px);
    margin: 0 0 36px;
    color: var(--pc-ink);
}
.pc-section__cta { text-align: center; margin-top: 36px; }

/* ---- Hero (на всю ширину, как на боевой) ---- */
.pc-hero {
    position: relative;
    overflow: hidden;
    min-height: 540px;
    display: flex;
    align-items: center;
    background: #dfe7d6;
}
.pc-hero__bg {
    position: absolute; inset: 0;
    width: 100%; height: 100%; object-fit: cover;
}
.pc-hero__overlay {
    position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,.5) 0%, rgba(0,0,0,.2) 45%, rgba(0,0,0,0) 75%);
}
.pc-hero .pc-container { position: relative; width: 100%; }
.pc-hero__content {
    color: #fff;
    max-width: 620px;
    padding: 40px 0;
}
.pc-hero__title {
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.18;
    margin: 0 0 28px;
    font-weight: 800;
    text-shadow: 0 2px 12px rgba(0,0,0,.35);
}
.pc-hero__features { display: flex; gap: 40px; margin-bottom: 36px; flex-wrap: wrap; }
.pc-hero__feature { display: flex; align-items: center; gap: 14px; font-weight: 600; font-size: 17px; }
.pc-hero__feature-icon { width: 44px; height: 44px; filter: brightness(0) invert(1); flex-shrink: 0; }
.pc-btn--square { border-radius: 8px; text-transform: uppercase; letter-spacing: .3px; }

/* ---- Catalog grid ---- */
.pc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}
.pc-cat-card {
    border: 1px solid var(--pc-border);
    border-radius: var(--pc-radius);
    padding: 28px 20px;
    text-align: center;
    background: #fff;
    transition: box-shadow .15s ease, transform .15s ease;
    color: var(--pc-ink);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.pc-cat-card:hover {
    box-shadow: 0 12px 30px rgba(0,0,0,.08);
    transform: translateY(-3px);
    color: var(--pc-ink);
}
.pc-cat-card__icon {
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--pc-bg-soft);
    display: flex; align-items: center; justify-content: center;
    font-size: 30px;
}
.pc-cat-card__name { font-weight: 700; font-size: 18px; }
.pc-cat-card__count { color: var(--pc-muted); font-size: 14px; }

/* ---- Product cards ---- */
.pc-prod-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}
.pc-prod-card {
    border: 1px solid var(--pc-border);
    border-radius: var(--pc-radius);
    overflow: hidden;
    background: #fff;
    display: flex; flex-direction: column;
}
.pc-prod-card__media { aspect-ratio: 1/1; background: var(--pc-bg-soft); }
.pc-prod-card__media img { width: 100%; height: 100%; object-fit: cover; }
.pc-prod-card__body { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pc-prod-card__name { font-weight: 600; font-size: 15px; flex: 1; }
.pc-prod-card__price { font-weight: 700; color: var(--pc-green-dark); }
.pc-placeholder-note {
    text-align: center;
    color: var(--pc-muted);
    background: #fff8e6;
    border: 1px dashed #e6c34d;
    border-radius: var(--pc-radius);
    padding: 18px;
    margin-top: 20px;
    font-size: 14px;
}

/* ---- Centre (about) ---- */
.pc-centre { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.pc-centre__text p { color: #444; }
.pc-centre__video { position: relative; border-radius: var(--pc-radius); overflow: hidden; }
.pc-centre__video img { width: 100%; }
.pc-centre__play {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
}
.pc-centre__play span {
    width: 76px; height: 76px; border-radius: 50%;
    background: rgba(255,255,255,.9); color: var(--pc-green-dark);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; box-shadow: 0 8px 24px rgba(0,0,0,.2);
}

/* ---- Footer ---- */
.pc-footer {
    background: var(--pc-ink);
    color: #cfd6cb;
    padding: 48px 0 28px;
    margin-top: 40px;
}
.pc-footer a { color: #cfd6cb; }
.pc-footer a:hover { color: #fff; }
.pc-footer__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; }
.pc-footer__bottom {
    border-top: 1px solid rgba(255,255,255,.12);
    margin-top: 32px; padding-top: 20px;
    font-size: 13px; color: #9aa394;
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}

/* ---- Responsive ---- */
@media (max-width: 1100px) {
    .pc-topnav { display: none; }
    .pc-catnav__list a, .pc-catnav__action { font-size: 11px; padding: 12px 9px; gap: 6px; }
    .pc-catnav__icon { font-size: 17px; }
}
@media (max-width: 880px) {
    .pc-centre { grid-template-columns: 1fr; }
    .pc-header__main-inner { flex-wrap: wrap; gap: 16px; }
    .pc-search { order: 3; flex-basis: 100%; max-width: none; }
    .pc-header__contacts { align-items: flex-start; }
    .pc-catnav__inner { overflow-x: auto; }
    .pc-catnav__list { flex-wrap: nowrap; }
    .pc-catnav__list a .pc-catnav__label, .pc-catnav__action .pc-catnav__label { display: none; }
    .pc-hero { min-height: 420px; }
    .pc-hero__features { gap: 20px; }
}
