/* Restaurant Website - Complete Styles (Production Ready) */
:root {
  --color-bg: #3a2a1f;
  --color-gold: #e0b366;
  --color-gold-light: #ffddad;
  --color-ivory: #f8f4ef;
  --color-overlay: rgba(58, 42, 31, 0.65);
  --font-primary: "Cairo", sans-serif;
  --transition: all 0.3s ease;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --glass-bg: rgba(58, 42, 31, 0.85);
  --glass-border: rgba(224, 179, 102, 0.2);
  
  /* Safe Area Insets for modern devices */
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-right: env(safe-area-inset-right, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-left: env(safe-area-inset-left, 0px);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background-color: var(--color-bg);
  color: var(--color-ivory);
  line-height: 1.6;
  overflow-x: hidden;
  padding-bottom: 100px;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  transition: var(--transition);
}

/* Accessibility Improvements */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--color-gold);
  color: var(--color-bg);
  padding: 0.5rem 1rem;
  z-index: 10000;
  text-decoration: none;
  font-weight: 700;
  border-radius: 0 0 8px 0;
}

.skip-to-content:focus {
  top: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus Visible States */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 2px;
}

*:focus:not(:focus-visible) {
  outline: none;
}

input,
select,
textarea {
  font-family: inherit;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  padding: 1rem 0;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-gold);
  letter-spacing: 0.5px;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-ivory);
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  background: rgba(224, 179, 102, 0.15);
  border: 1px solid var(--glass-border);
}

.lang-btn:hover {
  background: rgba(224, 179, 102, 0.25);
  transform: translateY(-2px);
}

/* Hero Section */
.hero {
  position: relative;
  height: 500px;
  background: linear-gradient(135deg, #3a2a1f 0%, #5d4a3a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 70px;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--color-overlay);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  max-width: 800px;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--color-gold);
  margin-bottom: 1rem;
  text-shadow: 2px 2px 12px rgba(0, 0, 0, 0.7);
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--color-gold-light);
  text-shadow: 1px 1px 8px rgba(0, 0, 0, 0.5);
}

/* Menu Section */
.menu-section {
  padding: 4rem 0;
  min-height: 60vh;
}

.category-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--color-gold);
  text-align: center;
  margin-bottom: 2.5rem;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.menu-item {
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  transition: var(--transition);
  cursor: pointer;
}

.menu-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(224, 179, 102, 0.3);
  border-color: var(--color-gold);
}

.menu-item-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.menu-item-content {
  padding: 1.5rem;
}

.menu-item-name {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-gold-light);
  margin-bottom: 0.5rem;
}

.menu-item-description {
  font-size: 0.95rem;
  color: var(--color-ivory);
  opacity: 0.85;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.menu-item-price {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-gold);
  margin-bottom: 1rem;
}

.add-to-cart-btn {
  width: 100%;
  padding: 0.875rem;
  background: var(--color-gold);
  color: var(--color-bg);
  font-weight: 700;
  border-radius: 8px;
  transition: var(--transition);
}

.add-to-cart-btn:hover {
  background: var(--color-gold-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(224, 179, 102, 0.4);
}

/* Story Section */
.story-section {
  padding: 5rem 0;
  background: linear-gradient(to bottom, rgba(58, 42, 31, 0.95) 0%, var(--color-bg) 100%);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-gold);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: 1.5rem;
  color: var(--color-gold-light);
}

.story-paragraphs p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--color-ivory);
  margin-bottom: 1.5rem;
  text-align: justify;
}

/* Founder Section */
.founder-section {
  padding: 5rem 0;
  background: var(--color-bg);
}

.founder-content {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  align-items: center;
}

.founder-image {
  width: 100%;
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 3px solid var(--color-gold);
}

.founder-name {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-gold);
  margin-bottom: 0.5rem;
}

.founder-title {
  font-size: 1.2rem;
  color: var(--color-gold-light);
  margin-bottom: 2rem;
}

.founder-bio {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--color-ivory);
  margin-bottom: 2rem;
  text-align: justify;
}

/* Branches Section */
.branches-section {
  padding: 4rem 0;
  background: var(--color-bg);
}

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

.branch-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2rem;
  transition: var(--transition);
}

.branch-card:hover {
  transform: translateY(-8px);
  border-color: var(--color-gold);
}

