/*
Theme Name: Aibi 2026
Theme URI: https://aibi.lv/
Author: SIA Aibi / dev team
Author URI: https://aibi.lv/
Description: Modern, clean theme for SIA Aibi — full-cycle meat processing and livestock purchasing. A standalone refresh of the Aibi 2017 theme: same features (multilingual front page, top/social/language menus, widgets, custom logo, WooCommerce pages, product gallery), modern light design with a warm premium palette.
Version: 1.0.0
Requires at least: 5.0
Requires PHP: 7.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aibi2026
Tags: one-column, two-columns, custom-logo, custom-menu, featured-images, footer-widgets, post-formats, translation-ready, e-commerce
*/

/* =========================================================
   Aibi 2026 — clean modern base
   Design tokens are defined in assets/css/aibi-2026.css (:root).
   This file styles the generic chrome + all inner pages so the
   whole site reads as one modern system (not just the home page).
   ========================================================= */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Manrope", "PT Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--aibi-ink, #241f1d);
  background: var(--aibi-bg, #f4efe8);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; }
img { display: block; }

a { color: var(--aibi-accent, #7a2e2b); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  color: var(--aibi-ink, #241f1d);
  line-height: 1.12;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 4.2vw, 3.2rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); }
h4 { font-size: 1.2rem; }

p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.3em; }
li { margin: .25em 0; }

