/* ============================================================
   DOCX Animal Health Care — MOBILE / TABLET premium layer
   ------------------------------------------------------------
   Loaded AFTER style.css. EVERYTHING here is inside a max-width
   media query, so desktop (>=821px) is never affected.
   Breakpoints: <=820 (phone+tablet portrait), <=600, <=400.
   ============================================================ */

/* Injected mobile-only elements are hidden by default (all widths);
   the media queries below re-show them on mobile/tablet only. */
.mbar,.mnav-backdrop{display:none}
.mviz{display:none}
#site-header .mnav-call,#site-header .mnav-lang{display:none}
#site-header .mnav-langpop{display:none}
#site-header .menu .mnav-title,#site-header .menu .mi,#site-header .menu .lang-ic,#site-header .menu .mnav-greet{display:none}

/* premium outline icon sizing + colour (these icons only exist on mobile) */
.dxi{display:block;flex:none}
#site-header .burger .dxi{width:24px;height:24px;color:#fff}
#site-header .mnav-call .dxi,#site-header .mnav-lang .dxi{width:22px;height:22px}
#site-header .menu a .mi .dxi{width:22px;height:22px}
#site-header .menu .mnav-close .dxi{width:20px;height:20px}
#site-header .menu .dx-lang.in-menu .lang-ic .dxi{width:20px;height:20px;color:#cfe6d9}
.mbar-b .dxi{width:24px;height:24px;margin-bottom:0}
.ic .ic-svg,.bico .ic-svg,.b .ic-svg{width:24px;height:24px;color:var(--green)}
.q-pill .ic .ic-svg,.about-panel .meta .b .ic-svg{color:#fff}
.foot-links .foot-ic{display:inline-flex;vertical-align:-3px;margin-right:5px}
.foot-links .foot-ic .dxi{width:16px;height:16px;color:#9dc0af}
.btn .lead-ic{display:inline-flex;align-items:center;flex:none}
.btn .lead-ic .dxi{width:20px;height:20px}

/* ===================== mobile: <=820px OR short landscape phone ===================== */
@media (max-width: 820px), (orientation: landscape) and (max-height: 500px){

  /* --- rhythm & gutters --- */
  .wrap{padding-left:18px;padding-right:18px}
  section{padding:52px 0}
  .sec-head{margin-bottom:34px}

  /* hide the white sub-strip on mobile for a compact header */
  .subbar{display:none !important}

  /* ---------- Premium mobile header: [burger] [LARGE logo] [language globe] ---------- */
  #site-header{background:var(--green)}
  #site-header .nav{height:72px;align-items:center;justify-content:space-between;gap:6px;padding:0 8px}
  /* logo sits in a panel that spans the FULL green-bar height; panel bg matches the home page background (--white) */
  #site-header .brand{order:2;align-self:stretch;margin:0 auto;background:var(--white);padding:0 10px;border-radius:0;box-shadow:none;display:flex;align-items:center}
  #site-header .brand img{height:66px;width:auto;max-width:none}
  #site-header .burger{order:1;display:flex;margin:0;padding:9px;border-radius:9px}
  #site-header .burger span{width:22px}
  #site-header .mnav-call,#site-header .mnav-lang{order:3;display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:11px;background:rgba(255,255,255,.16);color:#fff;font-size:1.15rem;flex:none;border:0;cursor:pointer}
  #site-header .mnav-call:active,#site-header .mnav-lang:active{background:rgba(255,255,255,.28)}
  /* language popover anchored under the header globe (mobile only) */
  #site-header .mnav-langpop{position:absolute;top:calc(100% - 4px);right:8px;flex-direction:column;min-width:154px;max-width:70vw;background:#fff;border:1px solid rgba(4,106,52,.15);border-radius:12px;box-shadow:0 16px 36px rgba(0,40,20,.22);padding:6px;z-index:50}
  #site-header .mnav-langpop.open{display:flex}
  #site-header .mnav-langpop .mnav-langopt{width:100%;text-align:left;background:none;border:0;cursor:pointer;font-family:var(--f-head);font-weight:600;font-size:.98rem;color:var(--green-d);padding:11px 14px;border-radius:8px}
  #site-header .mnav-langpop .mnav-langopt:hover,#site-header .mnav-langpop .mnav-langopt:active{background:var(--mint)}

  /* subtle sticky separation */
  header#site-header{box-shadow:0 2px 10px rgba(0,40,20,.14)}

  /* ---------- Slide-in navigation drawer (left) ---------- */
  #site-header .menu{
    position:fixed;top:0;left:0;right:auto;bottom:0;
    width:min(85vw,320px);height:100vh;height:100dvh;
    transform:translateX(-105%);transition:transform .34s cubic-bezier(.2,.7,.3,1);
    background:linear-gradient(180deg,#0a6e3e,#053d24);
    display:flex;flex-direction:column;align-items:stretch;gap:2px;
    padding:calc(16px + env(safe-area-inset-top)) 16px calc(20px + env(safe-area-inset-bottom));
    overflow-y:auto;-webkit-overflow-scrolling:touch;
    box-shadow:18px 0 55px rgba(0,25,12,.42);z-index:130;border:0;inset:0 auto 0 0
  }
  #site-header .menu.open{transform:none}
  #site-header .menu .mnav-title{display:flex;align-items:center;justify-content:space-between;color:#cfe6d9;font-family:var(--f-head);font-weight:600;font-size:.8rem;letter-spacing:.08em;text-transform:uppercase;padding:2px 6px 12px;margin-bottom:6px;border-bottom:1px solid rgba(255,255,255,.14)}
  #site-header .menu .mnav-close{background:rgba(255,255,255,.14);border:0;color:#fff;width:34px;height:34px;border-radius:9px;font-size:1.3rem;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0}
  #site-header .menu a{display:flex;align-items:center;gap:13px;color:#eafff2;font-size:1.05rem;font-weight:600;padding:14px 12px;border-radius:11px;min-height:48px}
  #site-header .menu a::after{display:none !important}
  #site-header .menu a:hover,#site-header .menu a:active,#site-header .menu a.active{background:rgba(255,255,255,.12);color:#fff}
  #site-header .menu a .mi{display:inline-flex;align-items:center;justify-content:center;width:26px;flex:none}
  #site-header .menu .hdr-cta{order:15;margin:14px 0 4px;height:auto;justify-content:center;padding:15px;border-radius:50px;background:var(--gold) !important;color:#3a2c05 !important;font-size:1rem}
  #site-header .menu .hdr-cta .mi{color:#3a2c05}
  /* language selector removed from the drawer (language system elsewhere is unchanged) */
  #site-header .menu .dx-lang.in-menu{display:none !important}
  /* dynamic greeting block — occupies the space where the language row was */
  #site-header .menu .mnav-greet{order:20;display:flex;flex-direction:column;gap:3px;margin:18px 0 2px;padding-top:16px;border-top:1px solid rgba(255,255,255,.14);color:#eafff2}
  #site-header .menu .mnav-greet .mng-hi{font-family:var(--f-head);font-weight:700;font-size:1.12rem;color:#fff}
  #site-header .menu .mnav-greet .mng-welcome{font-size:.9rem;color:#cfe6d9;line-height:1.35;margin-top:1px}
  #site-header .menu .mnav-greet .mng-date{font-size:.82rem;color:#bfe0cd;margin-top:5px}
  #site-header .menu .mnav-greet .mng-time{font-size:.82rem;color:#bfe0cd}

  /* drawer backdrop (element injected by mobile.js) */
  .mnav-backdrop{display:block;position:fixed;inset:0;background:rgba(4,20,12,.5);opacity:0;visibility:hidden;transition:opacity .3s;z-index:125}
  body.nav-open .mnav-backdrop{opacity:1;visibility:visible}
  /* while the drawer is open, lift the header's stacking context above the backdrop (125)
     and bottom bar (110) so the drawer (z-index:130 within) receives taps. Header returns
     to its normal z-index:60 when the drawer closes. */
  body.nav-open #site-header{z-index:130}
  #site-header .menu .mnav-title{display:flex}
  #site-header .menu .dx-lang.in-menu .lang-ic{display:inline-flex;align-items:center;margin-right:2px}

  /* ---------- Typography ---------- */
  .hero h1{font-size:clamp(2.05rem,8vw,2.5rem);line-height:1.05;letter-spacing:-.015em;margin:0 0 12px}
  .sec-head h2,h2.line,.about h2,.quality h2,.partner h2,.pbanner h1{font-size:clamp(1.55rem,6vw,2rem) !important;line-height:1.14}
  .sec-head p{font-size:1rem}
  .eyebrow{margin-bottom:14px}

  /* ---------- Hero ---------- */
  .hero{padding-top:0}
  .hero .wrap{padding-top:34px;padding-bottom:26px;gap:22px;min-height:0}
  .hero-copy{max-width:100%}
  .hero p.lead{font-size:1.04rem;line-height:1.6;max-width:100%;margin-bottom:22px}
  .hero-cta{gap:13px;margin-bottom:2px}
  .hero-cta .btn{flex:1 1 46%;min-width:150px;justify-content:center;padding:15px 16px}
  /* mobile now reuses the original composed desktop hero scene (#13); the
     simplified cow-only .mviz card is hidden (still injected by mobile.js). */
  .hero-visual{display:flex}
  .mviz{display:none}
  .mviz-card{position:relative;border-radius:20px;overflow:hidden;background:#eef4f0;border:1px solid rgba(4,106,52,.14);box-shadow:0 14px 32px rgba(0,50,25,.18)}
  .mviz-card img{display:block;width:100%;height:clamp(200px,52vw,250px);object-fit:cover;object-position:50% 22%}
  .mviz-ov{position:absolute;inset:0;background:linear-gradient(180deg,rgba(4,106,52,.06) 0%,rgba(4,106,52,0) 32%,rgba(3,45,25,.05) 60%,rgba(3,45,25,.56) 100%)}
  .mviz-tag{position:absolute;left:12px;right:12px;bottom:12px;display:flex}
  .mviz-tag span{background:rgba(4,106,52,.92);color:#fff;font-family:var(--f-head);font-weight:700;font-size:.72rem;letter-spacing:.11em;text-transform:uppercase;padding:8px 13px;border-radius:10px;box-shadow:0 4px 12px rgba(0,40,20,.28)}
  .hv-scene{height:min(70vw,340px);max-width:420px;margin:0 auto}
  .hv-glow{width:80%;height:80%}

  /* ---------- Trust / stats: tidy 2x2 cards ---------- */
  .trustbar .wrap{grid-template-columns:1fr 1fr;gap:12px;padding:18px 4px}
  .trustbar .cell{border:1px solid var(--line);background:#fff;border-radius:14px;padding:14px;gap:12px}
  .trustbar .cell .ic{width:44px;height:44px;font-size:1.2rem}
  .trustbar .cell .tx b{font-size:1.35rem}
  .trustbar .cell .tx span{font-size:.82rem}

  /* ---------- Category cards ---------- */
  .cats-grid{grid-template-columns:1fr 1fr;gap:14px}
  .cat{padding:18px 16px;border-radius:16px}
  .cat .ic{width:46px;height:46px;font-size:1.4rem;margin-bottom:12px}
  .cat h3{font-size:1rem}
  .cat p{font-size:.84rem}
  .cat .arrow{top:18px;right:16px}

  /* ---------- Product cards (list + featured) ---------- */
  .filters{gap:8px;margin-bottom:26px;flex-wrap:nowrap;overflow-x:auto;justify-content:flex-start;padding-bottom:4px;-webkit-overflow-scrolling:touch}
  .filters button{flex:none;padding:9px 16px;font-size:.88rem}
  .prod-grid{grid-template-columns:1fr 1fr;gap:14px}
  .pcard{border-radius:16px}
  .pcard .thumb{height:150px;padding:16px 12px 8px}
  .pcard .thumb img{max-height:120px}
  .pcard .pbody{padding:12px 14px 16px}
  .pcard h3{font-size:1rem;margin:5px 0}
  .pcard p{font-size:.82rem}
  .pcard .plink{font-size:.82rem;margin-top:11px}

  /* ---------- Product modal (details) ---------- */
  .modal-bg{padding:0;align-items:stretch}
  .modal{border-radius:20px 20px 0 0;margin-top:auto;max-height:94vh;overflow-y:auto}
  .modal-gallery{padding:24px 18px 8px}
  .modal-gallery .main{height:210px}
  .modal-gallery .main img{max-height:210px}
  .modal-intro{padding:22px 20px 6px}
  .modal-intro h2{font-size:1.4rem}
  .modal-body{padding:6px 20px 24px}
  .modal-foot{padding:18px 20px;flex-direction:column;align-items:stretch;gap:12px}
  .modal-foot .fnote{max-width:100%}
  .modal-foot .btn{width:100%;justify-content:center}

  /* ---------- Why / About panels ---------- */
  .why-grid{grid-template-columns:1fr;gap:14px}
  .why-item{padding:18px;background:#fff;border:1px solid var(--line);border-radius:16px}
  .about .grid{gap:28px}
  .about-panel{padding:28px;min-height:0}
  .about-panel blockquote{font-size:1.25rem}
  .q-pill{padding:16px}

  /* ---------- Contact ---------- */
  .contact-grid{gap:20px}
  .info-card,form.enq{padding:20px;border-radius:18px}
  .info-row{padding:14px 0;gap:14px}
  .info-row .ic{width:44px;height:44px}
  .info-row a,.info-row span{font-size:.92rem;word-break:break-word}
  .two{grid-template-columns:1fr;gap:0}

  /* ---------- Distributor CTA ---------- */
  .partner .box{padding:32px 22px;border-radius:20px}
  .partner .acts{justify-content:stretch}
  .partner .acts .btn{flex:1;justify-content:center;align-items:center;text-align:center}

  /* ---------- Footer ---------- */
  .foot-grid{gap:30px}
  .foot-bottom{flex-direction:column;text-align:center}

  /* ---------- Buttons: comfy tap targets ---------- */
  .btn{padding:13px 22px;min-height:46px}

  /* ---------- Fixed bottom action bar (injected by mobile.js) ---------- */
  .mbar{
    position:fixed;left:0;right:0;bottom:0;z-index:110;
    display:grid;grid-template-columns:repeat(3,1fr);
    background:#fff;border-top:1px solid var(--line);
    box-shadow:0 -6px 24px rgba(0,40,20,.10);
    padding-bottom:env(safe-area-inset-bottom)
  }
  .mbar-b{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:10px 4px;min-height:56px;line-height:1;background:none;border:0;cursor:pointer;font-family:var(--f-head);color:var(--green-d)}
  .mbar-b span{font-size:.72rem;font-weight:600}
  .mbar-b:active{background:var(--mint-2)}
  .mbar-b+.mbar-b{border-left:1px solid var(--line)}
  .mbar-b.wa .dxi{color:#1faa54}
  .mbar-b.chat .dxi{color:var(--green)}
  /* keep page content clear of the bar (bar is ~66px tall) */
  body{padding-bottom:calc(74px + env(safe-area-inset-bottom))}

  /* ---------- Hide redundant floating controls on mobile ----------
     WhatsApp is in the bottom bar; the chatbot launcher is the bottom-bar
     "Chat" button. !important beats the inline display the widget toggles. */
  .wa-float{display:none !important}
  .dxa-fab{display:none !important}
  /* when the chatbot IS open, its full-screen panel covers the bar (fine);
     make sure it sits above everything */
  .dxa-panel{z-index:140}
}

/* ===================== <= 600px ===================== */
@media (max-width: 600px){
  .wrap{padding-left:16px;padding-right:16px}
  section{padding:44px 0}
  .prod-grid{grid-template-columns:1fr}
  .pcard{display:flex;flex-direction:row;align-items:stretch}
  .pcard .thumb{width:132px;height:auto;min-height:118px;flex:none;padding:12px}
  .pcard .thumb img{max-height:96px}
  .pcard .thumb::after{display:none}
  .pcard .pbody{border-top:0;border-left:1px solid var(--line);justify-content:center}
  .cats-grid{grid-template-columns:1fr}
  .cat{display:flex;align-items:center;gap:14px;padding:16px}
  .cat .ic{margin-bottom:0}
  .cat .arrow{position:static;margin-left:auto}
  .hero-cta .btn{flex:1 1 100%}
  .trustbar .cell .tx b{font-size:1.2rem}
}

/* ===================== <= 400px ===================== */
@media (max-width: 400px){
  .hero h1{font-size:1.95rem}
  #site-header .brand img{height:60px}
  .mviz-tag span{font-size:.66rem;letter-spacing:.09em;padding:7px 11px}
  .mbar-b span{font-size:.68rem}
  .pcard .thumb{width:112px}
}

/* ============ short LANDSCAPE only (phone held horizontally) ============
   Additive ergonomics for short landscape screens. Doubly gated
   (<=820px width + landscape + <=480px height), so PORTRAIT and DESKTOP
   never match this block. Chatbot/drawer/bottom-bar/language popup unchanged. */
@media (orientation: landscape) and (max-height: 500px){
  /* compact header so it doesn't eat the short height (contents stay centred) */
  #site-header .nav{height:56px}
  #site-header .brand img{height:46px}
  /* tighter hero top + shorter hero image so the first view fits landscape */
  .hero .wrap{padding-top:12px}
  .mviz-card{max-width:360px;margin-left:auto;margin-right:auto}
  .mviz-card img{height:clamp(180px,46vh,220px)}
}
