/* Burger-master Core Design System & Stylesheet */

:root {
  --bg-main: #0b0d10;
  --bg-surface: #14171f;
  --bg-card: #1c202b;
  --bg-card-hover: #242938;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(255, 159, 28, 0.3);

  --primary-color: #ff9f1c;
  --primary-hover: #ff8c00;
  --primary-glow: rgba(255, 159, 28, 0.25);
  --secondary-color: #ff4500;
  --accent-green: #00e676;
  --accent-blue: #3b82f6;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-glow: 0 0 25px rgba(255, 159, 28, 0.2);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

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

button, input, select {
  font-family: inherit;
  outline: none;
  border: none;
}

button {
  cursor: pointer;
}

/* Glassmorphism Utility */
.glass {
  background: rgba(20, 23, 31, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
}

.glass-card {
  background: rgba(28, 32, 43, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
}

/* Header & Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);

  i {
    font-size: 1.8rem;
    color: var(--primary-color);
    filter: drop-shadow(0 0 8px var(--primary-glow));
  }

  .brand-name {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;

  a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);

    &:hover, &.active {
      color: var(--primary-color);
    }
  }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-icon {
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition-fast);

  &:hover {
    background: rgba(255, 159, 28, 0.15);
    color: var(--primary-color);
    border-color: var(--border-highlight);
    transform: translateY(-2px);
  }

  .badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--secondary-color);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-main);
  }
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  color: #0b0d10;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-glow);
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;

  &:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(255, 159, 28, 0.4);
    background: linear-gradient(135deg, #ffae3d 0%, var(--primary-color) 100%);
  }
}

/* Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Hero Section */
.hero {
  padding: 4rem 0 3rem 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-content {
  .tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    background: rgba(255, 159, 28, 0.1);
    border: 1px solid var(--border-highlight);
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
  }

  h1 {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.25rem;

    span {
      color: var(--primary-color);
    }
  }

  p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 90%;
  }
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;

  &:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-muted);
  }
}

.hero-image-wrapper {
  position: relative;
  display: flex;
  justify-content: center;

  .glow-bg {
    position: absolute;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, var(--primary-glow) 0%, rgba(0,0,0,0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
  }

  .hero-img {
    position: relative;
    z-index: 1;
    border-radius: var(--radius-xl);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-card);
    transition: var(--transition-smooth);
    max-height: 380px;
    object-fit: cover;

    &:hover {
      transform: scale(1.03) rotate(1deg);
    }
  }
}

/* Filter Section */
.section-header {
  text-align: center;
  margin-bottom: 2.5rem;

  h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
  }

  p {
    color: var(--text-muted);
  }
}

.category-tabs {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-weight: 600;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.5rem;

  &:hover {
    color: var(--text-main);
    background: var(--bg-card);
  }

  &.active {
    background: var(--primary-color);
    color: #0b0d10;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
  }
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 5rem;
}

.product-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;

  &:hover {
    transform: translateY(-6px);
    border-color: var(--border-highlight);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), var(--shadow-glow);
  }
}

.product-img-box {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: #11131a;

  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
  }

  &:hover img {
    transform: scale(1.08);
  }

  .badge-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(11, 13, 16, 0.8);
    backdrop-filter: blur(8px);
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-highlight);
  }
}

.product-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;

  .product-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
  }

  .product-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    flex-grow: 1;
  }

  .product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
  }

  .price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-color);
  }
}

/* Tag Utility Component */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  background: rgba(255, 159, 28, 0.1);
  border: 1px solid var(--border-highlight);
  color: var(--primary-color);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  width: fit-content;
}

/* Custom Burger Builder Section */
.builder-section {
  padding: 3.5rem 2.5rem;
  margin-bottom: 5rem;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(20, 23, 31, 0.6) 0%, rgba(28, 32, 43, 0.8) 100%);
  border: 1px solid var(--border-color);
}

.builder-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.burger-visualizer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  background: rgba(11, 13, 16, 0.7);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-highlight);
  padding: 2.5rem 1.5rem;
  position: relative;
}

.burger-layers {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 100%;
  max-width: 280px;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.layer-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-md);
  text-align: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  min-height: 28px;
  line-height: 1.2;
}

.layer-bun-top {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
  border-radius: 40px 40px 10px 10px;
  min-height: 46px;
  border-bottom: 3px solid #b45309;
  font-size: 0.9rem;
}

