/*
 * Theme Name:   Al Ehda Child
 * Theme URI:    https://alehda.com
 * Description:  Al Ehda Digital Product Store — Child Theme
 * Author:       Al Ehda Marketing Agency
 * Template:     astra
 * Version:      1.0.0
 * License:      GNU General Public License v2 or later
 * Text Domain:  alehda-child
 */

/* ════════════════════════════════════════════════════════
   AL EHDA DESIGN SYSTEM — CSS Custom Properties (Tokens)
   ══ These variables drive EVERY component across the site ══
   Never use raw hex values in component files — always
   reference a token so rebranding requires one edit here.
   ════════════════════════════════════════════════════════ */
:root {

  /* ── Brand Identity ─────────────────────────────────── */
  --ae-primary:        #1B1F3B;   /* Deep Indigo — nav, headings     */
  --ae-primary-dark:   #0F1229;   /* Darker — hover states           */
  --ae-primary-light:  #2D3561;   /* Lighter — active nav bg         */
  --ae-accent:         #C9A84C;   /* Gold — CTAs, badges, highlights */
  --ae-accent-hover:   #B8963E;   /* Gold hover                      */
  --ae-accent-light:   rgba(201,168,76,0.12); /* Gold bg tint        */

  /* ── Semantic Colors ────────────────────────────────── */
  --ae-success:        #2DC653;   /* Paid / confirmed                */
  --ae-warning:        #F59E0B;   /* Pending / caution               */
  --ae-error:          #E63946;   /* Error / promo badge             */
  --ae-info:           #3B82F6;   /* Info callouts                   */

  /* ── Neutral Scale ──────────────────────────────────── */
  --ae-white:          #FFFFFF;
  --ae-off-white:      #F9F7F2;   /* Warm page background            */
  --ae-light:          #F2EFE8;   /* Card / section bg               */
  --ae-border:         #E5E0D8;   /* Dividers, input borders         */
  --ae-border-dark:    #CFC9BE;   /* Stronger borders                */
  --ae-text:           #1C1C1E;   /* Primary body text               */
  --ae-text-muted:     #5F5F5F;   /* Captions, meta                  */
  --ae-text-light:     #9A9A9A;   /* Placeholders, disabled          */

  /* ── Typography ─────────────────────────────────────── */
  --ae-font-body:      'Hind Siliguri', 'Inter', sans-serif;
  --ae-font-heading:   'Poppins', 'Hind Siliguri', sans-serif;
  --ae-font-mono:      'Fira Code', 'Courier New', monospace;

  /* ── Type Scale (16px base) ─────────────────────────── */
  --ae-text-xs:        0.75rem;    /*  12px */
  --ae-text-sm:        0.875rem;   /*  14px */
  --ae-text-base:      1rem;       /*  16px */
  --ae-text-lg:        1.125rem;   /*  18px */
  --ae-text-xl:        1.25rem;    /*  20px */
  --ae-text-2xl:       1.5rem;     /*  24px */
  --ae-text-3xl:       1.875rem;   /*  30px */
  --ae-text-4xl:       2.25rem;    /*  36px */
  --ae-text-5xl:       3rem;       /*  48px */

  /* ── Font Weights ───────────────────────────────────── */
  --ae-weight-normal:  400;
  --ae-weight-medium:  500;
  --ae-weight-semi:    600;
  --ae-weight-bold:    700;
  --ae-weight-black:   800;

  /* ── Spacing Scale (4px base) ───────────────────────── */
  --ae-sp-1:   0.25rem;   /*  4px */
  --ae-sp-2:   0.5rem;    /*  8px */
  --ae-sp-3:   0.75rem;   /* 12px */
  --ae-sp-4:   1rem;      /* 16px */
  --ae-sp-5:   1.25rem;   /* 20px */
  --ae-sp-6:   1.5rem;    /* 24px */
  --ae-sp-8:   2rem;      /* 32px */
  --ae-sp-10:  2.5rem;    /* 40px */
  --ae-sp-12:  3rem;      /* 48px */
  --ae-sp-16:  4rem;      /* 64px */
  --ae-sp-20:  5rem;      /* 80px */
  --ae-sp-24:  6rem;      /* 96px */

  /* ── Border Radius ──────────────────────────────────── */
  --ae-r-sm:   4px;
  --ae-r-md:   8px;
  --ae-r-lg:   12px;
  --ae-r-xl:   16px;
  --ae-r-2xl:  24px;
  --ae-r-full: 9999px;

  /* ── Elevation / Shadow ─────────────────────────────── */
  --ae-shadow-xs:   0 1px 2px rgba(27,31,59,0.06);
  --ae-shadow-sm:   0 2px 6px rgba(27,31,59,0.08);
  --ae-shadow-md:   0 4px 16px rgba(27,31,59,0.10),
                    0 2px 4px rgba(27,31,59,0.06);
  --ae-shadow-lg:   0 10px 28px rgba(27,31,59,0.12),
                    0 4px 8px rgba(27,31,59,0.06);
  --ae-shadow-xl:   0 20px 48px rgba(27,31,59,0.14);
  --ae-shadow-card: 0 2px 8px rgba(27,31,59,0.08);
  --ae-shadow-focus:0 0 0 3px rgba(201,168,76,0.35);

  /* ── Transitions ────────────────────────────────────── */
  --ae-ease:  cubic-bezier(0.4, 0, 0.2, 1);
  --ae-fast:  150ms cubic-bezier(0.4, 0, 0.2, 1);
  --ae-base:  300ms cubic-bezier(0.4, 0, 0.2, 1);
  --ae-slow:  500ms cubic-bezier(0.4, 0, 0.2, 1);

  /* ── Layout ─────────────────────────────────────────── */
  --ae-container: 1200px;
  --ae-pad:       clamp(1rem, 4vw, 2rem);
  --ae-header-h:  72px;

  /* ── Z-Index Scale ──────────────────────────────────── */
  --ae-z-below:    -1;
  --ae-z-base:      0;
  --ae-z-raised:   10;
  --ae-z-dropdown: 100;
  --ae-z-sticky:   200;
  --ae-z-overlay:  300;
  --ae-z-modal:    400;
  --ae-z-toast:    500;
}

