/* ===========================================================
   Chemist Box — shared page shell (header + footer)

   ONE source of truth for the site chrome. Loaded by every page,
   including the homepage, which previously carried its own copy.

   Loads BEFORE the page's own stylesheet so a page can still override
   a shell rule deliberately — but nothing should need to.

   The markup that goes with this lives in _shell/header.html and
   _shell/footer.html and is injected by _build-shell.js. Edit those,
   re-run the script — never hand-edit the shell inside a page.

   Colour tokens are referenced with fallbacks because the two
   stylesheets that pair with this file name them differently:
   pages.css calls the near-black --ink, index.html calls it
   --navy-deep. Both are #232323.
   =========================================================== */

.wrap{max-width:1180px; margin:0 auto; padding-left:28px; padding-right:28px;}

.skip-link{
  position:absolute; left:-999px; top:0;
  background:var(--navy,#313A74); color:#fff; padding:10px 16px; z-index:200;
}
.skip-link:focus{left:12px; top:12px;}

/* ---------- Header ---------- */
.site-header{
  position:sticky; top:0; z-index:100;
  background:#fff;
  border-bottom:1px solid var(--line,rgba(49,58,116,0.16));
  box-shadow:0 1px 0 rgba(49,58,116,0.04);
}
.header-inner{
  display:flex; align-items:center; justify-content:space-between;
  padding-top:12px; padding-bottom:12px; gap:20px;
}
.brand{display:flex; align-items:center; text-decoration:none;}
.brand img{height:58px; width:auto;}

nav.main-nav{display:flex; align-items:center; gap:30px;}
nav.main-nav a{
  font-family:var(--display); font-size:15px; letter-spacing:0.06em;
  text-decoration:none; color:var(--ink,#232323);
  position:relative; padding:4px 0;
}
nav.main-nav a::after{
  content:""; position:absolute; left:0; bottom:-2px; width:0; height:2px;
  background:var(--sky,#2797C6); transition:width .2s ease;
}
nav.main-nav a:hover::after{width:100%;}
.nav-mobile-only{display:none;}

.header-ctas{display:flex; align-items:center; gap:10px;}

/* Buttons live here rather than in either page stylesheet: they appear in the
   header on every page, and the two copies had drifted (2px vs 3px radius). */
.btn{
  font-family:var(--display); letter-spacing:0.05em; font-size:14.5px;
  text-decoration:none; padding:11px 20px; border-radius:2px;
  display:inline-flex; align-items:center; gap:8px;
  border:1.5px solid var(--navy,#313A74); transition:all .15s ease;
  white-space:nowrap; cursor:pointer;
}
.btn-fill{background:var(--navy,#313A74); color:#fff;}
.btn-fill:hover{background:var(--deep-blue,#004A7C); border-color:var(--deep-blue,#004A7C);}
.btn-ghost{background:transparent; color:var(--navy,#313A74);}
.btn-ghost:hover{background:var(--navy,#313A74); color:#fff;}
.btn-sky{border-color:var(--sky,#2797C6); color:var(--sky,#2797C6);}
.btn-sky:hover{background:var(--sky,#2797C6); color:#fff;}
.btn-light{background:#fff; color:var(--navy,#313A74); border-color:#fff;}
.btn-light:hover{background:rgba(255,255,255,0.88);}
.btn-outline-white{background:transparent; color:#fff; border-color:#fff;}
.btn-outline-white:hover{background:#fff; color:var(--navy,#313A74);}

.mobile-toggle{
  display:none; background:none; border:1.5px solid var(--navy,#313A74); border-radius:2px;
  padding:9px 10px; cursor:pointer; position:relative; width:38px; height:38px;
}
.mobile-toggle span{
  display:block; position:absolute; left:9px; width:18px; height:2px; background:var(--navy,#313A74);
  border-radius:1px;
  transition:transform .32s cubic-bezier(.4,0,.2,1), opacity .2s ease, top .32s cubic-bezier(.4,0,.2,1);
}
.mobile-toggle span:nth-child(1){top:13px;}
.mobile-toggle span:nth-child(2){top:19px;}
.mobile-toggle span:nth-child(3){top:25px;}
.mobile-toggle.is-open span:nth-child(1){top:18px; transform:rotate(45deg);}
.mobile-toggle.is-open span:nth-child(2){opacity:0;}
.mobile-toggle.is-open span:nth-child(3){top:18px; transform:rotate(-45deg);}

/* Links that leave chemistbox.in for a service we don't control — chiefly the
   hosted map locator on medical-stores.chemistbox.in, which carries its own
   header and branding. The arrow signals the change of surface so the different
   look reads as intentional rather than as a broken page. */
.btn-external::after{
  content:"↗"; font-size:0.95em; line-height:1; margin-left:2px; opacity:0.75;
}
.ext-note{
  font-size:13px; color:rgba(35,35,35,0.55); margin-top:10px;
}
.ext-note--light{color:rgba(255,255,255,0.6);}

/* ---------- Footer ---------- */
footer{background:var(--ink,#232323); color:rgba(255,255,255,0.7);}
.footer-top{
  display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:40px;
  padding-top:64px; padding-bottom:48px; border-bottom:1px solid rgba(255,255,255,0.12);
}
.footer-brand img{height:40px; margin-bottom:18px;}
.footer-brand p{font-size:14px; line-height:1.55; color:rgba(255,255,255,0.62); max-width:32ch; margin-bottom:18px;}
.footer-social{display:flex; gap:12px;}
.footer-social a{
  width:34px; height:34px; border:1px solid rgba(255,255,255,0.25); border-radius:2px;
  display:flex; align-items:center; justify-content:center; text-decoration:none;
}
.footer-social a:hover{background:rgba(255,255,255,0.1);}
.footer-social svg{width:16px; height:16px;}
.footer-col h5{
  font-family:var(--display); font-size:13px; letter-spacing:0.08em; text-transform:uppercase;
  color:rgba(255,255,255,0.4); margin-bottom:18px; font-weight:400;
}
.footer-col a{
  display:block; font-size:14px; color:rgba(255,255,255,0.78); text-decoration:none;
  margin-bottom:12px;
}
.footer-col a:hover{color:#fff; text-decoration:underline;}
.footer-bottom{
  display:flex; justify-content:space-between; align-items:center; gap:20px;
  padding-top:24px; padding-bottom:24px; font-size:12.5px; color:rgba(255,255,255,0.55); flex-wrap:wrap;
}
.footer-bottom a{text-decoration:none; color:rgba(255,255,255,0.55);}
.footer-bottom a:hover{color:#fff;}

/* ---------- Responsive ----------
   Sub-pages previously just hid their nav below 900px, leaving phones with no
   navigation at all beyond the logo. The homepage's slide-down menu is now the
   behaviour everywhere. */
@media (max-width: 980px){
  nav.main-nav{
    display:flex; flex-direction:column; align-items:stretch;
    position:absolute; top:100%; left:0; right:0;
    background:#fff; border-bottom:1px solid var(--line,rgba(49,58,116,0.16));
    padding:0 28px; gap:0;
    max-height:0; opacity:0; overflow:hidden;
    transition:max-height .38s cubic-bezier(.4,0,.2,1), opacity .28s ease, padding .38s cubic-bezier(.4,0,.2,1);
    pointer-events:none;
  }
  nav.main-nav.is-open{max-height:520px; opacity:1; padding:18px 28px 24px; pointer-events:auto;}
  nav.main-nav a{
    padding:11px 0; border-bottom:1px solid var(--line,rgba(49,58,116,0.16));
    opacity:0; transform:translateY(-6px);
    transition:opacity .3s ease, transform .3s ease;
  }
  nav.main-nav.is-open a{opacity:1; transform:translateY(0);}
  nav.main-nav a:nth-child(1){transition-delay:.04s;}
  nav.main-nav a:nth-child(2){transition-delay:.07s;}
  nav.main-nav a:nth-child(3){transition-delay:.10s;}
  nav.main-nav a:nth-child(4){transition-delay:.13s;}
  nav.main-nav a:nth-child(5){transition-delay:.16s;}
  nav.main-nav a:nth-child(6){transition-delay:.19s;}
  nav.main-nav a:nth-child(7){transition-delay:.22s; border-bottom:none;}
  nav.main-nav a:nth-child(8){transition-delay:.25s; border-bottom:none;}
  .mobile-toggle{display:block;}
  .header-ctas .btn{display:none;}
  .nav-mobile-only{
    display:block; text-align:center;
    font-family:var(--display); font-size:14.5px; letter-spacing:0.05em;
    padding:12px 18px; border:1.5px solid var(--navy,#313A74); border-radius:3px;
    margin-top:6px; color:var(--navy,#313A74);
  }
  .nav-mobile-only:last-child{background:var(--navy,#313A74); color:#fff;}
  .nav-mobile-only::after{display:none;}
}
@media (max-width: 900px){
  .footer-top{grid-template-columns:1fr 1fr; gap:32px;}
}
@media (max-width: 600px){
  /* padding-left/right, never the shorthand — `padding: 0 18px` would zero the
     vertical padding that .header-inner and .footer-* set, and the header would
     sit flush against the top of the screen. That bug shipped once already. */
  .wrap{padding-left:18px; padding-right:18px;}
  .footer-top{grid-template-columns:1fr;}
  .brand img{height:48px;}
}