.branch-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-gold);
  margin-bottom: 1rem;
}

.branch-detail {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--color-ivory);
  margin-bottom: 0.5rem;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  overflow-y: auto;
}

.modal.active {
  display: flex;
  align-items: flex-end;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.glass-modal {
  position: relative;
  background: rgba(58, 42, 31, 0.95);
  backdrop-filter: blur(16px);
  border: 2px solid rgba(224, 179, 102, 0.3);
  border-radius: 20px 20px 0 0;
  margin: auto;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease-out;
}

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

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  background: rgba(224, 179, 102, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gold);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
  z-index: 1;
}

.modal-close:hover {
  background: rgba(224, 179, 102, 0.2);
  transform: rotate(90deg);
}

.modal-body {
  padding: 2rem;
  padding-top: 3rem;
}

.modal-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-gold);
  margin-bottom: 1rem;
  text-align: center;
}

.modal-image {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.modal-description {
  color: var(--color-ivory);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.modal-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-gold);
  margin-bottom: 1.5rem;
  text-align: center;
}

/* Size Options */
.options-section {
  margin-bottom: 1.5rem;
}

.input-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-gold-light);
  margin-bottom: 0.75rem;
}

.size-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.size-option-btn {
  background: rgba(224, 179, 102, 0.1);
  border: 1px solid rgba(224, 179, 102, 0.2);
  border-radius: 8px;
  padding: 0.75rem;
  color: var(--color-ivory);
  transition: var(--transition);
}

.size-option-btn:hover {
  background: rgba(224, 179, 102, 0.15);
  border-color: var(--color-gold);
}

.size-option-btn.active {
  background: rgba(224, 179, 102, 0.25);
  border-color: var(--color-gold);
  color: var(--color-gold);
}

/* Notes Input */
.notes-input {
  width: 100%;
  background: rgba(224, 179, 102, 0.08);
  border: 1px solid rgba(224, 179, 102, 0.2);
  border-radius: 8px;
  padding: 0.75rem;
  color: var(--color-ivory);
  font-size: 0.9rem;
  resize: vertical;
  margin-bottom: 1.5rem;
}

.notes-input::placeholder {
  color: rgba(248, 244, 239, 0.5);
}

.notes-input:focus {
  outline: none;
  border-color: var(--color-gold);
  background: rgba(224, 179, 102, 0.12);
}

/* Buttons */
.btn-primary,
.btn-secondary {
  padding: 0.875rem 1.5rem;
  border-radius: 8px;
  font-weight: 700;
  transition: var(--transition);
  width: 100%;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-light));
  color: var(--color-bg);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(224, 179, 102, 0.4);
}

.btn-secondary {
  background: rgba(224, 179, 102, 0.1);
  color: var(--color-gold);
  border: 1px solid rgba(224, 179, 102, 0.3);
}

.btn-secondary:hover {
  background: rgba(224, 179, 102, 0.15);
  border-color: var(--color-gold);
}

/* Cart Items - Enhanced visibility */
.cart-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
  max-height: 400px;
  overflow-y: auto;
}

.cart-item {
  background: rgba(224, 179, 102, 0.12);
  border: 1.5px solid rgba(224, 179, 102, 0.25);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
}

.cart-item:hover {
  background: rgba(224, 179, 102, 0.18);
  border-color: rgba(224, 179, 102, 0.4);
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-weight: 700;
  color: var(--color-gold-light);
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

.cart-item-size {
  font-size: 0.9rem;
  color: var(--color-gold);
  font-weight: 600;
}

.cart-item-notes {
  font-size: 0.85rem;
  color: var(--color-ivory);
  margin-top: 0.35rem;
  opacity: 0.9;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.qty-btn {
  width: 32px;
  height: 32px;
  background: rgba(224, 179, 102, 0.15);
  border-radius: 6px;
  color: var(--color-gold);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.qty-btn:hover {
  background: rgba(224, 179, 102, 0.25);
}

.qty-display {
  width: 24px;
  text-align: center;
  color: var(--color-ivory);
  font-weight: 600;
}

.cart-total {
  background: rgba(224, 179, 102, 0.08);
  border: 1px solid rgba(224, 179, 102, 0.2);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.total-label {
  color: var(--color-gold-light);
  font-weight: 600;
}

.total-amount {
  color: var(--color-gold);
  font-weight: 700;
  font-size: 1.2rem;
}

/* Navigation */
.nav-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  display: flex;
  justify-content: space-around;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--glass-border);
  padding: 0.5rem 0 1rem 0;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-ivory);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  transition: var(--transition);
  flex: 1;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(224, 179, 102, 0.15);
  color: var(--color-gold);
  transform: translateY(-2px);
}

/* Floating Cart Button */
.floating-cart {
  position: fixed;
  bottom: 80px;
  right: 1rem;
  z-index: 998;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(224, 179, 102, 0.3);
  color: var(--color-bg);
  transition: var(--transition);
}

.floating-cart:hover {
  transform: scale(1.1) rotate(10deg);
  box-shadow: 0 12px 32px rgba(224, 179, 102, 0.4);
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ef4444;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Notification */
.notification {
  position: fixed;
  top: 100px;
  right: 1rem;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 12px;
  padding: 1rem;
  backdrop-filter: blur(8px);
  z-index: 3000;
  transform: translateX(400px);
  transition: var(--transition);
}

.notification.show {
  transform: translateX(0);
}

.notification-success {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.1);
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-ivory);
}

