/* FMT Vending Machine POC — Styles */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f5f5f5;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  background: #1a73e8;
  color: #fff;
  padding: 1rem 2rem;
  text-align: center;
}

header h1 { font-size: 1.5rem; margin-bottom: 0.5rem; }

header nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 0.5rem;
}

header nav a,
header nav .nav-current {
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

header nav a:hover { background: rgba(255, 255, 255, 0.2); }
header nav .nav-current { background: rgba(255, 255, 255, 0.25); font-weight: 600; }
.machine-id { font-size: 0.8rem; opacity: 0.8; }

/* Main */
main { flex: 1; max-width: 960px; margin: 2rem auto; padding: 0 1rem; width: 100%; }

/* Notification */
.notification { padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 1.5rem; font-size: 0.95rem; text-align: center; transition: opacity 0.3s ease; }
.notification.hidden { display: none; }
.notification.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.notification.error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* Product Grid */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.5rem; }

/* Product Card */
.product-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product-card:hover { transform: translateY(-3px); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12); }

.product-image { width: 100%; height: 160px; background: #e8eaf6; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-image img { max-width: 100%; max-height: 100%; object-fit: contain; }
.product-image.no-image::after { content: "📦"; font-size: 3rem; }

.product-info { padding: 1rem; text-align: center; }
.product-name { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; }
.product-price { font-size: 1.25rem; font-weight: 700; color: #1a73e8; margin-bottom: 0.75rem; }

.order-btn { width: 100%; padding: 0.6rem; background: #1a73e8; color: #fff; border: none; border-radius: 6px; font-size: 0.95rem; cursor: pointer; transition: background 0.2s ease; }
.order-btn:hover { background: #1557b0; }
.order-btn:active { background: #0d47a1; }
.order-btn:disabled { background: #aaa; cursor: not-allowed; }

/* Footer */
footer { text-align: center; padding: 1rem; font-size: 0.85rem; color: #888; border-top: 1px solid #e0e0e0; }

@media (max-width: 600px) {
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
  header h1 { font-size: 1.2rem; }
}
