/* ============================================================
   RTL Override — Arabic (dir="rtl")
   Layla's Mosaic — Warm Artisan Design System v2.0
   ============================================================ */

/* --- Base Direction --- */
html[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

/* --- Header / Nav --- */
html[dir="rtl"] header .container {
  flex-direction: row-reverse;
}

html[dir="rtl"] nav {
  flex-direction: row-reverse;
}

html[dir="rtl"] nav a::after {
  left: auto;
  right: 0;
}

html[dir="rtl"] .hamburger {
  right: auto;
  left: 24px;
}

html[dir="rtl"] .logo {
  margin-right: 0;
  margin-left: auto;
}

/* Dropdown — flip to right-aligned */
html[dir="rtl"] .dropdown-menu {
  left: auto;
  right: 0;
}

html[dir="rtl"] .dropdown-menu a {
  text-align: right;
}

/* Language switcher — flip margin */
html[dir="rtl"] .lang-switcher {
  margin-left: 0;
  margin-right: 16px;
}

/* Cart icon */
html[dir="rtl"] .cart-icon {
  margin-right: 0;
  margin-left: 4px;
}

html[dir="rtl"] .cart-count {
  right: auto;
  left: -12px;
}

/* --- Hero --- */
html[dir="rtl"] .hero-inner {
  direction: rtl;
}

html[dir="rtl"] .hero-text {
  padding: 80px 0 80px 60px;
}

/* --- Trust / Value Strip --- */
html[dir="rtl"] .trust-strip .container,
html[dir="rtl"] .value-strip .container {
  flex-direction: row-reverse;
}

/* --- Category Grid --- */
html[dir="rtl"] .category-grid,
html[dir="rtl"] .collection-grid {
  direction: rtl;
}

/* --- Product Grid --- */
html[dir="rtl"] .product-grid {
  direction: rtl;
}

html[dir="rtl"] .product-info {
  text-align: right;
}

/* --- Highlight Card --- */
html[dir="rtl"] .highlight-card {
  direction: rtl;
}

html[dir="rtl"] .highlight-text {
  text-align: right;
}

html[dir="rtl"] .highlight-quote {
  border-left: none;
  border-right: 2px solid var(--terracotta);
  padding-left: 0;
  padding-right: 16px;
}

/* --- Brand Story / Maker Section --- */
html[dir="rtl"] .maker-section,
html[dir="rtl"] .brand-story {
  direction: rtl;
}

html[dir="rtl"] .maker-quote {
  border-left: none;
  border-right: 3px solid var(--terracotta);
  padding-left: 0;
  padding-right: 24px;
}

html[dir="rtl"] .brand-story-text blockquote {
  border-left: none;
  border-right: 3px solid var(--terracotta);
  padding-left: 0;
  padding-right: 24px;
}

/* --- Craft Steps --- */
html[dir="rtl"] .craft-steps,
html[dir="rtl"] .craft-grid {
  direction: rtl;
}

/* --- Testimonials --- */
html[dir="rtl"] .testimonials-grid {
  direction: rtl;
}

html[dir="rtl"] .testimonial-text {
  text-align: right;
}

/* --- Product Detail --- */
html[dir="rtl"] .product-detail {
  direction: rtl;
}

html[dir="rtl"] .product-detail-info {
  text-align: right;
}

html[dir="rtl"] .specs-table th {
  text-align: right;
}

html[dir="rtl"] .specs-table td {
  text-align: left;
}

/* --- Contact --- */
html[dir="rtl"] .contact-grid {
  direction: rtl;
}

/* --- Footer --- */
html[dir="rtl"] .footer-grid {
  direction: rtl;
}

html[dir="rtl"] .footer-col {
  text-align: right;
}

html[dir="rtl"] .footer-bottom {
  flex-direction: row-reverse;
}

/* --- Newsletter / Email Form --- */
html[dir="rtl"] .email-form {
  flex-direction: row-reverse;
}

html[dir="rtl"] .email-form input {
  border-radius: 0 8px 8px 0;
}

html[dir="rtl"] .email-form .btn {
  border-radius: 8px 0 0 8px;
}

/* --- Lists --- */
html[dir="rtl"] ul, html[dir="rtl"] ol {
  padding-left: 0;
  padding-right: 24px;
}

/* --- Cart --- */
html[dir="rtl"] .cart-item {
  direction: rtl;
}

html[dir="rtl"] .cart-item-remove {
  justify-self: start;
}

/* --- Content Pages --- */

/* Custom steps timeline */
html[dir="rtl"] .custom-steps {
  padding-left: 0;
  padding-right: 48px;
}

html[dir="rtl"] .custom-step::before {
  left: auto;
  right: -48px;
}

html[dir="rtl"] .custom-steps::before {
  left: auto;
  right: 0;
}

/* History timeline */
html[dir="rtl"] .history-timeline {
  padding-left: 0;
  padding-right: 48px;
}

html[dir="rtl"] .timeline-item::before {
  left: auto;
  right: -43px;
}

html[dir="rtl"] .history-timeline::before {
  left: auto;
  right: 0;
}

/* Spotlight card alternation */
html[dir="rtl"] .spotlight-card:nth-child(even) {
  direction: rtl;
}

/* FAQ accordion */
html[dir="rtl"] .faq-question::after {
  right: auto;
  left: 0;
  margin-left: 0;
  margin-right: auto;
}

/* --- SVG Diagrams --- */
html[dir="rtl"] .craft-flow-diagram {
  direction: ltr; /* SVG stays LTR for readability */
}

html[dir="rtl"] .journey-diagram {
  direction: ltr;
}

/* ============================================================
   MOBILE RTL
   ============================================================ */

@media (max-width: 768px) {
  html[dir="rtl"] #nav-toggle:checked ~ nav {
    text-align: right;
  }

  html[dir="rtl"] nav a {
    margin-right: 0;
  }

  html[dir="rtl"] .lang-switcher {
    margin-right: 0;
    justify-content: center;
    margin-top: 4px;
  }

  html[dir="rtl"] .hero-text {
    padding: 48px 24px;
  }

  html[dir="rtl"] .custom-steps {
    padding-right: 32px;
  }

  html[dir="rtl"] .custom-step::before {
    right: -32px;
  }

  html[dir="rtl"] .history-timeline {
    padding-right: 32px;
  }

  html[dir="rtl"] .timeline-item::before {
    right: -27px;
  }

  html[dir="rtl"] .cart-item-remove {
    justify-self: start;
    margin-top: -60px;
  }

  html[dir="rtl"] .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}
