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

/* --- CSS Reset & Variables --- */
:root {
    --primary-dark: #0a2540;
    --primary-blue: #007bff;
    --accent-cyan: #00d4ff;
    --gradient-primary: linear-gradient(135deg, #007bff 0%, #00d4ff 100%);
    --text-light: #ffffff;
    --text-gray: #6e7c87;
    --bg-light: #f5f7fa;
    --border-color: #e6ebf1;
    --shadow-strong: 0 30px 80px rgba(0, 0, 0, 0.2);
    --transition-smooth: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Cairo for Arabic */
html[lang="ar"] body,
html[lang="ar"] .nav-links a,
html[lang="ar"] .logo h2,
html[lang="ar"] .hero-content h1,
html[lang="ar"] .section-title,
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3,
html[lang="ar"] h4, html[lang="ar"] h5, html[lang="ar"] h6 {
    font-family: 'Cairo', 'Inter', sans-serif;
}

body {
    font-family: 'Inter', sans-serif;
    color: #333;
    overflow-x: hidden;
    scroll-behavior: smooth;
    background: #f8fafc;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* --- Animations --- */
.reveal {
    position: relative;
    transform: translateY(40px);
    opacity: 0;
    transition: all 0.8s ease-out;
}

.reveal.active {
    transform: translateY(0);
    opacity: 1;
}

/* --- Global Classes --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

.btn {
    padding: 14px 35px;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    display: inline-block;
    border: none;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 13px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-white {
    background: white;
    color: var(--primary-dark);
}

.btn-blue {
    background: var(--primary-blue);
    color: white;
}

/* =========================================
   UNIFIED NAVIGATION
   ========================================= */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition-smooth);
}

.main-nav.scrolled {
    background: rgba(10, 37, 64, 0.98);
    backdrop-filter: blur(20px);
    padding: 15px 0;
    box-shadow: var(--shadow-strong);
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.main-nav .logo a {
    font-size: 24px;
    font-weight: 800;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.main-nav .logo img {
    max-height: 50px;
    width: auto;
}

.main-nav .logo span {
    color: var(--accent-cyan);
}

.nav-menu {
    display: flex;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: 15px;
    position: relative;
    padding: 10px 0;
    transition: color 0.3s;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-cyan);
    transition: width 0.3s ease;
}

.nav-menu a:hover {
    color: white;
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-lang-switch {
    display: flex;
    gap: 10px;
    margin-inline-end: 10px;
}

.nav-lang-switch a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 600;
}

.nav-lang-switch a.active,
.nav-lang-switch a:hover {
    color: var(--accent-cyan);
}

.nav-cta {
    background: var(--gradient-primary);
    color: white;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    transition: var(--transition-smooth);
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(0, 123, 255, 0.4);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* Inner page header banner */
.page-header-banner {
    padding-top: 84px;
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    height: auto !important;
    min-height: auto !important;
    overflow: visible;
    position: relative;
    color: inherit;
}

.page-header-banner .container {
    padding-top: 16px;
    padding-bottom: 18px;
}

.page-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 10px;
    text-align: start;
}

.page-breadcrumb a {
    color: var(--primary-blue);
    transition: color 0.2s;
}

.page-breadcrumb a:hover {
    color: var(--primary-dark);
}

.page-breadcrumb-sep {
    opacity: 0.45;
}

.page-breadcrumb-current {
    color: var(--text-gray);
}

.page-heading {
    text-align: start;
}

.page-heading h1 {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--primary-dark);
    font-size: clamp(22px, 2.8vw, 30px);
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
}

.page-heading h1 i {
    color: var(--primary-blue);
    font-size: 0.9em;
    flex-shrink: 0;
}

.page-heading p {
    color: var(--text-gray);
    font-size: clamp(14px, 1.6vw, 16px);
    line-height: 1.65;
    margin: 8px 0 0;
    max-width: 640px;
}

.page-heading-intro {
    font-size: clamp(13px, 1.4vw, 15px);
    opacity: 0.92;
    margin-top: 12px;
}

html[dir="rtl"] .page-heading h1 {
    flex-direction: row-reverse;
}

html[dir="rtl"] .page-breadcrumb {
    flex-direction: row-reverse;
    justify-content: flex-start;
}

.page-body-section {
    padding: clamp(32px, 4vw, 48px) 0 clamp(56px, 6vw, 80px);
}

.page-header-banner + section:not(.page-body-section):not(.featured-section) {
    padding-top: clamp(28px, 4vw, 40px);
}

/* Legacy alias */
.page-header-compact {
    height: auto !important;
    min-height: auto !important;
    padding: 0;
    background: transparent;
    position: relative;
    color: inherit;
    overflow: visible;
}

/* =========================================
   HEADER STYLES (legacy slider)
   ========================================= */
header:not(.page-header-compact):not(.page-header-banner) {
    height: 100vh;
    position: relative;
    color: white;
    overflow: hidden;
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
}

/* 1. Top Strip */
.top-strip {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding: 10px 0;
    font-size: 12px;
    font-weight: 500;
}

.top-strip-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info span {
    margin-right: 20px;
    color: rgba(255, 255, 255, 0.9);
}

.contact-info i {
    color: var(--primary-blue);
    margin-right: 6px;
}

/* Right side container for social + lang */
.top-right-actions {
    display: flex;
    align-items: center;
    gap: 25px;
}

.social-icons a {
    color: white;
    margin-left: 10px;
    font-size: 13px;
    opacity: 0.7;
}
.social-icons a:hover {
    opacity: 1;
    color: var(--primary-blue);
}

/* Language Switcher Style */
.lang-switch {
    display: flex;
    gap: 10px;
    border-left: 1px solid rgba(255,255,255,0.2);
    padding-left: 20px;
}

.lang-switch a {
    font-weight: 600;
    font-size: 11px;
    opacity: 0.6;
}

.lang-switch a:hover, .lang-switch a.active {
    opacity: 1;
    color: var(--primary-blue);
}

/* 2. Main Navbar */
.main-navbar {
    padding: 25px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h2 {
    font-size: 24px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1px;
    color: white;
}
.logo span { color: var(--primary-blue); }

.nav-links {
    display: flex;
    gap: 35px;
}

.nav-links a {
    color: white;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    padding-bottom: 5px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-blue);
    transition: width 0.3s ease;
}

.nav-links a:hover::after { width: 100%; }

/* Slider */
.slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease;
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 37, 64, 0.4);
}

