:root {
    --gold: #D4AF37;
    --light-gold: #F5E6A3;
    --beige: #F5F5DC;
    --dark-beige: #E6D8B5;
    --black: #1a1a1a;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: #f8f9fa;
}

.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.navbar-brand {
    color: var(--gold) !important;
    font-weight: 800;
}

.nav-link {
    color: var(--black) !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--gold) !important;
}

.gold-text {
    color: var(--gold);
    font-weight: 700;
}

[dir="rtl"] .btn-gold-ser {
    border-radius: 8px 0 0 8px !important;
}

/* Search and Filter Styling */
.input-group-text {
    border-color: rgba(218, 165, 32, 0.3);
}

#searchInput {
    border-color: rgba(218, 165, 32, 0.3);
}

#searchInput:focus {
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 0.2rem rgba(218, 165, 32, 0.25);
}

#sortSelect {
    border-color: rgba(218, 165, 32, 0.3);
}

#sortSelect:focus {
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 0.2rem rgba(218, 165, 32, 0.25);
}

.btn-group .btn {
    margin: 5px;
}

/* Search Input Enhancement */
#searchInput {
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
}

#searchInput:hover {
    border-color: #DAA520 !important;
    box-shadow: 0 2px 8px rgba(218, 165, 32, 0.15);
}

#searchInput::placeholder {
    color: #A0826D;
    font-weight: 400;
}

.input-group-text {
    transition: all 0.3s ease;
}

.input-group:hover .input-group-text {
    transform: scale(1.05);
}

.card-body:has(#searchInput) h5::before {
    content: '\f002';
    color: #DAA520;
}

/* Search Container - Allow overflow */
.search-container {
    position: relative;
    z-index: 100;
}

/* Search Suggestions Dropdown */
.search-suggestions {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: white;
    border: 3px solid #DAA520;
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 0;
    overflow: hidden;
    z-index: 150;
    box-shadow: 0 8px 24px rgba(218, 165, 32, 0.3);
    margin-top: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.search-suggestions.show {
    max-height: 400px;
    overflow-y: auto;
    opacity: 1;
}

.suggestion-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
    text-align: right;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    background: white;
    animation: slideInSuggestion 0.3s ease forwards;
    opacity: 0;
}

