/* ==========================================================================
   NOOR THEME - STYLES & TAILWIND HELPERS
   ========================================================================== */

/* Color utilities */
.bg-surface { background-color: #faf9f9; }
.bg-surface-container-lowest { background-color: #ffffff; }
.bg-surface-container-low { background-color: #f5f3f3; }
.bg-surface-container { background-color: #efeded; }
.bg-surface-container-high { background-color: #e9e8e8; }
.bg-surface-container-highest { background-color: #e3e2e2; }
.bg-primary { background-color: #000000; }
.bg-primary-container { background-color: #1c1b1b; }
.bg-secondary { background-color: #5d5f5f; }
.bg-error { background-color: #ba1a1a; }
.bg-error-container { background-color: #ffdad6; }

.text-on-surface { color: #1b1c1c; }
.text-on-surface-variant { color: #444748; }
.text-on-primary { color: #ffffff; }
.text-primary { color: #000000; }
.text-secondary { color: #5d5f5f; }
.text-outline { color: #747878; }
.text-error { color: #ba1a1a; }
.text-surface { color: #faf9f9; }

.border-surface-variant { border-color: #e3e2e2; }
.border-outline-variant { border-color: #c4c7c7; }
.border-outline { border-color: #747878; }

/* Spacing tokens */
.p-space-xs { padding: 0.25rem; }
.p-space-sm { padding: 0.5rem; }
.p-space-md { padding: 1rem; }
.p-space-lg { padding: 1.5rem; }
.p-space-xl { padding: 2.5rem; }

.px-margin { padding-left: 1rem; padding-right: 1rem; }
.px-margin-mobile { padding-left: 1rem; padding-right: 1rem; }
@media (min-width: 768px) {
  .px-margin { padding-left: 2rem; padding-right: 2rem; }
}
@media (min-width: 1024px) {
  .px-margin { padding-left: 3rem; padding-right: 3rem; }
}

.py-space-xs { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-space-sm { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-space-md { padding-top: 1rem; padding-bottom: 1rem; }
.py-space-lg { padding-top: 1.5rem; padding-bottom: 1.5rem; }

.gap-space-xs { gap: 0.25rem; }
.gap-space-sm { gap: 0.5rem; }
.gap-space-md { gap: 1rem; }
.gap-space-lg { gap: 1.5rem; }

/* Typography */
.font-arabic { font-family: 'Cairo', 'IBM Plex Sans Arabic', system-ui, sans-serif; }
.text-label-sm { font-size: 11px; line-height: 15px; font-weight: 600; }
.text-label-md { font-size: 13px; line-height: 18px; font-weight: 600; }
.text-label-lg { font-size: 14px; line-height: 20px; font-weight: 600; }
.text-body-sm { font-size: 12px; line-height: 18px; }
.text-body-md { font-size: 14px; line-height: 22px; }
.text-body-lg { font-size: 16px; line-height: 26px; }
.text-headline-sm { font-size: 18px; line-height: 26px; font-weight: 700; }
.text-headline-md { font-size: 22px; line-height: 30px; font-weight: 700; }
.text-headline-lg { font-size: 28px; line-height: 36px; font-weight: 800; }
.text-headline-lg-mobile { font-size: 24px; line-height: 32px; font-weight: 800; }

/* Product Card Aspect Ratio */
.product-card-img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  width: 100%;
}

/* Modals & Drawers */
.noor-modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(17, 17, 17, 0.55);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease-in-out;
}
.noor-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.noor-modal-card {
  background: #ffffff;
  border-radius: 1rem;
  max-width: 90%;
  width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  transform: translateY(20px);
  transition: transform 0.25s ease-in-out;
}
.noor-modal-overlay.active .noor-modal-card {
  transform: translateY(0);
}

/* Toast notifications */
.noor-toast {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1b1c1c;
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 999;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.noor-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Quantity input styling */
.quantity-box {
  display: inline-flex;
  align-items: center;
  background: #efeded;
  border-radius: 0.5rem;
  padding: 2px;
}
.quantity-box button {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 0.375rem;
  transition: background-color 0.15s;
}
.quantity-box button:hover {
  background: #ffffff;
}
.quantity-box input {
  width: 40px;
  text-align: center;
  background: transparent;
  border: none;
  font-weight: 700;
  font-size: 14px;
}

/* Free shipping meter */
.shipping-progress-bar {
  height: 6px;
  background: #efeded;
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}
.shipping-progress-fill {
  height: 100%;
  background: #000000;
  border-radius: 9999px;
  transition: width 0.4s ease;
}

/* Egyptian Quick Order Form */
.quick-order-panel {
  border: 1px solid #e3e2e2;
  transition: all 0.2s ease;
}
.quick-order-panel:focus-within {
  border-color: #000000;
  box-shadow: 0 0 0 1px #000000;
}

/* Responsive grid for catalog */
.products-catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (min-width: 768px) {
  .products-catalog-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}
@media (min-width: 1024px) {
  .products-catalog-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
}

/* Mobile bottom nav safe margin for body */
body {
  padding-bottom: 4.5rem;
}
@media (min-width: 1024px) {
  body {
    padding-bottom: 0;
  }
}
