/* ==========================================
   MAIN.CSS - SHARED STYLES FOR ALL PAGES
   STUDENT-FRIENDLY & SIMPLE
   USING FLEXBOX ONLY (NO CSS GRID)
   ========================================== */

/* CSS VARIABLES */
:root {
  --primary-color: #2ecc71;
  --primary-dark: #27ae60;
  --text-dark: #1a1a1a;
  --text-gray: #666;
  --bg-light: #f5f5f5;
  --border-color: #e0e0e0;
  --radius: 8px;
}

/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: #fff;
  color: var(--text-dark);
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
}

/* ============ NAVIGATION ============ */
nav {
  background: #fff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.logo-text {
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--text-dark);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  align-items: center;
}

.nav-menu a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  position: relative;
}

.nav-menu a.active {
  color: var(--primary-color);
}

.nav-menu a:hover {
  color: var(--primary-color);
}

.cart-count {
  background: #e74c3c;
  color: #fff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 0.75rem;
  display: none;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -8px;
  right: -8px;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--text-dark);
  transition: 0.3s;
}

/* ============ HERO SECTION ============ */
.hero {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: #fff;
  padding: 4rem 2rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

/* ============ CONTAINER & LAYOUT ============ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Featured Products Grid (FLEXBOX) */
.featured-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.featured-grid .product-card {
  flex: 1 1 calc(25% - 1.5rem);
  min-width: 250px;
}

/* Features Grid (FLEXBOX) */
.features-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.feature-card {
  flex: 1 1 calc(33.333% - 2rem);
  min-width: 250px;
  background: #fff;
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ============ BUTTONS ============ */
.btn {
  background: var(--primary-color);
  color: #fff;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  transition: background 0.3s;
}

.btn:hover {
  background: var(--primary-dark);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: #fff;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ============ PRODUCT CARD (SHARED) ============ */
.product-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.product-image-box {
  width: 100%;
  height: 200px;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-image-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-title {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.product-rating {
  color: #f39c12;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.product-price {
  font-weight: bold;
  color: var(--primary-color);
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.product-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
}

.product-actions button {
  flex: 1;
  padding: 0.6rem;
  font-size: 0.9rem;
}

/* ============ FOOTER ============ */
footer {
  background: var(--text-dark);
  color: #fff;
  padding: 3rem 2rem 1rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.footer-section {
  flex: 1 1 calc(25% - 2rem);
  min-width: 200px;
}

.footer-section h4 {
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: #ddd;
  text-decoration: none;
}

.footer-section a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #444;
  color: #999;
}

/* ============ RESPONSIVE DESIGN ============ */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    background: #fff;
    flex-direction: column;
    width: 100%;
    padding: 2rem 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: left 0.3s;
  }

  .nav-menu.active {
    left: 0;
  }

  .hamburger {
    display: flex;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .featured-grid .product-card {
    flex: 1 1 calc(50% - 1.5rem);
    min-width: 150px;
  }

  .feature-card {
    flex: 1 1 100%;
  }

  .footer-content {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .navbar {
    padding: 1rem;
  }

  .hero {
    padding: 3rem 1rem;
  }

  .container {
    padding: 1rem;
  }

  .featured-grid .product-card {
    flex: 1 1 100%;
  }
}

/* ==========================================
   FINAL UI FIXES
   ADD TO BOTTOM OF main.css
   ========================================== */

/* ------------------------------------------------
   FIX 1: Grid sections must be SIDE-BY-SIDE
   (Mission & Values, Contact cards, Store cards)
   ------------------------------------------------ */

.grid-2,
.grid-3,
.grid-4,
.info-cards,
.contact-cards,
.store-list {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

/* 2 columns */
.grid-2 > * {
  flex: 1 1 calc(50% - 2rem);
}

/* 3 columns */
.grid-3 > * {
  flex: 1 1 calc(33.333% - 2rem);
}

/* 4 columns (By The Numbers) */
.grid-4 > * {
  flex: 1 1 calc(25% - 2rem);
}


/* ------------------------------------------------
   FIX 2: "By The Numbers" must align horizontally
   ------------------------------------------------ */

.stats,
.numbers {
  display: flex;
  gap: 2rem;
  text-align: center;
}


/* ------------------------------------------------
   FIX 3: Subscribe / Newsletter email input too small
   ------------------------------------------------ */

.subscribe-form,
.newsletter-form {
  display: flex;
  gap: 1rem;
  max-width: 520px;
}

.subscribe-form input,
.newsletter-input {
  flex: 1;
  min-width: 280px;
  padding: 12px;
  font-size: 16px;
}


/* ------------------------------------------------
   FIX 4: REMOVE white lines near "Remember me"
   ------------------------------------------------ */

hr {
  display: none;
}

.flex-between-full,
.remember-me,
.login-options {
  border: none !important;
  padding: 0 !important;
}


/* ------------------------------------------------
   FIX 5: Center Google / Facebook login buttons
   ------------------------------------------------ */

.social-buttons,
.social-login {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 20px;
  flex-wrap: wrap;
}

.social-buttons button,
.social-login button {
  min-width: 150px;
}


/* ------------------------------------------------
   RESPONSIVE: Stack on mobile
   ------------------------------------------------ */

@media (max-width: 768px) {
  .grid-2 > *,
  .grid-3 > *,
  .grid-4 > * {
    flex: 1 1 100%;
  }

  .subscribe-form,
  .newsletter-form {
    flex-direction: column;
  }
}

