/* Base Styles */
:root {
  --primary-color: #8B0000;
  --secondary-color: #DAA520;
  --text-color: #2d3436;
  --light-bg: #f9f9f9;
  --dark-bg: #2d3436;
  --success-color: #6ab04c;
  --error-color: #eb4d4b;
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Open Sans', sans-serif;
  --transition: all 0.3s ease;
  --border-radius: 8px;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: var(--font-body);
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--light-bg);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  margin-bottom: 1rem;
  font-weight: 600;
}

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

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

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.btn {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition);
  font-weight: 500;
}

.btn:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}

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

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

.btn-disabled {
  background: #ccc;
  cursor: not-allowed;
}

.btn-disabled:hover {
  background: #ccc;
  transform: none;
}

.text-center {
  text-align: center;
}

.section-padding {
  padding: 5rem 0;
}

/* Header & Navigation */
header {
  background-color: white;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding-top: 1rem;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
}

.logo img {
  height: 50px;
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 2rem;
  position: relative;
}

.nav-links a {
  color: var(--primary-color);
  font-weight: 500;
  position: relative;
  padding-bottom: 5px;
  transition: var(--transition);
}

/* Animated underline on hover */
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--secondary-color);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Active page indicator */
.nav-links a.active {
  font-weight: 600;
}

.nav-links a.active::after {
  width: 100%;
  background-color: var(--primary-color);
}

.cart-icon-container {
  position: relative;
  display: none;
}

.cart-icon {
  font-size: 1.5rem;
  cursor: pointer;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.75rem;
  font-weight: bold;
}

.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-color);
}

/* Hero Section */
.hero {
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  height: 70vh;
  display: flex;
  align-items: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

.hero-content {
  position: relative;
  z-index: 1;
  color: white;
  max-width: 600px;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.hero .btn {
  background: transparent;
  border: 2px solid white;
  color: white;
}

.hero .btn:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

/* About Section */
.about-row {
    display: flex;
    gap: 3rem;
    margin-bottom: 4rem;
    align-items: center;
}

.about-row.reverse {
    flex-direction: row-reverse;
}

.about-img {
    flex: 1;
}

.about-img img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.about-content {
    flex: 1;
}

.about-content h2 {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
}

.about-content p {
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .about-row, .about-row.reverse {
        flex-direction: column;
        gap: 2rem;
    }
}

/* Menu Page Specific Styles */
.menu-section {
  padding: 4rem 0;
}

.menu-filters {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.menu-filter {
  background: none;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  padding: 0.5rem 1rem;
  margin: 0.5rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
}

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

.menu-items {
  display: grid;
  /* Create two columns, but allow them to wrap on smaller screens */
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); 
  gap: 2rem; /* Gap between items */
}

/* Responsive adjustments for menu items on smaller screens */
@media (max-width: 768px) {
  .menu-items {
    grid-template-columns: 1fr; /* Single column on smaller screens */
  }
  .menu-item {
    width: 100%; /* Ensure item takes full width in single column */
    /* Potentially adjust padding or image size if needed for very small screens */
  }
}

.menu-item {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
  display: flex; /* image and main-content side-by-side */
  flex-direction: row;
  align-items: flex-start;
  padding: 1rem;
}

.menu-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.menu-item-img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: var(--border-radius);
  margin-right: 1rem;
  flex-shrink: 0; /* Prevent image from shrinking */
}

/* New container for all textual content */
.menu-item-main-content {
  flex-grow: 1; /* Takes remaining width */
  display: flex;
  flex-direction: column; /* Stacks header, separator, description etc. */
  min-width: 0; /* Crucial for text wrapping within flex items */
}

/* Header for title and price */
.menu-item-header {
  display: flex;
  justify-content: space-between; /* Pushes title left, price right */
  align-items: flex-start; /* Align items at their top */
  width: 100%;
  margin-bottom: 0.25rem; /* Small space before separator or description */
}

.menu-item-title {
  font-size: 1.25rem; /* Adjusted size */
  font-weight: 600;
  color: var(--text-color);
  margin-right: 1rem; /* Space between title and price */
  flex-grow: 1; /* Allows title to take available space */
  white-space: normal;
  word-wrap: break-word;
  /* margin-bottom is removed as spacing is handled by header or separator */
}

/* Separator line */
.menu-item-title-separator {
  border: 0;
  height: 1px;
  background-color: #eee;
  margin: 0.5rem 0; /* Space above and below separator */
  width: 100%;
}

.menu-item-description {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.75rem;
  /* flex-grow: 1; Removed, as it might push attributes/spice down too much */
}

.menu-item-price {
  font-size: 1.2rem; /* Adjusted size */
  font-weight: bold;
  color: var(--primary-color);
  text-align: right;
  white-space: nowrap; /* Prevent price from wrapping */
  padding-left: 0.5rem; /* Minimal padding if title is short */
  /* margin-left: auto; is no longer needed due to flex parent */
}

/* Styles for .menu-item-details might be obsolete or need to be merged/removed */
/* For now, I'm leaving .menu-item-details as is, in case it's used elsewhere, */
/* but the primary styling for menu item text is now via .menu-item-main-content and its children. */
.menu-item-details { 
  /* This class was previously the main text container. */
  /* Its styles might conflict or be redundant. Review if issues persist. */
  /* For example, flex-grow: 1; display: flex; flex-direction: column; min-width: 0; */
  /* are now on .menu-item-main-content */
}

.menu-item-attributes {
  /* Placed below description in the new structure, adjust if needed */
  /* This might need to be moved within .menu-item-details if it should be grouped with title/desc */
  margin-top: 0.5rem; 
  width: 100%; /* Ensure it takes full width of its container if it's outside details */
}

.menu-item-attribute {
  background-color: #eee;
  color: #333;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  margin-right: 0.4rem;
  margin-bottom: 0.4rem; /* Add some bottom margin for wrapped attributes */
  display: inline-block;
}

.spice-level {
  font-size: 0.8rem;
  font-weight: bold;
  /* This might also need to be moved within .menu-item-details */
  margin-top: 0.5rem; 
  width: 100%;
}

.spice-level.mild { color: green; }
.spice-level.medium { color: orange; }
.spice-level.hot { color: red; }

.no-items-message {
  text-align: center;
  font-size: 1.2rem;
  color: #777;
  padding: 2rem;
  grid-column: 1 / -1; /* Span across all columns if grid is active */
}


/* Cart Page Specific Styles */
.cart-section {
  min-height: 60vh;
}

.cart-header {
  display: grid;
  grid-template-columns: 3fr 1fr 1fr 1fr;
  padding: 1rem 0;
  font-weight: bold;
  border-bottom: 1px solid #ddd;
}

.cart-items {
  margin: 2rem 0;
}

.cart-item {
  display: grid;
  grid-template-columns: 3fr 1fr 1fr 1fr;
  padding: 1rem 0;
  align-items: center;
  border-bottom: 1px solid #ddd;
}

.cart-item-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cart-item-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--border-radius);
}

