/* ===== CUSTOM LANDING PAGE STYLES ===== */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


body {
    display: flex;
    flex-direction: column;
}

/* ===== FLEXBOX LAYOUT SYSTEM ===== */
.layoutt{
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    background-image: url('../images/webbackround.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: repeat;
    background-attachment: fixed;
}

/* ===== MAIN CONTENT AREA ===== */
.main-content {
    width: 100%;
    margin-top: 120px;
}


/* ===== PAGE SPECIFIC STYLES ===== */
/* .landing-page,
.contact-page,
.homepage-content {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1;
} */



/* ===== MODERN RESPONSIVE NAVBAR STYLES ===== */
.modern-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
    width: 100%;
}

.modern-navbar.scrolled {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.navbar-left,
.navbar-right {
    flex: 0 0 auto;
    width: 60px; /* Fixed width for symmetry */
}

.navbar-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.navbar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar-logo {
    height: 100px;
    transition: all 0.3s ease;
}

.modern-navbar.scrolled .navbar-logo {
    height: 50px;
}

/* ===== MODERN PROFESSIONAL MENU TOGGLE BUTTON ===== */
.menu-toggle-btn {
    padding: 0.8rem;
    cursor: pointer;
    border-radius: 16px;
    position: relative;
    z-index: 1001;
    overflow: hidden;
    background: none;
    border: none;
}


.menu-icon {
    width: 40px;
}



.menu-toggle-btn:active {
    transform: translateY(0) scale(0.98);
    transition: all 0.1s ease;
}


.menu-toggle-btn.active .menu-icon {
    transform: scale(1.1);
}

.menu-toggle-btn.hover-effect {
    animation: buttonPulse 0.6s ease;
}

@keyframes buttonPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Navbar Spacer */
.navbar-spacer {
    width: 50px; /* Same width as menu button to center logo */
}

/* ===== MODERN PROFESSIONAL DROPDOWN MENU STYLES ===== */
.dropdown-container {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 10px;
    left: 30px;
    display: none;
    z-index: 1000;
    margin-top: 0.5rem;
    min-width: 280px;
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: none;
    border-radius: 16px;
    border: none;
    overflow: hidden;
}

.dropdown-menu.show {
    display: block;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.dropdown-menu.animate-in {
    animation: menuSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes menuSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dropdown-content {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: transparent;
}

.dropdown-links {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    align-items: stretch;
}

.dropdown-link {
    color: #000000;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: block;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.dropdown-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    transition: left 0.5s ease;
    background: none;
    transform: scale(1.1);
}

.dropdown-link:hover::before {
    left: 100%;
    transform: scale(1.1);
}

.dropdown-link:hover {
    color: #000000;
    text-decoration: none;
    transform: translateX(8px);
    font-size: 1.1em !important;
    transition: font-size 0.3s ease;
}

.category-sub:hover {
    color: #000000 !important;
    transform: translateX(5px) !important;
    font-size: 1.1em !important;
    transition: font-size 0.3s ease;
}

.dropdown-link.animate-item {
    animation: itemFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes itemFadeIn {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Menu backdrop effect */
body.menu-open::before {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('../images/background_menu_phone.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 99999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow: hidden;
}

@keyframes backdropFadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}



/* Responsive Styles */
@media (max-width: 768px) {
    .navbar-logo {
        height: 50px;
    }
    
    .modern-navbar.scrolled .navbar-logo {
        height: 40px;
    }
    
    .menu-content {
        width: 95%;
    }
    
    .menu-link {
        font-size: 1.2rem;
    }
    
    .modern-navbar {
        padding: 0.75rem 0;
    }
    
    .menu-icon {
        width: 40px;
        height: auto;
    }
    
    /* Ajustement de l'espacement pour mobile */
    
    .geometric-icon {
        width: 35px;
        height: 35px;
    }
    
    .diamond {
        width: 10px;
        height: 10px;
    }
    
    .line {
        height: 10px;
    }
    
    .line-3,
    .line-4 {
        width: 10px;
    }
    
    .dropdown-link {
        font-size: 0.9rem;
        letter-spacing: 0.5px;
        padding: 0.4rem 0.8rem;
    }
    
    /* Mobile centering adjustments */
    .navbar-left,
    .navbar-right {
        width: 10px; /* Smaller width on mobile */
        margin-right: 14px;
    }
    
    .navbar-center {
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .navbar-logo {
        height: 50px;
    }
    
    .modern-navbar.scrolled .navbar-logo {
        height: 40px;
    }
    
    .modern-navbar {
        padding: 0.5rem 0;
    }
    
    .navbar-left,
    .navbar-right {
        width: 40px; /* Even smaller width on very small screens */
        margin-right: 14px;
    }
    
    .menu-icon {
        width: 40px;
        height: auto;
    }
    
    .menu-link {
        font-size: 1.1rem;
    }
    
    .modern-navbar {
        padding: 0.5rem 0;
    }
    
    
    .dropdown-menu {
        position: absolute;
        top: 15px;
        left: 30px;
        min-width: 250px;
    }
    
    .dropdown-link {
        font-size: 0.85rem;
        letter-spacing: 0.3px;
        padding: 0.6rem 1rem;
    }
    
    .menu-toggle-btn {
        padding: 0.6rem;
        border-radius: 12px;
    }

}

/* ===== FOOTER STYLES ===== */
footer.custom-footer {
    width: 100%;
    padding : 0;
}

/* Footer Left Section */
.footer-left {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}


/* Footer Center Section */
.footer-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-logo {
    height: 40px;
    width: auto;
}

.footer-logo:hover {
    transform: scale(1.05);
}

/* Footer Right Section */
.footer-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}


.footer-link {
    color: #000000;
    text-decoration: none;
    font-weight: 400;
    font-size: 1.3rem;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    transition: all 0.3s ease;
    text-align: right;
}

.footer-link:hover {
    color: #ffffff;
    text-decoration: none;
    transform: translateX(-2px);
}

.origin-maroc{
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: center;
}
.logo-maroc{
    width: 30px;
    margin-left: 5px;
}

/* Mobile Footer Styles */
@media (max-width: 768px) {
    
    .custom-footer {
        padding: 1rem 0;
    }
    
    .footer-left,
    .footer-right {
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
    }
    
    .footer-center {
        order: -1;
        margin-bottom: 1rem;
    }
    
    .footer-logo {
        height: 35px;
    }
    
    .footer-text {
        font-size: 0.9rem;
    }
    
    .footer-link {
        font-size: 0.8rem;
        padding: 0.2rem 0.6rem;
    }

}

@media (max-width: 480px) {
    
    .footer-left,
    .footer-right {
        flex-direction: column;
        gap: 0.3rem;
    }
    
    .footer-logo {
        height: 30px;
    }
    
    .footer-text {
        font-size: 0.8rem;
    }
    
    .footer-link {
        font-size: 0.7rem;
    }
}


/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    /* Main content adjustments */

    

    
    /* Landing page adjustments */
    .landing-title {
        font-size: 2.5rem;
    }
    
    .landing-subtitle {
        font-size: 1.2rem;
    }
    
    .landing-page-container {
        padding: 1rem;
    }
    
    /* Footer adjustments */
    .custom-footer {
        padding: 1rem 0;
    }
    
    .footer-logo-section {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .footer-nav {
        justify-content: center;
        margin-top: 1rem;
    }
}

@media (max-width: 480px) {
    /* Main content adjustments */
    
    /* Landing page adjustments */
    .landing-title {
        font-size: 2rem;
    }
    
    .landing-subtitle {
        font-size: 1rem;
    }
    
    .landing-button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .landing-page-container {
        padding: 0.5rem;
    }
    
    /* Navbar adjustments */
    .navbar-logo {
        height: 50px;
    }
    
    /* Footer adjustments */
    .footer-logo {
        height: 25px;
    }
}

/* ===== HIERARCHICAL CATEGORIES STYLES ===== */

.category-main {
    font-weight: 600 !important;
    color: #2c3e50 !important;
    border-bottom: 1px solid #ecf0f1;
    margin-bottom: 0.2rem !important;
}

.category-main:hover {
    background: #3498db !important;
    color: white !important;
}

.subcategories {
    margin-left: 0; 
    padding-left: 0;
}

.category-sub {
    font-size: 1.1rem !important;
    display: block;
    text-decoration: none;
    transition: all 0.3s ease;
}

.category-sub:hover {
    color: #000000 !important;
    transform: translateX(5px) !important;
    font-size: 1.1em !important;
    transition: font-size 0.3s ease;
}

/* ===== CART BUTTON STYLES ===== */
.cart-container {
    position: relative;
    display: flex;
    align-items: center;
}

.cart-btn {
    position: relative;
    background: none;
    border: none;
    color:black;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 600;
}

.cart-btn:hover {
    transform: scale(1.1);
}

.cart-count {
    top: -5px;
    right: -5px;
    background: none;
    color: rgb(0, 0, 0);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    animation: cartPulse 0.3s ease-in-out;
}

.cart-count.hidden {
    display: none;
}

@keyframes cartPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Responsive adjustments for categories and cart */
@media (max-width: 768px) {
    .subcategories {
        margin-left: 0.5rem;
    }
    
    .category-sub {
        font-size: 0.8rem !important;
    }
    
    .cart-btn {
        font-size: 1.3rem;
    }
    
    .cart-count {
        width: 18px;
        height: 18px;
        font-size: 0.6rem;
    }
}

/* ===== MOBILE FULLSCREEN MENU STYLES ===== */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('../images/background_menu_phone.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 99999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow: hidden;
}

.mobile-menu-overlay.active {
    display: flex;
    opacity: 1;
}

/* Hide all other content when mobile menu is open */
body.mobile-menu-open {
    overflow: hidden;
}

body.mobile-menu-open .modern-navbar,
body.mobile-menu-open .main-content,
body.mobile-menu-open footer,
body.mobile-menu-open .layoutt > *:not(.mobile-menu-overlay) {
    display: none !important;
}

.mobile-menu-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem 2rem 2rem;
    position: relative;
    box-sizing: border-box;
}

.mobile-menu-top {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 100000;
}

.mobile-menu-toggle-btn {
    padding: 0.8rem;
    cursor: pointer;
    border-radius: 16px;
    position: relative;
    z-index: 100001;
    overflow: hidden;
    background: none;
    border: none;
    transition: all 0.3s ease;
}

.mobile-menu-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.mobile-menu-toggle-btn:active {
    transform: translateY(0) scale(0.98);
    transition: all 0.1s ease;
}

.mobile-menu-icon {
    width: 40px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    margin-top: 2rem;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.mobile-menu-link {
    color: #000000;
    text-decoration: none;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
    transition: all 0.3s ease;
    min-width: 250px;
}

.mobile-menu-link:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    color: #ffffff;
    text-decoration: none;
    border-color: rgba(255, 255, 255, 0.5);
}

.mobile-category-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    align-items: center;
}

.mobile-subcategories {
    display: flex;
    flex-direction: column;
    align-items: center;
}


.mobile-category-sub:hover {
    background: rgba(0, 0, 0, 0.5) !important;
    transform: translateY(-2px) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

.mobile-menu-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mobile-menu-name {
    max-width: 220px;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.mobile-menu-logo {
    max-width: 180px;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.mobile-menu-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-close:hover {
    transform: scale(1.15);
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.mobile-close-icon {
    width: 60px;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* Hide mobile menu on desktop */
@media (min-width: 769px) {
    .mobile-menu-overlay {
        display: none !important;
    }
    
    /* Ensure desktop dropdown works properly */
    .dropdown-menu {
        display: none;
    }
    
    .dropdown-menu.show {
        display: block;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 480px) {
    .mobile-menu-content {
        padding: 2rem 1rem;
    }
    
    .mobile-menu-top {
        top: 0.8rem;
        left: 0.8rem;
    }
    
    .mobile-menu-toggle-btn {
        padding: 0.6rem;
    }
    
    .mobile-menu-icon {
        width: 35px;
    }
    
    .mobile-menu-links {
        margin-top: 1rem;
        gap: 0rem;
    }
    
    .mobile-menu-link {
        font-size: 1.4rem;
        min-width: 220px;
        letter-spacing: 1.5px;
    }
    
    .mobile-category-sub {
        font-size: 1.2rem !important;
        min-width: 200px !important;
    }
    
    .mobile-menu-name {
        max-width: 150px;
    }
    
    .mobile-menu-logo {
        max-width: 150px;
    }
    
    .mobile-close-icon {
        width: 55px;
    }
    
    .mobile-menu-bottom {
        gap: 0rem;
        margin-bottom: 2rem;
        padding: 1.5rem;
    }
    
    .mobile-menu-close {
        padding: 0.8rem;
    }
}

/* Additional mobile optimizations */
@media (max-width: 768px) {
    /* Hide desktop dropdown on mobile */
    .dropdown-menu {
        display: none !important;
    }
    
    /* Ensure mobile menu is properly positioned */
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
    }
    
    /* Prevent body scroll when mobile menu is open */
    body.mobile-menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
    
    /* Tablet adjustments */
    .mobile-menu-content {
        padding: 2.5rem 2rem;
    }
    
    
    .mobile-menu-link {
        font-size: 1.5rem;
        min-width: 240px;
    }
    
    .mobile-category-sub {
        font-size: 1.25rem !important;
    }
}

/* ===== SCROLL BEHAVIOR ===== */
html {
    scroll-behavior: smooth;
}

/* ===== LOADING ANIMATION ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
