/* Main Styles for Cataloger */
:root {
    --primary-color: #4CAF50;
    --secondary-color: #2196F3;
    --text-color: #333;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-color: #dee2e6;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --transition-speed: 0.3s;
    --spinner-size: 20px;
    --spinner-color: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
    direction: rtl;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 8px;
}

/* Mobile responsive for container */
@media (max-width: 768px) {
    .container {
        padding: 0 5px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 3px;
    }
}

/* Mobile styles for category actions */
@media (max-width: 768px) {
    .category-title {
        width: calc(100% - 120px);
        font-size: 1.2rem;
        padding: 3px 10px;
    }
    

    
    /* Button Order for medium screens */
    .category-social {
        order: 1;
        margin-right: 4px;
    }
    
    .games-btn {
        order: 2;
        margin-left: 4px;
    }
    

    
    .category-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .category-social-dropdown {
        top: 35px;
        padding: 4px;
        min-width: 40px;
    }
    
    .category-social-dropdown a {
        width: 24px;
        height: 24px;
        font-size: 10px;
        margin-bottom: 3px;
    }
}

@media (max-width: 480px) {
    .category-title {
        width: calc(100% - 110px);
        font-size: 1.1rem;
        margin-left: 110px;
    }
    

    

    
    .category-btn {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }
    
    .category-social-dropdown a {
        width: 22px;
        height: 22px;
        font-size: 9px;
    }
}

/* Spinner for loading states */
.spinner {
    display: inline-block;
    width: var(--spinner-size);
    height: var(--spinner-size);
    border: 2px solid var(--spinner-color);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 0;
    z-index: 1000;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    max-width: 90%;
    width: 400px;
    overflow: hidden;
}

.notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-right: 4px solid var(--primary-color);
}

.notification.success .notification-content {
    border-right-color: var(--success-color);
}

.notification.error .notification-content {
    border-right-color: var(--danger-color);
}

.notification.warning .notification-content {
    border-right-color: var(--warning-color);
}

.notification.info .notification-content {
    border-right-color: var(--info-color);
}

.notification .close-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 20px;
    cursor: pointer;
    margin-right: 10px;
    padding: 0;
    line-height: 1;
}

.notification .close-btn:hover {
    color: #666;
}

/* Import Form Styles */
.upload-section {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: #f9f9f9;
}

.upload-section h4 {
    margin-bottom: 10px;
    color: var(--dark-color);
}

.file-input-group {
    margin-bottom: 10px;
}

.file-input {
    display: block;
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: white;
}

/* Main Content */
main {
    flex: 1;
    padding: 0;
    margin-top: 175px;
    transition: margin-top 0.3s ease;
}

/* Header */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
}

/* Navigation */
nav {
    background-color: var(--secondary-color);
    padding: 0.4rem 0;
    position: fixed;
    top: 90px;
    left: 0;
    right: 0;
    z-index: 999;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-top: 5px;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.3rem;
    padding: 0 0.5rem;
    margin: 0;
    align-items: center;
}

nav ul li {
    margin: 0.1rem 0;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    display: block;
    border-radius: 15px;
    transition: all 0.2s ease;
    font-weight: 400;
    font-size: 0.9rem;
    white-space: nowrap;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid transparent;
}

nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

nav ul li a.active {
    background-color: white;
    color: var(--secondary-color);
    border-color: white;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* تأثير النقر على روابط التنقل */
nav ul li a.clicked {
    transform: scale(0.95);
    opacity: 0.8;
    transition: transform 0.1s, opacity 0.1s;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 0;
}

/* Product Card */
.product-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    width: 100%;
    height: 0;
    padding-bottom: 100%; /* Square aspect ratio */
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

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

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

/* Image Modal Styles */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.image-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.image-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    animation: zoomIn 0.3s ease;
}

.image-modal img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.image-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.product-info {
    padding: 1rem;
    text-align: center;
}

.product-name {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #333;
}

.product-price {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.product-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-top: 0.5rem;
    padding: 0.3rem 0;
    border-top: 1px solid #eee;
}

.quantity-control {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: auto;
}

.quantity-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
    z-index: 10;
    pointer-events: auto;
}

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

.quantity-btn.clicked {
    transform: scale(0.9);
    opacity: 0.8;
}

