/*
Theme Name:   Outfit Desk (GeneratePress child)
Theme URI:    https://generatepress.com
Description:  Дочерняя тема для статей из Outfit desk: журнальные заголовки, узкая колонка текста, сетка пинов в архивах, карточки товаров, дисклеймер в футере. Цвет и текст футера: Внешний вид → Настроить → Outfit Desk.
Author:       Outfit desk
Template:     generatepress
Version:      1.6.0
Text Domain:  outfitdesk-gp
*/

:root {
  --od-bg: #faf9f7;           /* фон страницы */
  --od-surface: #ffffff;
  --od-ink: #1d1b19;          /* текст */
  --od-muted: #6f6a64;
  --od-line: #e8e4de;
  --od-accent: #5b2a4e;       /* меняется в Настроить → Outfit Desk */
  --od-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --od-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --od-read: 720px;           /* ширина колонки текста */
}

body { background: var(--od-bg); color: var(--od-ink); font-family: var(--od-sans); font-size: 17px; line-height: 1.7; }
a { color: var(--od-accent); }
a:hover { color: var(--od-ink); }

/* ---------- шапка ---------- */
.site-header { background: var(--od-surface); border-bottom: 1px solid var(--od-line); }
.main-title, .site-title { font-family: var(--od-serif); font-weight: 700; letter-spacing: -.01em; }
.main-title a { color: var(--od-ink); text-decoration: none; }
.main-navigation .main-nav ul li a { text-decoration: none; }
.main-navigation, .main-navigation ul ul { background: var(--od-surface); }
.main-navigation .main-nav ul li a { color: var(--od-ink); font-size: 14px; letter-spacing: .04em; text-transform: uppercase; }
.main-navigation .main-nav ul li a:hover, .main-navigation .main-nav ul li.current-menu-item > a { color: var(--od-accent); }

/* ---------- статья: узкая колонка, крупные фото ---------- */
.single .site-content .content-area, .page .site-content .content-area { max-width: var(--od-read); margin: 0 auto; float: none; width: 100%; }
.single .inside-article, .page .inside-article { background: transparent; padding: 32px 20px 16px; }
.entry-title { font-family: var(--od-serif); font-weight: 700; line-height: 1.12; letter-spacing: -.015em; }
.single .entry-title { font-size: clamp(32px, 5vw, 46px); }
.entry-content h2 { font-family: var(--od-serif); font-weight: 700; font-size: clamp(26px, 3.6vw, 32px); line-height: 1.2; margin: 2.2em 0 .6em; scroll-margin-top: 90px; }
.entry-content h3 { font-family: var(--od-serif); font-size: 22px; margin: 1.6em 0 .4em; }
.entry-content .wp-block-image img { border-radius: 10px; width: 100%; max-width: 600px; height: auto; display: block; margin: 0 auto; }
.entry-content .wp-block-image { margin: 1.2em 0 1em; }
.entry-meta { color: var(--od-muted); font-size: 13px; }
p.disclosure { font-size: 13px; color: var(--od-muted); border-left: 3px solid var(--od-line); padding-left: 12px; }

/* заглавный пин уже стоит первым блоком статьи: не показываем его второй раз над заголовком */
.single .featured-image.page-header-image-single, .single .page-header-image-single { display: none; }

