:root {
  --vwt-green: #2f7d32;
  --vwt-green-dark: #1b5e20;
  --vwt-green-soft: #eef6ee;
  --vwt-ink: #172019;
  --vwt-text: #293029;
  --vwt-muted: #707971;
  --vwt-border: #e5e9e5;
  --vwt-soft: #fafbfa;
  --vwt-white: #ffffff;
  --vwt-gold: #d5a936;
  --vwt-header-height: 76px;
  --vwt-mobile-nav-height: 82px;
  --vwt-radius-sm: 10px;
  --vwt-radius: 16px;
  --vwt-radius-lg: 24px;
  --vwt-shadow: 0 16px 45px rgba(20, 37, 24, .08);
  --vwt-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--vwt-text);
  background: var(--vwt-white);
  font-family: var(--vwt-font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.vwt-no-scroll { overflow: hidden; }
*, *::before, *::after { box-sizing: border-box; }
img { max-width: 100%; height: auto; }
a { color: var(--vwt-green-dark); text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
svg { display: block; width: 1.35em; height: 1.35em; }

.vwt-container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.vwt-site-main { min-height: 60vh; }
.vwt-page-content { width: 100%; }
.vwt-content-wrap { padding-block: 56px 72px; }
.vwt-page-head { padding-top: 42px; }
.vwt-page-head h1 { margin: 0; color: var(--vwt-ink); font-size: clamp(38px, 5vw, 58px); letter-spacing: -.045em; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.screen-reader-text:focus { z-index: 100000; top: 8px; left: 8px; width: auto; height: auto; clip: auto; padding: 10px 14px; color: #fff; background: var(--vwt-ink); border-radius: 8px; }

/* Header */
.vwt-site-header { position: relative; z-index: 9900; width: 100%; background: rgba(255,255,255,.98); border-bottom: 1px solid var(--vwt-border); transition: box-shadow .2s ease, background .2s ease; }
.vicmos-sticky-header-enabled .vwt-site-header { position: sticky; top: 0; }
.admin-bar.vicmos-sticky-header-enabled .vwt-site-header { top: 32px; }
.vwt-site-header.is-scrolled { box-shadow: 0 10px 30px rgba(20,35,23,.07); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
.vwt-header-main { min-height: var(--vwt-header-height); display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 30px; }
.vwt-brand { min-width: 150px; }
.vwt-brand .custom-logo-link, .vwt-drawer-head .custom-logo-link, .vwt-footer-brand .custom-logo-link { display: inline-flex; align-items: center; }
.vwt-brand .custom-logo { width: auto; max-width: 180px; max-height: 48px; }
.vwt-drawer-head .custom-logo, .vwt-footer-brand .custom-logo { width: auto; max-width: 170px; max-height: 48px; }
.vwt-wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--vwt-ink); font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.vwt-wordmark-mark { width: 39px; height: 39px; display: grid; place-items: center; color: #fff; background: var(--vwt-green); border-radius: 11px; }
.vwt-desktop-menu { justify-self: center; }
.vwt-menu { display: flex; align-items: center; gap: 24px; margin: 0; padding: 0; list-style: none; }
.vwt-menu > li { position: relative; }
.vwt-menu a { color: var(--vwt-ink); font-size: 13px; font-weight: 700; transition: color .18s ease; }
.vwt-menu a:hover, .vwt-menu .current-menu-item > a, .vwt-menu .current_page_item > a { color: var(--vwt-green); }
.vwt-menu .sub-menu { position: absolute; top: calc(100% + 16px); left: -16px; min-width: 210px; display: grid; gap: 2px; margin: 0; padding: 9px; list-style: none; opacity: 0; visibility: hidden; transform: translateY(7px); border: 1px solid var(--vwt-border); border-radius: 13px; background: #fff; box-shadow: var(--vwt-shadow); transition: .18s ease; }
.vwt-menu li:hover > .sub-menu, .vwt-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.vwt-menu .sub-menu a { display: block; padding: 9px 10px; border-radius: 8px; }
.vwt-menu .sub-menu a:hover { background: var(--vwt-soft); }
.vwt-header-actions { display: flex; align-items: center; gap: 7px; }
.vwt-icon-button { position: relative; width: 42px; height: 42px; display: inline-grid; place-items: center; padding: 0; color: var(--vwt-ink); background: #fff; border: 1px solid var(--vwt-border); border-radius: 11px; transition: background .18s ease, color .18s ease, transform .18s ease, border-color .18s ease; }
.vwt-icon-button:hover { color: var(--vwt-green-dark); background: var(--vwt-soft); border-color: #d5ddd6; transform: translateY(-1px); }
.vwt-menu-toggle { display: none; }
.vwt-badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; display: grid; place-items: center; padding-inline: 4px; color: #fff; background: var(--vwt-green); border: 2px solid #fff; border-radius: 999px; font-size: 9px; line-height: 1; font-weight: 800; }

/* Search panel */
.vwt-search-panel { border-top: 1px solid var(--vwt-border); background: #fff; opacity: 0; transform: translateY(-5px); transition: opacity .16s ease, transform .16s ease; }
.vwt-search-panel.is-open { opacity: 1; transform: translateY(0); }
.vwt-search-panel-inner { padding-block: 15px; }
.vwt-search-panel .vmw-smart-search { max-width: 760px; margin: 0 auto; }

/* Drawer */
.vwt-drawer { position: fixed; inset: 0; z-index: 10050; pointer-events: none; visibility: hidden; }
.vwt-drawer.is-open { pointer-events: auto; visibility: visible; }
.vwt-drawer-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: rgba(12,20,14,.38); opacity: 0; transition: opacity .22s ease; }
.vwt-drawer-panel { position: absolute; top: 0; right: 0; width: min(390px, 92vw); height: 100%; overflow-y: auto; padding: 20px; background: #fff; transform: translateX(105%); box-shadow: -18px 0 55px rgba(10,20,12,.16); transition: transform .24s ease; }
.vwt-drawer.is-open .vwt-drawer-backdrop { opacity: 1; }
.vwt-drawer.is-open .vwt-drawer-panel { transform: translateX(0); }
.vwt-drawer-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--vwt-border); }
.vwt-drawer-menu, .vwt-drawer-menu .sub-menu, .vwt-drawer-nav .vwt-menu { margin: 0; padding: 0; list-style: none; }
.vwt-drawer-menu > li > a, .vwt-drawer-nav .vwt-menu > li > a { display: flex; align-items: center; min-height: 52px; color: var(--vwt-ink); border-bottom: 1px solid var(--vwt-border); font-size: 15px; font-weight: 750; }
.vwt-drawer-menu .sub-menu { padding: 5px 0 10px 14px; }
.vwt-drawer-menu .sub-menu a { display: block; padding: 8px 0; color: var(--vwt-muted); font-size: 12px; }
.vwt-drawer-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 20px; }
.vwt-drawer-quick a { position: relative; min-height: 76px; display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 8px; padding: 13px; color: var(--vwt-ink); border: 1px solid var(--vwt-border); border-radius: 12px; }
.vwt-drawer-quick svg { color: var(--vwt-green); }
.vwt-drawer-quick span { font-size: 11px; font-weight: 800; }
.vwt-drawer-quick strong { font-size: 10px; }
.vwt-drawer-tools { display: grid; gap: 10px; margin-top: 16px; }
.vwt-drawer-tool { padding: 12px; border: 1px solid var(--vwt-border); border-radius: 12px; background: var(--vwt-soft); }

/* Footer */
.vwt-site-footer { margin-top: 64px; border-top: 1px solid var(--vwt-border); background: #fff; }
.vwt-footer-top { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 45px; align-items: start; padding-block: 45px 34px; }
.vwt-footer-brand p { max-width: 330px; margin: 14px 0 0; color: var(--vwt-muted); font-size: 12px; line-height: 1.6; }
.vwt-footer-menu { display: grid; grid-template-columns: repeat(2, minmax(130px,1fr)); gap: 9px 24px; margin: 0; padding: 0; list-style: none; }
.vwt-footer-menu a { color: var(--vwt-text); font-size: 11px; font-weight: 650; }
.vwt-footer-menu a:hover { color: var(--vwt-green); }
.vwt-footer-shop { min-height: 42px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 15px; color: #fff; background: var(--vwt-green); border-radius: 9px; font-size: 11px; font-weight: 800; }
.vwt-footer-shop svg { width: 15px; }
.vwt-footer-bottom { min-height: 58px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border-top: 1px solid var(--vwt-border); }
.vwt-footer-bottom p { margin: 0; color: var(--vwt-muted); font-size: 9px; }
.vwt-footer-policy-links { display: flex; gap: 15px; }
.vwt-footer-policy-links a { color: var(--vwt-muted); font-size: 9px; font-weight: 650; }

/* Blog / content */
.vwt-eyebrow { display: inline-block; margin-bottom: 8px; color: var(--vwt-green); font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.vwt-archive-head { margin-bottom: 30px; }
.vwt-archive-head h1 { margin: 0; color: var(--vwt-ink); font-size: clamp(38px, 5vw, 58px); letter-spacing: -.045em; }
.vwt-archive-description { max-width: 650px; color: var(--vwt-muted); }
.vwt-post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.vwt-post-card { overflow: hidden; border: 1px solid var(--vwt-border); border-radius: 16px; background: #fff; }
.vwt-post-card-image { display: block; aspect-ratio: 16/10; overflow: hidden; background: var(--vwt-soft); }
.vwt-post-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.vwt-post-card:hover .vwt-post-card-image img { transform: scale(1.025); }
.vwt-post-card-body { padding: 18px; }
.vwt-post-card h2 { margin: 0 0 9px; font-size: 19px; line-height: 1.2; letter-spacing: -.025em; }
.vwt-post-card h2 a { color: var(--vwt-ink); }
.vwt-post-card p { margin: 0 0 13px; color: var(--vwt-muted); font-size: 11px; line-height: 1.6; }
.vwt-text-link { font-size: 10px; font-weight: 800; }
.vwt-article { max-width: 880px; padding-block: 58px 72px; }
.vwt-article-head h1 { margin: 0 0 25px; color: var(--vwt-ink); font-size: clamp(38px, 6vw, 66px); line-height: 1.02; letter-spacing: -.055em; }
.vwt-article-image { margin: 0 0 32px; overflow: hidden; border-radius: 18px; }
.vwt-prose { max-width: 760px; margin-inline: auto; font-size: 16px; line-height: 1.8; }
.vwt-prose h2, .vwt-prose h3 { color: var(--vwt-ink); letter-spacing: -.03em; }
.vwt-prose a { text-decoration: underline; text-underline-offset: 3px; }
.vwt-empty-page, .vwt-empty-state { max-width: 720px; padding-block: 90px; text-align: center; }
.vwt-empty-page h1, .vwt-empty-state h2 { margin: 0 0 12px; color: var(--vwt-ink); font-size: clamp(34px, 5vw, 54px); letter-spacing: -.045em; }
.vwt-empty-page p, .vwt-empty-state p { color: var(--vwt-muted); }
.vwt-empty-actions { display: flex; justify-content: center; gap: 9px; margin-top: 20px; }
.vwt-button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 9px 15px; color: #fff; background: var(--vwt-green); border: 1px solid var(--vwt-green); border-radius: 8px; font-size: 10px; font-weight: 800; }
.vwt-button-secondary { color: var(--vwt-ink); background: #fff; border-color: var(--vwt-border); }

/* Mobile bottom navigation */
.vwt-mobile-nav { display: none; }

/* Plugin coordination */
@media (max-width: 760px) {
  /* Avoid floating language widgets covering checkout/product UI. Language remains available in the VicMos drawer. */
  #trp-floater-ls, .gt_float_switcher { display: none !important; }
}

@media (max-width: 1024px) {
  .vwt-desktop-menu { display: none; }
  .vwt-menu-toggle { display: inline-grid; }
  .vwt-header-main { grid-template-columns: 1fr auto; gap: 16px; }
  .vwt-brand { min-width: 0; }
  .vwt-post-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 782px) {
  .admin-bar.vicmos-sticky-header-enabled .vwt-site-header { top: 46px; }
}

@media (max-width: 700px) {
  :root { --vwt-header-height: 66px; --vwt-mobile-nav-height: 78px; }
  .vwt-container { width: calc(100% - 20px); }
  .vwt-site-header { border-bottom-color: #edf0ed; }
  .vwt-header-main { min-height: var(--vwt-header-height); }
  .vwt-brand .custom-logo { max-width: 145px; max-height: 40px; }
  .vwt-desktop-only { display: none !important; }
  .vwt-header-actions { gap: 5px; }
  .vwt-icon-button { width: 39px; height: 39px; border-radius: 10px; }
  .vwt-search-panel-inner { padding-block: 10px; }

  body.vicmos-mobile-nav-enabled:not(.woocommerce-checkout) { padding-bottom: calc(var(--vwt-mobile-nav-height) + 30px + env(safe-area-inset-bottom)); }
  .vwt-mobile-nav { position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 9990; min-height: var(--vwt-mobile-nav-height); display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); align-items: end; padding: 8px 6px 7px; border: 1px solid rgba(214,221,215,.95); border-radius: 23px; background: rgba(255,255,255,.97); box-shadow: 0 14px 42px rgba(14,29,17,.17); backdrop-filter: blur(16px); transition: transform .18s ease, opacity .18s ease; }
  .vwt-mobile-nav.is-keyboard-hidden { opacity: 0; pointer-events: none; transform: translateY(120%); }
  .vwt-mobile-nav-item { position: relative; min-width: 0; min-height: 59px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; padding: 4px 2px; color: #414943; background: transparent; border: 0; border-radius: 13px; -webkit-tap-highlight-color: transparent; transition: transform .1s ease, color .15s ease, background .15s ease; }
  .vwt-mobile-nav-item.is-pressed { transform: scale(.95); }
  .vwt-mobile-nav-item.is-active { color: var(--vwt-green-dark); }
  .vwt-mobile-nav-icon { position: relative; display: grid; place-items: center; width: 29px; height: 29px; }
  .vwt-mobile-nav-icon svg { width: 23px; height: 23px; }
  .vwt-mobile-nav-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; line-height: 1; font-weight: 750; }
  .vwt-mobile-cart { justify-content: flex-end; }
  .vwt-mobile-cart-orb { position: absolute; top: -20px; left: 50%; width: 53px; height: 53px; display: grid; place-items: center; transform: translateX(-50%); color: #fff; background: var(--vwt-green); border: 5px solid #fff; border-radius: 50%; box-shadow: 0 9px 22px rgba(31,104,48,.28); }
  .vwt-mobile-cart-orb .vwt-mobile-nav-icon { width: 28px; height: 28px; }
  .vwt-mobile-cart-orb svg { width: 22px; height: 22px; }
  .vwt-mobile-cart .vwt-mobile-nav-label { margin-top: 29px; }
  .vwt-mobile-cart .vwt-cart-count { top: -7px; right: -7px; border-color: #fff; background: var(--vwt-gold); color: #252013; }
  .vwt-wishlist-badge { top: -6px; right: -9px; }

  .vwt-site-footer { margin-top: 44px; }
  .vwt-footer-top { grid-template-columns: 1fr; gap: 24px; padding-block: 32px 25px; }
  .vwt-footer-menu { grid-template-columns: repeat(2,1fr); }
  .vwt-footer-actions { display: none; }
  .vwt-footer-bottom { min-height: 74px; flex-direction: column; justify-content: center; gap: 7px; text-align: center; }
  .vwt-post-grid { grid-template-columns: 1fr; }
  .vwt-article { padding-block: 38px 48px; }
  .vwt-prose { font-size: 15px; }

  /* Keep VicMos Core floating UI above the custom nav. */
  .vmw-floating-whatsapp { bottom: calc(var(--vwt-mobile-nav-height) + 28px + env(safe-area-inset-bottom)) !important; }
  .vmw-toast-region { bottom: calc(var(--vwt-mobile-nav-height) + 26px + env(safe-area-inset-bottom)) !important; }
  .vmw-compare-tray { bottom: calc(var(--vwt-mobile-nav-height) + 24px + env(safe-area-inset-bottom)) !important; }
  .vmw-sticky-cart { bottom: calc(var(--vwt-mobile-nav-height) + 18px + env(safe-area-inset-bottom)) !important; }
  body.single-product { padding-bottom: calc(var(--vwt-mobile-nav-height) + 84px + env(safe-area-inset-bottom)) !important; }

  /* Checkout is intentionally distraction-free. */
  body.woocommerce-checkout { padding-bottom: 0 !important; }
  body.woocommerce-checkout .vwt-site-footer { margin-top: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Search fallback */
.vwt-search-form { max-width: 720px; display: grid; grid-template-columns: 1fr 44px; overflow: hidden; border: 1px solid var(--vwt-border); border-radius: 11px; background: #fff; }
.vwt-search-form input { min-height: 46px; padding: 9px 12px; border: 0; outline: none; box-shadow: none; }
.vwt-search-form button { display: grid; place-items: center; padding: 0; color: #fff; background: var(--vwt-green); border: 0; }
.vwt-comments { max-width: 760px; padding-block: 25px 60px; }
.vwt-comments .comment-list { padding-left: 20px; }

/* =========================================================
   v1.1 — Mobile polish / legacy UI cleanup
========================================================= */

/* The sticky offset is now calculated by JS. This prevents a blank/hero gap
   when WordPress' mobile admin bar scrolls out of view. */
.admin-bar.vicmos-sticky-header-enabled .vwt-site-header {
  top: var(--vwt-admin-offset, 0px);
}
.vwt-site-header,
.vwt-site-header.is-scrolled {
  background: #fff;
}

/* Drawer must never inherit the horizontal desktop menu layout. */
.vwt-drawer-nav .vwt-menu,
.vwt-drawer-nav .vwt-drawer-menu {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 0 !important;
  width: 100%;
}
.vwt-drawer-nav .vwt-menu > li,
.vwt-drawer-nav .vwt-drawer-menu > li {
  width: 100%;
}
.vwt-drawer-nav .vwt-menu > li > a,
.vwt-drawer-nav .vwt-drawer-menu > li > a {
  min-height: 49px;
  width: 100%;
  justify-content: space-between;
  padding: 0 2px;
  font-size: 14px;
}
.vwt-drawer-tools {
  gap: 8px;
}
.vwt-drawer-tool {
  padding: 10px;
  background: #fff;
}

/* Theme JS marks redundant fixed cart/language controls with these classes. */
.vwt-legacy-floating-cart,
.vwt-legacy-floating-language {
  display: none !important;
}

@media (max-width: 700px) {
  .vwt-drawer-panel {
    width: min(410px, 94vw);
    padding: 16px 17px 22px;
  }
  .vwt-drawer-head {
    padding-bottom: 13px;
  }
  .vwt-drawer-head .custom-logo {
    max-width: 150px;
    max-height: 42px;
  }
  .vwt-drawer-quick {
    margin-top: 14px;
  }
  .vwt-drawer-quick a {
    min-height: 68px;
    padding: 11px;
  }
  .vwt-drawer-tools {
    margin-top: 12px;
  }

  /* Slightly more compact nav so all five actions remain clearly visible. */
  .vwt-mobile-nav {
    left: 8px;
    right: 8px;
    padding-inline: 4px;
    border-radius: 22px;
  }
  .vwt-mobile-nav-label {
    font-size: 8.5px;
  }
}
