/* ===== ESSENTIAL CSS RESET AND BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: var(--theme-font-family, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif);
    font-size: var(--theme-font-size, 16px);
    color: var(--theme-font-color, #333);
    direction: rtl;
}

/* ===== CSS VARIABLES ===== */
:root {
    /* Theme Variables (can be overridden by JavaScript) */
    /*--theme-primary-color: #2c3e50;
    --theme-secondary-color: #667eea;
    --theme-font-color: #333333;*/
    --theme-font-family: 'Cairo', sans-serif;
    --theme-font-size: 16px;
    
    /* Bootstrap Compatible Variables */
    --primary: var(--theme-primary-color);
    --secondary: var(--theme-secondary-color);
    --accent: #3498db;
    --light: #f5f7fa;
    --dark: #1a252f;
    --success: #2ecc71;
    --warning: #f39c12;
    
    /* Additional Theme Variables */
    --theme-border-color: #e9ecef;
    --theme-text-muted: #6c757d;
    --theme-text-light: #95a5a6;
    --theme-background-light: #f8f9fa;
    --theme-border-light: #f0f0f0;
}


/* ===== BASE STYLES ===== */
body {
    /*background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);*/
    color: var(--theme-secondary-color);
    line-height: 1.6;
    min-height: 100vh;
    padding:0px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

 
/* ===== ADDITIONAL CSS FOR NEW DESIGN ===== */

/* السلايدر الرئيسي */
.main-slider {
    height: 500px;
    border-radius: 0px;
    overflow: hidden;
    margin-bottom: 40px;
    /*box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);*/
    position: relative;
}

/* مؤشر التحميل للسلايدر */
.slider-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 0px;
}

.slider-loading-content {
    text-align: center;
    color: var(--primary);
}

.slider-loading-content i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--accent);
    animation: spin 1s linear infinite;
    background: linear-gradient(45deg, var(--accent), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.slider-loading-content p {
    font-size: 1.2rem;
    color: #6c757d;
    font-weight: 500;
    margin: 0;
    font-family: var(--theme-font-family);
}

.summary-item span{
    color:var(--primary);
    font-size:16px;
}
.dx-button-mode-contained.dx-button-success{
    font-size:16px;
    font-weight:bold;
    padding:7px
}
/* Responsive Design لمؤشر التحميل */
@media (max-width: 768px) {
    .slider-loading-content i {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }
    
    .slider-loading-content p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .slider-loading-content i {
        font-size: 2rem;
        margin-bottom: 10px;
    }
    
    .slider-loading-content p {
        font-size: 0.9rem;
    }
}
.currency-value::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 4px;
    vertical-align: middle;
    background-image: url('/assets/Saudi_Riyal_Symbol-2.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.8;
}

/* Ensure currency symbol appears in all contexts */
.currency-value {
    position: relative;
    display: inline-block;
}

/* Additional styles for currency symbol visibility */
.price-value .currency-value::after,
.item-total .currency-value::after,
.font-weight-medium .currency-value::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 4px;
    vertical-align: middle;
    background-image: url('/assets/Saudi_Riyal_Symbol-2.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.8;
}

.swiper-slide {
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(var(--theme-secondary-color-rgb, 231, 76, 60), 0.1);
    font-size: 3rem;
    font-weight: bold;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    position: relative;
}
.input-group-text {
    border-radius: 0px 10px 10px 0px !important;
}
.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
}

.slide-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 20%;
}

.slide-content h2 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.slide-content p {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    padding: 10px 10px;
    background: var(--primary);
    color: white;
    border-radius: 50px;
    font-weight: bold;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
   
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

    .btn:hover {
        background: var(--secondary);
        color: white;
        
        box-shadow: 0 8px 20px rgba(231, 76, 60, 0.4);
    }

/* قسم الإحصائيات - تصميم جديد */
.stats-section {
    background: transparent;
    padding: 40px 0;
    margin-bottom: 40px;
}

.stats-section .section-title {
    text-align: center;
    color: var(--theme-text-color, #333);
    margin-bottom: 40px;
    font-size: 2.2rem;
    font-weight: 600;
    position: relative;
}

.stats-grid {
    display: block;
    max-width: 1200px;
    margin: 0 auto;
}

.stats-grid .row {
    margin: 0;
}

.stats-grid .col-lg-2 {
    padding: 0 10px;
    margin-bottom: 20px;
}

.stats-grid .col-md-6 {
    padding: 0 10px;
    margin-bottom: 20px;
}

.stat-card {
    background: #8B9C6A;
    border-radius: 15px;
    padding: 20px 10px 20px 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    /*transition: all 0.3s ease;*/
    position: relative;
    overflow: hidden;
    height: 100%;
}

.stat-card:hover {
    /*transform: translateY(-5px);*/
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.stat-icon {
    margin-bottom: 15px;
}

.stat-icon i {
    font-size: 2.5rem;
    color: white;
    display: block;
}

.stat-icon img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    /* إزالة filter للاحتفاظ بالألوان الأصلية */
}

.stat-content {
    color: white;
}

.stat-title {
    font-size: 1rem;
    font-weight: 500;
    color: white;
    margin-bottom: 15px;
    line-height: 1.4;
    min-height: 2.8em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-numbers {
    margin: 0;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin: 0;
    line-height: 1;
}

.stat-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 10px;
    line-height: 1.3;
}

/* Progress Bar Styles */
.stat-percentage {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    margin: 10px 0 5px 0;
}

.stat-progress {
    width: 100%;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 8px;
}

.stat-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    border-radius: 3px;
    transition: width 0.8s ease-in-out;
    position: relative;
}

.stat-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.stat-separator {
    margin: 0 5px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

.stat-total {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px 15px;
    }
    
    .stat-icon i {
        font-size: 2rem;
    }
    
    .stat-title {
        font-size: 0.9rem;
        min-height: 2.5em;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-card {
        padding: 15px 10px;
    }
    
    .stat-icon i {
        font-size: 1.8rem;
    }
    
    .stat-title {
        font-size: 0.8rem;
        min-height: 2.2em;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
}


/* قسم التصنيفات والمنتجات */
.categories-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    /*box-shadow: 0 5px 25px rgba(0,0,0,0.08);*/
    position: relative;
    overflow: hidden;
}

/* Categories Container */
#categoriesContainer {
    display: block !important;
    visibility: visible !important;
    min-height: 100px;
    /*border: 2px dashed #ccc; *//* Temporary border for debugging */
    padding: 1rem;
    margin: 1rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
   /* border:1px solid #ccc;*/
}

.section-title {
    color: var(--primary);
    font-size: 2.2rem;
    position: relative;
    padding-bottom: 10px;
}

.categories-filter {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    background: #f8f9fa;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active, .filter-btn:hover {
    background: var(--primary);
    color: white;
}

/* بطاقة المنتج */
.products-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 25px;
}

/* ===== LAYOUT STABILITY FIXES ===== */

/* Prevent layout shifts and shaking */
.product-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
   
    border: 1px solid rgba(0,0,0,0.05);
    will-change: transform;
}


/* Prevent content jumping */
.product-info {
    padding: 20px;
    background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(248,249,250,0.8) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  
    font-family: var(--theme-font-family);
    flex: 1;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--theme-primary-color) 0%, var(--theme-secondary-color) 50%, var(--theme-primary-color) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

/*.product-card:hover::before {
    opacity: 1;
}*/

/*.product-card:hover {
    transform: translateY(-5px);
}*/

