/* ==========================================================================
   Tuular – frontpage styles
   Visual remake matching the supplied design reference.
   Base framework: Bootstrap 4 (grid, utilities, dropdown/nav components).
   Icons: Font Awesome 4.7 (assets/css/font-awesome.min.css).
   ========================================================================== */

:root {
  --purple: #5d35ac;
  --purple-dark: #4b2a8c;
  --purple-light: #f3f3fb;
  --purple-badge: #6c47b8;
  --ink: #111116;
  --gray-text: #666b78;
  --white-text: #ffffff;
  --border-light: #eceaf5;
  --font-main: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

html, body {
  font-family: var(--font-main);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a {
  transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}

img {
  max-width: 100%;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border-light);
  position: relative;
  z-index: 50;
}

.header-inner {
  min-height: 84px;
  gap: 4px;
  flex-wrap: wrap;
}

.navbar-toggler {
  border: 0;
  background: transparent;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  /* Legacy css/style.css still has `.navbar-toggler { position:absolute;
     top:0; right:0; z-index:9999; }` from the pre-redesign header layout.
     Same specificity as this rule, but it loads first, so without this
     override its position:absolute pulls the toggler out of the new
     .header-inner flex row entirely and pins it hard to the corner -
     leaving it vertically misaligned with the cart icon and both crammed
     into the same top-right corner on mobile. position:static puts it
     back into normal flex flow so .header-inner's align-items:center
     centers it with the rest of the row. */
  position: static;
  /* The HTML also carries Bootstrap's ml-auto on both this button and
     .header-actions - two competing auto margins on one flex line split
     the free space between them instead of grouping the toggler with the
     cart icon. Only .header-actions should claim that push; this resets
     the toggler's side to a normal (non-auto) margin, and `order` moves
     it after .header-actions so the cart icon sits to its left with a
     normal flex gap between them, rather than the two spreading apart. */
  margin-left: 0 !important;
  order: 1;
}

.navbar-toggler span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.brand img {
  height: 44px;
  width: auto;
  display: block;
}

.main-nav {
  flex: 1 1 auto;
  justify-content: center;
}

.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 14px;
  text-transform: uppercase;
}

.nav-list > li {
  position: relative;
}

.nav-list > li > a {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--ink);
  text-decoration: none;
  padding: 10px 2px;
  white-space: nowrap;
}

/* Social + language items sit further right, visually grouped away from the
   page links - a little breathing room, but tighter than a full nav gap. */
.nav-list .social-item,
.nav-list .lang-item {
  margin-left: 4px;
}

.nav-list .social-item a {
  padding: 0 5px;
}

.nav-list > li > a:hover {
  color: var(--purple);
}

.nav-list .dropdown-toggle::after {
  vertical-align: 2px;
}

.nav-list .dropdown-menu {
  border: 1px solid var(--border-light);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(20, 10, 50, .12);
  padding: 8px;
  margin-top: 8px;
}

.nav-list .dropdown-item {
  border-radius: 6px;
  font-size: 14px;
  padding: 8px 12px;
}

.nav-list .dropdown-item:hover,
.nav-list .dropdown-item:focus {
  background: var(--purple-light);
  color: var(--purple);
}

.header-actions {
  gap: 10px;
}

.search-form {
  align-items: center;
  background: #f5f5f9;
  border-radius: 999px;
  padding: 9px 8px 9px 18px;
  width: 150px;
}

.search-input {
  border: 0;
  background: transparent;
  outline: 0;
  font-size: 14px;
  width: 100%;
  color: var(--ink);
}

.search-input::placeholder {
  color: #9a9aa8;
}

.search-btn {
  border: 0;
  background: transparent;
  color: #9a9aa8;
  padding: 0 6px;
  display: flex;
  align-items: center;
  font-size: 15px;
}

.cart-icon {
  color: var(--ink);
  display: flex;
  align-items: center;
  font-size: 19px;
}

.cart-icon:hover {
  color: var(--purple);
}

.phone-pill {
  background: var(--purple);
  color: #fff;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  gap: 10px;
  white-space: nowrap;
}

.phone-pill:hover {
  background: var(--purple-dark);
  color: #fff;
  text-decoration: none;
}

.phone-icon {
  display: inline-flex;
  font-size: 14px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn-primary-purple {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--purple);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 16px 30px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .03em;
  text-decoration: none;
}

.btn-primary-purple:hover {
  background: var(--purple-dark);
  color: #fff;
  text-decoration: none;
}

.btn-outline-purple {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: var(--purple);
  border: 1.5px solid var(--purple);
  border-radius: 999px;
  padding: 14px 26px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .03em;
  text-decoration: none;
}

.btn-outline-purple:hover {
  background: var(--purple);
  color: #fff;
  text-decoration: none;
}

.btn-primary-purple .fa,
.btn-outline-purple .fa {
  font-size: 13px;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  background-position: right center !important;
  background-repeat: no-repeat !important;
}