.quantity-btn:active {
    transform: scale(0.9);
}

.quantity-btn[data-action="remove"] {
    position: absolute;
    right: 0;
    z-index: 20;
}

.quantity-btn[data-action="add"] {
    position: absolute;
    left: 0;
    z-index: 20;
}

.quantity {
    font-weight: bold;
    font-size: 0.9rem;
    margin: 0 2rem;
    position: relative;
    padding: 0.3rem 1.2rem;
    border: 1px solid #ddd;
    border-radius: 15px;
    background-color: #f9f9f9;
    min-width: 80px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    white-space: nowrap;
}

/* Cart */
.cart-icon {
    position: absolute;
    top: 50%;
    left: -50px;
    transform: translateY(-50%);
    background-color: var(--primary-color);
    color: white;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 999;
    font-size: 1.4rem;
    transition: all 0.3s ease;
}

.cart-icon:hover {
    background-color: var(--secondary-color);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--danger-color);
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.cart-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.cart-modal.active {
    display: flex;
}

.cart-content {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.cart-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-color);
}

.cart-items {
    margin-bottom: 1rem;
    flex: 1;
    overflow-y: auto;
    max-height: 500px;
    padding-right: 5px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f1f1f1;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Custom scrollbar for cart items */
.cart-items::-webkit-scrollbar {
    width: 8px;
}

.cart-items::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
    margin: 5px 0;
}

.cart-items::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.cart-items::-webkit-scrollbar-thumb:hover {
    background: #45a049;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.cart-item {
    display: grid;
    grid-template-columns: 2fr 120px 1fr;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    gap: 0.5rem;
}

.cart-item-image {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    overflow: hidden;
    margin-left: 1rem;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-name {
    font-weight: bold;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    text-align: center;
    font-size: 0.9rem;
    white-space: nowrap;
}

.cart-item-quantity-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 120px;
}

.cart-quantity-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background-color: var(--primary-color);
    color: white;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.3s ease;
    flex-shrink: 0;
}

.cart-quantity-btn:hover {
    background-color: var(--secondary-color);
}

.cart-quantity-btn.clicked {
    transform: scale(0.9);
}

.cart-item-total {
    font-weight: bold;
    color: var(--primary-color);
    text-align: left;
}

.cart-total {
    font-size: 1.2rem;
    font-weight: bold;
    text-align: left;
    margin: 1rem 0;
    flex-shrink: 0;
}

.cart-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-actions-row {
    display: flex;
    gap: 10px;
}

.cart-actions .btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.cart-actions .btn.full-width {
    width: 100%;
}

.cart-actions .btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Customer Information Fields */
.customer-info {
    margin: 1rem 0;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.customer-info .form-group {
    margin-bottom: 1rem;
}

.customer-info .form-group:last-child {
    margin-bottom: 0;
}

.customer-info label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #333;
    font-size: 0.9rem;
}

.customer-info .form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.customer-info .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.customer-info .char-counter {
    display: block;
    text-align: right;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    color: #777;
}

.char-counter.text-danger {
    color: var(--danger-color);
    font-weight: bold;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

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

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

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #bd2130;
}

.btn.disabled,
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Floating Social Media Button */
.floating-social {
    position: fixed;
    top: 320px;
    left: 25px;
    z-index: 1000;
}

