/* ========================================
   FOODPLAAS MAIN STYLES
   ======================================== */

:root {
    --primary-color: #1A5D1A;
    --primary-dark: #0F3D0F;
    --primary-light: #2A7D2A;
    --accent-color: #C1F24D;
    --accent-dark: #A0D030;
    --accent-light: #D8FF7A;
    --background-color: #F8F9FA;
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #E0E0E0;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
}

body {
    font-family: 'Poppins', 'Cairo', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* ========================================
   CATEGORY CARD PREMIUM COLORS - LARGER ICONS
   ======================================== */

.categories-section {
    background: #ffffff;
    padding: 60px 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

/* Base Category Card */
.category-card {
    background: white;
    border-radius: 24px !important;
    padding: 35px 25px !important;
    text-align: center;
    border: none !important;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #1A5D1A, #C1F24D, #1A5D1A);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.category-card:hover::before {
    transform: translateX(100%);
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 40px -15px rgba(26, 93, 26, 0.3);
}

/* Icon Container - BIGGER */
.category-card .category-icon {
    width: 110px !important;
    height: 110px !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    background: white !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.category-card:hover .category-icon {
    transform: scale(1.08);
    box-shadow: 0 15px 35px rgba(26, 93, 26, 0.2);
}

.category-card .category-icon i {
    font-size: 3.5rem !important;
}

.category-card .category-icon img {
    width: 65px !important;
    height: 65px !important;
    object-fit: contain;
}

/* Category Card Background Colors (Cycle-based) */
.cat-style-1 { background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%) !important; }
.cat-style-2 { background: linear-gradient(135deg, #FCE4EC 0%, #F8BBD0 100%) !important; }
.cat-style-3 { background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%) !important; }
.cat-style-4 { background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%) !important; }
.cat-style-5 { background: linear-gradient(135deg, #F3E5F5 0%, #E1BEE7 100%) !important; }
.cat-style-6 { background: linear-gradient(135deg, #E0F2F1 0%, #B2DFDB 100%) !important; }
.cat-style-7 { background: linear-gradient(135deg, #EFEBE9 0%, #D7CCC8 100%) !important; }
.cat-style-8 { background: linear-gradient(135deg, #FFF8E1 0%, #FFECB3 100%) !important; }

/* Icon Colors */
.cat-style-1 .category-icon { background: #2E7D32 !important; }
.cat-style-1 .category-icon i { color: white; }

.cat-style-2 .category-icon { background: #C2185B !important; }
.cat-style-2 .category-icon i { color: white; }

.cat-style-3 .category-icon { background: #EF6C00 !important; }
.cat-style-3 .category-icon i { color: white; }

.cat-style-4 .category-icon { background: #1565C0 !important; }
.cat-style-4 .category-icon i { color: white; }

.cat-style-5 .category-icon { background: #7B1FA2 !important; }
.cat-style-5 .category-icon i { color: white; }

.cat-style-6 .category-icon { background: #00695C !important; }
.cat-style-6 .category-icon i { color: white; }

.cat-style-7 .category-icon { background: #795548 !important; }
.cat-style-7 .category-icon i { color: white; }

.cat-style-8 .category-icon { background: #F57C00 !important; }
.cat-style-8 .category-icon i { color: white; }

/* Category Text Styles */
.category-card .category-name {
    font-size: 1.35rem;
    font-weight: 800;
    color: #1A5D1A;
    margin-bottom: 8px;
}

.category-card .category-name-ar {
    font-size: 0.95rem;
    color: #6c757d;
    margin-bottom: 15px;
    font-family: 'Cairo', sans-serif;
}

.category-card .category-stats {
    margin-bottom: 20px;
}

.category-card .stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    background: rgba(255,255,255,0.85);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1A5D1A;
    backdrop-filter: blur(4px);
}

.category-card .explore-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 28px;
    background: rgba(255,255,255,0.95);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1A5D1A;
    transition: all 0.3s ease;
}

.category-card:hover .explore-btn {
    background: #1A5D1A;
    color: white;
    transform: translateX(8px);
}

.category-card .explore-btn i {
    transition: transform 0.3s ease;
}

.category-card:hover .explore-btn i {
    transform: translateX(8px);
}

/* View All Button */
.btn-view-all {
    display: inline-flex;
    align-items: center;
    padding: 14px 38px;
    background: transparent;
    border: 2px solid #1A5D1A;
    border-radius: 60px;
    font-weight: 700;
    font-size: 1rem;
    color: #1A5D1A;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-view-all:hover {
    background: #1A5D1A;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(26, 93, 26, 0.3);
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-accent {
    background-color: var(--accent-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-accent {
    color: var(--accent-color) !important;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-accent {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--primary-color);
}

.btn-accent:hover {
    background-color: var(--accent-dark);
    border-color: var(--accent-dark);
    color: var(--primary-color);
}

/* ========================================
   CARD STYLES
   ======================================== */

.card {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 20px;
}

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

.card-header {
    background-color: var(--primary-color);
    color: white;
    border-bottom: none;
    border-radius: 10px 10px 0 0 !important;
    padding: 15px 20px;
}

/* ========================================
   FORM STYLES
   ======================================== */

.form-control:focus,
.form-select:focus,
.btn:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.25rem rgba(193, 242, 77, 0.25);
}

/* ========================================
   NAVIGATION
   ======================================== */

.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-link {
    font-weight: 500;
}

.nav-link:hover {
    color: var(--accent-color) !important;
}

/* ========================================
   PRODUCT CARDS
   ======================================== */

.product-card {
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
    border-radius: 16px;
}

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

.product-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.product-old-price {
    text-decoration: line-through;
    color: var(--text-light);
    font-size: 0.9rem;
}

.product-discount {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--danger-color);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

.wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 2;
}

.wishlist-btn:hover {
    transform: scale(1.1);
    background: #ff4757;
    color: white;
}

.add-to-cart-btn {
    transition: all 0.3s;
}

.add-to-cart-btn:hover {
    transform: scale(1.02);
    background-color: #145214 !important;
}

/* ========================================
   DASHBOARD CARDS
   ======================================== */

.dashboard-card {
    border-left: 4px solid var(--primary-color);
}

.dashboard-card .card-body {
    padding: 20px;
}

.dashboard-card h6 {
    color: var(--text-light);
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.dashboard-card h3 {
    color: var(--primary-color);
    margin-bottom: 0;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }

    .category-card {
        padding: 25px 15px !important;
    }

    .category-card .category-icon {
        width: 80px !important;
        height: 80px !important;
    }

    .category-card .category-icon i {
        font-size: 2.5rem !important;
    }

    .category-card .category-icon img {
        width: 48px !important;
        height: 48px !important;
    }

    .category-card .category-name {
        font-size: 1.1rem;
    }

    .category-card .explore-btn {
        padding: 8px 20px;
        font-size: 0.8rem;
    }

    .product-image {
        height: 160px;
    }
}

@media (max-width: 576px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .category-card {
        padding: 20px 12px !important;
    }

    .category-card .category-icon {
        width: 65px !important;
        height: 65px !important;
    }

    .category-card .category-icon i {
        font-size: 2rem !important;
    }

    .category-card .category-icon img {
        width: 38px !important;
        height: 38px !important;
    }

    .category-card .category-name {
        font-size: 0.95rem;
    }

    .category-card .explore-btn {
        padding: 5px 12px;
        font-size: 0.7rem;
    }

    .category-card .stat-badge {
        font-size: 0.7rem;
        padding: 4px 10px;
    }
}

/* ========================================
   RTL SUPPORT
   ======================================== */

[dir="rtl"] .category-card:hover .explore-btn i {
    transform: translateX(-8px);
}

[dir="rtl"] .me-2 {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}

[dir="rtl"] .ms-2 {
    margin-left: 0 !important;
    margin-right: 0.5rem !important;
}

[dir="rtl"] .wishlist-btn {
    right: auto;
    left: 10px;
}

[dir="rtl"] .product-discount {
    left: auto;
    right: 10px;
}

/* ========================================
   NOTIFICATION & ANIMATIONS
   ======================================== */

.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.notification-container .alert {
    min-width: 300px;
    margin-bottom: 10px;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Status Badge Animation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}

.badge.bg-warning {
    animation: pulse 2s infinite;
}

/* ========================================
   ORDER CONFIRMATION PAGE
   ======================================== */

.shipping-address-section,
.payment-method-section,
.vendor-summary,
.order-details-card {
    background-color: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 12px !important;
    padding: 1.5rem !important;
    margin-bottom: 1.5rem !important;
}

.shipping-address-section h5,
.payment-method-section h5,
.vendor-summary h5,
.order-details-card h5 {
    color: #1A5D1A !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    margin-bottom: 1rem !important;
    display: flex !important;
    align-items: center !important;
}

.order-summary-table thead th {
    background: #1A5D1A !important;
    color: white !important;
    padding: 12px 16px !important;
    font-weight: 600 !important;
}

.order-summary-table tbody td {
    padding: 12px 16px !important;
    color: #212529 !important;
    border-bottom: 1px solid #e9ecef !important;
}

/* Scroll Behavior */
html {
    scroll-behavior: smooth;
}
