/* KARIGAR 1.25.5 — Header + CRM Controls
   Header-only presentation layer. Keeps the 1.25.4 storefront visual baseline intact. */
:root{
  --k255-header-bg:rgba(250,248,244,.985);
  --k255-header-ink:#201a16;
  --k255-header-muted:#6f655e;
  --k255-header-line:rgba(48,36,28,.08);
  --k255-header-hover:#eee6dc;
  --k255-header-accent:#174635;
}

.site-header-v3{background:var(--k255-header-bg);border-bottom:1px solid var(--k255-header-line)}
.bar-v3{max-width:1580px;min-height:92px;gap:1.8rem}
.brand-v3 img{width:202px}
.nav-v3{gap:1.45rem}
.nav-v3>a,.mega-nav>summary{font-size:.83rem;font-weight:700;padding:.72rem .78rem}

/* Professional, accessible icon system: SVGs are decorative; labels live on the controls. */
.utilities-v3{gap:.34rem}
.header-svg{width:21px;height:21px;display:block;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.header-search-v3{width:300px;height:48px;border:1px solid var(--k255-header-line);background:#fffdf9;box-shadow:0 4px 16px rgba(38,29,23,.025)}
.header-search-v3 input{font-size:.79rem;padding-left:1rem}
.header-search-v3 button{display:grid;place-items:center;color:#322a25}
.header-search-v3 button:hover{background:#f4ede5}
.header-icon,.profile-menu>summary{width:46px;min-width:46px;height:46px;min-height:46px;border:1px solid transparent;border-radius:14px;display:grid;place-items:center;align-content:center;background:transparent;color:var(--k255-header-ink);text-decoration:none;cursor:pointer;transition:background .18s ease,border-color .18s ease,transform .18s ease,color .18s ease;list-style:none}
.header-icon-button{font:inherit;padding:0}
.header-icon small,.profile-menu>summary small{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.header-icon:hover,.profile-menu>summary:hover,.profile-menu[open]>summary{background:var(--k255-header-hover);border-color:rgba(59,43,33,.06);color:var(--k255-header-accent);transform:translateY(-1px)}
.header-icon:focus-visible,.profile-menu>summary:focus-visible,.mega-nav>summary:focus-visible{outline:2px solid #1d5a43;outline-offset:3px}
.header-icon .cart-count{right:-1px;top:-2px;min-width:18px;height:18px;padding:0 4px;border:2px solid #faf8f4;background:#ad633d;font-size:.57rem;box-sizing:border-box}
.cart-link .header-svg{width:22px;height:22px}

/* Profile/customer-centre dropdown. No fake account login is implied. */
.profile-menu{position:relative}
.profile-menu>summary::-webkit-details-marker{display:none}
.profile-menu-panel{position:absolute;right:0;top:calc(100% + 12px);z-index:92;width:280px;padding:1rem;border:1px solid rgba(53,39,30,.09);border-radius:18px;background:rgba(253,250,246,.99);box-shadow:0 24px 70px rgba(36,27,21,.16);backdrop-filter:blur(18px)}
.profile-menu-panel:before{content:"";position:absolute;left:0;right:0;top:-14px;height:14px}
.profile-menu-panel .eyebrow{display:block;margin-bottom:.25rem;color:#9b6b4b}
.profile-menu-panel>strong{display:block;font:700 1.18rem/1.08 ui-serif,Georgia,serif;margin-bottom:.72rem;color:#231c18}
.profile-menu-panel a,.profile-menu-panel button{width:100%;display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:.72rem .75rem;border:0;border-radius:10px;background:transparent;color:#302824;text-decoration:none;text-align:left;font:650 .78rem/1.2 inherit;cursor:pointer}
.profile-menu-panel a:hover,.profile-menu-panel button:hover{background:#f1e8de;color:#174635}
.profile-menu-panel a span,.profile-menu-panel button span{color:#ad744f}

/* Mega menu: mouse-hover on desktop when CRM toggle is enabled; click/keyboard remains available. */
.mega-nav-panel{top:calc(100% + 10px)}
.mega-nav-panel:before{content:"";position:absolute;left:0;right:0;top:-12px;height:12px}
.mega-nav[data-hover-enabled="1"]>summary{position:relative}
.mega-nav[open]>summary{background:#eee5d9;color:#3f261c}

/* Floating WhatsApp is intentionally prominent but restrained. Admin/Sales still control visibility/number/message. */
.floating-whatsapp{right:1.15rem;bottom:1.25rem;min-height:48px;padding:.72rem 1rem;border:1px solid rgba(255,255,255,.22);box-shadow:0 18px 42px rgba(20,107,57,.28);transition:transform .2s ease,box-shadow .2s ease,background .2s ease}
.floating-whatsapp:hover{transform:translateY(-3px);box-shadow:0 22px 48px rgba(20,107,57,.34)}
.floating-whatsapp-pulse{animation:krg-wa-pulse 2.4s ease-out infinite}

/* Mobile drawer buttons should visually match links. */
.mobile-nav-panel>button{display:block;width:100%;border:0;background:transparent;text-align:left;font:inherit;color:inherit;padding:.72rem 0;cursor:pointer}

@media(max-width:1280px){
  .bar-v3{gap:1rem;padding-inline:1rem}
  .brand-v3 img{width:184px}
  .nav-v3{gap:.65rem}
  .header-search-v3{width:230px}
}

@media(max-width:1100px){
  .bar-v3{min-height:78px}
  .profile-menu{display:none}
  .header-icon:not(.cart-link){display:none}
  .header-search-v3{display:none}
  .floating-whatsapp{bottom:1rem;right:.8rem}
}

@media(max-width:760px){
  .bar-v3{min-height:70px}
  .brand-v3 img{width:154px}
  .cart-link{display:grid!important;width:42px;min-width:42px;height:42px;min-height:42px}
  .floating-whatsapp{width:50px;height:50px;min-height:50px;padding:0;display:grid;place-items:center;border-radius:50%}
  .floating-whatsapp svg{width:23px;height:23px}
  .floating-whatsapp>span:last-child{display:none}
}

@media(prefers-reduced-motion:reduce){
  .header-icon,.profile-menu>summary,.floating-whatsapp{transition:none}
  .header-icon:hover,.profile-menu>summary:hover,.floating-whatsapp:hover{transform:none}
  .floating-whatsapp-pulse{animation:none}
}
