/* ===== PAGE.CSS — Static pages, Blog, Search, Sitemap ===== */

/* Page header — reuse from catalog */
.page-header { background: var(--brown-deep); padding: 48px 0 40px; position: relative; overflow: hidden; }
.page-header::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--brown-mid), var(--gold), var(--brown-mid)); }
.page-header-title { font-size: clamp(24px,3vw,38px); font-weight: 900; color: #fff; margin-bottom: 8px; }
.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: 13px; color: rgba(255,255,255,.5); flex-wrap: wrap; }
.breadcrumb a { color: rgba(255,255,255,.6); transition: color .2s; }
.breadcrumb a:hover { color: var(--gold-light); }
.breadcrumb-sep { color: rgba(255,255,255,.3); }

/* SEO-текст под листингом товаров (каталог, бренды) */
.seo-text-block {
  margin: 56px 0 40px;
  padding: 40px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.seo-text-block .prose h2 { font-size: 22px; font-weight: 800; color: var(--brown-deep); margin: 32px 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--cream-dark); }
.seo-text-block .prose h2:first-child { margin-top: 0; }
.seo-text-block .prose h3 { font-size: 17px; font-weight: 700; color: var(--brown-deep); margin: 22px 0 10px; }
.seo-text-block .prose p { font-size: 15px; line-height: 1.8; color: var(--text-muted); margin-bottom: 14px; }
.seo-text-block .prose ul, .seo-text-block .prose ol { padding-left: 22px; margin-bottom: 14px; }
.seo-text-block .prose li { font-size: 15px; line-height: 1.75; color: var(--text-muted); margin-bottom: 6px; }
.seo-text-block .prose strong { color: var(--brown-deep); }
.seo-text-block .prose a { color: var(--gold); text-decoration: underline; }
.seo-text-block .prose a:hover { color: var(--gold-light); }
.seo-text-block .prose blockquote { border-left: 4px solid var(--gold); padding: 14px 20px; background: var(--cream); border-radius: 0 10px 10px 0; margin: 20px 0; font-style: italic; }
@media (max-width: 600px) { .seo-text-block { padding: 24px; } }

/* Static page content */
.page-content { padding: 56px 0 72px; }
.page-content .prose { background: #fff; border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow-soft); }
.contacts-map { margin-top: 32px; }
.map-wrapper { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-soft); }

