/*
Theme Name: قالب قسيمتك 
Description: قالب مخصص للعروض والخصومات
Author: Maha
Version: 1.0
Text Domain: maha-theme
*/

/* 1. تعيين الخط الجديد للموقع بالكامل */
body, h1, h2, h3, h4, h5, h6, p, a, span, button, input {
    font-family: 'Tajawal', sans-serif !important;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    background-color: #fcfcfc;
    margin: 0;
    padding: 0;
    direction: rtl;
}

h1, h2, h3 {
    font-weight: 700;
    color: #333;
}

/* 2. ستايل الهيدر الوردي */
header {
    background-color: #D81B60;
    padding: 30px 0 40px; /* زدنا المسافة السفلية شوي عشان الستارة */
    text-align: center;
    box-shadow: 0 4px 15px rgba(216, 27, 96, 0.2);
    position: relative; /* مهم جداً عشان حركة الستارة تضبط */
    margin-bottom: 25px; /* مسافة تحت الهيدر */
}

/* --- شكل الستارة (الموجة الناعمة) أسفل الهيدر --- */
header::after {
    content: "";
    position: absolute;
    bottom: -20px; /* نزلناها شوي عشان تغطي المساحة بشكل أفضل */
    left: 0;
    width: 100%;
    height: 25px; /* كبرنا ارتفاع الموجة (كان 15 صار 25) */
    
    /* كود الستارة بتصميم موجات أكبر وأوضح */
    background-image: radial-gradient(circle at 50% 0%, #D81B60 70%, transparent 71%);
    background-size: 50px 25px; /* كبرنا عرض الموجة إلى 50 بكسل عشان تكون بارزة مثل رسمتك */
    background-repeat: repeat-x;
}

/* --- مساحة الشعار (اللوجو) أعلى الاسم --- */
header img.custom-logo, 
header .site-logo {
    max-width: 100px; /* حجم الشعار صغير وأنيق */
    height: auto;
    display: block;
    margin: 0 auto 15px; /* توسيط الشعار ومسافة تحته */
    border-radius: 10px; /* زوايا ناعمة لو كان مربع */
}

header h1 {
    margin: 0;
    padding: 0;
}

/* --- حركة اللمعة الخاطفة السريعة --- */
@keyframes fastShine {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

header h1 a {
    text-decoration: none !important;
    font-size: 26px;
    font-weight: 800;
    
    /* اللون الأبيض الأساسي كأساس */
    color: #ffffff !important;
    
    /* التدرج اللوني اللي يصنع اللمعة */
    background: linear-gradient(120deg, #ffffff 40%, #ffb3d9 50%, #ffffff 60%);
    background-size: 200% auto;
    
    /* تطبيق الحركة على النص */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    
    /* سرعة الحركة */
    animation: fastShine 3s linear infinite;
    display: inline-block;
}

/* --- سطر الوصف أبيض ناصع ومصغر --- */
header p {
    color: #ffffff !important; 
    font-size: 13px; 
    margin-top: 5px; 
    margin-bottom: 0;
    font-weight: 500;
}

a {
    transition: all 0.3s ease;
}
/* --- تنسيق القائمة العلوية (الأزرار) --- */
.maha-main-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 10px; /* تم تقليل المسافة بين الأزرار لتكون أرتب */
}

.maha-main-menu li a {
    color: #fff;
    text-decoration: none;
    font-size: 13px; /* تم تصغير حجم الخط (كان 15px) */
    font-weight: 700;
    padding: 6px 16px; /* تم تصغير حجم الزر نفسه من الداخل (كان 8px 20px) */
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.15); /* خلفية بيضاء شفافة للزر */
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.maha-main-menu li a:hover {
    background-color: #fff;
    color: #D81B60; /* يتحول النص للفوشي إذا حط الماوس عليه */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
/* --- الستارة السحرية (تظهر عند النزول للأسفل) --- */
#magic-curtain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 25px; /* نفس ارتفاع ستارة الهيدر */
    background-image: radial-gradient(circle at 50% 0%, #D81B60 70%, transparent 71%);
    background-size: 50px 25px;
    background-repeat: repeat-x;
    z-index: 9999; /* عشان تكون فوق كل شيء في الصفحة */
    transform: translateY(-100%); /* مخفية في البداية */
    transition: transform 0.4s ease-in-out; /* حركة النزول الناعمة */
}

/* هذا الكلاس يضيفه الجافاسكريبت لما ننزل تحت */
.show-curtain #magic-curtain {
    transform: translateY(0); /* إظهار الستارة */
}
/* =========================================
   أكواد الاستجابة للجوال (Mobile Responsiveness)
   ========================================= */

@media screen and (max-width: 768px) {
    
    /* 1. تصغير الهيدر والستارة العلوية */
    header {
        padding: 20px 0 30px; 
    }
    
    header img.custom-logo, 
    header .site-logo {
        max-width: 80px; 
        margin-bottom: 10px;
    }
    
    header h1 a {
        font-size: 22px; 
    }
    
    header p {
        font-size: 13px; 
        padding: 0 10px;
    }

    /* تصغير الستارة الأساسية والسحرية للجوال عشان ما تزعج القارئ */
    header::after,
    #magic-curtain {
        height: 15px;
        background-size: 30px 15px;
    }
    
    /* 2. ترتيب القائمة العلوية (الأزرار) */
    .maha-main-menu {
        gap: 8px;
        flex-wrap: wrap; /* يخلي الأزرار تنزل سطر جديد بترتيب لو الشاشة صغيرة جداً */
        padding: 0 10px;
    }
    
    .maha-main-menu li a {
        font-size: 13px;
        padding: 6px 12px;
    }

    /* 3. تصغير العناوين والمسافات في الصفحات */
    h1 { font-size: 22px !important; }
    h2 { font-size: 18px !important; }
    
    main {
        margin: 30px auto !important;
    }

    /* 4. تعديلات صفحة الكوبون (الزر والكود) */
    .dancing-coupon {
        flex-direction: column; /* زر النسخ ينزل تحت الكود */
        border-radius: 12px;
    }
    
    #couponCodeText {
        font-size: 20px !important;
        padding: 15px !important;
    }
    
    .shake-button {
        width: 100%; /* الزر ياخذ العرض كامل عشان يسهل الضغط عليه بالإبهام */
        justify-content: center;
        padding: 15px 0 !important;
        font-size: 16px !important;
    }
    
    /* تصغير جدول تفاصيل الكوبون */
    table th, table td {
        padding: 8px !important;
        font-size: 12px !important;
    }
}