/* ═══════════════════════════════════════════════════════════
   VAAZHA — header-redesign.css v3.11
   Loaded AFTER main.css and product-redesign.css
   Additive overrides only — never replaces main.css rules wholesale.
═══════════════════════════════════════════════════════════ */

/* ── Ticker: smoother infinite scroll — no jitter ──────── */
.vzh-ticker {
  /* Override the old animation target; we now animate the wrapper */
  animation: none;
  overflow: hidden;
  width: 100%;
}
.vzh-ticker-inner {
  display: inline-flex;          /* shrink-to-content so gap is predictable */
  white-space: nowrap;
  gap: 0;
  padding-right: 0;              /* padding will come from span margin */
  animation: vzh-ticker-scroll 32s linear infinite;
  will-change: transform;
}
/* JS appends a second clone; the two together fill >200% width
   so translateX(-50%) creates a seamless loop */
@keyframes vzh-ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.vzh-announce:hover .vzh-ticker-inner { animation-play-state: paused; }

/* ── Sticky header: shrink on scroll ───────────────────── */
.vzh-header {
  transition: height 0.28s ease, background 0.28s ease, box-shadow 0.28s ease;
}
/* CSS variable driven shrink — JS toggles .scrolled */
.vzh-header.scrolled {
  height: calc(var(--header-h) * 0.74 + var(--nav-h)); /* logo row shrinks ~26% */
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
}
.vzh-header.scrolled .vzh-logo img,
.vzh-header.scrolled .vzh-logo-img {
  height: 34px;     /* 48px → 34px */
  transition: height 0.28s ease;
}
.vzh-header.scrolled .vzh-logo-text {
  font-size: 22px;
  transition: font-size 0.28s ease;
}
.vzh-logo img,
.vzh-logo-img {
  transition: height 0.28s ease;
}
.vzh-logo-text {
  transition: font-size 0.28s ease;
}
/* Tighten inner padding on scroll */
.vzh-header.scrolled .vzh-header-inner {
  padding: 0 20px;
}

/* ── Cart count badge — red/lime, pulse on add ──────────── */
.vzh-cart-count {
  background: #c0392b;        /* red default */
  color: #ffffff;
  border: 2px solid #ffffff;  /* white ring so it pops on any bg */
  font-size: 9px;
  font-weight: 800;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: none;              /* JS shows when count > 0 */
  align-items: center;
  justify-content: center;
  line-height: 1;
  pointer-events: none;
}
.vzh-cart-count.pulse {
  animation: vzh-badge-pulse 0.5s cubic-bezier(0.36,0.07,0.19,0.97) both;
}
@keyframes vzh-badge-pulse {
  0%   { transform: scale(1); box-shadow: 0 0 0 0 rgba(192,57,43,0.7); }
  40%  { transform: scale(1.55); box-shadow: 0 0 0 6px rgba(192,57,43,0); }
  60%  { transform: scale(0.88); }
  80%  { transform: scale(1.2); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(192,57,43,0); }
}

/* ── Cart icon wrapper — needed for flyout positioning ──── */
.vzh-cart-wrap {
  position: relative;
  display: inline-flex;
}

/* ── Mini-cart flyout (desktop hover, ≥ 993 px) ─────────── */
.vzh-minicart {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  background: #ffffff;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}
/* Show on hover — both the wrap hover and the flyout itself */
.vzh-cart-wrap:hover .vzh-minicart,
.vzh-minicart:hover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
/* Arrow caret */
.vzh-minicart::before {
  content: '';
  position: absolute;
  top: -7px; right: 18px;
  width: 12px; height: 12px;
  background: #ffffff;
  border-left: 1px solid var(--clr-border);
  border-top: 1px solid var(--clr-border);
  transform: rotate(45deg);
}
.vzh-minicart-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--clr-border);
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--clr-forest);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.vzh-minicart-count-label {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--clr-muted);
  text-transform: none;
}
.vzh-minicart-items {
  max-height: 280px;
  overflow-y: auto;
  padding: 8px 0;
}
.vzh-minicart-item {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 10px;
  padding: 10px 16px;
  align-items: center;
}
.vzh-minicart-item + .vzh-minicart-item {
  border-top: 1px solid var(--clr-border);
}
.vzh-minicart-thumb {
  width: 60px;
  height: 70px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--clr-off);
  flex-shrink: 0;
}
.vzh-minicart-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.vzh-minicart-info { min-width: 0; }
.vzh-minicart-name {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--clr-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vzh-minicart-meta {
  font-size: 11px;
  color: var(--clr-muted);
  margin-top: 3px;
}
.vzh-minicart-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--clr-forest);
  white-space: nowrap;
}
.vzh-minicart-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--clr-muted);
  font-size: 13px;
}
.vzh-minicart-footer {
  padding: 12px 16px 14px;
  border-top: 1px solid var(--clr-border);
}
.vzh-minicart-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
}
.vzh-minicart-subtotal-label { color: var(--clr-muted); }
.vzh-minicart-subtotal-amount { color: var(--clr-forest); font-size: 15px; }
.vzh-minicart-actions {
  display: flex;
  gap: 8px;
}
.vzh-minicart-actions a {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.vzh-minicart-view-cart {
  background: var(--clr-off);
  color: var(--clr-dark);
  border: 1px solid var(--clr-border);
}
.vzh-minicart-view-cart:hover {
  background: var(--clr-dark);
  color: var(--clr-white);
}
.vzh-minicart-checkout {
  background: var(--clr-lime);
  color: var(--clr-dark);
}
.vzh-minicart-checkout:hover {
  background: var(--clr-lime-dark);
}
/* Loading state */
.vzh-minicart-loading {
  padding: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--clr-muted);
}