.slide.active { opacity: 1; z-index: 1; }

.slide .hero-content {
    position: relative;
    z-index: 2;
    transform: translateY(30px);
    opacity: 0;
    transition: all 1s ease 0.5s;
    max-width: 800px;
}

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

.hero-content p.subtitle {
    font-size: 14px;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 20px;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
}

.hero-content h1 {
    font-size: 64px;
    margin-bottom: 30px;
    font-weight: 800;
    line-height: 1.1;
    color: white;
}

/* Services Strip (The Floating Bar) */
.services-strip-container {
    position: relative;
    margin-top: -60px;
    z-index: 50;
    display: flex;
    justify-content: center;
    padding: 0 20px;
}

.services-strip {
    width: 100%;
    max-width: 1200px;
    background: white;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    display: flex;
    border-radius: 6px;
    overflow: hidden;
}

.service-item {
    flex: 1;
    padding: 40px 20px;
    text-align: center;
    border-right: 1px solid var(--border-color);
    transition: all 0.4s ease;
    cursor: pointer;
    background: white;
    position: relative;
    overflow: hidden;
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: var(--primary-blue);
    transition: 0.4s ease;
    z-index: 0;
}

.service-item:hover::before { height: 100%; }

.service-item-content { position: relative; z-index: 1; }

.service-item:last-child { border-right: none; }

.service-item i {
    font-size: 32px;
    margin-bottom: 15px;
    color: #bdc3c7;
    transition: 0.4s;
    display: block;
}

.service-item h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-dark);
    transition: 0.4s;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.service-item span {
    font-size: 13px;
    color: var(--text-gray);
    transition: 0.4s;
    display: block;
}

.service-item:hover i, 
.service-item:hover h4, 
.service-item:hover span { color: white; }

.service-item.highlight { background: var(--primary-blue); }
.service-item.highlight i, 
.service-item.highlight h4, 
.service-item.highlight span { color: white; }


/* Sections */
section { padding: clamp(56px, 7vw, 88px) 0; }

