/* ═══════════════════════════════════════════════
   zenrug-ui.css  —  Global UI / UX enhancements
   ═══════════════════════════════════════════════ */

/* ── Global overflow fix (prevents right-side white space on iOS) ── */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

/* ── Scroll progress bar ── */
#zrProgress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, #E8681A, #f59e0b);
  z-index: 10000;
  width: 0;
  transition: width .08s linear;
  pointer-events: none;
  border-radius: 0 3px 3px 0;
}

/* ── Navbar enhancements ── */
.navbar.scrolled {
  box-shadow: 0 4px 24px rgba(0,0,0,.1) !important;
}

/* ── Back to top button ── */
.back-top {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 46px;
  height: 46px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 50%;
  display: flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.9);
  transition: opacity .3s ease, visibility .3s ease, transform .3s ease, background .25s ease, box-shadow .25s ease;
  box-shadow: 0 4px 14px rgba(0,0,0,.22);
}
.back-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.back-top:hover {
  background: #E8681A;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 24px rgba(232,104,26,.42);
}

/* ── WhatsApp button enhancements ── */
.whatsapp-btn {
  position: fixed !important;
  overflow: visible !important;
}

/* Ping dot */
.wa-ping {
  position: absolute;
  top: -1px; right: -1px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #ff4757;
  border: 2px solid #fff;
  animation: waPingDot 2.8s ease-in-out infinite;
}
.wa-ping::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(255,71,87,.38);
  animation: waPingRipple 2.8s ease-in-out infinite;
}
@keyframes waPingDot {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.25); }
}
@keyframes waPingRipple {
  0%   { transform: scale(.6); opacity: .7; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* Tooltip */
.whatsapp-btn::before {
  content: 'Chat with us!';
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%) translateX(10px);
  background: #1a1a1a;
  color: #fff;
  font-size: .76rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
  padding: 7px 13px;
  border-radius: 8px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .22s ease, transform .22s ease;
}
.whatsapp-btn::after {
  content: '';
  position: absolute;
  right: calc(100% + 5px);
  top: 50%;
  transform: translateY(-50%) translateX(10px);
  border: 6px solid transparent;
  border-left-color: #1a1a1a;
  pointer-events: none;
  opacity: 0;
  transition: opacity .22s ease, transform .22s ease;
}
.whatsapp-btn:hover::before,
.whatsapp-btn:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* ── Cookie banner ── */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #111;
  color: rgba(255,255,255,.82);
  padding: 18px 28px;
  z-index: 1400;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  transform: translateY(100%);
  transition: transform .4s cubic-bezier(.4,0,.2,1);
  border-top: 2px solid #E8681A;
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner p {
  font-size: .875rem;
  font-family: 'Inter', sans-serif;
  line-height: 1.55;
  max-width: 700px;
}
.cookie-banner a { color: #E8681A; text-decoration: underline; }
.cookie-banner-btns { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-accept {
  padding: 10px 24px;
  background: #E8681A; color: #fff;
  border: none; border-radius: 50px;
  font-weight: 700; font-size: .875rem;
  cursor: pointer; font-family: 'Inter', sans-serif;
  transition: background .2s;
  white-space: nowrap;
}
.cookie-accept:hover { background: #c4571a; }
.cookie-deny {
  padding: 10px 22px;
  background: transparent;
  color: rgba(255,255,255,.6);
  border: 1.5px solid rgba(255,255,255,.2);
  border-radius: 50px;
  font-weight: 600; font-size: .875rem;
  cursor: pointer; font-family: 'Inter', sans-serif;
  transition: all .2s;
  white-space: nowrap;
}
.cookie-deny:hover { border-color: rgba(255,255,255,.5); color: #fff; }

/* ── Mobile menu backdrop ── */
.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.46);
  z-index: 997;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility .35s ease;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.nav-backdrop.show { opacity: 1; visibility: visible; }
body.menu-open { overflow: hidden; }

/* ── Fade variants ── */
.fade-up {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .72s ease, transform .72s ease;
}
.fade-left {
  opacity: 0;
  transform: translateX(-32px);
  transition: opacity .72s ease, transform .72s ease;
}
.fade-right {
  opacity: 0;
  transform: translateX(32px);
  transition: opacity .72s ease, transform .72s ease;
}
.fade-scale {
  opacity: 0;
  transform: scale(.93);
  transition: opacity .72s ease, transform .72s ease;
}
.fade-up.visible,
.fade-left.visible,
.fade-right.visible,
.fade-scale.visible {
  opacity: 1;
  transform: none;
}

/* ── Stagger grid ── */
.stagger-grid > * {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .55s ease, transform .55s ease;
}
.stagger-grid > *.stagger-vis {
  opacity: 1;
  transform: translateY(0);
}

/* ── Enhanced product card hover (global) ── */
.product-card {
  will-change: transform;
}

/* ── Smooth page load ── */
@keyframes zrPageIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.page-enter {
  animation: zrPageIn .45s ease forwards;
}

/* ── Responsive ── */
@media (max-width: 968px) {
  section { padding: 64px 0; }
  .container { padding: 0 20px; }
  .section-head { margin-bottom: 44px; }
  .section-head h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
  .section-head p { font-size: .95rem; }
}
@media (max-width: 600px) {
  section { padding: 48px 0; }
  .container { padding: 0 16px; }
  .section-head h2 { font-size: 1.5rem; }
  .btn { padding: 13px 22px; font-size: .88rem; }
  .cookie-banner {
    flex-direction: column;
    text-align: center;
    padding: 18px 16px;
  }
  .cookie-banner-btns { width: 100%; justify-content: center; }
  .back-top { bottom: 88px; right: 16px; }
  .whatsapp-btn::before, .whatsapp-btn::after { display: none; }
}
