    :root {
      --primary: #0ea5a4;
      --primary-dark: #0d9488;
      --primary-light: #14b8a6;
      --secondary: #063547;
      --accent: #f59e0b;
      --text: #0f172a;
      --text-light: #64748b;
      --bg: #f8fafc;
      --card: #ffffff;
      --border: #e2e8f0;
      --success: #10b981;
      --warning: #f59e0b;
      --error: #ef4444;
      --shadow: 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);
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    body {
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
      background: var(--bg);
      color: var(--text);
      line-height: 1.6;
    }

    /* Header Styles */
    header {
      background: linear-gradient(135deg, var(--secondary) 0%, #0a4b5a 100%);
      color: white;
      padding: 1rem 1.5rem;
      box-shadow: var(--shadow);
      position: sticky;
      top: 0;
      z-index: 100;
    }

    .header-container {
      max-width: 1200px;
      margin: 0 auto;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

   /* Make brand section interactive */
.brand {
  transition: all 0.3s ease;
  border-radius: 8px;
  padding: 0.5rem;
  margin-right: 1rem;
}

.brand:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

/* Make product cards clickable */
.product-card {
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Ensure buttons within cards remain clickable separately */
.card-actions {
  pointer-events: auto;
}

.product-card .btn {
  pointer-events: auto;
}

    .logo {
      width: 48px;
      height: 48px;
      border-radius: 10px;
      background: linear-gradient(135deg, var(--primary-light), var(--primary));
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 800;
      color: white;
      font-size: 1.2rem;
      box-shadow: var(--shadow);
    }

    .brand-text h1 {
      font-size: 1.5rem;
      font-weight: 800;
      line-height: 1.2;
    }

    .brand-text p {
      font-size: 0.8rem;
      opacity: 0.9;
      margin-top: 2px;
    }

    nav {
      display: flex;
      gap: 1.5rem;
    }

    nav a {
      color: rgba(255, 255, 255, 0.95);
      text-decoration: none;
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 6px;
      transition: all 0.2s;
      padding: 0.5rem 0;
      position: relative;
    }

    nav a:hover {
      color: white;
    }

    nav a.active::after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 0;
      width: 100%;
      height: 3px;
      background: var(--primary-light);
      border-radius: 3px 3px 0 0;
    }

    .cart-count {
      background: var(--accent);
      color: white;
      font-size: 0.75rem;
      padding: 2px 6px;
      border-radius: 10px;
      margin-left: 4px;
    }

    .admin-link {
      background: rgba(255, 255, 255, 0.1);
      padding: 0.5rem 1rem;
      border-radius: 6px;
      transition: all 0.2s;
    }

    .admin-link:hover {
      background: rgba(255, 255, 255, 0.2);
    }


/* Collapsed Header for Mobile */
header.compact {
  padding: 0.5rem 1rem;
}

header.compact .brand-text h1 {
  font-size: 1.1rem;
}

header.compact .brand-text p {
  display: none;
}

header.compact .logo {
  width: 36px;
  height: 36px;
  font-size: 1rem;
}

header.compact nav a span:not(.cart-count) {
  display: none;
}

header.compact nav a {
  padding: 0.5rem;
  font-size: 1.2rem;
}

header.compact nav a .cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  font-size: 0.7rem;
  padding: 1px 4px;
  min-width: 18px;
  text-align: center;
}
    /* Main Content */
    .container {
      max-width: 1200px;
      margin: 2rem auto;
      padding: 0 1.5rem;
    }

    .page {
      display: none;
    }

    .page.active {
      display: block;
      animation: fadeIn 0.3s ease;
    }

    @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
    /* Toolbar */
    .toolbar {
      display: flex;
      gap: 1rem;
      align-items: center;
      margin-bottom: 2rem;
      flex-wrap: wrap;
    }

    .search-container {
      flex: 1;
      min-width: 250px;
      position: relative;
    }
	.order-summary {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin: 1rem 0;
    background: var(--card-bg);
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.order-item:last-child {
    border-bottom: none;
}

.order-total {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0 0;
    border-top: 2px solid var(--border-color);
    margin-top: 0.5rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}
    .search-container i {
      position: absolute;
      left: 12px;
      top: 50%;
      transform: translateY(-50%);
      color: var(--text-light);
    }

    .search-container input {
      padding-left: 2.5rem;
      width: 100%;
    }

    .filter-container {
      min-width: 180px;
    }

    .toolbar-actions {
      display: flex;
      gap: 0.5rem;
      margin-left: auto;
    }

    /* Buttons */
    .btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 0.75rem 1.25rem;
      border-radius: 8px;
      background: var(--primary);
      color: white;
      text-decoration: none;
      border: none;
      cursor: pointer;
      font-weight: 600;
      transition: all 0.2s;
      box-shadow: var(--shadow);
    }

    .btn:hover {
      background: var(--primary-dark);
      transform: translateY(-2px);
      box-shadow: var(--shadow-lg);
    }

    .btn:active {
      transform: translateY(0);
    }

    .btn-secondary {
      background: white;
      color: var(--secondary);
      border: 1px solid var(--border);
    }

    .btn-secondary:hover {
      background: #f8fafc;
      color: var(--secondary);
    }

    .btn-outline {
      background: transparent;
      color: var(--primary);
      border: 1px solid var(--primary);
    }

    .btn-outline:hover {
      background: var(--primary);
      color: white;
    }

    .btn-sm {
      padding: 0.5rem 1rem;
      font-size: 0.875rem;
    }

    .btn-loading {
      position: relative;
      color: transparent;
    }

    .btn-loading::after {
      content: '';
      position: absolute;
      width: 16px;
      height: 16px;
      top: 50%;
      left: 50%;
      margin-left: -8px;
      margin-top: -8px;
      border: 2px solid rgba(255, 255, 255, 0.3);
      border-radius: 50%;
      border-top-color: white;
      animation: spin 1s ease-in-out infinite;
    }

    @keyframes spin {
      to { transform: rotate(360deg); }
    }

    /* Form Elements */
    input, select, textarea {
      padding: 0.75rem;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: white;
      width: 100%;
      font-family: inherit;
      transition: all 0.2s;
    }
/* Add to your existing CSS */
#syncNotification {
    background: var(--success) !important;
    border: 1px solid rgba(255,255,255,0.2);
}

