/**
 * AH — Ahmed Hosny Store | Design tokens (single source of truth)
 * Premium · Clean · Feminine · Trustworthy. Light-only storefront.
 * Legacy variable names are mapped to the AH tokens so older templates keep working.
 */
:root {
  /* Brand */
  --ah-primary: #7A2E4D;        /* rosewood — CTAs, links (contrast 9.6:1 on ivory) */
  --ah-primary-600: #8F3A5C;    /* hover */
  --ah-primary-700: #62233D;    /* active */
  --ah-primary-50:  #F7ECF0;    /* tinted surfaces */
  --ah-secondary: #2B2326;      /* ink — headings, footer */
  --ah-accent: #B8895A;         /* champagne — decoration only (not for small text) */
  --ah-accent-soft: #EBD9C4;

  /* Surfaces */
  --ah-bg: #FBF7F4;
  --ah-surface: #FFFFFF;
  --ah-surface-alt: #F3E9E4;

  /* Text */
  --ah-text: #2B2326;
  --ah-text-muted: #6B5B62;     /* 6:1 on ivory */
  --ah-text-on-primary: #FFFFFF;

  /* Lines */
  --ah-border: #E8DDD8;
  --ah-border-strong: #D3C3BC;

  /* States */
  --ah-success: #2F7D5B;
  --ah-warning: #B7791F;
  --ah-danger:  #B3261E;
  --ah-info:    #2C5F8A;

  /* Shape & depth (restrained) */
  --ah-radius-sm: 6px;
  --ah-radius: 10px;
  --ah-radius-lg: 16px;
  --ah-shadow-sm: 0 1px 2px rgba(43,35,38,.06);
  --ah-shadow: 0 6px 20px -8px rgba(43,35,38,.14);
  --ah-focus: 0 0 0 3px rgba(122,46,77,.28);

  /* Type */
  --ah-font-ar: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  --ah-font-display: 'Playfair Display', 'Cairo', Georgia, serif;
  --fs-h1: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem);
  --fs-h2: clamp(1.4rem, 1.1rem + 1.2vw, 2rem);
  --fs-h3: 1.2rem;
  --fs-body: 1rem;
  --fs-small: .875rem;
  --fs-caption: .78rem;
  --fs-price: 1.15rem;
  --fs-badge: .72rem;

  /* ---- Legacy aliases (do not use in new code) ---- */
  --bg-main: var(--ah-bg);
  --bg-surface: var(--ah-surface);
  --bg-card: var(--ah-surface);
  --bg-glass: rgba(255,255,255,.96);
  --border-color: var(--ah-border);
  --border-hover: var(--ah-border-strong);
  --primary-accent: var(--ah-primary);
  --primary-light: var(--ah-primary-50);
  --primary-dark: var(--ah-primary-700);
  --text-main: var(--ah-text);
  --text-muted: var(--ah-text-muted);
  --text-gold: var(--ah-primary);
  --glow-color: rgba(122,46,77,.10);
  --gradient-gold: linear-gradient(var(--ah-primary), var(--ah-primary));
  --gradient-gold-subtle: linear-gradient(var(--ah-primary-50), var(--ah-primary-50));
  --card-shadow: var(--ah-shadow);
  --admin-gold: var(--ah-primary);
  --admin-gold-light: var(--ah-primary-700);
  --admin-gold-glow: rgba(122,46,77,.14);
}

html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--ah-bg);
  color: var(--ah-text);
  font-family: var(--ah-font-ar);
  font-size: var(--fs-body);
  line-height: 1.7;
  font-variant-numeric: lining-nums;
}
h1, h2, h3, h4 { color: var(--ah-secondary); line-height: 1.3; font-weight: 700; }
h1 { font-size: var(--fs-h1); } h2 { font-size: var(--fs-h2); } h3 { font-size: var(--fs-h3); }
small, .small { font-size: var(--fs-small); }
.text-gold, .text-gold-gradient { color: var(--ah-primary) !important; background: none !important; -webkit-text-fill-color: currentColor !important; }

a { color: var(--ah-primary); }
a:hover { color: var(--ah-primary-700); }

/* Accessible focus for every interactive element */
:focus-visible { outline: 2px solid var(--ah-primary); outline-offset: 2px; box-shadow: var(--ah-focus); }

/* Buttons: one primary style, one outline style */
.btn-ah-gold { background: var(--ah-primary) !important; color: var(--ah-text-on-primary) !important; border: 1px solid var(--ah-primary) !important; box-shadow: none !important; }
.btn-ah-gold:hover { background: var(--ah-primary-600) !important; }
.btn-ah-gold:active { background: var(--ah-primary-700) !important; }
.btn-ah-outline { background: transparent !important; color: var(--ah-primary) !important; border: 1px solid var(--ah-primary) !important; }
.btn-ah-outline:hover { background: var(--ah-primary-50) !important; }

.product-card, .category-card, .feature-item, .summary-card, .cart-container { border-radius: var(--ah-radius-lg); border: 1px solid var(--ah-border); box-shadow: var(--ah-shadow-sm); }
.product-card:hover { box-shadow: var(--ah-shadow); }

/* Price */
.price, .product-price, .current-price { font-size: var(--fs-price); font-weight: 800; color: var(--ah-secondary); }
.old-price { color: var(--ah-text-muted); text-decoration: line-through; font-weight: 400; }

/* Bootstrap dark utilities should never appear on the light storefront */
.bg-dark, .bg-dark-subtle, .bg-black, .bg-secondary { background-color: var(--ah-surface) !important; color: var(--ah-text) !important; }
.text-white, .text-light { color: var(--ah-text) !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
