/* =========================================================
   خروف الديرة — هوية بصرية مستوحاة من الملحمة/السوق البلدي
   ألوان: حجري دافئ + عنابي غامق + ذهبي عتيق
   خطوط: Cairo للعناوين / Tajawal للنصوص
   ========================================================= */

:root {
    --stone: #F1E7D3;
    --stone-deep: #E5D5B8;
    --ink: #241A17;
    --ink-soft: #4A3B35;
    --maroon: #6E1423;
    --maroon-deep: #4A0D18;
    --maroon-tint: #F6E4E1;
    --gold: #A9762F;
    --gold-soft: #D9B978;
    --sage: #566246;
    --whatsapp: #22B858;
    --whatsapp-deep: #1A9448;
    --line: rgba(36, 26, 23, 0.14);
    --shadow: 0 10px 30px rgba(36, 20, 15, 0.12);
    --radius: 6px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--stone);
    color: var(--ink);
    font-family: 'Tajawal', sans-serif;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand strong {
    font-family: 'Cairo', sans-serif;
    color: var(--ink);
    margin: 0;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

/* دعم لأصحاب اختلاف الحركة */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

a:focus-visible, button:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

/* =================== زر عام =================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 24px;
    border-radius: var(--radius);
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-whatsapp {
    background: var(--whatsapp);
    color: #fff;
}
.btn-whatsapp:hover { background: var(--whatsapp-deep); transform: translateY(-1px); }

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--maroon);
    color: var(--maroon);
}
.btn-outline:hover { background: var(--maroon); color: #fff; }

/* =================== الهيدر =================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--stone);
    border-bottom: 1px solid var(--line);
}
.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 14px;
    padding-bottom: 14px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.brand-mark {
    width: 42px;
    height: 42px;
    background: var(--maroon);
    color: var(--stone);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    flex-shrink: 0;
    overflow: hidden;
}
.brand-mark svg { width: 100%; height: 100%; }
.brand-mark.has-photo { padding: 0; background: var(--stone-deep); }
.brand-mark.has-photo img { width: 100%; height: 100%; object-fit: cover; }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-text strong { font-size: 19px; }
.brand-text small { color: var(--ink-soft); font-size: 12.5px; }

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    font-size: 15px;
}
.main-nav a { position: relative; padding: 4px 0; color: var(--ink-soft); }
.main-nav a:hover { color: var(--maroon); }
.main-nav a::after {
    content: "";
    position: absolute;
    right: 0; left: 0; bottom: -3px;
    height: 2px;
    background: var(--gold);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}
.main-nav a:hover::after { transform: scaleX(1); }

.header-cta { padding: 10px 18px; font-size: 13.5px; }

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.menu-toggle span {
    display: block;
    height: 2px;
    width: 20px;
    margin: 0 auto;
    background: var(--ink);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* =================== البطل (Hero) =================== */
.hero {
    position: relative;
    background: var(--maroon);
    color: var(--stone);
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 85% 20%, rgba(169,118,47,0.28), transparent 55%);
    pointer-events: none;
}
.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 40px;
    padding: 68px 0 110px;
}
.hero h1 {
    font-size: clamp(32px, 4.2vw, 52px);
    line-height: 1.25;
    color: #fff;
}
.hero h1 em {
    font-style: normal;
    color: var(--gold-soft);
}
.hero p.lead {
    margin-top: 18px;
    font-size: 17px;
    color: rgba(255,255,255,0.82);
    max-width: 46ch;
}
.hero-actions {
    display: flex;
    gap: 14px;
    margin-top: 30px;
    flex-wrap: wrap;
}
.hero-actions .btn-outline {
    border-color: rgba(255,255,255,0.55);
    color: #fff;
}
.hero-actions .btn-outline:hover { background: #fff; color: var(--maroon); }

.hero-art {
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-art .ring {
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: var(--maroon-deep);
    border: 1px solid rgba(255,255,255,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 46px;
    color: var(--gold-soft);
    overflow: hidden;
}
.hero-art .ring svg { width: 100%; height: 100%; }
.hero-art .ring.has-photo { padding: 0; }
.hero-art .ring.has-photo img { width: 100%; height: 100%; object-fit: cover; }

/* شريط الثقة */
.trust-strip {
    position: relative;
    z-index: 2;
    margin-top: -56px;
    padding-bottom: 10px;
}
.trust-grid {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}
.trust-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 24px 26px;
    border-left: 1px solid var(--line);
}
.trust-item:last-child { border-left: none; }
.trust-item .ic {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    color: var(--maroon);
}
.trust-item .ic svg { width: 100%; height: 100%; }
.trust-item h3 { font-size: 16px; }
.trust-item p { margin: 4px 0 0; font-size: 13.5px; color: var(--ink-soft); }

/* =================== الأقسام (روابط سريعة) =================== */
.categories-strip {
    padding: 64px 0 10px;
}
.section-head {
    text-align: center;
    max-width: 560px;
    margin: 0 auto 34px;
}
.section-head h2 { font-size: 28px; }
.section-head p { color: var(--ink-soft); margin-top: 10px; font-size: 15px; }

.cat-scroll {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
}
.cat-chip {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 20px;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 14.5px;
    color: var(--maroon);
}
.cat-chip .ic { width: 22px; height: 22px; }
.cat-chip .ic svg { width: 100%; height: 100%; }
.cat-chip:hover { background: var(--maroon-tint); }

/* =================== أقسام المنتجات =================== */
.product-section {
    padding: 54px 0;
    scroll-margin-top: 90px;
}
.product-section:nth-of-type(even) { background: var(--stone-deep); }

.cat-heading {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 2px solid var(--maroon);
}
.cat-heading .ic {
    width: 46px;
    height: 46px;
    color: var(--maroon);
    background: #fff;
    border-radius: 50%;
    padding: 10px;
    flex-shrink: 0;
    box-shadow: var(--shadow);
}
.cat-heading .ic svg { width: 100%; height: 100%; }
.cat-heading h2 { font-size: 23px; }
.cat-heading p { margin: 3px 0 0; color: var(--ink-soft); font-size: 14px; }

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 22px;
}
.product-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    border-right: 4px solid var(--gold);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    scroll-margin-top: 90px;
}
.product-media {
    background: var(--maroon-tint);
    color: var(--maroon);
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 190px;
    overflow: hidden;
}
.product-media svg { width: 74px; height: 74px; }
.product-media.has-photo { padding: 0; }
.product-media.has-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-body h3 { font-size: 17px; }
.product-weight {
    font-size: 13px;
    color: var(--sage);
    font-weight: 700;
}
.product-desc { font-size: 13.5px; color: var(--ink-soft); flex: 1; }
.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1px dashed var(--line);
}
.product-price { font-family: 'Cairo', sans-serif; font-weight: 800; font-size: 19px; color: var(--maroon); }
.product-price small { font-size: 12px; font-weight: 500; color: var(--ink-soft); }
.product-order {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--whatsapp);
    color: #fff;
    padding: 9px 16px;
    border-radius: var(--radius);
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 13.5px;
    white-space: nowrap;
}
.product-order svg { width: 15px; height: 15px; }
.product-order:hover { background: var(--whatsapp-deep); }