/* ── Mobile hamburger — animated X morph ───────────────── */
.vzh-mobile-toggle { display: none; position: relative; z-index: 1; }
.vzh-mobile-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--clr-text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
  transform-origin: center;
}
/* When nav is open, morph into X */
body.vzh-nav-open .vzh-mobile-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
body.vzh-nav-open .vzh-mobile-toggle span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
body.vzh-nav-open .vzh-mobile-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile nav drawer — brand-feel enhancements ───────── */
.vzh-mobile-nav {
  /* Keep left-slide from main.css; we just refine the interior */
  padding: 0;
  overflow-y: auto;
}
/* Brand header strip inside drawer */
.vzh-mobile-nav-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(200,245,90,0.15);
  position: sticky;
  top: 0;
  background: var(--clr-forest);
  z-index: 1;
}
.vzh-mobile-nav-brand-logo {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 4px;
  color: var(--clr-lime);
  text-decoration: none;
}
.vzh-mobile-nav-close {
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: rgba(255,255,255,0.7);
  font-size: 18px;
  transition: background 0.2s ease, color 0.2s ease;
  margin-bottom: 0; /* reset old margin */
}
.vzh-mobile-nav-close:hover {
  background: rgba(255,255,255,0.1);
  color: var(--clr-lime);
}
/* Links area */
.vzh-mobile-nav-links-wrap {
  padding: 12px 24px 20px;
  flex: 1;
}
/* Staggered entrance for each link */
.vzh-mobile-nav.open .vzh-mobile-links li,
.vzh-mobile-nav.open .vzh-mobile-links a {
  animation: vzh-slide-in 0.3s ease both;
}
.vzh-mobile-nav.open .vzh-mobile-links li:nth-child(1),
.vzh-mobile-nav.open .vzh-mobile-links a:nth-child(1) { animation-delay: 0.05s; }
.vzh-mobile-nav.open .vzh-mobile-links li:nth-child(2),
.vzh-mobile-nav.open .vzh-mobile-links a:nth-child(2) { animation-delay: 0.10s; }
.vzh-mobile-nav.open .vzh-mobile-links li:nth-child(3),
.vzh-mobile-nav.open .vzh-mobile-links a:nth-child(3) { animation-delay: 0.15s; }
.vzh-mobile-nav.open .vzh-mobile-links li:nth-child(4),
.vzh-mobile-nav.open .vzh-mobile-links a:nth-child(4) { animation-delay: 0.20s; }
.vzh-mobile-nav.open .vzh-mobile-links li:nth-child(5),
.vzh-mobile-nav.open .vzh-mobile-links a:nth-child(5) { animation-delay: 0.25s; }
.vzh-mobile-nav.open .vzh-mobile-links li:nth-child(6),
.vzh-mobile-nav.open .vzh-mobile-links a:nth-child(6) { animation-delay: 0.30s; }
@keyframes vzh-slide-in {
  from { opacity: 0; transform: translateX(-14px); }
  to   { opacity: 1; transform: none; }
}
/* Leaf accent in bottom-left of drawer */
.vzh-mobile-nav-leaf {
  position: absolute;
  bottom: 80px; right: -20px;
  opacity: 0.07;
  pointer-events: none;
}
/* Bottom utility row */
.vzh-mobile-nav-icons {
  padding: 16px 24px;
  border-top: 1px solid rgba(200,245,90,0.12);
  margin-top: auto;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.vzh-mobile-nav-icons a {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.8px;
  color: rgba(255,255,255,0.45);
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  text-transform: uppercase;
  transition: color 0.2s, border-color 0.2s;
}
.vzh-mobile-nav-icons a:hover {
  color: var(--clr-lime);
  border-color: var(--clr-lime);
}

/* ── Hide flyout on mobile ──────────────────────────────── */
@media (max-width: 992px) {
  .vzh-minicart { display: none !important; }
  .vzh-mobile-toggle { display: flex; flex-direction: column; gap: 5px; padding: 8px; }
}