.section-title {
    text-align: center;
    font-size: clamp(26px, 3vw, 34px);
    color: var(--primary-blue);
    font-weight: 800;
    margin-bottom: clamp(32px, 4vw, 48px);
}

/* Timeline */
.timeline {
    display: flex;
    justify-content: center;
    gap: 80px;
    margin-bottom: 70px;
    position: relative;
}

.timeline::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 25%;
    right: 25%;
    height: 1px;
    background: #e0e0e0;
    z-index: -1;
    transform: translateY(-50%);
}

.timeline-item { background: white; padding: 0 15px; }

.dot {
    height: 14px;
    width: 14px;
    background: #eee;
    border-radius: 50%;
    margin: 15px auto 0;
    transition: 0.3s;
}

.timeline-item:hover .dot, .timeline-item.active .dot {
    background: var(--primary-blue);
    transform: scale(1.4);
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.2);
}

.timeline-item h5 {
    font-size: 16px;
    color: var(--primary-dark);
    font-weight: 700;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-img img {
    width: 100%;
    border-radius: 4px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.about-text p {
    color: var(--text-gray);
    line-height: 1.8;
    font-size: 16px;
    margin-bottom: 25px;
}

/* News Section */
.news-section { background: var(--bg-light); }

.news-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
}

.news-intro h3 {
    font-size: 42px;
    color: var(--primary-dark);
    line-height: 1.1;
    margin-bottom: 25px;
    font-weight: 700;
}

.cards-container { display: flex; gap: 30px; }

.news-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    flex: 1;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    transition: transform 0.3s;
    border: 1px solid transparent;
}

.news-card:hover { 
    transform: translateY(-10px); 
    border-color: rgba(0, 123, 255, 0.2);
}

.news-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 25px;
}

.news-card h4 {
    color: var(--primary-dark);
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 700;
}

.news-card p {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 25px;
}

.round-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: 0.3s;
}
.round-btn:hover { background: var(--primary-dark); }

/* Dark Services */
.dark-services {
    background: var(--primary-dark);
    color: white;
    position: relative;
    overflow: hidden;
}

.services-grid-dark {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border: 1px solid rgba(255,255,255,0.1);
}

.intro-box {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--primary-blue);
}

