/* ==================== VARIABLES & COLORS - AZU Brand ==================== */
:root {
  --primary-color: #a19dd7;
  --secondary-color: #111111;
  --accent-color: #515152;
  --light-bg: #f5f3f8;
  --white: #FFFFFF;
  --border-color: #E8E8E8;
  --success-color: #4CAF50;
  --danger-color: #F44336;
  --spacing-xs: 8px;
  --spacing-sm: 12px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* ==================== RESET & BASE ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: 'IBM Plex Sans Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
  color: var(--primary-color);
  background-color: #000000;
  line-height: 1.6;
}

/* ==================== CONTAINER ==================== */
.start-order-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--spacing-lg);
}

/* ==================== HERO SECTION ==================== */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-2xl);
  align-items: center;
  padding: var(--spacing-2xl);
  background: linear-gradient(135deg, var(--primary-color) 0%, #8b87bd 100%);
  color: var(--white);
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-2xl);
  overflow: hidden;
}

.hero-content {
  z-index: 2;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  opacity: 0.9;
}

.hero-description {
  font-size: 1rem;
  margin-bottom: var(--spacing-lg);
  opacity: 0.8;
  line-height: 1.6;
}

.hero-btn {
  font-size: 1rem;
  padding: var(--spacing-md) var(--spacing-xl);
}

.hero-visual {
  position: relative;
  height: 300px;
}

.visual-element {
  position: absolute;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 300"><circle cx="100" cy="100" r="80" fill="rgba(161,157,215,0.2)"/><circle cx="300" cy="200" r="120" fill="rgba(161,157,215,0.15)"/><path d="M 50 50 Q 150 100 250 50" stroke="rgba(161,157,215,0.3)" stroke-width="2" fill="none"/></svg>') no-repeat center;
  background-size: cover;
}

/* ==================== STEPS INDICATOR ==================== */
.steps-indicator {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-2xl);
  gap: var(--spacing-lg);
}

.step-item {
  flex: 1;
  text-align: center;
}

.step-number {
  width: 48px;
  height: 48px;
  background: var(--light-bg);
  border: 2px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  margin: 0 auto var(--spacing-sm);
  color: var(--accent-color);
  transition: all 0.3s ease;
}

.step-item.active .step-number {
  background: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 8px rgba(161, 157, 215, 0.1);
}

.step-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-color);
  transition: color 0.3s ease;
}

.step-item.active .step-label {
  color: var(--primary-color);
}

.step-connector {
  flex: 1;
  height: 2px;
  background: var(--border-color);
  margin-top: 24px;
}

.step-item:last-child .step-connector,
.step-connector:last-of-type {
  display: none;
}

/* ==================== FORM CONTAINER ==================== */
.form-container {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--spacing-2xl);
  box-shadow: var(--shadow-sm);
}

/* ==================== FORM STEP ==================== */
.form-step {
  display: none;
  animation: fadeIn 0.3s ease;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  color: var(--primary-color);
}

.step-description {
  font-size: 1rem;
  color: var(--accent-color);
  margin-bottom: var(--spacing-xl);
}

/* ==================== FORM GRID ==================== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.form-group.full-width {
  grid-column: 1 / -1;
}

/* ==================== FORM ELEMENTS ==================== */
.form-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: var(--spacing-sm);
}

.form-input,
.form-select {
  width: 100%;
  padding: var(--spacing-md);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 1rem;
  color: var(--primary-color);
  background: var(--white);
  transition: all 0.3s ease;
  font-family: inherit;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(161, 157, 215, 0.1);
}

.form-input::placeholder {
  color: #999;
}

/* ==================== CATEGORY FILTER ==================== */
.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-lg);
  border-bottom: 1px solid var(--border-color);
}

.category-btn {
  padding: var(--spacing-sm) var(--spacing-lg);
  border: 1px solid var(--border-color);
  background: var(--white);
  color: var(--primary-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.category-btn:hover {
  border-color: var(--primary-color);
  background: var(--light-bg);
}

.category-btn.active {
  background: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

/* ==================== PRODUCTS GRID ==================== */
.products-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.product-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.product-image {
  width: 100%;
  height: 200px;
  background: var(--light-bg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.no-image {
  color: var(--accent-color);
  font-size: 0.9rem;
}

.product-info {
  flex: 1;
  padding: var(--spacing-md);
}

.product-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: var(--spacing-sm);
  line-height: 1.3;
  min-height: 2.6em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: var(--spacing-sm);
}

.product-availability {
  margin-bottom: var(--spacing-md);
}

.available {
  display: inline-block;
  background: rgba(76, 175, 80, 0.1);
  color: var(--success-color);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
}

.unavailable {
  display: inline-block;
  background: rgba(244, 67, 54, 0.1);
  color: var(--danger-color);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
}

.product-actions {
  padding: var(--spacing-md);
  border-top: 1px solid var(--border-color);
}

/* ==================== QUANTITY CONTROL ==================== */
.quantity-control {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.qty-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--white);
  color: var(--primary-color);
  cursor: pointer;
  font-weight: 700;
  font-size: 1.2rem;
  transition: all 0.2s ease;
}

.qty-btn:hover {
  background: var(--light-bg);
}

.qty-input {
  width: 50px;
  border: none;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-color);
  background: var(--white);
  -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ==================== RADIO GROUPS ==================== */
.radio-group {
  display: grid;
  gap: var(--spacing-md);
}

.radio-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: var(--spacing-md);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}

.radio-label:hover {
  background: var(--light-bg);
}

.radio-label input[type="radio"] {
  margin-right: var(--spacing-md);
  cursor: pointer;
  accent-color: var(--primary-color);
  width: 18px;
  height: 18px;
}

.radio-label input[type="radio"]:checked {
  accent-color: var(--accent-color);
}

/* ==================== ORDER SUMMARY ==================== */
.order-summary {
  background: var(--light-bg);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-xl);
  border-left: 4px solid var(--primary-color);
}

.order-summary h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--spacing-lg);
  color: var(--primary-color);
}

