/* Global Variables */
:root {
    --primary-color: #003366;
    --secondary-color: #0077B6;
    --light-color: #F8F9FA;
    --text-color-primary: #333333;
    --text-color-secondary: #003366;
}

/* Base Body Styles */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--light-color);
    color: var(--text-color-primary);
}

/* Navbar & Aside */
.navbar-brand {
    width: 100px;
    color: #F9F54B;
    font-weight: bold;
    font-size: 1.8rem;
}

.nav-link {
    color: black !important;
    font-weight: 500;
    margin: 0 10px;
}

.icons i {
    font-size: 1.2rem;
    margin-left: 15px;
    cursor: pointer;
}

aside {
    width: 250px;
    height: 100vh;
    background-color: #2C2D2E;
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    padding-top: 20px;
    transition: width 0.3s ease;
}

.logo {
    text-align: center;
    font-size: 1.8rem;
    font-weight: bold;
    color: orangered;
    margin-bottom: 30px;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-links li {
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.3s;
}

.nav-links li:hover {
    background-color: #3a3b3c;
}

.nav-links a {
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Content Area */
.content-area {
    margin-left: 250px;
    padding: 20px;
    width: calc(100% - 250px);
    transition: margin-left 0.3s ease, width 0.3s ease;
}

.cat-container {
    max-width: 1200px;
}

.cat-add-btn {
    font-weight: bold;
    border-radius: 8px;
}

/* Buttons (Unified) */
.btn-primary-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transition: background-color 0.2s;
}

.btn-primary-custom:hover {
    background-color: #002244;
    border-color: #002244;
}

.btn-secondary-custom {
    background-color: transparent;
    color: var(--secondary-color);
    border: 1px solid var(--secondary-color);
    transition: color 0.2s, background-color 0.2s;
}

.btn-secondary-custom:hover {
    background-color: var(--secondary-color);
    color: white;
}

.cat-edit-btn,
.cat-delete-btn {
    min-width: 90px;
    border-radius: 8px;
    font-weight: 600;
    transition: 0.2s;
}

.cat-edit-btn:hover {
    background-color: #e0a800;
    transform: scale(1.05);
}

.cat-delete-btn:hover {
    background-color: #c82333;
    transform: scale(1.05);
}

/* Unified Card Styles (Products & Categories) */
.product-card,
.category-card {
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.product-card:hover,
.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Image Container (Unified) */
.img-container {
    width: 100%;
    aspect-ratio: 1 / 1.1;
    height: 250px;
    overflow: hidden;
    background-color: #f8f9fa;
    position: relative;
}

.img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    position: absolute;
    top: 0;
    left: 0;
}

.product-card:hover .img-container img,
.category-card:hover .img-container img {
    transform: scale(1.05);
}

/* Card Body & Text (Unified) */
.card-body {
    padding: 1rem;
}

.card-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.card-body p {
    font-size: 0.9rem;
    color: #555;
}

/* Responsive Media Queries */

/* Hide aside on small screens */
@media (max-width: 767.98px) {
    aside {
        width: 0;
        visibility: hidden;
    }

    .content-area {
        margin-left: 0;
        width: 100%;
    }
}



/* Category Card Specific Styles */
.category-card {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    /* Added padding */
    font-size: 1.2rem;
    /* Adjusted font size */
    transition: background-color 0.3s, color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.category-card:hover {
    background-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 51, 102, 0.2);
}

.category-card:hover .card-title {
    color: white;
}

/* Thumbnails under the carousel */
.thumbnail-row {
    gap: 10px;
    /* مسافة بين الصور */
}

.thumbnail {
    width: 80px;
    /* عرض ثابت للصورة المصغرة */
    height: 80px;
    /* طول ثابت للصورة المصغرة */
    border: 2px solid transparent;
    /* border-radius: 8px; */
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
}

.thumbnail.active {
    border-color: var(--primary-color);
    /* إطار بلون مميز للصورة النشطة */
    transform: scale(1.05);
    /* تكبير بسيط عند التحديد */
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* مهمة عشان الصورة تملى المربع من غير ما تبوظ أبعادها */
}
/* Banner Responsive */
.banner-img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    /* border-radius: 12px; */
}

/* Mobile adjustments */
@media (max-width: 767px) {
    .banner-img {
        height: 150px;
        width: 100%;
    }
}

/* Category Card (White Style) */
.category-card-text {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: #ffffff;
    font-size: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0px 2px 6px rgba(0,0,0,0.08);
}

.category-card-text h6 {
    margin: 0;
    font-weight: bold;
    text-transform: capitalize;
    letter-spacing: 0.5px;
}

/* Hover Effect */
.category-card-text:hover {
    transform: translateY(-6px);
    box-shadow: 0px 8px 20px rgba(255, 69, 0, 0.25);
    background: rgb(61, 61, 61);
    color: white;
}
/* Category Cards Responsive - 3 per row on mobile */

/* تنسيقات شارة الخصم */
.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #dc3545; /* لون أحمر عشان الخصم يبان */
    color: #fff;
    font-weight: bold;
    font-size: 0.85rem;
    padding: 5px 10px;
    border-radius: 50px;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* تعديل عرض السعر الأصلي عشان يكون واضح */
.price-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px; /* مسافة بين السعرين */
}
