/* ===================================================================
   Modern Header & Footer overlay — tnawrna.com
   Layers modern styling on top of existing Martfury markup.
   No structural HTML changes — preserves all plugin functionality.
   =================================================================== */

:root {
    --mh-primary: #f97316;
    --mh-primary-dark: #ea580c;
    --mh-accent: #fbbf24;
    --mh-dark: #0f172a;
    --mh-darker: #0a0f1d;
    --mh-text: #1e293b;
    --mh-text-muted: #64748b;
    --mh-border: #e2e8f0;
    --mh-bg-soft: #f8fafc;
}

/* =============================================================
   HEADER — modernize without breaking functionality
   ============================================================= */
body { font-family: 'Inter', 'Cairo', system-ui, -apple-system, sans-serif !important; }
[dir="rtl"] body { font-family: 'Cairo', 'Inter', system-ui, sans-serif !important; }

.header.header--1 {
    position: sticky;
    top: 0;
    z-index: 999;
    background: #fff;
    box-shadow: 0 2px 8px -2px rgba(0, 0, 0, .04);
    transition: box-shadow .25s ease, padding .25s ease;
    border-bottom: 1px solid var(--mh-border);
}
.header.header--1.is-scrolled {
    box-shadow: 0 8px 28px -10px rgba(0, 0, 0, .15);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(12px);
}

/* Top header row — logo + search + actions */
.header.header--1 .header__top {
    padding: 14px 0;
    background: transparent;
    border: 0;
}
.header.header--1 .ps-container {
    max-width: 1280px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Department menu toggle */
.header.header--1 .menu--product-categories .menu__toggle {
    background: linear-gradient(135deg, var(--mh-primary) 0%, var(--mh-primary-dark) 100%) !important;
    color: #fff !important;
    border-radius: 999px !important;
    padding: 10px 22px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    border: 0 !important;
    box-shadow: 0 6px 16px -4px rgba(249, 115, 22, .35);
    transition: all .25s ease;
    height: auto !important;
    line-height: 1.2 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}
.header.header--1 .menu--product-categories .menu__toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px -4px rgba(249, 115, 22, .5);
}
.header.header--1 .menu--product-categories .menu__toggle i { font-size: 18px !important; }

/* Logo */
.header.header--1 .ps-logo {
    margin-inline-start: 16px;
    display: inline-flex;
    align-items: center;
    transition: transform .25s ease;
}
.header.header--1 .ps-logo:hover { transform: scale(1.04); }
.header.header--1 .ps-logo img { max-height: 44px !important; }

/* Search box */
.header.header--1 .header__center {
    flex: 1;
    margin: 0 16px;
}
.header.header--1 .ps-form--quick-search {
    background: var(--mh-bg-soft);
    border: 2px solid transparent;
    border-radius: 999px !important;
    padding: 4px 4px 4px 6px;
    display: flex;
    align-items: center;
    height: 50px;
    transition: all .25s ease;
    box-shadow: none;
}
.header.header--1 .ps-form--quick-search:focus-within {
    background: #fff;
    border-color: var(--mh-primary);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, .12);
}
.header.header--1 .ps-form--quick-search .form-group--icon {
    border: 0 !important;
    border-inline-end: 1px solid var(--mh-border) !important;
    padding-inline-end: 10px !important;
    margin-inline-end: 6px;
    height: 30px !important;
    min-width: 110px;
}
.header.header--1 .ps-form--quick-search .product-cat-label {
    color: var(--mh-text-muted) !important;
    font-weight: 600 !important;
    font-size: 13px !important;
}
.header.header--1 .ps-form--quick-search .form-control.product-category-select { display: none !important; }
.header.header--1 .ps-form--quick-search .input-search-product {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 14px;
    color: var(--mh-text) !important;
    padding-inline-start: 4px !important;
}
.header.header--1 .ps-form--quick-search .input-search-product::placeholder { color: var(--mh-text-muted); }
.header.header--1 .ps-form--quick-search button[type=submit] {
    background: linear-gradient(135deg, var(--mh-primary) 0%, var(--mh-primary-dark) 100%) !important;
    color: #fff !important;
    border-radius: 999px !important;
    padding: 0 24px !important;
    height: 42px !important;
    font-weight: 700 !important;
    border: 0 !important;
    transition: all .2s;
    white-space: nowrap;
    font-size: 14px !important;
}
.header.header--1 .ps-form--quick-search button[type=submit]:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px -4px rgba(249, 115, 22, .45);
}

