/* تصميم محسن لصفحة المعرض */

/* خط Cairo الجميل */
* {
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* الخلفية المتحركة */
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.shape-1 { width: 80px; height: 80px; top: 10%; left: 10%; animation-delay: 0s; }
.shape-2 { width: 60px; height: 60px; top: 20%; right: 10%; animation-delay: 1s; }
.shape-3 { width: 100px; height: 100px; bottom: 20%; left: 20%; animation-delay: 2s; }
.shape-4 { width: 40px; height: 40px; top: 60%; right: 20%; animation-delay: 3s; }
.shape-5 { width: 120px; height: 120px; bottom: 10%; right: 30%; animation-delay: 4s; }

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* شريط التنقل العلوي */
.top-navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-actions {
    display: flex;
    gap: 15px;
}

.nav-btn {
    padding: 12px 20px;
    border-radius: 25px;
    text-decoration: none;
    color: #374151;
    font-weight: 600;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.logout-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
}

/* المحتوى الرئيسي */
.main-content {
    padding: 40px 15px;
    position: relative;
    z-index: 1;
}

/* قسم الترحيب */
.hero-section {
    text-align: center;
    margin-bottom: 60px;
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    backdrop-filter: blur(15px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.hero-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #6b7280;
    margin-bottom: 30px;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
}

/* قسم المرشحات */
.filter-section {
    margin-bottom: 50px;
}

.filter-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 30px;
    backdrop-filter: blur(15px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 30px;
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 300px;
}

.search-input {
    width: 100%;
    padding: 15px 20px 15px 50px;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1.1rem;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 12px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    background: white;
    color: #6b7280;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* قسم المنتجات */
.products-section {
    margin-bottom: 60px;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.section-title i {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-divider {
    width: 100px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0 auto;
    border-radius: 2px;
}

/* شبكة المنتجات */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

/* بطاقة المنتج المحسنة */
.product-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.product-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.product-card-inner {
    position: relative;
    z-index: 2;
}

/* صورة المنتج */
.product-image-container {
    position: relative;
    height: 300px;
    overflow: hidden;
    border-radius: 25px 25px 0 0;
}

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

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

.product-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #9ca3af;
    font-size: 1.1rem;
}

.product-placeholder i {
    font-size: 3rem;
    margin-bottom: 10px;
}

/* تراكب المنتج */
.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.overlay-content {
    display: flex;
    gap: 15px;
}

.overlay-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #374151;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.overlay-btn:hover {
    background: white;
    transform: scale(1.1);
}

/* شارات المنتج */
.product-badges {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 3;
}

.badge {
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-new {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.badge-discount {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
}

/* معلومات المنتج */
.product-info {
    padding: 30px;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 15px;
}

.product-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.3;
    margin: 0;
    flex: 1;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.stars {
    color: #fbbf24;
    font-size: 0.9rem;
}

.rating-count {
    color: #6b7280;
    font-size: 0.85rem;
    font-weight: 500;
}

.product-description {
    color: #6b7280;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* قسم السعر */
.product-price-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 15px;
    border-left: 4px solid #10b981;
}

.price-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.current-price {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.old-price {
    font-size: 1.2rem;
    color: #9ca3af;
    text-decoration: line-through;
}

.availability-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #10b981;
    font-weight: 600;
    font-size: 0.9rem;
}

/* أقسام خاصة بالأدوار */
.role-specific-section {
    margin: 20px 0;
    padding: 20px;
    border-radius: 15px;
    border-left: 4px solid;
}

.designer-tools {
    background: rgba(59, 130, 246, 0.1);
    border-left-color: #3b82f6;
}

.assistant-tips {
    background: rgba(245, 158, 11, 0.1);
    border-left-color: #f59e0b;
}

.role-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #374151;
}

.designer-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.designer-btn {
    padding: 10px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
}

.download-btn {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
}

.upload-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.file-input {
    display: none;
}

.assistant-note {
    color: #92400e;
    font-weight: 500;
    margin: 0;
    line-height: 1.5;
}

/* أزرار التفاعل */
.product-actions {
    margin-top: 25px;
}

.action-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.action-btn {
    flex: 1;
    padding: 15px 20px;
    border-radius: 25px;
    border: none;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.whatsapp-btn {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
}

.cart-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.action-btn:active {
    transform: translateY(-1px);
}

/* تحكم الكمية */
.quantity-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 15px;
    background: rgba(243, 244, 246, 0.7);
    border-radius: 15px;
}

.quantity-selector label {
    font-weight: 600;
    color: #374151;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    background: white;
    overflow: hidden;
}

.qty-btn {
    width: 35px;
    height: 35px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.2rem;
    color: #6b7280;
    transition: all 0.2s ease;
}

.qty-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.qty-input {
    width: 50px;
    height: 35px;
    border: none;
    text-align: center;
    font-weight: 600;
    background: transparent;
}

/* قسم الفيديو */
.product-video-section {
    margin-top: 25px;
    padding: 20px;
    background: rgba(243, 244, 246, 0.7);
    border-radius: 15px;
}

.video-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: #374151;
    font-weight: 600;
}

.video-container {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.product-video {
    width: 100%;
    height: auto;
    display: block;
}

/* سلة التسوق المحسنة */
.shopping-cart-section {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 2000;
    overflow-y: auto;
}

.shopping-cart-section.active {
    right: 0;
}

.cart-container {
    padding: 30px 25px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.cart-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

.cart-count-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.cart-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* عناصر السلة */
.cart-items {
    flex: 1;
    margin-bottom: 30px;
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.cart-item:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateX(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.item-info {
    flex: 1;
}

.item-name {
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.item-details {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
}

.item-quantity {
    color: #6b7280;
}

.item-price {
    color: #10b981;
    font-weight: 600;
}

.item-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.item-total {
    font-weight: 700;
    color: #1f2937;
    font-size: 1.1rem;
}

.remove-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.3);
}

/* ملخص السلة */
.cart-summary {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1rem;
}

.summary-row:last-of-type {
    margin-bottom: 25px;
}

.total-row {
    font-size: 1.2rem;
    font-weight: 700;
    padding-top: 15px;
    border-top: 2px solid #e5e7eb;
}

.subtotal,
.total {
    color: #10b981;
    font-weight: 700;
}

.shipping {
    color: #059669;
    font-weight: 600;
}

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

.checkout-btn,
.continue-shopping-btn,
.start-shopping-btn {
    padding: 15px 25px;
    border-radius: 25px;
    border: none;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.checkout-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.continue-shopping-btn {
    background: transparent;
    color: #6b7280;
    border: 2px solid #e5e7eb;
}

.start-shopping-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.checkout-btn:hover,
.start-shopping-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.continue-shopping-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

/* سلة فارغة */
.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.empty-cart-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.cart-empty h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 10px;
}

.cart-empty p {
    margin-bottom: 30px;
    line-height: 1.6;
}

/* الأزرار العائمة */
.floating-controls {
    position: fixed;
    bottom: 30px;
    left: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1500;
}

.control-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    position: relative;
}

.control-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.cart-counter {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

.scroll-top {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

/* حالة فارغة */
.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    backdrop-filter: blur(15px);
}

.empty-icon {
    font-size: 5rem;
    color: #d1d5db;
    margin-bottom: 25px;
}

.empty-state h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 15px;
}

.empty-state p {
    font-size: 1.1rem;
    color: #6b7280;
    line-height: 1.6;
}

/* تحسينات الموبايل */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        gap: 20px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .filter-container {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }
    
    .search-box {
        min-width: auto;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 10px;
    }
    
    .product-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .product-price-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .shopping-cart-section {
        width: 100%;
        right: -100%;
    }
    
    .floating-controls {
        bottom: 20px;
        left: 20px;
    }
    
    .control-btn {
        width: 50px;
        height: 50px;
        font-size: 1.1rem;
    }
    
    .navbar-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-actions {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 20px 10px;
    }
    
    .hero-section {
        padding: 40px 15px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .filter-container {
        padding: 20px;
    }
    
    .product-info {
        padding: 20px;
    }
    
    .section-title {
        font-size: 2rem;
    }
}
