/* ===== General Styles ===== */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&display=swap');

:root {
    /* Colors will be loaded dynamically from settings.json via header.php */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', 'Tajawal', 'Arial', sans-serif;
    direction: rtl;
    text-align: right;
    background: var(--light-bg);
    overflow-x: hidden;
}



/* Bootstrap Background Overrides */
.bg-info {
    background: rgb(40 28 28 / 51%) !important;
}

/* Bootstrap Button Overrides */
.btn-primary {
    background: var(--gradient-primary) !important;
    border: none !important;
    color: white !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background: var(--gradient-primary) !important;
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.btn-success {
    background: var(--success-color) !important;
    border: none !important;
    color: white !important;
}

.btn-danger {
    background: var(--danger-color) !important;
    border: none !important;
    color: white !important;
}

.btn-warning {
    background: var(--warning-color) !important;
    border: none !important;
    color: #000 !important;
}

/* ===== Animated Background ===== */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.animated-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 180, 216, 0.05) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ===== Product Card Styles ===== */
.product-card {
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 380px;
    border: none !important;
    border-radius: 20px !important;
    overflow: hidden;
    background: var(--white);
    position: relative;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-cold);
    opacity: 0;
    transition: var(--transition);
    z-index: 0;
}

.product-card:hover::before {
    opacity: 0.05;
}

.product-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 102, 204, 0.25) !important;
}

.product-card>* {
    position: relative;
    z-index: 1;
}

.product-card img {
    height: 160px;
    width: 100%;
    object-fit: cover;
    border-radius: 20px 20px 0 0;
    flex-shrink: 0;
    transition: var(--transition);
    filter: brightness(0.95);
}

.product-card:hover img {
    transform: scale(1.1);
    filter: brightness(1);
}

.product-card .card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    padding: 1rem;
    background: var(--white);
}

.product-card .card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    height: 42px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    color: var(--dark-color);
    transition: var(--transition);
    text-align: center;
}

