﻿/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --background: #f8fafc;
    --card-background: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Updated Body for Sticky Footer */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
    /* Sticky Footer Logic */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Main takes available space to push footer down */
main {
    flex: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    background: var(--card-background);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between; /* يوزع العناصر: اللوجو يمين، البحث وسط، الأيقونات يسار */
    gap: 1rem;
    margin-bottom: 1rem;
    width: 100%; /* ضمان أخذ العرض الكامل */
}

.logo a {
    text-decoration: none;
    color: var(--primary-color);
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.logo-tagline {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: block;
    margin-top: -5px;
}

/* تكبير شريط البحث */
.search-bar {
    flex-grow: 1; /* يجعل الشريط يتمدد ليملأ المساحة الفارغة */
    max-width: 800px; /* زيادة العرض الأقصى من 500 إلى 800 بكسل */
    margin: 0 2rem; /* إضافة هوامش لابعاده عن اللوجو والأيقونات */
}

    .search-bar form {
        display: flex;
        border: 2px solid var(--border-color);
        border-radius: 8px;
        overflow: hidden;
        transition: border-color 0.3s;
    }

        .search-bar form:focus-within {
            border-color: var(--primary-color);
        }

    .search-bar input {
        flex: 1;
        padding: 0.75rem 1rem;
        border: none;
        outline: none;
        font-size: 1rem;
    }

    .search-bar button {
        padding: 0.75rem 1.5rem;
        background: var(--primary-color);
        color: white;
        border: none;
        cursor: pointer;
        transition: background 0.3s;
    }

        .search-bar button:hover {
            background: var(--primary-hover);
        }

.nav-icons {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    justify-content: flex-end; /* التأكيد على المحاذاة للنهاية */
    min-width: fit-content; /* منع الانكماش */
}

.nav-icon {
    position: relative;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.3s;
}

    .nav-icon:hover {
        color: var(--primary-color);
    }

.points-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--success-color);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Sections */
.products-section, .categories-section, .category-page, .cart-page, .account-page {
    padding: 3rem 0;
}

.section-header, .page-header {
    text-align: center;
    margin-bottom: 2rem;
}

    .section-header h2, .page-header h1 {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    .section-header p, .page-header p {
        color: var(--text-secondary);
        font-size: 1.1rem;
    }

/* --- Hero Section --- */
/* في ملف site.css */

.hero {
    /* حذفنا التدرج اللوني البنفسجي ووضعنا الصورة بدلاً منه */
    background: url('../images/HomePageBackGround.png');
    /* خصائص لضمان ظهور الصورة بشكل جميل */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* باقي الخصائص كما هي */
    padding: 4rem 1.5rem 6rem;
    border-radius: 0 0 3rem 3rem;
    margin-bottom: 2rem;
    color: #FCFCFC; /* لضمان أن النص فوق الصورة أبيض */
}
.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

    .btn-primary:hover {
        background: var(--primary-hover);
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
    }

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

    .btn-secondary:hover {
        background: var(--primary-color);
        color: white;
    }

/* ========================================================= */
/* SHARED HORIZONTAL SCROLL STYLES (ALL SECTIONS)            */
/* ========================================================= */

.products-grid, .categories-grid {
    display: flex; /* Align items side-by-side */
    overflow-x: auto; /* Enable horizontal scrolling */
    gap: 1.5rem; /* Space between items */
    padding: 10px 5px 25px 5px; /* Padding for shadows */
    margin-top: 2rem;
    /* Smooth scrolling physics */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    /* Scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

    /* Chrome/Safari Scrollbar Styling */
    .products-grid::-webkit-scrollbar, .categories-grid::-webkit-scrollbar {
        height: 6px;
    }

    .products-grid::-webkit-scrollbar-track, .categories-grid::-webkit-scrollbar-track {
        background: transparent;
    }

    .products-grid::-webkit-scrollbar-thumb, .categories-grid::-webkit-scrollbar-thumb {
        background-color: #cbd5e1;
        border-radius: 20px;
    }

/* ========================================================= */
/* PRODUCT CARD STYLES (Horizontal Slices)                   */
/* ========================================================= */
.product-card {
    flex: 0 0 auto;
    width: 280px; /* Fixed width for horizontal scroll */
    scroll-snap-align: start;
    background: var(--card-background);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
}

    .product-card:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-lg);
    }

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 10;
    color: white;
}