.product-img {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.product-img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(19, 88, 152, 0.1) 0%, rgba(193, 184, 102, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-img::before {
    opacity: 1;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/*.product-card:hover .product-img img {
    transform: scale(1.05);
}*/

.product-info {
    padding: 20px;
    background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(248,249,250,0.8) 100%);
    grid-row: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 180px;
    font-family: var(--theme-font-family);
}

.product-category {
    color: var(--theme-primary-color);
    font-size: 0.85rem;
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, var(--theme-primary-color), var(--theme-secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-name {
    font-weight: 800;
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--theme-font-color);
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    font-family: var(--theme-font-family);
}

.product-rating {
    color: var(--warning);
    margin-bottom: 12px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-rating-section {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 8px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.user-rating-label {
    font-size: 14px;
    color: #666;
    margin-left: 8px;
    font-family: var(--theme-font-family);
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.current-price {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--theme-secondary-color);
    text-shadow: 0 1px 2px rgba(231, 76, 60, 0.2);
    background: linear-gradient(135deg, var(--theme-secondary-color), #c0392b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: var(--theme-font-family);
}

.old-price {
    color: #95a5a6;
    text-decoration: line-through;
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.8;
}

.product-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-top: 15px;
    margin-top: auto;
}

.product-actions-row {
    display: flex;
    gap: 8px;
    width: 100%;
}

.stock-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

.in-stock {
    color: var(--success);
}

.add-to-cart {
    background: linear-gradient(135deg, #2c5530 0%, #1e3a21 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 15px rgba(44, 85, 48, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    font-family: 'Cairo', sans-serif;
    min-width: 120px;
    justify-content: center;
}

.add-to-cart::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.add-to-cart:hover::before {
    left: 100%;
}

.add-to-cart:hover {
    background: linear-gradient(135deg, #1e3a21 0%, #2c5530 100%);
}

/* زر التعليقات */
.add-comment-btn {
    background: var(--secondary) ;
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    font-family: 'Cairo', sans-serif;
    min-width: 100px;
    justify-content: center;
    flex: 1;
}

    .add-comment-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: var(--primary);
        transition: left 0.5s ease;
    }

.add-comment-btn:hover::before {
    left: 100%;
}

    .add-comment-btn:hover {
        background: var(--primary);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }

.add-comment-btn:active {
    transform: translateY(0);
}

/* شارة عدد التعليقات */
.comment-count-badge {

    color: white;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 4px;
    transition: all 0.3s ease;
}



/* نص الزر */
.add-comment-btn .btn-text {
    font-size: 0.9rem;
}

/* تعديل زر السلة ليتناسب مع التصميم الجديد */
.add-to-cart {
    flex: 2;
    min-width: 140px;
}

/* تصميم متجاوب للأزرار */
@media (max-width: 768px) {
    .product-actions-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .add-to-cart,
    .add-comment-btn {
        flex: 1;
        min-width: auto;
        width: 100%;
    }
    
    .add-comment-btn {
        padding: 10px 16px;
    }
    
    .add-to-cart {
        padding: 12px 20px;
    }
}

/* الفوتر */
.footer {
    background: var(--primary);
    color: white;
    padding: 40px 0 20px;
    border-radius: 0px;
    margin-top: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h4 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #ddd;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    gap: 10px;
}

.footer-links a:hover {
    color: var(--accent);
    padding-right: 5px;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--accent);
    transform: translateY(-5px);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #aaa;
    font-size: 0.9rem;
}

/* تصميم متجاوب */
@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        gap: 20px;
    }
    
    .search-bar {
        margin: 0;
        max-width: 100%;
    }
    
    .main-slider {
        height: 300px;
    }
    
    .slide-content h2 {
        font-size: 2rem;
    }
    
    .slide-content p {
        font-size: 1.2rem;
    }
    
    .stats-section, .categories-section {
        padding: 30px 20px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===== ADDITIONAL STYLES FOR MISSING ELEMENTS ===== */

/* Loading States */
.statistics-loading, .categories-loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.statistics-loading i, .categories-loading i {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--accent);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* No Statistics State */
.no-statistics {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.no-statistics i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--warning);
}

/* Swiper Navigation */
.swiper-button-prev, .swiper-button-next {
    color: white;
    background: rgba(0,0,0,0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.swiper-button-prev:hover, .swiper-button-next:hover {
    background: rgba(0,0,0,0.8);
    transform: scale(1.1);
}

.swiper-pagination-bullet {
    background: white;
    opacity: 0.7;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--secondary);
}

/* Categories Pagination */
.categories-pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination-btn {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: var(--primary);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    border: 2px solid transparent;
}

.pagination-btn.active {
    background: linear-gradient(45deg, var(--primary), var(--accent));
    color: white;
    border-color: white;
    transform: scale(1.1);
}

.pagination-btn:hover:not(.active) {
    background: var(--accent);
    color: white;
}

.pagination-btn i {
    font-size: 1.2rem;
}

/* ===== ENHANCED HEADER STYLES ===== */

/* Header Section */
.header-section {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1000;
    margin-bottom: 30px;
}

/* Logo Section */
.logo-section {
    text-align: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
}

/* .logo-icon styles moved to later definition to avoid conflicts */

.logo-text {
    text-align: right;
}

.brand-name {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0;
    background: var(--primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-subtitle {
    font-size: 0.8rem;
    color: #6c757d;
    margin: 0;
    font-weight: 500;
}

/* Home Link */
.home-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 10px;
    border-radius: 15px;
}

.home-link:hover {
    color: var(--secondary);
    background: rgba(231, 76, 60, 0.1);
    transform: translateY(-2px);
}

.home-link i {
    font-size: 1.2rem;
}

.home-link span {
    font-size: 0.8rem;
}

/* Search Section */
.search-section {
    padding: 0 15px;
}

.search-form {
    width: 100%;
}

.search-container {
    display: flex;
    background: white;
    border-radius: 25px;
    padding: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.search-container:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
    transform: scale(1.02);
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 20px;
    font-size: 1rem;
    background: transparent;
    border-radius: 20px;
    font-family: 'Cairo', sans-serif;
}

.search-input::placeholder {
    color: #6c757d;
    font-weight: 500;
}

.search-btn {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border: none;
    border-radius: 20px;
    padding: 12px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Cairo', sans-serif;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(44, 62, 80, 0.4);
}

.search-btn i {
    font-size: 1rem;
}

.search-btn span {
    font-size: 0.9rem;
}

/* User Actions Section */
.user-actions-section {
    padding: 0 15px;
}

.action-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border: none;
    border-radius: 15px;
    padding: 12px 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Cairo', sans-serif;
    position: relative;
    font-size: 0.8rem;
    min-height: 45px;
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(44, 62, 80, 0.4);
    background: linear-gradient(135deg, var(--secondary), #c0392b);
}

.action-btn i {
    font-size: 1rem;
}

.action-btn span {
    font-size: 0.8rem;
}

/* Badge Styles */
.badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--secondary);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 2px solid white;
}

.favorites-badge {
    background: #e91e63;
}

.cart-badge {
    background: var(--warning);
}

/* Responsive Design for Header */
@media (max-width: 1200px) {
    .brand-name {
        font-size: 1.5rem;
    }
    
    .brand-subtitle {
        font-size: 0.7rem;
    }
    
    .action-btn {
        font-size: 0.75rem;
        padding: 10px 12px;
    }
}

@media (max-width: 992px) {
    .logo-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .logo-icon {
        font-size: 2rem;
    }
    
    .brand-name {
        font-size: 1.3rem;
    }
    
    .search-section {
        padding: 0 10px;
        margin: 15px 0;
    }
    
    .user-actions-section {
        padding: 0 10px;
    }
}

@media (max-width: 768px) {
    .header-section {
        margin-bottom: 20px;
    }
    
    .logo-container {
        gap: 8px;
    }
    
    .logo-icon {
        font-size: 1.8rem;
    }
    
    .brand-name {
        font-size: 1.2rem;
    }
    
    .brand-subtitle {
        font-size: 0.65rem;
    }
    
    .search-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-input {
        text-align: center;
    }
    
    .search-btn {
        width: 100%;
    }
    
    .action-btn {
        font-size: 0.7rem;
        padding: 8px 10px;
        min-height: 40px;
    }
}

@media (max-width: 576px) {
    .logo-icon {
        font-size: 1.5rem;
    }
    
    .brand-name {
        font-size: 1rem;
    }
    
    .brand-subtitle {
        font-size: 0.6rem;
    }
    
    .action-btn {
        font-size: 0.65rem;
        padding: 6px 8px;
        min-height: 35px;
    }
    
    .badge {
        width: 18px;
        height: 18px;
        font-size: 0.6rem;
    }
}

/* ===== ENHANCED PRODUCT CATEGORIES AND PRODUCT CARDS DESIGN ===== */

/* Category Section Header */
.category-section {
    margin-bottom: 50px;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.category-title {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--primary);
}

.category-title i {
    font-size: 2rem;
    color: var(--secondary);
    background: linear-gradient(45deg, var(--secondary), var(--warning));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.category-title h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    background:  var(--primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.view-all {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(52, 152, 219, 0.1);
}

.view-all:hover {
    color: var(--secondary);
    background: rgba(231, 76, 60, 0.1);
    transform: translateX(-5px);
}

.view-all i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.view-all:hover i {
    transform: translateX(-3px);
}

/* Products Container Grid */
.products-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

/* Enhanced Product Card */
.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    border: 1px solid #f8f9fa;
    
    display: flex;
    flex-direction: column;
}

/*.product-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border-color: var(--accent);
}*/

/* Product Image Container */
.product-img {
    height: 250px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/*.product-card:hover .product-img img {
    transform: scale(1.15);
}*/

/* Product Badge */
.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    color: white;
    z-index: 5;
    font-family: var(--theme-font-family);
}

.product-badge.sale {
    background-color: var(--theme-secondary-color);
}

.product-badge.new {
    background-color: var(--success);
}

.product-badge.discount {
    background-color: var(--warning);
}

/* Product Actions */
.product-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-actions {
    opacity: 1;
}

.product-actions .action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    font-family: var(--theme-font-family);
}

.product-actions .action-btn:hover {
    transform: scale(1.1);
}

.favorite-btn:hover,
.favorite-btn.active {
    background-color: rgba(var(--theme-secondary-color-rgb, 231, 76, 60), 0.1);
    color: var(--theme-secondary-color);
}

.quick-view-btn:hover {
    background-color: rgba(var(--accent-rgb, 52, 152, 219), 0.1);
    color: var(--accent);
}

.comments-btn:hover {
    background-color: rgba(var(--success-rgb, 76, 175, 80), 0.1);
    color: var(--success);
}

/* Product Info Section */
.product-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-family: var(--theme-font-family);
}

.product-category {
    color: var(--accent);
    font-size: 0.85rem;
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-name {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: var(--dark);
    line-height: 1.4;
/*    height: 3em;
*/    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Product Rating */
.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    color: var(--warning);
}

.rating-stars {
    display: flex;
    gap: 2px;
}

.rating-stars i {
    font-size: 16px;
    color: #dee2e6 !important; /* اللون الافتراضي للنجوم الفارغة */
    transition: all 0.3s ease;
}

.rating-stars i.far.fa-star {
    color: #dee2e6 !important; /* اللون الرمادي للنجوم الفارغة */
}

.rating-stars i.star-filled,
.rating-stars i.fas.fa-star.star-filled,
.rating-stars i.fa-star-half-alt {
    color: var(--warning) !important; /* اللون الأصفر للنجوم المملوءة والنصف مملوءة */
}

.rating-stars i.star-hover {
    color: var(--warning);
    transform: scale(1.1);
}

.rating-count {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
}

/* Product Price */
.product-price {
    display: block;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.current-price {
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--secondary);
    text-shadow: 0 1px 2px rgba(231, 76, 60, 0.2);
}

.old-price {
    color: #999;
    text-decoration: line-through;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Product Meta */
.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
    margin-top: auto;
}

.stock-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 500;
}

.in-stock {
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 4px;
}

.in-stock i {
    font-size: 0.8rem;
}

.out-of-stock {
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Add to Cart Button */
.add-to-cart {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.3);
    border: 2px solid transparent;
}

.add-to-cart:hover {
    background: var(--secondary);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(231, 76, 60, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.add-to-cart:active {
    transform: translateY(-1px);
    transition: all 0.1s ease;
}

.add-to-cart i {
    font-size: 0.9rem;
}

/* Product Comments Section - REMOVED - Now using Bootstrap modal */

/* Overlay background - REMOVED - Now using Bootstrap modal */

/* Enhanced Comments Modal Styles */
.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.modal-xl {
    max-width: 1200px;
}

.comments-section h6 {
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.add-comment-form .card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.comment-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.comment-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
}

.btn-outline-primary:hover {
    transform: translateY(-1px);
}

.btn-outline-secondary:hover {
    transform: translateY(-1px);
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 15px 20px 0 20px;
}

.comments-close-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.comments-close-btn:hover {
    background: #f5f5f5;
    color: #333;
}

.comments-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.comments-count {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
}

/* Comment Input */
.comment-input-container {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 20px;
    padding: 12px;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.comment-input-container:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.comment-input {
    flex: 1;
    border: none;
    outline: none;
    resize: none;
    font-family: inherit;
    font-size: 0.9rem;
    padding: 8px;
    background: transparent;
    min-height: 20px;
    max-height: 80px;
}

.comment-submit-btn {
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.comment-submit-btn:hover {
    background: var(--primary);
    transform: scale(1.1);
}

/* Responsive Design for Product Cards */
@media (max-width: 1200px) {
    .products-container {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .products-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .product-card {
        /*height: 400px;*/
    }
    
    .product-img {
        height: 200px;
    }
    
    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .category-title h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .products-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
   /* .product-card {
        height: 380px;
    }*/
    
    .product-img {
        height: 180px;
    }
    
    .product-info {
        padding: 15px;
    }
    
    .product-name {
        font-size: 1rem;
    }
    
    .current-price {
        font-size: 1.2rem;
    }
}

/* ===== ADDITIONAL ENHANCEMENTS ===== */

/* Enhanced Loading States */
.categories-loading, .statistics-loading {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 5px 25px rgba(0,0,0,0.08);
    border: 2px dashed #e9ecef;
}

.categories-loading i, .statistics-loading i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--accent);
    animation: spin 1s linear infinite;
    background: linear-gradient(45deg, var(--accent), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.categories-loading p, .statistics-loading p {
    font-size: 1.1rem;
    color: #6c757d;
    font-weight: 500;
    margin: 0;
}

/* Enhanced Filter Buttons */
.categories-filter {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    background: rgba(248, 249, 250, 0.8);
    padding: 15px;
    border-radius: 15px;
    border: 1px solid #e9ecef;
}

.filter-btn {
    padding: 12px 24px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-size: 0.9rem;
    color: #6c757d;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.filter-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: left 0.6s ease;
}

.filter-btn:hover::before {
    left: 100%;
}

.filter-btn.active, .filter-btn:hover {
    background:var(--primary);
    color: white;
   
    transform: translateY(-2px);
    
}

/* Enhanced Section Title */
.section-title {
    color: var(--primary);
    font-size: 2.2rem;
    position: relative;
    padding-bottom: 15px;
    margin: 0;
    text-align: center;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
  
    width: 100px;
    height: 4px;
    background:  var(--secondary);
    border-radius: 2px;
}

/* Enhanced Categories Section */
.categories-section {
    background: white;
    /*border-radius: 20px;*/
    padding: 40px;
    margin-bottom: 40px;
   /* box-shadow: 0 5px 25px rgba(0,0,0,0.08);*/
    position: relative;
    overflow: hidden;
    border: 1px solid #f8f9fa;
}

/*.categories-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--secondary), var(--warning), var(--success));
}
*/
/* Enhanced Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
  /*  border-bottom: 2px solid #f0f0f0;*/
    background-color:#f7f6ff;
    border-radius:20px;
}

/* Enhanced Statistics Section */
.stats-section {
    background: white;
   /* border-radius: 20px;*/
    padding: 40px;
    margin-bottom: 40px;
    /*box-shadow: 0 5px 25px rgba(0,0,0,0.08);*/
    position: relative;
    overflow: hidden;
   /* border: 1px solid #f8f9fa;*/
}

/*.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--secondary));
}*/

.stats-section h2 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 40px;
    font-size: 2.2rem;
    position: relative;
    padding-bottom: 15px;
}

.stats-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--secondary));
    border-radius: 2px;
}


.stat-label {
    color: #6c757d;
    font-size: 1.2rem;
    font-weight: 500;
    margin-top: 10px;
}

/* Header الجديد يحل محل top-bar - تم إزالته */

/* Header الجديد يحل محل هذه العناصر - تم إزالتها */

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* ===== FINAL ENHANCEMENTS ===== */

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Enhanced Focus States */
*:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Enhanced Transitions */
/*.product-card,
.stat-card,
.filter-btn,
.action-btn {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}*/

/* Enhanced Hover Effects */
.product-card:hover .product-actions .action-btn {
    animation: slideInLeft 0.3s ease forwards;
}

.product-card:hover .product-actions .action-btn:nth-child(1) { animation-delay: 0.1s; }
.product-card:hover .product-actions .action-btn:nth-child(2) { animation-delay: 0.2s; }
.product-card:hover .product-actions .action-btn:nth-child(3) { animation-delay: 0.3s; }

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Enhanced Loading Animation */
@keyframes spin {
    from { 
        transform: rotate(0deg); 
        filter: hue-rotate(0deg);
    }
    to { 
        transform: rotate(360deg); 
        filter: hue-rotate(360deg);
    }
}

/* Enhanced Product Card Shadows */
.product-card {
    box-shadow: 
        0 8px 25px rgba(0,0,0,0.08),
        0 4px 10px rgba(0,0,0,0.04);
}

/*.product-card:hover {
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.15),
        0 8px 20px rgba(0,0,0,0.08);
}
*/
/* Enhanced Filter Button States */
.filter-btn {
    position: relative;
    overflow: hidden;
}

.filter-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.filter-btn:active::after {
    width: 300px;
    height: 300px;
}

/* Enhanced Section Transitions */
.categories-section,
.stats-section {
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Responsive Design */
@media (max-width: 1200px) {
    .container {
        max-width: 1200px;
        padding: 0 20px;
    }
    
    .products-container {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 960px;
        padding: 0 15px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .categories-filter {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    /* Header الجديد يحل محل top-bar - تم إزالته */
    
    .main-slider {
        height: 300px;
    }
    
    .slide-content h2 {
        font-size: 2rem;
    }
    
    .slide-content p {
        font-size: 1.2rem;
    }
    
    .stats-section, 
    .categories-section {
        padding: 30px 20px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .stat-card {
        padding: 20px 15px;
    }
    
    .stat-icon {
        font-size: 2.5rem;
    }
    
    .stat-value {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    body {
        padding: 0px;
    }
    
    .container {
        padding: 0 5px;
    }
    
    .main-slider {
        height: 250px;
    }
    
    .slide-content h2 {
        font-size: 1.6rem;
    }
    
    .slide-content p {
        font-size: 1rem;
    }
    
    .btn {
        padding: 10px 25px;
        font-size: 1rem;
    }
    
    .stats-section, 
    .categories-section {
        padding: 20px 15px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .filter-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
    
   /* .product-card {
        height: 380px;
    }*/
    
    .product-img {
        height: 180px;
    }
    
    .product-info {
        padding: 15px;
    }
    
    .product-name {
        font-size: 1rem;
    }
    
    .current-price {
        font-size: 1.2rem;
    }
    
    .add-to-cart {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .product-card,
    .stat-card {
        border-width: 2px;
        border-color: #000000;
    }
    
    .filter-btn {
        border-width: 2px;
    }
    
    .action-btn {
        border-width: 2px;
    }
}

/* Filter Messages */
.no-data, .error-message {
    text-align: center;
    padding: 60px 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 20px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.08);
    border: 2px dashed #e9ecef;
    margin: 20px 0;
}

.no-data i, .error-message i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--accent);
}

.no-data p, .error-message p {
    font-size: 1.2rem;
    color: #6c757d;
    font-weight: 500;
    margin: 0;
}

.error-message i {
    color: var(--secondary);
}

/* Print Styles */
@media print {
    .product-actions,
    .add-to-cart,
    .filter-btn {
        display: block !important;
    }
    
    .product-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000000;
    }
    
    .top-bar,
    .main-slider {
        display: none !important;
    }
}

/* ===== PROFESSIONAL HEADER STYLES ===== */

/* Professional Header Container */
.professional-header {
    background: white;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    position: relative;
    z-index: 1000;
    margin-bottom: 2px;
}

/* Header Top Bar */
.header-top {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    padding: 8px 0;
    font-size: 0.85rem;
}

.header-top-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info {
    display: flex;
    gap: 20px;
}

.contact-info span {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.9;
}

.contact-info i {
    font-size: 0.9rem;
    color: var(--warning);
}

.top-links {
    display: flex;
    gap: 20px;
}

.top-links a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    opacity: 0.9;
}

.top-links a:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.top-links i {
    font-size: 0.9rem;
    color: var(--warning);
}

/* Header Main Section */
.header-main {
    padding: 20px 0;
    background: white;
}

.header-main-content {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 30px;
    align-items: center;
}

/* Logo Section */
.header-logo {
    flex-shrink: 0;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
}

/*.logo-link:hover {
    transform: scale(1.02);
}*/

.logo-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
   /* box-shadow: 0 8px 25px rgba(231, 76, 60, 0.3);*/
    backdrop-filter: blur(10px);
}

.logo-icon i {
    font-size: 2rem;
    background: linear-gradient(45deg, var(--secondary), var(--warning));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--secondary); /* fallback color */
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.brand-tagline {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
    margin-top: 2px;
    display: block;
}

/* وصف المتجر تحت اسم المتجر بخط أصغر */
.store-description-small {
    font-size: 0.85em;
}

/* Search Section */
.header-search {
    max-width: 600px;
    width: 100%;
}

.search-wrapper {
    display: flex;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.search-wrapper:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
    
}

.search-input-group {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 20px;
    background: #f8f9fa;
}

.search-icon {
    color: #6c757d;
    font-size: 1.1rem;
    margin-left: 10px;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 15px 0;
    font-size: 1rem;
    background: transparent;
    color: var(--dark);
    font-family: 'Cairo', sans-serif;
}

.search-input::placeholder {
    color: #6c757d;
    font-weight: 500;
}

.search-button {
    background: var(--primary)
    ;
    color: white;
    border: none;
    padding: 15px 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
}

.search-button:hover {
    background: var(--secondary);
    
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

.search-button i {
    font-size: 1rem;
}

/* User Actions */
.header-actions {
    flex-shrink: 0;
}

.action-group {
    display: flex;
    gap: 15px;
}

.action-item {
    position: relative;
}

.action-button {
    background:  var(--secondary) ;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    min-width: 100px;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.2);
}

.action-button:hover {
   /* transform: translateY(-3px);*/
    box-shadow: 0 8px 25px rgba(44, 62, 80, 0.3);
    background-color: var(--primary);
    background: var(--primary);
}

.action-button i {
    font-size: 1rem;
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #f0394b;
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.4);
      
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    padding: 10px 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid #e9ecef;
}

.action-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--dark);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: var(--accent);
    
}

.dropdown-item i {
    font-size: 1rem;
    color: var(--accent);
    width: 20px;
}

/* Navigation Menu */
.header-navigation {
    background: #f7f6ff;
    border-top: 1px solid #e9ecef;
    padding: 0;
}

.nav-content {
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 25px;
    color: var(--dark);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    border-bottom: 5px solid transparent;
    margin-bottom:-5px;
}


.nav-link.active {
    color: var(--accent);
    background: rgba(52, 152, 219, 0.05);
    border-bottom-color: var(--secondary);
}

.nav-link i {
    font-size: 1rem;
    color: var(--light);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .header-main-content {
        grid-template-columns: auto 1fr auto;
        gap: 20px;
    }
    
    .brand-name {
        font-size: 1.8rem;
    }
    
    .logo-icon {
        width: 50px;
        height: 50px;
    }
    
    .logo-icon i {
        font-size: 1.5rem;
    }
}

@media (max-width: 992px) {
    .header-main-content {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }
    
    .header-logo {
        justify-self: center;
    }
    
    .header-actions {
        justify-self: center;
    }
    
    .action-group {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .header-top-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .contact-info,
    .top-links {
        gap: 15px;
    }
    
    .brand-name {
        font-size: 1.5rem;
    }
    
    .logo-icon {
        width: 45px;
        height: 45px;
    }
    
    .logo-icon i {
        font-size: 1.3rem;
    }
    
    .search-wrapper {
       /* flex-direction: column;*/
        border-radius: 15px;
    }
    
    .search-input-group {
        padding: 0px 20px;
    }
    
    .search-button {
        width: 100%;
       /* border-radius: 0 0 15px 15px;*/
    }
    
    .action-button {
        min-width: 80px;
        padding: 10px 15px;
        font-size: 0.8rem;
    }
    
    .nav-menu {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-link {
        justify-content: center;
        padding: 12px 20px;
    }
}

@media (max-width: 576px) {
    .header-top {
        padding: 10px 0;
    }
    
    .header-main {
        padding: 15px 0;
    }
    
    .brand-name {
        font-size: 1.3rem;
    }
    
    .brand-tagline {
        font-size: 0.8rem;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
    }
    
    .logo-icon i {
        font-size: 1.1rem;
    }
    
    .action-button {
        min-width: 70px;
        padding: 8px 12px;
        font-size: 0.75rem;
    }
    
    .notification-badge {
        width: 18px;
        height: 18px;
        font-size: 0.7rem;
    }
}

/* ===== FOOTER LICENSE IMAGES STYLES ===== */

/* تحسين عرض صور الرخص في الفوتر */
.footer .license-image {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 150px !important;
    margin: 10px 0 !important;
    width: 100% !important;
}

.footer .license-image img {
    max-width: 200px !important;
    max-height: 150px !important;
    width: auto !important;
    height: auto !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    object-fit: contain !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    transition: all 0.3s ease !important;
    background-color: #f8f9fa !important;
    padding: 5px !important;
    display: block !important;
}

.footer .license-image img:hover {
    transform: scale(1.02) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
}

.footer .license-image svg {
    max-width: 200px !important;
    max-height: 150px !important;
    width: 200px !important;
    height: 150px !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    background: #f8f9fa !important;
    display: block !important;
}

/* CSS إضافي للتأكد من عمل الـ classes */
.footer-column .license-image {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 150px !important;
    margin: 10px 0 !important;
    width: 100% !important;
}

.footer-column .license-image img {
    max-width: 200px !important;
    max-height: 150px !important;
    width: auto !important;
    height: auto !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    object-fit: contain !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    transition: all 0.3s ease !important;
    background-color: #f8f9fa !important;
    padding: 5px !important;
    display: block !important;
}

.footer-column .license-image svg {
    max-width: 200px !important;
    max-height: 150px !important;
    width: 200px !important;
    height: 150px !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    background: #f8f9fa !important;
    display: block !important;
}

/* تحسين العرض في الأجهزة المحمولة */
@media (max-width: 768px) {
    .footer .license-image img {
        max-width: 150px !important;
        max-height: 120px !important;
    }
    
    .footer .license-image svg {
        width: 150px !important;
        height: 120px !important;
        max-width: 150px !important;
        max-height: 120px !important;
    }
}

/* تحسين العرض في الشاشات الصغيرة جداً */
@media (max-width: 480px) {
    .footer .license-image img {
        max-width: 120px !important;
        max-height: 100px !important;
    }
    
    .footer .license-image svg {
        width: 120px !important;
        height: 100px !important;
        max-width: 120px !important;
        max-height: 100px !important;
    }
}

/* ===== WEBVIEW OPTIMIZATIONS ===== */
/* Optimizations for mobile apps using WebView */
.webview-mode {
    /* Improve touch interactions */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    
    /* Improve scrolling performance */
    -webkit-overflow-scrolling: touch;
    
    /* Prevent zoom on input focus */
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.webview-mode input,
.webview-mode textarea,
.webview-mode select {
    /* Prevent zoom on focus in WebView */
    font-size: 16px !important;
}

.webview-mode .product-card {
    /* Optimize for touch */
    touch-action: manipulation;
}

.webview-mode .btn,
.webview-mode .action-btn {
    /* Improve touch targets */
    min-height: 44px;
    min-width: 44px;
}

.webview-mode .stat-card {
    /* Optimize animations for mobile */
    will-change: transform;
    transform: translateZ(0);
}

/* Reduce animations in WebView for better performance */
@media (prefers-reduced-motion: reduce) {
    .webview-mode * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== LOADING PROGRESS INDICATOR ===== */
.loading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(0,0,0,0.1);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loading-progress.show {
    opacity: 1;
}

.loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A, #CDDC39);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 0 2px 2px 0;
}

.loading-progress-text {
    position: fixed;
    top: 10px;
    right: 20px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loading-progress-text.show {
    opacity: 1;
}

/* ===== PRODUCT COMMENTS AND INTERACTIONS STYLES ===== */

/* Comments Section - Updated for Modal Display */

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

.comments-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.comments-title i {
    color: #3498db;
    font-size: 1.1rem;
}

.comments-count {
    background: #e9ecef;
    color: #6c757d;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Add Comment Form */
.add-comment-form {
    margin-bottom: 25px;
}

.comment-input-container {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.comment-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    min-height: 45px;
    max-height: 120px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.comment-input:focus {
    outline: none;
    border-color: #3498db;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.comment-submit-btn {
    background: #3498db;
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.comment-submit-btn:hover {
    background: #2980b9;
    transform: scale(1.05);
}

.comment-submit-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

/* Comments List */
.comments-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

.comments-list::-webkit-scrollbar {
    width: 6px;
}

.comments-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.comments-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.comments-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Comment Item */
.comment-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f1f3f4;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
    border-radius: 50%;
    color: #6c757d;
    font-size: 1.2rem;
}

.comment-content {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.comment-date {
    color: #6c757d;
    font-size: 0.85rem;
}

.comment-text {
    color: #495057;
    line-height: 1.5;
    margin-bottom: 10px;
    word-wrap: break-word;
}

.comment-actions {
    display: flex;
    gap: 10px;
}

.comment-action-btn {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.comment-action-btn:hover {
    background: #f8f9fa;
    color: #3498db;
}

/* Loading States */
.comments-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 30px;
    color: #6c757d;
}

.comments-loading i {
    font-size: 1.2rem;
}

.no-comments {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.no-comments i {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #bdc3c7;
}

.no-comments p {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.no-comments small {
    font-size: 0.9rem;
    color: #95a5a6;
}

/* Load More Comments */
.load-more-comments {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.load-more-comments .btn {
    padding: 8px 20px;
    font-size: 0.9rem;
    border-radius: 20px;
}

/* Mobile Responsive for Comments */
@media (max-width: 768px) {
    .product-comments-section {
        padding: 15px;
        margin-top: 15px;
    }
    
    .comment-input-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .comment-submit-btn {
        align-self: flex-end;
    }
    
    .comment-item {
        gap: 10px;
    }
    
    .comment-avatar {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .comment-actions {
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* Loading phases */
.loading-phase-critical { background: #4CAF50; }
.loading-phase-secondary { background: #FF9800; }
.loading-phase-optional { background: #2196F3; }

/* ===== Custom Confirmation Modal Styles ===== */

.custom-confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-confirm-modal.show {
    opacity: 1;
}

.custom-confirm-content {
    background: white;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    animation: confirmSlideIn 0.3s ease forwards;
}

@keyframes confirmSlideIn {
    from {
        transform: scale(0.9) translateY(-30px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.custom-confirm-header {
    background: linear-gradient(135deg, #ffc107, #ff8f00);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.custom-confirm-header h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.custom-confirm-body {
    padding: 1.5rem;
    text-align: center;
}

.custom-confirm-body p {
    margin: 0;
    color: #495057;
    font-size: 1rem;
    line-height: 1.5;
}

.custom-confirm-footer {
    padding: 1rem 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.custom-confirm-footer .btn {
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.custom-confirm-footer .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.custom-confirm-footer .btn-secondary:hover {
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.custom-confirm-footer .btn-danger:hover {
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Responsive Design for Confirmation Modal */
@media (max-width: 576px) {
    .custom-confirm-content {
        max-width: 95%;
        width: 95%;
    }
    
    .custom-confirm-header {
        padding: 0.75rem 1rem;
    }
    
    .custom-confirm-header h5 {
        font-size: 1rem;
    }
    
    .custom-confirm-body {
        padding: 1rem;
    }
    
    .custom-confirm-body p {
        font-size: 0.95rem;
    }
    
    .custom-confirm-footer {
        padding: 0.75rem 1rem;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .custom-confirm-footer .btn {
        width: 100%;
    justify-content: center;
    }
}

/* ===== Quick View Modal Styles (Similar to Favorites) ===== */

/* Quick View Modal Container */
.quick-view-modal .modal-content {
    border-radius: 12px;
    overflow: hidden;
}

.quick-view-modal .modal-header {
    background: var(--primary);
    border-bottom: none;
    padding: 1rem 1.5rem;
}

.quick-view-modal .modal-title {
    font-weight: 600;
    font-size: 1.25rem;
}

.quick-view-modal .modal-body {
    padding: 1.5rem;
}

.quick-view-modal .modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
}

/* Quick View Product Card */
.quick-view-product-card {
    transition: all 0.3s ease;
}

.quick-view-product-card:hover {
    transform: translateY(-2px);
}

.quick-view-product-card .card {
    border-radius: 8px;
    transition: box-shadow 0.3s ease;
}

.quick-view-product-card .card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

.quick-view-product-card .product-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
}

.quick-view-product-card .placeholder-image {
    width: 120px;
    height: 120px;
    background-color: #f8f9fa;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.quick-view-product-card .stock-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.quick-view-product-card .stock-badge.in-stock {
    background: rgba(40, 167, 69, 0.9);
    color: white;
}

.quick-view-product-card .stock-badge.out-of-stock {
    background: rgba(220, 53, 69, 0.9);
    color: white;
}

.quick-view-product-card .product-name {
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.3;
    font-size: 1.3rem;
}

.quick-view-product-card .product-price .price-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.quick-view-product-card .product-actions {
    min-width: 140px;
}

.quick-view-product-card .add-to-cart-btn {
    font-weight: 500;
    transition: all 0.2s ease;
}

.quick-view-product-card .add-to-cart-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.quick-view-product-card .favorite-btn {
    font-weight: 500;
    transition: all 0.2s ease;
}

.quick-view-product-card .favorite-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.quick-view-product-card .favorite-btn.active {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
}

.quick-view-product-card .favorite-btn.active:hover {
    background-color: #c82333;
    border-color: #c82333;
}

/* ===== Responsive Design for Quick View Modal ===== */

/* Tablet and smaller screens */
@media (max-width: 768px) {
    .quick-view-modal-content {
        max-width: 95%;
        width: 95%;
        max-height: 90vh;
    }
    
    .quick-view-modal-body {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
    }
    
    .quick-view-modal-header {
        padding: 1rem 1.5rem;
    }
    
    .header-title h3 {
        font-size: 1.2rem;
    }
    
    .product-image {
        height: 250px;
    }
    
    .product-title {
        font-size: 1.3rem;
    }
    
    .price-value {
        font-size: 1.5rem;
    }
    
    .quick-view-actions {
        flex-direction: row;
        gap: 0.75rem;
    }
    
    .quick-view-actions .btn {
        flex: 1;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* Mobile screens */
@media (max-width: 576px) {
    .quick-view-modal-content {
        max-width: 98%;
        width: 98%;
        max-height: 95vh;
        border-radius: 12px;
    }
    
    .quick-view-modal-header {
        padding: 1rem;
    }
    
    .header-title h3 {
        font-size: 1.1rem;
    }
    
    .close-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .quick-view-modal-body {
        padding: 1rem;
        gap: 1rem;
    }
    
    .product-image {
        height: 200px;
    }
    
    .product-title {
        font-size: 1.2rem;
    }
    
    .product-code {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .price-value {
        font-size: 1.3rem;
    }
    
    .product-description {
        padding: 1rem;
    }
    
    .product-description h6 {
        font-size: 0.95rem;
    }
    
    .product-description p {
        font-size: 0.9rem;
    }
    
    .quick-view-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .quick-view-actions .btn {
        width: 100%;
        padding: 0.75rem;
    }
    
    .stock-badge {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Very small screens */
@media (max-width: 400px) {
    .quick-view-modal-content {
        max-width: 100%;
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .quick-view-modal-body {
        padding: 0.75rem;
    }
    
    .product-image {
        height: 180px;
    }
    
    .product-title {
        font-size: 1.1rem;
    }
    
    .price-value {
        font-size: 1.2rem;
    }
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease-out;
}

.notification-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.notification-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.notification-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.notification-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.notification-content {
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-content i {
    font-size: 1.2rem;
}

.notification-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
    font-size: 1.1rem;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design for Quick View */
@media (max-width: 768px) {
    .quick-view-modal-body {
        flex-direction: column;
    }
    
    .quick-view-actions {
        justify-content: center;
    }
    
    .product-action-btn {
        flex: 1;
        justify-content: center;
    }
}

/* Products Carousel Styles */
.products-carousel {
    position: relative;
    margin: 20px 0;
    padding: 0 50px;
}

/*.products-container {
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 20px;
    padding: 10px 0;
    scrollbar-width: none;*/ /* Firefox */
    /*-ms-overflow-style: none;*/ /* IE and Edge */
/*}*/

.products-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(44, 85, 48, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-arrow:hover {
    background: rgba(44, 85, 48, 1);
    transform: translateY(-50%) scale(1.1);
}

.carousel-arrow-left {
    left: 0;
}

.carousel-arrow-right {
    right: 0;
}

.carousel-arrow i {
    font-size: 16px;
}

/* ===== MODAL DESIGN ENHANCEMENTS ===== */

/* Login and Register Modal Styling */
.modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, var(--light) 100%);
}

.modal-header {
    background:  var(--primary) ;
    color: white;
    border: none;
    padding: 25px 30px;
    position: relative;
}

.modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    pointer-events: none;
}

.modal-title {
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-family: var(--theme-font-family);
}

.modal-body {
    padding: 30px 0;
    background: white;
}

.modal-footer {
    border: none;
    padding: 20px 30px 30px;
    background: var(--light);
}

/* Form Styling for Modals */
.modal .form-label {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
    font-size: 0.95rem;
    font-family: var(--theme-font-family);
}

.modal .form-control {
    border: 2px solid var(--theme-border-color);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: var(--theme-font-size);
    transition: all 0.3s ease;
    background: var(--theme-background-light);
    font-family: var(--theme-font-family);
}

.modal .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--theme-primary-color-rgb, 44, 62, 80), 0.25);
    background: white;
    transform: translateY(-1px);
}

.modal .form-control.is-invalid {
    border-color: var(--secondary);
    background: rgba(var(--theme-secondary-color-rgb, 231, 76, 60), 0.05);
}

.modal .form-control.is-valid {
    border-color: var(--success);
    background: rgba(var(--success-rgb, 46, 204, 113), 0.05);
}

/* Input Group Styling for Modals */
.modal .input-group-text {
    background: linear-gradient(135deg, var(--theme-background-light) 0%, var(--theme-border-color) 100%);
    border: 2px solid var(--theme-border-color);
    border-radius: 12px 0 0 12px;
    color: var(--theme-text-muted);
    font-weight: 500;
}

.modal .input-group .form-control {
    border-radius: 12px 0 0 12px  !important;
    
}

.modal .input-group .form-control:focus {
    border-left: 2px solid var(--primary);
}

/* Password Toggle Button for Modals */
.modal .password-toggle {
    background: none;
    border: none;
    color: var(--theme-text-muted);
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.modal .password-toggle:hover {
    background: rgba(var(--theme-primary-color-rgb, 44, 62, 80), 0.1);
    color: var(--primary);
    transform: scale(1.1);
}

/* Checkbox Styling for Modals */
.modal .form-check-input {
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid var(--theme-border-color);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.modal .form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--theme-primary-color-rgb, 44, 62, 80), 0.25);
}

.modal .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(var(--theme-primary-color-rgb, 44, 62, 80), 0.25);
}

.modal .form-check-label {
    font-weight: 500;
    color: var(--theme-text-muted);
    margin-left: 8px;
    cursor: pointer;
    font-family: var(--theme-font-family);
}

/* Button Styling for Modals */
.modal .btn {
    border-radius: 12px;
    font-weight: 600;
    padding: 12px 24px;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.modal .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.modal .btn:hover::before {
    left: 100%;
}

.modal .btn-primary {
    background: var(--secondary);
    color: white;
    box-shadow: 0 4px 15px rgba(var(--theme-primary-color-rgb, 44, 62, 80), 0.3);
}

.modal .btn-primary:hover {
   
    box-shadow: 0 8px 25px rgba(var(--theme-primary-color-rgb, 44, 62, 80), 0.4);
}

.modal .btn-success {
    background: linear-gradient(135deg, var(--success) 0%, var(--primary) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(var(--success-rgb, 46, 204, 113), 0.3);
}

.modal .btn-success:hover {
    
    box-shadow: 0 8px 25px rgba(var(--success-rgb, 46, 204, 113), 0.4);
}

.modal .btn-danger {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--warning) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(var(--theme-secondary-color-rgb, 231, 76, 60), 0.3);
}

.modal .btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--theme-secondary-color-rgb, 231, 76, 60), 0.4);
}

/* Invalid Feedback Styling */
.invalid-feedback {
    display: none;
    background: linear-gradient(135deg, rgba(var(--theme-secondary-color-rgb, 231, 76, 60), 0.05) 0%, rgba(var(--theme-secondary-color-rgb, 231, 76, 60), 0.1) 100%);
    border: 1px solid rgba(var(--theme-secondary-color-rgb, 231, 76, 60), 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 10px;
    color: var(--secondary);
    font-weight: 500;
    font-size: 0.9rem;
    animation: slideInDown 0.3s ease;
    font-family: var(--theme-font-family);
}

.was-validated .form-control:invalid ~ .invalid-feedback,
.form-control.is-invalid ~ .invalid-feedback {
    display: block !important;
}

.invalid-feedback i {
    color: var(--secondary);
    margin-right: 8px;
}

/* Valid Feedback Styling */
.valid-feedback {
    display: block !important;
    background: linear-gradient(135deg, rgba(var(--success-rgb, 46, 204, 113), 0.05) 0%, rgba(var(--success-rgb, 46, 204, 113), 0.1) 100%);
    border: 1px solid rgba(var(--success-rgb, 46, 204, 113), 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 10px;
    color: var(--success);
    font-weight: 500;
    font-size: 0.9rem;
    animation: slideInDown 0.3s ease;
    font-family: var(--theme-font-family);
}

.valid-feedback i {
    color: var(--success);
    margin-right: 8px;
}

/* Animations */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Links */
.modal-body a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: var(--theme-font-family);
}

.modal-body a:hover {
    color: var(--secondary);
    text-decoration: underline;
    transform: translateX(2px);
}

/* Modal Close Button */
.modal-header .btn-close {
    
    border: 1px solid #dee2e6;
    font-size: 1.5rem;
    opacity: 1;
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
   
}

.modal-header .btn-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

/* Modal Backdrop */
.modal-backdrop {
    background-color: rgba(var(--dark-rgb, 26, 37, 47), 0.6);
    backdrop-filter: blur(5px);
}

/* Form Group Spacing */
.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

/* Enhanced Input Focus States */
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--primary-rgb), 0.25);
    background: white;
    transform: translateY(-1px);
}

/* Loading State for Buttons */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Enhanced Dropdown Styling */
.dropdown-menu {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(var(--dark-rgb, 26, 37, 47), 0.15);
    padding: 8px 0;
    margin-top: 8px;
    background: white;
}

.dropdown-item {
    padding: 12px 20px;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 2px 0px;
    color: var(--theme-text-muted);
    font-family: var(--theme-font-family);
    font-weight:bold;
}

    .dropdown-item:hover {
        background: #f7f6ff;
       
    }

.dropdown-item i {
    margin-right: 10px;
    width: 16px;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        margin: 10px;
        border-radius: 15px;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-footer {
        padding: 15px 20px 20px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .form-control {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
    
    .form-label {
        font-size: 0.9rem;
    }
}


/* تنسيقات النافذة المنبثقة */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    width: 100%;
    
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    padding: 0px;
    position: relative;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #777;
}

.close-btn:hover {
    color: #333;
}

.modal-header {
    text-align: center;
    margin-bottom: 0px;
}

.modal-header h2 {
    color: #333;
    margin-bottom: 10px;
}

.modal-header p {
    color: #666;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: #4a6cf7;
    outline: none;
}

.submit-btn {
    background-color: #4a6cf7;
    color: white;
    border: none;
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.submit-btn:hover {
    background-color: #3a5ce5;
}

.back-to-login {
    text-align: center;
    margin-top: 15px;
}

.back-to-login a {
    color: #4a6cf7;
    text-decoration: none;
    font-size: 14px;
}

.back-to-login a:hover {
    text-decoration: underline;
}

/* تنسيقات للرسائل */
.success-message {
    background-color: #e7f7ef;
    color: #2d8c5a;
    padding: 12px;
    border-radius: 6px;
    margin-top: 15px;
    display: none;
}

.error-message {
    background-color: #fde8e8;
    color: #c53030;
    padding: 12px;
    border-radius: 6px;
    margin-top: 15px;
    display: none;
}

/* ===== Favorites Modal Styles ===== */

/* Favorites Modal Container */
.favorites-modal .modal-content {
    border-radius: 12px;
    overflow: hidden;
}

.favorites-modal .modal-header {
    background: var(--primary);
    border-bottom: none;
    padding: 1rem 1.5rem;
}

.favorites-modal .modal-title {
    font-weight: 600;
    font-size: 1.25rem;
}

.favorites-modal .modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.favorites-modal .modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
}

/* Empty Favorites State */
.empty-favorites {
    padding: 3rem 1rem;
}

.empty-favorites .empty-icon {
    animation: heartbeat 2s ease-in-out infinite;
}

.empty-favorites h5 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-favorites p {
    font-size: 0.95rem;
    line-height: 1.5;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Favorite Product Cards - Improved Design */
.favorite-product-card {
    transition: all 0.3s ease;
}

.favorite-product-card:hover {
    transform: translateY(-2px);
}

.favorite-product-card .card {
    border-radius: 12px;
    transition: box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
    background:var(--light);
}

.favorite-product-card .card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    border-color: #007bff;
}

.favorite-product-card .product-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.favorite-product-card .placeholder-image {
    width: 100px;
    height: 100px;
    background-color: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    border: 2px dashed #dee2e6;
}

.favorite-product-card .product-name {
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.3;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.favorite-product-card .product-code {
    background-color: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border-left: 3px solid #007bff;
}

.favorite-product-card .product-code small {
    font-size: 0.8rem;
    color: #6c757d;
}

.favorite-product-card .product-price .price-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #dc3545;
}

.favorite-product-card .favorite-product-actions {
   
    display: flex !important;
    flex-direction: column;
    gap: 0.5rem;
    visibility: visible !important;
    opacity: 1 !important;
}

.favorite-product-card .favorite-product-actions .btn {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100%;
}

.favorite-product-card .add-to-cart-btn,
.favorite-product-card .add-to-cart-favorite-btn {
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    background-color: #007bff !important;
    border-color: #007bff !important;
    color: white !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 45px !important;
    height: 45px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.favorite-product-card .add-to-cart-btn:hover,
.favorite-product-card .add-to-cart-favorite-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
    background-color: #0056b3 !important;
}

.favorite-product-card .add-to-cart-btn i,
.favorite-product-card .add-to-cart-favorite-btn i {
    margin: 0 !important;
    font-size: 1.1rem;
}

.favorite-product-card .add-to-cart-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.favorite-product-card .remove-favorite-btn {
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    border-color: #dc3545 !important;
    color: #dc3545 !important;
    background-color: transparent !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 45px !important;
    height: 45px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2);
}

.favorite-product-card .remove-favorite-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    background-color: #dc3545 !important;
    color: white !important;
    border-color: #dc3545 !important;
}

.favorite-product-card .remove-favorite-btn i {
    margin: 0 !important;
    font-size: 1.1rem;
}

.favorite-product-card .remove-favorite-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
}

.favorite-product-card .remove-favorite-btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Force visibility for favorites modal buttons */
.favorites-modal .favorite-product-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.favorites-modal .favorite-product-actions .btn {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0.5rem 1rem !important;
}

.favorites-modal .add-to-cart-btn,
.favorites-modal .add-to-cart-favorite-btn {
    background-color: #007bff !important;
    border-color: #007bff !important;
    color: white !important;
    width: 45px !important;
    height: 45px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3) !important;
}

.favorites-modal .remove-favorite-btn {
    background-color: transparent !important;
    border-color: #dc3545 !important;
    color: #dc3545 !important;
    width: 45px !important;
    height: 45px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2) !important;
}

/* Additional CSS to ensure buttons are visible */
.favorites-modal .col-auto {
    display: block !important;
    visibility: visible !important;
}

.favorites-modal .col-auto .favorite-product-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.favorites-modal .col-auto .favorite-product-actions .btn {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 45px !important;
    height: 45px !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 1.1rem !important;
    border-radius: 50% !important;
    align-items: center !important;
    justify-content: center !important;
}

.favorites-modal .col-auto .favorite-product-actions .btn i {
    margin: 0 !important;
    font-size: 1.1rem !important;
}

/* Responsive Design for Favorites Modal */
@media (max-width: 768px) {
    .favorites-modal .modal-dialog {
        margin: 0.5rem;
    }
    
    .favorites-modal .modal-body {
        padding: 1rem;
        max-height: 70vh;
    }
    
    .favorite-product-card .row {
        flex-direction: row;
        text-align: center;
    }
    
    .favorite-product-card .col-auto {
        margin-bottom: 1rem;
    }
    
    .favorite-product-card .product-actions,
    .favorite-product-card .favorite-product-actions {
        min-width: auto;
        flex-direction: row;
        justify-content: center;
        gap: 0.75rem;
    }
    
    .favorite-product-card .product-actions .btn,
    .favorite-product-card .favorite-product-actions .btn {
        flex: none;
        min-width: 0;
        width: 40px !important;
        height: 40px !important;
    }
}

@media (max-width: 576px) {
    .favorites-modal .modal-header {
        padding: 0.75rem 1rem;
    }
    
    .favorites-modal .modal-title {
        font-size: 1.1rem;
    }
    
    .favorites-modal .modal-footer {
        padding: 0.75rem 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .favorites-modal .modal-footer .btn {
        width: 100%;
    }
    
    .favorite-product-card .product-actions,
    .favorite-product-card .favorite-product-actions {
        flex-direction: row;
        gap: 1rem;
        justify-content: center;
    }
    
    .favorite-product-card .product-actions .btn,
    .favorite-product-card .favorite-product-actions .btn {
        width: 40px !important;
        height: 40px !important;
        flex: none;
    }
}

/* ===== UNIVERSAL LOADING INDICATORS SYSTEM ===== */

/* Universal Loading States - Works with any element */
.loading {
    position: relative;
    pointer-events: none !important;
    opacity: 0.7;
    cursor: not-allowed !important;
    transition: all 0.3s ease;
}

/* Universal Success States */
.success {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    color: white !important;
    border-color: #28a745 !important;
    animation: successPulse 0.6s ease-out;
    pointer-events: none !important;
}

/* Universal Error States */
.error {
    background: linear-gradient(135deg, #dc3545, #e83e8c) !important;
    color: white !important;
    border-color: #dc3545 !important;
    animation: errorShake 0.6s ease-out;
    pointer-events: none !important;
}

/* Success Animation */
@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Error Animation */
@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Universal Disabled State */
.loading:disabled,
.success:disabled,
.error:disabled {
    opacity: 0.6;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* Specific Button Types - Enhanced */
.add-to-cart.loading,
.favorite-btn.loading,
.add-to-cart-btn.loading,
.comment-submit-btn.loading,
.reply-submit-btn.loading,
.load-more-comments.loading,
.pagination-btn.loading,
.nav-filter-link.loading {
    position: relative;
    overflow: hidden;
}

/* Favorite Button Success State */
.favorite-btn.success {
    background: linear-gradient(135deg, #dc3545, #e83e8c) !important;
    border-color: #dc3545 !important;
}

/* Comment Button Success State */
.comment-submit-btn.success,
.reply-submit-btn.success {
    background: linear-gradient(135deg, #17a2b8, #138496) !important;
    border-color: #17a2b8 !important;
}

/* Navigation Button Success State */
.nav-filter-link.success,
.pagination-btn.success {
    background: linear-gradient(135deg, #6f42c1, #5a32a3) !important;
    border-color: #6f42c1 !important;
}

/* Cart Operations Success States */
.remove-item.success,
.quantity-up.success,
.quantity-down.success {
    background: linear-gradient(135deg, #fd7e14, #e55a00) !important;
    border-color: #fd7e14 !important;
}

.proceedToCheckout.success {
    background: linear-gradient(135deg, #198754, #146c43) !important;
    border-color: #198754 !important;
}

.clearCart.success {
    background: linear-gradient(135deg, #dc3545, #b02a37) !important;
    border-color: #dc3545 !important;
}

/* Quick View Success State */
.quick-view-btn.success {
    background: linear-gradient(135deg, #0d6efd, #0b5ed7) !important;
    border-color: #0d6efd !important;
}

/* Comments Success State */
.comments-btn.success {
    background: linear-gradient(135deg, #6c757d, #5c636a) !important;
    border-color: #6c757d !important;
}

/* Mobile Optimizations for Universal Loading States */
@media (max-width: 768px) {
    .loading {
        opacity: 0.8;
    }
    
    .success,
    .error {
        font-size: 0.9rem;
        padding: 8px 12px;
    }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    .success {
        animation: none;
    }
    
    .error {
        animation: none;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .loading {
        border: 2px solid currentColor;
    }
    
    .success,
    .error {
        border-width: 2px;
    }
}

/* Loading Text Animation */
.loading-text {
    animation: loadingTextPulse 1.5s ease-in-out infinite;
}

@keyframes loadingTextPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Success Checkmark Animation */
.success-checkmark {
    animation: checkmarkBounce 0.6s ease-out;
}

@keyframes checkmarkBounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Button Hover Effects During Loading */
.add-to-cart.loading:hover,
.favorite-btn.loading:hover,
.add-to-cart-btn.loading:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Enhanced Visual Feedback for Product Cards */
.product-card.processing {
    position: relative;
    pointer-events: none;
}

.product-card.processing::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card.processing::before {
    content: 'جاري المعالجة...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 11;
    animation: loadingTextPulse 1.5s ease-in-out infinite;
}

/* Notification Enhancements */
.notification {
    animation: slideInRight 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.notification-success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.95), rgba(32, 201, 151, 0.95));
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: white;
}

.notification-error {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.95), rgba(232, 62, 140, 0.95));
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: white;
}

.notification-info {
    background: linear-gradient(135deg, rgba(13, 202, 240, 0.95), rgba(111, 66, 193, 0.95));
    border: 1px solid rgba(13, 202, 240, 0.3);
    color: white;
}

.notification-warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.95), rgba(253, 126, 20, 0.95));
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: white;
}

/* Enhanced Button Transitions */
.add-to-cart,
.favorite-btn,
.add-to-cart-btn {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.add-to-cart::after,
.favorite-btn::after,
.add-to-cart-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.add-to-cart:active::after,
.favorite-btn:active::after,
.add-to-cart-btn:active::after {
    width: 300px;
    height: 300px;
}

/* Mobile Optimizations for Loading States */
@media (max-width: 768px) {
    .add-to-cart.loading::before,
    .favorite-btn.loading::before,
    .add-to-cart-btn.loading::before {
        width: 16px;
        height: 16px;
        border-width: 1.5px;
    }
    
    .product-card.processing::before {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .notification {
        max-width: 90%;
        right: 5%;
    }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    .add-to-cart.loading::before,
    .favorite-btn.loading::before,
    .add-to-cart-btn.loading::before {
        animation: none;
    }
    
    .success-checkmark {
        animation: none;
    }
    
    .loading-text {
        animation: none;
    }
    
    .product-card.processing::before {
        animation: none;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .add-to-cart.loading,
    .favorite-btn.loading,
    .add-to-cart-btn.loading {
        border: 2px solid currentColor;
    }
    
    .notification {
        border-width: 2px;
    }
}

/* Comment interaction buttons */
.like-comment-btn.liked {
    background-color: #0d6efd;
    color: white;
    border-color: #0d6efd;
}
 

.like-count {
    display: inline-block;
    min-width: 20px;
    text-align: center;
}

.reply-comment-btn:hover {
    transform: translateY(-1px);
}

/* Reply visual indicator */
.add-comment-form .card.replying {
    border-left: 4px solid #0d6efd;
    background-color: #f8f9fa;
}

.cancel-reply-btn {
    transition: all 0.2s ease;
}

.cancel-reply-btn:hover {
    transform: translateY(-1px);
}

/* ===== SEARCH ACTIVE BANNER ===== */
.search-active-banner {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-active-banner i {
    font-size: 18px;
}

.search-active-banner strong {
    color: #ffd700;
}

.search-active-banner button {
    background: white;
    color: #667eea;
    border: none;
    padding: 6px 15px;
    border-radius: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.search-active-banner button:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    background: #f8f9fa;
}

.search-active-banner button i {
    font-size: 14px;
}

/* تحسين شكل input البحث */
#searchInput:focus {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.25);
    border-color: #667eea;
}