.floating-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.social-dropdown {
    position: absolute;
    top: 70px;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    padding: 10px;
    min-width: 60px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.social-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.social-dropdown a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.social-dropdown a.clicked {
    transform: scale(0.95);
    opacity: 0.8;
}

.social-dropdown a:last-child {
    margin-bottom: 0;
}

.social-dropdown a:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.social-dropdown a.facebook { background: #1877f2; color: #fff; }
.social-dropdown a.instagram { background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%); color: #fff; }
.social-dropdown a.twitter { background: #1da1f2; color: #fff; }
.social-dropdown a.youtube { background: #ff0000; color: #fff; }
.social-dropdown a.tiktok { background: #000000; color: #fff; }
.social-dropdown a.snapchat { background: #fffc00; color: #000; }
.social-dropdown a.whatsapp { background: #25d366; color: #fff; }

.social-dropdown a.facebook:hover { background: #166fe5; }
.social-dropdown a.instagram:hover { background: linear-gradient(45deg, #e08429 0%,#d55d32 25%,#c91d39 50%,#b31a5c 75%,#a8147e 100%); }
.social-dropdown a.twitter:hover { background: #1a91da; }
.social-dropdown a.youtube:hover { background: #e60000; }
.social-dropdown a.tiktok:hover { background: #333333; }
.social-dropdown a.snapchat:hover { background: #e6e300; }
.social-dropdown a.whatsapp:hover { background: #20b954; }

/* Custom Floating Button */
.floating-custom {
    position: fixed;
    top: 250px;
    left: 25px;
    z-index: 1000;
}

.floating-custom-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-custom-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    color: white;
    text-decoration: none;
}

.floating-custom-btn:active {
    transform: scale(0.95);
}

/* Responsive Design for Custom Floating Button */
@media (max-width: 768px) {
    .floating-custom {
        top: 240px;
        left: 23px;
    }
    
    .floating-custom-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

/* Responsive Design for Floating Social */
@media (max-width: 768px) {
    .floating-social {
        top: 300px;
        left: 23px;
    }
    
    .floating-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .social-dropdown {
        top: 55px;
        right: 0;
    }
    
    .social-dropdown a {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* Responsive Design for Login Page */
@media (max-width: 768px) {
    .login-container {
        padding: 15px;
    }
    
    .login-form {
        padding: 2rem 1.5rem;
        max-width: 100%;
    }
    
    .login-header .store-title {
        font-size: 2rem;
    }
    
    .login-header h2 {
        font-size: 1.5rem;
    }
    
    .login-header p {
        font-size: 1rem;
    }
    
    .back-link {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 1rem 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-logo {
    margin-bottom: 1rem;
}

.footer-links {
    margin-bottom: 1rem;
}

.footer-links a {
    color: white;
    margin: 0 0.5rem;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}



.footer-copyright {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Admin Button */
.admin-btn {
    position: fixed;
    top: 10px;
    left: 10px;
    background-color: var(--dark-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    font-size: 1.2rem;
    text-decoration: none;
    transition: transform 0.1s, opacity 0.1s;
}

.admin-btn.clicked {
    transform: scale(0.95);
    opacity: 0.8;
}

/* Login Form */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 20px;
}

.login-form {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    text-align: center;
}

.login-header {
    margin-bottom: 2rem;
}

.login-header .store-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0 0 1rem 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.login-header h2 {
    font-size: 1.8rem;
    color: var(--dark-color);
    margin: 0 0 0.5rem 0;
}

.login-header p {
    color: var(--text-color);
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.8;
}

.back-to-site {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 12px 24px;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    transition: all 0.3s ease;
    background: transparent;
}

.back-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.back-link i {
    font-size: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

/* Checkbox wrapper styles */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-wrapper input[type="checkbox"] {
    margin: 0;
    width: auto;
}

.checkbox-wrapper label {
    margin: 0;
    color: var(--primary-color);
    font-weight: 700;
    cursor: pointer;
}

/* Admin Dashboard */
.admin-container {
    display: flex;
    min-height: 100vh;
}

/* Remove underlines from all admin links */
.admin-container a,
.admin-sidebar a,
.admin-content a,
.sidebar-btn,
.floating-view-btn,
.admin-tab,
.btn {
    text-decoration: none !important;
}

.admin-container a:hover,
.admin-sidebar a:hover,
.admin-content a:hover,
.sidebar-btn:hover,
.floating-view-btn:hover,
.admin-tab:hover,
.btn:hover {
    text-decoration: none !important;
}

.admin-sidebar {
    width: 250px;
    background-color: var(--dark-color);
    color: white;
    padding: 1rem;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.sidebar-header p {
    margin: 0.5rem 0 0;
    opacity: 0.7;
    font-size: 0.9rem;
}

.sidebar-user {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-info i {
    font-size: 1.5rem;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Grid Menu Layout */
.grid-menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 0.4rem;
    padding: 0.4rem;
    height: 120px;
    max-width: 280px;
    margin: 0 auto;
}

.grid-btn {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 0.4rem;
    min-height: 55px;
    text-align: center;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    gap: 0.3rem;
}

.grid-btn i {
    margin: 0;
    font-size: 0.9rem;
    width: auto;
}

.grid-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Custom grid positioning for specific layout */
.grid-btn:nth-child(1) { /* الرئيسية */
    grid-column: 2;
    grid-row: 1;
}

.grid-btn:nth-child(2) { /* المنتجات */
    grid-column: 1;
    grid-row: 1;
}

.grid-btn:nth-child(3) { /* التصنيفات */
    grid-column: 1;
    grid-row: 2;
}

.grid-btn:nth-child(4) { /* الإعدادات */
    grid-column: 2;
    grid-row: 2;
}

.grid-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* Settings Modal */
.settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.settings-modal.active {
    opacity: 1;
    visibility: visible;
}

.settings-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(-50px);
    transition: transform 0.3s ease;
}

.settings-modal.active .settings-modal-content {
    transform: translateY(0);
}

.settings-modal-header {
    background: var(--primary-color);
    color: white;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.settings-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.close-modal:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Settings Navigation */
.settings-navigation {
    background: #f8f9fa;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.settings-nav-container {
    flex: 1;
    overflow: hidden;
}

.settings-navigation {
    padding: 1rem;
    max-width: 100%;
    overflow: hidden;
}

.settings-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 100%;
    margin: 0 auto;
}

.grid-row {
    display: flex;
    gap: 1.5rem;
    width: 100%;
}

.settings-nav-btn {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    white-space: nowrap;
}

.settings-nav-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.settings-nav-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.settings-nav-btn i {
    font-size: 1.5rem;
}

.settings-nav-btn span {
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-arrow {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border: 2px solid #e9ecef;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #495057;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.nav-arrow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.nav-arrow:hover::before {
    left: 100%;
}

.nav-arrow:hover {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border-color: #dc3545;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.3);
}

.nav-arrow:active {
    transform: scale(0.95);
}

.nav-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
    background: #f8f9fa;
    color: #6c757d;
    border-color: #e9ecef;
}

.nav-arrow:disabled:hover {
    background: #f8f9fa;
    color: #6c757d;
    border-color: #e9ecef;
    transform: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.nav-arrow:disabled::before {
    display: none;
}

/* Settings Content */
.settings-content {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

.settings-section {
    display: none;
}

.settings-section.active {
    display: block;
}

/* Settings Form Styles */
.settings-modal .settings-content .form-group {
    margin-bottom: 20px;
}

.settings-modal .settings-content .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.settings-modal .settings-content .form-group input,
.settings-modal .settings-content .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.settings-modal .settings-content .form-group input:focus,
.settings-modal .settings-content .form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    background: white;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.settings-modal .settings-content .form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.settings-modal .upload-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
    border: 2px dashed #dee2e6;
    text-align: center;
}

.settings-modal .upload-section h4 {
    color: #495057;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 16px;
}

.settings-modal .file-input-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.settings-modal .file-input {
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    background: white;
    width: 100%;
    max-width: 400px;
}

/* Character counter styles */
.char-counter {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    text-align: right;
    font-weight: normal;
    transition: color 0.3s ease;
}

.char-counter.warning {
    color: #e74c3c;
    font-weight: bold;
}

/* Settings Navigation Grid */
.settings-navigation {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px 0;
}

.nav-arrow {
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-arrow:hover:not(:disabled) {
    background: var(--secondary-color);
    transform: scale(1.1);
}

.nav-arrow:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.settings-grid-container {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.settings-grid {
    display: flex;
    gap: 20px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 10px 0;
    align-items: center;
    justify-content: flex-start;
}

.settings-card {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border: 2px solid #e9ecef;
    border-radius: 16px;
    padding: 18px 15px;
    min-width: 150px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.settings-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(220, 53, 69, 0.1), transparent);
    transition: left 0.6s;
}

.settings-card:hover::before {
    left: 100%;
}

.settings-card {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    flex: 1;
}

.settings-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.settings-card:active {
    transform: translateY(0) scale(0.98);
}

.settings-card.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.card-icon {
    font-size: 2rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.settings-card.active .card-icon {
    color: white;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
}

.settings-card.active .card-title {
    color: white;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

/* Responsive design for settings grid */
@media (max-width: 768px) {
    .settings-grid {
        max-width: 100%;
        gap: 1rem;
    }
    
    .grid-row {
        gap: 1rem;
    }
    
    .settings-card {
        padding: 1.2rem;
    }
    
    .card-icon {
        font-size: 1.6rem;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .grid-row {
        gap: 0.8rem;
    }
    
    .settings-card {
        padding: 1rem;
    }
    
    .card-icon {
        font-size: 1.4rem;
    }
    
    .card-title {
        font-size: 1rem;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Upload section styles */
.upload-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.upload-section:hover {
    border-color: #007bff;
    background: #e3f2fd;
}

.upload-section h4 {
    margin-bottom: 15px;
    color: #495057;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-input-group {
    position: relative;
}

.file-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background: white;
    font-family: 'Cairo', sans-serif;
    transition: border-color 0.3s ease;
}

.file-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Import instructions styles */
.import-instructions {
    margin-bottom: 30px;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.alert h4 {
    margin-bottom: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert ul {
    margin: 0;
    padding-right: 20px;
}

.alert li {
    margin-bottom: 5px;
}

/* Color input styles */
.color-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.color-group {
    flex: 1;
}

.color-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

.color-input {
    width: 50px;
    height: 40px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
}

.color-preview {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border: 1px solid #ced4da;
    display: inline-block;
}

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

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

/* Responsive design for settings */
@media (max-width: 768px) {
    .settings-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        border-radius: 8px;
        margin-bottom: 5px;
    }
    
    .color-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .upload-section {
        padding: 15px;
    }
}

/* Color Input Styles */
.color-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.color-card {
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.color-card:hover {
    border-color: #007bff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.color-card label {
    display: block;
    margin-bottom: 15px;
    font-weight: 600;
    color: #495057;
    text-align: center;
}

.color-group {
    flex: 1;
    margin-bottom: 0 !important;
}

.color-input-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.color-input-wrapper:hover {
    border-color: #007bff;
    background: #f0f8ff;
}

.color-input {
    width: 60px !important;
    height: 60px !important;
    padding: 0 !important;
    border: 3px solid white !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
}

.color-input:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}

.color-input:focus {
    outline: none !important;
    border-color: #007bff !important;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2) !important;
}

.color-preview {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .color-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .color-card {
        padding: 15px;
    }
    
    .color-input-wrapper {
        justify-content: center;
    }
}

.settings-section h3 {
    margin: 0 0 1.5rem 0;
    color: var(--text-color);
    font-size: 1.3rem;
}

.import-instructions {
    margin-bottom: 2rem;
}

.import-instructions .alert {
    background: #e3f2fd;
    border: 1px solid #2196F3;
    border-radius: 8px;
    padding: 1.5rem;
    color: #1976D2;
}

.import-instructions h4 {
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.import-instructions ul {
    margin: 0;
    padding-right: 1.5rem;
}

.import-instructions li {
    margin-bottom: 0.5rem;
}

/* Floating Logout Button */
.floating-logout-btn {
    position: fixed;
    top: 80px;
    left: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 1000;
    font-size: 1.2rem;
}

.floating-logout-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    color: white;
    text-decoration: none;
}

.floating-logout-btn:active {
    transform: translateY(0);
}

/* Responsive Grid Menu */
@media (max-width: 768px) {
    .grid-menu {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr;
        gap: 0.3rem;
        height: 100px;
        max-width: 100%;
        padding: 0.3rem;
    }
    
    .grid-btn {
        min-height: 45px;
        padding: 0.4rem 0.3rem;
        font-size: 0.75rem;
        gap: 0.25rem;
    }
    
    .grid-btn i {
        font-size: 0.8rem;
        margin: 0;
    }
    
    /* Reset custom positioning on mobile */
    .grid-btn:nth-child(1),
    .grid-btn:nth-child(2),
    .grid-btn:nth-child(3),
    .grid-btn:nth-child(4) {
        grid-column: auto;
        grid-row: auto;
    }
    
    .floating-logout-btn {
        width: 45px;
        height: 45px;
        font-size: 1rem;
        top: 70px;
        left: 15px;
    }
}

.sidebar-btn {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.sidebar-btn i {
    margin-left: 0.75rem;
    width: 20px;
    text-align: center;
}

.sidebar-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
}

.sidebar-btn.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.admin-content {
    flex: 1;
    padding: 1rem;
}

/* Floating View Site Button */
.floating-view-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    background-color: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.floating-view-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    color: white;
    text-decoration: none;
}

.floating-view-btn:active {
    transform: translateY(0);
}

.admin-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.admin-tab {
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    border-radius: 6px;
    margin: 0.25rem;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #555;
    text-align: center;
}

.admin-tab:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.admin-tab.active {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.admin-panel {
    display: none;
}

.admin-panel.active {
    display: block;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat-card {
    background-color: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
}

/* Admin Products and Categories Grid */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    gap: 0.5rem;
}

.category-filter-item {
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    border-radius: 20px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.category-filter-item:hover {
    background-color: var(--primary-color);
    opacity: 0.8;
}

.category-filter-item.active {
    background-color: var(--primary-color);
    color: white;
}

.admin-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.admin-product-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.admin-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.admin-product-image {
    height: 180px;
    overflow: hidden;
}

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

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

.admin-product-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.admin-product-name {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.admin-product-name a {
    color: #333;
    text-decoration: none;
}

.admin-product-name a:hover {
    color: var(--primary-color);
}

.admin-product-category {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.admin-product-price {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.admin-product-buttons-grid {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

.button-column {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.button-column .btn {
    text-align: center;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.btn-placeholder {
    height: 32px;
    visibility: hidden;
}

/* Legacy support for old admin-product-actions */
.admin-product-actions {
    display: flex;
    gap: 0.5rem;
}

.admin-product-actions .btn {
    text-align: center;
}

/* Animation effects */
.admin-product-card.hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.category-filter-item.active-animation {
    animation: pulse 0.5s;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .admin-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 576px) {
    .admin-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .admin-product-image {
        height: 140px;
    }
    
    .admin-product-info {
        padding: 0.75rem;
    }
    
    .admin-product-name {
        font-size: 0.9rem;
    }
    
    .admin-product-buttons-grid {
        gap: 0.25rem;
    }
    
    .button-column .btn {
        height: 28px;
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    .btn-placeholder {
        height: 28px;
    }
    
    /* Legacy support */
    .admin-product-actions {
        flex-direction: row;
        gap: 0.25rem;
        justify-content: center;
    }
    
    .admin-product-actions .btn {
        flex: 1;
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--dark-color);
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.table th,
.table td {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
}

.table th {
    background-color: var(--light-color);
}

/* Responsive */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .admin-container {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .floating-view-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        top: 15px;
        left: 15px;
    }
    
    .floating-logout-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        top: 70px;
        left: 15px;
    }
}

@media (max-width: 768px) {
    .cart-modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.6);
        padding: 0;
        margin: 0;
    }
    
    .cart-content {
        padding: 15px;
    }
    
    .cart-items {
        max-height: 450px;
    }
    
    .cart-items::-webkit-scrollbar {
        width: 6px;
    }
    
    .cart-items::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 3px;
    }
    
    .cart-item {
        padding: 10px;
    }
    
    .cart-item-info h4 {
        font-size: 14px;
    }
    
    .cart-item-price {
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .cart-modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.65);
        padding: 0;
        margin: 0;
        box-sizing: border-box;
    }
    
    .products-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .cart-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .cart-actions-row:first-child {
        flex-direction: row;
        gap: 8px;
    }
    
    .cart-actions-row:first-child .btn {
        flex: 1;
        font-size: 14px;
        padding: 12px 8px;
    }
    
    .cart-actions .btn {
        width: 100%;
        padding: 14px;
        font-size: 15px;
    }
    
    .admin-tabs {
        flex-direction: column;
    }
    
    .admin-tab {
        margin-bottom: 0.5rem;
    }
}

/* Recent Activity Compact Styles */
.recent-activity {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-top: 1.5rem;
}

.recent-activity h3 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.2rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.activity-item-compact {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    font-size: 0.85rem;
    gap: 0.75rem;
}

.activity-item-compact:hover {
    background-color: #e9ecef;
}

.activity-item-compact i {
    color: var(--primary-color);
    font-size: 0.9rem;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.activity-text {
    flex: 1;
    color: #555;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-time {
    color: #888;
    font-size: 0.75rem;
    font-weight: 400;
    flex-shrink: 0;
    min-width: 60px;
    text-align: left;
}

.no-activity {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 6px;
}

/* Responsive adjustments for activity list */
@media (max-width: 768px) {
    .activity-item-compact {
        font-size: 0.8rem;
        padding: 0.4rem;
        gap: 0.5rem;
    }
    
    .activity-item-compact i {
        font-size: 0.8rem;
        width: 14px;
    }
    
    .activity-time {
        font-size: 0.7rem;
        min-width: 50px;
    }
    
    .recent-activity {
        padding: 1rem;
    }
    
    .recent-activity h3 {
        font-size: 1.1rem;
    }
}

/* Text View Styles */
.products-text-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0;
}

.product-text-item {
    background-color: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-text-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.product-text-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.3rem;
    min-width: 0;
}

.product-text-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
}

.product-text-price {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: bold;
    flex-shrink: 0;
}

.product-text-actions {
    flex-shrink: 0;
}

.product-text-actions .quantity-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Mobile responsive for text view */
@media (max-width: 768px) {
    .product-text-item {
        padding: 0.8rem;
        gap: 0.5rem;
    }
    
    .product-text-info {
        gap: 0.8rem;
    }
    
    .product-text-name {
        font-size: 0.95rem;
    }
    
    .product-text-price {
        font-size: 0.9rem;
    }
}

/* Sticky Category Header */
.category-header-sticky {
    position: sticky;
    top: 195px;
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 998;
    width: 100%;
    margin: 5px 0 0 0;
    padding: 12px 0;
    display: block;
    clear: both;
    transition: top 0.3s ease;
}

.category-header-sticky .container {
    position: relative;
}

.category-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: right;
    direction: rtl;
    margin: 0;
    margin-left: 130px;
    padding: 0px 15px;
    display: block;
    width: calc(100% - 130px);
    max-width: 1200px;
    line-height: 1.2;
    letter-spacing: 0.5px;
}



/* Category Social Dropdown */
.category-social {
    position: sticky;
    top: 0px;
    left: 5px;
}

.category-social-dropdown {
    position: absolute;
    top: 40px;
    left: -8px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    padding: 6px;
    min-width: 45px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.category-social-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.category-social-dropdown a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    margin-bottom: 4px;
    transition: all 0.3s ease;
    font-size: 11px;
}

.category-social-dropdown a:last-child {
    margin-bottom: 0;
}

.category-social-dropdown a:hover {
    transform: scale(1.1);
    background: transparent;
}

.category-description {
    text-align: right;
    direction: rtl;
    margin: 15px auto 0;
    padding: 8px 20px;
    color: #7f8c8d;
    font-size: 1.1rem;
    max-width: 1200px;
    width: calc(100% - 40px);
    line-height: 1.4;
}

/* Mobile responsive for sticky header */
@media (max-width: 768px) {
    .category-header-sticky {
        padding: 8px 0;
        top: 175px;
        margin: 5px 0 0 0;
        transition: top 0.3s ease;
    }
    
    main {
        margin-top: 130px;
    }
    
    .category-title {
        font-size: 1.2rem;
        padding: 4px 10px;
        width: calc(100% - 120px);
        margin-left: 120px;
    }
    

    
    .category-description {
        padding: 8px 15px;
        margin: 12px auto 0;
        font-size: 1rem;
        width: calc(100% - 30px);
    }
    
    .cart-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
        left: -70px;
    }
}

/* Categories List Styles */
.categories-list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.category-list-item {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.category-list-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.category-list-item .drag-handle {
    cursor: grab;
    color: #888;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-left: 15px;
    padding: 8px 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
    height: 35px;
}

.category-list-item .drag-handle:hover {
    color: #666;
    background-color: #e9e9e9;
    border-color: #ccc;
    transform: scale(1.05);
}

.category-list-item .drag-handle:active {
    cursor: grabbing;
    color: #555;
    background-color: #ddd;
    transform: scale(0.95);
}

/* Sortable states */
.sortable-ghost {
    opacity: 0.4;
    background-color: #f0f0f0;
    border: 2px dashed #ccc;
}

.sortable-chosen {
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: rotate(2deg);
}

.sortable-drag {
    opacity: 0.8;
    transform: rotate(5deg);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* Mobile responsive for drag handle */
@media (max-width: 768px) {
    .category-list-item .drag-handle {
        margin-left: 8px;
        padding: 6px 8px;
        font-size: 12px;
        min-width: 30px;
        height: 30px;
    }
}

.category-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 20px;
}

.category-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

.category-name i {
    color: var(--primary-color);
    font-size: 16px;
}

.category-count {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 14px;
    background: var(--light-color);
    padding: 4px 8px;
    border-radius: 4px;
}

.category-count i {
    color: var(--secondary-color);
}

.category-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.category-actions .btn {
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    font-size: 16px;
    font-weight: 500;
    border: none;
    cursor: pointer;
}

.category-actions .btn-edit {
    background-color: var(--primary-color);
    color: white;
    opacity: 1;
    visibility: visible;
}

.category-actions .btn-edit:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

.category-actions .btn-delete {
    background-color: var(--danger-color);
    color: white;
    opacity: 1;
    visibility: visible;
}

.category-actions .btn-delete:hover {
    background-color: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

/* Mobile responsive for categories list */
@media (max-width: 768px) {
    .category-list-item {
        padding: 10px;
        flex-wrap: nowrap;
        align-items: center;
    }
    
    .category-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        flex: 1;
        max-width: calc(100% - 140px);
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .category-name {
        font-size: 14px;
        line-height: 1.3;
        word-break: break-word;
        hyphens: auto;
    }
    
    .category-count {
        font-size: 12px;
    }
    
    .category-actions {
        margin-top: 0;
        width: auto;
        justify-content: flex-end;
        gap: 6px;
        padding-right: 0;
        align-items: center;
        flex-shrink: 0;
    }
    
    .category-actions .btn {
        padding: 6px 8px;
        font-size: 12px;
        min-width: 60px;
        border-radius: 6px;
    }
    
    .category-actions .btn i {
        font-size: 10px;
        margin-left: 3px;
    }
}

/* Sort buttons styles */
.sort-buttons {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-left: 10px;
}

.category-actions .btn-sort {
    background-color: var(--secondary-color);
    color: white;
    padding: 12px 14px;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    min-height: 40px;
    font-size: 16px;
    border: none;
    cursor: pointer;
    position: relative;
}

.category-actions .btn-sort:hover {
    background-color: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.category-actions .btn-sort i {
    font-size: 16px;
    font-weight: bold;
}

.category-actions .btn-sort[title*="للأعلى"] {
    background-color: var(--secondary-color);
}

.category-actions .btn-sort[title*="للأعلى"]:hover {
    background-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.category-actions .btn-sort[title*="للأسفل"] {
    background-color: var(--secondary-color);
}

.category-actions .btn-sort[title*="للأسفل"]:hover {
    background-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Mobile responsive for sort buttons */
@media (max-width: 768px) {
    .sort-buttons {
        gap: 5px;
        margin-left: 10px;
    }
    
    .category-actions .btn-sort {
        padding: 5px 5px;
        min-width: 15px;
        min-height: 15px;
        font-size: 15px;
    }
    
    .category-actions .btn-sort i {
        font-size: 15px;
    }
}

/* Product sort buttons styles */
.admin-product-sort-buttons {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
    justify-content: center;
}

.admin-product-sort-buttons .btn-sort {
    background-color: var(--secondary-color);
    color: white;
    padding: 8px 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
    min-height: 32px;
    font-size: 14px;
    border: none;
    cursor: pointer;
    position: relative;
}

.admin-product-sort-buttons .btn-sort:hover {
    background-color: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.admin-product-sort-buttons .btn-sort:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.admin-product-sort-buttons .btn-sort i {
    font-size: 14px;
    font-weight: bold;
}

.admin-product-sort-buttons .btn-sort[title*="للأعلى"] {
    background-color: var(--secondary-color);
}

.admin-product-sort-buttons .btn-sort[title*="للأعلى"]:hover {
    background-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.admin-product-sort-buttons .btn-sort[title*="للأسفل"] {
    background-color: var(--secondary-color);
}

.admin-product-sort-buttons .btn-sort[title*="للأسفل"]:hover {
    background-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Mobile responsive for product sort buttons */
@media (max-width: 768px) {
    .admin-product-sort-buttons {
        gap: 3px;
        margin-bottom: 8px;
    }
    
    .admin-product-sort-buttons .btn-sort {
        padding: 6px 8px;
        min-width: 30px;
        min-height: 28px;
        font-size: 12px;
    }
    
    .admin-product-sort-buttons .btn-sort i {
        font-size: 12px;
    }
}