/* Right actions: compare, wishlist, cart, user */
.header.header--1 .header__actions {
    display: flex;
    align-items: center;
    gap: 14px;
}
.header.header--1 .header__extra {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--mh-bg-soft);
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    color: var(--mh-text) !important;
    transition: all .25s ease;
    border: 0 !important;
}
.header.header--1 .header__extra:hover {
    background: var(--mh-primary);
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px -4px rgba(249, 115, 22, .35);
}
.header.header--1 .header__extra > i,
.header.header--1 .header__extra > span > i { font-size: 18px !important; }
.header.header--1 .header__extra > span {
    position: absolute !important;
    top: -4px !important;
    inset-inline-end: -4px !important;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: #fff !important;
    width: 22px !important;
    height: 22px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    border: 2px solid #fff;
}
.header.header--1 .header__extra > span i { font-style: normal; }

/* User block */
.header.header--1 .ps-block--user-header {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: var(--mh-bg-soft);
    border-radius: 999px;
    transition: all .25s ease;
}
.header.header--1 .ps-block--user-header:hover {
    background: rgba(249, 115, 22, .08);
}
.header.header--1 .ps-block--user-header .ps-block__left i {
    font-size: 22px !important;
    color: var(--mh-primary);
}
.header.header--1 .ps-block--user-header .ps-block__right {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.header.header--1 .ps-block--user-header .ps-block__right a {
    font-size: 13px !important;
    color: var(--mh-text) !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}
.header.header--1 .ps-block--user-header .ps-block__right a:first-child {
    color: var(--mh-text-muted) !important;
    font-size: 11px !important;
    font-weight: 500 !important;
}

/* Bottom navigation row */
.header.header--1 .navigation {
    background: var(--mh-dark);
    border-top: 0;
}
.header.header--1 .navigation > .ps-container {
    padding: 0 20px;
    min-height: 50px;
}
.header.header--1 .navigation .menu > li > a,
.header.header--1 .navigation__extra > li > a,
.header.header--1 .navigation__extra > li .ps-dropdown > a {
    color: rgba(255, 255, 255, .85) !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    padding: 14px 18px !important;
    transition: color .2s ease;
    text-decoration: none !important;
}
.header.header--1 .navigation .menu > li > a:hover,
.header.header--1 .navigation__extra > li > a:hover,
.header.header--1 .navigation__extra > li .ps-dropdown > a:hover { color: var(--mh-accent) !important; }
.header.header--1 .navigation .menu > li.current-menu-item > a,
.header.header--1 .navigation .menu > li.active > a { color: var(--mh-accent) !important; }

/* Country/currency dropdowns inside dark navigation */
.header.header--1 .navigation .ps-dropdown-menu {
    background: #fff !important;
    border: 1px solid var(--mh-border) !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, .15);
    padding: 8px !important;
    margin-top: 4px;
}
.header.header--1 .navigation .ps-dropdown-menu li a {
    color: var(--mh-text) !important;
    padding: 8px 12px !important;
    border-radius: 8px;
    font-weight: 500;
}
.header.header--1 .navigation .ps-dropdown-menu li a:hover {
    background: var(--mh-bg-soft) !important;
    color: var(--mh-primary) !important;
}

/* Department menu toggle inside dark navigation row */
.header.header--1 .navigation .menu--product-categories .menu__toggle {
    background: rgba(255, 255, 255, .1) !important;
    color: #fff !important;
    box-shadow: none;
}
.header.header--1 .navigation .menu--product-categories .menu__toggle:hover {
    background: rgba(255, 255, 255, .18) !important;
}

/* Mobile bottom-bar — modernize */
.navigation--list {
    background: rgba(255, 255, 255, .96) !important;
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--mh-border) !important;
    box-shadow: 0 -8px 24px -8px rgba(0, 0, 0, .1);
}
.navigation--list .navigation__item {
    color: var(--mh-text-muted) !important;
}
.navigation--list .navigation__item:hover,
.navigation--list .navigation__item.active { color: var(--mh-primary) !important; }
.navigation--list .navigation__item i { font-size: 20px !important; }

/* =============================================================
   FOOTER — dark gradient, modern layout
   ============================================================= */
