/* ═══════════════════════════════════════════════════════════════════════════
   MEELY ENTERPRISE CSS — Production Ready
   Palette: Natural Sage · Typography: Outfit + Playfair Display
   Version: 2.0
   ════════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;1,600&family=Tajawal:wght@300;400;500;700;800&display=swap');

/* ── Saudi Riyal Symbol Font ────────────────────────────────────────────────── */
@font-face {
    font-family: 'SaudiRiyal';
    src: url('../../fonts/Arshid.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Render the $ character using the Arshid font as the Saudi Riyal symbol ﷼ */
.sar-sym {
    font-family: 'SaudiRiyal', sans-serif;
    font-style: normal;
    font-weight: normal;
    font-size: 1.35em;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
    margin-bottom: 0.12em;
}

/* ── CSS Variables ─────────────────────────────────────────────────────────── */
:root {
    /* Brand Palette — Natural Sage */
    --meely-1: #d2d4ca;
    --meely-2: #e1e3d9;
    --meely-3: #edefe2;
    --meely-4: #f7f9ec;
    --meely-5: #fdfff5;

    /* Typography */
    --text-dark:  #2b302a;
    --text-muted: #6b7260;

    /* Accent */
    --accent: #8aad6c;  /* Sage green accent */

    /* Contrast Indicators */
    --success: #10b981;
    --warning: #f59e0b;
    --danger:  #ef4444;
    --info:    #38bdf8;

    /* Transitions */
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --transition: all 0.3s var(--ease);

    /* Shadow */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 30px rgba(0,0,0,0.08);
    --shadow-lg: 0 24px 60px rgba(0,0,0,0.1);
    --shadow-xl: 0 40px 80px rgba(0,0,0,0.12);
}

/* ── Reset & Base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    line-height: 1.65;
    background: #fff;
    color: var(--text-dark);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* RTL Arabic font */
[dir="rtl"] body,
[dir="rtl"] .navbar,
[dir="rtl"] p,
[dir="rtl"] label,
[dir="rtl"] input,
[dir="rtl"] select,
[dir="rtl"] textarea,
[dir="rtl"] button,
[dir="rtl"] a {
    font-family: 'Tajawal', sans-serif;
}

[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4 {
    font-family: 'Tajawal', sans-serif;
    font-weight: 800;
}

/* ── Typography ────────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6,
.brand-font {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
}

p { color: var(--text-muted); }

/* ── Layout Utilities ──────────────────────────────────────────────────────── */
.container-xl { max-width: 1320px; margin: 0 auto; padding: 0 1.5rem; }
.section-py    { padding: 5rem 0; }
.section-muted { background: #f9faf6; }

/* Eyebrow label */
.eyebrow-text {
    font-family: 'Outfit', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
    display: block;
}

/* Section titles */
.section-headline {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

[dir="rtl"] .section-headline {
    font-family: 'Tajawal', sans-serif;
    font-weight: 800;
}

.section-body {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.75;
}

/* ── Page Hero Compact ─────────────────────────────────────────────────────── */
.page-hero-compact {
    padding: 8rem 0 3.5rem;
    background: linear-gradient(135deg, #f0f3e8 0%, #fdfff5 100%);
    border-bottom: 1px solid var(--meely-2);
}

.page-hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 700;
    color: var(--text-dark);
    margin: 0.5rem 0 1rem;
}

[dir="rtl"] .page-hero-title {
    font-family: 'Tajawal', sans-serif;
    font-weight: 800;
}

.page-hero-sub {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 600px;
    line-height: 1.7;
    margin: 0;
}

/* ── Site Badges ───────────────────────────────────────────────────────────── */
.site-badge {
    display: inline-flex; align-items: center; gap: 0.4rem;
    background: var(--text-dark); color: #fff;
    font-size: 0.75rem; font-weight: 700;
    padding: 0.35rem 1rem; border-radius: 50px;
    letter-spacing: 0.5px;
}
.site-badge-curr {
    display: inline-flex; align-items: center;
    background: var(--meely-2); color: var(--text-dark);
    font-size: 0.75rem; font-weight: 700;
    padding: 0.35rem 1rem; border-radius: 50px;
}

/* ── Product Cards ─────────────────────────────────────────────────────────── */
.product-card {
    background: #fff;
    border-radius: 20px;
    border: 1px solid #eef0e8;
    overflow: hidden;
    transition: var(--transition);
    display: flex; flex-direction: column;
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--meely-2);
}
.product-img-wrap {
    position: relative; overflow: hidden;
    background: #f9faf6;
    display: flex; align-items: center; justify-content: center;
}
.product-img {
    width: 100%; height: auto;
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: transform 0.4s var(--ease);
}
.product-card:hover .product-img { transform: scale(1.06); }
.product-quick-view {
    position: absolute; inset: 0;
    background: rgba(27,33,24,0.72);
    color: #fff; opacity: 0;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.88rem;
    text-decoration: none;
    transition: opacity 0.3s;
    cursor: pointer;
    border: none;
    padding: 0;
    width: 100%;
}
.product-card:hover .product-quick-view { opacity: 1; }
.product-info { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
/* Product card helper classes */
.product-badge-stock  { position:absolute;top:1rem;left:1rem;background:#ef4444;color:#fff;font-size:.7rem;font-weight:700;padding:.25rem .75rem;border-radius:50px;letter-spacing:.5px;z-index:2; }
[dir="rtl"] .product-badge-stock { left:auto;right:1rem; }
.product-stock-status { font-size:.75rem;font-weight:700;margin-top:.2rem; }
.product-stock-status.in-stock  { color:#10b981; }
.product-stock-status.out-stock { color:#ef4444; }
.btn-cart-icon { width:40px;height:40px;border-radius:50%;background:#f0f2e8;border:none;display:flex;align-items:center;justify-content:center;color:var(--text-dark);font-size:.9rem;transition:all .2s;flex-shrink:0; }
.btn-cart-icon:hover:not(:disabled) { background:var(--text-dark);color:#fff; }
.btn-cart-icon:disabled { opacity:.4;cursor:not-allowed; }
.product-sku {
    font-size: 0.68rem; font-weight: 700; letter-spacing: 1.5px;
    text-transform: uppercase; color: var(--text-muted);
}
.product-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem; font-weight: 700;
    color: var(--text-dark);
    margin: 0.4rem 0 0.6rem;
}
[dir="rtl"] .product-name { font-family: 'Tajawal', sans-serif; font-weight: 800; }
.product-desc {
    font-size: 0.88rem; color: var(--text-muted);
    line-height: 1.6; flex: 1; margin-bottom: 1rem;
}
.product-footer {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 1rem; border-top: 1px solid #f0f2e8;
}
.product-price { 
    font-family: 'Playfair Display', serif; font-size: 1.3rem; font-weight: 700; color: var(--text-dark); 
    display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 0.35rem; 
    direction: ltr !important; unicode-bidi: bidi-override !important;
}
[dir="rtl"] .product-price { font-family: 'Tajawal', sans-serif; }
.product-curr { font-size: 1.05rem; opacity: 1; display: inline-block; order: -1; }

/* Force visual Symbol-Number order globally for all price containers */
.summary-val, .summary-total-val, .cart-item-subtotal, .cart-item-price-unit, .b2b-price-value, .b2b-stat-value, #qvPrice {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 0.35rem;
    direction: ltr !important;
    unicode-bidi: bidi-override !important;
}

/* Fix for purely textual summary values (like 'مجاني' / FREE) — avoid character reversal */
.summary-val.text-success, .summary-val:not(:has(span)) {
    unicode-bidi: normal !important;
    display: inline-block !important; /* revert from inline-flex to handle text correctly */
}
[dir="rtl"] .summary-val.text-success, [dir="rtl"] .summary-val:not(:has(span)) {
    direction: rtl !important;
}
.btn-product {
    padding: 0.5rem 1.2rem; border-radius: 50px;
    background: var(--text-dark); color: #fff;
    font-weight: 700; font-size: 0.82rem;
    text-decoration: none; transition: var(--transition);
    white-space: nowrap;
}
.btn-product:hover { background: var(--accent); color: #fff; }

/* ── About Image Frame ─────────────────────────────────────────────────────── */
.about-img-frame { position: relative; }
.about-img {
    width: 100%; border-radius: 24px;
    box-shadow: var(--shadow-xl);
    object-fit: cover; max-height: 520px;
}
.about-img-badge {
    position: absolute; bottom: -1px; left: 50%; transform: translateX(-50%);
    background: var(--text-dark); color: #fff;
    padding: 0.75rem 2rem; border-radius: 50px;
    font-weight: 700; font-size: 0.85rem;
    white-space: nowrap;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* ── Stat Cards ────────────────────────────────────────────────────────────── */
.stat-card {
    background: #fff;
    border: 1px solid var(--meely-2);
    border-radius: 16px;
    padding: 1.25rem 1rem;
    text-align: center;
    transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-number {
    font-family: 'Playfair Display', serif;
    font-size: 1.9rem; font-weight: 700;
    color: var(--text-dark); line-height: 1; margin-bottom: 0.3rem;
}
[dir="rtl"] .stat-number { font-family: 'Tajawal', sans-serif; }
.stat-unit { font-size: 1rem; }
.stat-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; }

/* ── Pillar Cards ──────────────────────────────────────────────────────────── */
.pillar-card {
    background: #fff;
    border: 1px solid var(--meely-2);
    border-radius: 20px; padding: 2rem; height: 100%;
    transition: var(--transition);
}
.pillar-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.pillar-icon {
    width: 60px; height: 60px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; margin-bottom: 1.2rem;
}
.pillar-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem; font-weight: 700;
    color: var(--text-dark); margin-bottom: 0.75rem;
}
[dir="rtl"] .pillar-title { font-family: 'Tajawal', sans-serif; font-weight: 800; }
.pillar-body { font-size: 0.92rem; color: var(--text-muted); line-height: 1.7; margin: 0; }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn-hero-primary {
    display: inline-flex; align-items: center;
    padding: 0.85rem 2rem; border-radius: 50px;
    background: var(--text-dark); color: #fff;
    font-weight: 700; font-size: 0.95rem;
    text-decoration: none; border: none; cursor: pointer;
    transition: var(--transition);
}
.btn-hero-primary:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }

.btn-hero-outline {
    display: inline-flex; align-items: center;
    padding: 0.85rem 2rem; border-radius: 50px;
    background: transparent; border: 2px solid;
    font-weight: 700; font-size: 0.95rem;
    text-decoration: none; cursor: pointer;
    transition: var(--transition);
}

.btn-outline-elite {
    border: 2px solid var(--text-dark); color: var(--text-dark);
    border-radius: 50px; font-weight: 700;
    transition: var(--transition);
    background: transparent;
}
.btn-outline-elite:hover { background: var(--text-dark); color: #fff; }

/* ── Badge Soft Colors ─────────────────────────────────────────────────────── */
.badge-soft-success { background: rgba(16,185,129,0.12); color: #065f46; border: 1px solid rgba(16,185,129,0.25); }
.badge-soft-warning { background: rgba(245,158,11,0.12); color: #78350f; border: 1px solid rgba(245,158,11,0.25); }
.badge-soft-danger  { background: rgba(239,68,68,0.12);  color: #7f1d1d; border: 1px solid rgba(239,68,68,0.25); }
.badge-soft-info    { background: rgba(56,189,248,0.12); color: #0c4a6e; border: 1px solid rgba(56,189,248,0.25); }

/* ── Contact Styles ────────────────────────────────────────────────────────── */
.contact-channel-card {
    display: flex; align-items: center; gap: 1rem;
    padding: 1.25rem 1.5rem; border-radius: 16px; margin-bottom: 1rem;
    text-decoration: none; color: var(--text-dark);
    border: 1px solid transparent; transition: var(--transition);
}
.contact-channel-card.green  { background: #f0fdf4; border-color: #bbf7d0; }
.contact-channel-card.green:hover { background: #dcfce7; }
.contact-channel-card.blue   { background: #eff6ff; border-color: #bfdbfe; }
.contact-channel-card.blue:hover  { background: #dbeafe; }
.contact-channel-card.gray   { background: #f9faf6; border-color: var(--meely-2); cursor: default; }
.contact-channel-icon {
    width: 50px; height: 50px; border-radius: 50%;
    background: rgba(0,0,0,0.06);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; flex-shrink: 0;
}
.contact-channel-label {
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; color: var(--text-muted); margin-bottom: 0.2rem;
}
.contact-channel-value { font-size: 1rem; font-weight: 700; color: var(--text-dark); }
.contact-form-card {
    background: #f9faf6; border: 1px solid #eef0e8;
    border-radius: 24px; padding: 2.5rem;
}
.form-label-elite {
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; color: var(--text-muted);
    margin-bottom: 0.5rem; display: block;
}
.form-control-elite {
    width: 100%; border: 1.5px solid #e0e4d8; border-radius: 12px;
    padding: 0.85rem 1rem;
    font-family: 'Outfit', sans-serif; font-size: 0.95rem;
    background: #fff; transition: border-color 0.2s; outline: none;
}
.form-control-elite:focus { border-color: var(--text-dark); box-shadow: 0 0 0 3px rgba(43,48,42,0.06); }

/* ── Scroll to top ─────────────────────────────────────────────────────────── */
.scroll-top-btn {
    position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 999;
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--text-dark); color: #fff;
    display: none; align-items: center; justify-content: center;
    font-size: 0.9rem; cursor: pointer; border: none;
    box-shadow: var(--shadow-md); transition: var(--transition);
}
.scroll-top-btn.visible { display: flex; }
.scroll-top-btn:hover { background: var(--accent); transform: translateY(-2px); }

/* ── Cart Dot ──────────────────────────────────────────────────────────────── */
.cart-dot {
    position: absolute; top: -4px; right: -4px;
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--danger); color: #fff;
    font-size: 0.65rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #fff;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 991px) {
    .section-py { padding: 3.5rem 0; }
    .page-hero-compact { padding: 7rem 0 2.5rem; }
}
@media (max-width: 767px) {
    .section-py { padding: 2.5rem 0; }
    .page-hero-compact { padding: 6rem 0 2rem; }
    .about-img-badge { font-size: 0.78rem; padding: 0.6rem 1.5rem; }
}
