/*
Theme Name: KegMaster
Theme URI: https://example.com/kegmaster
Description: Тема-аналог каталога пивного разливного оборудования на WordPress.
Version: 1.0
Requires PHP: 7.4
Text Domain: kegmaster
*/

:root {
  --orange: #F37021;
  --orange-dark: #d95f10;
  --ink: #22282f;
  --gray: #6b7683;
  --line: #e4e8ec;
  --bg: #f5f7f9;
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.5;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}
img, svg { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; width: 100%; }
.muted { color: var(--gray); }
.empty { padding: 40px 0; color: var(--gray); font-size: 18px; text-align: center; }
.page-lead { color: var(--gray); margin-bottom: 28px; max-width: 640px; }
h1 { font-size: 32px; margin-bottom: 18px; }
main.site-main { flex: 1; }

/* buttons */
.btn {
  display: inline-block; border: 0; cursor: pointer; font: inherit;
  padding: 11px 22px; border-radius: var(--radius); font-weight: 600;
  transition: background .15s, color .15s, transform .1s;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--orange); color: #fff; }
.btn--primary:hover { background: var(--orange-dark); }
.btn--outline { border: 2px solid var(--orange); color: var(--orange); background: transparent; }
.btn--outline:hover { background: var(--orange); color: #fff; }
.btn--ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--orange); color: var(--orange); }
.btn--light { background: #fff; color: var(--orange); }
.btn--lg { padding: 14px 30px; font-size: 16px; }
.btn--block { width: 100%; text-align: center; }

/* topbar */
.topbar { border-bottom: 1px solid var(--line); background: #fff; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 14px; padding-bottom: 14px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo__icon { width: 40px; height: 40px; }
.logo__text { font-size: 20px; letter-spacing: .3px; }
.logo__text strong { color: var(--orange); }
.logo__text small { display: block; font-size: 10px; color: var(--gray); text-transform: uppercase; letter-spacing: 1.5px; font-weight: 400; }
.topbar__contacts { text-align: right; line-height: 1.25; }
.phone { font-weight: 700; font-size: 17px; display: block; }
.phone:hover { color: var(--orange); }
.phone--lg { font-size: 24px; }
.email { color: var(--gray); font-size: 13px; }
.email:hover { color: var(--orange); }

/* nav */
.mainnav { background: var(--ink); position: sticky; top: 0; z-index: 50; }
.mainnav__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.mainnav ul { display: flex; list-style: none; margin: 0; padding: 0; }
.mainnav a { display: block; padding: 14px 18px; color: #fff; font-weight: 600; font-size: 15px; }
.mainnav a:hover, .mainnav .current-menu-item > a, .mainnav .current_page_item > a { background: var(--orange); }
.navsearch { display: flex; }
.navsearch input {
  border: 0; padding: 9px 14px; border-radius: var(--radius) 0 0 var(--radius);
  outline: none; width: 220px; font: inherit;
}
.navsearch button { border: 0; background: var(--orange); color: #fff; padding: 0 14px; border-radius: 0 var(--radius) var(--radius) 0; cursor: pointer; font-size: 17px; }
.burger { display: none; background: none; border: 0; cursor: pointer; padding: 10px; }
.burger span { display: block; width: 24px; height: 3px; background: #fff; margin: 4px 0; border-radius: 2px; }

/* hero */
.hero { background: linear-gradient(120deg, #2b323a, #3b444f 60%, #2b323a); color: #fff; }
.hero__inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; padding-top: 60px; padding-bottom: 60px; }
.hero h1 { font-size: 38px; line-height: 1.2; }
.hero p { color: #cfd6dd; margin: 14px 0 24px; max-width: 560px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__visual svg { max-width: 280px; margin: 0 auto; }

/* sections */
section { padding: 52px 0; }
.section-title { font-size: 26px; margin-bottom: 26px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 26px; }
.section-head .section-title { margin-bottom: 0; }
.link-more { color: var(--orange); font-weight: 600; }
.link-more:hover { text-decoration: underline; }

/* categories */
.categories__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.cat-tile {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 14px; text-align: center; transition: .15s; display: block;
}
.cat-tile:hover { border-color: var(--orange); transform: translateY(-3px); box-shadow: 0 8px 20px rgba(243,112,33,.12); }
.cat-tile__icon { font-size: 34px; display: block; }
.cat-tile__icon .cat-photo { width: 76px; height: 76px; margin: 0 auto; object-fit: contain; }
.cat-tile__name { display: block; font-weight: 600; margin: 10px 0 4px; font-size: 14px; }
.cat-tile__count { color: var(--gray); font-size: 12px; }

/* advantages */
.perks { background: var(--bg); }
.perks__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.perk { background: #fff; border-radius: var(--radius); padding: 24px; border: 1px solid var(--line); }
.perk__icon { font-size: 30px; margin-bottom: 12px; }
.perk h3 { font-size: 17px; margin-bottom: 8px; }
.perk p { color: var(--gray); font-size: 14px; }

/* product cards */
.products__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.site-main > .products__grid { padding-bottom: 52px; }
.card {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 10px; transition: .15s;
}
.card:hover { box-shadow: 0 10px 24px rgba(0,0,0,.08); transform: translateY(-3px); }
.card__badge {
  position: absolute; top: 10px; left: 10px; background: var(--orange); color: #fff;
  font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; z-index: 2;
}
.card__badge--stock { background: var(--gray); left: auto; right: 10px; }
.card__img {
  background: var(--bg); border-radius: 8px; height: 120px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.card__icon { font-size: 52px; line-height: 1; max-width: 100%; white-space: nowrap; }
.card__photo { width: 100%; height: 100%; object-fit: contain; display: block; }
.card__name { font-size: 15px; line-height: 1.35; }
.card__desc { font-size: 13px; color: var(--gray); flex-grow: 1; }
.card__prices { display: flex; align-items: baseline; gap: 10px; }
.card__price { font-size: 19px; font-weight: 700; }
.card__old { color: var(--gray); text-decoration: line-through; font-size: 14px; }
.card--sale { border-color: #f8c79a; }

/* sale strip */
.sale-strip { background: linear-gradient(100deg, var(--orange), #ff9047); color: #fff; padding: 36px 0; }
.sale-strip__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.sale-strip h2 { font-size: 24px; margin-bottom: 6px; }
.sale-strip .btn--primary { background: #fff; color: var(--orange); }

/* news */
.news { background: var(--bg); }
.news__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* services */
.services__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding-bottom: 10px; }
.services__grid--page { padding-bottom: 52px; }
.services__grid h3 a:hover { color: var(--orange); }
.news-card { background: #fff; border-radius: var(--radius); padding: 22px; border: 1px solid var(--line); }
.news-card__tag {
  display: inline-block; background: #fdeadd; color: var(--orange-dark);
  font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; margin-bottom: 10px;
}
.news-card time { color: var(--gray); font-size: 12px; margin-left: 8px; }
.news-card h3 { font-size: 16px; margin-bottom: 8px; }
.news-card h3 a:hover { color: var(--orange); }
.news-card p { color: var(--gray); font-size: 14px; }

/* order strip */
.order-strip { background: var(--ink); color: #fff; text-align: center; }
.order-strip__inner { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.order-strip p { color: #9aa4ad; }
.order-strip .btn { margin-top: 10px; }

/* catalog page */
.breadcrumbs { font-size: 13px; color: var(--gray); margin: 18px 0 10px; }
.breadcrumbs a:hover { color: var(--orange); }
.catalog-layout { display: grid; grid-template-columns: 240px 1fr; gap: 26px; align-items: start; padding-bottom: 52px; }
.filters { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; position: sticky; top: 70px; }
.filters h3 { font-size: 15px; margin: 14px 0 8px; }
.filters h3:first-child { margin-top: 0; }
.filters ul { list-style: none; }
.filters a.cat-link {
  display: block; text-align: left; padding: 7px 9px; border-radius: 8px; color: var(--ink); font-size: 14px;
}
.filters a.cat-link:hover { background: #eceff2; }
.filters a.cat-link.is-active { background: var(--orange); color: #fff; font-weight: 600; }
.filters a.cat-link .cat-photo { display: inline-block; width: 26px; height: 26px; vertical-align: -7px; margin-right: 6px; object-fit: contain; }
.filters form { margin: 0; }
.filters__price { display: flex; gap: 8px; }
.filters__price input, .catalog-toolbar select {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff;
}
.filters__check { display: flex; gap: 8px; align-items: center; font-size: 14px; margin: 12px 0; cursor: pointer; }
.filters .btn { margin-top: 8px; }
.catalog-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 18px; color: var(--gray); font-size: 14px; }
.products__grid--catalog { grid-template-columns: repeat(3, 1fr); }

/* pagination */
.pagination { margin-top: 30px; display: flex; gap: 8px; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px;
}
.pagination .current { background: var(--orange); color: #fff; border-color: var(--orange); }

/* single product */
.single-product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; padding-bottom: 52px; align-items: start; }
.single-product-layout .card__img { height: 280px; border: 1px solid var(--line); border-radius: var(--radius); }
.single-product-layout .card__icon { font-size: 110px; }
.product-meta { color: var(--gray); font-size: 14px; margin: 10px 0 16px; }
.product-price-block { display: flex; align-items: baseline; gap: 14px; margin-bottom: 20px; }
.product-price-block .card__price { font-size: 30px; }

/* contacts page */
.contacts-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 34px; padding-bottom: 60px; align-items: start; }
.contact-block { margin-bottom: 24px; }
.contact-block h3 { font-size: 17px; margin-bottom: 6px; color: var(--orange-dark); }
.contact-block p { color: var(--gray); }
.plain-list { margin-left: 18px; color: var(--gray); }
.plain-list li { margin-bottom: 6px; }
.contacts-form { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.contacts-form h3 { margin-bottom: 16px; font-size: 19px; }
.contacts-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 14px; color: var(--gray); }
.contacts-form input, .contacts-form textarea {
  width: 100%; margin-top: 5px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 8px; font: inherit; background: #fff;
}
.contacts-form input[type="checkbox"] { width: auto; margin: 0 8px 0 0; accent-color: var(--orange); }
.contacts-form textarea { resize: none; }
.contacts-form .filters__check { font-weight: 400; flex-direction: row; }
.contacts-form input:focus, .contacts-form textarea:focus { outline: 2px solid var(--orange); border-color: transparent; }
.order-done { font-size: 16px; color: #1c7c3f; font-weight: 600; }

/* blog */
.post-list { display: flex; flex-direction: column; gap: 26px; padding-bottom: 52px; }
.post-list article { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: #fff; }
.post-list h2 { font-size: 20px; margin-bottom: 8px; }
.post-list h2 a:hover { color: var(--orange); }
.post-list .meta { color: var(--gray); font-size: 13px; margin-bottom: 10px; }
.single-post-body { padding-bottom: 52px; max-width: 760px; }
.single-post-body p { margin-bottom: 14px; }

/* footer */
.footer { background: var(--ink); color: #cfd6dd; padding-top: 46px; }
.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 30px; padding-bottom: 34px; }
.footer__logo { font-size: 22px; color: #fff; margin-bottom: 10px; }
.footer__logo strong { color: var(--orange); }
.footer h4 { color: #fff; margin-bottom: 12px; font-size: 15px; }
.footer ul { list-style: none; }
.footer li { margin-bottom: 8px; }
.footer a:hover { color: var(--orange); }
.footer .muted { font-size: 14px; }
.footer__phone { font-weight: 700; font-size: 17px; color: #fff; }
.footer__bottom {
  border-top: 1px solid #3b444f; padding: 16px 20px; display: flex;
  justify-content: space-between; gap: 14px; font-size: 12px; color: #7d8791; flex-wrap: wrap;
}

/* responsive */
@media (max-width: 1000px) {
  .categories__grid { grid-template-columns: repeat(3, 1fr); }
  .perks__grid, .products__grid { grid-template-columns: repeat(2, 1fr); }
  .products__grid--catalog { grid-template-columns: repeat(2, 1fr); }
  .news__grid, .services__grid { grid-template-columns: 1fr; }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { display: none; }
  .catalog-layout, .contacts-layout, .single-product-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .topbar__contacts { display: none; }
  .mainnav__inner { flex-wrap: wrap; }
  .burger { display: block; }
  .mainnav ul { display: none; flex-direction: column; width: 100%; }
  .mainnav ul.is-open { display: flex; }
  .navsearch { width: 100%; margin-bottom: 10px; }
  .navsearch input { width: 100%; }
  .categories__grid, .perks__grid, .products__grid, .products__grid--catalog, .services__grid { grid-template-columns: 1fr; }
  h1, .hero h1 { font-size: 26px; }
  .footer__inner { grid-template-columns: 1fr; }
}
