/*
Theme Name: NajahMED
Theme URI: https://najahmed.com
Author: NajahMED Team
Author URI: https://najahmed.com
Description: Thème WordPress professionnel pour NajahMED - Équipements Médicaux. Design Glassmorphisme moderne et premium.
Version: 3.0.0
Requires at least: 5.9
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: najahmed
Tags: medical, equipment, glassmorphism, responsive, elementor-ready, french

NajahMED Theme - Le Plus Beau Site d'Équipements Médicaux
*/

/* ========================================
   CSS VARIABLES - EXACT LOGO COLORS
   Dark Teal/Cyan + Gold from NajahMED logo
======================================== */
:root {
    /* Primary Colors - Dark Teal (exact logo color) */
    --nm-primary: #0d9488;
    --nm-primary-light: #14b8a6;
    --nm-primary-dark: #0f766e;
    --nm-primary-darker: #115e59;
    --nm-primary-rgb: 13, 148, 136;

    /* Secondary Colors - Gold/Yellow (logo accent) */
    --nm-secondary: #d4a847;
    --nm-secondary-light: #e6c35a;
    --nm-secondary-dark: #b8922e;

    /* Premium Dark Blue (for footer) */
    --nm-dark: #0c4a6e;
    --nm-dark-light: #0e5a7e;
    --nm-dark-darker: #082f49;

    /* Accent Colors */
    --nm-accent: #06b6d4;
    --nm-success: #10b981;
    --nm-warning: #f59e0b;

    /* Neutral Colors */
    --nm-white: #ffffff;
    --nm-light: #f8fafc;
    --nm-gray-100: #f1f5f9;
    --nm-gray-200: #e2e8f0;
    --nm-gray-300: #cbd5e1;
    --nm-gray-400: #94a3b8;
    --nm-gray-500: #64748b;
    --nm-gray-600: #475569;
    --nm-gray-700: #334155;
    --nm-gray-800: #1e293b;
    --nm-gray-900: #0f172a;
    --nm-black: #020617;

    /* Glassmorphism Effects - Premium */
    --nm-glass-bg: rgba(255, 255, 255, 0.15);
    --nm-glass-bg-strong: rgba(255, 255, 255, 0.25);
    --nm-glass-border: rgba(255, 255, 255, 0.3);
    --nm-glass-shadow: 0 8px 32px rgba(13, 148, 136, 0.15);
    --nm-glass-blur: blur(20px);

    /* 3D Premium Shadow */
    --nm-3d-shadow:
        0 2px 4px rgba(13, 148, 136, 0.08),
        0 4px 8px rgba(13, 148, 136, 0.08),
        0 8px 16px rgba(13, 148, 136, 0.1),
        0 16px 32px rgba(13, 148, 136, 0.12);

    /* Typography */
    --nm-font-primary: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --nm-font-heading: 'Montserrat', 'Outfit', 'Poppins', sans-serif;

    /* Spacing */
    --nm-spacing-xs: 0.25rem;
    --nm-spacing-sm: 0.5rem;
    --nm-spacing-md: 1rem;
    --nm-spacing-lg: 1.5rem;
    --nm-spacing-xl: 2rem;
    --nm-spacing-2xl: 3rem;
    --nm-spacing-3xl: 4rem;

    /* Border Radius */
    --nm-radius-sm: 0.5rem;
    --nm-radius-md: 1rem;
    --nm-radius-lg: 1.5rem;
    --nm-radius-xl: 2rem;
    --nm-radius-full: 9999px;

    /* Transitions */
    --nm-transition-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --nm-transition-normal: 400ms cubic-bezier(0.4, 0, 0.2, 1);
    --nm-transition-slow: 600ms cubic-bezier(0.4, 0, 0.2, 1);
    --nm-transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ========================================
   RESET & BASE STYLES
======================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--nm-font-primary);
    font-size: 16px;
    line-height: 1.7;
    color: var(--nm-gray-800);
    min-height: 100vh;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--nm-font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--nm-gray-900);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

a {
    color: var(--nm-primary);
    text-decoration: none;
    transition: color var(--nm-transition-fast);
}

a:hover {
    color: var(--nm-primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========================================
   UTILITY CLASSES
======================================== */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--nm-spacing-xl);
}

.section {
    padding: var(--nm-spacing-3xl) 0;
    position: relative;
}

.text-center {
    text-align: center;
}