#syncNotification i {
    margin-right: 8px;
}
    input:focus, select:focus, textarea:focus {
      outline: none;
      border-color: var(--primary);
      box-shadow: 0 0 0 3px rgba(14, 165, 164, 0.1);
    }

    /* Grid & Cards */
    .grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
      gap: 1.5rem;
    }

    .card {
      background: var(--card);
      border-radius: 12px;
      padding: 1.5rem;
      box-shadow: var(--shadow);
      display: flex;
      flex-direction: column;
      transition: all 0.3s ease;
      border: 1px solid transparent;
      position: relative;
    }

    .card:hover {
      transform: translateY(-5px);
      box-shadow: var(--shadow-lg);
      border-color: rgba(14, 165, 164, 0.1);
    }

    .media {
      height: 160px;
      border-radius: 8px;
      background: linear-gradient(135deg, #eef2f7, #ffffff);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 3rem;
      color: var(--primary);
      margin-bottom: 1rem;
      overflow: hidden;
      position: relative;
    }

    .media img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.3s ease;
    }

    .card:hover .media img {
      transform: scale(1.05);
    }

    .media .placeholder-icon {
      position: absolute;
      opacity: 0.3;
    }

    .card-badge {
      position: absolute;
      top: 12px;
      right: 12px;
      background: var(--accent);
      color: white;
      padding: 4px 8px;
      border-radius: 4px;
      font-size: 0.75rem;
      font-weight: 600;
      z-index: 2;
    }

    .title {
      font-weight: 700;
      font-size: 1.1rem;
      margin-bottom: 0.5rem;
      line-height: 1.4;
    }

    .meta {
      color: var(--text-light);
      font-size: 0.875rem;
      margin-bottom: 1rem;
    }

    .description {
      font-size: 0.9rem;
      color: var(--text-light);
      margin-bottom: 1rem;
      flex-grow: 1;
    }

    .price {
      font-weight: 800;
      font-size: 1.25rem;
      color: var(--primary);
      margin-bottom: 1rem;
    }

    .card-actions {
      display: flex;
      gap: 0.5rem;
      margin-top: auto;
    }

    .card-actions .btn {
      flex: 1;
      justify-content: center;
    }

    /* Cart Styles */
    .cart-list {
      background: var(--card);
      padding: 1.5rem;
      border-radius: 12px;
      box-shadow: var(--shadow);
      margin-bottom: 1.5rem;
    }

    .cart-item {
      display: flex;
      gap: 1rem;
      align-items: center;
      padding: 1rem 0;
      border-bottom: 1px solid var(--border);
    }

    .cart-item:last-child {
      border-bottom: 0;
    }

    .cart-item-image {
      width: 80px;
      height: 80px;
      border-radius: 8px;
      background: linear-gradient(135deg, #eef2f7, #ffffff);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.5rem;
      color: var(--primary);
      overflow: hidden;
      flex-shrink: 0;
    }

    .cart-item-image img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .cart-item-details {
      flex: 1;
    }

    .cart-item-title {
      font-weight: 600;
      margin-bottom: 0.25rem;
    }

    .cart-item-sku {
      color: var(--text-light);
      font-size: 0.875rem;
    }

    .cart-item-price {
      font-weight: 700;
      min-width: 100px;
      text-align: right;
    }

    .cart-item-qty {
      width: 80px;
    }

    .cart-summary {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-top: 1.5rem;
      padding-top: 1.5rem;
      border-top: 1px solid var(--border);
    }

    .cart-total {
      font-weight: 800;
      font-size: 1.5rem;
    }

    .cart-actions {
      display: flex;
      gap: 0.5rem;
    }

    /* Special Request Form */
    .form-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1rem;
    }

    .form-full {
      grid-column: 1 / -1;
    }

    .form-actions {
      margin-top: 1rem;
    }

    /* Modal */
    .modal {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.5);
      z-index: 1000;
      align-items: center;
      justify-content: center;
      padding: 1rem;
    }

    .modal.active {
      display: flex;
      animation: fadeIn 0.3s ease;
    }

    .modal-content {
      background: white;
      border-radius: 12px;
      padding: 2rem;
      max-width: 800px;
      width: 100%;
      max-height: 90vh;
      overflow-y: auto;
      box-shadow: var(--shadow-lg);
      position: relative;
    }

    .modal-close {
      position: absolute;
      top: 1rem;
      right: 1rem;
      background: none;
      border: none;
      font-size: 1.5rem;
      cursor: pointer;
      color: var(--text-light);
    }

    .modal-header {
      margin-bottom: 1.5rem;
    }

    .modal-title {
      font-size: 1.5rem;
      font-weight: 700;
    }

    /* Toast */
    .toast {
      position: fixed;
      bottom: 2rem;
      right: 2rem;
      background: var(--primary);
      color: white;
      padding: 1rem 1.5rem;
      border-radius: 8px;
      box-shadow: var(--shadow-lg);
      display: flex;
      align-items: center;
      gap: 0.5rem;
      z-index: 1100;
      transform: translateY(100px);
      opacity: 0;
      transition: all 0.3s ease;
    }

    .toast.active {
      transform: translateY(0);
      opacity: 1;
    }

    .toast.success {
      background: var(--success);
    }

    .toast.error {
      background: var(--error);
    }

    .toast.warning {
      background: var(--warning);
    }

    /* Footer */
    footer {
      background: var(--secondary);
      color: rgba(255, 255, 255, 0.8);
      padding: 3rem 1.5rem 2rem;
      margin-top: 4rem;
    }

    .footer-container {
      max-width: 1200px;
      margin: 0 auto;
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      gap: 2rem;
    }

    .footer-section h3 {
      color: white;
      margin-bottom: 1rem;
      font-size: 1.1rem;
    }

    .footer-links {
      list-style: none;
    }

    .footer-links li {
      margin-bottom: 0.5rem;
    }

    .footer-links a {
      color: rgba(255, 255, 255, 0.7);
      text-decoration: none;
      transition: color 0.2s;
    }

    .footer-links a:hover {
      color: white;
    }

    .footer-bottom {
      text-align: center;
      margin-top: 3rem;
      padding-top: 1.5rem;
      border-top: 1px solid rgba(255, 255, 255, 0.1);
      font-size: 0.875rem;
    }

