/**
 * Rozen Flora Pro — Theme Stylesheet
 * قالب Rozen Flora: أنماط الهيدر الفاخر + هوية burgundy/ذهبي + RTL.
 *
 * @package Rozen_Flora_Pro
 */

/* =====================================================================
 * 1) Design tokens — متغيرات الهوية البصرية
 * ===================================================================== */

:root {
    /* Brand colors — ألوان الهوية */
    --rf-burgundy:        #722F37;   /* لون اللوقو الأساسي */
    --rf-burgundy-dark:   #5A242B;
    --rf-burgundy-light:  #8E424A;
    --rf-gold:            #D4AF37;   /* الذهبي من اللوقو */
    --rf-gold-light:      #E5C76B;
    --rf-gold-dark:       #B8932C;

    /* Neutrals — محايدات */
    --rf-cream:           #FAF6F0;
    --rf-cream-dark:      #F2EAE0;
    --rf-white:           #FFFFFF;
    --rf-ink:             #2A1F22;
    --rf-ink-soft:        #5C5052;
    --rf-line:            #E8DEDB;
    --rf-line-soft:       #F1E9E6;

    /* Typography — الخطوط */
    --rf-font-serif:      'Playfair Display', 'Cairo', Georgia, serif;
    --rf-font-body:       'Cairo', 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --rf-font-decor:      'Jost', 'Cairo', sans-serif;

    /* Shadows — ظلال */
    --rf-shadow-sm:       0 1px 3px rgba(114, 47, 55, 0.08);
    --rf-shadow:          0 4px 16px rgba(114, 47, 55, 0.10);
    --rf-shadow-lg:       0 10px 40px rgba(114, 47, 55, 0.14);

    /* Layout — تخطيط */
    --rf-container:       1280px;
    --rf-radius:          10px;
    --rf-radius-sm:       6px;
    --rf-transition:      0.28s cubic-bezier(0.4, 0, 0.2, 1);
    --rf-header-h:        96px;
}

/* =====================================================================
 * 2) Base resets & typography — أساسيات
 * ===================================================================== */

*, *::before, *::after { box-sizing: border-box; }

.rf-body {
    margin: 0;
    font-family: var(--rf-font-body);
    color: var(--rf-ink);
    background: var(--rf-white);
    line-height: 1.7;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

.rf-container {
    width: 100%;
    max-width: var(--rf-container);
    margin: 0 auto;
    padding: 0 24px;
}

h1, h2, h3, h4, .rf-serif {
    font-family: var(--rf-font-serif);
    color: var(--rf-burgundy);
    font-weight: 600;
    line-height: 1.25;
}

a { color: var(--rf-burgundy); transition: color var(--rf-transition); }
a:hover { color: var(--rf-gold); }

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute;
    top: -100px; right: 0;
    background: var(--rf-burgundy);
    color: #fff;
    padding: 10px 18px;
    z-index: 9999;
    text-decoration: none;
    border-radius: 0 0 0 var(--rf-radius-sm);
}
.skip-link:focus { top: 0; color: #fff; }

/* =====================================================================
 * 3) Top bar — الشريط العلوي
 * ===================================================================== */

.rf-topbar {
    background: var(--rf-burgundy);
    color: var(--rf-cream);
    font-size: 12.5px;
    letter-spacing: 0.3px;
    border-bottom: 2px solid var(--rf-gold);
}

.rf-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 38px;
    gap: 16px;
}

.rf-topbar-contact {
    display: flex;
    align-items: center;
    gap: 18px;
}