.intro-box h2 {
    font-size: 36px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.srv-box {
    border: 1px solid rgba(255,255,255,0.1);
    padding: 40px;
    transition: 0.3s;
    cursor: pointer;
    background: transparent;
}

.srv-box:hover { background: rgba(255,255,255,0.05); }

.srv-box i {
    font-size: 36px;
    margin-bottom: 25px;
    color: var(--primary-blue);
}

.srv-box h4 {
    margin-bottom: 15px;
    font-size: 18px;
    text-transform: uppercase;
    font-weight: 600;
}

.srv-box p {
    font-size: 14px;
    color: #aab8c2;
    line-height: 1.7;
}

/* Stats */
.stats-section { background: white; }

.stats-container { display: flex; align-items: center; }

.stats-left {
    width: 45%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.stat-item h2 {
    font-size: 48px;
    color: var(--primary-blue);
    font-weight: 800;
    margin-bottom: 5px;
}

.stat-item p {
    font-size: 14px;
    color: var(--primary-dark);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stats-right { width: 55%; padding-left: 50px; text-align: right; }
.stats-right img { 
    width: 85%;
    max-width: 520px;
    height: auto;
    display: inline-block;
    object-fit: contain;
}

/* Footer */
footer {
    background: #020d1c;
    color: white;
    padding: 80px 0 20px;
    font-size: 14px;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 0;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-col h5 {
    margin-bottom: 25px;
    font-size: 16px;
    color: white;
    font-weight: 600;
}

.footer-col ul li {
    margin-bottom: 12px;
    color: #8899a6;
    cursor: pointer;
    transition: 0.3s;
}
.footer-col ul li:hover { color: var(--primary-blue); padding-left: 5px; }

.subscribe-form { display: flex; margin-top: 20px; }
.subscribe-form input {
    padding: 12px;
    border: none;
    width: 100%;
    outline: none;
    background: rgba(255,255,255,0.1);
    color: white;
}
.subscribe-form button {
    background: var(--primary-blue);
    border: none;
    color: white;
    padding: 0 20px;
    cursor: pointer;
    transition: 0.3s;
}
.subscribe-form button:hover { background: white; color: var(--primary-blue); }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    color: #556677;
    padding-top: 16px;
}

/* RTL (Arabic) */
html[dir="rtl"] body { text-align: right; }
html[dir="rtl"] .nav-container { flex-direction: row-reverse; }
html[dir="rtl"] .nav-links { flex-direction: row-reverse; }
html[dir="rtl"] .top-strip-container { flex-direction: row-reverse; }
html[dir="rtl"] .top-right-actions { flex-direction: row-reverse; }
html[dir="rtl"] .lang-switch { border-left: none; border-right: 1px solid rgba(255,255,255,0.2); padding-left: 0; padding-right: 20px; }
html[dir="rtl"] .contact-info span { margin-right: 0; margin-left: 20px; }
html[dir="rtl"] .footer-bottom { flex-direction: row-reverse; }
html[dir="rtl"] .stats-container { flex-direction: row-reverse; }
html[dir="rtl"] .stats-right { padding-left: 0; padding-right: 50px; text-align: left; }
html[dir="rtl"] .about-grid { direction: rtl; }
html[dir="rtl"] .news-grid { direction: rtl; }
html[dir="rtl"] .services-strip { flex-direction: row-reverse; }
html[dir="rtl"] .timeline { flex-direction: row-reverse; }

/* =========================================
   STICKY BACKGROUND PARALLAX SECTION
   True sticky scroll-over effect
   ========================================= */
.sticky-bg-section {
    position: relative;
    height: 100vh;
    /* Remove margin to allow seamless flow */
}

.sticky-bg-image {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    /* Will be controlled by JS for visibility */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.sticky-bg-image.visible {
    opacity: 1;
    visibility: visible;
}

.sticky-bg-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(10, 37, 64, 0.75), rgba(0, 123, 255, 0.45));
    z-index: 1;
}

.sticky-bg-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 50px;
    /* Glass effect for the text container */
    background: rgba(10, 37, 64, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 800px;
    margin: 0 auto;
}

.sticky-bg-content h2 {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
    line-height: 1.2;
}

.sticky-bg-content p {
    font-size: clamp(1rem, 2vw, 1.5rem);
    max-width: 600px;
    margin: 0 auto;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
    opacity: 0.9;
}

/* Cover sections that slide over the sticky image */
.cover-section {
    position: relative;
    background: white;
    z-index: 10;
}

/* Ensure .cover-section has proper background */
.cover-section::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: inherit;
}

/* Spacer to show the sticky background */
.sticky-spacer {
    height: 100vh;
    position: relative;
    z-index: 1;
}

/* Alternative: Multiple sticky images with content */
.parallax-reveal-section {
    position: relative;
    min-height: 100vh;
}

.parallax-image-container {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
}

.parallax-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.parallax-image-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 37, 64, 0.6);
}

.parallax-text-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    text-align: center;
    color: white;
}

.parallax-text-overlay h2 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.parallax-text-overlay p {
    font-size: 1.25rem;
    opacity: 0.9;
}

/* Responsive */
@media (max-width: 900px) {
    .hero-content h1 { font-size: 40px; }
    .top-strip { display: none; }
    .nav-links { display: none; }
    .nav-menu { display: none; }
    .nav-cta { display: none; }
    .mobile-menu-toggle { display: block; }

    .page-heading p {
        max-width: 100%;
    }
    
    .services-strip-container { margin-top: 0; padding: 20px; background: var(--bg-light); }
    .services-strip { flex-wrap: wrap; box-shadow: none; border: 1px solid var(--border-color); }
    .service-item { width: 50%; flex: auto; border-bottom: 1px solid var(--border-color); }
    
    .about-grid, .news-grid, .services-grid-dark, .stats-container, .footer-grid {
        grid-template-columns: 1fr;
        flex-direction: column;
    }
    .stats-left { width: 100%; margin-bottom: 40px; }
    .stats-right { width: 100%; padding-left: 0; padding-inline-start: 0; }
    .cards-container { flex-direction: column; }
}

/* =========================================
   PRODUCTS PAGE
   ========================================= */
.products-page {
    padding: clamp(28px, 4vw, 40px) 0 64px;
}

.products-intro {
    max-width: 720px;
    margin: 0 auto 40px;
    text-align: center;
    color: var(--text-gray);
    line-height: 1.8;
    font-size: 16px;
}

