/* ============================================
   SHOLEX Trade - Main Stylesheet
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #1b3eff;
    --primary-dark: #1b3eff;
    --secondary: #1b3eff;
    --secondary-dark: #1b3eff;
    --dark: #1a1a2e;
    --light: #f5f5f5;
    --gray: #666666;
    --white: #ffffff;
    --success: #28a745;
    --danger: #dc3545;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--dark);
    line-height: 1.6;
    background-color: var(--white);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }

a {
    text-decoration: none;
    color: var(--primary);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: var(--white);
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: var(--secondary-dark);
    color: var(--white);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--white);
}

/* ============================================
   Header & Navigation
   ============================================ */
/* .header {
    background-color: var(--dark);

} */

.header {
    background: linear-gradient(135deg, #1a1a2e 0%, #2a3e75 100%);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}


.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    flex-wrap: wrap;
}

.logo img {
    max-height: 60px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    font-weight: 600;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #57aeff;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

/* ============================================
   Products Grid
   ============================================ */
.products-grid,
.projects-grid,
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.product-card,
.project-card,
.category-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover,
.project-card:hover,
.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-card img,
.project-card img,
.category-card img {
    width: 100%;
    aspect-ratio: 4 / 3; 
    object-fit: cover;   /* أو contain لو عايز الصورة كاملة */
    display: block;
}

.product-card-content,
.project-card-content,
.category-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-card-content .btn,
.project-card-content .btn,
.category-card-content .btn {
    margin-top: auto;
}

.product-card h3,
.project-card h3,
.category-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.product-code {
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

/* ============================================
   Filter Section (لـ Expansion Joints)
   ============================================ */
.filter-section {
    background-color: var(--light);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.filter-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary);
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.filter-group select {
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: var(--white);
    font-size: 0.875rem;
    cursor: pointer;
    min-width: 150px;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--secondary);
}

.filter-reset {
    background-color: var(--gray);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

.filter-reset:hover {
    background-color: var(--dark);
}

/* ============================================
   Product Details Page
   ============================================ */
.product-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 3rem 0;
}

.product-gallery img {
    width: 100%;
    border-radius: 12px;
}

.product-info h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.product-meta {
    color: var(--gray);
    margin-bottom: 1rem;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.specs-table tr {
    border-bottom: 1px solid #eee;
}

.specs-table td {
    padding: 10px 0;
}

.specs-table td:first-child {
    font-weight: 600;
    width: 40%;
}

.downloads {
    margin-top: 2rem;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--light);
    padding: 12px 20px;
    border-radius: 8px;
    margin-right: 1rem;
    margin-bottom: 1rem;
}

.download-btn:hover {
    background-color: var(--primary);
    color: var(--white);
}

/* ============================================
   Contact Page
   ============================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 3rem 0;
}

.contact-info {
    background-color: var(--light);
    padding: 2rem;
    border-radius: 12px;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-info-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-family: inherit;
}

.contact-form textarea {
    resize: vertical;
    min-height: 150px;
}

.map {
    margin-top: 2rem;
    border-radius: 12px;
    overflow: hidden;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background-color: var(--dark);
    color: var(--white);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer h4 {
    color: var(--secondary);
    margin-bottom: 1rem;
}

.footer a {
    color: #ccc;
}

.footer a:hover {
    color: var(--secondary);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #333;
    font-size: 0.875rem;
}

/* ============================================
   Loading Spinner (لـ AJAX Filter)
   ============================================ */
.loading-spinner {
    text-align: center;
    padding: 2rem;
}

.loading-spinner::after {
    content: "";
    width: 40px;
    height: 40px;
    border: 4px solid var(--light);
    border-top-color: var(--primary);
    border-radius: 50%;
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .product-details,
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-group {
        flex-direction: column;
    }
    
    .filter-group select {
        width: 100%;
    }
}

/* Sticky Header with Hide/Show on Scroll */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: transform 0.4s ease-in-out, box-shadow 0.3s ease-in-out;
}

/* Hide header when scrolling down */
.header.header-hidden {
    transform: translateY(-100%);
}

/* Shadow when scrolled a bit */
.header.header-shadow {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}


/* ============================================
   NEW FOOTER STYLES (Enhanced)
   ============================================ */

.footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #ccc;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h4 {
    color: #57aeff;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: #ffffff;
}

/* Social Icons */
.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1.2rem;
}

.social-icons a {
    display: inline-flex;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(204, 153, 0, 0.1);
    color: #57aeff;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icons a:hover {
    background: #57aeff;
    color: #1a1a2e;
    transform: translateY(-3px);
}

/* Links List */
.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 0.6rem;
}

.footer-col ul li a {
    color: #ccc;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-col ul li a:hover {
    color: #57aeff;
    transform: translateX(5px);
}

/* Contact List */
.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.contact-list li i {
    color: #57aeff;
    width: 20px;
    margin-top: 3px;
}

.contact-list li span,
.contact-list li a {
    color: #ccc;
    text-decoration: none;
    line-height: 1.5;
}

.contact-list li a:hover {
    color: #CC9900;
}

/* Footer Bottom */
.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }
    
    .footer-col h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .social-icons {
        justify-content: center;
    }
    
    .contact-list li {
        justify-content: center;
    }
}