/* ============================================
   MobileLux – Premium Mobile Shop Stylesheet
   ============================================ */

:root {
  --primary: #2F2FE4;
  --primary-dark: #162E93;
  --secondary: #1A1953;
  --accent: #2F2FE4;
  --dark: #080616;
  --bg: #f5f6ff;
  --bg2: #ffffff;
  --card-bg: #ffffff;
  --text: #080616;
  --text-muted: #5a5f85;
  --border: #dfe2f2;
  --shadow: 0 4px 24px rgba(47,47,228,0.10);
  --shadow-lg: 0 8px 48px rgba(47,47,228,0.22);
  --radius: 16px;
  --radius-sm: 8px;
  --transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
  --gradient: linear-gradient(135deg, #2F2FE4 0%, #162E93 50%, #1A1953 100%);
  --gradient2: linear-gradient(135deg, #162E93 0%, #1A1953 100%);
  --gradient-dark: linear-gradient(135deg, #1A1953 0%, #080616 100%);
  --navbar-h: 70px;
}

[data-theme="dark"] {
  --bg: #080616;
  --bg2: #0d0a24;
  --card-bg: #1A1953;
  --text: #f1f5f9;
  --text-muted: #a5aacb;
  --border: #2a2870;
  --shadow: 0 4px 24px rgba(8,6,22,0.6);
  --shadow-lg: 0 8px 48px rgba(8,6,22,0.8);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background 0.4s, color 0.4s;
  overflow-x: hidden;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ── Custom Cursor ── */
.cursor {
  width: 10px; height: 10px;
  background: var(--primary);
  border-radius: 50%;
  position: fixed; pointer-events: none; z-index: 9999;
  transform: translate(-50%,-50%);
  transition: transform 0.1s;
}
.cursor-follower {
  width: 32px; height: 32px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  position: fixed; pointer-events: none; z-index: 9998;
  transform: translate(-50%,-50%);
  transition: transform 0.18s ease, opacity 0.3s;
  opacity: 0.6;
}
@media (max-width: 768px) { .cursor, .cursor-follower { display: none; } }

/* ── Preloader ── */
#preloader {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 20px;
}
.loader-ring {
  width: 60px; height: 60px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
#preloader p {
  font-size: 1.5rem; font-weight: 800;
  background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ── Container ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ── AOS Animations ── */
[data-aos] { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
[data-aos].aos-animate { opacity: 1; transform: translateY(0); }
[data-aos="fade-right"] { transform: translateX(-40px); }
[data-aos="fade-right"].aos-animate { transform: translateX(0); }
[data-aos="fade-left"] { transform: translateX(40px); }
[data-aos="fade-left"].aos-animate { transform: translateX(0); }
[data-aos="zoom-in"] { transform: scale(0.85); }
[data-aos="zoom-in"].aos-animate { transform: scale(1); }
[data-aos="zoom-in"][data-delay="100"] { transition-delay: 0.1s; }
[data-aos="zoom-in"][data-delay="200"] { transition-delay: 0.2s; }
[data-aos="zoom-in"][data-delay="300"] { transition-delay: 0.3s; }
[data-aos="zoom-in"][data-delay="400"] { transition-delay: 0.4s; }
[data-aos="zoom-in"][data-delay="500"] { transition-delay: 0.5s; }
[data-aos="fade-up"][data-delay="100"] { transition-delay: 0.1s; }
[data-aos="fade-up"][data-delay="200"] { transition-delay: 0.2s; }
[data-aos="fade-up"][data-delay="300"] { transition-delay: 0.3s; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 50px;
  font-size: 0.95rem; font-weight: 600;
  cursor: pointer; border: none; text-decoration: none;
  transition: var(--transition); position: relative; overflow: hidden;
}
.btn::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(255,255,255,0.15);
  opacity: 0; transition: opacity 0.3s;
}
.btn:hover::after { opacity: 1; }
.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 20px rgba(47,47,228,0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(47,47,228,0.55); }
.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.w-full { width: 100%; justify-content: center; }

/* ── Gradient Text ── */
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* ── Section Titles ── */
.section-title { font-size: 2.2rem; font-weight: 800; margin-bottom: 8px; }
.section-subtitle { color: var(--text-muted); margin-bottom: 40px; font-size: 1rem; }

/* ── Top Bar ── */
.top-bar {
  background: var(--gradient);
  color: #fff; font-size: 0.8rem; padding: 8px 0;
}
.top-bar .container {
  display: flex; justify-content: space-between;
  align-items: center; gap: 16px; flex-wrap: wrap;
}
.top-bar span { display: flex; align-items: center; gap: 6px; }

/* ── Navbar ── */
.navbar {
  position: sticky; top: 0; z-index: 1000;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.navbar.scrolled {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
}
[data-theme="dark"] .navbar.scrolled { background: rgba(15,15,26,0.92); }
.nav-inner {
  display: flex; align-items: center;
  justify-content: space-between; height: var(--navbar-h);
}
.logo {
  font-size: 1.4rem; font-weight: 900;
  text-decoration: none;
  background: var(--gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  display: flex; align-items: center; gap: 8px;
}
.nav-links {
  display: flex; list-style: none; gap: 4px;
  align-items: center;
}
.nav-links > li { position: static; }
.navbar { position: sticky; }
.nav-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 16px; border-radius: 50px;
  text-decoration: none; color: var(--text);
  font-size: 0.9rem; font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
}
.nav-link:hover, .nav-link.active {
  background: var(--primary); color: #fff;
}
.mega-caret {
  font-size: 0.65rem;
  transition: transform 0.3s;
  opacity: 0.7;
}
.has-mega:hover .mega-caret { transform: rotate(180deg); }
.has-mega:hover > .nav-link { background: var(--primary); color: #fff; }

.hot-link { position: relative; }
.hot-pill {
  background: linear-gradient(135deg, #ff3b5c, #ff6b4e);
  color: #fff;
  font-size: 0.6rem; font-weight: 800;
  padding: 2px 7px; border-radius: 50px;
  margin-left: 4px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(255,59,92,0.4);
  animation: hotPulse 2s ease-in-out infinite;
}
@keyframes hotPulse {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* ══════════════════════════════════════════ */
/*   MEGA MENU                                */
/* ══════════════════════════════════════════ */
.mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: min(1120px, 95vw);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(8,6,22,0.18);
  padding: 28px;
  margin-top: 14px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, transform 0.3s cubic-bezier(0.4,0,0.2,1), visibility 0.25s;
  z-index: 999;
}
.mega-menu.mega-small { width: min(820px, 95vw); }

/* Invisible hover bridge so cursor can travel from trigger to panel */
.mega-menu::before {
  content: "";
  position: absolute;
  top: -24px; left: 0; right: 0;
  height: 24px;
}

.has-mega:hover .mega-menu,
.has-mega.open .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Top accent line animation */
.mega-menu::after {
  content: "";
  position: absolute;
  top: 0; left: 10%;
  width: 80%; height: 3px;
  background: var(--gradient);
  border-radius: 3px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
}
.has-mega:hover .mega-menu::after,
.has-mega.open .mega-menu::after {
  transform: scaleX(1);
}

.mega-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1.3fr 1fr;
  gap: 30px;
}
.mega-small .mega-inner {
  grid-template-columns: 1fr 1fr 1fr 1fr;
}

.mega-col h4.mega-title {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--primary);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  position: relative;
}
.mega-col h4.mega-title::before {
  content: "";
  position: absolute;
  bottom: -2px; left: 0;
  width: 30px; height: 2px;
  background: var(--gradient);
  border-radius: 2px;
}

.mega-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mega-list li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin: 0 -12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.25s;
  position: relative;
}
.mega-list li a i,
.mega-list li a .mega-b {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  font-size: 0.88rem;
  font-weight: 800;
  transition: all 0.25s;
  flex-shrink: 0;
}
.mega-list li a .mega-sub {
  margin-left: auto;
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
  opacity: 0.75;
}
.mega-list li a:hover {
  background: var(--bg);
  color: var(--primary);
  padding-left: 18px;
}
.mega-list li a:hover i,
.mega-list li a:hover .mega-b {
  background: var(--primary);
  color: #fff;
  transform: scale(1.05);
}

/* Featured product cards */
.mega-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mega-feat-card {
  display: flex;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.mega-feat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.3s;
}
.mega-feat-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: 0 12px 30px rgba(47,47,228,0.22);
}
.mega-feat-card img {
  width: 72px; height: 72px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.mega-feat-body {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mega-feat-body strong {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mega-feat-body small {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.mega-feat-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 50px;
  background: var(--primary);
  color: #fff;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.mega-feat-tag.hot {
  background: linear-gradient(135deg, #ff3b5c, #ff6b4e);
}
.mega-feat-price {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--primary);
  margin-top: 2px;
}

/* Promo card */
.mega-promo {
  display: flex;
  align-items: stretch;
}
.mega-promo-card {
  position: relative;
  width: 100%;
  background: linear-gradient(135deg, #080616 0%, #1A1953 50%, #2F2FE4 100%);
  color: #fff;
  padding: 24px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  min-height: 260px;
}
.mega-promo-card.small { min-height: 200px; padding: 20px; }
.mega-promo-card::before {
  content: "";
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47,47,228,0.6) 0%, transparent 70%);
  animation: promoPulse 4s ease-in-out infinite;
}
@keyframes promoPulse {
  0%,100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
}
.mega-promo-badge {
  display: inline-block;
  align-self: flex-start;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 50px;
  position: relative;
  z-index: 1;
}
.mega-promo-card h3 {
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1.1;
  position: relative;
  z-index: 1;
}
.mega-promo-card h3 span {
  background: linear-gradient(135deg, #fff, #a0a0ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 2.2rem;
}
.mega-promo-card p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.5;
  position: relative;
  z-index: 1;
}
.mega-promo-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: #2F2FE4;
  padding: 10px 18px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  align-self: flex-start;
  transition: all 0.3s;
  position: relative;
  z-index: 1;
}
.mega-promo-btn:hover {
  background: #2F2FE4;
  color: #fff;
  transform: translateX(4px);
}
.mega-promo-btn i { transition: transform 0.3s; }
.mega-promo-btn:hover i { transform: translateX(3px); }
.mega-promo-glow {
  position: absolute;
  bottom: -30px; left: -30px;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47,47,228,0.5), transparent 70%);
  filter: blur(15px);
}

/* ── Brands Grid mega ─────────────────────── */
.mega-brands-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.mega-brand-card {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  background: var(--bg);
  transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
}
.mega-brand-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 16px 40px rgba(47,47,228,0.25);
}
.mbc-img {
  height: 110px;
  overflow: hidden;
  position: relative;
}
.mbc-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(8,6,22,0.4) 100%);
}
.mbc-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.45s;
}
.mega-brand-card:hover .mbc-img img { transform: scale(1.08); }
.mbc-body {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--bg2);
}
.mbc-body i,
.mbc-body .mbc-logo {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--gradient);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  font-weight: 800;
  flex-shrink: 0;
}
.mbc-body strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
}
.mbc-body small {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ── Dark mode tweaks ─────────────────────── */
[data-theme="dark"] .mega-menu {
  background: var(--bg2);
  border-color: var(--border);
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
}
[data-theme="dark"] .mega-list li a i,
[data-theme="dark"] .mega-list li a .mega-b,
[data-theme="dark"] .mega-feat-card { background: var(--card-bg); }
.nav-actions {
  display: flex; align-items: center; gap: 4px; position: relative;
}
.icon-btn {
  background: none; border: none; cursor: pointer;
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text); font-size: 1rem; position: relative;
  transition: var(--transition);
}
.icon-btn:hover { background: var(--bg); color: var(--primary); }
.badge {
  position: absolute; top: 4px; right: 4px;
  background: var(--secondary); color: #fff;
  font-size: 0.65rem; font-weight: 700;
  width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.hamburger {
  display: none; background: none; border: none;
  cursor: pointer; font-size: 1.2rem; color: var(--text);
}

/* ── Nav Auth ──────────────────────────────── */
.nav-login-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--gradient); color: #fff;
  padding: 7px 16px; border-radius: 50px;
  font-size: 0.82rem; font-weight: 600;
  text-decoration: none; transition: var(--transition);
  white-space: nowrap;
}
.nav-login-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.nav-user { position: relative; }
.nav-user-btn {
  display: flex; align-items: center; gap: 7px;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: 50px; padding: 4px 12px 4px 4px;
  cursor: pointer; transition: var(--transition); color: var(--text);
}
.nav-user-btn:hover { border-color: var(--primary); background: var(--bg2); }
.nav-user-btn img {
  width: 30px; height: 30px; border-radius: 50%; object-fit: cover;
}
.nav-user-btn span { font-size: 0.82rem; font-weight: 600; }
.nav-user-btn i { font-size: 0.7rem; color: var(--text-muted); transition: var(--transition); }
.nav-user-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); min-width: 220px;
  box-shadow: var(--shadow-lg); padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: var(--transition); z-index: 2000;
}
.nav-user-dropdown.open {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dp-header {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 6px 10px;
}
.dp-header img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.dp-header strong { display: block; font-size: 0.88rem; color: var(--text); }
.dp-header small { font-size: 0.75rem; color: var(--text-muted); }
.dp-divider { height: 1px; background: var(--border); margin: 4px 0; }
.dp-item {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 9px 10px; border-radius: var(--radius-sm);
  font-size: 0.84rem; color: var(--text); text-decoration: none;
  cursor: pointer; background: none; border: none; text-align: left;
  transition: var(--transition);
}
.dp-item:hover { background: var(--bg); color: var(--primary); }
.dp-item i { width: 16px; text-align: center; color: var(--text-muted); }
.dp-item:hover i { color: var(--primary); }
.dp-admin { color: var(--primary); font-weight: 600; }
.dp-logout { color: #ef4444; }
.dp-logout i { color: #ef4444; }
.dp-logout:hover { background: #fef2f2; color: #dc2626; }

.search-bar {
  display: none; padding: 12px 0;
  border-top: 1px solid var(--border);
  background: var(--bg2);
  animation: slideDown 0.3s ease;
}
.search-bar.open { display: block; }
.search-bar .container { display: flex; gap: 10px; }
.search-bar input {
  flex: 1; padding: 10px 18px; border-radius: 50px;
  border: 2px solid var(--border); background: var(--bg);
  color: var(--text); font-size: 0.95rem; outline: none;
  transition: var(--transition);
}
.search-bar input:focus { border-color: var(--primary); }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* ── Hero ── */
/* ── Hero (Redesigned) ─────────────────────── */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  position: relative; overflow: hidden;
  padding: 100px 0 60px;
  background: linear-gradient(135deg, #080616 0%, #1A1953 45%, #162E93 100%);
  color: #fff;
}

/* Animated blobs */
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 15% 20%, rgba(47,47,228,0.5) 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(47,47,228,0.35) 0%, transparent 45%),
    radial-gradient(circle at 60% 10%, rgba(22,46,147,0.6) 0%, transparent 50%);
  animation: heroBgPulse 14s ease-in-out infinite;
}
@keyframes heroBgPulse {
  0%,100% { opacity: 0.9; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

/* Animated grid overlay */
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(47,47,228,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47,47,228,0.08) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  pointer-events: none;
  animation: gridShift 20s linear infinite;
}
@keyframes gridShift {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 50px 50px, 50px 50px; }
}

/* Floating orbs */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.6;
  pointer-events: none;
  animation: orbFloat 12s ease-in-out infinite;
}
.hero-orb.o1 { width: 380px; height: 380px; background: #2F2FE4; top: -100px; left: -100px; }
.hero-orb.o2 { width: 300px; height: 300px; background: #162E93; bottom: -80px; right: 10%; animation-delay: -6s; }
.hero-orb.o3 { width: 220px; height: 220px; background: #2F2FE4; top: 30%; right: -80px; animation-delay: -3s; opacity: 0.4; }
@keyframes orbFloat {
  0%,100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(40px,-30px) scale(1.1); }
  66% { transform: translate(-30px,40px) scale(0.9); }
}

.hero-particles { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.particle {
  position: absolute; border-radius: 50%;
  background: #2F2FE4; opacity: 0.5;
  box-shadow: 0 0 10px #2F2FE4;
  animation: floatParticle linear infinite;
}
@keyframes floatParticle {
  0% { transform: translateY(0) rotate(0deg); opacity: 0.5; }
  100% { transform: translateY(-120vh) rotate(720deg); opacity: 0; }
}

.hero-content {
  display: grid; grid-template-columns: 1.05fr 1fr;
  align-items: center; gap: 60px;
  position: relative; z-index: 2;
}

/* Top row of badges */
.hero-badges-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 24px; flex-wrap: wrap;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(47,47,228,0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff; padding: 8px 16px; border-radius: 50px;
  font-size: 0.78rem; font-weight: 600;
  border: 1px solid rgba(47,47,228,0.4);
  letter-spacing: 0.4px;
}
.hero-badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #2F2FE4; box-shadow: 0 0 10px #2F2FE4;
  animation: pulseDot 1.8s ease-in-out infinite;
}
@keyframes pulseDot {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}
.hero-rating {
  display: inline-flex; align-items: center; gap: 6px;
  color: #fff; font-size: 0.78rem; font-weight: 600;
}
.hero-rating i { color: #FFC83A; font-size: 0.72rem; }
.hero-rating span { color: rgba(255,255,255,0.7); margin-left: 4px; }

.hero-text h1 {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 900; line-height: 1.05;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
  color: #fff;
}
.hero-text h1 .gradient-text {
  background: linear-gradient(135deg, #2F2FE4 0%, #a0a0ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-text h1 .hero-word {
  display: inline-block;
  animation: heroWordIn 0.8s cubic-bezier(0.4,0,0.2,1) both;
}
.hero-text h1 .hero-word:nth-child(1) { animation-delay: 0.1s; }
.hero-text h1 .hero-word:nth-child(2) { animation-delay: 0.2s; }
.hero-text h1 .hero-word:nth-child(3) { animation-delay: 0.3s; }
.hero-text h1 .hero-word:nth-child(4) { animation-delay: 0.4s; }
.hero-text h1 .hero-word:nth-child(5) { animation-delay: 0.5s; }
@keyframes heroWordIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-text p {
  color: rgba(255,255,255,0.75); font-size: 1.08rem;
  line-height: 1.7; margin-bottom: 36px; max-width: 520px;
}

.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-btns .btn-primary {
  background: #2F2FE4;
  color: #fff;
  box-shadow: 0 10px 40px rgba(47,47,228,0.5);
}
.hero-btns .btn-primary:hover {
  background: #fff;
  color: #162E93;
  transform: translateY(-3px);
  box-shadow: 0 14px 50px rgba(47,47,228,0.7);
}
.hero-btns .btn-outline {
  border: 2px solid rgba(255,255,255,0.3);
  color: #fff;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(10px);
}
.hero-btns .btn-outline:hover {
  border-color: #2F2FE4;
  background: rgba(47,47,228,0.2);
  color: #fff;
}

/* Trust indicators */
.hero-trust {
  display: flex; align-items: center; gap: 18px;
  margin-bottom: 40px; flex-wrap: wrap;
}
.hero-trust-avatars {
  display: flex;
}
.hero-trust-avatars img {
  width: 38px; height: 38px; border-radius: 50%;
  object-fit: cover;
  border: 2px solid #080616;
  margin-left: -10px;
  transition: var(--transition);
}
.hero-trust-avatars img:first-child { margin-left: 0; }
.hero-trust-avatars img:hover { transform: translateY(-4px); z-index: 2; }
.hero-trust-text { font-size: 0.82rem; color: rgba(255,255,255,0.7); line-height: 1.4; }
.hero-trust-text strong { color: #fff; display: block; }

.hero-stats {
  display: flex; gap: 40px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.stat { text-align: left; }
.stat span {
  font-size: 2.2rem; font-weight: 900;
  background: linear-gradient(135deg, #fff 0%, #a0a0ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat p {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
  margin-top: 2px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ── Hero Image ──────────────────────────── */
.hero-image {
  display: flex; justify-content: center; align-items: center;
  position: relative;
}
.phone-mockup {
  position: relative; display: inline-block;
  animation: floatPhone 5s ease-in-out infinite;
  perspective: 1000px;
}
@keyframes floatPhone {
  0%,100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-24px) rotate(-1deg); }
}
.phone-mockup img {
  width: 300px; height: 600px; object-fit: cover;
  border-radius: 44px;
  box-shadow:
    0 40px 100px rgba(47,47,228,0.55),
    0 0 0 8px rgba(255,255,255,0.08),
    inset 0 0 0 2px rgba(255,255,255,0.15);
  position: relative;
  z-index: 2;
}

/* Glowing rings */
.phone-glow {
  position: absolute; inset: -40px;
  background: radial-gradient(ellipse, rgba(47,47,228,0.45) 0%, transparent 65%);
  filter: blur(30px);
  animation: glowPulse 3.5s ease-in-out infinite;
  z-index: 0;
}
@keyframes glowPulse {
  0%,100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

.phone-ring {
  position: absolute; inset: -30px;
  border: 1.5px solid rgba(47,47,228,0.3);
  border-radius: 60px;
  z-index: 1;
  animation: ringSpin 18s linear infinite;
}
.phone-ring::before {
  content: ""; position: absolute;
  top: -6px; left: 50%; transform: translateX(-50%);
  width: 12px; height: 12px; border-radius: 50%;
  background: #2F2FE4; box-shadow: 0 0 15px #2F2FE4;
}
.phone-ring.r2 {
  inset: -55px;
  border-color: rgba(47,47,228,0.18);
  border-radius: 80px;
  animation: ringSpin 25s linear reverse infinite;
}
.phone-ring.r2::before {
  background: #fff; box-shadow: 0 0 15px #fff;
  width: 8px; height: 8px;
}
@keyframes ringSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Floating accent cards */
.phone-float-card {
  position: absolute; z-index: 3;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 12px 16px;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(8,6,22,0.4);
  color: #080616;
  font-size: 0.82rem;
  display: flex; align-items: center; gap: 10px;
  animation: cardFloat 4s ease-in-out infinite;
}
.phone-float-card .pfc-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--gradient);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.phone-float-card strong { display: block; font-size: 0.88rem; color: #080616; }
.phone-float-card small { color: #5a5f85; font-size: 0.72rem; }

.phone-float-card.pf-rating {
  top: 50px; left: -40px;
  animation-delay: -1s;
}
.phone-float-card.pf-price {
  bottom: 80px; right: -50px;
  animation-delay: -2s;
}
.phone-float-card.pf-ship {
  bottom: -10px; left: -20px;
  animation-delay: -3s;
}
@keyframes cardFloat {
  0%,100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-14px) rotate(2deg); }
}

/* Payment logos row */
.hero-payment-logos {
  position: absolute;
  bottom: -60px; left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 10px 18px;
  border-radius: 50px;
  font-size: 0.72rem; color: rgba(255,255,255,0.6);
  white-space: nowrap;
}
.hero-payment-logos i {
  color: #fff; font-size: 1rem;
}

/* Scroll indicator */
.hero-scroll {
  position: absolute; bottom: 24px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: bounce 2s ease-in-out infinite;
}
.hero-scroll a {
  color: rgba(255,255,255,0.6);
  font-size: 1.1rem;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.hero-scroll a:hover { color: #2F2FE4; border-color: #2F2FE4; }
@keyframes bounce {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

/* ── Brands ── */
.brands { padding: 80px 0; background: var(--bg2); }
.brands-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ── Brand Card ── */
.brand-card {
  border-radius: 20px; overflow: hidden;
  cursor: pointer; position: relative;
  transition: transform 0.38s cubic-bezier(0.4,0,0.2,1),
              box-shadow 0.38s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 4px 20px rgba(0,0,0,0.10);
  background: var(--card-bg);
  border: 1px solid var(--border);
  isolation: isolate;
}
.brand-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
}

/* Card image layer */
.brand-card-img {
  position: relative; height: 180px; overflow: hidden;
}
.brand-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
}
.brand-card:hover .brand-card-img img { transform: scale(1.10); }
.brand-card-overlay {
  position: absolute; inset: 0;
  transition: opacity 0.38s;
}
/* Apple – deep charcoal to silver */
.apple-overlay    { background: linear-gradient(160deg, rgba(26,26,26,0.72) 0%, rgba(80,80,80,0.45) 100%); }
/* Samsung – royal blue */
.samsung-overlay  { background: linear-gradient(160deg, rgba(20,40,160,0.72) 0%, rgba(13,110,253,0.45) 100%); }
/* Google – bright multicolor */
.google-overlay   { background: linear-gradient(160deg, rgba(66,133,244,0.70) 0%, rgba(52,168,83,0.50) 100%); }
/* OnePlus – bold red */
.oneplus-overlay  { background: linear-gradient(160deg, rgba(185,28,28,0.75) 0%, rgba(239,68,68,0.45) 100%); }
/* Xiaomi – vibrant orange */
.xiaomi-overlay   { background: linear-gradient(160deg, rgba(234,88,12,0.75) 0%, rgba(251,146,60,0.45) 100%); }
/* Sony – premium dark slate */
.sony-overlay     { background: linear-gradient(160deg, rgba(15,23,42,0.80) 0%, rgba(51,65,85,0.55) 100%); }

/* Card body */
.brand-card-body {
  padding: 20px 20px 18px;
  display: flex; flex-direction: column; gap: 4px;
  position: relative;
}

/* Brand logo circle */
.brand-logo-circle {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 900;
  position: absolute; top: -26px; left: 20px;
  border: 3px solid var(--bg2);
  box-shadow: 0 4px 16px rgba(0,0,0,0.20);
  transition: transform 0.3s, box-shadow 0.3s;
  color: #fff;
}
.brand-card:hover .brand-logo-circle {
  transform: scale(1.12) translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.30);
}
.apple-circle   { background: linear-gradient(135deg, #1a1a1a, #4a4a4a); }
.samsung-circle { background: linear-gradient(135deg, #1428a0, #0d6efd); font-size: 1.1rem; }
.google-circle  { background: linear-gradient(135deg, #4285f4, #34a853); font-size: 1rem; }
.oneplus-circle { background: linear-gradient(135deg, #f5010c, #b91c1c); font-size: 1rem; }
.xiaomi-circle  { background: linear-gradient(135deg, #ff6900, #ea580c); font-size: 0.95rem; }
.sony-circle    { background: linear-gradient(135deg, #0f172a, #334155); font-size: 1rem; }

.brand-card-name {
  font-size: 1.05rem; font-weight: 800;
  color: var(--text); margin-top: 30px; margin-bottom: 0;
}
.brand-card-tagline {
  font-size: 0.75rem; color: var(--text-muted);
  font-style: italic; margin-bottom: 12px;
}
.brand-card-meta {
  display: flex; align-items: center; justify-content: space-between;
}
.brand-prod-count {
  font-size: 0.75rem; font-weight: 700; color: #fff;
  background: var(--primary); padding: 3px 10px; border-radius: 20px;
}
.brand-arrow {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; color: var(--text-muted);
  transition: var(--transition);
}
.brand-card:hover .brand-arrow {
  background: var(--primary); color: #fff; border-color: var(--primary);
  transform: translateX(3px);
}

/* Shine sweep animation */
.brand-card-shine {
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.10) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.55s ease;
  pointer-events: none; z-index: 2;
}
.brand-card:hover .brand-card-shine { transform: translateX(100%); }

/* Brand-specific hover border accent */
.brand-card[data-brand="Apple"]:hover   { border-color: #6b7280; }
.brand-card[data-brand="Samsung"]:hover { border-color: #1428a0; }
.brand-card[data-brand="Google"]:hover  { border-color: #4285f4; }
.brand-card[data-brand="OnePlus"]:hover { border-color: #f5010c; }
.brand-card[data-brand="Xiaomi"]:hover  { border-color: #ff6900; }
.brand-card[data-brand="Sony"]:hover    { border-color: #334155; }

/* ── Features Banner ── */
.features-banner {
  background: var(--gradient);
  padding: 40px 0;
}
.features-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.feature-item {
  display: flex; align-items: center; gap: 16px; color: #fff;
}
.feature-item i { font-size: 2rem; opacity: 0.9; }
.feature-item h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 2px; }
.feature-item p { font-size: 0.8rem; opacity: 0.8; }

/* ── Products ── */
.products { padding: 80px 0; }
.filter-tabs {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 40px;
}
.filter-btn {
  padding: 8px 22px; border-radius: 50px; border: 2px solid var(--border);
  background: none; cursor: pointer; font-size: 0.875rem; font-weight: 600;
  color: var(--text-muted); transition: var(--transition);
}
.filter-btn.active, .filter-btn:hover {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.product-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden; cursor: pointer;
  transition: var(--transition); position: relative;
  box-shadow: var(--shadow);
}
.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.product-card.hidden { display: none; }
.product-image-wrap {
  position: relative; overflow: hidden;
  background: var(--bg); height: 220px;
}
.product-image-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease;
}
.product-card:hover .product-image-wrap img { transform: scale(1.08); }
.product-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--gradient); color: #fff;
  padding: 3px 10px; border-radius: 20px;
  font-size: 0.7rem; font-weight: 700;
}
.product-badge.sale { background: linear-gradient(135deg, #2F2FE4, #162E93); }
.product-badge.new { background: linear-gradient(135deg, #162E93, #1A1953); color: #fff; }
.product-actions {
  position: absolute; top: 12px; right: 12px;
  display: flex; flex-direction: column; gap: 6px;
  opacity: 0; transform: translateX(20px);
  transition: var(--transition);
}
.product-card:hover .product-actions { opacity: 1; transform: translateX(0); }
.action-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 0.85rem; color: var(--text);
  transition: var(--transition);
}
.action-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.action-btn.wishlisted { background: var(--secondary); color: #fff; border-color: var(--secondary); }
.product-info { padding: 16px; }
.product-brand { font-size: 0.75rem; color: var(--primary); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; }
.product-name { font-size: 0.95rem; font-weight: 700; margin-bottom: 8px; line-height: 1.3; }
.product-rating { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.stars { color: #f59e0b; font-size: 0.8rem; }
.rating-count { font-size: 0.75rem; color: var(--text-muted); }
.product-price { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.price-current { font-size: 1.2rem; font-weight: 800; color: var(--primary); }
.price-old { font-size: 0.85rem; color: var(--text-muted); text-decoration: line-through; }
.price-discount { font-size: 0.75rem; color: #22c55e; font-weight: 700; }
.add-to-cart {
  width: 100%; margin-top: 14px; padding: 10px;
  background: var(--gradient); color: #fff; border: none;
  border-radius: 50px; font-weight: 700; cursor: pointer;
  font-size: 0.875rem; transition: var(--transition);
}
.add-to-cart:hover { transform: scale(1.02); box-shadow: 0 4px 16px rgba(47,47,228,0.35); }
.load-more-wrap { text-align: center; margin-top: 48px; }

/* ── Deals ── */
.deals { padding: 80px 0; background: var(--bg2); }
.countdown-wrap {
  display: flex; align-items: center; gap: 20px;
  flex-wrap: wrap; margin-bottom: 40px;
  background: var(--bg);
  padding: 16px 24px; border-radius: var(--radius);
  border: 1px solid var(--border);
}
.countdown-wrap span { font-weight: 700; color: var(--text-muted); }
.countdown { display: flex; gap: 10px; }
.time-block {
  background: var(--gradient); color: #fff;
  border-radius: var(--radius-sm); padding: 10px 18px;
  text-align: center; min-width: 60px;
}
.time-block span { font-size: 1.5rem; font-weight: 900; display: block; }
.time-block label { font-size: 0.65rem; opacity: 0.85; font-weight: 600; }
.deals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.deal-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: var(--transition); box-shadow: var(--shadow);
  position: relative;
}
.deal-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.deal-ribbon {
  position: absolute; top: 16px; left: -6px; z-index: 1;
  background: var(--secondary); color: #fff;
  padding: 4px 16px 4px 12px;
  font-size: 0.75rem; font-weight: 700;
  clip-path: polygon(0 0, 100% 0, 94% 50%, 100% 100%, 0 100%);
}
.deal-img { width: 100%; height: 200px; object-fit: cover; }
.deal-info { padding: 16px; }
.deal-info h4 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.deal-pricing { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.deal-new-price { font-size: 1.3rem; font-weight: 900; color: var(--primary); }
.deal-old-price { color: var(--text-muted); text-decoration: line-through; font-size: 0.9rem; }
.deal-progress { background: var(--border); border-radius: 4px; height: 6px; overflow: hidden; margin-bottom: 8px; }
.deal-progress-bar { height: 100%; background: var(--gradient); border-radius: 4px; transition: width 1.5s ease; }
.deal-stock { font-size: 0.75rem; color: var(--text-muted); }

/* ── Testimonials ── */
.testimonials { padding: 80px 0; overflow: hidden; }
.testimonials-slider { overflow: hidden; }
.testimonial-track {
  display: flex; gap: 24px;
  transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
}
.testimonial-card {
  min-width: 340px; background: var(--card-bg);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow);
  flex-shrink: 0;
}
.t-stars { color: #f59e0b; font-size: 0.9rem; margin-bottom: 16px; }
.t-text {
  font-size: 0.95rem; line-height: 1.7;
  color: var(--text-muted); margin-bottom: 24px;
  font-style: italic;
}
.t-author { display: flex; align-items: center; gap: 12px; }
.t-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--primary);
}
.t-name { font-weight: 700; font-size: 0.9rem; }
.t-role { font-size: 0.75rem; color: var(--text-muted); }
.slider-dots { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border); cursor: pointer; transition: var(--transition);
}
.dot.active { background: var(--primary); width: 24px; border-radius: 4px; }

/* ── Newsletter ── */
.newsletter {
  padding: 80px 0;
  background: linear-gradient(135deg, #080616 0%, #1A1953 50%, #162E93 100%);
}
.newsletter-inner {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 48px; align-items: center;
}
.newsletter-text h2 { font-size: 2rem; font-weight: 800; color: #fff; margin-bottom: 12px; }
.newsletter-text p { color: #94a3b8; line-height: 1.7; }
.newsletter-form { display: flex; gap: 12px; flex-wrap: wrap; }
.newsletter-form input {
  flex: 1; min-width: 240px; padding: 14px 20px;
  border-radius: 50px; border: 2px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05); color: #fff;
  font-size: 0.95rem; outline: none; transition: var(--transition);
}
.newsletter-form input:focus { border-color: var(--primary); }
.newsletter-form input::placeholder { color: #64748b; }

/* ── Contact ── */
.contact { padding: 80px 0; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.contact-info h2 { font-size: 2rem; font-weight: 800; margin-bottom: 12px; }
.contact-info p { color: var(--text-muted); margin-bottom: 32px; }
.contact-item { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.contact-item i { color: var(--primary); font-size: 1.1rem; margin-top: 2px; }
.contact-item span { font-size: 0.9rem; color: var(--text-muted); }
.social-links { display: flex; gap: 12px; margin-top: 32px; }
.social-links a {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text); text-decoration: none; transition: var(--transition);
}
.social-links a:hover { background: var(--primary); color: #fff; border-color: var(--primary); transform: translateY(-4px); }
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.contact-form input, .contact-form textarea {
  padding: 14px 18px; border-radius: var(--radius-sm);
  border: 2px solid var(--border); background: var(--bg);
  color: var(--text); font-size: 0.95rem; outline: none;
  font-family: inherit; transition: var(--transition);
  resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--primary); }

/* ── Footer ── */
.footer { background: #080616; color: #a5aacb; padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand .logo { color: #fff; margin-bottom: 16px; display: inline-flex; }
.footer-brand p { font-size: 0.875rem; line-height: 1.7; margin-bottom: 20px; }
.payment-icons { display: flex; gap: 12px; font-size: 1.8rem; color: #64748b; }
.footer-links h4 { color: #fff; font-weight: 700; margin-bottom: 20px; }
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: #64748b; text-decoration: none; font-size: 0.875rem; transition: var(--transition); }
.footer-links a:hover { color: var(--primary); transform: translateX(4px); display: inline-block; }
.footer-bottom {
  border-top: 1px solid #1e293b; padding: 20px 0;
  text-align: center; font-size: 0.8rem; color: #475569;
}
.footer-bottom i { color: var(--secondary); }

/* ── Brand Showcase ── */
.brand-showcase { padding: 0 0 80px; }
.brand-hero {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 40px; align-items: center;
  padding: 48px; border-radius: 24px;
  margin-bottom: 32px; position: relative; overflow: hidden;
}
.brand-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(255,255,255,0.08) 0%, transparent 60%);
}
.brand-hero-left { position: relative; z-index: 1; }
.brand-back-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9); padding: 8px 16px; border-radius: 50px;
  font-size: 0.82rem; font-weight: 600; cursor: pointer;
  margin-bottom: 24px; transition: var(--transition);
}
.brand-back-btn:hover { background: rgba(255,255,255,0.22); }
.brand-hero-icon { margin-bottom: 12px; }
.brand-hero-name {
  font-size: 2.8rem; font-weight: 900; color: #fff;
  margin-bottom: 8px; line-height: 1;
}
.brand-hero-tagline {
  font-size: 1.1rem; color: rgba(255,255,255,0.75);
  font-style: italic; margin-bottom: 28px;
}
.brand-hero-stats {
  display: flex; gap: 28px; flex-wrap: wrap;
}
.brand-stat { text-align: center; }
.brand-stat strong {
  display: block; font-size: 1.3rem; font-weight: 900; color: #fff;
}
.brand-stat span { font-size: 0.72rem; color: rgba(255,255,255,0.65); }
.brand-hero-right { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-end; }

/* Sub-category pills */
.brand-subcats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.bsc-pill {
  padding: 8px 20px; border-radius: 50px;
  border: 2px solid var(--border); background: var(--bg2);
  color: var(--text-muted); font-size: 0.85rem; font-weight: 600;
  cursor: pointer; transition: var(--transition);
}
.bsc-pill:hover { border-color: var(--primary); color: var(--primary); }
.bsc-pill.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Brand products header */
.brand-products-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.brand-products-header h3 { font-size: 1.1rem; font-weight: 800; }
.brand-sort select {
  padding: 8px 16px; border-radius: 50px; border: 1.5px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 0.85rem;
  cursor: pointer; outline: none; transition: var(--transition);
}
.brand-sort select:focus { border-color: var(--primary); }

/* ── Cart Sidebar ── */
.cart-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 2000; opacity: 0; pointer-events: none;
  transition: opacity 0.35s;
}
.cart-overlay.open { opacity: 1; pointer-events: all; }
.cart-sidebar {
  position: fixed; right: 0; top: 0; bottom: 0;
  width: min(400px, 100vw);
  background: var(--bg2); z-index: 2001;
  transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
}
.cart-sidebar.open { transform: translateX(0); }
.cart-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.cart-header h3 { font-size: 1.1rem; font-weight: 700; }
.cart-items { flex: 1; overflow-y: auto; padding: 16px 24px; }
.cart-empty { text-align: center; padding: 60px 0; color: var(--text-muted); }
.cart-empty i { font-size: 3rem; margin-bottom: 12px; opacity: 0.4; }
.cart-item {
  display: flex; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid var(--border); align-items: center;
}
.cart-item img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); }
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 0.875rem; font-weight: 600; margin-bottom: 4px; }
.cart-item-price { font-size: 0.875rem; color: var(--primary); font-weight: 700; }
.cart-item-qty { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.qty-btn {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg);
  cursor: pointer; font-size: 0.8rem; display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.qty-btn:hover { background: var(--primary); color: #fff; }
.qty-num { font-size: 0.875rem; font-weight: 600; }
.remove-item { background: none; border: none; cursor: pointer; color: var(--secondary); font-size: 0.9rem; }
.cart-footer {
  padding: 20px 24px; border-top: 1px solid var(--border);
}
.cart-total { display: flex; justify-content: space-between; margin-bottom: 16px; font-size: 1rem; font-weight: 700; }

/* ── Product Modal ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  z-index: 3000; opacity: 0; pointer-events: none;
  transition: opacity 0.35s; backdrop-filter: blur(4px);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.product-modal {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: var(--bg2); z-index: 3001;
  border-radius: var(--radius); max-width: 760px; width: 90vw;
  max-height: 90vh; overflow-y: auto;
  opacity: 0; pointer-events: none;
  transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
  box-shadow: var(--shadow-lg);
}
.product-modal.open { transform: translate(-50%, -50%) scale(1); opacity: 1; pointer-events: all; }
.modal-close {
  position: sticky; top: 12px; left: calc(100% - 48px);
  background: var(--bg); border: 1px solid var(--border);
  width: 36px; height: 36px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; color: var(--text); z-index: 1;
  transition: var(--transition);
}
.modal-close:hover { background: var(--secondary); color: #fff; }
.modal-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
  padding: 0 32px 32px;
}
.modal-img { width: 100%; border-radius: var(--radius); object-fit: cover; max-height: 400px; }
.modal-info h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 12px; }
.modal-info .stars { font-size: 1rem; color: #f59e0b; margin-bottom: 8px; }
.modal-info .price { font-size: 1.8rem; font-weight: 900; color: var(--primary); margin-bottom: 16px; }
.modal-info p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; margin-bottom: 20px; }
.modal-specs { margin-bottom: 24px; }
.spec-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.spec-row strong { color: var(--text); }
.spec-row span { color: var(--text-muted); }
.modal-colors { display: flex; gap: 8px; margin-bottom: 24px; }
.color-dot {
  width: 28px; height: 28px; border-radius: 50%;
  cursor: pointer; border: 3px solid transparent; transition: var(--transition);
}
.color-dot.selected { border-color: var(--primary); }

/* ── Toast ── */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 4000; display: flex; flex-direction: column; gap: 10px;
}
.toast {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 18px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-lg); min-width: 260px;
  animation: toastIn 0.4s cubic-bezier(0.4,0,0.2,1);
}
.toast.success { border-left: 4px solid #22c55e; }
.toast.error { border-left: 4px solid var(--secondary); }
.toast.info { border-left: 4px solid var(--primary); }
.toast i { font-size: 1.1rem; }
.toast.success i { color: #22c55e; }
.toast.error i { color: var(--secondary); }
.toast.info i { color: var(--primary); }
.toast span { font-size: 0.875rem; font-weight: 500; flex: 1; }
@keyframes toastIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }

/* ── Back to Top ── */
.back-to-top {
  position: fixed; bottom: 90px; right: 24px; z-index: 999;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--gradient); color: #fff; border: none;
  cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(47,47,228,0.4);
  opacity: 0; pointer-events: none; transition: var(--transition);
  transform: translateY(20px);
}
.back-to-top.visible { opacity: 1; pointer-events: all; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-4px); }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .brands-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .brand-hero { grid-template-columns: 1fr; padding: 32px; }
  .brand-hero-right { align-items: flex-start; }
}

@media (max-width: 768px) {
  .top-bar .container { justify-content: center; }
  .top-bar span:not(:first-child) { display: none; }
  .nav-links {
    position: absolute; top: var(--navbar-h); left: 0; right: 0;
    background: var(--bg2); flex-direction: column; padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    transform: scaleY(0); transform-origin: top;
    opacity: 0; pointer-events: none; transition: var(--transition);
    align-items: stretch;
    max-height: calc(100vh - var(--navbar-h));
    overflow-y: auto;
  }
  .nav-links.open { transform: scaleY(1); opacity: 1; pointer-events: all; }
  .nav-links > li { width: 100%; }
  .nav-links .nav-link { width: 100%; justify-content: space-between; }

  /* Mobile mega menu — turn into accordion */
  .mega-menu {
    position: static;
    transform: none !important;
    width: 100%;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-top: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    transition: max-height 0.4s ease, padding 0.3s ease;
    background: transparent;
  }
  .mega-menu::after, .mega-menu::before { display: none; }
  .has-mega:hover .mega-menu { max-height: 0; }
  .has-mega.open .mega-menu {
    max-height: 2200px;
    padding: 12px 0 20px;
  }
  .mega-inner {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
  .mega-features { flex-direction: row; flex-wrap: wrap; }
  .mega-feat-card { flex: 1 1 calc(50% - 6px); min-width: 0; }
  .mega-brands-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .mega-promo-card { min-height: 160px; padding: 18px; }
  .mega-promo-card h3 { font-size: 1.4rem; }
  .mega-promo-card h3 span { font-size: 1.7rem; }
  .hamburger { display: flex; }
  .hero-content { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero-image { order: -1; margin-bottom: 20px; }
  .phone-mockup img { width: 200px; height: 400px; }
  .phone-float-card { font-size: 0.72rem; padding: 8px 12px; }
  .phone-float-card.pf-rating { top: 20px; left: -20px; }
  .phone-float-card.pf-price { bottom: 50px; right: -20px; }
  .phone-float-card.pf-ship { display: none; }
  .hero-payment-logos { display: none; }
  .hero-badges-row, .hero-btns, .hero-trust, .hero-stats { justify-content: center; }
  .hero-trust { text-align: left; }
  .hero-text p { margin: 0 auto 32px; }
  .hero-text h1 .hero-word { display: inline; }
  .brands-grid { grid-template-columns: repeat(3, 1fr); }
  .newsletter-inner { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .modal-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .section-title { font-size: 1.6rem; }
  .brands-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 20px; }
  .testimonial-card { min-width: 280px; }
  .brand-hero { padding: 24px; }
  .brand-hero-name { font-size: 2rem; }
  .brand-hero-stats { gap: 16px; }
  .bsc-pill { font-size: 0.78rem; padding: 6px 14px; }
}