.products-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    margin-bottom: 30px;
    padding: 24px;
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
}

.products-toolbar input[type="text"],
.products-toolbar select {
    padding: 12px 18px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    min-width: 200px;
    font-size: 14px;
    background: white;
    transition: border-color 0.3s;
}

.products-toolbar input[type="text"]:focus,
.products-toolbar select:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.products-toolbar .btn-search {
    padding: 12px 24px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
}

.products-toolbar .btn-clear {
    padding: 12px 24px;
    background: #6c757d;
    color: white;
    border-radius: 10px;
    font-weight: 600;
}

.products-count {
    margin-bottom: 24px;
    color: #666;
    font-size: 14px;
}

.products-category-group {
    margin-bottom: 48px;
}

.products-category-group:last-child {
    margin-bottom: 0;
}

.products-category-title {
    font-size: clamp(22px, 2.5vw, 28px);
    color: var(--primary-dark);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(0, 123, 255, 0.15);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}

.product-card {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 30px rgba(10, 37, 64, 0.06);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(10, 37, 64, 0.12);
}

.product-card .img-wrap {
    position: relative;
    height: 230px;
    background: linear-gradient(180deg, #eef4fb 0%, #f8fafc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-card .img-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 37, 64, 0.35) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.35s;
}

.product-card:hover .img-wrap::after {
    opacity: 1;
}

.product-card .img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.product-card .img-wrap i {
    font-size: 64px;
    color: #c5d3e0;
}

.product-card .img-category {
    position: absolute;
    top: 14px;
    inset-inline-start: 14px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.92);
    color: var(--primary-dark);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-card .body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-card h3 {
    font-size: 19px;
    margin-bottom: 10px;
    color: var(--primary-dark);
    line-height: 1.35;
}

.product-card .short-desc {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.65;
    margin-bottom: 16px;
    flex: 1;
}

.product-card .card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.product-card .badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success { background: #d4edda; color: #155724; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-danger { background: #f8d7da; color: #721c24; }
.badge-featured { background: rgba(0, 212, 255, 0.15); color: #007bff; margin-bottom: 10px; }

.btn-product-details {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #00a896 0%, #00d4ff 100%);
    color: white;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    transition: transform 0.3s, box-shadow 0.3s;
    flex: 1;
}

.btn-product-details:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 168, 150, 0.35);
    color: white;
}

.products-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-gray);
    background: white;
    border-radius: 18px;
    border: 1px dashed var(--border-color);
}

.products-empty i {
    font-size: 60px;
    margin-bottom: 20px;
    opacity: 0.35;
    color: var(--primary-blue);
}

/* =========================================
   PRODUCT DETAIL PAGE
   ========================================= */
.product-detail-section {
    padding: clamp(24px, 3vw, 32px) 0 64px;
    background: #f8fafc;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-blue);
    font-weight: 600;
    margin-bottom: 24px;
    transition: 0.3s;
}

.back-link:hover {
    color: var(--primary-dark);
}

.product-detail-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 16px 50px rgba(10, 37, 64, 0.08);
    border: 1px solid var(--border-color);
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.product-gallery {
    padding: 40px;
    background: linear-gradient(135deg, #f0f6fc 0%, #fafbfc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-gallery .main-image {
    width: 100%;
    max-width: 480px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
    border: 4px solid white;
}

.product-gallery .main-image img {
    width: 100%;
    height: auto;
    display: block;
}

.product-gallery .placeholder {
    width: 100%;
    max-width: 480px;
    aspect-ratio: 1;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid white;
}

.product-gallery .placeholder i {
    font-size: 100px;
    color: #adb5bd;
}

.product-info {
    padding: 48px;
}

.product-info .category-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 123, 255, 0.1);
    color: var(--primary-blue);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

.product-info h1 {
    font-size: 34px;
    color: var(--primary-dark);
    margin-bottom: 18px;
    line-height: 1.25;
}

.product-info .short-desc {
    font-size: 17px;
    color: #666;
    line-height: 1.75;
    margin-bottom: 24px;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid #e9ecef;
}

.product-meta .badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}