.summary-items {
  margin-bottom: var(--spacing-md);
}

.summary-item {
  display: flex;
  justify-content: space-between;
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid rgba(161, 157, 215, 0.1);
  font-size: 0.95rem;
}

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

.summary-item-name {
  font-weight: 600;
  color: var(--primary-color);
}

.summary-item-details {
  color: var(--accent-color);
  text-align: left;
  flex: 1;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  padding: var(--spacing-md) 0;
  border-top: 2px solid rgba(161, 157, 215, 0.1);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-top: var(--spacing-md);
}

.total-amount {
  color: var(--primary-color);
}

/* ==================== FINAL SUMMARY ==================== */
.final-message {
  text-align: center;
  margin-bottom: var(--spacing-2xl);
}

.message-box {
  background: linear-gradient(135deg, var(--primary-color) 0%, #8b87bd 100%);
  color: var(--white);
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
}

.message-box h3 {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
}

.message-box p {
  font-size: 1rem;
  opacity: 0.95;
}

.final-summary {
  background: var(--light-bg);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-xl);
  border-left: 4px solid var(--primary-color);
}

.final-summary h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--spacing-lg);
  color: var(--primary-color);
}

.summary-details {
  display: grid;
  gap: var(--spacing-md);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: var(--spacing-md);
  background: var(--white);
  border-radius: var(--radius-md);
  font-weight: 600;
  color: var(--primary-color);
}

.detail-row.total {
  background: linear-gradient(135deg, rgba(161, 157, 215, 0.05), rgba(161, 157, 215, 0.08));
  font-size: 1.1rem;
  border-top: 2px solid var(--border-color);
  padding: var(--spacing-lg);
}

.final-value {
  text-align: left;
  color: var(--accent-color);
  font-weight: 700;
}

/* ==================== BUTTONS ==================== */
.btn-primary,
.btn-secondary {
  padding: var(--spacing-md) var(--spacing-xl);
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

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

.btn-primary:hover {
  background: #8b87bd;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

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

.btn-secondary {
  background: var(--light-bg);
  color: var(--primary-color);
  border: 1px solid var(--border-color);
}

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

.btn-large {
  width: 100%;
  padding: var(--spacing-lg) var(--spacing-xl);
  font-size: 1.1rem;
}

/* ==================== FORM ACTIONS ==================== */
.form-actions {
  display: flex;
  justify-content: space-between;
  gap: var(--spacing-lg);
  margin-top: var(--spacing-xl);
}

.form-actions .btn-secondary {
  flex: 0 0 auto;
}

.form-actions .btn-primary {
  flex: 1;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .start-order-container {
    padding: var(--spacing-md);
  }

  .hero-section {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    padding: var(--spacing-lg);
  }

  .hero-title {
    font-size: 2rem;
  }

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

  .hero-visual {
    height: 200px;
  }

  .steps-indicator {
    gap: var(--spacing-sm);
    flex-wrap: wrap;
  }

  .step-connector {
    display: none;
  }

  .step-item {
    flex: 0 1 calc(50% - var(--spacing-sm));
  }

  .form-container {
    padding: var(--spacing-lg);
  }

  .step-title {
    font-size: 1.5rem;
  }

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

  .category-filter {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .category-btn {
    white-space: nowrap;
  }

  .products-container {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--spacing-md);
  }

  .product-image {
    height: 150px;
  }

  .quantity-control {
    flex-direction: row;
  }

  .qty-btn {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }

  .qty-input {
    width: 40px;
    font-size: 0.9rem;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .form-actions .btn-secondary,
  .form-actions .btn-primary {
    width: 100%;
  }

  .message-box {
    padding: var(--spacing-lg);
  }

  .message-box h3 {
    font-size: 1.2rem;
  }

  .message-box p {
    font-size: 0.9rem;
  }

  .detail-row {
    flex-direction: column;
    gap: var(--spacing-sm);
  }
}

@media (max-width: 480px) {
  .start-order-container {
    padding: var(--spacing-sm);
  }

  .hero-section {
    padding: var(--spacing-lg) var(--spacing-md);
  }

  .hero-title {
    font-size: 1.5rem;
  }

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

  .form-container {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
  }

  .step-title {
    font-size: 1.2rem;
  }

  .step-description {
    font-size: 0.9rem;
  }

  .products-container {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  .product-image {
    height: 120px;
  }

  .radio-label {
    padding: var(--spacing-sm);
    font-size: 0.9rem;
  }

  .btn-primary,
  .btn-secondary {
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 0.95rem;
  }
}

/* ==================== PACKAGES SECTION ==================== */
.packages-section {
  margin-bottom: var(--spacing-2xl);
}

.section-heading {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.section-heading h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: var(--spacing-sm);
}

.section-heading p {
  color: var(--white);
  opacity: 0.7;
  font-size: 1rem;
}

.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--spacing-lg);
}

.package-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  display: flex;
  flex-direction: column;
  text-align: center;
}

.package-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: var(--spacing-md);
}