/* ════════════════════════════════════════════════════════
   BASE RESET & GLOBALS
   ════════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: var(--ae-font-body);
  font-size: var(--ae-text-base);
  font-weight: var(--ae-weight-normal);
  color: var(--ae-text);
  background-color: var(--ae-off-white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ae-font-heading);
  font-weight: var(--ae-weight-bold);
  line-height: 1.2;
  color: var(--ae-primary);
  letter-spacing: -0.01em;
}

p { margin-bottom: var(--ae-sp-4); }
p:last-child { margin-bottom: 0; }

a {
  color: var(--ae-accent);
  text-decoration: none;
  transition: color var(--ae-fast);
}
a:hover { color: var(--ae-accent-hover); }
a:focus-visible { outline: 2px solid var(--ae-accent); outline-offset: 2px; }

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

ul, ol { list-style: none; }

input, button, textarea, select { font: inherit; }

/* ════════════════════════════════════════════════════════
   LAYOUT UTILITIES
   ════════════════════════════════════════════════════════ */
.ae-container {
  width: 100%;
  max-width: var(--ae-container);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--ae-pad);
  padding-right: var(--ae-pad);
}

.ae-container--narrow { max-width: 800px; }
.ae-container--wide   { max-width: 1400px; }

.ae-section {
  padding-top:    var(--ae-sp-20);
  padding-bottom: var(--ae-sp-20);
}
.ae-section--sm {
  padding-top:    var(--ae-sp-12);
  padding-bottom: var(--ae-sp-12);
}
.ae-section--dark {
  background: var(--ae-primary);
  color: var(--ae-white);
}
.ae-section--dark h2,
.ae-section--dark h3 { color: var(--ae-white); }
.ae-section--light    { background: var(--ae-light); }

/* Section header pattern */
.ae-section-eyebrow {
  display: inline-block;
  font-size: var(--ae-text-xs);
  font-weight: var(--ae-weight-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ae-accent);
  margin-bottom: var(--ae-sp-3);
}
.ae-section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: var(--ae-sp-4);
}
.ae-section-subtitle {
  font-size: var(--ae-text-lg);
  color: var(--ae-text-muted);
  max-width: 600px;
  margin-bottom: var(--ae-sp-10);
}
.ae-section-header--center { text-align: center; }
.ae-section-header--center .ae-section-subtitle {
  margin-left: auto;
  margin-right: auto;
}

/* ════════════════════════════════════════════════════════
   GRID SYSTEM
   ════════════════════════════════════════════════════════ */
