/* ملف CSS للتصميم - هوية أورجانكس الحديثة */

/* استيراد خطوط جوجل */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&display=swap');

/* متغيرات الألوان المستوحاة من هوية أورجانكس */
:root {
    --primary-blue: #4A90E2;
    --secondary-blue: #357ABD;
    --accent-green: #7ED321;
    --dark-green: #5BA617;
    --light-blue: #E8F4FD;
    --gradient-primary: linear-gradient(135deg, #4A90E2 0%, #357ABD 50%, #7ED321 100%);
    --gradient-secondary: linear-gradient(45deg, #E8F4FD 0%, #F0F8FF 100%);
    --text-dark: #2C3E50;
    --text-light: #7F8C8D;
    --white: #FFFFFF;
    --shadow-light: 0 4px 20px rgba(74, 144, 226, 0.1);
    --shadow-medium: 0 8px 30px rgba(74, 144, 226, 0.15);
    --shadow-heavy: 0 15px 50px rgba(74, 144, 226, 0.2);
    --border-radius: 16px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* إعدادات عامة */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--gradient-secondary);
    direction: rtl;
    text-align: right;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* تأثيرات الحركة العامة */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* الهيدر الحديث */
.header {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 2rem 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
}

.header-content {
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease-out;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.logo {
    height: 50px; /* حجم شعار Organix */
    width: auto;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
    animation: pulse 3s ease-in-out infinite;
}

.header h1 {
    font-size: 3.5rem; /* Increased size */
    font-weight: 900;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.slogan {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.quality-badge {
    height: 50px; /* تكبير شعار Quality Inside ليتساوى مع شعار Organix */
    width: auto;
    filter: brightness(1.2);
}

.slogan {
    font-size: 3.5rem; /* Increased size to match h1 */
    font-weight: 900;
    opacity: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem; /* Add some space */
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.slogan span {
    font-size: 3.5rem; /* Ensure font size matches h1 */
    font-weight: 900;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.slogan .quality-badge {
    height: 50px; /* Ensure image size matches logo */
    width: auto;
    filter: brightness(1.2);
}

.header h1 {
    font-size: 3.5rem; /* Increased size */
    font-weight: 900;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0; /* Remove bottom margin to bring slogan closer */
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* شريط التنقل المحدث */
.nav {
    background: var(--white);
    padding: 1rem;
    box-shadow: var(--shadow-light);
    margin-bottom: 2rem;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.nav a {
    color: var(--text-dark);
    text-decoration: none;
    margin: 0 1rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: var(--transition);
    z-index: -1;
}

.nav a:hover::before {
    left: 0;
}

.nav a:hover {
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.social-links {
    display: flex;
    gap: 0.5rem;
}



.social-link {
    background: transparent;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.2rem;
}

.social-link:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: var(--shadow-medium);
    color: var(--white);
}

/* الحاوي الرئيسي */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* قسم البحث المحدث */
.search-section {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.search-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.welcome-text {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

.welcome-text h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-box {
    width: 100%;
    padding: 1.25rem 1.5rem;
    border: 3px solid var(--light-blue);
    border-radius: 50px;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    outline: none;
    transition: var(--transition);
    background: var(--white);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.search-box:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.1);
    transform: translateY(-2px);
}

.search-box::placeholder {
    color: var(--text-light);
    font-style: italic;
}

/* الفلاتر المحدثة */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: space-between;
}

.filter-section {
    flex: 1;
    min-width: 250px;
}

.filter-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 1rem;
    cursor: pointer; /* للإشارة إلى أنه قابل للطي */
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    padding: 0 0.5rem;
}

.collapsible-content.active {
    max-height: 500px; /* قيمة كبيرة بما يكفي لاستيعاب المحتوى */
    padding: 0.5rem;
}

.collapsible-header i {
    transition: transform 0.3s ease-out;
}

.collapsible-header.active i {
    transform: rotate(90deg); /* يمكن استخدام أيقونة أخرى أو تدوير الأيقونة الحالية */
}

.filter-section h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.filter-tag {
    background: var(--light-blue);
    border: 2px solid transparent;
    padding: 0.75rem 1.25rem;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-blue);
    position: relative;
    overflow: hidden;
}

.filter-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: var(--transition);
    z-index: -1;
}

.filter-tag:hover::before,
.filter-tag.active::before {
    left: 0;
}

.filter-tag:hover,
.filter-tag.active {
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

/* شبكة المنتجات المحدثة */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* استعلامات الوسائط (Media Queries) للتصميم المتجاوب */

/* الأجهزة اللوحية (Tablets) - 768px وأقل */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2.5rem;
    }

    .slogan span {
        font-size: 2.5rem;
    }

    .logo-container {
        flex-direction: column;
        gap: 0.5rem;
    }

    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav a {
        margin: 0 0.5rem;
        padding: 0.5rem 1rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }

    .product-card {
        padding: 1rem;
    }

    .product-image {
        height: 180px;
    }

    .search-section {
        padding: 1.5rem;
    }

    .filters {
        flex-direction: column;
        gap: 1.5rem;
    }

    .filter-section {
        min-width: 100%;
    }
}

/* الهواتف المحمولة (Mobile Phones) - 480px وأقل */
@media (max-width: 480px) {
    .header h1 {
        font-size: 2rem;
    }

    .slogan span {
        font-size: 2rem;
    }

    .logo {
        height: 40px;
    }

    .quality-badge {
        height: 40px;
    }

    .nav a {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }

    .social-links {
        justify-content: center;
        flex-wrap: wrap;
    }

    .products-grid {
        grid-template-columns: 1fr; /* عمود واحد */
        gap: 1rem;
    }

    .product-image {
        height: 200px;
    }

    .product-name {
        font-size: 1.2rem;
    }

    .product-detail-item {
        font-size: 0.9rem;
    }

    .product-tag {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }
}

.product-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition);
}

.product-card:hover::before {
    transform: scaleX(1);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-heavy);
}

.product-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: calc(var(--border-radius) - 4px);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.product-details {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.product-tag {
    background: var(--light-blue);
    color: var(--primary-blue);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
    display: inline-block;
}

.ingredient-tag {
    background: var(--accent-green);
    color: var(--white);
}

.product-tag:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateY(-2px);
}

.ingredient-tag:hover {
    background: var(--dark-green);
    color: var(--white);
    transform: translateY(-2px);
}

/* Product Details Modal - Fixed and Responsive */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow-y: auto; /* Enable vertical scroll if needed */
    background-color: rgba(0,0,0,0.8); /* Darker background w/ opacity */
    padding: 20px 0; /* Add padding for mobile view */
    transition: opacity 0.3s ease;
}

.modal-content {
    background-color: var(--white);
    margin: 5vh auto; /* 5% from the top and centered */
    padding: 30px;
    max-width: 900px; /* Max width for large screens */
    width: 90%; /* Responsive width */
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-heavy);
    position: relative;
    animation: fadeInUp 0.5s ease-out;
}