.badge-stock { background: #d4edda; color: #155724; }
.badge-out { background: #f8d7da; color: #721c24; }
.badge-order { background: #fff3cd; color: #856404; }
.badge-sku { background: #e9ecef; color: #495057; }

.product-description {
    margin-bottom: 28px;
}

.product-description h3 {
    font-size: 18px;
    color: var(--primary-dark);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-description h3 i {
    color: var(--primary-blue);
}

.product-description .content {
    font-size: 15px;
    color: #555;
    line-height: 1.85;
}

.product-spec-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.product-spec-list li {
    position: relative;
    padding: 12px 16px 12px 42px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    color: #444;
    line-height: 1.6;
}

.product-spec-list li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-blue);
    font-size: 12px;
}

html[dir="rtl"] .product-spec-list li {
    padding: 12px 42px 12px 16px;
}

html[dir="rtl"] .product-spec-list li::before {
    left: auto;
    right: 16px;
}

.product-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.btn-contact {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 28px;
    background: var(--primary-blue);
    color: white;
    font-weight: 700;
    border-radius: 10px;
    transition: 0.3s;
}

.btn-contact:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.3);
    color: white;
}

.btn-quote {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 28px;
    background: white;
    color: var(--primary-dark);
    font-weight: 600;
    border-radius: 10px;
    border: 2px solid var(--primary-dark);
    transition: 0.3s;
}

.btn-quote:hover {
    background: var(--primary-dark);
    color: white;
}

.related-products-section {
    padding: 80px 0;
    background: white;
}

.related-products-section h2 {
    font-size: 28px;
    color: var(--primary-dark);
    margin-bottom: 40px;
    text-align: center;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.related-product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}

.related-product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
}

.related-product-card .img-wrap {
    height: 180px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.related-product-card .img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.4s;
}

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

.related-product-card .body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.related-product-card h4 {
    font-size: 16px;
    color: var(--primary-dark);
    margin-bottom: 8px;
    line-height: 1.4;
}

.related-product-card h4 a {
    color: inherit;
}

.related-product-card h4 a:hover {
    color: var(--primary-blue);
}

.related-product-card .category {
    font-size: 13px;
    color: #888;
    margin-bottom: 14px;
}

.related-product-card .btn-product-details {
    margin-top: auto;
    width: 100%;
}

.product-cta {
    background: var(--primary-dark);
    padding: 60px 0;
    text-align: center;
    color: white;
}

.product-cta h3 {
    font-size: 28px;
    margin-bottom: 14px;
}

.product-cta p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 24px;
    max-width: 600px;
    margin-inline: auto;
}

.product-cta .btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: white;
    color: var(--primary-dark);
    border-radius: 10px;
    font-weight: 700;
}

.product-cta .btn:hover {
    background: var(--accent-cyan);
    color: white;
}

/* Page content cards (about, services) */
.content-card {
    padding: 40px;
    background: white;
    border-inline-start: 5px solid var(--primary-blue);
    border-radius: 8px;
}

.icon-circle {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    box-shadow: 0 10px 30px rgba(0, 123, 255, 0.3);
}

.icon-circle i {
    font-size: 40px;
    color: white;
}

/* RTL enhancements */
html[dir="rtl"] .products-toolbar,
html[dir="rtl"] .product-card .card-footer,
html[dir="rtl"] .product-actions,
html[dir="rtl"] .project-meta,
html[dir="rtl"] .back-link {
    direction: rtl;
}

html[dir="rtl"] .project-category {
    right: auto;
    left: 15px;
}

html[dir="rtl"] .project-meta i,
html[dir="rtl"] .footer-col ul li:hover {
    margin-right: 0;
    margin-inline-end: 5px;
    padding-left: 0;
    padding-inline-start: 5px;
}

html[dir="rtl"] .stats-right {
    text-align: left;
    padding-left: 0;
    padding-inline-start: 50px;
}

html[dir="rtl"] .nav-inner {
    direction: rtl;
}

@media (max-width: 992px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
    }

    .product-gallery,
    .product-info {
        padding: 30px;
    }

    .product-info h1 {
        font-size: 26px;
    }
}

@media (max-width: 576px) {
    .product-actions {
        flex-direction: column;
    }

    .btn-contact,
    .btn-quote {
        width: 100%;
        justify-content: center;
    }

    .product-card .card-footer {
        flex-direction: column;
        align-items: stretch;
    }
}