/* ---------- блок «Shop the look» из Outfit desk ---------- */
.shop-the-look { background: var(--od-surface); border: 1px solid var(--od-line); border-radius: 14px; padding: 16px; }
.shop-the-look > p:first-child { font-family: var(--od-serif); font-size: 20px; }
.shop-the-look .shop-card { border-color: var(--od-line) !important; transition: transform .15s ease, box-shadow .15s ease; }
.shop-the-look .shop-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.06); }
.shop-the-look .shop-card a > span:last-child { background: var(--od-ink) !important; }
.shop-the-look .shop-card a:hover > span:last-child { background: var(--od-accent) !important; }
@media (max-width: 600px) {
  .shop-the-look > div { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .shop-the-look .shop-card img { height: 120px !important; }
}

/* ---------- архивы и главная: сетка пинов 2:3 ---------- */
.blog .site-main, .archive .site-main, .search .site-main {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 28px;
}
.blog .site-main > *:not(article), .archive .site-main > *:not(article), .search .site-main > *:not(article) { grid-column: 1 / -1; }
.blog .inside-article, .archive .inside-article, .search .inside-article { padding: 0; background: transparent; }
.blog .post-image, .archive .post-image, .search .post-image { margin: 0 0 12px; }
.blog .post-image img, .archive .post-image img, .search .post-image img {
  aspect-ratio: 2 / 3; object-fit: cover; width: 100%; border-radius: 10px; transition: transform .2s ease;
}
.blog article:hover .post-image img, .archive article:hover .post-image img { transform: scale(1.015); }
.blog .entry-title, .archive .entry-title, .search .entry-title { font-size: 20px; line-height: 1.25; margin: 0 0 6px; }
.blog .entry-summary, .archive .entry-summary, .search .entry-summary { font-size: 14px; color: var(--od-muted); }
.blog .entry-summary p, .archive .entry-summary p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.archive .page-header { background: transparent; padding: 0 0 8px; }
.archive .page-header h1 { font-family: var(--od-serif); font-size: clamp(30px, 4.5vw, 42px); }
.paging-navigation, .nav-links { grid-column: 1 / -1; }

/* ---------- футер ---------- */
.site-info { background: var(--od-surface); border-top: 1px solid var(--od-line); color: var(--od-muted); font-size: 13px; }
.site-info .od-disclosure { display: block; margin-top: 6px; }

/* ---------- мелочи ---------- */
.wp-block-list li { margin-bottom: .3em; }
::selection { background: var(--od-accent); color: #fff; }

/* ---------- телефоны (основной трафик из Instagram и Facebook) ---------- */
@media (max-width: 768px) {
  body { font-size: 16px; line-height: 1.65; }
  .site-header .inside-header { padding-top: 12px; padding-bottom: 12px; }
  .main-title { font-size: 22px; }
  .single .inside-article, .page .inside-article { padding: 20px 16px 8px; }
  .single .entry-title { font-size: 30px; }
  .entry-content h2 { font-size: 24px; margin: 1.8em 0 .5em; }
  .entry-content .wp-block-image { margin: .8em -16px; }          /* коллаж от края до края экрана */
  .entry-content .wp-block-image img { border-radius: 0; max-width: 100%; }

  /* рубрики и главная: 2 пина в ряд, как в Pinterest, а не один огромный */
  .blog .site-main, .archive .site-main, .search .site-main { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .blog .entry-title, .archive .entry-title, .search .entry-title { font-size: 15px; }
  .blog .entry-summary, .archive .entry-summary, .search .entry-summary { display: none; }
  .archive .page-header h1 { font-size: 28px; }

  /* карточки товаров: крупнее кнопки под палец */
  .shop-the-look { padding: 12px; margin-left: -4px; margin-right: -4px; }
  .shop-the-look .shop-card a > span:last-child { display: block !important; padding: 11px 8px !important; font-size: 14px !important; }
  .shop-the-look .shop-card { padding: 8px !important; }
}
@media (max-width: 360px) {
  .shop-the-look > div { gap: 8px !important; }
  .shop-the-look .shop-card a > span:nth-child(3) { font-size: 13px !important; }
}
/* вырезы и закругления экранов iPhone во встроенных браузерах соцсетей */
@supports (padding: max(0px)) {
  .site-footer .site-info > div, .inside-header { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
}

/* ---------- кнопка «Save» Pinterest на коллажах ---------- */
.od-pin-wrap { position: relative; display: block; max-width: 600px; margin: 0 auto; }
.od-pin-btn {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  background: #e60023; color: #fff !important; text-decoration: none !important;
  font: 600 14px/1 var(--od-sans); padding: 9px 14px 9px 11px; border-radius: 999px;
  box-shadow: 0 2px 10px rgba(0,0,0,.18); opacity: 0; transform: translateY(-4px);
  transition: opacity .18s ease, transform .18s ease, background .15s ease;
}
.od-pin-btn:hover { background: #ad081b; }
.od-pin-wrap:hover .od-pin-btn, .od-pin-btn:focus { opacity: 1; transform: none; }
@media (hover: none) {                       /* телефоны: кнопка видна всегда, но компактнее */
  .od-pin-btn { opacity: .95; transform: none; top: 10px; left: 10px; padding: 7px 11px 7px 9px; font-size: 13px; }
}
@media (max-width: 768px) { .od-pin-wrap { max-width: none; } }

/* ---------- главная и общие блоки ---------- */
.od-home .site-main { display: block !important; }
.home .site-content .content-area, .error404 .site-content .content-area { max-width: none; }
.od-hero { text-align: center; padding: 48px 16px 36px; }
.od-hero-title { font-family: var(--od-serif); font-weight: 700; font-size: clamp(36px, 6vw, 60px); line-height: 1.05; margin: 0 0 12px; letter-spacing: -.02em; }
.od-hero-sub { color: var(--od-muted); font-size: 18px; max-width: 620px; margin: 0 auto 22px; }
.od-hero-search { max-width: 520px; margin: 0 auto; }
.od-hero-search form, .od-hero-search form > div { display: flex; gap: 8px; align-items: center; width: 100%; }
.od-hero-search input[type=search], .od-hero-search .search-field, .od-hero-search input[type=text] { flex: 1; border: 1px solid var(--od-line); border-radius: 999px; padding: 12px 18px; font-size: 16px; background: var(--od-surface); }
.od-hero-search input[type=submit], .od-hero-search button { border: 0; border-radius: 999px; padding: 12px 20px; background: var(--od-ink); color: #fff; font-weight: 600; cursor: pointer; }
.od-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.od-chips a { border: 1px solid var(--od-line); background: var(--od-surface); color: var(--od-ink); text-decoration: none; border-radius: 999px; padding: 7px 14px; font-size: 14px; }
.od-chips a:hover { border-color: var(--od-accent); color: var(--od-accent); }
.od-section { padding: 28px 0; }
.od-section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; border-bottom: 1px solid var(--od-line); padding-bottom: 10px; }
.od-section-head h2, .od-related h2 { font-family: var(--od-serif); font-size: clamp(24px, 3.2vw, 32px); margin: 0; }
.od-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.od-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.od-card a { text-decoration: none; color: var(--od-ink); display: block; }
.od-card img, .od-card-ph { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 10px; display: block; background: var(--od-line); transition: transform .2s ease; }
.od-card a:hover img { transform: scale(1.015); }
.od-card h3 { font-family: var(--od-serif); font-size: 18px; line-height: 1.25; margin: 10px 0 0; }
.od-card a:hover h3 { color: var(--od-accent); }
.od-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.od-tile { position: relative; display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 5; background: var(--od-line); text-decoration: none; }
.od-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.od-tile:hover img { transform: scale(1.04); }
.od-tile span { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 14px 14px; color: #fff; font-family: var(--od-serif); font-size: 20px; font-weight: 700;
  background: linear-gradient(transparent, rgba(0,0,0,.62)); }
.od-tile small { display: block; font-family: var(--od-sans); font-weight: 400; font-size: 12px; opacity: .85; margin-top: 2px; }
.od-more { text-align: center; margin: 26px 0 0; }
.od-btn { display: inline-block; background: var(--od-ink); color: #fff !important; text-decoration: none !important; border-radius: 999px; padding: 12px 26px; font-weight: 600; }
.od-btn:hover { background: var(--od-accent); }
.od-about { text-align: center; max-width: 680px; margin: 10px auto 30px; color: var(--od-muted); font-size: 17px; border-top: 1px solid var(--od-line); padding-top: 26px; }
.od-related { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--od-line); }
.od-related h2 { margin-bottom: 16px; }
.od-related .od-card h3 { font-size: 16px; }
@media (max-width: 900px) { .od-grid, .od-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 768px) {
  .od-hero { padding: 28px 8px 20px; }
  .od-grid, .od-grid-3, .od-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
  .od-card h3 { font-size: 15px; }
  .od-tile span { font-size: 16px; padding: 30px 10px 10px; }
  .od-hero-search form { flex-direction: column; }
  .od-trending .od-card:nth-child(n+5) { display: none; }      /* на телефоне 4 актуальных, а не 8 */
}

/* ---------- страница рубрики ---------- */
.od-cat-head { text-align: center; padding: 36px 16px 10px; }
.od-crumbs { font-size: 13px; color: var(--od-muted); margin-bottom: 10px; }
.od-crumbs a { color: var(--od-muted); text-decoration: none; }
.od-crumbs a:hover { color: var(--od-accent); }
.od-cat-intro { max-width: 680px; margin: 0 auto; color: var(--od-muted); font-size: 17px; }
.od-cat-intro p { margin: 0 0 10px; }
.od-pager { margin-top: 28px; text-align: center; }
.od-pager .nav-links { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.od-pager .page-numbers { display: inline-block; min-width: 40px; padding: 8px 12px; border: 1px solid var(--od-line); border-radius: 999px;
  text-decoration: none; color: var(--od-ink); background: var(--od-surface); }
.od-pager .page-numbers.current { background: var(--od-ink); color: #fff; border-color: var(--od-ink); }
.archive.category .site-main { display: block !important; }
@media (max-width: 768px) { .od-cat-head { padding: 22px 6px 4px; } .od-cat-intro { font-size: 15px; } }

/* ---------- сайдбар: только компьютер ---------- */
.od-sidebar { display: none; }
@media (min-width: 1100px) {
  .od-has-sidebar .site-content { display: grid !important; grid-template-columns: minmax(0, 720px) 300px; gap: 56px; justify-content: center; }
  .od-has-sidebar .site-content .content-area { max-width: 720px; margin: 0; }
  .od-has-sidebar .od-sidebar { display: block; padding-top: 32px; }
  .od-has-sidebar .od-related .od-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.od-side-box { background: var(--od-surface); border: 1px solid var(--od-line); border-radius: 14px; padding: 18px; margin-bottom: 20px; font-size: 15px; }
.od-side-sticky { position: sticky; top: 24px; }
.od-side-about { text-align: center; }
.od-side-about img, .od-side-icon { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; margin: 0 auto 8px; display: block; }
.od-side-title { font-family: var(--od-serif); font-weight: 700; font-size: 20px; margin: 0 0 6px; }
.od-side-about p { margin: 0 0 8px; color: var(--od-muted); }
.od-side-link { font-weight: 600; text-decoration: none; }
.od-side-head { font-family: var(--od-serif); font-weight: 700; font-size: 18px; margin: 0 0 12px; }
.od-side-post { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; text-decoration: none; color: var(--od-ink); margin-bottom: 12px; }
.od-side-post img { width: 64px; height: 84px; object-fit: cover; border-radius: 8px; }
.od-side-post span { font-family: var(--od-serif); font-size: 15px; line-height: 1.25; }
.od-side-post:hover span { color: var(--od-accent); }
.od-side-box form, .od-side-box form > div { display: flex; gap: 6px; align-items: center; width: 100%; box-sizing: border-box; }
.od-side-box input[type=submit], .od-side-box button { flex: none; }
.od-side-box .screen-reader-text, .od-hero-search .screen-reader-text { position: absolute; left: -9999px; }
.od-side-box input[type=search], .od-side-box .search-field, .od-side-box input[type=text] { flex: 1; min-width: 0; border: 1px solid var(--od-line); border-radius: 999px; padding: 9px 14px; }
.od-side-box input[type=submit], .od-side-box button { border: 0; border-radius: 999px; padding: 9px 14px; background: var(--od-ink); color: #fff; }
.od-chips-left { justify-content: flex-start; margin-top: 0; }
.od-chips-left a { font-size: 13px; padding: 5px 11px; }

/* ---------- «What to look for» в подборках (Board desk) ---------- */
.entry-content .od-picks { padding-left: 1.1em; }
.entry-content .od-picks li { margin-bottom: .6em; line-height: 1.6; }
.entry-content .od-picks a { text-decoration: underline; text-underline-offset: 3px; }

/* 1.6.0 — заглавный пин уже первой картинкой в тексте: на странице записи не дублируем его как изображение записи */
.single-post .featured-image.page-header-image-single { display: none; }

/* оглавление образов */
.od-toc { margin: 20px 0 28px; padding: 16px 20px; border: 1px solid #e8e4df; border-radius: 10px; background: #faf8f5; }
.od-toc-title { margin: 0 0 8px; font-family: "Playfair Display", Georgia, serif; font-weight: 700; font-size: 1.1em; }
.od-toc ol { margin: 0 0 0 1.2em; padding: 0; columns: 2; column-gap: 28px; }
.od-toc li { margin: 4px 0; break-inside: avoid; }
.od-toc a { text-decoration: none; }
.od-toc a:hover { text-decoration: underline; }
@media (max-width: 640px) { .od-toc ol { columns: 1; } }