.rf-topbar-wa, .rf-topbar-phone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--rf-cream);
    text-decoration: none;
    opacity: 0.92;
    transition: opacity var(--rf-transition), color var(--rf-transition);
}
.rf-topbar-wa:hover { opacity: 1; color: var(--rf-gold-light); }
.rf-topbar-wa svg { color: #25D366; }

.rf-topbar-announcement {
    color: var(--rf-gold-light);
    font-weight: 500;
}

.rf-topbar-meta { display: flex; align-items: center; gap: 16px; }

.rf-topbar-menu {
    list-style: none;
    margin: 0; padding: 0;
    display: flex; gap: 14px;
}
.rf-topbar-menu a {
    color: var(--rf-cream);
    text-decoration: none;
    opacity: 0.9;
    font-size: 12px;
}
.rf-topbar-menu a:hover { opacity: 1; color: var(--rf-gold-light); }

/* =====================================================================
 * 4-7) Header, nav, breadcrumb, overlay — moved to header.css (clean, no dupes)
 *    الهيدر والقائمة والمسار والطبقة: نُقلت إلى header.css (نظيف بلا تكرار)
 * ===================================================================== */

/* =====================================================================
 * 6b) Breadcrumb bar — شريط مسار التنقل
 * ===================================================================== */

.rf-breadcrumb-bar {
    background: var(--rf-cream-dark);
    border-bottom: 1px solid var(--rf-line);
    padding: 12px 0;
    font-size: 13px;
}
.rf-breadcrumb,
.rf-breadcrumb a { color: var(--rf-ink-soft); text-decoration: none; }
.rf-breadcrumb a:hover { color: var(--rf-burgundy); }
.rf-crumb-sep { margin: 0 8px; color: var(--rf-gold); }

/* =====================================================================
 * 8) Main content — المحتوى الرئيسي
 * ===================================================================== */

.rf-main {
    min-height: 60vh;
    background: var(--rf-white);
}

/* =====================================================================
 * 9) WooCommerce: small touches (more styling in later steps)
 * ===================================================================== */

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    border-top-color: var(--rf-gold) !important;
}
.woocommerce-message::before,
.woocommerce-info::before { color: var(--rf-gold) !important; }

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
    background: var(--rf-burgundy) !important;
    color: #fff !important;
    border-radius: var(--rf-radius-sm) !important;
    font-family: var(--rf-font-body) !important;
    font-weight: 600 !important;
    padding: 12px 26px !important;
    transition: background var(--rf-transition) !important;
    border: 0 !important;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
    background: var(--rf-gold) !important;
    color: var(--rf-burgundy-dark) !important;
}

/* Price color — لون السعر */
.woocommerce-Price-amount,
.woocommerce ul.products li.product .price {
    color: var(--rf-burgundy) !important;
    font-weight: 600;
}

/* =====================================================================
 * 10-11) Header responsive + RTL + top bar + centered-logo
 *        ALL MOVED to header.css (single clean source).
 *        كل قواعد الهيدر والقائمة والشريط العلوي: نُقلت إلى header.css
 * ===================================================================== */

/* Print — للطباعة */
@media print {
    .rf-topbar, .rf-primary-nav, .rf-actions-col, .rf-breadcrumb-bar { display: none; }
}

/* =====================================================================
 * 12) Content layout — تخطيط المحتوى
 * ===================================================================== */

.rf-content-wrap {
    padding: 40px 0;
}

.rf-page-header {
    text-align: center;
    margin-bottom: 32px;
}
.rf-page-title {
    font-size: clamp( 28px, 4vw, 42px );
    margin: 0 0 8px;
}

.rf-page-content,
.rf-post-content {
    font-size: 16px;
    line-height: 1.85;
    color: var(--rf-ink);
    max-width: 760px;
    margin: 0 auto;
}
.rf-page-content p,
.rf-post-content p { margin: 0 0 1.2em; }
.rf-page-content h2,
.rf-post-content h2 { font-size: 26px; margin: 1.4em 0 0.6em; }
.rf-page-content h3,
.rf-post-content h3 { font-size: 21px; margin: 1.2em 0 0.5em; }
.rf-page-content img,
.rf-post-content img {
    border-radius: var(--rf-radius);
    margin: 1em 0;
}
.rf-page-content blockquote,
.rf-post-content blockquote {
    border-inline-start: 3px solid var(--rf-gold);
    background: var(--rf-cream);
    padding: 16px 24px;
    margin: 1.4em 0;
    font-style: italic;
    color: var(--rf-ink-soft);
}

/* =====================================================================
 * 13) Blog grid — شبكة المقالات
 * ===================================================================== */

.rf-posts-grid {
    display: grid;
    grid-template-columns: repeat( auto-fill, minmax( 300px, 1fr ) );
    gap: 28px;
}

