/* MuffinMarket Web Layout - Responsive Design */

/* ===== RESET & BASE ===== */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== CONTAINER ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container-fluid {
  width: 100%;
  padding: 0 var(--space-md);
}

.container-sm {
  max-width: 640px;
}

.container-md {
  max-width: 768px;
}

.container-lg {
  max-width: 1024px;
}

.container-xl {
  max-width: 1280px;
}

/* ===== GRID SYSTEM ===== */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 calc(-1 * var(--space-sm));
}

.col {
  flex: 1;
  padding: 0 var(--space-sm);
}

.col-1 { flex: 0 0 8.333333%; }
.col-2 { flex: 0 0 16.666667%; }
.col-3 { flex: 0 0 25%; }
.col-4 { flex: 0 0 33.333333%; }
.col-5 { flex: 0 0 41.666667%; }
.col-6 { flex: 0 0 50%; }
.col-7 { flex: 0 0 58.333333%; }
.col-8 { flex: 0 0 66.666667%; }
.col-9 { flex: 0 0 75%; }
.col-10 { flex: 0 0 83.333333%; }
.col-11 { flex: 0 0 91.666667%; }
.col-12 { flex: 0 0 100%; }

/* ===== HEADER ===== */
.header {
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-primary);
}

.logo img {
  height: 40px;
  width: auto;
  margin-right: var(--space-sm);
}

.logo-text {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--primary);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: var(--font-medium);
  transition: color var(--transition-fast);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
}

.nav-link:hover {
  color: var(--primary);
  background-color: var(--gray-100);
}

.nav-link.active {
  color: var(--primary);
  background-color: var(--muffin-cream);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: var(--text-xl);
  color: var(--text-primary);
  cursor: pointer;
  padding: var(--space-xs);
}

/* ===== HERO SECTION ===== */
.hero {
  background: linear-gradient(135deg, var(--muffin-cream) 0%, var(--muffin-beige) 100%);
  padding: var(--space-3xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23EC861B" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23EC861B" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="%23EC861B" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="%23EC861B" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="%23EC861B" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: var(--text-5xl);
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
}

.hero p {
  font-size: var(--text-xl);
  color: var(--text-secondary);
  margin-bottom: var(--space-2xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== SECTIONS ===== */
.section {
  padding: var(--space-3xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-title {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.section-alt {
  background-color: var(--muffin-cream);
}

/* ===== FEATURES ===== */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-2xl);
  margin-top: var(--space-2xl);
}

.feature {
  text-align: center;
  padding: var(--space-lg);
}

.feature-icon {
  width: 80px;
  height: 80px;
  background-color: var(--primary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-lg);
  color: var(--white);
  font-size: var(--text-2xl);
}

.feature h3 {
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.feature p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== FOOTER ===== */
.footer {
  background-color: var(--muffin-dark-brown);
  color: var(--muffin-cream);
  padding: var(--space-3xl) 0 var(--space-lg);
  margin-top: auto;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-section h3 {
  color: var(--muffin-cream);
  margin-bottom: var(--space-md);
  font-size: var(--text-lg);
}

.footer-section p,
.footer-section a {
  color: var(--muffin-font);
  line-height: 1.6;
}

.footer-section a:hover {
  color: var(--muffin-cream);
}

.footer-bottom {
  border-top: 1px solid var(--muffin-brown);
  padding-top: var(--space-lg);
  text-align: center;
  color: var(--muffin-font);
  font-size: var(--text-sm);
}

.social-links {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--muffin-brown);
  color: var(--muffin-cream);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.social-link:hover {
  background-color: var(--primary);
  transform: translateY(-2px);
}

/* ===== UTILITIES ===== */
.d-flex { display: flex; }
.d-inline-flex { display: inline-flex; }
.d-block { display: block; }
.d-inline-block { display: inline-block; }
.d-none { display: none; }

.flex-column { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }

.justify-center { justify-content: center; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }

.align-center { align-items: center; }
.align-start { align-items: flex-start; }
.align-end { align-items: flex-end; }
.align-stretch { align-items: stretch; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }
.w-auto { width: auto; }
.h-auto { height: auto; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .container {
    max-width: 100%;
    padding: 0 var(--space-lg);
  }
  
  .hero h1 {
    font-size: var(--text-4xl);
  }
  
  .hero p {
    font-size: var(--text-lg);
  }
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }
  
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--white);
    flex-direction: column;
    padding: var(--space-md);
    box-shadow: var(--shadow-lg);
    border-top: 1px solid var(--gray-200);
  }
  
  .nav.active {
    display: flex;
  }
  
  .hero {
    padding: var(--space-2xl) 0;
  }
  
  .hero h1 {
    font-size: var(--text-3xl);
  }
  
  .hero p {
    font-size: var(--text-base);
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-buttons .btn {
    width: 100%;
    max-width: 300px;
  }
  
  .section {
    padding: var(--space-2xl) 0;
  }
  
  .features {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .social-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }
  
  .hero h1 {
    font-size: var(--text-2xl);
  }
  
  .section-title {
    font-size: var(--text-2xl);
  }
  
  .card {
    padding: var(--space-md);
  }
}