.product-card:hover .card-title {
    color: var(--primary, #dc3545) !important;
}

.product-card .card-title a {
    text-decoration: none;
    color: inherit;
}

.product-card .badges-container {
    height: 24px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    display: flex;
    gap: 0.3rem;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.product-card .badge {
    font-size: 0.65rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
    animation: slideIn 0.5s ease-out;
    flex-shrink: 0;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

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

.product-card .price-box {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 180, 216, 0.2);
}

.product-card .price-box h4 {
    font-size: 1.3rem;
    font-weight: 700;
}

.product-card .btn-primary {
    width: 100%;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.product-card .btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.product-card .btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

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

.product-card .card-footer {
    flex-shrink: 0;
    height: 35px;
    display: flex;
    align-items: center;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
}

/* Featured Badge */
.featured-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--gradient-gold);
    color: var(--text-dark);
    font-size: 0.75rem;
    font-weight: bold;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    z-index: 1;
}

/* Price Display */
.price-original {
    text-decoration: line-through;
    color: var(--text-muted, #6c757d);
    font-size: 0.875rem;
    margin-right: 0.5rem;
}

.price-current {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary, #dc3545) !important;
}

/* Price Text Color */
.price-text {
    color: #28a745 !important;
    font-weight: 700 !important;
}

.price-discount {
    background-color: var(--light-bg);
    color: var(--dark-color);
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    margin-right: 0.5rem;
}

/* ===== WhatsApp Float Button ===== */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    left: 25px;
    width: 65px;
    height: 65px;
    background: var(--gradient-whatsapp) !important;
    color: white !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: var(--transition);
    text-decoration: none;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

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

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

.whatsapp-float::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    animation: ripple 2s infinite;
    opacity: 0;
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.whatsapp-float:hover {
    transform: scale(1.15) rotate(10deg);
    box-shadow: var(--shadow-lg);
    color: var(--white);
    animation: none;
}

.whatsapp-float i {
    animation: pulse 2s ease-in-out infinite;
}

/* ===== User Dropdown Badge ===== */
.user-badge {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-right: 0.5rem;
}

.user-badge.client {
    background-color: var(--light-bg);
    color: var(--dark-color);
}

.user-badge.golden {
    background-color: var(--warning-color);
    color: var(--text-dark);
}

.user-badge.admin {
    background-color: var(--danger-color);
    color: var(--white);
}

/* ===== Navbar Styles ===== */
.navbar {
    background: var(--white) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    border-bottom: 2px solid var(--secondary-color);
    transition: var(--transition);
}

.navbar-brand {
    font-weight: 900;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.navbar-brand img {
    height: 40px;
    width: auto;
    transition: var(--transition);
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.navbar-brand span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes pulse {

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

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

.nav-link {
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 1rem;
    color: var(--secondary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    width: 0;
    height: 3px;
    background: var(--gradient-primary);
    transition: var(--transition);
    transform: translateX(50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.nav-link:hover {
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    color: var(--white);
    padding: 0;
    margin-bottom: 0;
    overflow: hidden;
    min-height: 600px;
    display: flex;
    align-items: center;
}

/* Wallpaper Background Layer */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/assets/images/wallpaper.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    animation: slowZoom 30s ease-in-out infinite alternate;
}

@keyframes slowZoom {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

/* Animated Gradient Overlay */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
            var(--primary) 0%,
            rgb(117, 69, 117) 25%,
            var(--secondary) 35%,
            var(--primary) 50%,
            rgb(114, 65, 114) 75%,
            var(--secondary) 100%);
    background-size: 400% 400%;
    animation: gradientMove 15s ease infinite;
    z-index: 1;
    opacity: 0.85;
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }

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

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

/* Floating Circles Animation */
.hero-circles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 2;
    pointer-events: none;
}

.hero-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    animation: float-circle 20s ease-in-out infinite;
}

.hero-circle:nth-child(1) {
    width: 300px;
    height: 300px;
    top: -100px;
    left: 10%;
    animation-duration: 25s;
    animation-delay: 0s;
}

.hero-circle:nth-child(2) {
    width: 200px;
    height: 200px;
    top: 50%;
    right: 5%;
    animation-duration: 20s;
    animation-delay: 2s;
}

.hero-circle:nth-child(3) {
    width: 150px;
    height: 150px;
    bottom: 10%;
    left: 15%;
    animation-duration: 30s;
    animation-delay: 4s;
}

.hero-circle:nth-child(4) {
    width: 250px;
    height: 250px;
    top: 20%;
    right: 20%;
    animation-duration: 22s;
    animation-delay: 1s;
}

.hero-circle:nth-child(5) {
    width: 100px;
    height: 100px;
    bottom: 20%;
    right: 10%;
    animation-duration: 18s;
    animation-delay: 3s;
}

@keyframes float-circle {

    0%,
    100% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0.3;
    }

    25% {
        transform: translateY(-30px) translateX(20px) scale(1.1);
        opacity: 0.5;
    }

    50% {
        transform: translateY(-60px) translateX(-20px) scale(0.9);
        opacity: 0.4;
    }

    75% {
        transform: translateY(-30px) translateX(30px) scale(1.05);
        opacity: 0.6;
    }
}

.hero .container {
    position: relative;
    z-index: 3;
    padding: 2rem 0;
}

.hero .hero-icon {
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.hero .hero-icon i {
    color: white !important;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    text-shadow: 3px 6px 12px rgba(0, 0, 0, 0.4);
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.3rem;
    text-shadow: 2px 3px 6px rgba(0, 0, 0, 0.3);
    font-weight: 500;
}

.hero .search-bar {
    margin-top: 2rem;
}

.hero .search-bar .input-group {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.hero .search-bar input {
    background: transparent;
    border: none;
    padding: 18px 25px;
    font-size: 1.1rem;
}

.hero .search-bar button {
    background: var(--gradient-cold) !important;
    border: none;
    padding: 0 30px;
    transition: all 0.3s ease;
    color: white !important;
}

.hero .search-bar button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(220, 53, 69, 0.5);
}

.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    z-index: 3;
    pointer-events: none;
    display: block;
}

.hero-wave path {
    fill: var(--white);
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }

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

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

.hero-section {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 5rem 0;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1rem;
    text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 1s ease-out;
}

.hero-section p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1.2s ease-out;
}

.hero-section .btn {
    animation: fadeInUp 1.4s ease-out;
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 50px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.hero-section .btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* Product Detail Page */
.thumbnail-img {
    cursor: pointer;
    transition: var(--transition);
}

.thumbnail-img:hover {
    transform: scale(1.05);
}

.thumbnail-img.border-primary {
    border-width: 3px !important;
}

.property-btn {
    transition: var(--transition);
}

.property-btn.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.tab-content {
    background-color: var(--light-bg);
}

/* ===== Filter Sidebar ===== */
.filters-sidebar .card {
    position: sticky;
    top: 20px;
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* ===== Pagination ===== */
.pagination .page-link {
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.pagination .page-link:hover {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* ===== Breadcrumb ===== */
.breadcrumb {
    background-color: var(--light-bg);
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* ===== Footer ===== */
footer {
    background-color: var(--footer-bg);
    color: var(--white);
    margin-top: 4rem;
}

footer a {
    color: var(--footer-text);
    text-decoration: none;
    transition: var(--transition);
}

footer a:hover {
    color: var(--white);
}

footer .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin: 0 0.25rem;
    transition: var(--transition);
}

footer .social-links a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 1.75rem;
    }

    .hero-section p {
        font-size: 1rem;
    }

    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 26px;
        bottom: 15px;
        left: 15px;
    }

    .product-card {
        height: 360px;
    }

    .product-card img {
        height: 140px;
    }
}

@media (max-width: 576px) {
    .product-card {
        height: 350px;
    }

    .product-card img {
        height: 130px;
    }

    .navbar-brand {
        font-size: 1.25rem;
    }

    .navbar-brand img {
        height: 32px;
    }
}

/* ===== Utilities ===== */
.cursor-pointer {
    cursor: pointer;
}

.overflow-hidden {
    overflow: hidden;
}

.text-truncate-2 {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 1rem;
}

.gap-4 {
    gap: 1.5rem;
}

/* Features Section */
.features-section {
    background: linear-gradient(180deg, var(--white) 0%, var(--light-bg) 100%);
    position: relative;
    z-index: 1;
}

.feature-card {
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary, #dc3545);
}

.feature-icon {
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
}

.feature-icon i {
    font-size: 3rem;
    color: var(--primary, #dc3545) !important;
}

.feature-card:hover .feature-icon i {
    animation: rotate 0.6s ease-in-out;
}

/* Stats Section */
.stats-section {
    background: var(--gradient-primary);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
    z-index: 0;
}

.stat-card {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
    margin: 0;
}

.stat-icon {
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.2));
}

.stat-icon i {
    font-size: 2.5rem;
    color: white !important;
}

/* Animations */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
}

.pulse-animation {
    animation: pulse-glow 2s infinite;
}

.btn-gradient-app:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%) !important;
}