.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border: 1px solid transparent; border-radius: var(--radius); font-size: 0.9rem; font-weight: 650; cursor: pointer; transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease; }
.btn:disabled { cursor: wait; opacity: 0.62; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-line { border-color: var(--text); background: transparent; color: var(--text); }
.btn-line:hover { background: var(--text); color: #fff; }
.text-link { color: var(--accent-dark); font-size: 0.9rem; text-decoration: underline; text-underline-offset: 3px; }
.field { width: 100%; padding: 10px 13px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--text); }
.field:focus { border-color: var(--accent); }

.category-badge { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-alt); color: var(--text-soft); font-size: 0.75rem; }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); transition: box-shadow 0.15s, transform 0.15s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-link { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.card .thumb { display: flex; align-items: center; justify-content: center; overflow: hidden; aspect-ratio: 1; background: var(--bg-alt); }
.card .thumb img { width: 100%; height: 100%; object-fit: contain; }
.card .body { display: flex; flex: 1; flex-direction: column; gap: 7px; padding: 12px 14px 14px; }
.card .title { display: -webkit-box; overflow: hidden; margin: 0; font-size: 0.9rem; font-weight: 650; line-height: 1.38; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.card .meta { display: flex; align-items: center; gap: 7px; margin-top: auto; color: var(--text-soft); font-size: 0.76rem; }
.stars { color: #b57d00; letter-spacing: 0.02em; }
.card .price { color: var(--accent-dark); font-size: 0.98rem; font-weight: 750; }
.card .row-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; }

.posts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.post-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); transition: box-shadow 0.15s, transform 0.15s; }
.post-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.post-card-link { display: flex; flex: 1; flex-direction: column; }
.post-card .thumb { overflow: hidden; aspect-ratio: 16 / 10; background: var(--bg-alt); }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .body { display: flex; flex-direction: column; gap: 7px; padding: 16px; }
.post-card .date { color: var(--text-soft); font-size: 0.76rem; }
.post-card h2 { margin: 0; font-size: 1.08rem; }
.post-card .excerpt { margin: 0; color: var(--text-soft); font-size: 0.86rem; }

.loading-panel, .error-panel, .empty-state { grid-column: 1 / -1; padding: 50px 20px; border: 1px dashed var(--border); border-radius: var(--radius); color: var(--text-soft); text-align: center; }
.error-panel h2, .empty-state h2 { color: var(--text); }
.error-panel .btn, .empty-state .btn { margin-top: 12px; }
.empty-state .glyph { margin-bottom: 10px; color: var(--accent-dark); font-size: 2rem; font-weight: 750; }
.img-placeholder { display: grid; width: 100%; height: 100%; place-items: center; background: linear-gradient(135deg, #eff3ef, #f7f2e9); color: var(--accent-dark); font-size: 2rem; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 32px; color: var(--text-soft); font-size: 0.84rem; }
.pagination:empty { display: none; }

@media (max-width: 1020px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .posts-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .product-grid { grid-template-columns: 1fr; } }
