:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary: #f59e0b;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-card: #ffffff;
  
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  --border-primary: #e2e8f0;
  --border-secondary: #cbd5e1;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Kufi Arabic', 'Noto Naskh Arabic', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* ======================
   Hero Section
   ====================== */
.hero-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  max-height: 70vh;
}

.hero-background {
  position: relative;
  width: 100%;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-background img {
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 70vh;
  display: block;
  object-fit: contain;
  object-position: center;
}

.hero-overlay {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.8));
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-content {
  text-align: center;
  color: var(--text-primary);
}

.hero-title {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(99, 102, 241, 0.2);
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  color: var(--text-secondary);
  font-weight: 400;
}

/* ======================
   Dynamic Sentences
   ====================== */
.dynamic-sentences {
  padding: 2rem 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-primary);
  border-bottom: 1px solid var(--border-primary);
}

.sentence-container {
  text-align: center;
  position: relative;
}

.dynamic-text {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
  min-height: 2rem;
  display: inline-block;
}

.typing-indicator {
  display: inline-block;
  width: 2px;
  height: 1.5rem;
  background: var(--primary);
  margin-left: 0.25rem;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* ======================
   Order Card
   ====================== */
.order-card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-2xl);
  padding: 2rem;
  margin: 2rem auto;
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(10px);
}

/* ======================
   Product Showcase
   ====================== */
.product-showcase {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-secondary);
}

.product-image-container {
  position: relative;
}

.product-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-secondary);
}

.product-badge {
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  background: linear-gradient(135deg, var(--secondary), #fbbf24);
  color: #1f2937;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-details {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.product-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.product-price-container {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.product-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}

.price-unit {
  font-size: 0.875rem;
  color: var(--text-muted);
}


/* ======================
   Order Summary
   ====================== */
.order-summary {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-primary);
}

.summary-row:last-child {
  border-bottom: none;
}

.total-row {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--primary);
  border-top: 2px solid var(--border-secondary);
  margin-top: 0.5rem;
  padding-top: 1rem;
}

/* ======================
   Form Styles
   ====================== */
.order-form {
  display: grid;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

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

.form-label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label span {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-label input,
.form-label select,
.form-label textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 2px solid var(--border-primary);
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: all 0.2s ease;
  outline: none;
}

.form-label input:focus,
.form-label select:focus,
.form-label textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-label textarea {
  min-height: 100px;
  resize: vertical;
}

/* ======================
   Quantity Selector
   ====================== */
.quantity-selector {
  display: flex;
  align-items: center;
  background: var(--bg-primary);
  border: 2px solid var(--border-primary);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.quantity-btn {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: none;
  padding: 0.875rem 1rem;
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: 600;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
}

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

.quantity-btn:active {
  transform: scale(0.95);
}

.quantity-input {
  flex: 1;
  text-align: center;
  border: none !important;
  background: transparent !important;
  padding: 0.875rem 0.5rem !important;
  font-weight: 600;
  font-size: 1.125rem;
}

.quantity-input:focus {
  box-shadow: none !important;
}

/* ======================
   Submit Button
   ====================== */
.submit-btn {
  width: 100%;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 1.125rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.submit-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.submit-btn:hover::before {
  left: 100%;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.submit-btn:active {
  transform: translateY(0);
}

.btn-icon {
  font-size: 1.25rem;
}

/* ======================
   Product Details Section
   ====================== */
.product-details-section {
  padding: 3rem 0;
}

.details-image-container {
  text-align: center;
}

.details-image {
  max-width: 800px;
  width: 100%;
  height: auto;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-primary);
  box-shadow: var(--shadow-lg);
}

/* ======================
   Trust Indicators
   ====================== */
.trust-indicators {
  padding: 3rem 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-primary);
}

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

.indicator {
  text-align: center;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
}

.indicator:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.indicator-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.indicator-text {
  font-weight: 600;
  color: var(--text-secondary);
}

/* ======================
   Messages & Alerts
   ====================== */
.messages {
  margin: 1rem 0;
}

.alert {
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  border: 1px solid;
  font-weight: 500;
}

.alert-ok {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border-color: rgba(16, 185, 129, 0.2);
}

.alert-warn {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
  border-color: rgba(245, 158, 11, 0.2);
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border-color: rgba(239, 68, 68, 0.2);
}

.error-message {
  color: var(--error);
  font-size: 0.875rem;
  margin-top: 0.25rem;
  font-weight: 500;
}

/* ======================
   Utility Classes
   ====================== */
.hidden {
  display: none !important;
}

/* ======================
   Responsive Design
   ====================== */
@media (max-width: 768px) {
  .container {
    padding: 0 0.75rem;
  }
  
  .hero-section {
    /* Height is now auto to fit image content */
  }
  
  .order-card {
    padding: 1.5rem;
    margin: 1rem auto;
  }
  
  .product-showcase {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1rem;
  }
  
  .product-image {
    height: 150px;
    margin: 0 auto;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .indicators-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .indicator {
    padding: 1rem;
  }
  
  .indicator-icon {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .product-title {
    font-size: 1.5rem;
  }
  
  .product-price {
    font-size: 1.75rem;
  }
  
  .indicators-grid {
    grid-template-columns: 1fr;
  }
  
  .dynamic-text {
    font-size: 1rem;
  }
}

/* ======================
   Animations
   ====================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.order-card {
  animation: fadeInUp 0.6s ease-out;
}

.product-showcase {
  animation: fadeInUp 0.8s ease-out;
}

.order-summary {
  animation: fadeInUp 1s ease-out;
}

/* ======================
   Loading States
   ====================== */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { left: -100%; }
  100% { left: 100%; }
}