/* Global Font */
body {
    font-family: 'Tajawal', sans-serif !important;
}
.text-primary{
    color: #dd1d1d !important;
}
.form-control:focus {
    border-color: #dd1d1d;
    outline: none !important;
    box-shadow: none !important;
}

/* Search Form Container */
.expanding-search-form {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 12px; /* Spacing between input and button */
}

/* Search Input */
.search-input {
    width: 100%;
    height: 48px;
    border: 1px solid #E5E7EB; /* Gray-200 */
    border-radius: 8px;
    padding: 0 16px;
    background-color: #ffffff;
    color: #374151; /* Gray-700 */
    font-size: 1rem;
    outline: none;
    transition: all 0.2s ease-in-out;
}

.search-input:focus {
    border-color: #dd1d1d; /* Brand Red */
    box-shadow: 0 0 0 3px rgba(221, 29, 29, 0.1);
}

.search-input::placeholder {
    color: #9CA3AF; /* Gray-400 */
}

/* Search Button */
.search-button {
    height: 48px;
    width: 48px;
    min-width: 48px; /* Prevent shrinking */
    background-color: #dd1d1d;
    color: #ffffff;
    border: none;
    border-radius: 8px; /* Matches input radius */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.search-button:hover {
    background-color: #b91c1c; /* Darker red on hover */
}

.search-button i {
    font-size: 20px;
}
.divider-xl {
    margin-top: 0px;
    margin-bottom: 30px;
}
.cs-spacing {
    margin: 30px auto;
}
.categories-js li{
    padding: 4px 6px;
    list-style: none;
}
.category-gradient-bg {
    background-image: radial-gradient(95.56% 95.56% at 50% 50%, #fff 0, #ffc7c7 100%);
}
.cate-img-circle {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.cate-img-circle img {
    max-height: 100%;
    object-fit: contain;
    width: 70px !important;
}
.catebox-new .heading-xs {
    font-weight: 600;
    font-size: 18px;
    color: #000;
    line-height: 30px;
}
.categories-js.product-count {
    font-size: 14px;
    font-weight: 400;
}
/* Owl Carousel Navigation */
.owl-carousel .owl-nav {
    display: flex !important;
    justify-content: center; /* Center the buttons */
    margin-top: 30px; /* Space from carousel */
    width: 100%;
    pointer-events: none;
    gap: 15px; /* Spacing between buttons */
}

/* Force block display based on user edit, but flex is better for alignment in container */
.owl-carousel .owl-nav.disabled {
    display: flex !important;
}

.owl-next, .owl-prev {
    position: relative;
    width: 45px;
    height: 45px;
    background: #eae8e8 !important;
    border-radius: 50%; /* Circular */
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    color: #374151; /* Gray-700 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* Soft shadow */
    transition: all 0.3s ease;
    border: 1px solid transparent;
    margin: 0 !important; /* Reset margins */
}

.owl-next:hover, .owl-prev:hover {
    background-color: #dd1d1d !important; /* Brand Red */
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(221, 29, 29, 0.25); /* Red tinted shadow */
}

.owl-next.disabled, .owl-prev.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f3f4f6 !important; /* Gray-100 */
    box-shadow: none;
    color: #9ca3af;
}

.owl-next i, .owl-prev i {
    font-size: 24px;
    font-weight: normal;
    color: inherit;
    padding-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Product Card */
.product-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    padding: 15px;
    position: relative;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #dd1d1d;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 2;
}

.product-image {
    position: relative;
    margin-bottom: 15px;
    overflow: hidden;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    
}

.product-image img {
    height: 260px;
    max-width: 260px;
    width: 100%;
    object-fit: contain;
}

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

.stock-status {
    text-align: center;
    margin-bottom: 10px;
}

.stock-text {
    color: #10b981; /* Green */
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 5px;
    display: block;
}

.stock-bar {
    height: 4px;
    background-color: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    width: 50%;
    margin: 0 auto;
}

.stock-progress {
    height: 100%;
    background-color: #10b981; /* Green */
    border-radius: 2px;
}

.product-category {
    color: #6b7280;
    font-size: 14px;
    text-align: center;
    margin-bottom: 5px;
}

.product-title {
    color: #111827;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.current-price {
    font-size: 22px;
    font-weight: 800;
    color: #000;
}

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

/* Loading Spinner */
.loading-indicator {
    display: none;
    text-align: center;
    padding: 40px 0;
    width: 100%;
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #dd1d1d;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Grid Layout Customizations */
.row-cols-custom-5 > * {
    flex: 0 0 auto;
    width: 20%;
}

@media (max-width: 992px) {
    .row-cols-custom-5 > * {
        width: 33.3333%;
    }
}

@media (max-width: 768px) {
    .row-cols-custom-5 > * {
        width: 50%;
    }
}


/* Search Results Dropdown */
#searchData {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border-radius: 12px !important; /* Rounded bottom corners */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    display: none; /* Hidden by default */
    margin-top: 4px; /* Slight gap from input */
    border: 1px solid #e5e7eb;
}

/* Custom Scrollbar for Search Results */
#searchData::-webkit-scrollbar {
    width: 6px;
}

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

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

#searchData::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Search Items */
.search-item {
    transition: background-color 0.2s ease;
    border: none;
    border-bottom: 1px solid #e0e1e4; /* Gray-100 */
}

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

.search-item:hover {
    background-color: #f9fafb; /* Gray-50 */
}

.search-item-img {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    margin-right: 12px;
}

/* RTL Support - Adjust if site is RTL */
[dir="rtl"] .search-item-img {
    margin-right: 0;
    margin-left: 12px;
}

.search-item-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-name {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
