/* InfoVet magazine / store header, v1. Scoped additions to the existing v27 theme.
   The shop and basket automatically become links when the WooCommerce pages go live. */

.site-header .header-main {
  position: relative;
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: clamp(12px, 2vw, 26px);
  min-height: 79px;
  align-items: center;
  padding-top: 9px;
  padding-bottom: 9px;
}
.site-header .header-main > .brand {
  min-width: 0;
  align-self: center;
  flex-shrink: 0;
}
.site-header .header-main .brand-logo-only {
  align-items: flex-start;
  gap: 5px;
}
.site-header .header-main .brand-logo {
  width: 136px;
  max-height: 55px;
  height: auto;
  object-fit: contain;
}
.site-header .header-main .brand-tagline {
  white-space: nowrap;
  font-size: 9px;
  line-height: 1.1;
  letter-spacing: .035em;
}
.site-header .main-nav.iv-head-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  width: 100%;
  flex-wrap: nowrap;
  gap: clamp(8px, 1.1vw, 16px);
  font-size: 13px;
  color: #30443b;
  line-height: 1.22;
}
.site-header .iv-nav-main,
.site-header .iv-nav-actions {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: clamp(9px, 1.2vw, 17px);
  min-width: 0;
}
.site-header .iv-nav-actions {
  flex-shrink: 0;
  gap: 9px;
}
.site-header .iv-nav-main > a.iv-nav-link,
.site-header .iv-nav-main > span.iv-nav-link,
.site-header .iv-nav-dropdown > summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 760;
  white-space: nowrap;
  font-size: 13px;
  color: #34463d;
  padding: 0;
  opacity: 1;
  line-height: 1.22;
}
.site-header .iv-nav-main .iv-nav-link:hover,
.site-header .iv-nav-main .iv-nav-link.is-active,
.site-header .iv-nav-main .iv-nav-dropdown[open] > summary,
.site-header .iv-nav-main .iv-nav-dropdown.is-active > summary {
  color: var(--green);
}
.site-header .iv-nav-main .iv-nav-pending {
  color: #798980;
  opacity: .62;
  cursor: default;
}
.site-header .iv-nav-dropdown {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  flex: 0 0 auto;
  position: relative;
}
.site-header .iv-nav-dropdown > summary {
  list-style: none;
  user-select: none;
  cursor: pointer;
}
.site-header .iv-nav-dropdown > summary::after {
  content: "⌄";
  margin-left: 6px;
  font-size: 13px;
  position: relative;
  top: -2px;
  opacity: .65;
}
.site-header .iv-nav-dropdown > summary::-webkit-details-marker,
.site-header .iv-profile-menu > summary::-webkit-details-marker {
  display: none;
}
.site-header .iv-nav-dropdown .nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: -18px;
  z-index: 75;
  width: min(340px, 90vw);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(23,33,29,.13);
  border-radius: 18px;
  background: #fffdf8;
  padding: 12px;
  display: block;
}
.site-header .iv-nav-dropdown:not([open]) > .nav-dropdown-menu {
  display: none;
}
.site-header .iv-services-dropdown .nav-dropdown-menu {
  width: 280px;
}
.site-header .iv-nav-dropdown .nav-dropdown-menu a {
  display: block;
  width: 100%;
  padding: 11px 13px;
  font-weight: 700;
  color: #32473c;
  line-height: 1.35;
  border-radius: 11px;
  font-size: 13px;
  white-space: normal;
}
.site-header .iv-nav-dropdown .nav-dropdown-menu a:hover,
.site-header .iv-nav-dropdown .nav-dropdown-menu a:focus {
  background: #e9f0eb;
  color: #174a3d;
}
.site-header .iv-nav-consult {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green);
  color: #fff !important;
  font-size: 12px;
  font-weight: 780;
  padding: 0 14px;
  min-height: 42px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 8px 22px rgba(31,107,87,.14);
  transition: background .15s ease;
}
.site-header .iv-nav-consult:hover,
.site-header .iv-nav-consult:focus {
  background: var(--green-dark);
}
.site-header .iv-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 8px;
  min-height: 42px;
  min-width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(23,33,29,.13);
  background: rgba(255,253,248,.76);
  color: #2d5746;
  opacity: 1;
  box-shadow: none;
  vertical-align: middle;
}
.site-header .iv-nav-icon svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: block;
}
.site-header .iv-nav-icon-pending {
  color: #96a69e;
  background: rgba(245,247,243,.72);
  cursor: default;
  opacity: .75;
}
.site-header a.iv-nav-icon:hover,
.site-header details.iv-profile-menu > summary:hover {
  border-color: rgba(31,107,87,.4);
  background: #e8f0ea;
}
.site-header .iv-profile-menu {
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  position: relative;
  border-radius: 0;
  box-shadow: none;
  flex: 0 0 auto;
}
.site-header .iv-profile-menu > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.site-header .iv-profile-toggle {
  padding: 0 10px;
  border-radius: 999px;
}
.site-header .iv-profile-label {
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  line-height: 1;
}
.site-header .iv-profile-list {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 80;
  width: 280px;
  border-radius: 19px;
  padding: 12px;
  background: #fffdf8;
  box-shadow: 0 24px 60px rgba(23,33,29,.16);
  border: 1px solid var(--line);
  color: #33423c;
}
.site-header .iv-profile-menu:not([open]) .iv-profile-list { display: none; }
.site-header .iv-profile-heading {
  display: block;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 8px 11px;
  color: #75827b;
}
.site-header .iv-profile-list a,
.site-header .iv-profile-disabled {
  display: block;
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
  color: var(--green-dark);
  text-decoration: none;
}
.site-header .iv-profile-list a:hover,
.site-header .iv-profile-list a.is-active {
  background: rgba(220,232,223,.68);
}
.site-header .iv-profile-list small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 520;
  line-height: 1.4;
}
.site-header .iv-profile-disabled { color: #89958d; cursor: default; }
.site-header .menu-toggle {
  align-items: center;
  justify-content: center;
  color: var(--green-dark);
  font-size: 25px;
  font-weight: 550;
  flex-shrink: 0;
}
.site-header .menu-toggle:focus-visible,
.site-header .iv-nav-dropdown > summary:focus-visible,
.site-header .iv-profile-menu > summary:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
}

