:root {
  /* Colors */
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --primary-light: #e0f2fe;
  --secondary: #0d9488;
  --secondary-dark: #0f766e;
  --accent: #f59e0b;
  
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #f8fafc;
  
  --bg-main: #ffffff;
  --bg-light: #f1f5f9;
  --bg-glass: rgba(255, 255, 255, 0.85);
  
  /* Typography */
  --font-kufi: 'Noto Kufi Arabic', sans-serif;
  --font-tajawal: 'Tajawal', sans-serif;
  
  /* Shadows & Transitions */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
  
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-tajawal);
  color: var(--text-main);
  background-color: var(--bg-main);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-kufi);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
}

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

ul {
  list-style: none;
}

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

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

.section {
  padding: 6rem 0;
}

.bg-light {
  background-color: var(--bg-light);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 50px;
  font-family: var(--font-kufi);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.4);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
  color: white;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.3);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.4);
}

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

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

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.5rem 0;
  transition: var(--transition);
}

.header.is-scrolled {
  padding: 0.75rem 0;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-sm);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--primary);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-text strong {
  font-family: var(--font-kufi);
  font-size: 1.125rem;
  line-height: 1.2;
}

.logo-text small {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.nav {
  display: none;
}

@media (min-width: 992px) {
  .nav {
    display: flex;
    gap: 2rem;
  }
  .nav a {
    font-family: var(--font-kufi);
    font-weight: 500;
    color: var(--text-main);
    position: relative;
  }
  .nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
  }
  .nav a:hover::after,
  .nav a.active::after {
    width: 100%;
  }
  .nav a:hover,
  .nav a.active {
    color: var(--primary);
  }
}

.header-cta {
  display: none;
}

@media (min-width: 992px) {
  .header-cta {
    display: inline-flex;
  }
  .menu-btn {
    display: none;
  }
}

.menu-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-main);
  cursor: pointer;
}

/* Mobile Nav */
.mobile-nav {
  position: fixed;
  top: 70px;
  left: 0;
  width: 100%;
  background: var(--bg-main);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-md);
  z-index: 999;
  transform: translateY(-100%);
  opacity: 0;
  transition: all 0.4s ease;
}

.mobile-nav:not([hidden]) {
  transform: translateY(0);
  opacity: 1;
}

.mobile-nav a {
  font-family: var(--font-kufi);
  font-size: 1.125rem;
  font-weight: 600;
  padding: 0.75rem;
  border-radius: 8px;
  background: var(--bg-light);
  text-align: center;
}

.mobile-nav a:hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 5rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(0,0,0,0.5), rgba(0,0,0,0.1));
}

.hero-text-box {
  max-width: 600px;
  padding: 3rem;
  border-radius: 24px;
}

.glass-panel {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow-glass);
}

.badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 50px;
  font-family: var(--font-kufi);
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: 3.5rem;
  color: var(--primary-dark);
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.125rem;
  color: var(--text-main);
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .hero h1 { font-size: 2.5rem; }
  .hero-text-box { padding: 2rem; }
}

/* Section Header */
.section-header {
  margin-bottom: 4rem;
}

