/*
Theme Name: Top Store Child
Template: top-store
Version: 1.0.1
*/

/* Montserrat — локалізовано, одна variable-font per subset */
@font-face {
  font-family: "Montserrat";
  src: url("fonts/montserrat-cyrillic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Montserrat";
  src: url("fonts/montserrat-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --fs-body: 17px;
  --fs-h1: 36px;
  --fs-h2: 28px;
  --fs-h3: 22px;
  --fs-h4: 18px;
  --lh-body: 1.6;
  --lh-heading: 1.25;
  --ff-head: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --ff-body: "Lato-Regular", "Lato", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

body, p, li, td, th, input, textarea, select, button {
  font-family: var(--ff-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

h1, h2, h3, h4, h5, h6,
.entry-title, .elementor-heading-title,
.widget-title, .woocommerce-loop-product__title {
  font-family: var(--ff-head);
  line-height: var(--lh-heading);
  font-weight: 700;
}

h1, .entry-title { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

a, button, .button, input[type="submit"] { min-height: 44px; }
a { min-height: auto; }

@media (max-width: 768px) {
  :root {
    --fs-body: 16px;
    --fs-h1: 28px;
    --fs-h2: 24px;
    --fs-h3: 20px;
    --fs-h4: 17px;
  }
}


/* Page: Контакти (post 2270) */
.page-id-2270 .entry-content h1 { font-size: 28px; margin-bottom: 18px; }
.page-id-2270 .entry-content h2 { font-size: 20px; margin-top: 24px; margin-bottom: 8px; }
.page-id-2270 .entry-content p  { font-size: var(--fs-body); margin: 0 0 12px; }
.page-id-2270 .entry-content a[href^="tel:"] { color: #4094c4; text-decoration: none; font-weight: 600; }
.page-id-2270 .wp-block-button__link {
  background-color: #64ade5 !important;
  color: #ffffff !important;
  border: none;
  border-radius: 4px;
  padding: 12px 28px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .2s;
}
.page-id-2270 .wp-block-button__link:hover { background-color: #4094c4 !important; }
@media (max-width: 768px) {
  .page-id-2270 .entry-content h1 { font-size: 24px; }
  .page-id-2270 .entry-content h2 { font-size: 18px; }
}


/* === UNIFIED TYPOGRAPHY — applies to all pages, overrides theme/Elementor/WC === */
:root {
  --pi-fs-h1: 32px;
  --pi-fs-h2: 24px;
  --pi-fs-h3: 20px;
  --pi-fs-h4: 18px;
  --pi-fs-loop: 16px;   /* product/category card titles */
  --pi-fs-widget: 18px; /* sidebar widget titles */
  --pi-fs-body: 17px;
  --pi-lh-head: 1.25;
  --pi-lh-body: 1.6;
}

/* H1 — top of page (theme), entry-title, gutenberg */
.thunk-page-top-title,
.entry-title,
h1.wp-block-heading,
.entry-content h1,
article h1,
.elementor h1.elementor-heading-title {
  font-size: var(--pi-fs-h1) !important;
  line-height: var(--pi-lh-head) !important;
  font-weight: 700 !important;
  margin: 0 0 16px !important;
}

/* H2 — section headings */
h2.wp-block-heading,
.entry-content h2,
article h2,
.elementor h2.elementor-heading-title {
  font-size: var(--pi-fs-h2) !important;
  line-height: var(--pi-lh-head) !important;
  font-weight: 700 !important;
  margin: 24px 0 12px !important;
}

/* H3 / H4 in content */
h3.wp-block-heading, .entry-content h3, article h3, .elementor h3.elementor-heading-title {
  font-size: var(--pi-fs-h3) !important;
  line-height: var(--pi-lh-head) !important;
  font-weight: 700 !important;
  margin: 20px 0 10px !important;
}
h4.wp-block-heading, .entry-content h4, article h4, .elementor h4.elementor-heading-title {
  font-size: var(--pi-fs-h4) !important;
  line-height: var(--pi-lh-head) !important;
  font-weight: 600 !important;
  margin: 18px 0 8px !important;
}

/* WooCommerce loop titles (product cards, category cards) */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .woocommerce-loop-category__title,
.woocommerce-loop-product__title,
.woocommerce-loop-category__title {
  font-size: var(--pi-fs-loop) !important;
  line-height: 1.35 !important;
  font-weight: 600 !important;
  padding: 8px 0 4px !important;
  margin: 0 !important;
}

/* WooCommerce single product title */
.woocommerce div.product .product_title,
.product_title.entry-title {
  font-size: var(--pi-fs-h1) !important;
  line-height: var(--pi-lh-head) !important;
  font-weight: 700 !important;
}

/* Sidebar widget titles */
.widget-title,
.widget .widget-title,
.sidebar .widget-title,
.elementor-widget-heading .elementor-heading-title {
  font-size: var(--pi-fs-widget) !important;
  line-height: 1.3 !important;
  font-weight: 700 !important;
  text-transform: none !important;
  margin: 0 0 14px !important;
}

/* Theme "thunk-title" (homepage section headings) */
.thunk-title {
  font-size: var(--pi-fs-h2) !important;
  line-height: var(--pi-lh-head) !important;
  font-weight: 700 !important;
  margin: 0 0 16px !important;
}

/* Body text uniformity */
body, p, li, td, th, .entry-content, .woocommerce, .elementor-widget-text-editor {
  font-size: var(--pi-fs-body);
  line-height: var(--pi-lh-body);
}

/* Mobile scale */
@media (max-width: 768px) {
  :root {
    --pi-fs-h1: 24px;
    --pi-fs-h2: 20px;
    --pi-fs-h3: 18px;
    --pi-fs-h4: 16px;
    --pi-fs-loop: 15px;
    --pi-fs-widget: 16px;
    --pi-fs-body: 16px;
  }
}

/* Override page-specific contact H1 hack from earlier (no longer needed) */
.page-id-2270 .entry-content h1 { display: none; }


/* Safety net: kill any inline font-family/font-size that sneaks into post content */
.entry-content [style*="font-family"],
.entry-content [style*="Font-Family"] {
  font-family: var(--ff-body) !important;
}
.entry-content p[style*="font-size"],
.entry-content span[style*="font-size"],
.entry-content div[style*="font-size"],
.entry-content li[style*="font-size"] {
  font-size: var(--pi-fs-body) !important;
  line-height: var(--pi-lh-body) !important;
}


/* Fix loop titles — use loaded Montserrat at real bold weight */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .woocommerce-loop-category__title,
.woocommerce ul.products li.product h3,
.woocommerce-loop-product__title,
.woocommerce-loop-category__title {
  font-family: var(--ff-head) !important;
  font-weight: 700 !important;
  color: #111 !important;
  letter-spacing: 0 !important;
}


/* Stock status badges (out of stock / in stock) — readable size */
.woocommerce ul.products li.product .stock,
.woocommerce ul.products li.product .out-of-stock,
.woocommerce ul.products li.product p.stock,
.woocommerce ul.products li.product .stock-status,
.product .stock,
p.stock.out-of-stock,
.outofstock .stock,
li.product .out-of-stock {
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  color: #c0392b !important;
  margin: 4px 0 !important;
  padding: 2px 0 !important;
}
.woocommerce ul.products li.product .stock.in-stock,
.product .stock.in-stock {
  color: #2e7d32 !important;
}


/* Sidebar layered nav (category/brand filters) */
.woocommerce-widget-layered-nav-list,
.widget_layered_nav ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
.woocommerce-widget-layered-nav-list__item,
.widget_layered_nav li {
  font-size: 15px !important;
  line-height: 1.5 !important;
  padding: 6px 0 !important;
  border-bottom: 1px solid #eee;
}
.woocommerce-widget-layered-nav-list__item a,
.widget_layered_nav li a {
  color: #222 !important;
  font-weight: 500 !important;
  text-decoration: none !important;
}
.woocommerce-widget-layered-nav-list__item a:hover,
.widget_layered_nav li a:hover {
  color: #4094c4 !important;
}
.woocommerce-widget-layered-nav-list__item .count,
.widget_layered_nav li .count {
  color: #888 !important;
  font-size: 13px !important;
  font-weight: 400 !important;
}