.sale-badge {
    background: var(--danger-color);
}

.featured-badge {
    background: var(--warning-color);
}

.bestseller-badge {
    background: var(--success-color);
}

.product-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .product-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.product-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

    .product-info h3 {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
        color: var(--text-primary);
    }

.product-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-pricing {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    margin-top: auto;
}

.price-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-current {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.price-original {
    font-size: 1rem;
    color: var(--text-secondary);
    text-decoration: line-through;
}

.price-points {
    font-size: 0.9rem;
    color: var(--success-color);
    font-weight: 600;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    flex-direction: column;
}

    .product-actions .btn {
        width: 100%;
        text-align: center;
    }


/* ========================================================= */
/* CATEGORY CARD STYLES (Horizontal Slices)                  */
/* ========================================================= */
.category-card {
    flex: 0 0 auto;
    width: 220px;
    scroll-snap-align: start;
    background: var(--card-background);
    border-radius: 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    padding: 1rem;
    border: 1px solid transparent;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

    .category-card .image-wrapper {
        width: 100%;
        height: 160px;
        margin-bottom: 1rem;
        overflow: hidden;
        border-radius: 15px;
        background-color: #f8fafc;
    }

    .category-card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }

    .category-card h3 {
        font-size: 1.1rem;
        font-weight: 700;
        margin-bottom: 0.5rem;
        color: var(--text-primary);
    }

    .category-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 20px -5px rgba(0, 0, 0, 0.1);
        border-color: var(--primary-color);
    }

        .category-card:hover img {
            transform: scale(1.1);
        }

        .category-card:hover h3 {
            color: var(--primary-color);
        }

/* Mobile Adjustments */
@media (max-width: 768px) {
    .category-card {
        width: 180px;
    }

        .category-card .image-wrapper {
            height: 130px;
        }

    .product-card {
        width: 240px;
    }
}

/* ========================================================= */
/* CART & ACCOUNT PAGES                                      */
/* ========================================================= */
.cart-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item {
    background: var(--card-background);
    border-radius: 12px;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 100px 1fr auto auto auto;
    gap: 1.5rem;
    align-items: center;
    box-shadow: var(--shadow);
}

.cart-item-image img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-details h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.cart-item-details p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.payment-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.points-badge {
    background: #dcfce7;
    color: var(--success-color);
}

.cash-badge {
    background: #dbeafe;
    color: var(--primary-color);
}

.quantity-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
}

    .qty-btn:hover {
        background: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
    }

.quantity-form input[type="number"] {
    width: 50px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem;
}

.cart-item-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.btn-remove {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--danger-color);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s;
}

    .btn-remove:hover {
        background: #dc2626;
    }

.cart-summary {
    background: var(--card-background);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 100px;
}

    .cart-summary h2 {
        margin-bottom: 1.5rem;
    }

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 1rem;
}

    .summary-row.points-earn {
        color: var(--success-color);
        font-weight: 600;
    }

    .summary-row.total-row {
        font-size: 1.25rem;
        font-weight: 700;
    }

.points-available {
    color: var(--success-color);
}

.cart-summary hr {
    border: none;
    border-top: 2px solid var(--border-color);
    margin: 1.5rem 0;
}

.btn-checkout {
    width: 100%;
    margin-bottom: 1rem;
}

.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
}

    .empty-cart svg {
        color: var(--text-secondary);
        margin-bottom: 1rem;
    }

    .empty-cart h2 {
        margin-bottom: 0.5rem;
    }

    .empty-cart p {
        color: var(--text-secondary);
        margin-bottom: 2rem;
    }

/* Account Page */
.account-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.account-card {
    background: var(--card-background);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

    .card-header h2 {
        font-size: 1.5rem;
    }

.points-icon {
    font-size: 2rem;
}

.points-display {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-color), #7c3aed);
    border-radius: 12px;
    color: white;
    margin-bottom: 1.5rem;
}