.cart-item-title {
  font-weight: 500;
}

.cart-item-price, .cart-item-total {
  font-weight: 500;
}

.cart-summary {
  margin-top: 2rem;
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.cart-summary-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.cart-summary-item.total {
  padding-top: 1rem;
  border-top: 1px solid #ddd;
  font-size: 1.2rem;
  font-weight: bold;
}

.empty-cart {
  text-align: center;
  padding: 3rem 0;
}

.empty-cart h2 {
  margin-bottom: 1rem;
}

/* Contact Section */
.contact-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.contact-info {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.contact-info-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-info-icon {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.contact-form {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

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

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: var(--font-body);
}

.form-control:focus {
  outline: none;
  border-color: var(--secondary-color);
}

textarea.form-control {
  min-height: 150px;
}

/* Customer Info Form */
.customer-info-form {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin-top: 2rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Confirmation Page */
.confirmation-section {
  text-align: center;
  padding: 5rem 0;
}

.confirmation-icon {
  color: var(--success-color);
  font-size: 5rem;
  margin-bottom: 2rem;
}

.confirmation-section h2 {
  margin-bottom: 1rem;
}

.confirmation-section p {
  margin-bottom: 2rem;
}

.order-details {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  max-width: 600px;
  margin: 0 auto 2rem;
  text-align: left;
}

.order-detail-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #ddd;
}

.order-detail-item:last-child {
  border-bottom: none;
}

/* Footer */
footer {
  background: var(--dark-bg);
  color: white;
  padding: 3rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-column h3 {
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

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

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

.footer-links a {
  color: #ddd;
}

.footer-links a:hover {
  color: var(--secondary-color);
}

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

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

.social-link:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom a {
  color: white;
}

.footer-bottom a:hover {
  color: var(--secondary-color);
}