@media (min-width: 1151px) and (max-width: 1270px) {
  .site-header .header-main { grid-template-columns: 150px minmax(0,1fr); gap: 12px; }
  .site-header .main-nav.iv-head-nav { gap: 8px; font-size: 12px; }
  .site-header .iv-nav-main,
  .site-header .iv-nav-actions { gap: 10px; }
  .site-header .iv-nav-main > a.iv-nav-link,
  .site-header .iv-nav-main > span.iv-nav-link,
  .site-header .iv-nav-dropdown > summary { font-size: 12px; }
  .site-header .iv-nav-consult { font-size: 11px; padding: 0 12px; }
}

@media (max-width: 1150px) {
  .site-header .header-main {
    display: flex;
    flex-direction: row;
    min-height: 74px;
    justify-content: space-between;
    align-items: center;
    padding-top: 9px;
    padding-bottom: 9px;
    gap: 12px;
  }
  .site-header .menu-toggle {
    display: inline-flex;
    order: 2;
    height: 44px;
    width: 46px;
    margin-left: auto;
    cursor: pointer;
  }
  .site-header .main-nav.iv-head-nav {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    right: 0;
    left: auto;
    z-index: 75;
    width: min(420px, calc(100vw - 28px));
    max-height: calc(100vh - 144px);
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    margin: 0;
    padding: 16px;
    background: #fffdf8;
    border: 1px solid var(--line);
    border-radius: 0 0 22px 22px;
    box-shadow: 0 24px 50px rgba(23,33,29,.18);
  }
  .site-header .main-nav.iv-head-nav.is-open { display: flex; }
  .site-header .iv-nav-main {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    width: 100%;
  }
  .site-header .iv-nav-main > a.iv-nav-link,
  .site-header .iv-nav-main > span.iv-nav-link,
  .site-header .iv-nav-dropdown > summary {
    width: 100%;
    min-height: 43px;
    padding: 10px 12px !important;
    font-size: 14px;
    border-radius: 10px;
    justify-content: space-between;
  }
  .site-header .iv-nav-main > a:hover,
  .site-header .iv-nav-main > span.iv-nav-link:hover {
    background: rgba(220,232,223,.54);
  }
  .site-header .iv-nav-dropdown { width: 100%; }
  .site-header .iv-nav-dropdown .nav-dropdown-menu,
  .site-header .iv-services-dropdown .nav-dropdown-menu {
    width: 100%;
    max-width: none;
    position: static;
    padding: 4px 8px;
    margin: 0 0 8px;
    box-shadow: none;
    border-radius: 12px;
    border-color: rgba(31,107,87,.09);
    background: #f5f7f2;
  }
  .site-header .iv-nav-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    border-top: 1px solid var(--line);
    margin-top: 8px;
    padding-top: 14px;
  }
  .site-header .iv-nav-consult { flex: 1 1 auto; min-width: 170px; font-size: 13px; }
  .site-header .iv-profile-menu { flex: 0 0 auto; }
  .site-header .iv-profile-list {
    right: 0;
    top: calc(100% + 8px);
    width: min(270px, calc(100vw - 60px));
    z-index: 100;
  }
}

@media (max-width: 560px) {
  .site-header .header-main .brand-logo { width: 116px; max-height: 49px; }
  .site-header .header-main .brand-tagline { font-size: 8px; letter-spacing: 0; }
  .site-header .iv-profile-label { display: none; }
  .site-header .iv-nav-icon { min-width: 43px; }
}