blockquote {
  margin: 1.6em 0;
  padding: .4em 0 .4em 1.2em;
  border-left: 3px solid var(--aibi-accent, #7a2e2b);
  color: var(--aibi-muted, #726a63);
  font-style: italic;
}
hr { border: 0; border-top: 1px solid var(--aibi-line, rgba(36,31,29,.13)); margin: 2em 0; }

code, pre, kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
pre { background: #231f1d; color: #f4efe8; padding: 16px 18px; border-radius: 12px; overflow:auto; }
code { background: rgba(36,31,29,.06); padding: .1em .35em; border-radius: 6px; font-size: .9em; }

/* ---------- Layout shells ---------- */
.wrap {
  width: var(--aibi-shell, min(1180px, calc(100vw - 40px)));
  margin: 0 auto;
}

#content { padding: 0; }
.site-content { padding: 0; }

#primary.content-area { padding: 48px 0 64px; }
.page .site-main,
.single .site-main,
.archive .site-main,
.search .site-main,
.error404 .site-main { max-width: 820px; margin: 0 auto; }

/* ---------- Accessibility ---------- */
.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; word-wrap: normal !important;
}
.skip-link { position: absolute; left: -9999px; z-index: 100000; }
.skip-link:focus {
  left: 16px; top: 16px; background: #fff; color: var(--aibi-ink,#241f1d);
  padding: 12px 18px; border-radius: 10px; box-shadow: var(--aibi-shadow, 0 18px 40px rgba(36,31,29,.1));
}
*:focus-visible { outline: 2px solid var(--aibi-accent, #7a2e2b); outline-offset: 2px; }

/* ---------- Header chrome fallbacks (nav styled in aibi-2026.css) ---------- */
.site-header { background: transparent; }
.custom-header,
.custom-header-media,
.single-featured-image-header { display: none; }  /* clean: no heavy header images */
.admin-bar .navigation-top { top: 32px; }
@media (max-width:782px){ .admin-bar .navigation-top { top: 46px; } }


/* ---------- Entry / page content ---------- */
.entry-header.aibi-header { margin-bottom: 26px; padding-bottom: 20px; border-bottom: 1px solid var(--aibi-line, rgba(36,31,29,.13)); }
.aibi-title.entry-title, .entry-title { margin: 0; font-size: clamp(2rem, 4vw, 3rem); }
.entry-content { font-size: 1.02rem; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content img { border-radius: 12px; }
.entry-content h2 { margin-top: 1.6em; }
.entry-content h3 { margin-top: 1.4em; }
.entry-content ul { list-style: none; padding-left: 0; }
.entry-content ul li { position: relative; padding-left: 1.5em; }
.entry-content ul li::before { content: ""; position: absolute; left: 0; top: .62em; width: 8px; height: 8px; border-radius: 2px; background: var(--aibi-accent, #7a2e2b); transform: rotate(45deg); }
.entry-content ol { padding-left: 1.3em; }
.content-image { margin: 24px 0; text-align: center; }
.content-image img { display: inline-block; border-radius: 14px; box-shadow: var(--aibi-shadow, 0 18px 40px rgba(36,31,29,.1)); }

/* WordPress core alignments & captions */
.alignleft { float: left; margin: .4em 1.4em 1em 0; }
.alignright { float: right; margin: .4em 0 1em 1.4em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text, .wp-element-caption { font-size: .88rem; color: var(--aibi-muted, #726a63); text-align: center; margin-top: .5em; }
.alignwide { margin-left: calc(50% - 50vw + 20px); margin-right: calc(50% - 50vw + 20px); max-width: 100vw; }
.alignfull { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); max-width: 100vw; }
.wp-block-image img { border-radius: 12px; }
.wp-block-table table { width: 100%; }

/* Tables */
table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .96rem; }
th, td { padding: 10px 12px; border: 1px solid var(--aibi-line, rgba(36,31,29,.13)); text-align: left; }
thead th { background: rgba(36,31,29,.05); font-family: "Manrope", sans-serif; }

/* Buttons & forms */
button, input, select, textarea { font: inherit; color: inherit; }
input[type="text"], input[type="email"], input[type="url"], input[type="password"], input[type="search"],
input[type="tel"], input[type="number"], input[type="date"], textarea, select {
  width: 100%; max-width: 100%; padding: 12px 14px;
  background: var(--aibi-surface, #faf6f0);
  border: 1px solid var(--aibi-line, rgba(36,31,29,.18));
  border-radius: 12px; margin-bottom: 14px;
}
input:focus, textarea:focus, select:focus { border-color: var(--aibi-accent, #7a2e2b); outline: none; }
button, input[type="submit"], input[type="button"], .button, a.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--aibi-accent, #7a2e2b); color: #fff; font-weight: 800; letter-spacing: .02em;
  text-decoration: none; transition: transform .2s ease, box-shadow .2s ease;
}
button:hover, input[type="submit"]:hover, .button:hover, a.button:hover { transform: translateY(-1px); box-shadow: var(--aibi-shadow, 0 18px 40px rgba(36,31,29,.12)); text-decoration: none; }

/* ---------- Comments ---------- */
.comments-area { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--aibi-line, rgba(36,31,29,.13)); }
.comment-list { list-style: none; padding: 0; }
.comment-body { padding: 18px 0; border-bottom: 1px solid var(--aibi-line, rgba(36,31,29,.1)); }

/* ---------- Sidebar / widgets ---------- */
.widget { margin-bottom: 32px; }
.widget-title { font-size: 1.15rem; margin-bottom: 14px; }
.widget ul { list-style: none; padding: 0; }
.widget li { padding: 6px 0; border-bottom: 1px solid var(--aibi-line, rgba(36,31,29,.08)); }

/* ---------- Pagination ---------- */
.navigation.pagination, .posts-navigation, .post-navigation { margin: 40px 0; }
.nav-links { display: flex; flex-wrap: wrap; gap: 10px; }
.page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--aibi-line, rgba(36,31,29,.15)); text-decoration: none; }
.page-numbers.current { background: var(--aibi-accent, #7a2e2b); color: #fff; border-color: transparent; }


/* ---------- WooCommerce light touch-ups ---------- */
.woocommerce #primary.content-area, .woocommerce-page #primary.content-area { padding-top: 40px; }
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product { background: var(--aibi-surface,#faf6f0); border: 1px solid var(--aibi-line, rgba(36,31,29,.1)); border-radius: var(--aibi-radius,16px); padding: 14px; }
.woocommerce ul.products li.product img { border-radius: 10px; }
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit,
.woocommerce a.button.alt, .woocommerce button.button.alt { background: var(--aibi-accent, #7a2e2b); color:#fff; border-radius: 999px; font-weight: 800; }
.woocommerce a.button:hover, .woocommerce button.button:hover { background: var(--aibi-accent-strong, #5d211f); }
.woocommerce .price, .woocommerce div.product span.price { color: var(--aibi-ink, #241f1d); font-weight: 800; }
.woocommerce-message, .woocommerce-info, .woocommerce-error { border-top-color: var(--aibi-accent, #7a2e2b); border-radius: 10px; }

/* ---------- 404 / search ---------- */
.error-404 .page-content, .no-results .page-content { max-width: 620px; }

/* ---------- Responsive ---------- */
@media (max-width: 782px) {
  body { font-size: 16px; }
  #primary.content-area { padding: 28px 0 44px; }
  .alignwide, .alignfull { margin-left: 0; margin-right: 0; max-width: 100%; }
}