/* ==================== */
/* RESPONSIVE DESIGN */
/* ==================== */

/* Tablet (768px and below) */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 1rem;
  }

  nav {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-actions {
    margin-left: 0;
    justify-content: space-between;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .cart-item {
    flex-wrap: wrap;
  }

  .cart-summary {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .cart-actions {
    width: 100%;
    justify-content: space-between;
  }

  .modal-content {
    margin: 1rem;
    padding: 1.5rem;
  }

  /* 2-column grid for tablets */
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .card {
    padding: 1rem;
  }

  .media {
    height: 120px;
    font-size: 2rem;
  }

  .title {
    font-size: 1rem;
  }

  .price {
    font-size: 1.1rem;
  }

  .card-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .card-actions .btn {
    font-size: 0.8rem;
    padding: 0.5rem;
  }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
    margin: 1rem auto;
  }

  /* Compact header for mobile */
  header {
    padding: 0.75rem 1rem;
  }

  header.compact {
    padding: 0.5rem 1rem;
  }

  header.compact .brand-text h1 {
    font-size: 1rem;
  }

  header.compact .brand-text p {
    display: none;
  }

  header.compact .logo {
    width: 32px;
    height: 20px;
    font-size: 0.7rem;
  }

  header.compact nav a span:not(.cart-count) {
    display: none;
  }

  header.compact nav a {
    padding: 0.2rem;
    font-size: 0.7rem;
  }

  header.compact nav a .cart-count {
    position: absolute;
    top: -3px;
    right: -3px;
    font-size: 0.6rem;
    padding: 1px 3px;
    min-width: 16px;
    text-align: center;
  }

  /* 2-column grid for mobile */
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .card {
    padding: 0.75rem;
    border-radius: 8px;
  }

  .media {
    height: 100px;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
  }

  .title {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
  }

  .meta {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
  }

  .description {
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .price {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }

  .stock-info {
    font-size: 0.75rem;
  }

  .card-actions {
    flex-direction: column;
    gap: 0.25rem;
  }

  .card-actions .btn {
    font-size: 0.75rem;
    padding: 0.4rem 0.5rem;
    min-height: auto;
  }

  .card-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
    top: 8px;
    right: 8px;
  }

  /* Cart adjustments for mobile */
  .cart-item {
    padding: 0.75rem 0;
    gap: 0.75rem;
  }

  .cart-item-image {
    width: 60px;
    height: 60px;
    font-size: 1.2rem;
  }

  .cart-item-title {
    font-size: 0.9rem;
  }

  .cart-item-sku, .cart-item-stock {
    font-size: 0.75rem;
  }

  .cart-item-price {
    font-size: 0.9rem;
    min-width: 80px;
  }

  .cart-item-qty {
    width: 60px;
    padding: 0.5rem;
  }

  /* Toolbar adjustments */
  .toolbar {
    margin-bottom: 1.5rem;
    gap: 0.75rem;
  }

  .search-container {
    min-width: auto;
  }

  .filter-container {
    min-width: 150px;
  }

  /* Modal adjustments */
  .modal-content {
    padding: 1rem;
    margin: 0.5rem;
  }

  .modal-title {
    font-size: 1.2rem;
  }

  /* Toast adjustments */
  .toast {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    padding: 0.75rem 1rem;
  }
}

/* Small Mobile (360px and below) */
@media (max-width: 360px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .card {
    padding: 1rem;
  }

  .media {
    height: 140px;
  }

  .card-actions {
    flex-direction: row;
  }

  header.compact nav {
    gap: 0.2rem;
  }

  header.compact nav a {
    padding: 0.1rem;
    font-size: 1rem;
  }
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-light); }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.hide { display: none; }


