/* assets/css/custom.css - Final Modern Design */

/* --- Font Imports --- */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Kufi+Arabic:wght@100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Readex+Pro:wght@160..700&display=swap');

/* --- Global Styles & Variables --- */
:root {
    --primary-color: #A3B18A; /* Sage Green */
    --secondary-color: #588157;
    --accent-color: #344E41;
    --light-bg: #F8F9FA;
    --dark-text: #212529;
    --gray-text: #6c757d;
    --white: #FFFFFF;
    --shadow-sm: 0 2px 5px rgba(0,0,0,0.07);
    --shadow-md: 0 5px 15px rgba(0,0,0,0.08);
    --shadow-lg: 0 15px 30px rgba(0,0,0,0.12);
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Readex Pro", sans-serif !important;
    color: var(--dark-text);
    background-color: var(--light-bg);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Readex Pro", sans-serif;
    font-weight: 700;
    color: var(--accent-color);
}

html {
    scroll-behavior: smooth;
}

/* --- Navbar --- */
.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    padding: 1rem 0;
    transition: var(--transition-base);
    z-index: 1030;
    font-family: "Readex Pro", sans-serif;
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    font-family: "Readex Pro", sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--accent-color);
}

.navbar .nav-link {
    color: var(--gray-text);
    font-weight: 800;
    margin: 0 15px;
    position: relative;
    transition: var(--transition-base);
}

.navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.4s ease;
}

.navbar .nav-link:hover::after,
.navbar .nav-link.active::after {
    width: 100%;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: var(--accent-color);
}


.btn-link {
    display: inline-block;
    padding: 12px 30px;
    border: 2px solid var(--white);
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition-base);
}

.btn-link:hover {
    background-color: var(--white);
    color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* --- Section Headers --- */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    font-size: 1rem;
    color: var(--gray-text);
    font-family: "Readex Pro", sans-serif;
}

/* --- Modern Product Card --- */
.modern-product-card {
    overflow: hidden;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
    background: var(--white);
}

.modern-product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.image-container {
    position: relative;
    overflow: hidden;
}

