/* 
  Bonda by Duck & Noodle - Global Styles
  Mobile-First Design approach 
*/

/* --- CSS Variables (Design Tokens) --- */
:root {
  /* Brand Colors */
  --primary-color: #0D6E6E;      /* Deep Teal */
  --accent-color: #C4501A;       /* Warm Orange/Coral */
  --bg-color: #F5F0E8;           /* Cream */
  --text-color: #1A1A1A;         /* Near-Black */
  --light-accent: #E8F4F1;       /* Very Light Teal */
  --white: #FFFFFF;
  --border-color: #e0dcd2;
  --error-color: #d32f2f;
  
  /* Typography */
  --font-heading: 'Playfair Display', serif;
  --font-body: 'DM Sans', sans-serif;
  
  /* Layout */
  --max-width: 1280px;
  --header-height-mobile: 60px;
  --header-height-desktop: 80px;
  --bottom-nav-height: 60px;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

/* --- Base Reset & Typography --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px; /* Base 16px for mobile */
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: var(--bottom-nav-height); /* For mobile bottom nav */
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

h1 { font-size: 28px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-color);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

/* --- Layout Utility Classes --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.section {
  padding: 3rem 0;
}

.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

/* --- Components --- */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-align: center;
  min-height: 48px; /* Mobile tap target */
  min-width: 48px;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--white);
}

.btn-primary:hover, .btn-primary:active {
  background-color: #0a5656;
  color: var(--white);
}

.btn-accent {
  background-color: var(--accent-color);
  color: var(--white);
}

.btn-accent:hover, .btn-accent:active {
  background-color: #a34114;
  color: var(--white);
}

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

.btn-outline:hover, .btn-outline:active {
  background-color: var(--primary-color);
  color: var(--white);
}

.btn-full {
  width: 100%;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--primary-color);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-color);
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  transition: border-color var(--transition-fast);
  min-height: 52px; /* Mobile tap target */
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px var(--light-accent);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* Image Placeholders */
.img-placeholder {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-color);
  font-size: 14px;
  width: 100%;
  height: 100%;
  min-height: 200px;
}

/* Halal Badge */
.halal-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--light-accent);
  color: var(--primary-color);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.875rem;
  border: 1px solid var(--primary-color);
}

/* --- Navigation --- */
/* Top Header - Floating Pill Style */
.site-header {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1000px;
  height: 65px;
  background-color: var(--white);
  border-radius: 50px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}

.site-header.header-hidden {
  transform: translate(-50%, -150%);
  pointer-events: none;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0 1.5rem;
}

.header-brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.logo-container {
  display: flex;
  align-items: center;
  height: 40px;
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
}

.logo-img {
  height: 100%;
  width: auto;
  object-fit: contain;
}

.logo-container svg {
  height: 100%;
  width: auto;
}

.menu-toggle {
  display: block;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary-color);
  cursor: pointer;
  padding: 0.5rem;
}

/* Desktop Navigation (Hidden on mobile) */
.desktop-nav {
  display: none;
}

.header-order-btn {
  border-radius: 50px;
  padding: 0.6rem 1.8rem;
  box-shadow: 0 4px 15px rgba(196,80,26,0.3);
  display: none;
}

/* Mobile Fullscreen Menu */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-color);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  padding: 2rem;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
  overflow-y: auto;
}

.mobile-menu-overlay.active {
  transform: translateX(0);
}

.mobile-menu-close {
  align-self: flex-end;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--primary-color);
  cursor: pointer;
  margin-bottom: 2rem;
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mobile-nav-link {
  font-family: var(--font-heading);
  font-size: 24px;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 700;
  display: block;
}

.mobile-nav-link:hover, .mobile-nav-link.active {
  color: var(--accent-color);
}

/* Mobile Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--bottom-nav-height);
  background-color: var(--white);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
  z-index: 900;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 0.5rem;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.75rem;
  gap: 4px;
  padding: 0.5rem;
  min-width: 64px;
}

.bottom-nav-item i {
  font-size: 1.25rem;
  color: var(--primary-color);
}

.bottom-nav-item.active {
  color: var(--accent-color);
}

.bottom-nav-item.active i {
  color: var(--accent-color);
}

/* --- Footer --- */
.site-footer {
  background-color: #111; /* Darker premium footer */
  color: var(--white);
  padding: 4rem 0 2rem;
  /* No margin-bottom — body padding-bottom handles bottom nav spacing */
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.footer-logo svg text {
  fill: var(--white);
}

.footer-heading {
  color: var(--accent-color);
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.footer-links {
  list-style: none;
}

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

.footer-links a {
  color: var(--white);
  opacity: 0.8;
}

.footer-links a:hover {
  opacity: 1;
  color: var(--accent-color);
}

.footer-text {
  opacity: 0.8;
  margin-bottom: 0.5rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255,255,255,0.1);
  border-radius: 50%;
  color: var(--white);
  font-size: 1.25rem;
  transition: background-color var(--transition-fast);
}

.social-links a:hover {
  background-color: var(--accent-color);
}

.footer-bottom {
  text-align: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.875rem;
  opacity: 0.7;
}

/* --- Animations & Premium Utilities --- */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.glass-panel {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
}

.glass-panel-dark {
  background: rgba(26, 26, 26, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
  color: var(--white);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: all 0.8s ease-out;
}
.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.8s ease-out;
}
.reveal-left.visible, .reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* --- Media Queries --- */

/* Tablet (768px+) */
@media (min-width: 768px) {
  h1 { font-size: 36px; }
  h2 { font-size: 28px; }
  
  .section { padding: 4rem 0; }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
  body {
    padding-bottom: 0; /* Remove bottom nav padding */
  }
  
  h1 { font-size: 48px; }
  h2 { font-size: 36px; }
  h3 { font-size: 24px; }
  
  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    padding: 0 2rem;
  }

  .site-header {
    height: var(--header-height-desktop);
  }
  
  .logo-container {
    height: 50px;
  }
  
  .menu-toggle { display: none; }
  .bottom-nav { display: none; }
  .site-footer { margin-bottom: 0; }
  
  .desktop-nav {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    align-items: center;
    white-space: nowrap;
  }
  
  .header-order-btn {
    display: inline-block;
  }
  
  .desktop-nav-link {
    font-weight: 600;
    color: var(--text-color);
    position: relative;
  }
  
  .desktop-nav-link:hover, .desktop-nav-link.active {
    color: var(--primary-color);
  }
  
  .desktop-nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width var(--transition-fast);
  }
  
  .desktop-nav-link:hover::after, .desktop-nav-link.active::after {
    width: 100%;
  }
  
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Wide Desktop (1280px+) */
@media (min-width: 1280px) {
  .section { padding: 5rem 0; }
}

/* Global Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 5px;
    border: 2px solid var(--bg-color);
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--accent-color);
}

main.section {
    padding-top: 120px;
}
