/*
Theme Name: NV Decor
Description: Собствена тема за NV Decor – Paints & Coatings (WooCommerce).
Version: 1.0.0
Text Domain: nvdecor
Requires PHP: 8.0
License: Proprietary
*/

:root {
  --navy: #021C41;
  --navy-2: #0A2A5C;
  --blue: #0368B6;
  --blue-2: #0E8DD7;
  --orange: #E58F1D;
  --yellow: #F7C51E;
  --red: #E0365E;
  --magenta: #B5198A;
  --ink: #0F1B2D;
  --muted: #5B6B82;
  --paper: #F4F7FB;
  --white: #FFFFFF;
  --line: #E1E8F1;
  --radius: 18px;
  --shadow: 0 18px 40px -18px rgba(2, 28, 65, .35);
  --grad: linear-gradient(90deg, var(--orange), var(--yellow) 18%, var(--red) 42%, var(--magenta) 58%, var(--blue-2) 82%, var(--blue));
  --font-head: "Montserrat", "Segoe UI", Arial, sans-serif;
  --font-body: "Manrope", "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--navy); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 4rem); font-weight: 900; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
.sr-only, .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 999; background: var(--white); padding: 8px 12px; width: auto; height: auto; clip: auto; }

.container { width: min(1200px, 100% - 32px); margin-inline: auto; }

.eyebrow {
  font-family: var(--font-head);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: .6rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-head); font-weight: 700; font-size: .95rem;
  padding: .9rem 1.5rem; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: transform .15s ease, background .2s, color .2s, box-shadow .2s;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn-primary { background: var(--orange); color: var(--navy); box-shadow: 0 10px 24px -10px rgba(229,143,29,.8); }
.btn-primary:hover { background: var(--yellow); color: var(--navy); }
.btn-ghost { border-color: rgba(255,255,255,.45); color: var(--white); }
.btn-ghost:hover { background: rgba(255,255,255,.1); color: var(--white); }
.btn-dark { border-color: var(--navy); color: var(--navy); }
.btn-dark:hover { background: var(--navy); color: var(--white); }
.btn-light { background: var(--white); color: var(--navy); }
.btn-light:hover { background: var(--yellow); color: var(--navy); }

/* ---------- Top bar + header ---------- */
.topbar { background: var(--navy); color: rgba(255,255,255,.85); font-size: .85rem; }
.topbar-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .5rem 0; flex-wrap: wrap; }
.topbar a { color: var(--white); font-weight: 700; }
.topbar a:hover { color: var(--yellow); }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 1.5rem; padding: .6rem 0; }
.brand { display: inline-flex; flex: 0 0 auto; }
.brand img, .brand .custom-logo { width: 180px; height: auto; }
.primary-nav { flex: 1; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.6rem; justify-content: center; }
.primary-nav a {
  font-family: var(--font-head); font-weight: 600; font-size: .92rem; color: var(--navy);
  padding: .4rem 0; position: relative;
}
.primary-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px; border-radius: 3px;
  background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.primary-nav a:hover, .primary-nav .current-menu-item > a { text-decoration: none; color: var(--blue); }
