﻿/* ====================================
   حاسبة السعرات
==================================== */
.calculator-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    display: block;
}

.result-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 25px;
    border-right: 5px solid #28a745;
}

.result-title {
    color: #28a745;
    margin-bottom: 20px;
    font-weight: 700;
}

.result-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #dee2e6;
}

.result-label {
    font-weight: 600;
    color: #495057;
}

.result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #28a745;
    margin: 0 10px;
}

.result-unit {
    color: #6c757d;
    font-size: 0.9rem;
}

.total-calories {
    color: #dc3545;
    font-size: 2rem;
}

.recommendation-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 2px solid #e9ecef;
    transition: all 0.3s;
}

    .recommendation-card:hover {
        transform: translateY(-5px);
        border-color: #28a745;
    }

    .recommendation-card h5 {
        color: #495057;
        margin-bottom: 15px;
        font-weight: 600;
    }

.calories-amount {
    font-size: 2rem;
    font-weight: 700;
    color: #28a745;
    margin: 10px 0;
}

/* ====================================
   بطاقات الاشتراكات
==================================== */
.subscription-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s;
    height: 100%;
    border: 2px solid transparent;
    margin-bottom: 30px;
}

    .subscription-card:hover {
        transform: translateY(-10px);
        border-color: #28a745;
        box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    }

    .subscription-card .card-header {
        background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
        color: white;
        padding: 30px 20px;
        text-align: center;
    }

        .subscription-card .card-header h3 {
            font-size: 1.5rem;
            font-weight: 700;
            margin-bottom: 10px;
        }

    .subscription-card .price {
        font-size: 2.5rem;
        font-weight: 800;
        margin: 15px 0;
    }

    .subscription-card .card-body {
        padding: 25px;
    }

    .subscription-card .features {
        list-style: none;
        padding: 0;
        margin: 0;
    }

        .subscription-card .features li {
            padding: 8px 0;
            border-bottom: 1px solid #f1f1f1;
            color: #495057;
        }

            .subscription-card .features li:last-child {
                border-bottom: none;
            }

    .subscription-card .card-footer {
        padding: 20px;
        background: #f8f9fa;
        text-align: center;
    }

/* ====================================
   بطاقات الاشتراكات النشطة
==================================== */
.active-subscription-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border-left: 5px solid #28a745;
    margin-bottom: 20px;
}

    .active-subscription-card .card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
    }

.subscription-details p {
    margin-bottom: 10px;
    color: #495057;
}

.subscription-details strong {
    color: #343a40;
    min-width: 150px;
    display: inline-block;
}

/* ====================================
   بطاقات المنتجات
==================================== */
.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s;
    height: 100%;
    margin-bottom: 20px;
}

    .product-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0,0,0,0.12);
    }

.product-img {
    position: relative;
    overflow: hidden;
    height: 200px;
}

    .product-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s;
    }

.product-card:hover .product-img img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #343a40;
    margin-bottom: 5px;
    height: 50px;
    overflow: hidden;
}

.product-code {
    color: #6c757d;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.product-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

    .product-price .price {
        font-size: 1.25rem;
        font-weight: 700;
        color: #28a745;
    }

    .product-price .stock {
        font-size: 0.85rem;
    }

.product-description {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 15px;
    height: 40px;
    overflow: hidden;
}

.product-actions {
    padding: 0 20px 20px;
}

/* ====================================
   حالة فارغة
==================================== */
.empty-state {
    padding: 60px 20px;
}

    .empty-state i {
        opacity: 0.5;
    }

/* ====================================
   عنوان الصفحة
==================================== */
.page-title {
    background: linear-gradient(224deg, #0dcaf0 0%, #20c997 50%, #ffc107b5 100%) !important;
    color: white;
    padding: 100px 0 60px;
    text-align: center;
}

    .page-title h1 {
        font-size: 2.5rem;
        font-weight: 700;
        margin-bottom: 20px;
    }

.breadcrumb {
    justify-content: center;
    background: transparent;
    margin-bottom: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255,255,255,0.7);
}

.breadcrumb-item a {
    color: white;
    text-decoration: none;
}

.breadcrumb-item.active {
    color: rgba(255,255,255,0.9);
}

/* ====================================
   صفحة السلة
==================================== */
.cart-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.cart-quantity input {
    width: 70px;
    text-align: center;
}

.cart-summary {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
}

    .cart-summary h4 {
        border-bottom: 2px solid #dee2e6;
        padding-bottom: 10px;
        margin-bottom: 20px;
    }

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.summary-total {
    font-size: 1.2rem;
    font-weight: 700;
    color: #28a745;
    border-top: 2px solid #dee2e6;
    padding-top: 10px;
    margin-top: 10px;
}

/* ====================================
   صناديق المعلومات
==================================== */
.info-box {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
    height: 100%;
}

    .info-box i {
        font-size: 2rem;
        color: #28a745;
        margin-bottom: 15px;
    }

    .info-box h3 {
        font-size: 1.1rem;
        font-weight: 600;
        margin-bottom: 10px;
    }

/* ====================================
   الأسئلة الشائعة
==================================== */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef;
}

    .faq-item h3 {
        font-size: 1.1rem;
        font-weight: 600;
        margin: 0;
        cursor: pointer;
        display: flex;
        align-items: center;
    }

    .faq-item .num {
        color: #28a745;
        margin-left: 10px;
    }