.ps-footer {
    background: linear-gradient(135deg, var(--mh-dark) 0%, #1e1b4b 100%) !important;
    color: rgba(255, 255, 255, .85) !important;
    margin-top: 0 !important;
    padding: 70px 0 0 !important;
    position: relative;
    overflow: hidden;
}
.ps-footer::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 15% 0%, rgba(249, 115, 22, .12), transparent 40%),
                radial-gradient(circle at 85% 100%, rgba(99, 102, 241, .12), transparent 40%);
    pointer-events: none;
}
.ps-footer > .ps-container {
    max-width: 1280px;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

/* Footer widgets */
.ps-footer__widgets {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px !important;
    padding-bottom: 50px !important;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    flex: none !important;
    flex-wrap: nowrap !important;
}
.ps-footer__widgets > aside,
.ps-footer__widgets > .widget {
    flex: none !important;
    width: auto !important;
}
.ps-footer .widget-title,
.ps-footer .widget_footer h3,
.ps-footer h4 {
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    margin-bottom: 22px !important;
    position: relative;
    padding-bottom: 12px;
}
.ps-footer .widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    inset-inline-start: 0;
    width: 36px;
    height: 3px;
    background: linear-gradient(90deg, var(--mh-primary), var(--mh-accent));
    border-radius: 2px;
}
.ps-footer .widget_content,
.ps-footer .widget_footer ul,
.ps-footer .widget_text {
    color: rgba(255, 255, 255, .7) !important;
    font-size: 14px !important;
    line-height: 1.8;
}
.ps-footer .widget_content p,
.ps-footer .widget_text p { color: rgba(255, 255, 255, .7) !important; }
.ps-footer .widget_content h3 {
    color: var(--mh-accent) !important;
    font-size: 22px !important;
    font-weight: 800 !important;
    margin: 4px 0 12px !important;
    padding: 0 !important;
}
.ps-footer .widget_content h3::after { display: none; }
.ps-footer ul li {
    list-style: none !important;
    padding: 5px 0 !important;
    position: relative;
}
.ps-footer ul li a,
.ps-footer .widget_content a {
    color: rgba(255, 255, 255, .7) !important;
    text-decoration: none !important;
    transition: all .2s ease;
    font-size: 14px;
    display: inline-block;
}
.ps-footer ul li a:hover,
.ps-footer .widget_content a:hover {
    color: var(--mh-accent) !important;
    transform: translateX(4px);
}
[dir="rtl"] .ps-footer ul li a:hover,
[dir="rtl"] .ps-footer .widget_content a:hover {
    transform: translateX(-4px);
}

/* Social icons */
.ps-footer .ps-list--social {
    display: flex !important;
    gap: 10px !important;
    margin-top: 18px !important;
    padding: 0 !important;
}
.ps-footer .ps-list--social li {
    padding: 0 !important;
}
.ps-footer .ps-list--social li a {
    width: 40px;
    height: 40px;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, .08) !important;
    border: 1px solid rgba(255, 255, 255, .12) !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    transition: all .25s ease;
}
.ps-footer .ps-list--social li a:hover {
    background: linear-gradient(135deg, var(--mh-primary), var(--mh-primary-dark)) !important;
    transform: translateY(-3px) !important;
    border-color: transparent !important;
    box-shadow: 0 8px 20px -4px rgba(249, 115, 22, .5);
}

/* Bottom links bar */
.ps-footer__links {
    padding: 30px 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

/* Footer copyright */
.ps-footer__copyright {
    padding: 25px 0 !important;
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    border-top: 0 !important;
}
.ps-footer__copyright .site-copyright,
.ps-footer__copyright p {
    color: rgba(255, 255, 255, .55) !important;
    margin: 0 !important;
    font-size: 13px;
}
.ps-footer__copyright a { color: var(--mh-accent) !important; }
.ps-footer__copyright .footer-payments {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.ps-footer__copyright .payment-method-title {
    color: rgba(255, 255, 255, .7);
    font-size: 13px;
    font-weight: 600;
}
.ps-footer__copyright .footer-payments span img {
    height: 28px;
    background: #fff;
    padding: 4px 8px;
    border-radius: 6px;
    transition: transform .2s ease;
}
.ps-footer__copyright .footer-payments span img:hover { transform: scale(1.08); }

/* Back to top button */
#back2top {
    background: linear-gradient(135deg, var(--mh-primary) 0%, var(--mh-primary-dark) 100%) !important;
    color: #fff !important;
    box-shadow: 0 12px 28px -6px rgba(249, 115, 22, .5) !important;
    border-radius: 50% !important;
    width: 48px !important;
    height: 48px !important;
    transition: all .25s ease !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border: 0 !important;
}
#back2top:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 16px 36px -6px rgba(249, 115, 22, .65) !important;
}
#back2top i { font-size: 20px !important; }

/* Newsletter popup */
.ps-popup#subscribe .ps-popup__content {
    border-radius: 24px !important;
    overflow: hidden;
}

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 991px) {
    .header.header--1 .header__center { display: none; }
    .header.header--1 .ps-container { gap: 12px; }
    .ps-footer { padding: 50px 0 0 !important; }
    .ps-footer__widgets { gap: 30px !important; padding-bottom: 30px !important; }
}
@media (max-width: 600px) {
    .header.header--1 .menu--product-categories .menu__toggle { padding: 8px 14px !important; font-size: 12px !important; }
    .header.header--1 .ps-block--user-header { display: none !important; }
    .header.header--1 .header__actions { gap: 8px; }
    .header.header--1 .header__extra { width: 38px; height: 38px; }
    .ps-footer__copyright { flex-direction: column; text-align: center; }
}