/* Keep the account submenu inside the scrollable mobile navigation. */
@media (max-width: 1150px) {
  .site-header .iv-profile-menu[open] { flex: 1 1 100%; width: 100%; }
  .site-header .iv-profile-menu[open] .iv-profile-list { position: static; width: 100%; margin-top: 9px; box-shadow: none; }
}

/* InfoVet store navigation in the main footer, on all pages. */
.site-footer .ivshop-footer-links {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:22px;
  padding:25px 0;
  margin-top:30px;
  border-top:1px solid rgba(255,255,255,.15);
}
.site-footer .ivshop-footer-links>div{display:grid;gap:5px;flex:0 0 auto}
.site-footer .ivshop-footer-links strong{color:#fff;font-size:15px;font-weight:850}
.site-footer .ivshop-footer-links span{font-size:12px;color:rgba(255,255,255,.58)}
.site-footer .ivshop-footer-links nav{display:flex;gap:14px 23px;align-items:center;flex-wrap:wrap}
.site-footer .ivshop-footer-links nav a{color:rgba(255,255,255,.8);font-size:13px;font-weight:680;text-decoration:none}
.site-footer .ivshop-footer-links nav a:hover{color:#fff;text-decoration:underline}
@media(max-width:780px){
  .site-footer .ivshop-footer-links{flex-direction:column;align-items:flex-start}
  .site-footer .ivshop-footer-links nav{display:grid;grid-template-columns:1fr 1fr;gap:12px 18px}
}
@media(max-width:440px){
  .site-footer .ivshop-footer-links nav{grid-template-columns:1fr}
}

/* InfoVet main header: WooCommerce live item count. */
.site-header .iv-cart-icon {
  position:relative;
  overflow:visible;
  isolation:isolate;
}
.site-header .iv-cart-count {
  position:absolute;
  z-index:5;
  top:-8px;
  right:-8px;
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:20px;
  height:20px;
  padding:0 4px;
  border-radius:99px;
  background:#236648;
  border:2px solid #fffdf8;
  color:#fff;
  font-family:system-ui,-apple-system,"Segoe UI",sans-serif;
  font-size:10px;
  font-weight:850;
  line-height:1;
  letter-spacing:-.03em;
  box-shadow:0 2px 7px rgba(14,45,29,.18);
  pointer-events:none;
}
.site-header .iv-cart-count[data-count="0"] {display:none}

/* One coherent footer, with shop pages as a proper fifth column. */
.site-footer .footer-grid {
  display:grid;
  grid-template-columns:minmax(215px,1.46fr) repeat(3,minmax(135px,.9fr)) minmax(172px,1.06fr);
  align-items:start;
  column-gap:clamp(22px,2.5vw,40px);
  row-gap:25px;
  padding-bottom:37px;
}
.site-footer .footer-grid>div {min-width:0}
.site-footer .footer-grid .footer-brand {display:inline-flex;margin-bottom:9px}
.site-footer .footer-grid h3 {
  margin:4px 0 17px;
  color:#fffdf8;
  font-size:14px;
  font-weight:850;
  line-height:1.3;
  letter-spacing:.005em;
}
.site-footer .footer-grid ul {
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:11px;
}
.site-footer .footer-grid li {margin:0;padding:0;line-height:1.45}
.site-footer .footer-grid ul a {
  color:rgba(255,255,255,.76);
  font-size:12.5px;
  line-height:1.5;
  font-weight:450;
  text-decoration:none;
  transition:color .15s ease;
}
.site-footer .footer-grid ul a:hover,
.site-footer .footer-grid ul a:focus-visible {
  color:#e1f7e4;
  text-decoration:underline;
  text-underline-offset:3px;
}
.site-footer .footer-grid>div:first-child p {
  margin:12px 0 0;
  max-width:255px;
  font-size:13px;
  line-height:1.72;
  color:rgba(255,255,255,.68);
}
.site-footer .iv-footer-shop {padding:0;border:0;background:none}
.site-footer .footer-bottom {
  margin-top:0;
  padding-top:20px;
  border-top:1px solid rgba(255,255,255,.15);
}
@media(max-width:1150px) {
  .site-footer .footer-grid {
    grid-template-columns:minmax(185px,1.25fr) repeat(2,minmax(155px,1fr));
    gap:29px 35px;
  }
}
@media(max-width:790px) {
  .site-footer .footer-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:30px 26px;
  }
  .site-footer .footer-grid>div:first-child {grid-column:1/-1}
  .site-footer .footer-grid>div:first-child p {max-width:550px}
}
@media(max-width:480px) {
  .site-footer .footer-grid {
    grid-template-columns:minmax(0,1fr);
    gap:28px;
    padding-bottom:30px;
  }
  .site-footer .footer-grid>div:first-child {grid-column:auto}
  .site-footer .footer-grid h3 {margin-bottom:12px}
  .site-footer .footer-grid ul {gap:9px}
}
