﻿/* ========== Green Haven - Main Style ========== */
:root {
    --gh-green: #5c8d26;      /* الأخضر الأساسي */
    --gh-green-dark: #4a731e; /* أخضر أغمق للهوفر */
    --gh-brown: #5c3a21;      /* لون الفوتر */
    --gh-bg: #f8f9fa;         /* لون الخلفية الفاتح */
    --sidebar-width: 260px;
}

/* 1. إعدادات عامة (لكل الصفحات) */
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--gh-bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

h1, h2, h3, h4, h5, h6 { font-family: 'Fraunces', serif; }

/* 2. الفوتر (للمتجر) */
footer {
    background-color: var(--gh-brown);
    color: #e5c69b;
    padding: 20px 0;
    text-align: center;
    margin-top: auto;
}

/* 3. أزرار الصفحة الرئيسية (index.php) */
.custom-btn-primary {
    background-color: var(--gh-green);
    color: white;
    border: 2px solid var(--gh-green);
    transition: all 0.3s ease;
}
.custom-btn-primary:hover {
    background-color: var(--gh-green-dark);
    border-color: var(--gh-green-dark);
    color: white;
    transform: translateY(-2px);
}

.custom-btn-secondary {
    background-color: transparent;
    color: var(--gh-green);
    border: 2px solid var(--gh-green);
    transition: all 0.3s ease;
}
.custom-btn-secondary:hover {
    background-color: var(--gh-green);
    color: white;
    transform: translateY(-2px);
}

/* 4. تنسيقات لوحة التحكم (Admin Panel) */
.admin-shell {
    display: flex;
    min-height: 100vh;
}

/* السايدبار */
.sidebar {
    width: var(--sidebar-width);
    background-color: #2c3e50;
    color: white;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}
.sidebar-inner {
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.sidebar-brand {
    font-size: 1.25rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}
.sidebar-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #95a5a6;
    margin: 15px 0 10px;
    font-weight: bold;
}
.sidebar .nav-link {
    color: #ecf0f1;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar .nav-link:hover, 
.sidebar .nav-link.active {
    background-color: var(--gh-green);
    color: white;
}
.sidebar-user {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #34495e;
}
.avatar {
    width: 35px;
    height: 35px;
    background-color: var(--gh-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
}
.btn-logout {
    background-color: transparent;
    border: 1px solid #e74c3c;
    color: #e74c3c;
}
.btn-logout:hover {
    background-color: #e74c3c;
    color: white;
}

/* محتوى الأدمن */
.admin-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.admin-topbar {
    background-color: white;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #dee2e6;
}
.admin-content {
    padding: 30px;
    flex-grow: 1;
}
.admin-footer {
    background: white;
    padding: 15px 30px;
    text-align: start;
    border-top: 1px solid #dee2e6;
    color: #6c757d;
    font-size: 0.9rem;
}

/* 5. الكروت والجداول (للمتجر والأدمن) */
.gh-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    padding: 20px;
    border: 1px solid #e9ecef;
}
.thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}
.table-modern th {
    background-color: #f8f9fa;
    color: #6c757d;
    font-size: 0.85rem;
    text-transform: uppercase;
    border-bottom: 2px solid #dee2e6;
}
.price-pill {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 4px 10px;
    border-radius: 50px;
    font-weight: bold;
}
.form-control:focus, 
.form-select:focus, 
.btn:focus {
    border-color: var(--gh-green, #5c8d26) !important;
    box-shadow: 0 0 0 0.25rem rgba(92, 141, 38, 0.25) !important; /* لون أخضر شفاف */
    outline: none;
}

/* تنسيق الفئة النشطة في القائمة الجانبية */
.category-link {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #6c757d; 
}

.category-link:hover {
    background-color: #f8f9fa;
    color: var(--gh-green, #5c8d26);
}

.category-link.active {
    background-color: var(--gh-green, #5c8d26);
    color: white !important;
    font-weight: bold;
}
/* =========================================
   تغيير لون الفوكس (Focus) لكل الحقول من الأزرق للأخضر
   ========================================= */
.form-control:focus,
.form-select:focus,
.form-check-input:focus,
textarea:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="file"]:focus {
    border-color: #5c8d26 !important; /* لون الإطار أخضر */
    box-shadow: 0 0 0 0.25rem rgba(92, 141, 38, 0.25) !important; /* لون الظل أخضر شفاف */
    outline: none !important;
}

/* تغيير لون الأزرار (البوتونات) لما تضغط عليها */
.btn:focus, .btn:active {
    box-shadow: 0 0 0 0.25rem rgba(92, 141, 38, 0.25) !important;
    outline: none !important;
}

/* تغيير لون الروابط لما تضغط عليها (عشان ما تطلع أزرق) */
a:focus {
    outline: none !important;
    color: #4a731e !important;
}
/* تنسيق الرابط النشط في الهيدر */
.navbar-nav .nav-link.active {
    color: #ffd700 !important; /* لون ذهبي/أصفر فاتح عشان يبرز على الأخضر */
    font-weight: bold;
    border-bottom: 2px solid #ffd700; /* خط تحت الكلمة */
}

/* تنسيق الروابط العادية لما تمرر الماوس فوقها */
.navbar-nav .nav-link:hover {
    color: #ffffff !important;
}