@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;700&family=Playfair+Display:wght@700&display=swap');

:root {
  --bg-color: #fdf8f3;
  --text-color: #3a2f2a;
  --accent-color: #4b2e20;
  --card-bg: #fffbf5;
  --border-color: #c9bfae;
  --transition: 0.3s ease;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Caveat', cursive;
  font-size: 1.2rem;
  background: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
  overflow-x: hidden;
  box-shadow: inset 0 0 40px rgba(75, 46, 32, 0.15);
}

/* Serif font for specific elements */
h2, h3, h4, .header-links a, .category-nav li, .menu-item span,
button, .cart-bar, .cart-total {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Header */
header {
  padding: 1.5rem 1rem;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-color);
}

header h1 {
  margin: 0 0 1rem;
  font-size: 2.5rem;
  color: var(--accent-color);
}

.header-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem; /*gap between social icons*/
  flex-wrap: wrap;
}

.header-links a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-color);
  font-size: 0.85rem;
  transition: color var(--transition);
}

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

.header-links i {
  font-size: 1rem;
}

/* Category Navigation */
.category-nav {
  background: var(--bg-color);
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.category-nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
  white-space: nowrap;
  min-width: min-content;
}

.category-nav li {
  font-size: 0.9rem;
  cursor: pointer;
  transition: color var(--transition);
}

/* .category-nav li.active {
  border-bottom: 2px dashed var(--accent-color);
  color: var(--accent-color);
} */

/* Menu Section */
.menu-section {
  padding: 1rem;
}

/* category name header */
.menu-section h3 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.menu-grid {
  display: grid;
  gap: 1rem;
}

/* Menu Items */
.menu-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
  transition: all var(--transition);
  position: relative; 
}

.item-image {
  position: relative;
  height: 120px;
  width: 120px;
  flex-shrink: 0;
}

.item-image img {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  object-fit: cover;
  filter: sepia(0.25);
}

/* Add Button */
.menu-item > .add-btn {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 1;
}

.menu-item > .add-btn:hover {
  background: #5a3a2a;
  transform: scale(1.1);
}

.item-info {
  flex: 1;
  padding: 0.75rem;
  min-width: 0;
  position: relative;
}

/* menu item name */
.menu-item h4 {
  margin: 0 0 0.3rem;
  font-size: 1.1rem;
}

/* menu item description */
.menu-item p {
  font-size: 1rem;
  line-height: 1.4;
  color: #6b5f58;
  margin: 0 0 0.3rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* menu item price */
.menu-item span {
  display: block;
  font-size: 1rem;
}
/* ---------------------------- */
/* Customization Mode (When add button is first clicked) */
.menu-item.customizing {
  flex-direction: column;
  align-items: stretch;
  /* padding: 0;  */
}

.menu-item.customizing .item-image {
  height: 0;
  width: 0;
  visibility: hidden; 
  margin: 0; 
  padding: 0;
}

.menu-item.customizing .item-info {
  padding: 1rem 1rem 3rem 1rem;
  position: relative;
}

/* customize screen price */
.menu-item.customizing .item-info .item-price {
  position: absolute;
  bottom: 1rem; 
  left: 1rem;
}

/* Cancel Button */
.menu-item > .cancel-btn {
  background: #f44336;
  color: white;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
  position: absolute;
  bottom: 0.75rem; 
  right: 3.25rem; 
  z-index: 1;
}

.menu-item > .cancel-btn:hover {
  background: #d32f2f;
}

/* Customizing State */
.menu-item.customizing > .add-btn {
  bottom: 0.75rem;
  right: 0.75rem;
}

.menu-item.customizing > .cancel-btn {
  display: flex;
}

/* Options Container (list of menu item modifiers */
.options-container {
  margin-top: 4px;
  margin-bottom: 0; 
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.95rem;
}

/* options text (ex. No cheese) */
.options-container label {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* === Option Quantity Controls (same look as cart) === */
.option-qty-controls {
  margin-top: 0.5rem;
}

.option-qty {
  width: 40px;
  text-align: center;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.9rem;
}

/* -------------------------------- */
/* Remove Button for cart */
.remove-btn {
  background: transparent;
  border: none;
  color: #f44336;
  cursor: pointer;
  transition: color var(--transition);
  font-size: 1rem;
  margin-left: 0.5rem;
}

.remove-btn:hover {
  color: #d32f2f;
}

/* Cart */

/* cart button in bottom */
.cart-bar {
  position: fixed;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-color);
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  z-index: 10;
  max-width: calc(100% - 30px);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem; 
}

/* Cart Bump Animation */
@keyframes cart-bump {
  0% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.15); }
  100% { transform: translateX(-50%) scale(1); }
}

.cart-bar.bump {
  animation: cart-bump 0.3s ease-out;
}

/* Cart Icon Wrapper */
.cart-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-icon-wrapper .material-icons {
  color: inherit;
}

.cart-icon-wrapper #cartCount {
  position: absolute; 
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); 
  color: var(--accent-color);
}

.cart-modal {
  position: fixed;
  left: 0;
  bottom: -100%;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  transition: bottom var(--transition);
  z-index: 20;
}

.cart-modal.active {
  bottom: 0;
}

.cart-content {
  background: var(--card-bg);
  border-radius: 4px 4px 0 0;
  padding: 1.5rem;
  max-height: 70vh;
  overflow-y: auto;
}

/* === CART ITEM === */
.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 0;
}

.cart-options{
  font-size: 0.9rem;
}

/* cart menu item name w/o modifier but with price haha */
.cart-item span {
  font-size: 1rem;
}

/* Right side of cart item: qty + price + remove */
.cart-item-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-item-price {
  min-width: 70px;
  text-align: right;
}

/* Cart Total + Buttons */
.cart-total {
  margin-top: 1rem;
  font-size: 1.1rem;
}

.close-btn, #checkoutBtn {
  margin-top: 1rem;
  background: transparent;
  color: var(--accent-color);
  border: 2px solid var(--accent-color);
  border-radius: 4px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 0.9rem;
}

.close-btn:hover, #checkoutBtn:hover {
  background: rgba(75, 46, 32, 0.05);
}

/* === Quantity Controls in Cart === */
.qty-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.qty-btn {
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 4px;
  width: 22px;
  height: 22px;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}

.qty-btn:hover {
  background: #5a3a2a;
}

.qty-input {
  width: 40px;
  text-align: center;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.9rem;
}

/* Responsive Design */
@media (min-width: 768px) {
  header h1 { font-size: 4rem; }
  .menu-grid { grid-template-columns: repeat(2, 1fr); }
  .item-image { height: 140px; width: 140px; }
  .menu-item p { font-size: 1.1rem; }
  .cart-content { max-width: 600px; margin: 0 auto; border-radius: 4px; }
}

@media (min-width: 1024px) {
  header h1 { font-size: 4.5rem; }
}

/* === Remove Number Input Spinners (Chrome, Safari, Edge, Opera) === */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* === Remove Number Input Spinners (Firefox) === */
input[type="number"] {
  -moz-appearance: textfield;
}




