/*
Theme Name:   Fahm-e-Deen Child
Theme URI:    https://alhudaislamicresearch.com/
Description:  Markaz al-Huda store child theme for Astra — Urdu RTL typography and brand palette.
Author:       Markaz al-Huda
Template:     astra
Version:      1.0.0
Text Domain:  fahm-e-deen-child
*/

/* ---- Brand tokens ---- */
:root {
  --fd-teal:        #0F5A5A;
  --fd-teal-deep:   #0B4747;
  --fd-gold:        #C9A227;
  --fd-cream:       #FAF5EA;
  --fd-surface:     #FFFDF7;
  --fd-border:      #E4D9C0;
  --fd-ink:         #1C1C1A;
  --fd-ink-soft:    #4A4538;
  --fd-ink-muted:   #6B6355;
  --fd-radius:      10px;
}

/* ---- Urdu RTL typography ----
   Nastaliq needs far more line-height than Latin type; at 1.6 the
   descenders of one line collide with the next. */
html[lang^="ur"] body,
body.trp-language-ur {
  font-family: 'Noto Nastaliq Urdu', serif;
  line-height: 2.1;
  font-size: 17px;
}

html[lang^="ur"] h1, html[lang^="ur"] h2,
html[lang^="ur"] h3, html[lang^="ur"] h4 {
  line-height: 1.9;
  font-weight: 700;
}

/* Numerals, prices, phone numbers and codes stay LTR inside RTL text. */
.fd-ltr,
html[dir="rtl"] .woocommerce-Price-amount,
html[dir="rtl"] .woocommerce-Price-currencySymbol,
html[dir="rtl"] bdi,
html[dir="rtl"] code,
html[dir="rtl"] .fd-phone {
  direction: ltr;
  unicode-bidi: isolate;
}

/* Mirror directional icons when the page flips. */
html[dir="rtl"] .fd-icon-arrow { transform: scaleX(-1); }

/* ---- Palette application ---- */
body { background: var(--fd-cream); color: var(--fd-ink); }

.fd-topbar {
  background: var(--fd-teal-deep);
  color: #EADFC2;
  font-size: 14px;
  padding: 8px 0;
}
.fd-topbar a { color: #EADFC2; }

.site-header { background: var(--fd-surface); border-bottom: 1px solid var(--fd-border); }

.main-header-menu,
.ast-desktop .main-header-menu { background: var(--fd-teal); }
.main-header-menu .menu-link { color: #FFFDF7 !important; }
.main-header-menu .current-menu-item > .menu-link { background: var(--fd-teal-deep); }

/* ---- Buttons ---- */
.ast-button,
.button,
button,
input[type="submit"],
.woocommerce a.button,
.woocommerce button.button,
.woocommerce #respond input#submit {
  background: var(--fd-teal);
  color: #FFFDF7;
  border: 0;
  border-radius: var(--fd-radius);
  font-family: inherit;
  /* 44px keeps every tap target reachable on a phone. */
  min-height: 44px;
  padding: 12px 28px;
}

.ast-button:hover,
.button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover { background: var(--fd-teal-deep); color: #FFFDF7; }

.woocommerce a.button.alt,
.woocommerce button.button.alt,
.fd-button-gold {
  background: var(--fd-gold);
  color: var(--fd-ink);
}
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover { background: #B8941F; color: var(--fd-ink); }

.fd-button-outline {
  background: var(--fd-surface);
  color: var(--fd-teal);
  border: 1.5px solid var(--fd-teal);
}

/* ---- Product cards ---- */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  background: var(--fd-surface);
  border: 1px solid var(--fd-border);
  border-radius: 14px;
  overflow: hidden;
  padding-bottom: 16px;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 18px;
  line-height: 1.9;
  padding: 0 16px;
}

.woocommerce ul.products li.product .price,
.woocommerce div.product p.price {
  color: var(--fd-teal);
  font-weight: 700;
}

.woocommerce div.product p.price { font-size: 32px; }

/* ---- Trust strip ---- */
.fd-trust {
  background: var(--fd-teal-deep);
  color: #EADFC2;
  padding: 24px 0;
  text-align: center;
}
.fd-trust strong { color: #fff; font-weight: 700; }

/* ---- Footer ---- */
.site-footer,
.ast-small-footer { background: var(--fd-teal-deep); color: #EADFC2; }
.site-footer a, .ast-small-footer a { color: #EADFC2; }
.site-footer h3 { color: var(--fd-gold); }

/* ---- Forms ---- */
input[type="text"], input[type="email"], input[type="tel"],
input[type="search"], input[type="number"], textarea, select {
  font-family: inherit;
  border: 1px solid #D8CBAE;
  border-radius: var(--fd-radius);
  background: #fff;
  min-height: 44px;
  padding: 10px 14px;
}

/* ---- Verification-pending marker ----
   Used for card titles and prices the client has not yet confirmed,
   so unverified content is never mistaken for final copy. */
.fd-pending {
  background: #F7EFD9;
  border: 1px dashed #B9A981;
  border-radius: var(--fd-radius);
  color: var(--fd-ink-muted);
  padding: 12px 16px;
  font-size: 15px;
}

/* ---- Mobile sticky order bar ---- */
@media (max-width: 782px) {
  .fd-sticky-order {
    position: sticky;
    bottom: 0;
    z-index: 50;
    background: var(--fd-surface);
    border-top: 1px solid var(--fd-border);
    padding: 10px 16px;
    display: flex;
    gap: 10px;
    align-items: center;
  }
  .fd-sticky-order .price { flex: 1; font-size: 18px; font-weight: 700; color: var(--fd-teal); }
}

/* ---- Accessibility ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--fd-gold);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