.points-amount {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.points-label {
    font-size: 1rem;
    opacity: 0.9;
}

.points-info ul {
    list-style: none;
    padding-left: 0;
}

.points-info li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

    .points-info li:before {
        content: "✓";
        position: absolute;
        left: 0;
        color: var(--success-color);
        font-weight: 700;
    }

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    background: var(--background);
    border-radius: 8px;
}

.info-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.order-history {
    margin-top: 3rem;
}

    .order-history h2 {
        margin-bottom: 1.5rem;
    }

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-card {
    background: var(--card-background);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.order-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.order-total {
    text-align: right;
}

    .order-total .amount {
        display: block;
        font-size: 1.25rem;
        font-weight: 700;
        color: var(--primary-color);
    }

    .order-total .points {
        display: block;
        font-size: 0.9rem;
        color: var(--success-color);
        font-weight: 600;
    }

.order-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.order-item {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
}

.order-points-earned {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

    .order-points-earned .points-badge {
        background: #dcfce7;
        color: var(--success-color);
        padding: 0.5rem 1rem;
        border-radius: 6px;
        font-weight: 600;
    }

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-error {
    background: #fee2e2;
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid var(--warning-color);
}

/* Footer (Restored and Fixed) */
footer {
    background: var(--text-primary);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: auto; /* Push to bottom if flex fails */
    width: 100%;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3, .footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section p {
    opacity: 0.8;
    line-height: 1.8;
    color: #cbd5e1;
}

.footer-section a {
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: opacity 0.3s;
}

    .footer-section a:hover {
        opacity: 0.8;
    }

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s;
}

    .social-link:hover {
        background: rgba(255, 255, 255, 0.2);
    }

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Responsive Cart adjustments */
@media (max-width: 768px) {
    .cart-content {
        grid-template-columns: 1fr;
    }

    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: 1rem;
    }

    .cart-item-quantity,
    .cart-item-price,
    .cart-item-remove {
        grid-column: 2;
    }

    .account-content {
        grid-template-columns: 1fr;
    }
}
/* Notification Styles */
.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    animation: slideIn 0.3s ease;
    max-width: 400px;
    font-weight: 500;
}

.notification-success {
    background: #10b981;
    color: white;
}

.notification-error {
    background: #ef4444;
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Logout Button Styling */
.logout-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--text-primary);
    transition: color 0.3s;
}

    .logout-btn:hover {
        color: var(--danger-color);
    }

/* ============================================================ */
/* --- NEW ADDITIONS FOR MOBILE & COMFORT ---                   */
/* ============================================================ */