.text-gradient {
    background: linear-gradient(135deg, var(--nm-primary) 0%, var(--nm-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   GLASSMORPHISM COMPONENTS - ULTRA PREMIUM
======================================== */
.glass-card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--nm-radius-xl);
    box-shadow:
        0 8px 32px rgba(13, 148, 136, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transition: all var(--nm-transition-normal);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            transparent);
    transition: left 0.7s ease;
}

.glass-card:hover::before {
    left: 100%;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-10px) scale(1.02);
    box-shadow:
        0 25px 60px rgba(13, 148, 136, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.glass-card-solid {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--nm-radius-xl);
    box-shadow: var(--nm-3d-shadow);
    transition: all var(--nm-transition-normal);
}

.glass-card-solid:hover {
    transform: translateY(-12px);
    box-shadow:
        0 4px 8px rgba(13, 148, 136, 0.08),
        0 8px 16px rgba(13, 148, 136, 0.1),
        0 16px 32px rgba(13, 148, 136, 0.12),
        0 32px 64px rgba(13, 148, 136, 0.15);
}

/* ========================================
   PRODUCT DETAILS PANEL (3D & GLASS)
======================================== */
.product-details-panel {
    display: none;
    padding-bottom: var(--nm-spacing-3xl);
    animation: slideDownFade 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.product-details-panel.active {
    display: block;
}

.panel-glass-wrapper {
    position: relative;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--nm-radius-xl);
    padding: var(--nm-spacing-2xl);
    box-shadow:
        0 20px 40px rgba(13, 148, 136, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    overflow: visible;
    /* Allow 3D elements to pop out if needed */
}

/* Close Button */
.panel-close-btn {
    position: absolute;
    top: var(--nm-spacing-md);
    right: var(--nm-spacing-md);
    background: rgba(255, 255, 255, 0.5);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--nm-gray-600);
    transition: all var(--nm-transition-fast);
    z-index: 10;
}

.panel-close-btn:hover {
    background: var(--nm-primary);
    color: white;
    transform: rotate(90deg);
}

/* Navigation Arrows */
.panel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--nm-primary);
    transition: all var(--nm-transition-fast);
    z-index: 5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.panel-nav:hover {
    background: var(--nm-primary);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.panel-nav.prev {
    left: -25px;
}

.panel-nav.next {
    right: -25px;
}

/* Inner Layout */
.panel-content-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: var(--nm-spacing-2xl);
    align-items: center;
}

/* Visuals (Left) */
.panel-visuals {
    perspective: 1000px;
}

.main-image-container {
    position: relative;
    padding: var(--nm-spacing-lg);
    background: white;
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
}

.main-image-container img {
    width: 100%;
    height: auto;
    border-radius: var(--nm-radius-lg);
    object-fit: contain;
    max-height: 400px;
}

/* Thumbnails */
.panel-thumbnails {
    display: flex;
    justify-content: center;
    gap: var(--nm-spacing-sm);
    margin-top: var(--nm-spacing-md);
    padding: var(--nm-spacing-xs);
    overflow-x: auto;
    scrollbar-width: none;
    /* Firefox */
}

.panel-thumbnails::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.panel-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: var(--nm-radius-md);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--nm-transition-fast);
    background: white;
    flex-shrink: 0;
}

.panel-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.panel-thumbnail:hover {
    transform: translateY(-2px);
}

.panel-thumbnail.active {
    border-color: var(--nm-primary);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2);
    transform: scale(1.05);
}

/* Info (Right) */
.panel-info {
    text-align: left;
}

.panel-category-badge {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--nm-spacing-xs);
    display: inline-block;
}

.panel-title {
    font-size: 2.5rem;
    margin-bottom: var(--nm-spacing-md);
    background: linear-gradient(90deg, var(--nm-gray-900), var(--nm-primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.panel-description p {
    font-size: 1.1rem;
    color: var(--nm-gray-600);
    margin-bottom: var(--nm-spacing-xl);
    line-height: 1.8;
}

/* Features List */
.panel-features-container h3 {
    font-size: 1.2rem;
    margin-bottom: var(--nm-spacing-md);
    color: var(--nm-gray-800);
    border-bottom: 2px solid var(--nm-primary-light);
    display: inline-block;
    padding-bottom: 5px;
}

.panel-features-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--nm-spacing-md);
    margin-bottom: var(--nm-spacing-xl);
}

.panel-features-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--nm-gray-700);
    font-size: 0.95rem;
}

.panel-features-list li::before {
    content: '?';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--nm-success);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    flex-shrink: 0;
}

/* Animations */
@keyframes slideDownFade {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
    .panel-content-grid {
        grid-template-columns: 1fr;
        gap: var(--nm-spacing-lg);
    }

    .panel-nav.prev {
        left: 0;
    }

    .panel-nav.next {
        right: 0;
    }

    .panel-visuals {
        order: -1;
    }
}

/* ========================================
   MOBILE IMAGE FIXES (USER REQUEST)
======================================== */
.product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    /* Force square aspect ratio */
    overflow: hidden;
    position: relative;
    border-radius: var(--nm-radius-lg);
    background: #f0fdfa;
    /* Light teal background fallback */
}

.product-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    /* Fill the frame completely */
    object-position: center;
    border-radius: var(--nm-radius-lg);
    display: block;
}

/* ========================================
   LANDSCAPE / HERO SLIDE FIX
   Fixes small images in horizontal mobile view
======================================== */
@media (max-width: 900px) and (orientation: landscape) {
    .hero-image-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .hero-image-wrapper img {
        width: 100% !important;
        max-width: 400px !important;
        /* Scale up but keep reasonable */
        height: auto !important;
        object-fit: contain !important;
        margin: 0 auto;
    }

    .hero-slide .container {
        padding-top: 20px;
        padding-bottom: 20px;
    }
}

/* Ensure hero images are responsive */
.hero-image-wrapper img {
    max-width: 100%;
    height: auto;
}

/* ========================================
   ANIMATIONS
======================================== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}