/* =========================================
   GLOBAL RESPONSIVENESS (MOBILE)
   ========================================= */

/* Hide mobile menu button on large screens by default */
.mobileMenuBtn {
  display: none;
  background: none;
  border: none;
  color: var(--color-text-dark);
  cursor: pointer;
}

[data-theme="dark"] .mobileMenuBtn {
  color: var(--color-text-light);
}

/* Mobile Menu Drawer */
.mobileMenu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 400px;
  height: 100vh;
  background-color: var(--color-bg-light);
  z-index: 1000;
  transition: right 0.3s ease;
  box-shadow: -5px 0 15px rgba(0,0,0,0.1);
  overflow-y: auto;
}

[data-theme="dark"] .mobileMenu {
  background-color: var(--color-bg-dark);
  box-shadow: -5px 0 15px rgba(0,0,0,0.5);
}

.mobileMenu.active {
  right: 0;
}

.mobileMenuContent {
  padding: 5rem 2rem 2rem;
}

.mobileNavLinks {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
}

.mobileNavLinks li {
  margin-bottom: 1.5rem;
}

.mobileNavLinks a {
  text-decoration: none;
  color: var(--color-text-dark);
  font-size: 1.25rem;
  font-weight: 500;
}

[data-theme="dark"] .mobileNavLinks a {
  color: var(--color-text-light);
}

.mobileActions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* MEDIA QUERIES FOR GLOBAL ELEMENTS */
@media (max-width: 992px) {
  .desktopNav {
    display: none; /* Hide desktop links */
  }
  
  .mobileMenuBtn {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Keep header elements on single line */
  .header .container {
    flex-wrap: nowrap;
  }
}

@media (max-width: 768px) {
  /* Footer Grid - 3 Columns in a Single Line on Mobile */
  .footerGrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    text-align: left;
    align-items: start;
  }

  /* Show company info compactly spanning full width above the 3 columns */
  .companyInfo {
    grid-column: 1 / -1;
    text-align: center;
    margin-bottom: 0.75rem;
  }

  /* Hide the long description on mobile, just show logo + motto */
  .companyDesc {
    display: none;
  }

  .linksGroup h3,
  .newsletterGroup h3 {
    font-size: 0.7rem;
    margin-bottom: 0.6rem;
    letter-spacing: 0.5px;
  }

  .linksGroup ul {
    gap: 0.35rem;
  }

  .linksGroup a {
    font-size: 0.65rem;
  }

  .newsletterGroup p {
    font-size: 0.62rem;
    margin-bottom: 0.6rem;
    line-height: 1.4;
  }

  .newsletterForm {
    flex-direction: column;
    background: transparent;
    border: none;
    padding: 0;
    gap: 0.35rem;
  }

  .newsletterInput {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    width: 100%;
    padding: 0.35rem 0.5rem;
    font-size: 0.6rem;
    color: white;
  }

  .newsletterBtn {
    width: 100%;
    padding: 0.35rem;
    border-radius: 4px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .newsletterBtn svg {
    width: 13px;
    height: 13px;
  }

  .socialLinks {
    justify-content: center;
  }
  
  /* Tables globally */
  .table-responsive,
  .recentOrders,
  .cartTable,
  .wishlistTable {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
