/*
Theme Name: SpiceNet
Theme URI: https://spice.net.ua/
Description: Премиальная тема журнала о специях и пряностях. Эспрессо, пергамент и шафрановое золото.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 7.4
Text Domain: spicenet
*/

:root {
  --ink: #1c1714;
  --ink-2: #2a221d;
  --paper: #f7f2ea;
  --cream: #efe6d8;
  --line: #e1d5c3;
  --muted: #6f655b;
  --text: #2b2420;
  --gold: #c8902e;
  --gold-2: #e0b25c;
  --paprika: #a23f22;
  --olive: #56603f;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: Inter, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 18px;
  --shadow: 0 18px 50px -24px rgba(28, 23, 20, .45);
  --wrap: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font: 400 17px/1.7 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; color: var(--ink); margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1.1em; }
.screen-reader-text, .skip:not(:focus) { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip:focus { position: fixed; top: 10px; left: 10px; z-index: 100; background: #fff; padding: 10px 16px; border-radius: 8px; }
.icon { width: 1.1em; height: 1.1em; flex: none; vertical-align: -.15em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.wrap--text { max-width: 820px; }

/* ---------- Кнопки, подписи ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6em; padding: 14px 26px; border-radius: 999px; font: 600 15px/1 var(--sans); text-decoration: none; border: 1px solid transparent; transition: transform .2s, background .2s, color .2s, border-color .2s; cursor: pointer; }
.btn:hover { transform: translateY(-1px); }
.btn--gold { background: var(--gold); color: #1c1309; }
.btn--gold:hover { background: var(--gold-2); }
.btn--ghost { border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }
.btn--block { width: 100%; }
.kicker { font: 600 12px/1.3 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--gold-2); margin: 0 0 18px; display: flex; align-items: center; gap: 12px; }
.kicker::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.kicker--dark { color: var(--paprika); }
.meta { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); letter-spacing: .02em; }
.meta--light { color: rgba(255, 255, 255, .75); }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; color: var(--paprika); }
.link-arrow .icon { transition: transform .2s; }
.link-arrow:hover .icon { transform: translateX(4px); }

/* ---------- Шапка ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(28, 23, 20, .96); color: #fff; transition: background .3s, box-shadow .3s; }
.site-header--over { position: fixed; left: 0; right: 0; background: transparent; }
.site-header.is-scrolled, .nav-open .site-header { background: rgba(28, 23, 20, .97); box-shadow: 0 8px 30px -18px rgba(0, 0, 0, .6); backdrop-filter: blur(8px); }
.site-header__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 84px; }
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.logo__mark { width: 42px; height: 42px; color: var(--gold-2); }
.logo__text { display: flex; flex-direction: column; line-height: 1.1; }
.logo__name { font: 600 24px/1 var(--serif); letter-spacing: .01em; }
.logo__tag { font: 500 10.5px/1.4 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: rgba(255, 255, 255, .6); margin-top: 4px; }
.nav { display: flex; align-items: center; gap: 34px; }
.nav__list { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav__list a { text-decoration: none; font-size: 15px; font-weight: 500; color: rgba(255, 255, 255, .82); padding: 6px 0; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.nav__list a:hover, .nav__list .is-current a, .nav__list .current-menu-item a { color: #fff; border-color: var(--gold); }
.nav__cta { padding: 11px 20px; font-size: 14px; }
.nav-toggle { display: none; background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; }
.nav-toggle .icon { width: 28px; height: 28px; }
.nav-toggle .icon + .icon, .nav-open .nav-toggle .icon:first-child { display: none; }
.nav-open .nav-toggle .icon + .icon { display: block; }

/* ---------- Первый экран: фото на всю ширину, текст слева на затемнении ----------
 * Высота = окно минус шапка, но не выше 720 px: на ноутбуках 1366×768 / 1440×900 / 1536×864
 * экран целиком помещается вместе с цифрами, на больших мониторах не растягивается. */
.hero { position: relative; display: flex; align-items: center; min-height: clamp(520px, calc(100vh - 84px), 720px); min-height: clamp(520px, calc(100svh - 84px), 720px); background: var(--ink); color: #fff; overflow: hidden; }
.hero__media, .hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20, 15, 12, .9) 0%, rgba(20, 15, 12, .74) 34%, rgba(20, 15, 12, .2) 62%, rgba(20, 15, 12, 0) 80%); }
.hero__in { position: relative; padding-top: clamp(32px, 6vh, 72px); padding-bottom: clamp(32px, 5vh, 56px); }
.hero__title { font-size: clamp(44px, min(5vw, 9.5vh), 82px); color: #fff; font-weight: 600; line-height: 1; margin-bottom: clamp(16px, 2.6vh, 26px); }
.hero__title em { font-style: italic; font-weight: 500; color: var(--gold-2); }
.hero__lead { max-width: 520px; font-size: clamp(16px, 1.25vw, 18.5px); color: rgba(255, 255, 255, .8); margin-bottom: clamp(22px, 3.6vh, 34px); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: clamp(28px, 5.6vh, 52px); }
.hero__stats { display: flex; flex-wrap: wrap; gap: 0; margin: 0; border-top: 1px solid rgba(255, 255, 255, .16); max-width: 560px; }
.hero__stats div { flex: 1 1 140px; padding: 18px 20px 0 0; }
.hero__stats dt { font: 600 clamp(26px, 2.4vw, 34px)/1 var(--serif); color: var(--gold-2); }
.hero__stats dd { margin: 6px 0 0; font-size: 13.5px; color: rgba(255, 255, 255, .62); }

/* ---------- Секции ---------- */
.section { padding: 110px 0; }
.section--tight { padding: 64px 0 100px; }
.section--cream { background: var(--cream); }
.section__head { max-width: 720px; margin-bottom: 48px; }
.section__head--row { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.section__title { font-size: clamp(34px, 4.4vw, 54px); margin: 0; }
.section__lead { font-size: 18px; color: var(--muted); margin: 18px 0 0; }

/* Алфавит */
.letters { display: flex; flex-wrap: wrap; gap: 8px; margin: -12px 0 44px; }
.letters a { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; text-decoration: none; font: 600 17px/1 var(--serif); color: var(--ink); transition: background .2s, color .2s, border-color .2s; }
.letters a:hover { background: var(--ink); color: var(--gold-2); border-color: var(--ink); }

/* Сетки и карточки */
.grid { display: grid; gap: 28px; }
.grid--spices { grid-template-columns: repeat(4, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.card { scroll-margin-top: 110px; }
.card__link { display: flex; flex-direction: column; height: 100%; text-decoration: none; background: #fffdf9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); transition: transform .3s, box-shadow .3s, border-color .3s; }
.card__link:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card__img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--cream); }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.card__link:hover .card__img img { transform: scale(1.05); }
.card__noimg { position: absolute; inset: 0; display: grid; place-items: center; font: 600 72px/1 var(--serif); color: var(--gold); background: var(--ink); }
.card__body { display: flex; flex-direction: column; gap: 8px; padding: 22px 22px 24px; flex: 1; }
.card__title { font: 600 22px/1.2 var(--serif); color: var(--ink); }
.card__text { font-size: 14.5px; line-height: 1.6; color: var(--muted); flex: 1; }
.card__more { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--paprika); margin-top: 6px; }

/* Статьи: главная + список */
.feature { display: grid; grid-template-columns: 1.35fr 1fr; gap: 40px; align-items: start; }
.feature__lead { display: block; text-decoration: none; border-radius: var(--radius); overflow: hidden; background: var(--ink); color: #fff; position: relative; min-height: 520px; }
.feature__img, .feature__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature__img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(20, 15, 12, .92) 10%, rgba(20, 15, 12, .1) 65%); }
.feature__body { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px; display: flex; flex-direction: column; gap: 12px; }
.feature__body .meta { color: rgba(255, 255, 255, .7); }
.feature__title { font: 600 clamp(28px, 3vw, 40px)/1.12 var(--serif); }
.feature__text { color: rgba(255, 255, 255, .78); font-size: 16px; }
.feature__list { list-style: none; margin: 0; padding: 0; }
.feature__list li + li { border-top: 1px solid var(--line); }
.feature__list a { display: flex; gap: 18px; align-items: center; padding: 16px 0; text-decoration: none; }
.feature__thumb { width: 92px; height: 92px; border-radius: 14px; overflow: hidden; flex: none; position: relative; background: var(--ink); }
.feature__thumb img { width: 100%; height: 100%; object-fit: cover; }
.feature__thumb .card__noimg { font-size: 34px; }
.feature__item-title { display: block; font: 600 20px/1.25 var(--serif); color: var(--ink); margin-bottom: 4px; transition: color .2s; }
.feature__list a:hover .feature__item-title { color: var(--paprika); }

/* Цитата */
.quote { background: var(--ink); color: #fff; padding: 110px 0; text-align: center; }
.quote__in { max-width: 920px; }
.quote .logo__mark { width: 54px; height: 54px; margin: 0 auto 30px; color: var(--gold); }
.quote blockquote { margin: 0; }
.quote p { font: 500 italic clamp(26px, 3.4vw, 42px)/1.35 var(--serif); margin: 0; }

/* Блок Делюкса */
.deluxe { background: var(--ink-2); color: #fff; padding: 100px 0; }
.deluxe__in { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.deluxe__img { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; }
.deluxe__img img { width: 100%; height: 100%; object-fit: cover; }
.deluxe__title { color: #fff; font-size: clamp(32px, 3.8vw, 48px); }
.deluxe__body > p { color: rgba(255, 255, 255, .74); font-size: 17px; max-width: 520px; }
.deluxe__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px 28px; margin-top: 30px; }
.deluxe__phone { display: inline-flex; align-items: center; gap: 10px; font: 600 19px/1 var(--sans); color: #fff; text-decoration: none; }
.deluxe__phone .icon { color: var(--gold-2); }

/* ---------- Статья ---------- */
.post-hero { position: relative; min-height: clamp(380px, 64vh, 600px); display: flex; align-items: flex-end; background: var(--ink); color: #fff; overflow: hidden; }
.post-hero__media, .post-hero__media img, .post-hero__media .card__noimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post-hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(20, 15, 12, .94) 5%, rgba(20, 15, 12, .35) 55%, rgba(20, 15, 12, .55) 100%); }
.post-hero__in { position: relative; padding-top: 150px; padding-bottom: 60px; }
.post-hero__title { color: #fff; font-size: clamp(42px, 6.4vw, 88px); max-width: 16ch; margin-bottom: 18px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 22px; color: rgba(255, 255, 255, .7); }
.crumbs a { text-decoration: none; color: inherit; }
.crumbs a:hover { color: var(--gold-2); }
.crumbs--dark { color: var(--muted); }
.crumbs--dark a:hover { color: var(--paprika); }
.post__layout { display: grid; grid-template-columns: minmax(0, 720px) 300px; justify-content: space-between; gap: 64px; padding-top: 80px; padding-bottom: 80px; }
.post__aside { position: relative; }
.buybox { position: sticky; top: 110px; background: #fffdf9; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.buybox__title { font: 600 24px/1.2 var(--serif); color: var(--ink); margin-bottom: 10px; }
.buybox > p:not(.kicker):not(.buybox__title) { font-size: 15px; color: var(--muted); }
.buybox__phone { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; font-weight: 600; text-decoration: none; color: var(--ink); }

.prose { font-size: 18px; line-height: 1.8; color: var(--text); }
.prose > *:first-child { margin-top: 0; }
.prose h2 { font-size: 32px; margin: 1.7em 0 .55em; }
.prose h3 { font-size: 24px; margin: 1.5em 0 .5em; }
.prose a { color: var(--paprika); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose img { border-radius: 14px; margin: 1.6em auto; }
.prose .alignleft { float: left; margin: .4em 28px 16px 0; max-width: 45%; }
.prose .alignright { float: right; margin: .4em 0 16px 28px; max-width: 45%; }
.prose .aligncenter { margin-left: auto; margin-right: auto; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .4em; }
.prose li::marker { color: var(--gold); }
.prose blockquote { margin: 2em 0; padding: 4px 0 4px 28px; border-left: 3px solid var(--gold); font: italic 500 22px/1.5 var(--serif); color: var(--ink); }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 16px; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.prose::after { content: ""; display: table; clear: both; }
.prose--dropcap > p:first-of-type::first-letter, .prose--dropcap > div:first-child > p:first-of-type::first-letter { float: left; font: 600 4.6em/.82 var(--serif); color: var(--paprika); margin: .08em .1em 0 0; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding-bottom: 90px; }
.pager__link { display: flex; flex-direction: column; gap: 6px; padding: 26px 28px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; font: 600 22px/1.25 var(--serif); color: var(--ink); transition: border-color .2s, background .2s; }
.pager__link:hover { border-color: var(--gold); background: #fffdf9; }
.pager__link--next { text-align: right; align-items: flex-end; }
.pager .meta { font-family: var(--sans); text-transform: uppercase; letter-spacing: .1em; font-size: 12px; }

/* ---------- Страницы, архивы ---------- */
.page-head { background: var(--cream); padding: 170px 0 70px; border-bottom: 1px solid var(--line); }
.page-head__title { font-size: clamp(40px, 5.6vw, 72px); margin: 0; }
.page-head__lead { max-width: 640px; color: var(--muted); font-size: 18px; margin-top: 18px; }
.page-head__lead p:last-child { margin: 0; }
.page-head__search { max-width: 520px; margin-top: 28px; }
.page-head--404 { min-height: 70vh; }
.page-head--404 .btn { margin-top: 28px; }
body:not(.home):not(.single-post) .site-header { position: fixed; left: 0; right: 0; }
.search { display: flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.search input { flex: 1; border: 0; padding: 15px 22px; font: 16px var(--sans); background: transparent; outline: none; min-width: 0; }
.search button { border: 0; background: var(--ink); color: var(--gold-2); width: 56px; cursor: pointer; }
.pagination { margin-top: 56px; }
.pagination .nav-links { display: flex; gap: 8px; justify-content: center; }
.pagination .page-numbers { min-width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; text-decoration: none; font-weight: 600; }
.pagination .current { background: var(--ink); color: var(--gold-2); border-color: var(--ink); }
.empty { font-size: 18px; color: var(--muted); }

/* ---------- Подвал ---------- */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, .68); padding: 90px 0 0; font-size: 15px; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 56px; padding-bottom: 64px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.site-footer__about p { max-width: 380px; margin-top: 22px; }
.site-footer__title { font: 600 12px/1.3 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--gold-2); margin-bottom: 18px; }
.site-footer__links { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer a { text-decoration: none; color: #fff; }
.site-footer a:hover { color: var(--gold-2); }
.site-footer__phone { display: inline-flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 600; }
.site-footer .link-arrow { color: var(--gold-2); }
.site-footer__bottom { display: flex; justify-content: space-between; gap: 16px; padding: 26px 28px 34px; font-size: 13px; color: rgba(255, 255, 255, .45); }

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
  .grid--spices { grid-template-columns: repeat(3, 1fr); }
  .post__layout { grid-template-columns: 1fr; gap: 40px; }
  .buybox { position: static; max-width: 520px; }
}
@media (max-width: 900px) {
  .nav { position: fixed; inset: 84px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; padding: 12px 28px 28px; background: rgba(28, 23, 20, .98); transform: translateY(-12px); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
  .nav-open .nav { opacity: 1; transform: none; pointer-events: auto; }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__list a { display: block; padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); font-size: 18px; }
  .nav__cta { margin-top: 20px; }
  .nav-toggle { display: block; }
  .hero { display: block; min-height: 0; }
  .hero__media { position: relative; height: 46vh; min-height: 280px; max-height: 460px; }
  .hero__media::after { background: linear-gradient(0deg, var(--ink) 0%, rgba(20, 15, 12, 0) 45%); }
  .hero__in { padding-top: 8px; padding-bottom: 48px; }
  .feature { grid-template-columns: 1fr; }
  .feature__lead { min-height: 440px; }
  .deluxe__in { grid-template-columns: 1fr; gap: 40px; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__about { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .site-header__in { height: 70px; }
  .nav { inset: 70px 0 auto 0; padding: 8px 16px 24px; }
  .logo__mark { width: 36px; height: 36px; }
  .logo__name { font-size: 21px; }
  .hero__media { height: 36vh; min-height: 230px; }
  .hero__in { padding-top: 4px; padding-bottom: 40px; }
  .hero__actions { margin-bottom: 32px; }
  .hero__stats div { flex-basis: 33%; padding-right: 10px; }
  .hero__stats dt { font-size: 28px; }
  .hero__stats dd { font-size: 12.5px; }
  .section { padding: 72px 0; }
  .grid { gap: 16px; }
  .grid--spices, .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .card__body { padding: 14px 14px 16px; }
  .card__title { font-size: 18px; }
  .card__text { display: none; }
  .card__more { font-size: 11px; }
  .letters a { width: 36px; height: 36px; font-size: 15px; }
  .feature__body { padding: 24px; }
  .feature__thumb { width: 72px; height: 72px; }
  .feature__item-title { font-size: 18px; }
  .quote, .deluxe { padding: 72px 0; }
  .post-hero { min-height: 64vh; }
  .post-hero__in { padding-top: 110px; padding-bottom: 36px; }
  .post__layout { padding-top: 44px; padding-bottom: 50px; }
  .prose { font-size: 17px; }
  .prose h2 { font-size: 26px; }
  .prose .alignleft, .prose .alignright { float: none; max-width: 100%; margin: 1.2em 0; }
  .pager { grid-template-columns: 1fr; }
  .pager__link--next { text-align: left; align-items: flex-start; }
  .page-head { padding: 120px 0 44px; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 36px; }
  .site-footer__bottom { padding: 22px 16px 28px; }
}