.subtitle {
  display: inline-block;
  color: var(--primary);
  font-family: var(--font-kufi);
  font-weight: 600;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-header h2 {
  font-size: 2.5rem;
  color: var(--text-main);
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 992px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

.image-wrapper {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.image-wrapper img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.experience-badge {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  background: var(--primary);
  color: white;
  padding: 1.5rem;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(2, 132, 199, 0.4);
}

.experience-badge .number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  font-family: var(--font-kufi);
  line-height: 1;
}

.experience-badge .text {
  font-size: 0.875rem;
  font-family: var(--font-kufi);
}

.about-content h3 {
  font-size: 2rem;
  color: var(--primary-dark);
  margin-bottom: 1rem;
}

.about-content p {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.features-list {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.feature-item {
  display: flex;
  gap: 1.25rem;
}

.feature-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.feature-item h4 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.feature-item p {
  font-size: 1rem;
  margin-bottom: 0;
}

/* Products Section */
.product-showcase {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 992px) {
  .product-showcase {
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
  }
  .product-showcase.row-reverse {
    direction: ltr; /* Flip the grid */
  }
  .product-showcase.row-reverse > * {
    direction: rtl; /* Reset text direction */
  }
}

.brand-title {
  font-size: 2.5rem;
  color: var(--primary-dark);
}

.brand-desc {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.product-types {
  margin-bottom: 2.5rem;
}

.product-types li {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.product-types li i {
  color: var(--secondary);
  font-size: 1.25rem;
}

.product-image-container {
  position: relative;
  padding: 2rem;
}

.blob-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 0;
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  animation: morph 8s ease-in-out infinite;
}

.blob-blue {
  background-color: rgba(2, 132, 199, 0.1);
}

.blob-teal {
  background-color: rgba(13, 148, 136, 0.1);
}

@keyframes morph {
  0%, 100% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
  34% { border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%; }
  67% { border-radius: 100% 60% 60% 100% / 100% 100% 60% 60%; }
}

.product-main-img {
  position: relative;
  z-index: 1;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  transform: translateY(0);
  transition: transform 0.5s ease;
}

.product-image-container:hover .product-main-img {
  transform: translateY(-10px);
}

/* Catalog Section */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.catalog-card {
  background: var(--bg-main);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid rgba(0,0,0,0.05);
}

.catalog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.catalog-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: var(--transition);
}

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

/* Contact Section */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  border-radius: 24px;
  overflow: hidden;
}

@media (min-width: 992px) {
  .contact-wrapper {
    grid-template-columns: 1fr 2fr;
  }
}

.contact-info {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 3rem 2rem;
}

.contact-info h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.contact-info > p {
  color: var(--primary-light);
  margin-bottom: 2.5rem;
}

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

.info-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.info-text strong {
  display: block;
  font-family: var(--font-kufi);
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.info-text a {
  color: white;
  font-size: 1.125rem;
}

.info-text a:hover {
  text-decoration: underline;
}

.contact-form-container {
  padding: 3rem 2rem;
}

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

@media (min-width: 768px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

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

.form-group label {
  display: block;
  font-family: var(--font-kufi);
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-family: var(--font-tajawal);
  font-size: 1rem;
  transition: var(--transition);
  background: var(--bg-main);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.select-wrapper {
  position: relative;
}

/* --- Modal Styles for Main Site --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  padding: 1rem;
}

.modal-box {
  background: var(--bg-main);
  width: 100%;
  max-height: 95vh;
  overflow-y: auto;
  padding: 2rem;
  border-radius: 24px;
  position: relative;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.dark-modal {
  background: rgba(25, 30, 45, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
  transition: var(--transition);
}

.close-btn:hover {
  color: #ef4444;
}

.product-details-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 768px) {
  .product-details-layout {
    grid-template-columns: 1fr 1fr;
  }
}

.select-wrapper::after {
  content: '\f107';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
}

.form-group select {
  appearance: none;
}

.form-error {
  background: #fee2e2;
  color: #b91c1c;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-success {
  text-align: center;
  padding: 2rem;
  background: #dcfce7;
  border-radius: 12px;
  color: #166534;
}

.success-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* Footer */
.footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 4rem 0 2rem;
}

.footer-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  margin-bottom: 3rem;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-top {
    flex-direction: row;
    justify-content: space-between;
    text-align: right;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: white;
}

.footer-brand .logo-icon {
  background: transparent;
  border: 2px solid white;
}

.brand-text strong {
  display: block;
  font-family: var(--font-kufi);
  font-size: 1.25rem;
}

.brand-text span {
  font-size: 0.75rem;
  letter-spacing: 1px;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a:hover {
  color: white;
}

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

/* ========================================================
   Floating WhatsApp Smart Widget
   ======================================================== */
.floating-whatsapp-widget {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 9990;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: var(--font-tajawal);
}

.floating-whatsapp-btn {
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 2rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
  position: relative;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.floating-whatsapp-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.5);
}

.whatsapp-tooltip {
  position: absolute;
  right: 70px;
  background: #1e293b;
  color: #ffffff;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.85rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translateX(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.floating-whatsapp-btn:hover .whatsapp-tooltip {
  opacity: 1;
  transform: translateX(0);
}

.pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid #25D366;
  animation: pulseWa 2s infinite;
  pointer-events: none;
}

@keyframes pulseWa {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.5); opacity: 0; }
}

.whatsapp-chat-popup {
  width: 310px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.18);
  margin-bottom: 12px;
  overflow: hidden;
  animation: slideUpWa 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

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

.whatsapp-popup-header {
  background: #075E54;
  color: #ffffff;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
}

.whatsapp-agent-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.whatsapp-agent-info strong {
  display: block;
  font-size: 0.95rem;
}

.whatsapp-agent-info span {
  font-size: 0.75rem;
  opacity: 0.85;
}

.close-wa-popup {
  position: absolute;
  top: 12px;
  left: 12px;
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  font-size: 1.1rem;
}

.whatsapp-popup-body {
  padding: 1.25rem;
  background: #ECE5DD;
  position: relative;
}

.whatsapp-popup-body p {
  background: #ffffff;
  padding: 0.85rem 1rem;
  border-radius: 12px 0 12px 12px;
  font-size: 0.9rem;
  color: #1e293b;
  line-height: 1.5;
  margin: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.chat-time {
  display: block;
  font-size: 0.7rem;
  color: #64748b;
  text-align: left;
  margin-top: 0.25rem;
}

.whatsapp-popup-footer {
  padding: 0.85rem 1.25rem;
  background: #ffffff;
}

.btn-wa-start {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #25D366;
  color: #ffffff;
  padding: 0.75rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: background 0.2s ease;
}

.btn-wa-start:hover {
  background: #1ebc59;
}

/* ========================================================
   Catalog Filters & Badges
   ======================================================== */
.catalog-filters-bar {
  margin-top: 1.5rem;
}

.filter-tab {
  background: rgba(2, 132, 199, 0.06);
  border: 1px solid rgba(2, 132, 199, 0.2);
  color: var(--primary-dark);
  padding: 0.5rem 1.25rem;
  border-radius: 30px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.filter-tab:hover {
  background: rgba(2, 132, 199, 0.15);
  transform: translateY(-1px);
}

.filter-tab.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

/* Featured Badge on Product Card */
.catalog-card {
  position: relative;
}

.featured-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.4);
  z-index: 5;
}