.rf-post-card {
    background: var(--rf-white);
    border: 1px solid var(--rf-line);
    border-radius: var(--rf-radius);
    overflow: hidden;
    transition: transform var(--rf-transition), box-shadow var(--rf-transition), border-color var(--rf-transition);
}
.rf-post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--rf-shadow-lg);
    border-color: var(--rf-gold);
}
.rf-post-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}
.rf-post-card-thumb {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--rf-cream);
}
.rf-post-card-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform var(--rf-transition);
}
.rf-post-card:hover .rf-post-card-thumb img { transform: scale(1.06); }
.rf-post-card-nothumb {
    display: flex; align-items: center; justify-content: center;
    color: var(--rf-burgundy-light);
    font-size: 56px;
}
.rf-post-card-body { padding: 20px 22px 24px; }
.rf-post-card-meta { font-size: 12px; color: var(--rf-gold-dark); margin-bottom: 8px; }
.rf-post-card-title {
    font-size: 19px;
    margin: 0 0 8px;
    line-height: 1.35;
}
.rf-post-card-excerpt {
    font-size: 14px;
    color: var(--rf-ink-soft);
    line-height: 1.6;
    margin-bottom: 14px;
}
.rf-read-more {
    color: var(--rf-burgundy);
    font-weight: 600;
    font-size: 14px;
}
.rf-post-card:hover .rf-read-more { color: var(--rf-gold-dark); }

/* Single post — مقال منفرد */
.rf-single-post .rf-post-header { text-align: center; margin-bottom: 28px; }
.rf-post-title { font-size: clamp(26px, 4vw, 38px); margin: 0 0 12px; }
.rf-post-meta {
    color: var(--rf-ink-soft);
    font-size: 14px;
    display: flex; gap: 16px; justify-content: center;
}
.rf-post-thumbnail { margin-bottom: 32px; border-radius: var(--rf-radius); overflow: hidden; }
.rf-post-thumbnail img { width: 100%; }
.rf-post-footer { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--rf-line); }
.rf-post-tags { margin-bottom: 16px; }
.rf-post-tags a {
    display: inline-block;
    background: var(--rf-cream);
    color: var(--rf-burgundy);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 13px;
    text-decoration: none;
    margin-inline-end: 6px;
}
.rf-post-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    font-weight: 600;
}

/* =====================================================================
 * 14) Footer — الفوتر
 * ===================================================================== */

.rf-footer {
    background: var(--rf-burgundy-dark);
    color: rgba(255,255,255,0.78);
    margin-top: 60px;
}

.rf-footer a { color: rgba(255,255,255,0.82); text-decoration: none; }
.rf-footer a:hover { color: var(--rf-gold-light); }

/* Newsletter strip — شريط النشرة */
.rf-footer-newsletter {
    background: linear-gradient(135deg, var(--rf-burgundy) 0%, var(--rf-burgundy-dark) 100%);
    border-bottom: 1px solid rgba(212, 175, 55, 0.25);
    padding: 38px 0;
}
.rf-newsletter-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    flex-wrap: wrap;
}
.rf-newsletter-text h3 {
    color: var(--rf-gold-light);
    font-size: 24px;
    margin: 0 0 6px;
}
.rf-newsletter-text p { margin: 0; font-size: 14px; color: rgba(255,255,255,0.75); }
.rf-newsletter-form {
    display: flex;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 999px;
    padding: 5px;
    min-width: 360px;
}
.rf-newsletter-form input {
    flex: 1;
    background: transparent;
    border: 0;
    color: #fff;
    padding: 10px 18px;
    font-size: 14px;
    outline: none;
}
.rf-newsletter-form input::placeholder { color: rgba(255,255,255,0.55); }
.rf-newsletter-btn {
    background: var(--rf-gold);
    color: var(--rf-burgundy-dark);
    border: 0;
    border-radius: 999px;
    padding: 10px 28px;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--rf-transition);
}
.rf-newsletter-btn:hover { background: var(--rf-gold-light); }

/* Main footer grid — شبكة الفوتر */
.rf-footer-main { padding: 56px 0 40px; }
.rf-footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
    gap: 40px;
}
.rf-footer-logo img {
    max-height: 70px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.95;
}
.rf-footer-tagline {
    font-size: 14px;
    line-height: 1.7;
    margin: 16px 0 20px;
    max-width: 340px;
}
.rf-social { display: flex; gap: 10px; }
.rf-social-link {
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 50%;
    color: var(--rf-gold-light);
    transition: background var(--rf-transition), color var(--rf-transition), border-color var(--rf-transition);
}
.rf-social-link:hover {
    background: var(--rf-gold);
    color: var(--rf-burgundy-dark);
    border-color: var(--rf-gold);
}

.rf-footer-heading {
    color: var(--rf-gold-light);
    font-family: var(--rf-font-body);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0 0 18px;
    position: relative;
    padding-bottom: 10px;
}
.rf-footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    inset-inline-start: 0;
    width: 30px; height: 2px;
    background: var(--rf-gold);
}
.rf-footer-menu {
    list-style: none;
    margin: 0; padding: 0;
}
.rf-footer-menu li { margin-bottom: 10px; }
.rf-footer-menu a { font-size: 14px; transition: padding-inline-start var(--rf-transition), color var(--rf-transition); }
.rf-footer-menu a:hover { padding-inline-start: 6px; color: var(--rf-gold-light); }