.close {
    color: var(--text-dark);
    font-size: 36px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    z-index: 10;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.close:hover,
.close:focus {
    color: var(--primary-blue);
    text-decoration: none;
    cursor: pointer;
    opacity: 1;
}

.product-modal-header {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.product-modal-image {
    flex: 1;
    min-width: 250px; /* Ensure minimum size for image container */
    max-width: 40%;
    text-align: center;
    padding: 1rem;
    background: var(--light-blue);
    border-radius: var(--border-radius);
}

.product-modal-image img {
    width: 100%;
    height: auto;
    max-height: 350px; /* Limit image height */
    object-fit: contain; /* Ensure the whole image is visible without cropping */
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.product-modal-info {
    flex: 2;
    min-width: 300px;
}

.product-modal-info h2 {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary-blue);
    padding-bottom: 0.5rem;
}

.product-modal-details p {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    line-height: 1.4;
}

.product-modal-details strong {
    color: var(--primary-blue);
}

.product-modal-tags {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.product-modal-tags h3 {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    line-height: 1.5;
}

.tags-list .product-tag {
    background: var(--accent-green);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block; /* Ensure it respects line-height */
}

/* Mobile adjustments for Modal */
@media (max-width: 768px) {
    .modal-content {
        margin: 20px auto;
        width: 95%;
        padding: 20px;
    }

    .product-modal-header {
        flex-direction: column;
        gap: 1.5rem;
    }

    .product-modal-image {
        max-width: 100%;
        min-width: 100%;
    }

    .product-modal-image img {
        max-height: 300px;
    }

    .product-modal-info {
        min-width: 100%;
    }

    .product-modal-info h2 {
        font-size: 1.5rem;
    }

    .product-modal-details p {
        font-size: 1rem;
    }

    .tags-list {
        gap: 0.75rem;
    }

    .tags-list .product-tag {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Extra small devices (phones) - 480px and below */
@media (max-width: 480px) {
    .modal-content {
        margin: 10px auto;
        width: 98%;
        padding: 15px;
    }

    .product-modal-image {
        min-width: 100%;
        max-width: 100%;
    }

    .product-modal-image img {
        max-height: 250px;
    }

    .product-modal-info h2 {
        font-size: 1.3rem;
    }

    .product-modal-tags h3 {
        font-size: 1rem;
    }

    .tags-list .product-tag {
        font-size: 0.8rem;
        padding: 0.35rem 0.7rem;
    }
}

/* أنماط الإدارة المحدثة */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    animation: fadeInUp 0.8s ease-out;
}

.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: var(--white);
    padding: 0.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.admin-tab {
    padding: 1rem 2rem;
    background: none;
    border: none;
    border-radius: calc(var(--border-radius) - 4px);
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: var(--transition);
    color: var(--text-light);
    position: relative;
    overflow: hidden;
}

.admin-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: var(--transition);
    z-index: -1;
}

.admin-tab.active::before,
.admin-tab:hover::before {
    left: 0;
}

.admin-tab.active,
.admin-tab:hover {
    color: var(--white);
}

.admin-section {
    display: none;
    animation: fadeInUp 0.5s ease-out;
}

.admin-section.active {
    display: block;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    margin-bottom: 2rem;
}

.admin-table th,
.admin-table td {
    padding: 1.25rem;
    text-align: right;
    border-bottom: 1px solid var(--light-blue);
}

.admin-table th {
    background: var(--gradient-primary);
    color: var(--white);
    font-weight: 700;
    font-size: 1rem;
}

.admin-table tr:hover {
    background: var(--light-blue);
    transition: var(--transition);
}

/* الأزرار المحدثة */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
    margin: 0 0.25rem;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-block;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: var(--transition);
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow-light);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-success {
    background: linear-gradient(135deg, var(--accent-green), var(--dark-green));
    color: var(--white);
    box-shadow: var(--shadow-light);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-danger {
    background: linear-gradient(135deg, #FF6B6B, #EE5A52);
    color: var(--white);
    box-shadow: var(--shadow-light);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* نماذج الإدخال المحدثة */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: var(--text-dark);
    font-size: 1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--light-blue);
    border-radius: var(--border-radius);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
    background: var(--white);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.1);
    transform: translateY(-2px);
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--light-blue);
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
}

.checkbox-item:hover {
    background: var(--primary-blue);
    color: var(--white);
}

.checkbox-item input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* تحسينات الاستجابة */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .logo {
        height: 50px;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .filters {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-section {
        min-width: auto;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 1.5rem;
    }
    
    .admin-tabs {
        flex-wrap: wrap;
    }
    
    .admin-table {
        font-size: 0.9rem;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 0.75rem;
    }
}

/* تأثيرات إضافية للمستقبل */
.futuristic-glow {
    position: relative;
}

.futuristic-glow::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-primary);
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: var(--transition);
}

