/* Typography */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800&family=Amiri:ital,wght@0,400;0,700;1,400&display=swap');

/* CSS Variables for Premium Theme */
:root {
  /* Colors */
  --bg-color: #faf9f6; /* Off-white */
  --bg-secondary: #f0ebe1; /* Warm beige */
  --text-main: #2d2c2a; /* Deep charcoal */
  --text-muted: #5e5d5b;
  --black: #111111;
  --gold: #c5a059; /* Muted gold */
  --gold-hover: #b08d4a;
  --olive: #7c8363; /* Olive accent */
  --white: #ffffff;
  --border-color: #e2dfd8;
  --border-light: #f1efeb;
  --error: #d9534f;
  --success: #5cb85c;

  /* Typography */
  --font-heading: 'Tajawal', sans-serif;
  --font-body: 'Tajawal', sans-serif;
  --font-serif: 'Amiri', serif; /* For special calligraphic emphasis */
  
  /* Layout */
  --container-width: 1280px;
  --section-padding: 80px 0;
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 16px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
}

/* Reset & Basic Setup */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  direction: rtl; /* RTL Support */
  overflow-x: hidden;
  font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--black);
}

.font-serif {
  font-family: var(--font-serif);
}

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: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--section-padding);
}

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

.text-center { text-align: center; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 48px; }
.mt-2 { margin-top: 16px; }
.mt-4 { margin-top: 32px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1rem;
  border-radius: 50px; /* Pillow shape for premium feel */
  cursor: pointer;
  transition: var(--transition);
  border: none;
  outline: none;
  text-align: center;
}

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

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

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

.btn-gold:hover {
  background-color: var(--gold-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  border-color: var(--text-main);
  background-color: var(--white);
}

.btn-whatsapp {
  background-color: #25D366;
  color: white;
  gap: 8px;
}

.btn-whatsapp:hover {
  background-color: #128C7E;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Header & Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(250, 249, 246, 0.95);
  backdrop-filter: blur(10px); /* Glassmorphism */
  z-index: 1000;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
  padding: 20px 0;
}

.header.scrolled {
  padding: 12px 0;
  box-shadow: var(--shadow-sm);
}

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

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 65px;
  width: auto;
  object-fit: contain;
  transition: var(--transition);
}

.logo img:hover {
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  gap: 40px;
}

.nav-link {
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--text-main);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  right: 0;
  width: 0;
  height: 2px;
  background-color: var(--gold);
  transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

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

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--bg-color);
  z-index: 999;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
  display: flex;
  flex-direction: column;
  padding: 100px 24px;
}

.mobile-menu-overlay.open {
  transform: translateX(0);
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 40px;
}

.mobile-nav-link {
  font-size: 1.5rem;
  font-weight: 700;
}

.close-menu-btn {
  position: absolute;
  top: 24px;
  left: 24px;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-main);
}

/* Hero Section */
.hero {
  padding: 160px 0 100px;
  min-height: 90vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content {
  max-width: 600px;
}

.brand-badge {
  display: inline-block;
  padding: 6px 16px;
  background-color: var(--bg-secondary);
  color: var(--gold);
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: 1px;
}

.hero-title {
  font-size: 4rem;
  line-height: 1.1;
  margin-bottom: 24px;
  color: var(--black);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-visual {
  position: relative;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-visual img {
  width: 100%;
  height: 600px;
  object-fit: cover;
  transition: transform 0.7s;
}

.hero-visual:hover img {
  transform: scale(1.05);
}

.decorative-blob {
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(197, 160, 89, 0.15) 0%, rgba(250, 249, 246, 0) 70%);
  border-radius: 50%;
  top: -100px;
  left: -100px;
  z-index: -1;
}

/* Section Titles */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-subtitle {
  color: var(--gold);
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
  display: block;
}

.section-title {
  font-size: 2.5rem;
  color: var(--black);
}

/* Product Cards */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 32px;
}

.product-card {
  background-color: var(--white);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}

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

.product-image-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/5;
}

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

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

.product-info {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-title {
  font-size: 1.25rem;
  margin-bottom: 8px;
  color: var(--black);
}

.product-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  flex-grow: 1;
}

.product-price {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--gold);
  margin-bottom: 16px;
}

.product-action {
  width: 100%;
  text-align: center;
  padding: 10px;
  border-radius: var(--border-radius-sm);
  background-color: var(--bg-secondary);
  color: var(--text-main);
  font-weight: 500;
  transition: var(--transition);
}

.product-card:hover .product-action {
  background-color: var(--text-main);
  color: var(--white);
}

/* Features / Why Us */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
}

.feature-card {
  text-align: center;
  padding: 32px 24px;
  background-color: var(--white);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  background-color: var(--bg-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 1.5rem;
}

.feature-title {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.feature-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Workflow Section */
.workflow-section {
  position: relative;
}

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  position: relative;
}

.workflow-step {
  text-align: center;
  position: relative;
}

.step-number {
  width: 48px;
  height: 48px;
  background-color: var(--gold);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 auto 16px;
}

.step-title {
  font-size: 1.1rem;
  font-weight: 700;
}

/* Testimonials */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.testimonial-card {
  background-color: var(--bg-color);
  padding: 32px;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-light);
  position: relative;
}

.quote-icon {
  position: absolute;
  top: 24px;
  left: 32px;
  color: var(--bg-secondary);
  font-size: 3rem;
  opacity: 0.5;
}