/* Language Toggle */
.language-toggle {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  transition: background-color 0.2s;
}
/* RTL Support - Arabic Styles */
[dir="rtl"] {
  text-align: right;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
/* RTL Support - Arabic Styles */
[dir="rtl"] {
  text-align: right;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Header RTL */
[dir="rtl"] .header-container,
[dir="rtl"] .toolbar,
[dir="rtl"] .cart-item,
[dir="rtl"] .form-grid,
[dir="rtl"] .cart-summary,
[dir="rtl"] .modal-header,
[dir="rtl"] .footer-container {
  direction: rtl;
}

[dir="rtl"] .brand {
  direction: rtl;
}

[dir="rtl"] .brand-text {
  text-align: right;
}

[dir="rtl"] .brand-text h1 {
  font-size: 1.4rem;
}

[dir="rtl"] .brand-text p {
  font-size: 0.75rem;
}

/* Navigation RTL */
[dir="rtl"] nav {
  direction: rtl;
}

[dir="rtl"] nav a {
  flex-direction: row;
}

[dir="rtl"] .cart-count {
  margin-left: 0;
  margin-right: 4px;
}

[dir="rtl"] nav a.active::after {
  left: auto;
  right: 0;
}

/* Search RTL */
[dir="rtl"] .search-container i {
  left: auto;
  right: 1rem;
}

[dir="rtl"] .search-container input {
  padding-left: 1rem;
  padding-right: 3rem;
}

/* Toolbar RTL */
[dir="rtl"] .toolbar-actions {
  margin-left: 0;
  margin-right: auto;
}

/* Cards RTL */
[dir="rtl"] .card {
  text-align: right;
}

[dir="rtl"] .card-badge {
  right: auto;
  left: 12px;
}

[dir="rtl"] .card-actions {
  direction: rtl;
}

[dir="rtl"] .card-actions .btn {
  flex-direction: row-reverse;
}

/* Cart RTL */
[dir="rtl"] .cart-item {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .cart-item-price {
  text-align: left;
}

[dir="rtl"] .cart-summary {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .cart-actions {
  direction: rtl;
}

[dir="rtl"] .cart-actions .btn {
  flex-direction: row-reverse;
}

/* Forms RTL */
[dir="rtl"] .form-grid {
  direction: rtl;
}

[dir="rtl"] input,
[dir="rtl"] select,
[dir="rtl"] textarea {
  text-align: right;
  direction: rtl;
}

[dir="rtl"] .form-actions {
  direction: rtl;
}

[dir="rtl"] .form-actions .btn {
  flex-direction: row-reverse;
}

/* Modal RTL */
[dir="rtl"] .modal-content {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .modal-close {
  right: auto;
  left: 1rem;
}

[dir="rtl"] .modal-header {
  text-align: right;
  padding-right: 0;
  padding-left: 2rem;
}

/* Product Modal RTL */
[dir="rtl"] #modalProductContent {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] #modalProductContent .meta {
  text-align: right;
}

[dir="rtl"] #modalProductContent ul {
  padding-right: 1.5rem;
  padding-left: 0;
}

/* Toast RTL */
[dir="rtl"] .toast {
  right: auto;
  left: 2rem;
  direction: rtl;
}

[dir="rtl"] .toast i {
  margin-right: 0;
  margin-left: 8px;
}

/* Footer RTL */
[dir="rtl"] .footer-section {
  text-align: right;
}

[dir="rtl"] .footer-links {
  padding-right: 0;
}

[dir="rtl"] .footer-links li {
  direction: rtl;
}

[dir="rtl"] .footer-links a {
  direction: rtl;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

[dir="rtl"] .footer-links i {
  order: 2;
}

[dir="rtl"] .footer-bottom {
  text-align: center;
  direction: rtl;
}

/* Checkout Modal RTL */
[dir="rtl"] #checkoutModal .modal-content {
  direction: rtl;
}

[dir="rtl"] #checkoutModal .modal-header {
  text-align: right;
}

[dir="rtl"] #checkoutModal .form-group {
  text-align: right;
}

[dir="rtl"] #checkoutModal .modal-footer {
  direction: rtl;
}

