/* Global Styles */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--light-color);
    line-height: 1.6;
}

/* Header Styles */
.navbar {
    background-color: #2c3e50 !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff !important;
}

.nav-link {
    color: rgba(255,255,255,0.8) !important;
    font-weight: 600;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
    border-radius: 5px;
}

.nav-link:hover {
    color: #fff !important;
    background-color: rgba(255,255,255,0.1);
}

.nav-link.active {
    color: #fff !important;
    background-color: rgba(255,255,255,0.2);
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    width: 1.5em;
    height: 1.5em;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 100px 0;
    margin-bottom: 30px;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

/* Slider Section */
.slider-section {
    margin-bottom: 2rem;
}

.carousel {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.carousel-item {
    height: 500px;
}
.carousel-item img {
    height: 100%;
    object-fit: cover;
}


/* Online Counter Styles */
.online-counter {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 25px;
    display: inline-block;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.carousel-caption p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.carousel-caption .btn {
    font-size: 1.1rem;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    text-shadow: none;
    transition: all 0.3s ease;
}

.carousel-caption .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    opacity: 0;
    transition: all 0.3s ease;
}

.carousel:hover .carousel-control-prev,
.carousel:hover .carousel-control-next {
    opacity: 1;
}

.carousel-indicators {
    margin-bottom: 2rem;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
    background-color: rgba(255,255,255,0.5);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.carousel-indicators button.active {
    background-color: #fff;
    transform: scale(1.2);
}

/* Category Section */
.category-section {
    margin-bottom: 40px;
}

.category-title {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Categories Card */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    overflow: hidden;
}

.card-header {
    background-color: #3498db !important;
    border-bottom: none;
    padding: 1rem 1.5rem;
}

.card-header h5 {
    color: #fff;
    font-weight: 600;
    margin: 0;
}

.list-group-item {
    border: none;
    padding: 1rem 1.5rem;
    transition: all 0.3s ease;
}

.list-group-item:not(:last-child) {
    border-bottom: 1px solid #eee;
}

.list-group-item a {
    color: #2c3e50;
    transition: all 0.3s ease;
}

.list-group-item:hover {
    background-color: #f8f9fa;
}

.list-group-item:hover a {
    color: #3498db;
    transform: translateX(-5px);
}

/* Product Card */
.product-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.product-img {
    position: relative;
    overflow: hidden;
    padding-top: 100%;
}

.product-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 1rem;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.product-price {
    font-size: 19px;
    font-weight: bold;
    color: #376ac1 !important;
    margin-bottom:0;
}

.product-rating {
    color: #f1c40f;
    margin-bottom: 0.5rem;
}

.product-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.product-meta {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.product-meta p {
    margin-bottom: 0.5rem;
    color: #666;
}

.product-meta a {
    color: var(--primary-color);
    text-decoration: none;
}

.product-meta a:hover {
    text-decoration: underline;
}

.product-actions {
    margin-top: 1rem;
}

.product-actions .btn {
    margin-bottom: 0.5rem;
    width: 100%;
}

/* Product Details Page */
.product-details-section {
    padding: 2rem 0;
}

.product-details-section .product-card {
    margin-bottom: 0;
}

.product-details-section .product-img {
    padding-top: 0;
    height: 400px;
}

.product-details-section .product-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.product-details-section .product-price {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.product-details-section .product-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.product-thumbnails img {
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-thumbnails img.active,
.product-thumbnails img:hover {
    border-color: var(--primary-color);
}

/* Categories Showcase */
.categories-showcase {
    margin-bottom: 40px;
}

.category-card {
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-img {
    position: relative;
    height: 250px;
}

.category-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    padding: 20px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-card:hover .category-overlay {
    opacity: 1;
}

.category-overlay h3 {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 15px;
}

/* Category Header */
.category-header {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Cart Styles */
.cart-item {
    border-bottom: 1px solid #ddd;
    padding: 15px 0;
}

.cart-item-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.cart-summary {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
}

/* Form Styles */
.form-container {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.form-title {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Product Details */
.product-details-img {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.product-details-img img {
    width: 100%;
    height: auto;
}

.product-details-info {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-details-title {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.product-details-price {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 15px;
}

.product-details-description {
    margin-bottom: 20px;
}

/* Search Form */
.search-form {
    position: relative;
    max-width: 300px;
}

.search-form .form-control {
    border-radius: 50px;
    padding-right: 40px;
    background-color: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
}

.search-form .form-control::placeholder {
    color: rgba(255,255,255,0.6);
}

.search-form .btn {
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    padding: 0.375rem 0.75rem;
}

.search-form .btn:hover {
    color: #fff;
}

/* Cart Button */
.cart-btn {
    position: relative;
    padding: 0.5rem 1rem;
    color: rgba(255,255,255,0.8) !important;
    transition: all 0.3s ease;
    border-radius: 5px;
}

.cart-btn:hover {
    color: #fff !important;
    background-color: rgba(255,255,255,0.1);
}

.cart-count {
    position: absolute;
    top: 0;
    left: 0;
    background-color: #e74c3c;
    color: #fff;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* Footer Styles */
footer {
    margin-top: auto;
}

footer a {
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.social-icons a {
    display: inline-block;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    text-align: center;
    line-height: 36px;
    margin-right: 10px;
    transition: background-color 0.3s ease;
}

.social-icons a:hover {
    background-color: var(--primary-color);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .hero {
        padding: 60px 0;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
}
@media (max-width: 767.98px) {
    .carousel-item {
        height: 375px;
    }
    
    .carousel-caption {
        padding: 10px;
    }
    
    .carousel-caption h2 {
        font-size: 1.8rem;
    }
    
    .carousel-caption p {
        font-size: 1rem;
    }
    
    .category-img {
        height: 200px;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Custom Alert Styles */
.alert {
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Pagination Styles */
.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.pagination .page-link {
    color: var(--primary-color);
}

/* Admin Dashboard Styles */
.dashboard-card {
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    color: white;
    text-align: center;
}

.dashboard-card-1 {
    background-color: var(--primary-color);
}

.dashboard-card-2 {
    background-color: var(--success-color);
}

.dashboard-card-3 {
    background-color: var(--warning-color);
}

.dashboard-card-4 {
    background-color: var(--danger-color);
}

.dashboard-card-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.dashboard-card-title {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.dashboard-card-value {
    font-size: 2rem;
    font-weight: bold;
}

/* Alert Container */
#alert-container {
    z-index: 1050;
}

/* Product Badges */
.product-badges .badge {
    display: block;
    margin-bottom: 5px;
    padding: 5px 10px;
    font-size: 0.8rem;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.product-badges .badge.bg-warning {
    color: #000;
}

.product-badges .badge.bg-info {
    color: #fff;
}

/* Online Users Widget */
.online-users-widget {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 25px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.online-users-widget:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.online-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #28a745;
    border-radius: 50%;
    animation: pulse-green 2s infinite;
    margin-right: 5px;
}

@keyframes pulse-green {
    0% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.6; 
        transform: scale(1.2);
    }
    100% { 
        opacity: 1; 
        transform: scale(1);
    }
}

.online-users-count {
    font-size: 14px;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

.online-users-count.updating {
    animation: bounce-update 0.6s ease-in-out;
}

@keyframes bounce-update {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Small Online Counter for Header */
.online-counter-small {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(5px);
}

.online-indicator-small {
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #28a745;
    border-radius: 50%;
    animation: pulse-green 2s infinite;
}

.online-counter-small .online-users-count {
    font-size: 12px;
    color: #fff;
    font-weight: 600;
}

/* Tablet Responsive Styles */
@media (max-width: 992px) and (min-width: 769px) {
    .product-badges .badge {
        padding: 4px 7px !important;
        font-size: 0.7rem !important;
    }
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    /* Smaller badges for mobile */
    .product-badges .badge {
        padding: 3px 6px !important;
        font-size: 0.65rem !important;
        margin-bottom: 3px;
    }
    
    .product-badges .badge.bg-warning,
    .product-badges .badge.bg-info,
    .product-badges .badge.bg-danger {
        padding: 2px 5px !important;
        font-size: 0.6rem !important;
        line-height: 1.2;
    }
    
    /* For product detail page badges with inline styles */
    .product-image .product-badges .badge {
        padding: 2px 4px !important;
        font-size: 0.55rem !important;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .product-badges .badge {
        padding: 1px 3px !important;
        font-size: 0.5rem !important;
        margin-bottom: 2px;
    }
}