.rf-footer-contact { list-style: none; margin: 0; padding: 0; }
.rf-footer-contact li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 14px;
}
.rf-footer-contact svg { color: var(--rf-gold); flex: 0 0 auto; }
.rf-footer-hours {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    font-size: 13px;
}
.rf-hours-label { color: var(--rf-gold-light); display: block; margin-bottom: 2px; }

/* Footer bottom — أسفل الفوتر (متمركز بالكامل) */
.rf-footer-bottom {
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    padding: 22px 0;
}
/* Centered by default + when using the centered class — متمركز افتراضياً */
.rf-bottom-inner,
.rf-bottom-inner.rf-bottom-centered {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;          /* عمودي → كل شيء بالمنتصف */
    gap: 8px;
    text-align: center;
}
.rf-bottom-centered .rf-copyright,
.rf-bottom-centered .rf-widget {
    margin: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}
.rf-bottom-centered .rf-widget p,
.rf-bottom-centered .rf-widget a {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    text-align: center;
}
.rf-bottom-centered .rf-widget a:hover { color: var(--rf-gold-light); }
.rf-copyright { font-size: 13px; margin: 0; color: rgba(255, 255, 255, 0.7); }

/* =====================================================================
 * 15) WooCommerce containers — حاويات WooCommerce
 * ===================================================================== */

.rf-wc-container { padding: 32px 0 60px; }
.rf-wc-main { min-height: 50vh; }

/* =====================================================================
 * 16) No-results — لا نتائج
 * ===================================================================== */

.rf-no-results { text-align: center; padding: 60px 20px; }
.rf-no-results .rf-page-title { color: var(--rf-burgundy); }

/* =====================================================================
 * 17) Pagination — ترقيم الصفحات
 * ===================================================================== */

.pagination, .rf-page-links,
nav.woocommerce-pagination {
    margin-top: 40px;
    text-align: center;
}
.page-numbers {
    display: inline-flex;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.page-numbers li { display: inline-block; }
.page-numbers a, .page-numbers span {
    display: inline-flex;
    align-items: center; justify-content: center;
    min-width: 42px; height: 42px;
    padding: 0 12px;
    border: 1px solid var(--rf-line);
    border-radius: var(--rf-radius-sm);
    color: var(--rf-burgundy);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--rf-transition);
}
.page-numbers a:hover,
.page-numbers .current {
    background: var(--rf-burgundy);
    color: #fff;
    border-color: var(--rf-burgundy);
}

/* =====================================================================
 * 18) Footer responsive — تجاوب الفوتر
 * ===================================================================== */

@media (max-width: 900px) {
    .rf-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .rf-newsletter-inner { flex-direction: column; text-align: center; }
    .rf-newsletter-form { min-width: 100%; }
}

@media (max-width: 768px) {
    /* Center the whole footer on mobile — توسيط الفوتر كاملاً على الجوال */
    .rf-footer-main,
    .rf-footer-grid,
    .rf-footer-col,
    .rf-footer-brand {
        text-align: center !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .rf-footer-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .rf-footer-brand { display: flex; flex-direction: column; align-items: center; }
    .rf-footer-logo { display: flex; justify-content: center; }
    .rf-footer-logo img { margin: 0 auto; }
    .rf-footer-tagline { margin-inline: auto; max-width: 420px; }
    .rf-social { justify-content: center; }

    /* Footer headings keep their underline centered — توسيط العناوين */
    .rf-footer-heading { text-align: center; }
    .rf-footer-heading::after {
        inset-inline-start: 50%;
        transform: translateX(50%);
        margin-inline-start: -15px;
    }

    /* Footer menus centered — توسيط القوائم */
    .rf-footer-menu,
    .rf-footer-contact {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    .rf-footer-menu li,
    .rf-footer-contact li {
        text-align: center;
        margin-inline: auto;
    }
    /* hover slide breaks in RTL/centered → reset padding — إزالة انزياح hover */
    .rf-footer-menu a:hover { padding-inline-start: 0; }

    /* Bottom row already centered globally — keeps mobile consistent */
    .rf-bottom-inner { gap: 10px; }
}

@media (max-width: 560px) {
    .rf-posts-grid { grid-template-columns: 1fr; }
}
