.footer-wrap { background: var(--surface); border-top: 1px solid var(--border); }
html.dark .footer-wrap { background: #070e1a; border-top-color: rgba(255, 255, 255, .07); }
html.dark .foot-divider { background: rgba(255, 255, 255, .07); }

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1px auto 1px 1fr;
  align-items: center;
  gap: var(--sp-6);
  padding: 28px 0;
}

/* Brand */
.foot-brand { display: flex; align-items: center; gap: 12px; }
.foot-brand img { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); }
.foot-brand-text b { font-family: var(--font-display); font-size: 15px; display: block; color: var(--text); }
.foot-brand-text span { font-size: 12px; color: var(--text-muted); display: block; }
.foot-copy { font-size: 11px; color: var(--text-dim); margin-top: 4px; }
.foot-divider { height: 40px; background: var(--border); width: 1px; }

/* Social */
.social-links-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.social-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  position: relative;
  text-decoration: none;
}
.social-icon:hover { background: var(--surface-3); }
.social-icon[data-platform="whatsapp"]:hover { background: #25d366; border-color: #25d366; color: #fff; }
.social-icon[data-platform="instagram"]:hover { background: #e1306c; border-color: #e1306c; color: #fff; }
.social-icon[data-platform="tiktok"]:hover { background: #010101; border-color: #010101; color: #fff; }
.social-icon[data-platform="facebook"]:hover { background: #1877f2; border-color: #1877f2; color: #fff; }

/* QR Popups (Desktop Only) */
.qr-popup, .bot-qr-popup {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: 136px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto; /* allow hover */
}
/* Invisible bridge to prevent hover loss */
.qr-popup::after, .bot-qr-popup::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 12px;
}
html.dark .qr-popup, html.dark .bot-qr-popup {
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.social-icon:hover .qr-popup,
.bot-card:hover .bot-qr-popup,
.qr-popup:hover,
.bot-qr-popup:hover {
  opacity: 1;
  visibility: visible;
   
}
.qr-canvas {
  background: #fff; border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.qr-canvas canvas, .qr-canvas img {
  margin: 0;
  display: block;
  max-width: 100%;
}

.qr-label { font-size: 11px; font-weight: 700; color: var(--text); margin-top: 6px; white-space: nowrap; }

/* Bot Card */
.foot-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.bot-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  text-decoration: none;
  transition: all .2s;
  position: relative;
}
.bot-card:hover { border-color: var(--blue-300); }
.bot-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--blue-pale);
  color: var(--blue-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.bot-card-title { font-size: 14px; font-weight: 800; color: var(--text); }
.bot-card-sub { font-size: 11px; color: var(--text-muted); }
.bot-card-btn { font-size: 12px; font-weight: 800; color: var(--blue-600); margin-right: auto; }
.bot-qr-label { font-size: 12px; font-weight: 800; color: var(--text); margin-top: 8px; white-space: nowrap; }
.bot-qr-sub { font-size: 10px; color: var(--text-muted); white-space: nowrap; }

/* WhatsApp Floating */
.wa {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 24px;
  z-index: 80;
  box-shadow: 0 4px 16px rgba(37, 211, 102, .35), 0 2px 6px rgba(0, 0, 0, .08);
  transition: var(--trans);
}
.wa:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(37, 211, 102, .5);
}

@media(max-width:1080px) {
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .foot-divider { display: none; }
  .foot-brand, .social-links-wrap, .foot-right { justify-content: center; }
}

@media(max-width:768px) {
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .wa {
    bottom: calc(80px + env(safe-area-inset-bottom));
    left: 16px;
    width: 52px;
    height: 52px;
    font-size: 24px;
  }
  
  .footer-wrap { padding: 0; overflow: hidden; }
  .footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 32px 20px 100px; /* Extra padding at bottom to prevent floating WA button from covering content */
    width: 100%;
    box-sizing: border-box;
  }
  
  .foot-brand {
    flex-direction: column;
    gap: 16px;
    justify-content: center;
  }
  .foot-brand img {
    width: 50px;
    height: 50px;
    border-radius: 12px;
  }
  .foot-brand-text { 
    text-align: center; 
  }
  
  .social-links-wrap {
    justify-content: center;
  }
  .social-icon { width: 44px; height: 44px; font-size: 18px; }
  .qr-popup, .bot-qr-popup { display: none; }
  
  .foot-right { 
    justify-content: center; 
    width: 100%; 
  }
  .bot-card { 
    width: 100%; 
    max-width: 320px; 
    padding: 14px 18px; 
  }
}






