/*
Theme Name: Real Power Custom Theme
Description: Zero-Bloat, High-Performance Custom E-Commerce Theme for Real Power Brand.
Author: Real Power Development Team
Version: 1.0.0
Text Domain: real-power
*/

:root {
  /* ألوان الهوية الرسمية من ملف التصميم */
  --color-primary: #4B1D3F;      /* Deep Plum */
  --color-secondary: #C98FA3;    /* Dusty Rose */
  --color-accent: #D4AF7A;       /* Champagne Gold */
  --bg-main: #FAF6F2;            /* Warm Ivory */
  --text-dark: #333333;          /* Charcoal */
  
  /* الخطوط */
  --font-ar: 'Cairo', sans-serif;
  --font-en: 'Poppins', sans-serif;
}

body {
  background-color: var(--bg-main);
  color: var(--text-dark);
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overflow-x: hidden;
}
/* ====================================================
   1. تنسيقات الهيدر والشريط العلوي (Header & Bar)
   ==================================================== */
.rp-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* شريط التنبيهات */
.rp-announcement-bar {
    background-color: var(--color-primary);
    color: #ffffff;
    font-size: 13px;
    padding: 8px 0;
    border-bottom: 2px solid var(--color-accent);
}
.bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.bar-content a { color: #ffffff; text-decoration: none; }
.top-meta { display: flex; gap: 10px; align-items: center; }
.lang-switcher a { margin-left: 5px; color: var(--color-secondary); text-decoration: none; font-size: 12px; }
.lang-switcher .active { font-weight: bold; color: var(--color-accent); }

/* الهيدر الرئيسي */
.rp-header {
    background-color: #ffffff;
    box-shadow: 0 2px 15px rgba(0,0,0,0.04);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}
.header-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

/* الشعار */
.rp-logo a {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    line-height: 1;
}
.logo-text-en { font-family: var(--font-en); font-weight: 800; font-size: 22px; color: var(--color-primary); letter-spacing: 2px; }
.logo-text-ar { font-family: var(--font-ar); font-weight: 700; font-size: 14px; color: var(--color-secondary); text-align: center; }

/* القائمة الرئيسية */
.rp-nav ul {
    display: flex;
    gap: 25px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.rp-nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 15px;
    transition: color 0.2s;
}
.rp-nav a:hover, .rp-nav a.active { color: var(--color-primary); }
.rp-nav a.highlight-link { color: #d9534f; }

/* الإجراءات والبحث */
.rp-header-actions { display: flex; align-items: center; gap: 15px; }
.rp-search-box { position: relative; width: 250px; }
.rp-search-box input {
    width: 100%;
    padding: 8px 35px 8px 12px;
    border: 1px solid #e2dcd6;
    border-radius: 25px;
    background: var(--bg-main);
    font-family: var(--font-ar);
    font-size: 13px;
    outline: none;
}
.rp-search-box button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
}
.action-icon {
    font-size: 20px;
    text-decoration: none;
    position: relative;
    color: var(--color-primary);
}
.cart-badge {
    position: absolute;
    top: -5px;
    left: -8px;
    background-color: var(--color-accent);
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ====================================================
   2. تنسيقات الفوتر وشريط الثقة (Footer & Trust Bar)
   ==================================================== */
.rp-trust-bar {
    background-color: #ffffff;
    border-top: 1px solid #efe8e1;
    border-bottom: 1px solid #efe8e1;
    padding: 30px 0;
    margin-top: 60px;
}
.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}
.trust-item { display: flex; align-items: center; gap: 15px; }
.trust-icon { font-size: 32px; }
.trust-item h4 { margin: 0 0 5px 0; font-size: 16px; color: var(--color-primary); }
.trust-item p { margin: 0; font-size: 13px; color: #666; }

/* الفوتر الرئيسي */
.rp-footer {
    background-color: #21161e; /* درجة غامقة جداً من Deep Plum */
    color: #e5e0e3;
    padding: 60px 0 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 50px;
}
.footer-col h4 {
    color: var(--color-accent);
    font-size: 18px;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(212, 175, 122, 0.2);
    padding-bottom: 10px;
    display: inline-block;
}
.brand-bio { font-size: 14px; line-height: 1.8; color: #b8b0b5; margin: 15px 0; }
.social-links { display: flex; gap: 12px; font-size: 20px; }
.links-col ul { list-style: none; padding: 0; margin: 0; }
.links-col li { margin-bottom: 10px; }
.links-col a { color: #cfc8cc; text-decoration: none; font-size: 14px; transition: color 0.2s; }
.links-col a:hover { color: var(--color-accent); }

/* نموذج النشرة البريدية */
.newsletter-col p { font-size: 13px; color: #b8b0b5; line-height: 1.6; }
.rp-newsletter-form { display: flex; margin-top: 15px; }
.rp-newsletter-form input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 0 25px 25px 0;
    font-family: var(--font-ar);
    font-size: 13px;
    outline: none;
}
.rp-newsletter-form button {
    background-color: var(--color-accent);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 25px 0 0 25px;
    font-weight: bold;
    cursor: pointer;
    font-family: var(--font-ar);
    transition: background 0.2s;
}
.rp-newsletter-form button:hover { background-color: #c19b63; }

/* الجزء السفلي للفوتر */
.rp-footer-bottom {
    background-color: #170f15;
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.05);
    font-size: 13px;
    color: #8c8287;
}
.bottom-flex { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; }
.payment-badges span { background: rgba(255,255,255,0.05); padding: 5px 10px; border-radius: 4px; margin-left: 5px; font-size: 12px; }

/* ====================================================
   3. تنسيقات الصفحة الرئيسية (Homepage Front-Page)
   ==================================================== */

/* الأزرار العامة */
.rp-btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 25px;
    font-family: var(--font-en);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}
.rp-btn-primary { background-color: var(--color-primary); color: #fff; }
.rp-btn-primary:hover { background-color: #311329; transform: translateY(-2px); }
.rp-btn-white { background-color: #fff; color: var(--color-primary); }
.rp-btn-white:hover { background-color: var(--bg-main); }

/* البانر الرئيسي (Hero Section) */
.rp-hero-section {
    background: linear-gradient(135deg, #f5ebe6 0%, #eaddd3 100%); /* لون مؤقت لحين وضع صورتك */
    padding: 80px 0;
    min-height: 450px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #dcd0c6;
}
.hero-content { max-width: 600px; text-align: left; direction: ltr; }
.hero-title { font-family: var(--font-en); font-size: 48px; color: var(--color-primary); line-height: 1.1; margin-bottom: 20px; }
.hero-subtitle { font-family: var(--font-ar); font-size: 16px; color: #5a4b54; line-height: 1.8; margin-bottom: 30px; }

/* شبكة الأقسام (Category Grid) */
.rp-categories-section { padding: 40px 0; margin-top: -30px; position: relative; z-index: 10; }
.categories-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 15px; }
.category-card {
    background: #fff; border-radius: 12px; padding: 20px; text-align: center;
    text-decoration: none; border: 1px solid #efe8e1; box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    transition: transform 0.3s, border-color 0.3s;
}
.category-card:hover { transform: translateY(-5px); border-color: var(--color-accent); }
.cat-icon { font-size: 30px; margin-bottom: 10px; }
.category-card h3 { font-family: var(--font-ar); font-size: 15px; color: var(--color-primary); margin: 0 0 5px; }
.cat-en { font-family: var(--font-en); font-size: 11px; color: #888; text-transform: uppercase; letter-spacing: 1px; }
.highlight-cat { border: 1px solid var(--color-secondary); background-color: #fdfafb; }

/* المنتجات المميزة (Featured Products) */
.rp-featured-section { padding: 60px 0; background-color: var(--bg-main); }
.section-heading { text-align: center; margin-bottom: 40px; }
.section-heading h2 { font-family: var(--font-ar); color: var(--color-primary); font-size: 24px; margin: 0; }
.heading-divider { color: var(--color-accent); font-size: 20px; margin-top: 5px; }

.products-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 25px; }
.rp-product-card {
    background: #fff; border-radius: 12px; padding: 20px; border: 1px solid #efe8e1;
    position: relative; transition: box-shadow 0.3s;
}
.rp-product-card:hover { box-shadow: 0 10px 25px rgba(0,0,0,0.05); }
.wishlist-btn { position: absolute; top: 15px; right: 15px; background: none; border: none; font-size: 20px; color: #ccc; cursor: pointer; }
.wishlist-btn:hover { color: var(--color-secondary); }
.product-image-placeholder { height: 200px; background: #fdfaf7; border-radius: 8px; display: flex; align-items: center; justify-content: center; margin-bottom: 15px; }
.product-title { font-family: var(--font-en); font-size: 14px; font-weight: 600; color: var(--color-primary); margin: 0 0 15px; line-height: 1.4; }
.product-title-ar { font-family: var(--font-ar); font-size: 13px; color: #666; font-weight: normal; }
.product-bottom { display: flex; justify-content: space-between; align-items: center; }
.product-price { font-family: var(--font-en); font-weight: bold; font-size: 16px; color: var(--color-primary); }
.add-to-cart-icon {
    background: var(--color-primary); color: #fff; border: none; width: 35px; height: 35px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.3s;
}
.add-to-cart-icon:hover { background: var(--color-secondary); }

/* لافتات العروض (Promo Banners) */
.rp-promo-section { padding: 40px 0 80px; }
.promo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }
.promo-banner { border-radius: 16px; padding: 40px; display: flex; align-items: center; min-height: 200px; }
.bundle-banner { background: var(--color-primary); color: #fff; }
.discount-banner { background: #f0e6e1; color: var(--color-primary); }
.promo-content h3 { font-family: var(--font-en); font-size: 22px; margin: 0 0 10px; }
.promo-content p { font-family: var(--font-ar); font-size: 14px; margin: 0 0 20px; line-height: 1.6; }
.coupon-code { font-family: var(--font-en); font-size: 14px; color: #555; }
/* ====================================================
   4. السلة الجانبية (Off-Canvas Cart)
   ==================================================== */
.rp-cart-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(43, 38, 35, 0.6); z-index: 1001;
    opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.rp-cart-overlay.active { opacity: 1; visibility: visible; }

.rp-side-cart {
    position: fixed; top: 0; right: -400px; /* مخفية خارج الشاشة */
    width: 350px; max-width: 100%; height: 100%;
    background: var(--bg-main); z-index: 1002;
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex; flex-direction: column;
}
.rp-side-cart.active { right: 0; } /* تظهر عند إضافة كلاس active */

.cart-header {
    padding: 20px; border-bottom: 1px solid #e3d7cc;
    display: flex; justify-content: space-between; align-items: center;
    background: #ffffff;
}
.cart-header h3 { margin: 0; font-family: var(--font-ar); color: var(--color-primary); font-size: 18px; }
.close-cart { background: none; border: none; font-size: 30px; cursor: pointer; color: var(--text-dark); line-height: 1; }
.close-cart:hover { color: #d9534f; }

.cart-body { padding: 20px; flex-grow: 1; overflow-y: auto; background: var(--bg-main); }

/* تنسيقات ووكومرس المصغرة داخل السلة */
.woocommerce-mini-cart__buttons { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.woocommerce-mini-cart__buttons .button { text-align: center; border-radius: 25px; padding: 12px; text-decoration: none; font-weight: bold; font-family: var(--font-en); }
.woocommerce-mini-cart__buttons .checkout { background-color: var(--color-primary); color: #fff; }
.woocommerce-mini-cart__buttons .wc-forward:not(.checkout) { background-color: #fff; color: var(--color-primary); border: 1px solid var(--color-primary); }

/* ====================================================
   5. صفحة المنتج (Noon & Amazon Premium Style)
   ==================================================== */
.rp-premium-product-page {
    background-color: #ffffff;
    padding: 40px 0 80px 0;
}
.rp-noon-layout {
    display: flex;
    align-items: flex-start;
    gap: 60px;
}

/* --- قسم الصور (اليمين) --- */
.rp-gallery-section {
    width: 45%;
    position: sticky;
    top: 100px; /* بيخلي الصور ثابتة وإنت بتنزل تقرأ التفاصيل */
}
.rp-main-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid #efe8e1;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}
.rp-thumbnails {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    overflow-x: auto;
    padding-bottom: 5px;
}
.rp-thumb {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    object-fit: cover;
    opacity: 0.7;
    transition: all 0.2s ease;
}
.rp-thumb:hover {
    opacity: 1;
}
.rp-thumb.active-thumb {
    border-color: var(--color-primary);
    opacity: 1;
}

/* --- قسم التفاصيل (اليسار) --- */
.rp-details-section {
    width: 55%;
}
.rp-meta-top { margin-bottom: 15px; font-size: 13px; color: #666; }
.rp-stars { color: var(--color-accent); letter-spacing: 2px; margin-left: 5px; }

.rp-title {
    font-family: var(--font-en);
    font-size: 34px;
    font-weight: 800;
    color: var(--color-primary);
    margin: 0 0 15px 0;
    line-height: 1.3;
}
.rp-price-wrapper {
    font-family: var(--font-en);
    font-size: 28px;
    font-weight: bold;
    color: var(--color-primary);
    border-bottom: 1px solid #efe8e1;
    padding-bottom: 20px;
    margin-bottom: 20px;
}
.rp-short-desc {
    font-size: 16px;
    color: #444;
    line-height: 1.8;
    margin-bottom: 30px;
}

/* --- باقات التوفير --- */
.rp-upsell-box {
    background: #fdfaf7;
    border: 1px solid #e3d7cc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}
.rp-upsell-box h4 { margin: 0 0 15px 0; color: var(--color-primary); }
.rp-radio-card {
    display: flex; align-items: center; padding: 15px;
    background: #fff; border: 1px solid #e3d7cc; border-radius: 8px;
    margin-bottom: 10px; cursor: pointer; transition: all 0.2s;
}
.rp-radio-card:hover { border-color: var(--color-secondary); }
.rp-radio-card input { margin-left: 15px; transform: scale(1.3); accent-color: var(--color-primary); }
.rp-card-content { display: flex; justify-content: space-between; width: 100%; }
.bundle-title { font-weight: bold; color: var(--text-dark); font-size: 14px; }
.bundle-price { font-family: var(--font-en); font-weight: bold; color: var(--color-primary); }
.rp-radio-card.highlighted { border: 2px solid var(--color-accent); }

/* --- أزرار الشراء (الخضوع التام) --- */
.rp-action-buttons form.cart { display: flex; gap: 15px; }
.rp-action-buttons .quantity input {
    width: 70px; height: 55px; border: 1px solid #e3d7cc; border-radius: 8px;
    text-align: center; font-family: var(--font-en); font-weight: bold; font-size: 16px; background: #fff;
}
.rp-action-buttons button.single_add_to_cart_button {
    flex: 1; height: 55px; background: var(--color-primary); color: #fff; border: none;
    border-radius: 8px; font-family: var(--font-ar); font-size: 18px; font-weight: bold;
    cursor: pointer; transition: all 0.3s; box-shadow: 0 4px 15px rgba(75, 29, 63, 0.2);
}
.rp-action-buttons button.single_add_to_cart_button:hover { background: #311329; transform: translateY(-2px); }

/* --- شريط الثقة --- */
.rp-trust-features {
    display: flex; gap: 20px; margin-top: 30px; padding-top: 20px; border-top: 1px dashed #e3d7cc;
}
.rp-trust-features .feature { display: flex; align-items: center; font-size: 13px; color: #555; font-weight: bold; }
.rp-trust-features .icon { font-size: 20px; margin-left: 8px; }

/* إخفاء عناصر ووكومرس الخفية */
.product_meta, .woocommerce-product-rating { display: none !important; }

/* الموبايل */
@media (max-width: 991px) {
    .rp-noon-layout { flex-direction: column; gap: 30px; }
    .rp-gallery-section, .rp-details-section { width: 100%; position: static; }
    .rp-action-buttons form.cart { flex-direction: column; }
    .rp-action-buttons .quantity { justify-content: center; margin-bottom: 10px; }
    .rp-trust-features { flex-direction: column; gap: 10px; }
}
/* ====================================================
   Express COD Checkout Form (بدون سلة)
   ==================================================== */
.rp-express-checkout { margin-top: 20px; }
.express-btn {
    width: 100%; height: 60px; background: #000; color: #fff; border: none;
    border-radius: 8px; font-family: var(--font-ar); font-size: 20px; font-weight: bold;
    cursor: pointer; transition: 0.3s; box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
.express-btn:hover { background: #28a745; transform: translateY(-2px); }

.express-form-wrapper {
    margin-top: 20px; background: #fcfcfc; border: 2px solid #eee;
    border-radius: 12px; padding: 25px; box-shadow: inset 0 2px 10px rgba(0,0,0,0.02);
}
.express-title { margin: 0 0 20px; font-family: var(--font-ar); font-size: 18px; color: #333; text-align: center; border-bottom: 1px dashed #ddd; padding-bottom: 10px; }

.rp-cod-form .form-group { margin-bottom: 15px; }
.rp-cod-form input, .rp-cod-form select, .rp-cod-form textarea {
    width: 100%; padding: 14px; border: 1px solid #ddd; border-radius: 8px;
    font-family: var(--font-ar); font-size: 14px; background: #fff; outline: none; transition: 0.3s;
}
.rp-cod-form input:focus, .rp-cod-form select:focus, .rp-cod-form textarea:focus { border-color: var(--color-primary); }

.order-summary-mini {
    background: #f4f9f5; border: 1px dashed #28a745; border-radius: 8px;
    padding: 15px; margin: 20px 0; text-align: center; font-size: 16px; color: #333;
}
.order-summary-mini .total-price { color: #28a745; font-size: 22px; font-family: var(--font-en); display: block; margin-top: 5px; }

.confirm-order-btn {
    width: 100%; height: 55px; background: #28a745; color: #fff; border: none;
    border-radius: 8px; font-family: var(--font-ar); font-size: 18px; font-weight: bold;
    cursor: pointer; transition: 0.3s;
}
.confirm-order-btn:hover { background: #218838; }
.privacy-note { text-align: center; font-size: 12px; color: #888; margin-top: 15px; }