[dir="rtl"] #checkoutModal .modal-footer .btn {
  flex-direction: row-reverse;
}

/* Checkout Summary RTL */
[dir="rtl"] #checkoutSummary {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] #checkoutSummary div[style*="display: flex; align-items: center"] {
  direction: rtl;
}

[dir="rtl"] #checkoutSummary div[style*="margin-right: 0.5rem"] {
  margin-right: 0;
  margin-left: 0.5rem;
}

/* Special Requests RTL */
[dir="rtl"] #specialList .card {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] #specialList .card > div {
  direction: rtl;
}

/* Grid adjustments for RTL */
[dir="rtl"] .grid {
  direction: rtl;
}

/* Button icons RTL */
[dir="rtl"] .btn i {
  order: 2;
}

[dir="rtl"] .btn {
  flex-direction: row-reverse;
}

/* Cart item quantity RTL */
[dir="rtl"] .cart-item-qty {
  direction: ltr;
  text-align: center;
}

/* Price alignment fixes */
[dir="rtl"] .price {
  text-align: right;
}

[dir="rtl"] .cart-item-price {
  text-align: left;
  direction: ltr;
}

/* Stock info RTL */
[dir="rtl"] .stock-info {
  text-align: right;
}

/* Low stock badge RTL */
[dir="rtl"] .card-badge {
  right: auto;
  left: 12px;
}