.primary-nav a:hover::after, .primary-nav .current-menu-item > a::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: .5rem; }
.icon-btn {
  position: relative; display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%; color: var(--navy);
  background: var(--paper); transition: background .2s, color .2s;
}
.icon-btn:hover { background: var(--navy); color: var(--white); text-decoration: none; }
.icon-btn svg { width: 20px; height: 20px; }
.cart-count {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--red); color: var(--white);
  font: 800 .72rem/20px var(--font-head); text-align: center;
}
.cart-count:empty, .cart-count[data-count="0"] { display: none; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--paper);
  position: relative; cursor: pointer; margin-left: auto;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; position: absolute; left: 12px; right: 12px; height: 2px; background: var(--navy); border-radius: 2px; content: "";
}
.nav-toggle span { top: 21px; }
.nav-toggle span::before { top: -7px; left: 0; right: 0; }
.nav-toggle span::after { top: 7px; left: 0; right: 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--white);
  background:
    radial-gradient(900px 500px at 85% 0%, rgba(14,141,215,.5), transparent 60%),
    radial-gradient(700px 480px at 0% 100%, rgba(229,143,29,.28), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
  padding: clamp(56px, 8vw, 110px) 0 clamp(120px, 14vw, 170px);
}
.hero-swoosh { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 55%; pointer-events: none; }
.hero-grid { position: relative; display: grid; gap: 40px; align-items: center; grid-template-columns: 1.1fr .9fr; }
.hero .eyebrow { color: var(--yellow); }
.hero h1 { color: var(--white); margin-bottom: .3em; }
.hero h1 span {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead { font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: rgba(255,255,255,.82); max-width: 36ch; margin-bottom: 2rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; }

.chips { position: relative; height: 380px; }
.chip {
  position: absolute; width: 190px; height: 230px; border-radius: 26px; padding: 18px;
  display: flex; flex-direction: column; justify-content: flex-end;
  box-shadow: 0 30px 50px -20px rgba(0,0,0,.55);
  font: 800 1.05rem/1.2 var(--font-head); color: var(--navy);
}
.chip small { font: 600 .78rem/1.3 var(--font-body); opacity: .85; margin-top: 4px; }
.chip.c1 { left: 0; top: 20px; background: var(--orange); transform: rotate(-7deg); color: var(--navy); }
.chip.c2 { left: 180px; top: 0; background: var(--magenta); transform: rotate(5deg); color: var(--white); }
.chip.c3 { left: 40px; top: 240px; background: var(--blue-2); transform: rotate(-2deg); color: var(--white); }
.chip.c4 { left: 240px; top: 190px; background: var(--yellow); transform: rotate(8deg); color: var(--navy); }
.chip::after { content: ""; position: absolute; top: 14px; right: 14px; width: 14px; height: 14px; border-radius: 50%; background: rgba(255,255,255,.7); }

/* ---------- Trust strip ---------- */
.trust { background: var(--white); position: relative; margin-top: -64px; z-index: 2; }
.trust-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.trust-item { display: flex; gap: 14px; align-items: flex-start; padding: 22px 22px; border-right: 1px solid var(--line); }
.trust-item:last-child { border-right: 0; }
.trust-item .ico {
  flex: 0 0 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: var(--paper); color: var(--blue);
}
.trust-item .ico svg { width: 22px; height: 22px; }
.trust-item h3 { font-size: .98rem; margin: 0 0 2px; }
.trust-item p { margin: 0; font-size: .88rem; color: var(--muted); line-height: 1.45; }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 7vw, 96px) 0; }
.section-alt { background: var(--paper); }
.section-head { margin-bottom: 2.2rem; }
.section-head.row { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.section-head p.lead { color: var(--muted); max-width: 60ch; }

/* ---------- Categories ---------- */
.cat-grid { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
.cat-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  min-height: 170px; padding: 24px; border-radius: var(--radius); background: var(--white);
  border: 1px solid var(--line); color: var(--ink); transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; text-decoration: none; }
.cat-card .num { font: 800 .8rem var(--font-head); color: var(--muted); letter-spacing: .1em; }
.cat-card h3 { font-size: 1.2rem; color: var(--navy); margin: 14px 0 6px; }
.cat-card .count { font-size: .88rem; color: var(--muted); }
.cat-card .arrow {
  position: absolute; right: 20px; bottom: 20px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: var(--navy); color: var(--white); font-size: 1.1rem; transition: transform .2s;
}
.cat-card:hover .arrow { transform: translateX(4px); }
.cat-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--accent, var(--blue)); }
.cat-card:nth-child(6n+1) { --accent: var(--orange); }
.cat-card:nth-child(6n+2) { --accent: var(--red); }
.cat-card:nth-child(6n+3) { --accent: var(--magenta); }
.cat-card:nth-child(6n+4) { --accent: var(--blue-2); }
.cat-card:nth-child(6n+5) { --accent: var(--yellow); }
.cat-card:nth-child(6n+6) { --accent: var(--blue); }