.ae-grid   { display: grid; gap: var(--ae-sp-6); }
.ae-grid-2 { grid-template-columns: repeat(2, 1fr); }
.ae-grid-3 { grid-template-columns: repeat(3, 1fr); }
.ae-grid-4 { grid-template-columns: repeat(4, 1fr); }

.ae-flex         { display: flex; }
.ae-flex-center  { display: flex; align-items: center; justify-content: center; }
.ae-flex-between { display: flex; align-items: center; justify-content: space-between; }
.ae-flex-wrap    { flex-wrap: wrap; }
.ae-gap-4        { gap: var(--ae-sp-4); }
.ae-gap-6        { gap: var(--ae-sp-6); }

@media (max-width: 1024px) {
  .ae-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .ae-grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .ae-grid-4,
  .ae-grid-3,
  .ae-grid-2       { grid-template-columns: 1fr; }
  .ae-section      { padding-top: var(--ae-sp-12); padding-bottom: var(--ae-sp-12); }
}

/* ════════════════════════════════════════════════════════
   BUTTON SYSTEM
   ════════════════════════════════════════════════════════ */
.ae-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ae-sp-2);
  padding: 0.75rem 1.75rem;
  font-family: var(--ae-font-body);
  font-size: var(--ae-text-base);
  font-weight: var(--ae-weight-semi);
  border-radius: var(--ae-r-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--ae-base);
  white-space: nowrap;
  line-height: 1;
  text-decoration: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.ae-btn:focus-visible { box-shadow: var(--ae-shadow-focus); outline: none; }

/* Primary — Gold fill */
.ae-btn-primary {
  background-color: var(--ae-accent);
  color: var(--ae-primary);
  border-color: var(--ae-accent);
}
.ae-btn-primary:hover {
  background-color: var(--ae-accent-hover);
  border-color: var(--ae-accent-hover);
  color: var(--ae-primary);
  transform: translateY(-1px);
  box-shadow: var(--ae-shadow-md);
}
.ae-btn-primary:active { transform: translateY(0); }

/* Secondary — Outlined dark */
.ae-btn-secondary {
  background-color: transparent;
  color: var(--ae-primary);
  border-color: var(--ae-primary);
}
.ae-btn-secondary:hover {
  background-color: var(--ae-primary);
  color: var(--ae-white);
}

/* Ghost — Outlined gold */
.ae-btn-ghost {
  background-color: transparent;
  color: var(--ae-accent);
  border-color: var(--ae-accent);
}
.ae-btn-ghost:hover {
  background-color: var(--ae-accent);
  color: var(--ae-primary);
}

/* Light — White on dark backgrounds */
.ae-btn-light {
  background-color: var(--ae-white);
  color: var(--ae-primary);
  border-color: var(--ae-white);
}
.ae-btn-light:hover {
  background-color: transparent;
  color: var(--ae-white);
}

/* Sizes */
.ae-btn-sm  { padding: 0.45rem 1.1rem;  font-size: var(--ae-text-sm); }
.ae-btn-lg  { padding: 0.9rem 2.25rem;  font-size: var(--ae-text-lg); }
.ae-btn-xl  { padding: 1.1rem 2.75rem;  font-size: var(--ae-text-xl); border-radius: var(--ae-r-lg); }
.ae-btn-full { width: 100%; }
.ae-btn.loading { opacity: 0.7; pointer-events: none; cursor: not-allowed; }

/* ════════════════════════════════════════════════════════
   CARD SYSTEM
   ════════════════════════════════════════════════════════ */
.ae-card {
  background: var(--ae-white);
  border-radius: var(--ae-r-lg);
  box-shadow: var(--ae-shadow-card);
  overflow: hidden;
  transition: transform var(--ae-base), box-shadow var(--ae-base);
  border: 1px solid var(--ae-border);
}
.ae-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ae-shadow-lg);
}
.ae-card__body   { padding: var(--ae-sp-5); }
.ae-card__footer { padding: var(--ae-sp-4) var(--ae-sp-5); border-top: 1px solid var(--ae-border); }
.ae-card__image  { width: 100%; aspect-ratio: 3/4; object-fit: cover; }

/* ════════════════════════════════════════════════════════
   BADGE / TAG SYSTEM
   ════════════════════════════════════════════════════════ */