.image-container img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.modern-product-card:hover .image-container img {
    transform: scale(1.1);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:rgb(246 235 245 / 84%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.modern-product-card:hover .overlay {
    opacity: 1;
}

.btn-view {
    padding: 10px 20px;
    background-color: var(--white);
    color: var(--accent-color);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transform: translateY(20px);
    transition: var(--transition-base);
}

.modern-product-card:hover .btn-view {
    transform: translateY(0);
}

.product-details {
    padding: 1.5rem;
    text-align: center;
}

.product-details h5 {
    font-family: "Readex Pro", sans-serif;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 10px;
}

.product-details p {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0;
}

/* --- Brand Story Section --- */
.brand-story {
    background-color: var(--white);
    padding: 5rem 0;
}

.brand-story h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.brand-story p {
    color: var(--gray-text);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* --- Features Section --- */
.features-section {
    background-color: var(--light-bg);
    padding: 5rem 0;
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    transition: var(--transition-base);
}

.features-section .col-md-3:hover .feature-icon {
    color: var(--secondary-color);
    transform: scale(1.1);
}

.features-section h6 {
    font-family: "Readex Pro", sans-serif;
    font-weight: 600;
}

/* --- Footer --- */
footer {
    background-color: var(--accent-color);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
}

footer p {
    margin-bottom: 1rem;
}

.social-links a {
    color: var(--white);
    font-size: 1.2rem;
    margin: 0 10px;
    transition: var(--transition-base);
}

.social-links a:hover {
    color: var(--primary-color);
}

/* --- Additions for products.php page --- */

/* Modern Page Header */
.page-header-modern {
    background-color: var(--light-bg);
    padding-top: 100px; /* To account for fixed navbar */
}

/* Modern Filter Sidebar */
.filter-sidebar {
    background-color: var(--white);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.filter-title {
    font-family: "Readex Pro", sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.filter-sidebar h6 {
    font-family: "Readex Pro", sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-text);
    margin-bottom: 1rem;
}

.filter-list {
    list-style: none;
    padding: 0;
}

.filter-item {
    display: block;
    padding: 12px 15px;
    margin-bottom: 8px;
    color: var(--dark-text);
    text-decoration: none;
    border-radius: 8px;
    font-family: "Readex Pro", sans-serif;
    font-weight: 500;
    transition: var(--transition-base);
}

.filter-item:hover {
    background-color: var(--light-bg);
    transform: translateX(5px);
}

.filter-item.active {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Modern Sort Bar */
.sort-bar {
    display: flex;
    justify-content: between;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.form-select-modern {
    border-radius: 50px;
    border: 1px solid #e0e0e0;
    padding: 8px 15px;
    font-family: "Readex Pro", sans-serif;
    transition: var(--transition-base);
}

.form-select-modern:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(163, 177, 138, 0.25);
}

/* =======================
   Product Page Modern Design
   Fully Responsive
========================== */

.product-wrapper {
    display: flex;
    gap: 40px;
    padding: 50px 5%;
    direction: rtl;
}

/* =======================
   Left Section (Images)
========================== */
.product-left {
    flex: 1;
}

.product-main-image img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.product-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.product-thumbs img {
    width: 90px;
    height: 90px;
    border-radius: 10px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.6;
    transition: .3s;
}

.product-thumbs img.active,
.product-thumbs img:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* =======================
   Right Section (Details)
========================== */
.product-right {
    flex: 1;
    padding-top: 20px;
}

.product-right h1 {
    font-size: 32px;
    font-weight: 700;
    color: #344E41;
    margin-bottom: 10px;
}

.price {
    font-size: 26px;
    font-weight: bold;
    color: #588157;
    margin-bottom: 20px;
}

.product-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.product-meta .category {
    background: #A3B18A;
    padding: 5px 15px;
    border-radius: 20px;
    color: #FFF;
}

.description {
    line-height: 1.9;
    color: #444;
}

/* Buttons */
.actions {
    margin-top: 30px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-whatsapp,
.btn-share {
    padding: 12px 25px;
    border-radius: 40px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: .3s;
}

.btn-whatsapp {
    background: #25D366;
    color: #FFF;
}

.btn-whatsapp:hover {
    background: #1ebe5a;
}

.btn-share {
    background: #344E41;
    color: #FFF;
}

.btn-share:hover {
    background: #23352d;
}

/* =======================
   Related Products Section
========================== */
.related-section {
    padding: 60px 5%;
    background: #f8f9fa;
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.related-card {
    background: #FFF;
    padding: 15px;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: .3s;
}

.related-card:hover {
    transform: translateY(-5px);
}

.related-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.actions {
    margin-top: 30px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-share-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    color: #FFF;
    transition: .3s;
}

.btn-share-icon.whatsapp { background: #25D366; }
.btn-share-icon.telegram { background: #0088cc; }
.btn-share-icon.facebook { background: #1877F2; }
.btn-share-icon.instagram { background: #C13584; }
.btn-share-icon.copy { background: #344E41; }

.btn-share-icon:hover {
    transform: scale(1.15);
}

/* =======================
   🔥 Responsive Design
========================== */

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    /* Desktop specific styles */
}

/* Medium devices (tablets, less than 992px) */
@media (max-width: 991.98px) {
    /* Hero Section */
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    /* Section Headers */
    .section-header h2 {
        font-size: 2.2rem;
    }
    
    /* Product Cards */
    .image-container img {
        height: 300px;
    }
    
    /* Product Page */
    .product-wrapper {
        flex-direction: column;
        padding: 30px 5%;
        gap: 30px;
    }
    
    .product-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .price {
        font-size: 22px;
    }
    
    .product-right h1 {
        font-size: 28px;
    }
    
    /* Carousel adjustments */
    .carousel-item {
        min-height: 750px; 
    }
    
    .hero-slide-content {
        min-height: auto;
        padding: 30px;
        margin: 0 auto 40px auto;
        max-width: 90%;
    }
    
    .hero-text-content {
        padding-left: 0;
        margin-bottom: 30px;
        text-align: center;
    }
    
    .hero-image {
        max-height: 300px;
    }
}

/* Small devices (landscape phones, less than 768px) */
@media (max-width: 767.98px) {
    /* Navbar */
    .navbar {
        padding: 0.75rem 0;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .navbar .nav-link {
        margin: 0 8px;
        font-size: 0.9rem;
    }
    
    /* Hero Section */
    .hero-section {
        height: 80vh;
        background-attachment: scroll; /* Disable parallax on mobile for better performance */
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    /* Section Headers */
    .section-header {
        margin-bottom: 3rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    /* Product Cards */
    .image-container img {
        height: 250px;
    }
    
    /* Features Section */
    .features-section {
        padding: 3rem 0;
    }
    
    .feature-icon {
        font-size: 2rem;
    }
    
    /* Brand Story */
    .brand-story {
        padding: 3rem 0;
    }
    
    /* Product Page */
    .product-wrapper {
        gap: 25px;
        padding: 20px 3%;
    }
    
    .product-thumbs img {
        width: 70px;
        height: 70px;
    }
    
    .product-right h1 {
        font-size: 24px;
    }
    
    .price {
        font-size: 20px;
    }
    
    .btn-whatsapp,
    .btn-share {
        width: 100%;
        text-align: center;
        padding: 14px;
    }
    
    .related-card img {
        height: 160px;
    }
    
    /* Filter Sidebar */
    .filter-sidebar {
        margin-bottom: 2rem;
    }
    
    /* Carousel adjustments */
    .carousel-item {
        min-height: 700px;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    /* Hero Section */
    .hero-section {
        height: 70vh;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .btn-link {
        padding: 10px 25px;
        font-size: 0.9rem;
    }
    
    /* Section Headers */
    .section-header h2 {
        font-size: 1.75rem;
    }
    
    .section-header p {
        font-size: 0.9rem;
    }
    
    /* Product Cards */
    .image-container img {
        height: 200px;
    }
    
    /* Features Section */
    .features-section {
        padding: 2rem 0;
    }
    
    .features-section .col-md-3 {
        margin-bottom: 1.5rem;
    }
    
    /* Brand Story */
    .brand-story {
        padding: 2rem 0;
    }
    
    .brand-story h3 {
        font-size: 1.5rem;
    }
    
    /* Footer */
    footer {
        padding: 1.5rem 0;
    }
    
    /* Product Page */
    .product-right h1 {
        font-size: 20px;
    }
    
    .price {
        font-size: 18px;
    }
    
    .product-meta {
        font-size: 14px;
    }
    
    .description {
        font-size: 14px;
    }
    
    .product-thumbs img {
        width: 60px;
        height: 60px;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .related-section {
        padding: 40px 3%;
    }
    
    /* Carousel adjustments */
    .carousel-item {
        min-height: 650px;
    }
    
    .hero-slide-content {
        padding: 20px;
    }
    
    .hero-text-content h1 {
        font-size: 2rem;
    }
    
    .hero-text-content .lead {
        font-size: 1rem;
    }
    
    .hero-text-content .btn {
        padding: 10px 25px;
        font-size: 0.9rem;
    }
}

/* Ultra small devices (very small phones, less than 400px) */
@media (max-width: 399.98px) {
    /* Hero Section */
    .hero-title {
        font-size: 1.75rem;
    }
    
    /* Product Page */
    .product-right h1 {
        font-size: 18px;
    }
    
    .price {
        font-size: 16px;
    }
    
    .product-thumbs img {
        width: 50px;
        height: 50px;
    }
}