.layer-bun-bottom {
  background: linear-gradient(180deg, #d97706 0%, #92400e 100%);
  border-radius: 10px 10px 25px 25px;
  min-height: 38px;
  border-top: 3px solid #b45309;
  font-size: 0.9rem;
}

.layer-patty {
  background: linear-gradient(180deg, #5c2406 0%, #3a1503 100%);
  border-radius: 12px;
  min-height: 32px;
  color: #fde68a;
  border: 1px solid #78350f;
}

.layer-cheese {
  background: #facc15;
  color: #1e1b4b;
  border-radius: 8px;
  min-height: 26px;
  font-weight: 800;
}

.layer-lettuce {
  background: #22c55e;
  color: #052e16;
  border-radius: 10px;
  min-height: 26px;
  font-weight: 800;
}

.layer-tomato {
  background: #ef4444;
  color: #ffffff;
  border-radius: 10px;
  min-height: 26px;
  font-weight: 800;
}

.layer-bacon {
  background: #be123c;
  color: #fff;
  border-radius: 8px;
  min-height: 26px;
  font-weight: 800;
}

@keyframes popIn {
  0% { transform: scale(0.6) translateY(-8px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.builder-controls {
  h3 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
  }
  p { color: var(--text-muted); margin-bottom: 1.5rem; }
}

.ingredient-options {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.ingredient-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);

  .ing-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
  }

  .ing-price {
    color: var(--primary-color);
    font-weight: 700;
  }

  .counter-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.08);
    color: var(--text-main);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);

    &:hover {
      background: var(--primary-color);
      color: #000;
    }
  }
}

.builder-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);

  .total-calc {
    span { color: var(--text-muted); font-size: 0.9rem; display: block; margin-bottom: 0.2rem; }
    h4 { font-size: 2rem; font-weight: 800; color: var(--primary-color); line-height: 1; }
  }
}

/* Cart Drawer Sidebar */
.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  height: 100vh;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -10px 0 40px rgba(0,0,0,0.6);
}

.cart-drawer.open {
  right: 0;
}

.cart-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cart-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-header {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);

  h3 { font-weight: 800; font-size: 1.3rem; }
}

.cart-items-list {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255,255,255,0.03);
  padding: 0.8rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);

  img {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    object-fit: cover;
  }

  .item-details {
    flex-grow: 1;
    h5 { font-size: 0.95rem; font-weight: 700; }
    .item-price { color: var(--primary-color); font-weight: 700; font-size: 0.9rem; }
  }

  .item-qty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0,0,0,0.3);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
  }
}

.cart-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border-color);
  background: rgba(11, 13, 16, 0.9);

  .price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: var(--text-muted);

    &.total-row {
      color: var(--text-main);
      font-size: 1.2rem;
      font-weight: 800;
      margin-top: 0.8rem;
      padding-top: 0.8rem;
      border-top: 1px dashed var(--border-color);

      .total-amount { color: var(--primary-color); }
    }
  }

  .btn-checkout {
    width: 100%;
    margin-top: 1.25rem;
    justify-content: center;
  }
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;

  &.open {
    opacity: 1;
    pointer-events: auto;
  }
}

.modal-content {
  width: 90%;
  max-width: 500px;
  border-radius: var(--radius-xl);
  padding: 2rem;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.open .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.2rem;
  &:hover { color: #fff; }
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-highlight);
  color: var(--text-main);
  padding: 0.9rem 1.4rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .hero, .builder-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-content p { margin: 0 auto 2rem auto; }
  .hero-actions { justify-content: center; }
  .cart-drawer { width: 100%; right: -100%; }
}

/* About Us Section & Footer */
.about-section {
  padding: 4rem 0;
  margin-bottom: 4rem;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  transition: var(--transition-smooth);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;

  &:hover {
    transform: translateY(-8px);
    border-color: var(--border-highlight);
    box-shadow: 0 15px 35px rgba(0,0,0,0.4), var(--shadow-glow);

    .card-action-btn {
      color: var(--primary-color);
      transform: translateX(4px);
    }
  }

  .about-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    background: rgba(255, 159, 28, 0.12);
    color: var(--primary-color);
    font-size: 1.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
  }

  h4 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
  }

  p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1;
  }

  .card-action-btn {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
  }
}

.footer {
  background: #07090c;
  border-top: 1px solid var(--border-color);
  padding: 3rem 0 2rem 0;
  color: var(--text-muted);

  .footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
  }

  .footer-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;

    a {
      color: var(--text-muted);
      text-decoration: none;
      &:hover { color: var(--primary-color); }
    }
  }

  .copyright {
    text-align: center;
    font-size: 0.85rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.05);
  }
}