.notification-icon {
  font-size: 1.5rem;
  color: #22c55e;
}

/* Checkout Steps - Enhanced visibility with golden borders and proper contrast */
.checkout-step {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

.checkout-step.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.step-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-gold-light);
  margin-bottom: 1.5rem;
  text-align: center;
}

/* Branch and Payment Options - Golden borders with proper contrast */
.options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.branch-option,
.payment-option {
  background: rgba(224, 179, 102, 0.12);
  border: 1.5px solid rgba(224, 179, 102, 0.25);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-ivory);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  cursor: pointer;
}

.branch-option:hover,
.payment-option:hover {
  background: rgba(224, 179, 102, 0.18);
  border-color: rgba(224, 179, 102, 0.4);
  color: var(--color-gold);
  transform: translateY(-4px);
}

.branch-option svg,
.payment-option svg {
  width: 32px;
  height: 32px;
  color: var(--color-gold);
}

/* Form Inputs with golden borders and proper contrast */
.form-group {
  margin-bottom: 1rem;
}

.text-input {
  width: 100%;
  background: rgba(224, 179, 102, 0.08);
  border: 1.5px solid rgba(224, 179, 102, 0.2);
  border-radius: 8px;
  padding: 0.875rem;
  color: var(--color-ivory);
  font-size: 0.95rem;
  transition: var(--transition);
}

.text-input::placeholder {
  color: rgba(248, 244, 239, 0.5);
}

.text-input:focus {
  outline: none;
  border-color: var(--color-gold);
  background: rgba(224, 179, 102, 0.12);
  box-shadow: 0 0 0 3px rgba(224, 179, 102, 0.1);
}

/* Checkout Actions with proper button spacing */
.checkout-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.checkout-actions .btn-secondary,
.checkout-actions .btn-primary {
  flex: 1;
}

/* Review Text with proper visibility */
.review-text {
  color: var(--color-gold-light);
  font-weight: 600;
  text-align: center;
  margin-bottom: 1.5rem;
}

/* Progress Bar */
.progress-bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.progress-step {
  flex: 1;
  height: 6px;
  background: rgba(224, 179, 102, 0.15);
  border-radius: 3px;
  position: relative;
}

.progress-step.active,
.progress-step.completed {
  background: linear-gradient(90deg, var(--color-gold), var(--color-gold-light));
}

/* Cart Modal specific styles with enhanced colors */
.cart-modal .cart-item {
  background: rgba(224, 179, 102, 0.15);
  border: 1.5px solid var(--color-gold);
  border-radius: 12px;
  padding: 1.25rem;
}

.cart-modal .cart-item:hover {
  background: rgba(224, 179, 102, 0.2);
  box-shadow: 0 4px 12px rgba(224, 179, 102, 0.25);
}

.cart-modal .cart-item-name {
  color: var(--color-gold-light);
  font-size: 1rem;
  font-weight: 700;
}

.cart-modal .cart-item-price {
  color: var(--color-gold);
  font-weight: 700;
}

.cart-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .menu-grid {
    grid-template-columns: 1fr;
  }

  .founder-content {
    grid-template-columns: 1fr;
  }

  .story-content {
    grid-template-columns: 1fr;
  }
}
