@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
  --primary: #ffb703;
  --primary-dark: #fb8500;
  --bg-dark: #121212;
  --bg-card: #1e1e1e;
  --text-light: #f5f5f5;
  --text-muted: #a0a0a0;
  --success: #2ecc71;
  --danger: #e74c3c;
  --spacing: 1rem;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  --header-height: 100px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
  padding-bottom: 100px;
  /* Space for mobile cart button */
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(10px);
  display: grid;
  /* Use grid three columns to perfectly center the middle one */
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 2rem;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo-container {
  grid-column: 2;
  /* Place in the middle column */
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-img {
  height: 80px;
  /* Increased size */
  object-fit: contain;
}

/* Cart Button (Header & Mobile Float) */
.cart-btn-container {
  grid-column: 3;
  /* Place in the right column */
  justify-self: end;
  position: relative;
}

.cart-icon-btn {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.5rem;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s;
}

.cart-icon-btn:hover {
  transform: scale(1.1);
  color: var(--primary);
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--danger);
  color: white;
  font-size: 0.75rem;
  font-weight: bold;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hero Section */
.hero {
  margin-top: var(--header-height);
  padding: 4rem 2rem;
  text-align: center;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), var(--bg-dark)), url('imgi_39_abd74e6e-d38b-4395-a572-467cf2ad8eee.png');
  background-size: cover;
  background-position: center;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Menu Grid */
.menu-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.product-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
}

.product-image-container {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #151515;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.product-card:hover .product-img {
  transform: scale(1.05);
}

.product-info {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.product-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  flex-grow: 1;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.product-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.add-btn {
  background: var(--primary);
  color: black;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.add-btn:hover {
  background: var(--primary-dark);
}

/* Cart Modal/Sidebar */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 400px;
  height: 100%;
  background: var(--bg-card);
  z-index: 1001;
  transition: all 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
}

.cart-open .cart-overlay {
  opacity: 1;
  visibility: visible;
}

.cart-open .cart-sidebar {
  right: 0;
}

.cart-header {
  padding: 1.5rem;
  background: var(--bg-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.close-cart {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.5rem;
  cursor: pointer;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.cart-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cart-item-img {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  object-fit: cover;
}

.cart-item-details {
  flex: 1;
}

.cart-item-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.cart-item-price {
  color: var(--primary);
  font-size: 0.9rem;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.qty-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-footer {
  padding: 1.5rem;
  background: var(--bg-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.checkout-btn {
  width: 100%;
  background: var(--success);
  color: white;
  border: none;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius);
  cursor: pointer;
  transition: filter 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.checkout-btn:hover {
  filter: brightness(1.1);
}

/* Floating Action Button (Mobile) */
.fab-cart {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--primary);
  color: black;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 15px rgba(255, 183, 3, 0.4);
  z-index: 90;
  cursor: pointer;
  border: none;
}

.fab-count {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--danger);
  color: white;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
}