/*
Theme Name: MEGRA Complete Easy Theme
Theme URI: https://megradisplay.com.my
Author: AGY
Description: Complete self-contained 106-product catalog theme for MEGRA.
Version: 1.0.0
*/
/* MEGRA B2C Store — megra_web_agy_v1 Ultra-Luxury Design System */
:root {
  --carbon: #05070A;
  --panel: rgba(18, 24, 33, 0.65);
  --panel-border: rgba(255, 255, 255, 0.08);
  --panel-hover: rgba(26, 35, 50, 0.85);
  --gold: #D4AF37;
  --gold-glow: rgba(212, 175, 55, 0.2);
  --status: #3DDC84;
  --text-hi: #FFFFFF;
  --text-lo: #94A3B8;
  --font-display: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --pad-section: 96px;
  --max: 1280px;
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--carbon);
  color: var(--text-hi);
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* Subtle Agency Noise Grain Overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.03;
  pointer-events: none;
  z-index: 999;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; background: transparent; border: 0; }
button { cursor: pointer; }

.mono { font-family: var(--font-mono); }
.container {
  width: min(100% - 48px, var(--max));
  margin-inline: auto;
}

.eyebrow {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--gold);
  margin: 0 0 16px;
  display: inline-block;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(5, 7, 10, 0.85);
  border-bottom: 1px solid var(--panel-border);
  backdrop-filter: blur(16px);
}
.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-logo-img {
  height: 32px;
  width: auto;
  display: block;
}

.header-search {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  border-radius: 30px;
  padding: 8px 18px;
  width: 280px;
  transition: all 0.25s;
}
.header-search:focus-within {
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 15px var(--gold-glow);
}
.header-search input {
  width: 100%;
  font-size: 0.85rem;
  color: var(--text-hi);
  outline: none;
}
.header-search input::placeholder {
  color: var(--text-lo);
}

.nav-desktop {
  display: flex;
  gap: 32px;
  align-items: center;
}
.nav-desktop a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-lo);
  transition: color 0.2s;
  letter-spacing: 0.02em;
}
.nav-desktop a:hover, .nav-desktop a.active {
  color: var(--text-hi);
}

.btn-whatsapp-nav {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #000;
  background: var(--status);
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 600;
  transition: all 0.25s;
  box-shadow: 0 0 20px rgba(61, 220, 132, 0.25);
}
.btn-whatsapp-nav:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(61, 220, 132, 0.45);
}

/* 3D Hero Stage */
.hero-stage {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--panel-border);
  background: radial-gradient(circle at 50% 30%, rgba(212, 175, 55, 0.06) 0%, transparent 65%);
}

#three-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 20px;
}
.hero-content h1 {
  font-size: clamp(2.8rem, 6.5vw, 4.8rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  background: linear-gradient(180deg, #FFFFFF 0%, #A0AEC0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-content p {
  font-size: 1.2rem;
  color: var(--text-lo);
  margin-bottom: 36px;
  max-width: 680px;
  margin-inline: auto;
}

/* Category Portals Grid */
.section { padding: var(--pad-section) 0; }
.section-title {
  font-size: 2.2rem;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.section-sub {
  color: var(--text-lo);
  margin-bottom: 48px;
  font-size: 1.05rem;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

/* Double-Bezel Hardware Card Architecture */
.portal-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 36px 28px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 320px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.portal-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: 0 15px 40px var(--gold-glow), inset 0 1px 1px rgba(212, 175, 55, 0.3);
}

.portal-icon {
  font-size: 2.8rem;
  margin-bottom: 20px;
}
.portal-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.portal-desc {
  font-size: 0.92rem;
  color: var(--text-lo);
  margin-bottom: 28px;
  line-height: 1.5;
}

/* Floating Specs Panel on Hover */
.specs-hover-panel {
  position: absolute;
  inset: 0;
  background: rgba(12, 16, 23, 0.97);
  backdrop-filter: blur(12px);
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  border-radius: 16px;
  border: 1px solid var(--gold);
}
.portal-card:hover .specs-hover-panel {
  opacity: 1;
  pointer-events: auto;
}
.specs-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--gold);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.portal-link {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

/* About Brand Section */
.about-section {
  background: rgba(18, 24, 33, 0.4);
  border-y: 1px solid var(--panel-border);
  padding: 100px 0;
}
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
}

.pillars-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.pillar-item {
  background: rgba(10, 12, 16, 0.8);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 20px 24px;
  transition: border-color 0.2s;
}
.pillar-item:hover {
  border-color: var(--gold);
}
.pillar-title {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--gold);
  margin-bottom: 6px;
  font-weight: 500;
}

/* Footer */
.site-footer {
  background: #030406;
  border-top: 1px solid var(--panel-border);
  padding: 80px 0 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* High-End Location Card */
.location-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
  transition: border-color 0.25s;
}
.location-card:hover {
  border-color: var(--gold);
}
.location-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.location-address {
  font-size: 0.9rem;
  color: var(--text-hi);
  line-height: 1.5;
  margin-bottom: 12px;
}
.location-maps-link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.social-links {
  display: flex;
  gap: 20px;
  margin-top: 16px;
}
.social-links a {
  color: var(--text-lo);
  font-size: 0.9rem;
  transition: color 0.2s;
}
.social-links a:hover {
  color: var(--gold);
}

/* Animated Radar Sweep Button */
.radar-pulse-dot {
  width: 6px;
  height: 6px;
  background: var(--status);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px var(--status);
  animation: pulseDot 1.5s infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.radar-sweep-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: rgba(10, 12, 16, 0.9);
  border: 1px solid var(--panel-border);
  padding: 10px 16px;
  border-radius: 30px;
  margin-top: 12px;
  transition: all 0.25s ease;
}
.radar-sweep-btn:hover {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.08);
  box-shadow: 0 0 20px var(--gold-glow);
}

.radar-circle-widget {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  position: relative;
  overflow: hidden;
  background: rgba(212, 175, 55, 0.05);
  flex-shrink: 0;
}
.radar-sweep-beam {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(212, 175, 55, 0.5) 0deg, transparent 60deg, transparent 360deg);
  animation: rotateRadar 2s linear infinite;
}
@keyframes rotateRadar {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.radar-target-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  background: var(--gold);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 6px var(--gold);
}

/* Fixed Bottom-Right MEGRA Product Brand Watermark */
.megra-fixed-watermark {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 990;
  opacity: 0.85;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.megra-fixed-watermark img {
  height: 26px;
  width: auto;
  filter: drop-shadow(0 2px 12px rgba(0,0,0,0.9));
}
.megra-fixed-watermark:hover {
  opacity: 1;
}