.hero-content-col {
  /* Transparent so the full-bleed photo set on .hero (inline style) shows
     through. A light fade keeps the text readable without hiding the photo. */
  background: linear-gradient(90deg, #fff 0%, #fff 58%, rgba(255, 255, 255, .85) 74%, rgba(255, 255, 255, 0) 100%);
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 560px;
}

.hero-eyebrow {
  color: var(--purple);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .18em;
  margin-bottom: 18px;
}

.hero-title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 22px;
}

.hero-text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--gray-text);
  margin-bottom: 34px;
  max-width: 480px;
}

.hero-features {
  margin: 40px 0 0;
  gap: 34px 40px;
}

.hero-features li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-features .fa {
  width: 30px;
  flex: 0 0 auto;
  font-size: 24px;
  color: var(--purple);
  text-align: center;
}

.hero-features span {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}

.hero-image-col {
  padding: 0;
  min-height: 420px;
}

/* ==========================================================================
   Terviklahendus band
   ========================================================================== */

.solution-band {
  background: var(--purple-light);
  padding: 46px 0;
}

.solution-icon {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.solution-icon .fa {
  font-size: 38px;
  color: var(--purple);
}

.solution-title {
  font-size: 21px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.solution-text {
  font-size: 15px;
  color: var(--gray-text);
  margin-bottom: 22px;
}

.solution-checklist {
  margin: 24px 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
}

.solution-checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.solution-checklist .fa {
  font-size: 20px;
  color: var(--purple);
  flex: 0 0 auto;
}

/* ==========================================================================
   Trust bar
   ========================================================================== */

.trust-bar {
  padding: 40px 0;
  border-bottom: 1px solid var(--border-light);
  background: var(--purple);
}

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 14px 10px;
}

.trust-item .fa {
  font-size: 30px;
  color: var(--white-text);
}

.trust-item span {
  font-size: 13px;
  font-weight: 600;
  color: var(--white-text);
  line-height: 1.3;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 991.98px) {
  .hero-content-col {
    padding: 48px 30px;
    background: rgba(255, 255, 255, .96);
  }

  .hero-title {
    font-size: 36px;
  }

  .solution-band .solution-icon {
    margin-bottom: 16px;
  }

  .solution-checklist {
    grid-template-columns: 1fr;
    margin-top: 28px;
  }

  .solution-band .col-lg-6,
  .solution-band .col-lg-5 {
    text-align: center;
  }

  .solution-checklist li {
    justify-content: center;
  }
}

@media (max-width: 991.98px) {
  #mainNavCollapse {
    flex: 0 0 100%;
    order: 10;
    margin-top: 14px;
  }

  #mainNavCollapse .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding-bottom: 14px;
  }

  #mainNavCollapse .nav-list > li {
    width: 100%;
  }

  #mainNavCollapse .nav-list > li > a {
    display: block;
    padding: 10px 0;
  }

  #mainNavCollapse .dropdown-menu {
    position: static;
    box-shadow: none;
    border: 0;
    padding-left: 12px;
  }
}

@media (max-width: 767.98px) {
  .header-inner {
    min-height: 70px;
  }

  .brand img {
    height: 34px;
  }

  .hero-title {
    font-size: 30px;
  }

  .hero-image-col {
    min-height: 260px;
  }

  .hero-features {
    gap: 22px 30px;
  }

  .trust-item {
    border-bottom: 1px solid var(--border-light);
  }
}

/* ==========================================================================
   Fixed header (show on scroll up / hide on scroll down)
   The JS lives in footer.php ($('header').addClass('nav-up'/'nav-down'),
   plus $('.header-wrapper').height(navbarHeight) to reserve layout space).
   These rules make the new white header sit on top of the legacy
   #header / .scrolled rules in css/style.css cleanly, without editing that
   file. The actual top:0 / -180px positions come from css/style.css
   (.fixed-top, #header, .nav-up).
   ========================================================================== */

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

.site-header.fixed-top {
  /* .site-header alone sets position: relative (for the standalone
     index.html prototype header, which has no fixed-top class). That rule
     has the same specificity as Bootstrap's .fixed-top and loads after it,
     so it was silently winning and turning the real site header (which
     always carries BOTH classes, from menu.php) into a normal in-flow,
     non-fixed element — breaking the hide/show-on-scroll behavior entirely,
     since a relatively-positioned header just scrolls away with the page
     instead of staying pinned to the viewport. This two-class selector has
     higher specificity, so it wins back position: fixed for the real header
     without touching plain .site-header (index.html's own look is unaffected).
     Deliberately NOT setting `top` here - that stays governed by
     .fixed-top's top:0 vs .nav-up's top:-180px (css/style.css), so the
     scroll show/hide toggle keeps working exactly as before. */
  position: fixed;
  z-index: 1030;
}

body.scrolled #header.site-header {
  background: #fff;
  padding: 0;
  font-size: inherit;
  background-image: none;
}

/* ==========================================================================
   Scroll reveal (emergence.js, already vendored + initialised in
   footer.php). Scoped to the redesigned sections only, so it doesn't touch
   any other page's [data-emergence] elements site-wide.
   ========================================================================== */

