/*
Theme Name: ShopTop Blog
Theme URI: https://shoptop.org
Author: ShopTop
Description: Тема блога ShopTop.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: shoptop-blog
*/

:root {
  --ink: #201718;
  --surface: #fffaf4;
  --page: #f8f1e7;
  --border: #e8dbce;
  --muted: #9a8e87;
  --accent: #a61c48;
  --gold: #d19a24;
  --dark-border: #3b2d30;
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.42;
}
a { color: inherit; }
img { max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.screen-reader-text:focus {
  clip: auto;
  width: auto;
  height: auto;
  margin: 0;
  padding: 8px 12px;
  background: #fff;
  color: var(--ink);
  z-index: 100000;
}

.container { width: min(100% - 48px, 1200px); margin: 0 auto; }
.site-header, .site-footer { background: #1c1213; color: #fff; }
.site-header { min-height: 104px; }
.header-inner { min-height: 104px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: block; color: #fff; text-decoration: none; }
.brand-line { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 6px;
  background: #a91f4b;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}
.brand-name { font-size: 23px; font-weight: 700; letter-spacing: -.7px; }
.brand-name b { color: #e1a02a; }
.brand-domain { color: #a69d9d; font-size: 14px; font-weight: 700; }
.brand-subtitle { margin-top: 3px; color: #aaa1a0; font-size: 10px; letter-spacing: 1px; font-weight: 700; }

.header-tools { display: flex; gap: 8px; align-items: center; }
.nav-button, .search {
  height: 46px;
  border: 1px solid var(--dark-border);
  border-radius: 7px;
  background: #251b1c;
  color: #d0c8c5;
  font: inherit;
  font-weight: 700;
}
.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  text-decoration: none;
  transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}
.nav-button:hover { color: #f0b13a; border-color: #76501e; background: #302123; }
.nav-button.is-current { color: var(--gold); border-color: #76501e; }
.nav-button:focus-visible, .category-link:focus-visible, .tag:focus-visible, .page-numbers:focus-visible, .read-more:focus-visible {
  outline: 2px solid #e1a02a;
  outline-offset: 3px;
}
.search-form { margin: 0; }
.search-wrap { position: relative; display: block; }
.search-icon { position: absolute; left: 16px; top: 13px; width: 15px; height: 15px; border: 2px solid #847778; border-radius: 50%; pointer-events: none; }
.search-icon::after { content: ''; position: absolute; width: 6px; height: 2px; background: #847778; transform: rotate(45deg); right: -5px; bottom: -3px; }
.search { width: 270px; padding: 0 16px 0 44px; outline: none; font-weight: 400; transition: color .2s ease, border-color .2s ease, background-color .2s ease, box-shadow .2s ease; }
.search::placeholder { color: #847778; font-weight: 400; opacity: 1; }
.search:hover { border-color: #5a4446; background: #302526; }
.search:focus { border-color: #b98425; background: #302526; color: #fff; box-shadow: 0 0 0 3px rgba(209, 154, 36, .15); }
.search-wrap:focus-within .search-icon, .search-wrap:hover .search-icon { border-color: #c99a42; }
.search-wrap:focus-within .search-icon::after, .search-wrap:hover .search-icon::after { background: #c99a42; }

main { padding: 45px 0 30px; }
.layout { display: grid; grid-template-columns: minmax(0, 864px) minmax(280px, 336px); gap: 36px; align-items: start; }
.intro, .post { background: var(--surface); border: 1px solid var(--border); border-radius: 9px; }
.intro { padding: 33px 31px 30px; margin-bottom: 19px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 7px; font-size: 31px; letter-spacing: -1.05px; line-height: 1.2; }
.intro p { margin-bottom: 0; color: var(--muted); font-size: 16px; }
.post { padding: 34px 33px 29px; min-height: 266px; margin-bottom: 19px; }
.post h2 { margin-bottom: 17px; font-size: 23px; line-height: 1.2; letter-spacing: -.75px; }
.post h2 a { color: inherit; text-decoration: none; transition: color .2s ease; }
.post h2 a:hover { color: var(--accent); }
.post h2 a:focus-visible { outline: 2px solid #e1a02a; outline-offset: 3px; border-radius: 2px; }
.post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; color: var(--muted); font-size: 12px; }
.divider { width: 1px; height: 14px; background: #d5c9c2; }
.tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 15px;
  background: #f6e4eb;
  color: #ad3153;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: color .2s ease, background-color .2s ease;
}
.tag:hover { background: #f0cedb; color: #8f153b; }
.post p, .entry-content { max-width: 780px; color: var(--muted); font-size: 16px; line-height: 1.45; }
.post p { margin-bottom: 13px; }
.post .entry-content > * { margin-top: 0; margin-bottom: 1.1em; }
.post .entry-content > *:last-child { margin-bottom: 0; }
.post .entry-content a { color: var(--accent); }
.post .entry-content h2, .post .entry-content h3 { color: var(--ink); }
.read-more { height: 37px; display: inline-flex; gap: 12px; align-items: center; padding: 0 14px; border-radius: 5px; background: var(--accent); color: #fff; text-decoration: none; font-size: 13px; font-weight: 700; transition: background-color .2s ease, box-shadow .2s ease; }
.read-more:hover { background: #c22557; box-shadow: 0 5px 12px rgba(166, 28, 72, .2); }
.read-more:active { box-shadow: none; }
.read-more span { font-size: 19px; font-weight: 400; line-height: 1; }
.post-thumbnail { margin: 0 0 22px; overflow: hidden; border-radius: 5px; }
.post-thumbnail img { display: block; width: 100%; }
.no-posts-message { margin-bottom: 0; }

.categories { padding: 31px; background: #1c1213; color: #d7cfcc; border-radius: 9px; }
.categories h2 { margin: 0 0 18px; color: #fff; font-size: 23px; line-height: 1.2; }
.category-list { padding: 0; margin: 0; list-style: none; }
.category-list li { min-height: 55px; border-bottom: 1px solid #3a2c2d; font-size: 15px; }
.category-list li:last-child { border-bottom: 0; }
.category-link { min-height: inherit; display: flex; justify-content: space-between; align-items: center; gap: 12px; color: #d7cfcc; text-decoration: none; transition: color .2s ease; }
.category-link:hover, .category-link.is-current { color: #fff; }
.category-link strong { color: var(--gold); font-size: 13px; transition: color .2s ease; }
.category-link:hover strong, .category-link.is-current strong { color: #efb13a; }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding-top: 10px; }
.page-numbers { min-width: 38px; height: 39px; display: grid; place-items: center; padding: 0 9px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: #463c39; text-decoration: none; font-size: 14px; font-weight: 700; transition: color .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease; }
.page-numbers.current { background: var(--accent); border-color: var(--accent); color: #fff; }
.page-numbers:not(.current):hover { border-color: #cbaeb5; background: #fff; color: var(--accent); box-shadow: 0 4px 9px rgba(67, 41, 40, .1); }
.page-numbers.current:hover { background: #c22557; border-color: #c22557; box-shadow: 0 4px 9px rgba(166, 28, 72, .2); }
.page-numbers.dots { cursor: default; }

.site-footer { min-height: 140px; }
.footer-inner { min-height: 140px; display: flex; align-items: center; color: #a79e9d; font-size: 12px; }

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .container { width: min(100% - 32px, 1200px); }
  .site-header { padding: 24px 0; }
  .header-inner { min-height: 0; align-items: center; gap: 20px; flex-direction: column; }
  .brand { text-align: center; }
  .brand-line { justify-content: center; }
  .header-tools { width: 100%; justify-content: center; flex-wrap: wrap; }
  .search-form { flex: 1 1 100%; }
  .search { width: 100%; }
  main { padding-top: 24px; padding-bottom: 64px; }
  .layout { gap: 24px; }
  .intro, .post { padding: 24px; }
  .intro, .post { margin-bottom: 16px; }
  .categories { padding: 24px; }
  h1 { font-size: 27px; }
  .post h2, .categories h2 { font-size: 21px; }
  .post-meta { gap: 8px; }
  .post p, .intro p, .entry-content { font-size: 15px; }
  .site-footer, .footer-inner { min-height: 105px; }
}
