/* ================= HEADER STYLES ================= */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 60px;
  background-color: #fff;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  width: 100%;
  transition: all 0.3s ease;
  min-height: 70px;
}

/* Logo Section */
.logo-section {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-section img {
  height: 50px;
  width: auto;
  max-width: 250px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.logo-section img:hover {
  transform: scale(1.05);
}

/* Right Section Container */
.right-section {
  display: flex;
  align-items: center;
  gap: 30px; /* Uniform gap between nav and icons */
  flex-shrink: 0;
}

/* Navigation Styles */
.nav {
  display: flex;
  gap: 30px; /* Uniform gap between each link */
  align-items: center;
}

.nav a {
  text-decoration: none;
  color: #333;
  font-size: 16px;
  font-weight: 600;
  padding: 8px 0;
  position: relative;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.nav a:hover {
  color: #007bff;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #007bff, #00bfff);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.nav a:hover::after {
  width: 100%;
}

.nav a.active {
  color: #007bff;
  font-weight: 700;
}

.nav a.active::after {
  width: 100%;
}

/* Icons Styles */
.icons {
  display: flex;
  gap: 30px; /* Match gap with nav links */
  align-items: center;
}

.icons a {
  color: #333;
  font-size: 20px;
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  position: relative;
}

.icons a i {
  font-size: 20px;
  line-height: 1;
}

.icons a:hover {
  color: #007bff;
  background-color: rgba(0, 123, 255, 0.1);
  transform: translateY(-2px);
}

/* Cart badge indicator */
.cart-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: #ff4757;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* ================= HEADER RESPONSIVE DESIGN ================= */

/* Large Desktop */
@media (min-width: 1400px) {
  .header {
    padding: 20px 80px;
  }
}

/* Tablet */
@media (max-width: 1024px) {
  .header {
    padding: 15px 40px;
  }

  .right-section {
    gap: 25px;
  }

  .nav {
    gap: 20px;
  }

  .nav a {
    font-size: 15px;
  }

  .icons a {
    font-size: 18px;
    width: 36px;
    height: 36px;
  }

  .icons a i {
    font-size: 18px;
  }
}

/* Mobile - 768px and below */
@media (max-width: 768px) {
  .header {
    padding: 12px 20px;
    flex-wrap: nowrap;
    justify-content: space-between;
    min-height: 60px;
    position: sticky;
    top: 0;
  }

  .logo-section {
    flex: 0 0 auto;
    margin-right: 10px;
    padding-left: 5px;
  }

  .logo-section img {
    height: 35px;
  }

  .right-section {
    flex: 1;
    justify-content: flex-end;
    gap: 20px; /* uniform mobile gap */
    margin-left: auto;
  }

  .nav {
    gap: 20px; /* uniform mobile gap */
  }

  .nav a {
    font-size: 14px;
    padding: 6px 0;
  }

  .icons {
    gap: 20px; /* uniform mobile gap */
    padding-right: 5px;
  }

  .icons a {
    font-size: 16px;
    width: 32px;
    height: 32px;
    min-width: 32px;
  }

  .icons a i {
    font-size: 16px;
  }
}

/* Small Mobile - 480px and below */
@media (max-width: 480px) {
  .header {
    padding: 10px 15px;
    min-height: 55px;
    position: sticky;
    top: 0;
  }

  .logo-section {
    padding-left: 8px;
  }

  .logo-section img {
    height: 30px;
  }

  .right-section {
    gap: 12px;
  }

  .nav {
    gap: 12px;
  }

  .nav a {
    font-size: 13px;
    padding: 4px 0;
  }

  .icons {
    gap: 12px;
    padding-right: 8px;
  }

  .icons a {
    font-size: 14px;
    width: 30px;
    height: 30px;
  }

  .icons a i {
    font-size: 14px;
  }

  .cart-badge {
    width: 16px;
    height: 16px;
    font-size: 10px;
    top: -3px;
    right: -3px;
  }
}

/* Very Small Mobile - 360px and below */
@media (max-width: 360px) {
  .header {
    padding: 8px 10px;
    position: sticky;
    top: 0;
  }

  .logo-section {
    padding-left: 5px;
  }

  .logo-section img {
    height: 28px;
  }

  .right-section {
    gap: 10px;
  }

  .nav {
    gap: 10px;
  }

  .nav a {
    font-size: 12px;
  }

  .icons {
    gap: 10px;
    padding-right: 5px;
  }

  .icons a {
    font-size: 13px;
    width: 28px;
    height: 28px;
  }

  .icons a i {
    font-size: 13px;
  }
}

/* Safe area support */
@supports (padding: max(0px)) {
  .header {
    padding-left: max(60px, env(safe-area-inset-left) + 20px);
    padding-right: max(60px, env(safe-area-inset-right) + 20px);
    padding-top: max(20px, env(safe-area-inset-top));
  }

  @media (min-width: 1400px) {
    .header {
      padding-left: max(80px, env(safe-area-inset-left) + 20px);
      padding-right: max(80px, env(safe-area-inset-right) + 20px);
    }
  }

  @media (max-width: 1024px) {
    .header {
      padding-left: max(40px, env(safe-area-inset-left) + 15px);
      padding-right: max(40px, env(safe-area-inset-right) + 15px);
    }
  }

  @media (max-width: 768px) {
    .header {
      padding-left: max(20px, env(safe-area-inset-left) + 10px);
      padding-right: max(20px, env(safe-area-inset-right) + 10px);
      padding-top: max(12px, env(safe-area-inset-top));
    }
  }

  @media (max-width: 480px) {
    .header {
      padding-left: max(15px, env(safe-area-inset-left) + 8px);
      padding-right: max(15px, env(safe-area-inset-right) + 8px);
      padding-top: max(10px, env(safe-area-inset-top));
    }
  }
}

/* Touch optimization for mobile */
@media (hover: none) and (pointer: coarse) {
  .nav a:active,
  .icons a:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
  }

  .icons a:active {
    background-color: rgba(0, 123, 255, 0.2);
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .header {
    background-color: #1a1a1a;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
  }

  .nav a {
    color: #e0e0e0;
  }

  .nav a:hover {
    color: #007bff;
  }

  .nav a.active {
    color: #007bff;
  }

  .icons a {
    color: #e0e0e0;
  }
}

/* ================= FOOTER STYLES - EACH LINK UNIQUE COLOR ================= */
.footer {
  color: #fff;
  padding: 60px 5% 30px;
  position: relative;
  overflow: hidden;
  background-color: #000000;
  margin-top: 60px;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #007bff, transparent);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 30px;
  position: relative;
  z-index: 1;
  align-items: start;
}

.footer .logo-section {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding-top: 15px;
  margin: 0;
}

/* Fixed logo to not be white */
.footer .logo-section .logo-top img {
  max-width: 250px;
  filter: brightness(1) invert(0);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.footer .logo-section .slogan {
  font-size: 1.1em;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin: 0;
}

.footer-right {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 0;
}

/* ALL FOOTER SECTIONS STYLED LIKE NAVIGATION */
.footer-section {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.footer-section h4 {
  font-size: 18px;
  margin-bottom: 15px;
  color: #fff;
  position: relative;
  padding-bottom: 10px;
  margin-top: 0;
}

/* SECTION-SPECIFIC TITLE UNDERLINE COLORS */
.footer-section.nav-links h4::after {
  background: #007bff; /* Blue for Navigation */
}

.footer-section.quick-links h4::after {
  background: #28a745; /* Green for Quick Links */
}

.footer-section.legals h4::after {
  background: #dc3545; /* Red for Legals */
}

.footer-section.socials h4::after {
  background: #ffc107; /* Yellow/Amber for Socials */
}

/* Footer links styled like navigation */
.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-section li {
  margin: 0;
}

.footer-section a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 15px;
  font-weight: 500;
  padding: 0;
  border-radius: 0;
  border: none;
  position: relative;
  overflow: hidden;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-width: auto;
  transition: all 0.3s ease;
  margin: 0;
  min-height: 36px;
  min-width: 36px;
}

.footer-section a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s;
}

.footer-section a:hover::before {
  left: 100%;
}

/* ========== UNIQUE HOVER COLORS FOR EVERY SINGLE LINK ========== */

/* NAVIGATION SECTION - Each link unique */
.footer-section.nav-links ul li:nth-child(1) a:hover {
  color: #FF6B6B !important; /* Coral Red for Home */
}

.footer-section.nav-links ul li:nth-child(2) a:hover {
  color: #4ECDC4 !important; /* Turquoise for Shop */
}

.footer-section.nav-links ul li:nth-child(3) a:hover {
  color: #FFD166 !important; /* Yellow for Gaming */
}

.footer-section.nav-links ul li:nth-child(4) a:hover {
  color: #06D6A0 !important; /* Mint Green for Shop By Brands */
}

/* QUICK LINKS SECTION - Each link unique */
.footer-section.quick-links ul li:nth-child(1) a:hover {
  color: #118AB2 !important; /* Ocean Blue for PC Builder */
}

.footer-section.quick-links ul li:nth-child(2) a:hover {
  color: #EF476F !important; /* Hot Pink for Blog */
}

.footer-section.quick-links ul li:nth-child(3) a:hover {
  color: #7209B7 !important; /* Purple for About Us */
}

.footer-section.quick-links ul li:nth-child(4) a:hover {
  color: #F8961E !important; /* Orange for Contact */
}

/* LEGALS SECTION - Each link unique */
.footer-section.legals ul li:nth-child(1) a:hover {
  color: #E63946 !important; /* Bright Red for Shipping Policy */
}

.footer-section.legals ul li:nth-child(2) a:hover {
  color: #A8DADC !important; /* Light Blue for Refund Policy */
}

.footer-section.legals ul li:nth-child(3) a:hover {
  color: #457B9D !important; /* Steel Blue for Privacy Policy */
}

.footer-section.legals ul li:nth-child(4) a:hover {
  color: #F4A261 !important; /* Sand Brown for Terms of Service */
}

/* Social section icons - FIX INSTAGRAM AND TIKTOK ON SAME LINE */
.footer-section.socials .social-icons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}

/* FIX: Instagram and TikTok on same line */
.footer-section.socials .social-icons .instagram-tiktok-row {
  display: flex;
  gap: 15px;
  align-items: center;
}

.footer-section.socials .social-icons .instagram-tiktok-row a {
  flex: 1;
}

.footer-section.socials .social-icons a {
  color: rgba(255, 255, 255, 0.8);
  padding: 0;
  border: none;
  background: transparent;
}

/* SOCIALS SECTION - Each link unique (keeping brand colors for socials) */
.footer-section.socials .social-icons a:nth-child(1):hover {
  color: #1877F2 !important; /* Facebook Blue */
  background: transparent !important;
  border-color: transparent !important;
  transform: translateX(5px);
}

.footer-section.socials .social-icons a:nth-child(2):hover {
  color: #FF0000 !important; /* YouTube Red */
  background: transparent !important;
  border-color: transparent !important;
  transform: translateX(5px);
}

.footer-section.socials .social-icons a:nth-child(3):hover {
  color: #E1306C !important; /* Instagram Pink */
  background: transparent !important;
  border-color: transparent !important;
  transform: translateX(5px);
}

.footer-section.socials .social-icons a:nth-child(4):hover {
  color: #69C9D0 !important; /* TikTok Teal */
  background: transparent !important;
  border-color: transparent !important;
  transform: translateX(5px);
}

/* Additional unique hover effect for all links */
.footer-section a:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(5px);
  box-shadow: none;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 40px;
  padding-top: 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

/* ================= FOOTER RESPONSIVE DESIGN ================= */

/* Tablet */
@media (max-width: 1024px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 30px;
    margin: 0 auto;
    padding: 0 20px;
  }
  
  .footer-right {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin: 0;
  }
  
  .footer .logo-section {
    padding-top: 10px;
    margin: 0;
    padding-left: 10px;
  }
}

/* Mobile - 768px and below */
@media (max-width: 768px) {
  .footer {
    padding: 30px 25px 15px;
    margin-top: 30px;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 0 15px;
  }
  
  .footer-right {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .footer-section {
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 15px;
    padding-right: 10px;
  }
  
  .footer-section:last-child {
    border-bottom: none;
  }
  
  .footer-section h4 {
    font-size: 16px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    padding-left: 5px;
  }
  
  .footer-section ul {
    gap: 6px;
    padding-left: 5px;
  }
  
  .footer-section a {
    font-size: 14px;
    padding: 6px 0 6px 5px;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    min-width: 32px;
  }
  
  /* Social icons optimization */
  .footer-section.socials .social-icons .instagram-tiktok-row {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    padding-left: 5px;
  }
  
  .footer-section.socials .social-icons .instagram-tiktok-row a {
    flex: 1;
    justify-content: center;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
  }
  
  .footer-bottom {
    margin-top: 25px;
    padding: 15px 25px 0;
    font-size: 13px;
    line-height: 1.6;
  }
}

/* Small Mobile - 480px and below */
@media (max-width: 480px) {
  .footer {
    padding: 25px 20px 15px;
    margin-top: 25px;
  }
  
  .footer-container {
    padding: 0 10px;
    gap: 20px;
  }
  
  /* FIX FOOTER SOCIAL LAYOUT FOR SMALL MOBILE */
  .footer-right {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }
  
  /* Navigation and Quick Links side by side on first row */
  .footer-section:nth-child(1),
  .footer-section:nth-child(2) {
    grid-column: span 1;
  }
  
  /* Contact Us and Social Media side by side on second row */
  .footer-section:nth-child(3),
  .footer-section:nth-child(4) {
    grid-column: span 1;
  }
  
  .footer-section {
    padding: 0 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  /* Last row sections don't need bottom border */
  .footer-section:nth-child(3),
  .footer-section:nth-child(4) {
    border-bottom: none;
  }
  
  /* Instagram and TikTok on same line - small mobile */
  .footer-section.socials .social-icons .instagram-tiktok-row {
    gap: 10px;
    padding-left: 3px;
  }
  
  .footer-section.socials .social-icons .instagram-tiktok-row a {
    font-size: 12px;
    padding: 6px;
  }
  
  .footer-section h4 {
    font-size: 15px;
    margin-bottom: 10px;
    padding-left: 3px;
  }
  
  .footer-section a {
    font-size: 13px;
    margin: 0;
    min-height: 30px;
    min-width: 30px;
    padding-left: 8px;
  }
  
  .footer .logo-section {
    padding-top: 5px;
    margin: 0;
    gap: 10px;
    padding: 0 15px;
  }
  
  .footer-bottom {
    margin-top: 20px;
    padding: 15px 20px 0;
    font-size: 12px;
  }
}

/* Very Small Mobile - 360px and below */
@media (max-width: 360px) {
  .footer {
    padding: 20px 18px 12px;
  }
  
  .footer-right {
    gap: 12px;
  }
  
  .footer-section {
    padding: 0 5px 8px;
  }
  
  .footer-section h4 {
    font-size: 14px;
    margin-bottom: 8px;
    padding-left: 3px;
  }
  
  .footer-section a {
    font-size: 12px;
    min-height: 28px;
    min-width: 28px;
    padding-left: 5px;
  }
  
  .footer .logo-section .logo-top img {
    max-width: 180px;
  }
  
  .footer-bottom {
    padding: 12px 18px 0;
    font-size: 11px;
  }
}

/* Safe area support for mobile */
@supports (padding: max(0px)) {
  @media (max-width: 768px) {
    .footer {
      padding-left: max(30px, env(safe-area-inset-left) + 15px);
      padding-right: max(25px, env(safe-area-inset-right) + 10px);
    }
  }
  
  @media (max-width: 480px) {
    .footer {
      padding-left: max(25px, env(safe-area-inset-left) + 10px);
      padding-right: max(20px, env(safe-area-inset-right) + 10px);
    }
  }
  
  @media (max-width: 360px) {
    .footer {
      padding-left: max(22px, env(safe-area-inset-left) + 8px);
      padding-right: max(18px, env(safe-area-inset-right) + 8px);
    }
  }
}

/* Dark mode support for footer */
@media (prefers-color-scheme: dark) {
  .footer {
    background-color: #1a1a1a;
  }
  
  .footer-section a {
    color: rgba(255, 255, 255, 0.7);
  }
}

/* =========================
   TABLET: 4 FOOTER SECTIONS IN ONE ROW
   ========================= */
@media (min-width: 769px) and (max-width: 1024px) {
  .footer-right {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding-left: 20px;
  }
}

/* ================= ENHANCED WHATSAPP BUTTON ================= */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  z-index: 1000;
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: float 3s ease-in-out infinite;
  text-decoration: none;
  margin: 0;
  min-height: 44px;
  min-width: 44px;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.whatsapp-float:hover {
  transform: scale(1.1) translateY(-5px);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.6);
}

.whatsapp-float::after {
  content: 'Need Help?';
  position: absolute;
  right: 70px;
  background: #333;
  color: white;
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.3s ease;
}

.whatsapp-float:hover::after {
  opacity: 1;
  transform: translateX(0);
}

/* ================= MOBILE WHATSAPP BUTTON FIX ================= */
@media (max-width: 768px) {
  .whatsapp-float {
    width: 56px;
    height: 56px;
    bottom: 20px !important;
    right: 20px !important;
    font-size: 28px;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  }
  
  /* Force position on mobile */
  .whatsapp-float {
    right: 20px !important;
    bottom: 20px !important;
    left: auto !important;
    top: auto !important;
  }
  
  /* Hide text tooltip on mobile */
  .whatsapp-float::after {
    display: none;
  }
  
  /* Add touch feedback */
  .whatsapp-float:active {
    transform: scale(1.15);
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.6);
  }
  
  /* Remove hover effects on touch devices */
  @media (hover: none) and (pointer: coarse) {
    .whatsapp-float:hover {
      transform: none;
    }
  }
}

/* ================= SAFE AREA SUPPORT FOR WHATSAPP ================= */
@supports (padding: max(0px)) {
  .whatsapp-float {
    bottom: max(30px, env(safe-area-inset-bottom));
    right: max(30px, env(safe-area-inset-right));
  }
  
  @media (max-width: 768px) {
    .whatsapp-float {
      bottom: max(20px, env(safe-area-inset-bottom)) !important;
      right: max(20px, env(safe-area-inset-right)) !important;
    }
  }
}

/* Touch optimization for WhatsApp button */
@media (hover: none) and (pointer: coarse) {
  .whatsapp-float:active {
    transform: scale(1.15);
    transition: transform 0.1s ease;
  }
}