.ae-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  font-size: var(--ae-text-xs);
  font-weight: var(--ae-weight-bold);
  border-radius: var(--ae-r-full);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1;
}
.ae-badge-new  { background: var(--ae-success); color: #fff; }
.ae-badge-hot  { background: var(--ae-error);   color: #fff; }
.ae-badge-free { background: var(--ae-accent);  color: var(--ae-primary); }
.ae-badge-sale { background: var(--ae-primary); color: var(--ae-accent); }

.ae-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.3rem 0.8rem;
  background: var(--ae-light);
  border: 1px solid var(--ae-border);
  border-radius: var(--ae-r-full);
  font-size: var(--ae-text-sm);
  color: var(--ae-text-muted);
}

/* ════════════════════════════════════════════════════════
   FORM ELEMENTS
   ════════════════════════════════════════════════════════ */
.ae-input,
.ae-select,
.ae-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--ae-font-body);
  font-size: var(--ae-text-base);
  color: var(--ae-text);
  background: var(--ae-white);
  border: 1.5px solid var(--ae-border);
  border-radius: var(--ae-r-md);
  transition: border-color var(--ae-fast), box-shadow var(--ae-fast);
  outline: none;
  appearance: none;
}
.ae-input:focus,
.ae-select:focus,
.ae-textarea:focus {
  border-color: var(--ae-accent);
  box-shadow: var(--ae-shadow-focus);
}
.ae-input::placeholder { color: var(--ae-text-light); }
.ae-label {
  display: block;
  font-size: var(--ae-text-sm);
  font-weight: var(--ae-weight-semi);
  color: var(--ae-text);
  margin-bottom: var(--ae-sp-2);
}
.ae-form-group { margin-bottom: var(--ae-sp-5); }

/* ════════════════════════════════════════════════════════
   PRICE DISPLAY
   ════════════════════════════════════════════════════════ */
.ae-price {
  font-family: var(--ae-font-heading);
  font-weight: var(--ae-weight-bold);
  color: var(--ae-primary);
}
.ae-price--large { font-size: var(--ae-text-3xl); }
.ae-price--xl    { font-size: var(--ae-text-4xl); }
.ae-price-original {
  font-size: var(--ae-text-sm);
  color: var(--ae-text-light);
  text-decoration: line-through;
}
.ae-price-discount {
  font-size: var(--ae-text-sm);
  color: var(--ae-error);
  font-weight: var(--ae-weight-semi);
}

/* ════════════════════════════════════════════════════════
   UTILITY CLASSES
   ════════════════════════════════════════════════════════ */
.ae-text-center { text-align: center; }
.ae-text-muted  { color: var(--ae-text-muted); }
.ae-text-accent { color: var(--ae-accent); }
.ae-text-gold   { color: var(--ae-accent); }
.ae-hidden      { display: none !important; }
.ae-visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.ae-divider {
  height: 1px;
  background: var(--ae-border);
  margin: var(--ae-sp-8) 0;
}

/* Skeleton loader */
.ae-skeleton {
  background: linear-gradient(
    90deg,
    var(--ae-light) 25%,
    var(--ae-border) 50%,
    var(--ae-light) 75%
  );
  background-size: 200% 100%;
  animation: ae-shimmer 1.5s infinite;
  border-radius: var(--ae-r-md);
}
@keyframes ae-shimmer {
  0%   { background-position:  200% 0; }
  100% { background-position: -200% 0; }
}

/* Preview section (used in product page) */
.ae-preview-section {
  border: 1px solid var(--ae-border);
  border-radius: var(--ae-r-xl);
  overflow: hidden;
  margin: var(--ae-sp-8) 0;
}
.ae-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--ae-sp-5) var(--ae-sp-6);
  background: var(--ae-light);
  gap: var(--ae-sp-4);
}
.ae-preview-header__text h3 {
  font-size: var(--ae-text-xl);
  margin-bottom: var(--ae-sp-1);
}
.ae-preview-header__text p {
  font-size: var(--ae-text-sm);
  color: var(--ae-text-muted);
  margin: 0;
}
.ae-pdf-viewer-wrap {
  position: relative;
}
.ae-pdf-frame-wrap {
  width: 100%;
  height: 500px;
}
.ae-pdf-frame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
.ae-preview-blur {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 220px;
  background: linear-gradient(to bottom, transparent, var(--ae-off-white) 70%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: var(--ae-sp-8);
}
.ae-preview-blur__cta {
  text-align: center;
}
.ae-preview-blur__cta p {
  font-weight: var(--ae-weight-semi);
  margin-bottom: var(--ae-sp-3);
}

/* Product tags strip */
.ae-product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ae-sp-2);
  margin: var(--ae-sp-4) 0;
}