.empty-card {
  border: 2px dashed #C9D6E6; border-radius: var(--radius); padding: 36px; text-align: center; background: var(--white); color: var(--muted);
}
.empty-card h3 { color: var(--navy); }

/* ---------- Consult band ---------- */
.consult {
  position: relative; overflow: hidden; color: var(--white);
  background: linear-gradient(120deg, var(--blue) 0%, var(--navy) 70%);
  padding: clamp(48px, 6vw, 80px) 0;
}
.consult::after {
  content: ""; position: absolute; right: -80px; top: -60px; width: 420px; height: 420px; border-radius: 50%;
  background: var(--grad); opacity: .28; filter: blur(10px);
}
.consult-grid { position: relative; display: grid; gap: 28px; grid-template-columns: 1.4fr 1fr; align-items: center; }
.consult h2 { color: var(--white); }
.consult p { color: rgba(255,255,255,.85); max-width: 56ch; margin: 0; }
.consult-actions { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.consult-actions .mail { font: 800 1.25rem var(--font-head); color: var(--yellow); }

/* ---------- About ---------- */
.about-grid { display: grid; gap: 48px; grid-template-columns: 1fr 1fr; align-items: center; }
.about-grid p { color: var(--muted); }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.checks li {
  display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; background: var(--paper); border-radius: 14px; font-weight: 600; color: var(--navy);
}
.checks li::before {
  content: ""; flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--grad);
  -webkit-mask: radial-gradient(circle, transparent 0 6px, #000 6px); mask: radial-gradient(circle, transparent 0 6px, #000 6px);
}

/* ---------- Shop (WooCommerce) ---------- */
.shop-wrap { padding: 32px 0 80px; }
.woocommerce-breadcrumb { font-size: .88rem; color: var(--muted); margin-bottom: 1.2rem; }
.woocommerce-breadcrumb a { color: var(--muted); }
.woocommerce-result-count, .woocommerce-ordering { font-size: .9rem; color: var(--muted); }
.woocommerce-ordering select {
  border: 1px solid var(--line); border-radius: 999px; padding: .5rem 1rem; font: inherit; background: var(--white);
}
.woocommerce-products-header__title, .page-title { color: var(--navy); }
ul.products { list-style: none; margin: 0; padding: 0; display: grid !important; grid-template-columns: repeat(4, 1fr); gap: 22px; }
ul.products::before, ul.products::after { display: none; }
ul.products li.product {
  float: none !important; width: auto !important; margin: 0 !important;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px;
  display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease;
}
ul.products li.product:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
ul.products li.product a img { border-radius: 12px; background: var(--paper); margin: 0 0 12px; aspect-ratio: 1 / 1; object-fit: cover; }
ul.products li.product .woocommerce-loop-product__title { font: 700 1rem/1.3 var(--font-head); color: var(--navy); padding: 0; }
ul.products li.product .price { color: var(--blue); font-weight: 800; font-family: var(--font-head); margin: 6px 0 14px; display: block; }
ul.products li.product .button, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit {
  margin-top: auto; background: var(--navy) !important; color: var(--white) !important; border-radius: 999px !important;
  font-family: var(--font-head); font-weight: 700; padding: .75rem 1.2rem !important; border: 0 !important;
}
ul.products li.product .button:hover, .woocommerce a.button:hover, .woocommerce button.button:hover { background: var(--blue) !important; }
.woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce #respond input#submit.alt {
  background: var(--orange) !important; color: var(--navy) !important;
}
.woocommerce span.onsale {
  background: var(--red); border-radius: 999px; min-height: 0; min-width: 0; line-height: 1; padding: 7px 12px; font: 800 .75rem var(--font-head);
}
.woocommerce div.product .product_title { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--blue); font-family: var(--font-head); font-weight: 800; font-size: 1.6rem; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: var(--navy); }
.woocommerce table.shop_table { border-radius: 14px; overflow: hidden; border-color: var(--line); }
.woocommerce-cart .cart-collaterals .cart_totals, .woocommerce-checkout #order_review { background: var(--paper); border-radius: var(--radius); padding: 24px; }
.woocommerce-message, .woocommerce-info { border-top-color: var(--blue) !important; }
.woocommerce-message::before, .woocommerce-info::before { color: var(--blue) !important; }
.woocommerce-pagination .page-numbers li .page-numbers { border-radius: 999px; }
.woocommerce-pagination .page-numbers li .page-numbers.current { background: var(--navy); color: var(--white); }
.shop-empty { text-align: center; padding: 60px 0; color: var(--muted); }