/* Modal actions RTL */
[dir="rtl"] .modal-actions {
  direction: rtl;
}

[dir="rtl"] .modal-actions .btn {
  flex-direction: row-reverse;
}

/* Form labels RTL */
[dir="rtl"] .form-group label {
  text-align: right;
  display: block;
  margin-bottom: 0.5rem;
}

/* Select dropdown RTL */
[dir="rtl"] select {
  text-align: right;
  background-position: left 0.75rem center;
}

/* Textarea RTL */
[dir="rtl"] textarea {
  text-align: right;
  direction: rtl;
}

/* Utility classes RTL */
[dir="rtl"] .text-right {
  text-align: left;
}

[dir="rtl"] .text-left {
  text-align: right;
}

/* Responsive RTL */
@media (max-width: 768px) {
  [dir="rtl"] .header-container {
    direction: rtl;
  }
  
  [dir="rtl"] nav {
    direction: rtl;
    justify-content: space-between;
  }
  
  [dir="rtl"] .toolbar {
    direction: rtl;
  }
  
  [dir="rtl"] .cart-item {
    direction: rtl;
    text-align: right;
  }
  
  [dir="rtl"] .cart-summary {
    direction: rtl;
    align-items: flex-end;
  }
  
  [dir="rtl"] .cart-actions {
    direction: rtl;
    justify-content: flex-start;
  }
  
  [dir="rtl"] .modal-content {
    direction: rtl;
    margin: 1rem;
  }
}

/* Arabic font improvements */
[dir="rtl"] body {
  font-family: 'Segoe UI', 'Tahoma', 'Geneva', 'Verdana', sans-serif;
  line-height: 1.8;
}

[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 {
  font-weight: 700;
  line-height: 1.4;
}

[dir="rtl"] .title {
  font-weight: 700;
  line-height: 1.5;
}

/* Fix for product grid in RTL */
[dir="rtl"] .grid {
  direction: rtl;
}

[dir="rtl"] .card {
  text-align: right;
}

/* Fix for product meta info */
[dir="rtl"] .meta {
  text-align: right;
  direction: rtl;
}

/* Fix for description text */
[dir="rtl"] .description {
  text-align: right;
  direction: rtl;
}

/* Fix for features list */
[dir="rtl"] ul {
  padding-right: 1.5rem;
  padding-left: 0;
  direction: rtl;
  text-align: right;
}

/* Fix for cart item details */
[dir="rtl"] .cart-item-details {
  text-align: right;
  direction: rtl;
}

/* Fix for special requests list */
[dir="rtl"] #specialList .card > div {
  direction: rtl;
  text-align: right;
}

/* Fix for footer links with icons */
[dir="rtl"] .footer-links a {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

[dir="rtl"] .footer-links i {
  order: 2;
}

/* Fix for language toggle button */
[dir="rtl"] .language-toggle {
  flex-direction: row-reverse;
}

/* Ensure proper alignment for numbers and prices */
[dir="rtl"] .price,
[dir="rtl"] .cart-item-price,
[dir="rtl"] .cart-total,
[dir="rtl"] .cart-item-qty {
  direction: ltr;
  text-align: left;
  font-family: 'Courier New', monospace;
}

/* Fix for product SKU and category */
[dir="rtl"] .meta {
  direction: rtl;
}

/* Fix for buttons with icons */
[dir="rtl"] .btn {
  flex-direction: row-reverse;
  justify-content: center;
}

[dir="rtl"] .btn i {
  order: 2;
  margin-left: 0;
  margin-right: 6px;
}

/* Fix for modal close button */
[dir="rtl"] .modal-close {
  right: auto;
  left: 1rem;
}

/* Fix for toast positioning */
[dir="rtl"] .toast {
  right: auto;
  left: 2rem;
}

/* Fix for search icon */
[dir="rtl"] .search-container i {
  left: auto;
  right: 1rem;
}

/* Fix for select dropdown arrow */
[dir="rtl"] select {
  background-position: left 0.75rem center;
  padding-right: 0.75rem;
  padding-left: 2rem;
}