/* =======================================================
   MASTER HEADER - ARCHITECTURE (AMAZON STYLE)
======================================================= */
.artmc-master-header-wrapper { width: 100%; position: relative; z-index: 9999; transition: all 0.3s ease; }
.artmc-master-header { width: 100%; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.artmc-container { max-width: 1200px; margin: 0 auto; padding: 0 15px; width: 100%; box-sizing: border-box; }
.artmc-flex-row { display: flex; align-items: center; justify-content: space-between; width: 100%; flex-wrap: nowrap; }
.artmc-justify-end { justify-content: flex-end; }
.desktop-only { display: block !important; }
.mobile-only { display: none !important; }

/* STICKY HEADER ANIMATION & BEHAVIOR */
.artmc-master-header-wrapper.is-sticky { 
    position: fixed !important; 
    top: 0; 
    left: 0; 
    width: 100%; 
    z-index: 99999; 
    box-shadow: 0 5px 20px rgba(0,0,0,0.08); 
    animation: artmcSlideDown 0.4s ease-in-out; 
}
@keyframes artmcSlideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }

/* --- ROW 1: TOP BAR --- */
.artmc-row-topbar { background-color: #232f3e; color: #fff; padding: 6px 0; font-size: 13px; }
.artmc-tb-col { display: flex; align-items: center; gap: 15px; }
.artmc-row-topbar a { color: #fff; text-decoration: none; transition: 0.3s; display: inline-flex; align-items: center; gap: 6px; }
.artmc-row-topbar a:hover { color: #f0c14b; }
.artmc-inline-menu { list-style: none; padding: 0; margin: 0; display: flex; gap: 15px; }
.artmc-tb-item { display: inline-flex; align-items: center; gap: 6px; }
.artmc-tb-text { display: inline-block; }
.artmc-row-topbar i, .artmc-row-topbar svg { flex-shrink: 0 !important; width: 1em; height: 1em; display: inline-flex; align-items: center; justify-content: center; }

/* --- ROW 2: MAIN HEADER --- */
.artmc-row-main { padding: 15px 0; background-color: #fff; }
.artmc-logo { flex-shrink: 0; display: flex; align-items: center; margin-right: 20px; }
[dir="rtl"] .artmc-logo { margin-right: 0; margin-left: 20px; }
.artmc-logo img { max-width: 100%; height: auto; display: block; }
.artmc-logo h3 { margin: 0; font-size: 24px; color: #333; }

/* Main Navigation */
.artmc-main-nav { flex: 1 1 auto; display: flex; justify-content: center; }
.artmc-main-nav ul.artmc-main-menu-ul { list-style: none; padding: 0; margin: 0; display: flex; align-items: center; position: relative; flex-wrap: wrap; justify-content: center; }
.artmc-main-nav li { position: relative; }
.artmc-main-nav ul.artmc-main-menu-ul > li > a { text-decoration: none; transition: 0.3s; display: block; white-space: nowrap; }

/* RTL Compatible Nav Dividers */
.artmc-main-nav ul.artmc-main-menu-ul > li:last-child::after { display: none !important; }
[dir="rtl"] .artmc-main-nav ul.artmc-main-menu-ul > li:first-child::after { display: none !important; }

/* Submenu Indicators */
.artmc-main-nav.has-submenu-indicator li.menu-item-has-children > a::after { font-family: "Font Awesome 5 Free"; font-weight: 900; display: inline-block; transition: transform 0.3s ease; }
[dir="rtl"] .artmc-main-nav.has-submenu-indicator li.menu-item-has-children > a::after { margin-right: 5px; }
.artmc-icon-angle-down li.menu-item-has-children > a::after { content: "\f107"; }
.artmc-icon-chevron-down li.menu-item-has-children > a::after { content: "\f078"; }
.artmc-icon-caret-down li.menu-item-has-children > a::after { content: "\f0d7"; }
.artmc-icon-plus li.menu-item-has-children > a::after { content: "\f067"; }
.artmc-main-nav li.menu-item-has-children:hover > a::after { transform: rotate(180deg); }

/* Dropdown Sub-menu Base */
.artmc-main-nav ul.sub-menu { position: absolute; top: 100%; right: 0; background: #fff; min-width: 220px; display: flex; flex-direction: column; opacity: 0; visibility: hidden; transition: all 0.3s ease; z-index: 9999; list-style: none; padding: 0; margin: 0; }
[dir="ltr"] .artmc-main-nav ul.sub-menu { right: auto; left: 0; }
.artmc-main-nav li:hover > ul.sub-menu { opacity: 1; visibility: visible; }
.artmc-main-nav ul.sub-menu a { display: block; white-space: normal; transition: 0.3s; text-decoration: none; }

/* Lang Switcher */
.artmc-lang-box { flex-shrink: 0; margin-left: 20px; }
[dir="rtl"] .artmc-lang-box { margin-left: 0; margin-right: 20px; }
.artmc-lang-list { list-style: none; padding: 0; margin: 0; display: flex; gap: 10px; }
.artmc-lang-list a { text-decoration: none; font-weight: bold; display: flex; align-items: center; gap: 5px; color: #333; }
.artmc-lang-list img { width: 18px; border-radius: 2px; }

/* --- ROW 3: COMMERCE BAR --- */
.artmc-row-woo { background-color: #fafafa; border-top: 1px solid #f1f1f1; padding: 8px 0; }
.artmc-row-woo .artmc-justify-end { display: flex !important; align-items: center !important; justify-content: flex-end !important; flex-wrap: nowrap !important; }
.artmc-woo-icon { position: relative; color: #333; text-decoration: none; font-size: 18px; transition: 0.3s; display: inline-flex !important; align-items: center !important; justify-content: center !important; margin: 0 !important; padding: 0 !important; }
.artmc-woo-icon:hover { color: #f0c14b; }
.artmc-badge { position: absolute; top: -8px; right: -10px; background: #d32f2f; color: #fff; font-size: 10px; font-weight: bold; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
[dir="rtl"] .artmc-badge { right: auto; left: -10px; }

/* =======================================================
   MOBILE LAYOUT (STRICT AMAZON STYLE)
======================================================= */
@media (max-width: 991px) {
    .desktop-only { display: none !important; }
    .mobile-only { display: block !important; }
    
    .artmc-row-main { padding: 10px 0; }
    .artmc-mobile-toggle { font-size: 24px; cursor: pointer; color: #333; }
    .artmc-logo { margin: 0 auto; }
    /* أزلنا قيد الـ max-height للسماح للإلمنتور بالتحكم الكامل عبر الـ Width */

    .artmc-mobile-actions { background-color: #232f3e; padding: 10px 0; }
    .artmc-mobile-actions .artmc-flex-row { gap: 15px; }
    
    .artmc-mobile-search-inline { flex-grow: 1; position: relative; display: flex; align-items: center; }
    .artmc-inline-search-input { width: 100%; padding: 10px 40px 10px 15px; border-radius: 4px; border: none; outline: none; font-size: 14px; }
    [dir="rtl"] .artmc-inline-search-input { padding: 10px 15px 10px 40px; }
    .artmc-mobile-search-inline i { position: absolute; right: 15px; color: #333; font-size: 16px; pointer-events: none; }
    [dir="rtl"] .artmc-mobile-search-inline i { right: auto; left: 15px; }
    
    .artmc-mobile-icons { display: flex !important; align-items: center !important; justify-content: flex-end !important; flex-wrap: nowrap !important; flex-shrink: 0; }
    .artmc-mobile-icons .artmc-woo-icon { color: #fff; font-size: 20px; }
    .artmc-mobile-icons .artmc-woo-icon:hover { color: #f0c14b; }
}

/* =======================================================
   OFF-CANVAS & SEARCH MODALS
======================================================= */
.artmc-mobile-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 99998; display: none; }
.artmc-mobile-sidebar { position: fixed; top: 0; left: -320px; width: 300px; height: 100%; background: #fff; z-index: 99999; box-shadow: 5px 0 15px rgba(0,0,0,0.1); transition: 0.4s ease; display: flex; flex-direction: column; overflow-y: auto; }
[dir="rtl"] .artmc-mobile-sidebar { left: auto; right: -320px; box-shadow: -5px 0 15px rgba(0,0,0,0.1); }
.artmc-mobile-sidebar.active { left: 0; }
[dir="rtl"] .artmc-mobile-sidebar.active { right: 0; }
.artmc-sidebar-header { padding: 20px; border-bottom: 1px solid #eee; display: flex; justify-content: flex-end; }
.artmc-sidebar-close { font-size: 30px; cursor: pointer; line-height: 1; color: #333; }
.artmc-mobile-nav { list-style: none; padding: 0; margin: 0; }
.artmc-mobile-nav li { border-bottom: 1px solid #f9f9f9; }
.artmc-mobile-nav a { display: block; padding: 15px 20px; text-decoration: none; font-weight: 600; color: #333; }

.artmc-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); z-index: 999999; display: none; align-items: center; justify-content: center; backdrop-filter: blur(5px); }
.artmc-modal-content { background: #fff; border-radius: 12px; position: relative; width: 90%; max-width: 420px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.artmc-modal-close { position: absolute; top: 15px; right: 15px; background: #f1f1f1; border: none; width: 35px; height: 35px; border-radius: 50%; font-size: 22px; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 10; color: #333; }
[dir="rtl"] .artmc-modal-close { right: auto; left: 15px; }
.artmc-modal-close:hover { background: #d32f2f; color: #fff; }

.artmc-search-container { width: 90%; max-width: 800px; text-align: center; }
#artmc-ajax-search-input { width: 100%; background: transparent; border: none; border-bottom: 2px solid #fff; font-size: 32px; padding: 15px 0; color: #fff; text-align: center; outline: none; }
.artmc-search-results-box { margin-top: 30px; max-height: 60vh; overflow-y: auto; text-align: left; }
[dir="rtl"] .artmc-search-results-box { text-align: right; }
.artmc-search-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 15px; }
.artmc-search-item { background: #fff; border-radius: 8px; padding: 10px; display: flex; gap: 15px; align-items: center; text-decoration: none; color: #333; transition: 0.3s; }
.artmc-search-item img { width: 60px; height: 60px; object-fit: cover; border-radius: 6px; }

/* =======================================================
   SMART FOOTER (BULLETPROOF ALIGNMENT)
======================================================= */
.artmc-smart-footer { width: 100%; display: block; overflow: hidden; }
.artmc-footer-main { padding: 60px 0; background-color: #1a1a1a; color: #ffffff; }

/* The Unbreakable Row */
.artmc-footer-row { display: flex; flex-wrap: wrap; margin: 0 -15px; }
.artmc-footer-col { flex: 1 1 20%; padding: 0 15px; min-width: 220px; display: block; box-sizing: border-box; }

/* Brand */
.artmc-footer-logo { margin-bottom: 20px; }
.artmc-footer-logo img { height: auto; } /* Removed display: block to obey text-align */
.artmc-brand-desc { line-height: 1.6; margin-bottom: 20px; font-size: 14px; opacity: 0.8; }

/* Social */
.artmc-footer-socials { display: flex; gap: 12px; flex-wrap: wrap; }
.artmc-footer-socials a { color: #fff; background: rgba(255,255,255,0.1); width: 35px; height: 35px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: 0.3s; text-decoration: none; }
.artmc-footer-socials a:hover { transform: translateY(-3px); }

/* Titles */
.artmc-footer-title { font-size: 18px; font-weight: bold; margin-bottom: 25px; margin-top: 0; color: #fff; display: flex; flex-direction: column; gap: 10px; }
.artmc-footer-title::after { content: ''; width: 40px; height: 2px; background: #2271b1; display: block; }

/* Menus */
.artmc-footer-menu-list { list-style: none; padding: 0; margin: 0; }
.artmc-footer-menu-list li { margin-bottom: 12px; }
.artmc-footer-menu-list a { color: #ccc; text-decoration: none; transition: 0.3s; display: inline-block; }

/* Form */
.artmc-newsletter-form { display: flex; flex-direction: column; gap: 12px; }
.artmc-form-inputs-stacked { display: flex; flex-direction: column; gap: 10px; }
.artmc-news-input { width: 100%; padding: 12px 15px; border: none; border-radius: 4px; background: rgba(255,255,255,0.05); color: #fff; outline: none; transition: 0.3s; box-sizing: border-box; }
.artmc-news-btn { padding: 12px 15px; border: none; border-radius: 4px; background: #2271b1; color: #fff; font-weight: bold; cursor: pointer; transition: 0.3s; text-align: center; display: inline-block;}

/* Bottom Bar */
.artmc-footer-bottom { background-color: #111; padding: 20px 0; font-size: 13px; color: #888; border-top: 1px solid rgba(255,255,255,0.05); }
.artmc-footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; }

/* Legal Menu */
.artmc-legal-list { list-style: none; padding: 0; margin: 0; display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap; }
.artmc-legal-list li { position: relative; display: flex; align-items: center; }
.artmc-legal-list a { color: #888; text-decoration: none; transition: 0.3s; }
.artmc-footer-developer a { color: #2271b1; text-decoration: none; transition: 0.3s; }

/* Mobile Stacking & Global Alignment Reset */
@media (max-width: 991px) { 
    .artmc-footer-row { flex-direction: column; gap: 40px; margin: 0; }
    .artmc-footer-col { flex: 1 1 100%; padding: 0; }
    .artmc-footer-bottom-inner { flex-direction: column; gap: 20px; } 
    /* The Elementor "Center" alignment control will take over here seamlessly */
}