* {
    font-family: 'Tajawal', sans-serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Skeleton Loading */
@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
}

/* Pulse Animation */
@keyframes pulse-add {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

.pulse-add {
    animation: pulse-add 0.3s ease-in-out;
}

/* Float Animation */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Gradient Animation */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.animated-gradient {
    background: linear-gradient(-45deg, #ff9900, #ff6b00, #007185, #00a8cc);
    background-size: 400% 400%;
    animation: gradient-shift 8s ease infinite;
}

/* Hero Slide */
.hero-slide {
    opacity: 0;
    transform: translateX(30px);
}

.hero-slide.active {
    opacity: 1;
    transform: translateX(0);
}

/* Product Card Hover */
.product-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.product-image {
    transition: transform 0.4s ease;
}

/* Mega Menu */
.mega-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.mega-menu-trigger:hover .mega-menu,
.mega-menu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Cart Drawer */
.cart-drawer {
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-drawer.open {
    transform: translateX(0);
}

/* Mobile Menu */
.mobile-menu {
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.open {
    transform: translateX(0);
}

/* Image Zoom */
.zoom-container {
    overflow: hidden;
    position: relative;
}

.zoom-container img {
    transition: transform 0.3s ease;
}

.zoom-container:hover img {
    transform: scale(1.5);
}

/* Star Rating */
.star-filled {
    color: #ff9900;
}

.star-empty {
    color: #ddd;
}

/* Progress Bar */
.progress-step {
    position: relative;
}

.progress-step::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -12px;
    transform: translateX(50%);
    width: 100%;
    height: 3px;
    background: #ddd;
}

.progress-step.active::after {
    background: #007185;
}

.progress-step:last-child::after {
    display: none;
}

/* Tab Content */
.tab-content {
    display: none;
}

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

/* Badge */
.cart-badge {
    position: absolute;
    top: -8px;
    left: -8px;
    background: #ff9900;
    color: white;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Overlay */
.overlay {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Countdown Flip */
@keyframes flip {
    0% {
        transform: rotateX(0deg);
    }

    50% {
        transform: rotateX(-90deg);
    }

    100% {
        transform: rotateX(0deg);
    }
}

.countdown-flip {
    animation: flip 0.6s ease;
}

/* Focus States */
input:focus,
select:focus,
button:focus {
    outline: 2px solid #007185;
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Quick View Modal */
.quick-view-modal {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.quick-view-modal.open {
    opacity: 1;
    visibility: visible;
}

/* Notification */
.notification {
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

/* Category Card Gradient */
.category-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
}

.category-card:hover {
    background: linear-gradient(135deg, #f8f8f8 0%, #f0f0f0 100%);
}

/* Loading Spinner Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Modal Transitions */
#productPageModal {
    transition: opacity 0.3s ease;
}

#productPageModal.hidden {
    opacity: 0;
    pointer-events: none;
}

#productPageModal:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

/* Smooth content fade in */
#productPageContent>div {
    animation: fadeIn 0.3s ease-in;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* JSON Display Styling */
pre {
    font-family: 'Courier New', monospace;
    line-height: 1.5;
}

/* List View Card */
.list-view .product-card {
    display: flex;
    flex-direction: row;
}

.list-view .product-card .image-container {
    width: 200px;
    shrink: 0;
}

.list-view .product-card .content-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 768px) {
    .list-view .product-card {
        flex-direction: column;
    }

    .list-view .product-card .image-container {
        width: 100%;
    }
}

/* Star Rating */
.star-filled {
    color: #ff9900;
}

.star-empty {
    color: #ddd;
}

/* Cart Badge */
.cart-badge {
    position: absolute;
    top: -8px;
    left: -8px;
    background: #ff9900;
    color: white;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Filter Sidebar */
.filter-sidebar {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-sidebar.open {
    transform: translateX(0);
}

/* Filter Accordion */
.filter-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.filter-content.open {
    max-height: 500px;
}

/* Price Range Slider */
.price-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: #ddd;
    outline: none;
}

.price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ff9900;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.price-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ff9900;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Checkbox Custom */
.custom-checkbox {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    flex-shrink: 0;
}

.custom-checkbox:checked {
    background: #ff9900;
    border-color: #ff9900;
}

.custom-checkbox:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Notification */
.notification {
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

/* Pulse Animation */
@keyframes pulse-add {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

.pulse-add {
    animation: pulse-add 0.3s ease-in-out;
}


/* تنسيق قائمة الاقتراحات */
#searchSuggestions {
    direction: rtl;
}

.suggestion-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background-color 0.2s;
}

.suggestion-item:hover {
    background-color: #f9fafb;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    margin-left: 12px;
    border: 1px solid #e5e7eb;
}

.suggestion-info {
    flex: 1;
    text-align: right;
}

.suggestion-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.suggestion-price {
    color: #ea580c;
    font-weight: 700;
    font-size: 0.9rem;
}

.suggestion-no-results {
    padding: 20px;
    text-align: center;
    color: #6b7280;
}

.suggestion-loading {
    padding: 20px;
    text-align: center;
    color: #6b7280;
}

/* تمييز العنصر النشط */
.suggestion-item.active {
    background-color: #fff7ed;
    border-right: 3px solid #ea580c;
}