/* Global Overrides for Comfort */
:root {
    --primary-color: #4f46e5; /* Modern Indigo */
    --primary-hover: #4338ca;
    --radius: 16px; /* Softer, modern corners */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Header Adjustments for Mobile */
@media (max-width: 768px) {
    .navbar-content {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        gap: 0.75rem;
    }

    .logo {
        grid-column: 1 / 2;
    }

    .nav-icons {
        grid-column: 2 / 3;
        justify-content: flex-end;
    }

    .search-bar {
        grid-column: 1 / -1;
        grid-row: 2;
        max-width: 100%;
        margin-top: 0.25rem;
    }

    .logo img {
        height: 40px !important;
    }
}

/* Hero Comfort Update */
.hero {
    /* التعديل هنا: استخدام الصورة بدلاً من التدرج البنفسجي */
    background: url('../images/HomePageBackGround.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* باقي الخصائص كما هي */
    padding: 4rem 1.5rem 6rem;
    border-radius: 0 0 3rem 3rem;
    margin-bottom: 2rem;
    position: relative; /* مهم لضبط العناصر */
}

.hero-content h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
}

/* Pill Buttons */
.btn {
    border-radius: 50px;
}

/* Beautiful Auth Page Overrides */
.auth-page {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.auth-container {
    border-radius: 24px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    background: white;
}

.auth-card {
    flex: 1;
    padding: 3rem;
}

/* في ملف site.css */

.auth-illustration {
    flex: 1;
    /* الصورة تغطي كامل المساحة */
    background: url('../images/HomePageBackGround.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative; /* ضروري لعمل الطبقة الشفافة */
    overflow: hidden;
    z-index: 1; /* لضمان ظهور المحتوى فوق الطبقة */
}

    /* هذه الطبقة السوداء الشفافة تجعل الكلام واللوجو واضحين جداً */
    .auth-illustration::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5); /* لون أسود بنسبة شفافية 50% */
        z-index: -1; /* الطبقة خلف النصوص ولكن أمام الصورة */
    }

    /* لضمان أن جميع النصوص بيضاء وواضحة */
    .auth-illustration h2,
    .auth-illustration p,
    .auth-illustration span {
        color: #ffffff !important;
        text-shadow: 0 2px 4px rgba(0,0,0,0.3); /* ظل خفيف للنص لزيادة الوضوح */
    }
@media (max-width: 850px) {
    .auth-container {
        flex-direction: column;
    }

    .auth-illustration {
        display: none;
    }

    .auth-card {
        padding: 2rem 1.5rem;
    }
}

/* Improved Inputs */
.form-group input, .form-group textarea {
    padding: 0.875rem 1rem;
    border-radius: 12px;
    background: #f8fafc;
    transition: all 0.2s;
}

    .form-group input:focus {
        background: white;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
        outline: none;
    }
/* في ملف site.css */

/* ضبط حجم ومحاذاة الأيقونات داخل تسميات النماذج */
.form-group label svg {
    width: 20px; /* عرض ثابت مناسب */
    height: 20px; /* ارتفاع ثابت مناسب */
    margin-right: 8px; /* مسافة بين الأيقونة والنص */
    vertical-align: middle; /* لضمان أن الأيقونة على نفس خط النص */
    stroke-width: 2px; /* سماكة الخط لتكون واضحة */
}

/* تحسين شكل الـ Label ليكون النص والأيقونة متناسقين */
.form-group label {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-weight: 600; /* جعل الخط سميكاً قليلاً ليتناسب مع التصميم */
}
/* Add this CSS to your wwwroot/css/site.css file */

/* Updated Navigation Icons with Blue Button Backgrounds */
.nav-icons {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: flex-end;
    min-width: fit-content;
}

.nav-icon {
    position: relative;
    color: white; /* Changed to white for better contrast */
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.3s ease;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: var(--primary-color); /* Blue background */
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

    .nav-icon:hover {
        background: var(--primary-hover);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
        color: white;
    }

    /* SVG icons should be white */
    .nav-icon svg {
        stroke: white;
    }

/* Points Badge - keep green but make it stand out */
.points-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: #ffffff;
    background: rgba(16, 185, 129, 0.9);
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
}

/* Cart Count Badge */
.cart-count {
    position: absolute;
    top: 0px;
    right: 0px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    border: 2px solid white; /* White border for better visibility */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Special styling for login text */
.nav-icon span {
    font-size: 0.75rem;
    color: white;
    font-weight: 600;
}

/* Logout Button with Blue Background */
.logout-btn {
    background: var(--primary-color) !important;
    border: none;
    cursor: pointer;
    padding: 0.75rem 1rem;
    color: white;
    transition: all 0.3s ease;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

    .logout-btn:hover {
        background: var(--danger-color) !important;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    }

    .logout-btn svg {
        stroke: white;
    }

/* Admin Dropdown Icon - also with blue background */
.dropdown > .nav-icon {
    background: var(--primary-color);
}

/* Ensure dropdown menu has proper styling */
.dropdown-menu {
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    transition: all 0.2s;
}

    .dropdown-item:hover {
        background: var(--primary-color);
        color: white;
    }

/* Mobile Adjustments */
@media (max-width: 768px) {
    .nav-icons {
        gap: 0.5rem;
    }

    .nav-icon {
        padding: 0.5rem 0.75rem;
    }

        .nav-icon span {
            font-size: 0.65rem;
        }
}
/* --- UNIFIED ICON SIZING FIX --- */

/* Ensure all nav icons have consistent dimensions */
.nav-icon {
    min-width: 80px; /* Set a fixed minimum width for all icons */
    height: 100%; /* Ensure they take full container height */
    justify-content: center; /* Center content vertically */
    box-sizing: border-box;
}

    /* Specific fix for Cart icon to ensure it matches 'My Account' structure */
    .nav-icon.cart-icon {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
        padding: 0.75rem 1rem;
        position: relative;
    }

/* Ensure the cart badge doesn't mess up layout */
.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
}