/* ---------- Generic page ---------- */
.page-wrap { padding: 56px 0 90px; max-width: 860px; }
.page-head h1 { margin-bottom: .4em; }
.entry { color: var(--ink); font-size: 1.02rem; }
.entry h2 { margin-top: 1.6em; font-size: 1.5rem; }
.entry h3 { margin-top: 1.4em; }
.entry ul, .entry ol { padding-left: 1.2em; }
.entry li { margin-bottom: .35em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--paper); border-top: 1px solid var(--line); padding: 64px 0 0; color: var(--ink); }
.footer-grid { display: grid; gap: 36px; grid-template-columns: 1.4fr 1fr 1fr; }
.footer-grid img { width: 200px; margin-bottom: 14px; }
.footer-grid p { color: var(--muted); font-size: .95rem; max-width: 40ch; }
.footer-grid h3 { font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; color: var(--navy); margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--ink); }
.footer-grid a:hover { color: var(--blue); }
.footer-mail { font: 800 1.1rem var(--font-head); color: var(--navy); }
.footer-bottom {
  margin-top: 48px; padding: 20px 0 28px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .88rem; color: var(--muted);
}
.footer-bottom::before {
  content: ""; display: block; height: 6px; border-radius: 6px; background: var(--grad); width: 100%; margin-bottom: 4px; position: relative; top: -21px;
}

/* ---------- 404 ---------- */
.not-found { text-align: center; padding: 100px 0; }
.not-found .code { font: 900 clamp(4rem, 14vw, 9rem)/1 var(--font-head); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .primary-nav ul { gap: 1.1rem; }
  .primary-nav a { font-size: .86rem; }
  ul.products { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .primary-nav {
    position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow); display: none; padding: 12px 16px 20px;
  }
  .primary-nav.is-open, .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; gap: 0; align-items: stretch; }
  .primary-nav li a { display: block; padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .primary-nav a::after { display: none; }
  .header-row { position: relative; }
  .hero-grid { grid-template-columns: 1fr; }
  .chips { height: 300px; max-width: 420px; margin: 0 auto; width: 100%; }
  .chip { width: 150px; height: 190px; font-size: .95rem; }
  .chip.c2 { left: 120px; }
  .chip.c4 { left: 170px; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-item:nth-child(2) { border-right: 0; }
  .trust-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .consult-grid, .about-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .topbar-hide-sm { display: none; }
  .brand img, .brand .custom-logo { width: 150px; }
  .header-row { gap: .6rem; }
  .header-actions .icon-btn:first-child { display: none; }
  ul.products { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  ul.products li.product { padding: 10px; }
  ul.products li.product .woocommerce-loop-product__title { font-size: .9rem; }
  .trust-grid { grid-template-columns: 1fr; }
  .trust-item { border-right: 0; border-bottom: 1px solid var(--line); }
  .trust-item:last-child { border-bottom: 0; }
  .cat-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .btn-row .btn { width: auto; flex: 1 1 auto; }
  .chips { height: 260px; }
  .chip { width: 124px; height: 160px; padding: 12px; font-size: .8rem; border-radius: 18px; }
  .chip small { display: none; }
  .chip.c1 { left: -10px; }
  .chip.c2 { left: 100px; }
  .chip.c3 { left: 20px; top: 140px; }
  .chip.c4 { left: 150px; top: 130px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