.package-contents {
  list-style: none;
  margin-bottom: var(--spacing-md);
  color: var(--accent-color);
  flex: 1;
}

.package-contents li {
  padding: 6px 0;
  font-size: 0.95rem;
}

.package-desc {
  color: var(--accent-color);
  font-size: 0.95rem;
  margin-bottom: var(--spacing-lg);
  flex: 1;
}

.package-min {
  font-weight: 700;
  color: var(--primary-color);
  background: var(--light-bg);
  border-radius: var(--radius-sm);
  padding: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
  font-size: 0.9rem;
}

.package-card .btn-primary,
.package-card .btn-secondary {
  width: 100%;
}

/* ==================== PACKAGE BANNER (STEP 2) ==================== */
.package-banner {
  background: var(--light-bg);
  border: 1px solid var(--primary-color);
  border-radius: var(--radius-md);
  padding: var(--spacing-md) var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
}

.package-banner-text strong {
  color: var(--primary-color);
  display: block;
  margin-bottom: 4px;
}

.package-banner-text p {
  color: var(--accent-color);
  font-size: 0.9rem;
}

/* ==================== MIN ORDER BANNER ==================== */
.min-order-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
  background: rgba(161, 157, 215, 0.08);
  border: 1px solid var(--primary-color);
  border-radius: var(--radius-md);
  padding: var(--spacing-md) var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.min-order-text strong {
  color: var(--primary-color);
  font-size: 1rem;
  display: block;
  margin-bottom: 4px;
}

.min-order-text p {
  color: var(--accent-color);
  font-size: 0.9rem;
}

.quote-btn {
  white-space: nowrap;
}

/* ==================== PIECES STATUS ==================== */
.pieces-status {
  margin-bottom: var(--spacing-lg);
  font-size: 0.9rem;
}

.pieces-status:empty {
  margin-bottom: 0;
}

.pieces-status-ok {
  color: var(--success-color);
  font-weight: 600;
}

.pieces-status-warning {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(244, 67, 54, 0.06);
  border: 1px solid rgba(244, 67, 54, 0.3);
  border-radius: var(--radius-md);
  padding: var(--spacing-sm) var(--spacing-md);
  color: var(--danger-color);
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--primary-color);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
}

/* ==================== PRODUCT CARD EXTRAS ==================== */
.product-unit {
  font-size: 0.85rem;
  color: var(--accent-color);
  margin-bottom: var(--spacing-sm);
}

.product-card.recommended {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(161, 157, 215, 0.15);
  position: relative;
}

.recommended-badge {
  display: block;
  background: var(--primary-color);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
  padding: 4px 8px;
}

.add-to-order-btn {
  width: 100%;
  margin-top: var(--spacing-sm);
  padding: var(--spacing-sm);
  font-size: 0.9rem;
}

/* ==================== EMPTY STATES ==================== */
.empty-cart-message {
  color: #999;
  text-align: center;
  padding: 20px;
}

.summary-item-unit {
  color: var(--accent-color);
  font-weight: 400;
  font-size: 0.85rem;
}

/* ==================== QUOTE MODAL ==================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  align-items: center;
  justify-content: center;
  padding: var(--spacing-lg);
  z-index: 10000;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-lg) var(--spacing-xl);
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-size: 1.3rem;
  color: var(--primary-color);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--accent-color);
}

.modal-body {
  padding: var(--spacing-xl);
}

.modal-body textarea.form-input {
  resize: vertical;
  font-family: inherit;
}

.modal-footer {
  display: flex;
  gap: var(--spacing-md);
  padding: var(--spacing-lg) var(--spacing-xl);
  border-top: 1px solid var(--border-color);
}

.modal-footer .btn-primary,
.modal-footer .btn-secondary {
  flex: 1;
}

@media (max-width: 768px) {
  .packages-grid {
    grid-template-columns: 1fr;
  }

  .min-order-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .quote-btn {
    width: 100%;
  }
}