.testimonial-text {
  font-size: 1.05rem;
  font-style: italic;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 16px;
}

.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--border-color);
}

.author-info h4 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.author-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* CTA Section */
.cta-section {
  background-color: var(--text-main);
  color: var(--white);
  padding: 80px 0;
  text-align: center;
  border-radius: var(--border-radius-lg);
  margin: 40px auto;
  max-width: var(--container-width);
  width: calc(100% - 48px);
}

.cta-section .section-title {
  color: var(--white);
}

/* Footer */
.footer {
  background-color: var(--black);
  color: var(--white);
  padding: 80px 0 24px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-logo {
  display: inline-block;
  margin-bottom: 16px;
}

.footer-logo-img {
  height: 90px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1); /* Turns the black logo into white for dark footer */
}

.footer-desc {
  color: #a0a09e;
  margin-bottom: 24px;
  max-width: 300px;
}

.footer-heading {
  font-size: 1.25rem;
  margin-bottom: 24px;
  color: var(--gold);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: #a0a09e;
}

.footer-links a:hover {
  color: var(--white);
  padding-right: 8px; /* RTL */
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  color: #a0a09e;
}

.contact-item i {
  color: var(--gold);
  margin-top: 4px;
}

.social-links {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: var(--transition);
}

.social-link:hover {
  background-color: var(--gold);
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #a0a09e;
  font-size: 0.9rem;
}

/* Floating WhatsApp */
.floating-whatsapp {
  position: fixed;
  bottom: 32px;
  left: 32px; /* Bottom left in RTL usually looks good, or right */
  width: 60px;
  height: 60px;
  background-color: #25D366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  transition: var(--transition);
  animation: pulse 2s infinite;
}

.floating-whatsapp:hover {
  background-color: #128C7E;
  transform: scale(1.1);
  animation: none;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Form Styles */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--black);
}

.form-control {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  background-color: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.1);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%232d2c2a' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 16px center; /* RTL support */
  padding-left: 40px;
}

/* Specific Page Styles */

/* Store Filters */
.store-header {
  padding: 120px 0 60px;
  background-color: var(--bg-secondary);
  text-align: center;
}

.store-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin: 40px 0;
}

.filter-btn {
  padding: 8px 24px;
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
  background-color: var(--text-main);
  color: var(--white);
  border-color: var(--text-main);
}

.search-bar {
  max-width: 500px;
  margin: 0 auto;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 16px 24px;
  padding-left: 50px;
  border-radius: 30px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  font-family: inherit;
  font-size: 1rem;
}

.search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* Product Detail Page */
.product-detail-section {
  padding: 140px 0 80px;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.main-image {
  width: 100%;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  object-fit: cover;
  aspect-ratio: 4/5;
}

.product-info-detail {
  display: flex;
  flex-direction: column;
}

.product-title-detail {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.product-price-detail {
  font-size: 2rem;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 24px;
}

.product-desc-full {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.8;
}

.product-options {
  background-color: var(--bg-secondary);
  padding: 32px;
  border-radius: var(--border-radius-md);
  margin-bottom: 32px;
}

.action-buttons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* Checkout Page */
.checkout-section {
  padding: 140px 0 80px;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  align-items: start;
}

.checkout-form-container {
  background-color: var(--white);
  padding: 40px;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-md);
}

.order-summary {
  background-color: var(--bg-secondary);
  padding: 32px;
  border-radius: var(--border-radius-md);
  position: sticky;
  top: 100px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--border-color);
}

.summary-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1.25rem;
  margin-top: 24px;
}

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

/* States */
.loader {
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 3px solid var(--white);
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  display: none;
  margin-right: 10px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn.loading .loader {
  display: inline-block;
}

.alert {
  padding: 16px;
  border-radius: var(--border-radius-sm);
  margin-bottom: 24px;
  display: none;
}

.alert-success {
  background-color: rgba(92, 184, 92, 0.1);
  color: var(--success);
  border: 1px solid var(--success);
}

.alert-error {
  background-color: rgba(217, 83, 79, 0.1);
  color: var(--error);
  border: 1px solid var(--error);
}

/* About & Contact Hero */
.page-hero {
  padding: 180px 0 100px;
  background-color: var(--bg-secondary);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%23c5a059" fill-opacity="0.05"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
}

/* Header View Toggle Button Styles */
.header-view-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-main);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.header-view-toggle:hover {
  color: var(--gold);
  transform: scale(1.1);
}

/* Mobile mode forced is purely logical, removed physical desktop hiding rule */

/* Order Success Modal */
.order-success-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
  animation: fadeIn 0.3s ease-out;
}

.order-success-modal .modal-content {
  background-color: var(--white);
  padding: 40px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 450px;
  width: 100%;
  text-align: center;
  animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.order-success-modal .modal-icon {
  font-size: 4rem;
  color: var(--success);
  margin-bottom: 24px;
}

.order-success-modal h2 {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.order-success-modal .order-id-box {
  background-color: var(--bg-secondary);
  padding: 12px 24px;
  border-radius: var(--border-radius-md);
  font-family: monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 16px auto 24px;
  display: inline-block;
  letter-spacing: 1px;
}

.order-success-modal .modal-note {
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.6;
}

.order-success-modal .modal-btn {
  width: 100%;
  padding: 16px;
  font-size: 1.1rem;
}

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

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