@keyframes slideInSuggestion {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.suggestion-item:nth-child(1) {
    animation-delay: 0.05s;
}

.suggestion-item:nth-child(2) {
    animation-delay: 0.1s;
}

.suggestion-item:nth-child(3) {
    animation-delay: 0.15s;
}

.suggestion-item:nth-child(4) {
    animation-delay: 0.2s;
}

.suggestion-item:nth-child(5) {
    animation-delay: 0.25s;
}

.suggestion-item:nth-child(6) {
    animation-delay: 0.3s;
}

.suggestion-item:hover {
    background: linear-gradient(135deg, #FFF8E1 0%, #FFECB3 100%);
    padding-right: 18px;
    transform: translateX(-5px);
}

.suggestion-item:last-child {
    border-bottom: none;
    border-radius: 0 0 12px 12px;
}

.suggestion-item i {
    color: #DAA520;
    font-size: 16px;
}

.suggestion-item .product-name {
    font-weight: 600;
    color: #5D4037;
    font-size: 15px;
    flex: 1;
}

.suggestion-item .product-price {
    color: #27ae60;
    font-size: 14px;
    font-weight: 600;
    margin-right: auto;
}

/* Highlight matched text */
.suggestion-item .highlight {
    background: #FFECB3;
    font-weight: 600;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Pagination Styling */
.pagination {
    gap: 5px;
}

.page-item .page-link {
    border: 2px solid #DAA520;
    color: #5D4037;
    font-weight: 600;
    border-radius: 8px;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

.page-item .page-link:hover {
    background: linear-gradient(135deg, #FFF8E1 0%, #FFECB3 100%);
    border-color: #B8860B;
    transform: translateY(-2px);
}

.page-item.active .page-link {
    background: linear-gradient(135deg, #DAA520 0%, #B8860B 100%);
    border-color: #B8860B;
    color: white;
    box-shadow: 0 4px 12px rgba(218, 165, 32, 0.3);
}

.page-item.disabled .page-link {
    background: #f0f0f0;
    border-color: #ddd;
    color: #999;
}

/* Responsive Pagination */
@media (max-width: 576px) {
    .pagination {
        font-size: 14px;
    }

    .page-item .page-link {
        padding: 8px 12px;
    }
}

/* Fix for search suggestions overflow */
.card-body:has(#searchInput) {
    overflow: visible !important;
}

.card:has(#searchInput) {
    overflow: visible !important;
    z-index: 100;
}

.col-lg-3:has(#searchInput) {
    position: relative;
    z-index: 100;
}

/* Ensure suggestions appear above filter cards but below cart icon */
.search-suggestions {
    z-index: 150 !important;
}

/* Scrollbar styling for suggestions */
.search-suggestions::-webkit-scrollbar {
    width: 8px;
}

.search-suggestions::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0 0 12px 0;
}

.search-suggestions::-webkit-scrollbar-thumb {
    background: #DAA520;
    border-radius: 4px;
}

.search-suggestions::-webkit-scrollbar-thumb:hover {
    background: #B8860B;
}

.hero-bg {
    background: linear-gradient(135deg, rgba(212,175,55,0.1) 0%, rgba(245,245,220,0.2) 50%, rgba(0,0,0,0.05) 100%);
}

.gold-gradient {
    background: linear-gradient(135deg, var(--gold) 0%, var(--light-gold) 100%);
}

.btn-gold-ser,
.btn-gold {
    background: linear-gradient(135deg, var(--gold) 0%, var(--light-gold) 100%);
    border: none;
    color: var(--black);
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-gold-ser:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}
.btn-gold:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}

.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.price {
    color: var(--gold);
    font-weight: bold;
}

.section-title {
    position: relative;
    margin-bottom: 3rem;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 0;
    width: 80px;
    height: 3px;
    background: var(--gold);
}

.gold-text {
    color: var(--gold);
}

.social-icon {
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: scale(1.2);
}

.search-container {
    position: obsolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 1000;
}

.search-container.active {
    display: block;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.floating {
    animation: float 5s ease-in-out infinite;
}

.service-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

/* Product Card Styling */
.product-card {
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.08);
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.15);
    backdrop-filter: blur(10px);
    position: relative;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--light-gold), var(--gold));
    background-size: 200% 100%;
    animation: gradientMove 3s ease infinite;
}

@keyframes gradientMove {
    0% { background-position: 100% 0%; }
    100% { background-position: -100% 0%; }
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(212, 175, 55, 0.15) !important;
    border-color: rgba(212, 175, 55, 0.3);
}

/* Product Images */
.product-img {
    height: 260px;
    transition: transform 0.3s ease;
    width: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    display: block;
    padding: 20px !important;
    margin: 0;
}

.product-card:hover .product-img {
    transform: scale(1.05);
}

/* حاوية الصورة */
.product-card .position-relative.overflow-hidden {
    height: 260px !important;
    min-height: 260px;
    max-height: 260px;
    overflow: hidden;
    background: #fff;
}

/* Product Title and Text */
.product-card .card-title {
    color: var(--black);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    position: relative;
    display: block;
    width: 100%;
    padding-bottom: 12px;
    margin-bottom: 15px;
}

.product-card .card-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--light-gold));
    transition: width 0.4s ease;
    border-radius: 2px;
}

.product-card:hover .card-title::after {
    width: 100%;
}

.product-card .card-text {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

/* Product Price */
.product-card .price {
    color: var(--gold);
    font-weight: bold;
    font-size: 1.2rem;
    position: relative;
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(45deg, var(--gold) 0%, var(--light-gold) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.3s ease;
}

.product-card:hover .price {
    transform: scale(1.1);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* Add to Cart Button */
.product-card .btn-dark.rounded-circle {
    background: var(--black);
    border: none;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    position: relative;
    overflow: hidden;
}

.product-card .btn-dark.rounded-circle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--gold);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
    z-index: 1;
}

.product-card .btn-dark.rounded-circle i {
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.product-card .btn-dark.rounded-circle:hover {
    background: var(--gold);
    transform: scale(1.1);
}


.discount-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--gold);
    color: white;
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    display: none;
    z-index: 1000;
}

.user-menu.active {
    display: block;
}

footer {
    background-color: var(--black);
    color: white;
}

.footer-title {
    color: var(--gold);
    margin-bottom: 1.5rem;
    font-weight: bold;
}

.footer-links a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s;
    display: block;
    margin-bottom: 0.5rem;
}

.footer-links a:hover {
    color: var(--gold);
}

.footer-contact i {
    color: var(--gold);
    width: 20px;
}