.futuristic-glow:hover::after {
    opacity: 0.7;
    animation: pulse 2s ease-in-out infinite;
}

/* تحسينات الأداء */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

/* أنماط Grid لصفحة الإدارة */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.admin-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
}

.admin-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-heavy);
}

.admin-card h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.admin-card .btn-group {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.admin-card .btn {
    flex-grow: 1;
}

.admin-card .product-image-thumb {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.admin-card .details-text {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.admin-card .tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.admin-card .tag-item {
    background: var(--light-blue);
    color: var(--primary-blue);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}




/* تنسيق خاص لزر إدارة المحتوى */
.admin-link {
    background: var(--primary-blue) !important;
    color: var(--white) !important;
    border-radius: var(--border-radius) !important;
    padding: 0.75rem 1.5rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    transition: background-color 0.3s ease !important;
}

.admin-link:hover {
    background: var(--secondary-blue) !important;
    color: var(--white) !important;
    transform: none !important; /* إزالة التأثيرات الحركية */
    box-shadow: none !important; /* إزالة الظلال */
}

.admin-link::before {
    display: none !important; /* إزالة التأثير الحركي */
}

/* تنسيق صفحة الإدارة - Grid Layout */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.admin-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    background: var(--white);
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.admin-tab {
    flex: 1;
    padding: 1rem 2rem;
    border: none;
    background: transparent;
    color: var(--text-dark);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.admin-tab.active {
    background: var(--primary-blue);
    color: var(--white);
}

.admin-tab:hover:not(.active) {
    background: var(--light-blue);
}

.admin-sections-container {
    position: relative;
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.admin-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.admin-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.product-card-admin {
    text-align: center;
}

.product-image-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 1rem;
    border: 3px solid var(--primary-blue);
}

.admin-card h4 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.details-text {
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    justify-content: center;
}

.product-tag {
    background: var(--light-blue);
    color: var(--primary-blue);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.btn-group {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-blue);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--secondary-blue);
}

.btn-success {
    background: var(--accent-green);
    color: var(--white);
}

.btn-success:hover {
    background: var(--dark-green);
}

.btn-warning {
    background: #f39c12;
    color: var(--white);
}

.btn-warning:hover {
    background: #e67e22;
}

.btn-danger {
    background: #e74c3c;
    color: var(--white);
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-info {
    background: #3498db;
    color: var(--white);
}

.btn-info:hover {
    background: #2980b9;
}

.category-card-admin,
.ingredient-card-admin {
    text-align: center;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}


/* تنسيق خاص لزر الرئيسية ليكون مشابهاً لزر إدارة المحتوى */
.home-link {
    background: var(--accent-green) !important;
    color: var(--white) !important;
    border-radius: var(--border-radius) !important;
    padding: 0.75rem 1.5rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    transition: background-color 0.3s ease !important;
}

.home-link:hover {
    background: var(--dark-green) !important;
    color: var(--white) !important;
    transform: none !important; /* إزالة التأثيرات الحركية */
    box-shadow: none !important; /* إزالة الظلال */
}

.home-link::before {
    display: none !important; /* إزالة التأثير الحركي */
}



.social-link {
    background: transparent;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.2rem;
}



/* إضافة أيقونة X (تويتر سابقًا) */
.fa-x-twitter::before {
    content: "𝕏";
    font-family: "Font Awesome 6 Brands", sans-serif;
    font-weight: 900;
}

/* تأكيد عرض أيقونة X */
.social-link .fa-x-twitter {
    display: inline-block;
    font-size: 1.2rem;
}