.hero[data-emergence="hidden"],
.solution-band[data-emergence="hidden"],
.trust-bar[data-emergence="hidden"] {
  opacity: 0;
  transform: translateY(16px);
}

.hero[data-emergence="visible"],
.solution-band[data-emergence="visible"],
.trust-bar[data-emergence="visible"] {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .7s ease, transform .7s ease;
}

/* ==========================================================================
   Search results (search.php)
   ========================================================================== */

.search-results-section {
  padding: 60px 0 80px;
  min-height: 40vh;
}

.search-results-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
}

.search-results-meta {
  color: var(--gray-text);
  margin-bottom: 32px;
}

.search-results-empty {
  color: var(--gray-text);
  font-size: 16px;
  margin-bottom: 24px;
}

.search-results-list {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 720px;
}

.search-result-item a {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.search-result-item a:hover {
  border-color: var(--purple);
  box-shadow: 0 8px 20px rgba(20, 10, 50, .08);
  text-decoration: none;
  color: var(--ink);
}

.search-result-thumb {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  border-radius: 8px;
  background-color: var(--purple-light);
  background-size: cover;
  background-position: center;
}

.search-result-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple);
  font-size: 20px;
}

.search-result-name {
  flex: 1 1 auto;
  font-weight: 600;
  font-size: 15px;
}

.search-result-arrow {
  color: var(--purple);
  font-size: 14px;
}

/* ==========================================================================
   Footer (Variant A — minimal, matches new header/hero)
   footer.php still keeps the DB-driven content blocks (pages page_id=28/29,
   product_types, settings) — this only restyles the wrapper markup.
   ========================================================================== */

.site-footer-a {
  background: #fff;
  border-top: 3px solid var(--purple);
  padding: 56px 0 0;
}

.site-footer-a .footer-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
  padding-bottom: 40px;
}

.site-footer-a .footer-brand-col {
  flex: 1 1 260px;
  max-width: 300px;
}

.site-footer-a .footer-brand-col img {
  height: 40px;
  margin-bottom: 14px;
}

.site-footer-a .footer-brand-col p {
  color: var(--gray-text);
  font-size: 13.5px;
  line-height: 1.7;
  margin: 0 0 16px;
}

.site-footer-a .footer-social {
  display: flex;
  gap: 10px;
}

.site-footer-a .footer-social a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--purple-light);
  color: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.site-footer-a .footer-social a:hover {
  background: var(--purple);
  color: #fff;
}

.site-footer-a .footer-col {
  flex: 1 1 160px;
}

.site-footer-a .footer-col h4 {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 16px;
}

.site-footer-a .footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer-a .footer-col li {
  margin-bottom: 10px;
}

.site-footer-a .footer-col a {
  color: var(--gray-text);
  font-size: 13.5px;
}

.site-footer-a .footer-col a:hover {
  color: var(--purple);
}

.site-footer-a .footer-contact-block {
  font-style: normal;
}

.site-footer-a .footer-contact-block p {
  margin: 0 0 6px;
  color: var(--gray-text);
  font-size: 13.5px;
  line-height: 2;
}

.site-footer-a .footer-contact-block a {
  color: var(--gray-text);
}

.site-footer-a .footer-contact-block a:hover {
  color: var(--purple);
}

.site-footer-a .footer-bottom {
  border-top: 1px solid var(--border-light);
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12.5px;
  color: var(--gray-text);
}

.site-footer-a .footer-bottom a {
  color: var(--gray-text);
}

.site-footer-a .footer-bottom a:hover {
  color: var(--purple);
}

@media (max-width: 575.98px) {
  .site-footer-a .footer-cols {
    flex-direction: column;
    gap: 30px;
  }
}

/* ==========================================================================
   Cart item-count badge (menu.php cart icon)
   ========================================================================== */

.cart-icon {
  position: relative;
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  background: var(--purple);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ==========================================================================
   Quantity pill ("+ pcs -")
   product.php: qty-btn are <button>s around an editable .qty-input, driven
   by js/qty-pill.js (client-side only, submitted with the add-to-cart form).
   order.php: qty-btn are real <a href="alter_cart.php?..."> links around a
   static .qty-value, so +/- there round-trips to the server and updates the
   session cart directly - qty-pill.js ignores this variant (no .qty-input).
   ========================================================================== */

.qty-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 12px;
}

.qty-pill .qty-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--purple-light);
  color: var(--purple);
  border: 0;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
}

.qty-pill .qty-btn:hover {
  background: var(--purple);
  color: #fff;
  text-decoration: none;
}

.qty-pill .qty-input {
  width: 50px;
  height: 36px;
  border: 0;
  border-left: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  text-align: center;
  font-size: 15px;
  color: var(--ink);
  -moz-appearance: textfield;
}

.qty-pill .qty-input::-webkit-outer-spin-button,
.qty-pill .qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qty-pill .qty-value {
  min-width: 40px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  border-left: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
}

.qty-pill-static {
  margin-bottom: 0;
}

.feature-box {
	padding: 40px 25px;
	border-radius: 12px;
	background: #fff;
	transition: 0.3s;
}