.faq-content {
    margin-top: 15px;
    display: none;
}

.faq-active .faq-content {
    display: block;
}

.faq-toggle {
    cursor: pointer;
    transition: transform 0.3s;
}

.faq-active .faq-toggle {
    transform: rotate(180deg);
}

/* ====================================
   الإشعارات
==================================== */
.alert.position-fixed {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translate(-50%, -100%);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* ====================================
   الشارات
==================================== */
.badge {
    font-size: 0.75rem;
    padding: 0.25em 0.6em;
}

/* ====================================
   الأزرار
==================================== */
.btn {
    font-weight: 600;
    padding: 0.5rem 1.5rem;
}

.btn-lg {
    padding: 0.75rem 2rem;
}

/* ====================================
   تحسينات الموبايل
==================================== */
@media (max-width: 768px) {
    /* الحاسبة */
    .calculator-card {
        padding: 20px;
    }

    .result-value {
        font-size: 1.2rem;
    }

    .calories-amount {
        font-size: 1.5rem;
    }

    /* الاشتراكات */
    .subscription-card .price {
        font-size: 2rem;
    }

    .subscription-card .card-header h3 {
        font-size: 1.3rem;
    }

    .subscription-card .features li {
        font-size: 0.9rem;
    }

    /* المنتجات */
    .product-img {
        height: 180px;
    }

    .product-title {
        font-size: 1rem;
        height: auto;
    }

    .product-description {
        height: auto;
        font-size: 0.85rem;
    }

    /* عنوان الصفحة */
    .page-title {
        padding: 80px 0 40px;
    }

        .page-title h1 {
            font-size: 1.8rem;
        }

    /* السلة */
    .cart-summary {
        margin-top: 20px;
    }

    .summary-total {
        font-size: 1.1rem;
    }

    /* الاشتراكات النشطة */
    .active-subscription-card {
        padding: 15px;
        border-left: none;
        border-right: 5px solid #28a745;
    }

    .subscription-details strong {
        min-width: 120px;
        font-size: 0.9rem;
    }
}

/* ====================================
   الشاشات الصغيرة جداً
==================================== */
@media (max-width: 576px) {
    .calculator-card {
        padding: 15px;
    }

    .recommendation-card {
        padding: 15px;
    }

    .calories-amount {
        font-size: 1.3rem;
    }

    .subscription-card .price {
        font-size: 1.8rem;
    }

    .product-img {
        height: 150px;
    }

    .page-title h1 {
        font-size: 1.5rem;
    }

    .cart-quantity input {
        width: 50px;
    }

    .summary-item {
        font-size: 0.9rem;
    }
}

/* ====================================
   إصلاح RTL
==================================== */
[dir="rtl"] .result-box {
    border-right: none;
    border-left: 5px solid #28a745;
}

[dir="rtl"] .active-subscription-card {
    border-left: none;
    border-right: 5px solid #28a745;
}

[dir="rtl"] .product-badge {
    left: auto;
    right: 10px;
}

/* ====================================
   تحسين الأداء
==================================== */
.product-card,
.subscription-card {
    will-change: transform;
}

.product-img img {
    will-change: transform;
}
