/* Custom CSS for Laravel Livewire Project */
/* إضافات وتحسينات للتنسيقات */

/* تحسين أيقونة الشعار */
.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
    color: var(--primary-color, #1a56db);
    font-weight: 800;
    font-size: 1.4rem;
    border-radius: 10px;
    margin-inline-end: 0.5rem;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.navbar-brand:hover .brand-icon {
    transform: scale(1.1) rotate(-5deg);
}

/* تحسين شريط التنقل */
.navbar {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* تحسين بطاقات المنتجات */
.product-card {
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* تحسين بطاقات الفئات */
.category-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(26, 86, 219, 0.15);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f0fdfa 100%);
    position: relative;
    overflow: hidden;
}

/* تحسين Footer */
.footer-section {
    background: linear-gradient(180deg, #1a1d23 0%, #0d0f12 100%);
    color: white;
}

.footer-title {
    position: relative;
    padding-bottom: 0.75rem;
    margin-bottom: 1.25rem;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    border-radius: 2px;
}

/* Social Icons */
.social-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon:hover {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    transform: translateY(-4px);
}

/* Payment Icons */
.payment-icon {
    width: 60px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.payment-icon:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateY(-2px);
}

/* تحسين الأزرار */
.btn {
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 64, 175, 0.4);
}

.btn-accent {
    background: linear-gradient(135deg, #0891b2 0%, #22d3ee 100%);
    border: none;
    color: white;
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(8, 145, 178, 0.4);
    color: white;
}

/* تحسين Rating Stars */
.rating-stars {
    color: #f59e0b;
    display: flex;
    align-items: center;
    gap: 2px;
}

.rating-stars i {
    filter: drop-shadow(0 1px 2px rgba(245, 158, 11, 0.3));
}

/* شارة الخصم */
.product-discount {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    font-weight: 700;
    padding: 0.35rem 0.65rem;
    border-radius: 8px;
    font-size: 0.8rem;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    z-index: 1;
}

/* حالة نفاذ الكمية */
.product-out-of-stock {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #ef4444;
    color: white;
    font-weight: 600;
    padding: 0.35rem 0.65rem;
    border-radius: 8px;
    font-size: 0.75rem;
    z-index: 1;
}

/* أزرار الإجراءات السريعة */
.product-actions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 2;
}

.product-card:hover .product-actions {
    opacity: 1;
    visibility: visible;
}

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

.product-action-btn:hover {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    transform: scale(1.1);
}

.product-action-btn.add-to-wishlist-btn.active,
.product-action-btn.add-to-wishlist-btn:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

/* تحسين body */
body {
    padding-top: 80px;
}

/* تحسين السعر */
.product-price {
    font-weight: 800;
    font-size: 1.25rem;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* تحسين Badges */
.product-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
}

.product-badge-brand {
    background: rgba(30, 64, 175, 0.1);
    color: #1e40af;
}

.product-badge-category {
    background: #f3f4f6;
    color: #6b7280;
}

/* Navbar Search */
.navbar-search {
    width: 280px;
}

.navbar .form-control {
    border: none;
    background: rgba(255, 255, 255, 0.95);
}

.navbar .form-control:focus {
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

/* تحسين Cart Badge */
#cartCount {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, 0) scale(1); }
    50% { transform: translate(-50%, 0) scale(1.1); }
}

/* تحسين Category Icons */
.category-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.08) 0%, rgba(30, 64, 175, 0.15) 100%);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.category-icon i {
    font-size: 2.25rem;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.category-card:hover .category-icon {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    transform: scale(1.1) rotate(-5deg);
}

.category-card:hover .category-icon i {
    -webkit-text-fill-color: white;
}

/* تحسين Footer Links */
.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.footer-links a:hover {
    color: white;
    padding-inline-start: 0.5rem;
}

/* Footer Contact */
.footer-contact {
    list-style: none;
    padding: 0;
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-contact li i {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 64, 175, 0.15);
    color: #3b82f6;
    border-radius: 8px;
    font-size: 1rem;
}

.footer-contact li a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
}

.footer-contact li a:hover {
    color: white;
}