/* =================== شريط دعوة ختامية =================== */
.cta-band {
    background: var(--ink);
    color: var(--stone);
    padding: 56px 0;
    text-align: center;
}
.cta-band h2 { color: #fff; font-size: 25px; }
.cta-band p { color: rgba(241,231,211,0.75); margin: 10px 0 26px; }

/* =================== الفوتر =================== */
.site-footer { background: var(--maroon-deep); color: var(--stone); padding: 44px 0 0; }
.footer-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
    flex-wrap: wrap;
    padding-bottom: 34px;
    border-bottom: 1px solid rgba(241,231,211,0.15);
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand strong { font-family: 'Cairo', sans-serif; font-size: 18px; color: #fff; }
.footer-brand p { margin: 4px 0 0; font-size: 13px; color: rgba(241,231,211,0.7); }
.footer-info p {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    font-size: 13.5px;
    color: rgba(241,231,211,0.85);
}
.footer-info .ic { width: 16px; height: 16px; }
.footer-info svg { width: 100%; height: 100%; }
.footer-bottom {
    padding: 18px 0;
    text-align: center;
    font-size: 12.5px;
    color: rgba(241,231,211,0.55);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* واتساب عائم */
.floating-whatsapp {
    position: fixed;
    bottom: 22px;
    left: 22px;
    width: 56px;
    height: 56px;
    background: var(--whatsapp);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(34,184,88,0.45);
    z-index: 60;
}
.floating-whatsapp svg { width: 28px; height: 28px; }
.floating-whatsapp:hover { background: var(--whatsapp-deep); }

/* =================== صفحات السياسات (نص عام) =================== */
.policy-page {
    padding: 54px 0 70px;
}
.policy-page .wrap { max-width: 780px; }
.policy-page h1 {
    font-size: 30px;
    margin-bottom: 8px;
}
.policy-updated {
    color: var(--ink-soft);
    font-size: 13px;
    margin-bottom: 34px;
}
.policy-page h2 {
    font-size: 19px;
    margin-top: 34px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}
.policy-page p { margin: 0 0 14px; color: var(--ink-soft); }
.policy-page ul { margin: 0 0 14px; padding-right: 22px; list-style: disc; }
.policy-page li { margin-bottom: 8px; color: var(--ink-soft); }
.policy-page strong { color: var(--ink); }
.policy-note {
    background: #fff;
    border-right: 4px solid var(--gold);
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: 13.5px;
    margin: 24px 0;
}
.policy-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 6px;
}

/* =================== الفوتر — روابط قانونية =================== */
.footer-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    justify-content: center;
    margin-top: 6px;
    font-size: 12px;
}
.footer-legal a { color: rgba(241,231,211,0.7); }
.footer-legal a:hover { color: #fff; }
/* =================== استجابة الجوال =================== */
@media (max-width: 860px) {
    .hero-inner { grid-template-columns: 1fr; padding-bottom: 130px; }
    .hero-art { order: -1; }
    .hero-art .ring { width: 170px; height: 170px; padding: 32px; }
    .trust-grid { grid-template-columns: 1fr; }
    .trust-item { border-left: none; border-bottom: 1px solid var(--line); }
    .trust-item:last-child { border-bottom: none; }

    .menu-toggle { display: flex; }
    .main-nav {
        position: absolute;
        top: 100%;
        right: 0; left: 0;
        background: var(--stone);
        border-bottom: 1px solid var(--line);
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease;
    }
    .main-nav.open { max-height: 400px; }
    .main-nav a { width: 100%; padding: 14px 24px; border-bottom: 1px solid var(--line); }
    .header-cta { display: none; }
}

@media (max-width: 520px) {
    .wrap { padding: 0 16px; }
    .hero-inner { padding-top: 44px; }
    .footer-row { flex-direction: column; }
}
