/* =====================================================================
   amz-store — публичный каталог
   Дизайн-тема: кухонная организация. Ценники как лента для этикеток,
   категории как ярлыки на ящике. См. дизайн-план в чате.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=Inter:wght@400;500;600&family=Space+Mono:wght@400;700&display=swap');

:root {
    --bg: #F2F3EE;
    --surface: #FFFFFF;
    --ink: #202A22;
    --ink-soft: #55635A;
    --sage: #6E8C6A;
    --sage-deep: #3F5B45;
    --brass: #B07D3A;
    --line: #DCD7C9;

    --font-display: 'Fraunces', serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-label: 'Space Mono', monospace;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    line-height: 1.5;
}

a { color: inherit; }

/* ---------- Header ---------- */

header.site-header {
    padding: 28px 24px 20px;
    text-align: center;
    border-bottom: 1px solid var(--line);
}

header.site-header .brand {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

header.site-header .tagline {
    font-size: 14px;
    color: var(--ink-soft);
    margin-top: 4px;
}

/* ---------- Category tabs (signature: label strip) ---------- */

nav.category-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 18px 24px;
    max-width: 1100px;
    margin: 0 auto;
    scrollbar-width: thin;
}

nav.category-strip a {
    flex-shrink: 0;
    font-family: var(--font-label);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
    color: var(--ink-soft);
    background: var(--surface);
    border: 1px solid var(--line);
    border-bottom: 3px solid var(--line);
    border-radius: 4px 4px 2px 2px;
    padding: 8px 14px;
    transition: border-color .15s ease, color .15s ease;
}

nav.category-strip a:hover {
    color: var(--ink);
}

nav.category-strip a.active {
    color: var(--sage-deep);
    border-bottom-color: var(--brass);
    font-weight: 700;
}

/* ---------- Grid ---------- */

main.catalog {
    max-width: 1100px;
    margin: 0 auto;
    padding: 8px 24px 60px;
}

section.category-section {
    margin-top: 40px;
}

section.category-section h2 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

/* ---------- Product card ---------- */

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .15s ease, box-shadow .15s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(32, 42, 34, 0.08);
}

.card .thumb {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #EDEBE3;
}

.card .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card .cat-chip {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--sage);
    color: #fff;
    font-family: var(--font-label);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 8px;
    border-radius: 3px;
}

.card .body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card .title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 6px;
    line-height: 1.3;
}

.card .excerpt {
    font-size: 13px;
    color: var(--ink-soft);
    margin: 0 0 14px;
    flex: 1;
}

.card .footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

/* Signature element: price as label-maker tape */
.price-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #FBF4E8;
    border: 1px solid var(--brass);
    color: var(--brass);
    font-family: var(--font-label);
    font-size: 13px;
    font-weight: 700;
    padding: 4px 10px 4px 6px;
    border-radius: 3px;
}

.price-tag .hole {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--bg);
    border: 1px solid var(--brass);
    flex-shrink: 0;
}

.btn-details {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: var(--ink);
    border: 1px solid var(--ink);
    border-radius: 4px;
    padding: 7px 14px;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease;
}

.btn-details:hover {
    background: var(--ink);
    color: #fff;
}

/* "Live" badge on freshly-arrived cards */
.card.is-new {
    animation: card-arrive .5s ease-out;
}

.card.is-new .cat-chip::after {
    content: " · NEW";
}

@keyframes card-arrive {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Empty state ---------- */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--ink-soft);
    font-size: 14px;
}

/* ---------- Footer ---------- */

footer.site-footer {
    text-align: center;
    padding: 30px 20px;
    font-size: 12px;
    color: var(--ink-soft);
    border-top: 1px solid var(--line);
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    .card, .card.is-new { animation: none; transition: none; }
}

/* ---------- Article page ---------- */

.site-header .brand a {
    text-decoration: none;
    color: inherit;
}

.article-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 24px 24px 60px;
}

.breadcrumb {
    font-family: var(--font-label);
    font-size: 12px;
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 20px;
}

.breadcrumb a {
    text-decoration: none;
    color: var(--sage-deep);
}

.breadcrumb span {
    margin: 0 6px;
}

.article-hero {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 32px;
}

.article-image {
    flex: 0 0 220px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--line);
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.article-heading {
    flex: 1;
    min-width: 0;
}

.cat-chip.static {
    display: inline-block;
    position: static;
    background: var(--sage);
    color: #fff;
    font-family: var(--font-label);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 8px;
    border-radius: 3px;
    margin-bottom: 10px;
}

.article-heading h1 {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 600;
    line-height: 1.25;
    margin: 0 0 14px;
}

.article-meta-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.rating-display {
    font-size: 13px;
    color: var(--ink-soft);
}

.rating-display .stars {
    color: var(--brass);
    letter-spacing: 1px;
    margin-right: 4px;
}

.btn-cta {
    display: inline-block;
    background: var(--brass);
    color: #fff;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    padding: 12px 22px;
    border-radius: 5px;
    transition: background .15s ease;
}

.btn-cta:hover {
    background: var(--sage-deep);
}

.article-body {
    font-size: 16px;
    line-height: 1.7;
    color: var(--ink);
}

.article-body h2 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    margin: 32px 0 12px;
}

.article-body p {
    margin: 0 0 16px;
}

.article-body ul {
    margin: 0 0 16px;
    padding-left: 20px;
}

.article-body li {
    margin-bottom: 8px;
}

.faq-section {
    margin-top: 40px;
    border-top: 1px solid var(--line);
    padding-top: 24px;
}

.faq-section h2 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 16px;
}

.faq-item {
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 10px;
    background: var(--surface);
}

.faq-item summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
}

.faq-item p {
    margin: 10px 0 0;
    font-size: 14px;
    color: var(--ink-soft);
}

.bottom-cta {
    margin-top: 36px;
    text-align: center;
}

@media (max-width: 600px) {
    .article-hero {
        flex-direction: column;
    }
    .article-image {
        flex-basis: auto;
        width: 100%;
    }
    .article-heading h1 {
        font-size: 22px;
    }
}

/* ---------- Mobile ---------- */

@media (max-width: 480px) {
    .card-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    header.site-header .brand { font-size: 22px; }
}