/* تحسين Product Image */
.product-image-wrapper {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #f9fafb 0%, white 100%);
    border-radius: 16px 16px 0 0;
}

.product-img {
    height: 200px;
    object-fit: contain;
    padding: 20px;
    transition: transform 0.3s ease;
    width: 100%;
}

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

/* تحسين Product Body */
.product-body {
    padding: 1rem;
}

.product-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #1f2937;
    height: 2.5rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-card:hover .product-title {
    color: #1e40af;
}

/* تحسين Price Wrapper */
.product-price-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

/* زر Add to Cart */
.btn-add-to-cart {
    width: 100%;
    padding: 0.7rem;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add-to-cart:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 64, 175, 0.35);
}

.btn-add-to-cart:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* تحسين Category Section */
.category-section-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    border-radius: 12px;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 8px 24px rgba(30, 64, 175, 0.25);
}

/* تحسين النصوص */
.text-accent {
    color: #06b6d4 !important;
}

/* تحسين الـ Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: var(--bs-breadcrumb-divider, "←");
}

/* RTL Support */
[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before {
    content: var(--bs-breadcrumb-divider, "→");
}

/* تحسين الـ Alerts */
.alert {
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* تحسين Cards */
.card {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
}

/* Loading State */
.loading {
    pointer-events: none;
    opacity: 0.6;
}

/* Smooth Transitions */
* {
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* تحسين Dropdown Menu */
.dropdown-menu {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 0.75rem;
}

.dropdown-item {
    border-radius: 8px;
    padding: 0.6rem 1rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: #f3f4f6;
    color: #1e40af;
}

/* تحسين Category Link */
.category-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.75rem 1rem;
    text-decoration: none;
    color: inherit;
    height: 100%;
    min-height: 200px;
}

.category-name {
    font-weight: 700;
    font-size: 1rem;
    color: #1f2937;
    margin-bottom: 0.4rem;
    transition: color 0.3s ease;
}

.category-card:hover .category-name {
    color: #1e40af;
}

.category-count {
    font-size: 0.8rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    transition: all 0.3s ease;
}

.category-card:hover .category-count {
    background: rgba(30, 64, 175, 0.1);
    color: #1e40af;
}

/* تحسين Search Suggestions */
.dropdown-menu.show {
    display: block;
    animation: slideDown 0.3s ease;
}

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

/* تحسين Product Section */
.bg-accent-light {
    background: linear-gradient(180deg, rgba(6, 182, 212, 0.05) 0%, rgba(6, 182, 212, 0.02) 100%) !important;
}

/* Responsive Fixes */
@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .navbar-search {
        width: 100%;
    }
    
    .category-icon {
        width: 64px;
        height: 64px;
    }
    
    .category-icon i {
        font-size: 1.75rem;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .product-img {
        height: 150px;
    }
}

/* RTL Specific Fixes */
[dir="rtl"] .footer-links a::before {
    content: '←';
    margin-left: 0.5rem;
    margin-right: 0;
}

[dir="ltr"] .footer-links a::before {
    content: '→';
    margin-right: 0.5rem;
    margin-left: 0;
}

[dir="rtl"] .footer-links a:hover::before,
[dir="ltr"] .footer-links a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* تحسين Category Section Header */
.category-section-header {
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 1.5rem;
}

.category-section-title {
    font-weight: 700;
    font-size: 1.5rem;
    color: #1f2937;
}

.category-section-subtitle {
    font-size: 0.9rem;
    color: #6b7280;
}

/* زر View All */
.view-all-btn {
    padding: 0.6rem 1.25rem;
    font-weight: 600;
    border-radius: 999px;
    transition: all 0.3s ease;
}

.view-all-btn:hover {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    border-color: transparent;
    color: white;
    transform: translateX(-4px);
}

[dir="rtl"] .view-all-btn:hover {
    transform: translateX(4px);
}

/* تحسين الـ Shadow */
.shadow-sm {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.shadow {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.shadow-lg {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

/* Sticky Top Fix */
.sticky-top {
    top: 100px;
}

/* تحسين Newsletter Section */
.bg-light {
    background: linear-gradient(180deg, white 0%, #f9fafb 100%) !important;
}