/* Share buttons (используются на странице блога и товара) */
.product-share { display: flex; align-items: center; gap: 8px; }
.product-share-label { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.share-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; transition: transform var(--transition), opacity var(--transition);
  text-decoration: none; flex-shrink: 0; border: none; cursor: pointer;
}
.share-btn:hover { transform: scale(1.15); opacity: .88; }
.share-vk { background: #0077ff; }
.share-tg { background: #27a6e5; }
.share-ok { background: #f48120; }
.share-copy { background: var(--brown-mid, #7a5c3a); color: #fff; }

/* Prose (rich text typography) */
.prose h2 { font-size: 22px; font-weight: 800; color: var(--brown-deep); margin: 32px 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--cream-dark); }
.prose h3 { font-size: 17px; font-weight: 700; color: var(--brown-deep); margin: 22px 0 10px; }
.prose p { font-size: 15px; line-height: 1.8; color: var(--text-muted); margin-bottom: 14px; }
.prose ul, .prose ol { padding-left: 22px; margin-bottom: 14px; }
.prose li { font-size: 15px; line-height: 1.75; color: var(--text-muted); margin-bottom: 6px; }
.prose strong { color: var(--brown-deep); }
.prose a { color: var(--gold); text-decoration: underline; }
.prose a:hover { color: var(--gold-light); }
.prose blockquote { border-left: 4px solid var(--gold); padding: 14px 20px; background: var(--cream); border-radius: 0 10px 10px 0; margin: 20px 0; font-style: italic; }

/* Sales page */
.sales-page { padding: 56px 0 40px; }
.sales-subscribe-block {
  margin: 48px 0 72px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 48px 40px;
  text-align: center;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.sales-subscribe-icon { font-size: 40px; margin-bottom: 12px; }
.sales-subscribe-title { font-size: 22px; font-weight: 800; color: var(--brown-deep); margin-bottom: 10px; }
.sales-subscribe-desc { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-bottom: 24px; }
.sales-subscribe-form {
  display: flex; gap: 10px; max-width: 420px; margin: 0 auto;
}
.sales-subscribe-input {
  flex: 1; padding: 13px 18px; border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius); font-family: inherit; font-size: 15px;
  color: var(--text-main); background: var(--cream); outline: none;
  transition: border-color var(--transition);
}
.sales-subscribe-input:focus { border-color: var(--gold); background: #fff; }
@media (max-width: 600px) {
  .sales-subscribe-block { padding: 32px 20px; }
  .sales-subscribe-form { flex-direction: column; }
  .sales-subscribe-input { width: 100%; }
}

/* Blog list */
.blog-page { padding: 56px 0 72px; }
.blog-filters { display: flex; gap: 8px; margin-bottom: 36px; flex-wrap: wrap; }
.blog-filter-btn {
  padding: 8px 20px; border-radius: 50px;
  font-size: 13px; font-weight: 600;
  color: var(--text-muted); background: transparent;
  border: 2px solid var(--cream-dark);
  transition: all var(--transition); cursor: pointer;
  text-decoration: none; display: inline-block;
}
.blog-filter-btn:hover, .blog-filter-btn.active { background: var(--brown-deep); color: #fff; border-color: var(--brown-deep); }

/* Blog detail */
.blog-detail-page { padding: 56px 0 72px; }
.blog-detail-grid { display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: start; }
.blog-detail-main {}
.blog-detail-image { border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 32px; }
.blog-detail-image img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.blog-detail-meta { display: flex; gap: 16px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.blog-detail-tag { background: var(--gold); color: var(--brown-deep); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 4px 12px; border-radius: 20px; }
.blog-detail-date { font-size: 13px; color: var(--text-muted); }
.blog-detail-read { font-size: 13px; color: var(--text-muted); }
.blog-detail-title { font-size: clamp(22px,2.5vw,32px); font-weight: 800; color: var(--brown-deep); line-height: 1.25; margin-bottom: 24px; }

/* Sidebar */
.blog-sidebar {}
.blog-sidebar-block { background: #fff; border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-soft); margin-bottom: 24px; }
.blog-sidebar-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--brown-deep); margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--cream-dark); }
.blog-recent-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--cream-dark); }
.blog-recent-item:last-child { border-bottom: none; }
.blog-recent-img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--cream-dark); }
.blog-recent-title { font-size: 13px; font-weight: 600; color: var(--brown-deep); line-height: 1.35; }
.blog-recent-title a:hover { color: var(--gold); }
.blog-recent-date { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* Search */
.search-page { padding: 56px 0 72px; }
.search-form-big { display: flex; gap: 12px; margin-bottom: 40px; }
.search-input-big {
  flex: 1; padding: 14px 20px; border-radius: 50px;
  border: 2px solid var(--cream-dark); font-size: 15px;
  font-family: inherit; outline: none; color: var(--text-main);
  transition: border-color var(--transition);
}
.search-input-big:focus { border-color: var(--gold); }
.search-results-section { margin-bottom: 48px; }
.search-section-title { font-size: 18px; font-weight: 700; color: var(--brown-deep); margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--cream-dark); display: flex; align-items: center; gap: 10px; }
.search-count-badge { background: var(--gold); color: var(--brown-deep); font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 20px; }
.search-product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.search-blog-list { display: flex; flex-direction: column; gap: 12px; }
.search-blog-item { display: flex; gap: 16px; align-items: center; background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-soft); }
.search-blog-img { width: 80px; height: 60px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.search-blog-title { font-size: 14px; font-weight: 600; color: var(--brown-deep); }
.search-blog-title a:hover { color: var(--gold); }
.search-blog-meta { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.search-pages-list { display: flex; flex-direction: column; gap: 8px; }
.search-page-item { background: #fff; border-radius: var(--radius); padding: 14px 20px; box-shadow: var(--shadow-soft); font-size: 14px; font-weight: 600; color: var(--brown-deep); }
.search-page-item a:hover { color: var(--gold); }
.search-empty { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.search-empty-icon { font-size: 64px; margin-bottom: 16px; }

/* Sitemap */
.sitemap-page { padding: 56px 0 72px; }
.sitemap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.sitemap-section-wide { grid-column: span 2; }
.sitemap-section { background: #fff; border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-soft); }
.sitemap-section-title { font-size: 15px; font-weight: 700; color: var(--brown-deep); margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--cream-dark); }
.sitemap-links { display: flex; flex-direction: column; gap: 8px; }
.sitemap-links a { font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; transition: color var(--transition), padding-left var(--transition); }
.sitemap-links a:hover { color: var(--gold); padding-left: 4px; }

/* Checkout */
.checkout-layout { display: grid; grid-template-columns: 1fr 380px; gap: 32px; padding: 48px 0 72px; align-items: start; }
/* min-width:0 не даёт колонкам/полям растягивать сетку по контенту (grid blowout) */
.checkout-layout > * { min-width: 0; }
.checkout-section .form-field { min-width: 0; }
.checkout-section .form-field input,
.checkout-section .form-field textarea { width: 100%; min-width: 0; }
.checkout-section { background: #fff; border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-soft); }
.checkout-section-title { font-size: 18px; font-weight: 700; color: var(--brown-deep); margin-bottom: 24px; padding-bottom: 12px; border-bottom: 2px solid var(--cream-dark); }
.checkout-total { display: flex; justify-content: space-between; font-size: 17px; font-weight: 700; color: var(--brown-deep); padding: 16px 0; border-top: 2px solid var(--cream-dark); margin-top: 8px; }
.field-error { font-size: 12px; color: #e84b4b; }
.checkout-section .form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.checkout-section .form-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.checkout-section .form-field:last-of-type { margin-bottom: 0; }
.checkout-section .form-field label { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .07em; }
.checkout-section .form-field input,
.checkout-section .form-field textarea {
  padding: 13px 16px; border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius); font-family: inherit; font-size: 15px;
  color: var(--text-main); background: var(--cream); outline: none;
  transition: border-color var(--transition), background var(--transition);
}
.checkout-section .form-field input:focus,
.checkout-section .form-field textarea:focus { border-color: var(--gold); background: #fff; }

@media (max-width: 900px) {
  .blog-detail-grid { grid-template-columns: 1fr; }
  .sitemap-grid { grid-template-columns: repeat(2, 1fr); }
  .search-product-grid { grid-template-columns: repeat(2, 1fr); }
  .checkout-layout { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .sitemap-grid { grid-template-columns: 1fr; }
  .sitemap-section-wide { grid-column: auto; }
  .search-product-grid { grid-template-columns: repeat(2, 1fr); }
  .page-content .prose { padding: 24px; }
  .checkout-section { padding: 24px 20px; }
  .checkout-section .form-row-2 { grid-template-columns: 1fr; gap: 0; }
  /* Строка поиска: кнопка под полем, а не рядом (иначе вылезает за край) */
  .search-form-big { flex-direction: column; }
  .search-form-big .btn { width: 100%; justify-content: center; }
}

/* ===== CART PAGE ===== */
.cart-page-item {
  display: grid;
  grid-template-columns: 96px 1fr auto auto auto;
  gap: 18px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--cream-dark);
}
.cart-page-item:last-child { border-bottom: none; }
.cart-page-item-img { width: 96px; height: 96px; }
.cart-page-item-img-link {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: var(--cream-dark); border-radius: 12px; overflow: hidden;
  text-decoration: none;
}
.cart-page-item-img-link img { width: 100%; height: 100%; object-fit: cover; }
.cart-page-name {
  display: block; font-size: 15px; font-weight: 700;
  color: var(--brown-deep); text-decoration: none;
  margin-bottom: 4px; line-height: 1.35;
}
a.cart-page-name:hover { color: var(--gold); }
.cart-page-item-price-mobile { font-size: 13px; color: var(--text-muted); display: none; }
.cart-page-item-qty { display: inline-flex; align-items: center; gap: 4px; }
.qty-btn {
  width: 32px; height: 32px; border: 1px solid var(--cream-dark);
  background: #fff; border-radius: 8px; cursor: pointer;
  font-size: 16px; font-weight: 700; color: var(--brown-deep);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, border-color .15s;
}
.qty-btn:hover { background: var(--cream); border-color: var(--gold); }
.qty-input {
  width: 48px; height: 32px; text-align: center;
  border: 1px solid var(--cream-dark); border-radius: 8px;
  font-size: 14px; font-weight: 600; color: var(--brown-deep);
  -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-input:focus { outline: none; border-color: var(--gold); }
.cart-page-item-total { text-align: right; min-width: 100px; }
.cart-page-line-total { font-size: 16px; font-weight: 800; color: var(--gold); white-space: nowrap; }
.cart-page-remove {
  width: 32px; height: 32px; border: none; background: transparent;
  color: var(--text-muted); font-size: 22px; cursor: pointer;
  border-radius: 8px; transition: background .15s, color .15s;
}
.cart-page-remove:hover { background: #fff2f2; color: #c62828; }

@media (max-width: 760px) {
  .cart-page-item {
    grid-template-columns: 72px 1fr auto;
    grid-template-areas:
      "img info remove"
      "img qty total";
    gap: 12px;
  }
  .cart-page-item-img { grid-area: img; width: 72px; height: 72px; }
  .cart-page-item-info { grid-area: info; }
  .cart-page-item-qty { grid-area: qty; justify-self: start; }
  .cart-page-item-total { grid-area: total; min-width: 0; }
  .cart-page-remove { grid-area: remove; align-self: start; }
  .cart-page-item-price-mobile { display: block; }
}

/* Search highlight */
mark { background: #fff2c6; color: inherit; padding: 0 2px; border-radius: 2px; font-weight: inherit; }

/* Brands list page */
.brands-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; padding: 48px 0 72px; }
.brand-card {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 32px 20px; background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft); text-decoration: none; color: inherit;
  transition: transform .2s, box-shadow .2s;
}
.brand-card:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(0,0,0,.08); }
.brand-card-logo {
  width: 100%; height: 80px; display: flex; align-items: center; justify-content: center;
  background: var(--cream); border-radius: 12px; padding: 12px;
}
.brand-card-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-card-letter { font-size: 40px; font-weight: 900; color: var(--gold); }
.brand-card-name { font-size: 16px; font-weight: 700; color: var(--brown-deep); text-align: center; }
.brand-card-desc { font-size: 13px; color: var(--text-muted); text-align: center; line-height: 1.5; }
.brand-card-link { margin-top: auto; padding-top: 8px; font-size: 12px; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: .08em; }
