:root {
    --aio-coral: #CF948D;
    --aio-coral2: #B6766F;
    --aio-cream: #FFF6DD;
    --aio-brown: #49302F;
}
/* HIDE the old Elementor header entirely + any DGWT search bar that lives outside our header */
header.elementor-location-header,
header.elementor-location-header * { display: none !important; }
body > .dgwt-wcas-search-wrapp,
body > .dgwt-wcas-search-wrapp * { display: none !important; }

.aio-header {
    position: sticky;
    top: 0;
    z-index: 999999;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid rgba(73, 48, 47, 0.06);
    transition: box-shadow .3s ease;
}
.aio-header__bar {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 1480px;
    margin: 0 auto;
    padding: 8px 24px;
}
.aio-header__logo-link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: transform .25s cubic-bezier(.16,1,.3,1);
}
.aio-header__logo-link:hover { transform: scale(1.04); }
.aio-header__logo,
header.aio-header img.aio-header__logo {
    height: 44px !important;
    max-height: 44px !important;
    width: auto !important;
    max-width: 240px !important;
    object-fit: contain !important;
    display: block !important;
    border-radius: 0 !important;
    transition: filter .25s ease;
}
.aio-header__logo-link:hover .aio-header__logo {
    filter: drop-shadow(0 4px 10px rgba(73, 48, 47, 0.14));
}

.aio-header__nav { flex: 1 1 auto; min-width: 0; overflow: visible; }
.aio-nav__list {
    display: flex !important;
    flex-wrap: nowrap;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
}
.aio-header__nav li {
    position: relative;
    list-style: none;
}
.aio-header__nav > .aio-nav__list > li > a,
.aio-header__nav .aio-nav__list > li > a {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--aio-brown);
    font-weight: 600;
    font-size: 14.5px;
    letter-spacing: .15px;
    text-decoration: none !important;
    transition: background .2s ease, color .2s ease;
    white-space: nowrap;
}
.aio-header__nav > .aio-nav__list > li > a:hover,
.aio-header__nav .current-menu-item > a,
.aio-header__nav .current-menu-ancestor > a {
    background: rgba(207, 148, 141, 0.10);
    color: var(--aio-coral2);
}
.aio-header__nav .menu-item-has-children > a::after {
    content: '▾';
    margin-inline-start: 2px;
    font-size: 8px;
    opacity: .6;
}

/* Dropdowns */
.aio-header__nav .sub-menu {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    left: auto !important;
    min-width: 220px !important;
    background: #fff !important;
    border-radius: 14px !important;
    box-shadow: 0 24px 50px rgba(73, 48, 47, 0.18) !important;
    border: 1px solid rgba(73, 48, 47, 0.06) !important;
    padding: 6px !important;
    list-style: none !important;
    margin: 0 !important;
    z-index: 1000000 !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
    display: block !important;
}
.aio-header__nav li:hover > .sub-menu,
.aio-header__nav li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.aio-header__nav .sub-menu li {
    display: block !important;
    width: 100%;
}
.aio-header__nav .sub-menu a {
    display: block !important;
    width: 100% !important;
    padding: 8px 14px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    color: var(--aio-brown) !important;
    transition: background .2s ease, color .2s ease !important;
    white-space: nowrap;
}
.aio-header__nav .sub-menu a:hover {
    background: var(--aio-cream) !important;
    color: var(--aio-coral2) !important;
}
.aio-header__nav .sub-menu .sub-menu {
    top: 0 !important;
    right: calc(100% + 6px) !important;
    left: auto !important;
}

.aio-header__search {
    flex: 0 0 180px;
    display: flex;
    align-items: center;
    background: var(--aio-cream);
    border-radius: 999px;
    padding: 4px 6px 4px 14px;
    border: 1px solid rgba(73, 48, 47, 0.08);
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.aio-header__search:focus-within {
    background: #fff;
    border-color: var(--aio-coral);
    box-shadow: 0 0 0 4px rgba(207, 148, 141, 0.16);
}
.aio-header__search input[type="search"] {
    flex: 1 1 auto;
    border: none !important;
    background: transparent !important;
    padding: 4px 4px !important;
    font-size: 14px !important;
    color: var(--aio-brown);
    outline: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    min-width: 0;
    height: auto !important;
}
.aio-header__search input[type="search"]::placeholder { color: rgba(73, 48, 47, 0.5); }
.aio-header__search button {
    background: linear-gradient(135deg, var(--aio-coral) 0%, var(--aio-coral2) 100%);
    color: #fff;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    cursor: pointer;
    flex: 0 0 auto;
    transition: transform .2s ease, box-shadow .2s ease;
    padding: 0 !important;
}
.aio-header__search button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(207, 148, 141, 0.36);
}

.aio-header__cart {
    flex: 0 0 auto;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: rgba(207, 148, 141, 0.10);
    color: var(--aio-brown);
    text-decoration: none !important;
    transition: background .2s ease, transform .2s ease;
}
.aio-header__cart:hover { background: rgba(207, 148, 141, 0.20); transform: translateY(-1px); }
.aio-header__cart-count {
    position: absolute;
    top: -3px;
    right: -3px;
    background: linear-gradient(135deg, var(--aio-coral) 0%, var(--aio-coral2) 100%);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 999px;
    padding: 1px 6px;
    min-width: 18px;
    text-align: center;
    line-height: 1.4;
    border: 2px solid #fff;
    box-shadow: 0 4px 10px rgba(207, 148, 141, 0.36);
}
.aio-header__cart-count[data-count="0"] { display: none; }

.aio-header__menu-toggle {
    display: none;
    background: rgba(207, 148, 141, 0.10) !important;
    color: var(--aio-brown) !important;
    border: none !important;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex: 0 0 auto;
    padding: 0 !important;
    line-height: 1 !important;
    font-size: 0 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}
.aio-header__menu-toggle svg{
    display: block !important;
    width: 22px !important;
    height: 22px !important;
    color: var(--aio-brown) !important;
    stroke: currentColor !important;
    fill: none !important;
    flex: 0 0 auto !important;
    opacity: 1 !important;
    visibility: visible !important;
}
.aio-header__menu-toggle svg path{
    stroke: currentColor !important;
    fill: none !important;
    opacity: 1 !important;
}
.aio-header__menu-toggle::before,
.aio-header__menu-toggle::after{ content: none !important; display: none !important; }

@media (max-width: 980px) {
    .aio-header__bar { gap: 10px; padding: 6px 14px; }
    .aio-header__menu-toggle { display: inline-flex; }
    .aio-header__logo,
    header.aio-header img.aio-header__logo {
        height: 44px !important;
        max-height: 44px !important;
        max-width: 160px !important;
    }
    .aio-header__nav {
        position: absolute;
        top: 100%;
        right: 0; left: 0;
        background: #fff;
        max-height: 0;
        overflow: hidden;
        transition: max-height .35s cubic-bezier(.16,1,.3,1), padding .25s ease;
        padding: 0 20px;
    }
    .aio-header.is-open .aio-header__nav {
        max-height: 80vh;
        padding: 14px 20px 22px;
        overflow-y: auto;
        box-shadow: 0 24px 40px rgba(73, 48, 47, 0.10);
    }
    .aio-nav__list, .aio-header__nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
    }
    .aio-header__nav .sub-menu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        border: none !important;
        background: rgba(207, 148, 141, 0.06) !important;
        padding: 4px !important;
        margin-top: 4px !important;
        margin-inline-start: 14px !important;
    }
    .aio-header__search { flex: 1 1 auto; min-width: 0; }
}



/* Dropdown: prevent viewport overflow, clip long text */
.aio-header__nav .sub-menu{
    max-width: min(320px, calc(100vw - 24px)) !important;
    overflow: hidden !important;
}
.aio-header__nav .sub-menu li{
    overflow: hidden !important;
    max-width: 100% !important;
}
.aio-header__nav .sub-menu a{
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    max-width: 100% !important;
    display: block !important;
}
/* For the rightmost menu items, dropdown should anchor to right so it expands leftward (RTL) */
.aio-header__nav > .aio-nav__list > li:nth-last-child(-n+3) > .sub-menu{
    right: 0 !important;
    left: auto !important;
}
/* For the leftmost menu items, dropdown anchors to left so it expands rightward */
.aio-header__nav > .aio-nav__list > li:nth-child(-n+3) > .sub-menu{
    left: 0 !important;
    right: auto !important;
}

/* ==== NAV PERSIST ==== */
/* Authoritative nav spacing. Loaded last (in mu-plugin body inline style)
   so it beats anything in wp-custom-css. */
.aio-header__bar{
    gap: 24px !important;
    padding: 6px 26px !important;
}
.aio-nav__list,
.aio-header__nav ul{
    gap: 0 !important;
}
.aio-header__nav > .aio-nav__list > li > a,
.aio-header__nav .aio-nav__list > li > a{
    padding: 6px 9px !important;
    font-size: 13px !important;
    letter-spacing: .1px !important;
    white-space: nowrap !important;
}
.aio-header__nav .menu-item-has-children > a::after{
    margin-inline-start: 4px !important;
    font-size: 9px !important;
}
.aio-header__search{
    flex: 0 0 200px !important;
}
.aio-header__logo,
header.aio-header img.aio-header__logo{
    height: 46px !important;
    max-height: 46px !important;
    max-width: 200px !important;
}
@media (max-width: 1280px){
    .aio-header__nav > .aio-nav__list > li > a,
    .aio-header__nav .aio-nav__list > li > a{
        padding: 7px 9px !important;
        font-size: 12.5px !important;
    }
    .aio-header__search{flex: 0 0 170px !important}
}
@media (max-width: 1100px){
    .aio-header__nav > .aio-nav__list > li > a,
    .aio-header__nav .aio-nav__list > li > a{
        padding: 6px 7px !important;
        font-size: 12px !important;
    }
}

/* nav block breathing room from logo & search */
.aio-header__nav{margin-inline: 16px !important;}
/* aio-header__nav-margin-fix */
/* ==== /NAV PERSIST ==== */


/* Dropdown items: edge-to-edge hover (no padding gutter, no border-radius on link) */
.aio-header__nav .sub-menu{
    padding: 6px 0 !important;
}
.aio-header__nav .sub-menu li{
    margin: 0 !important;
}
.aio-header__nav .sub-menu a{
    padding: 9px 18px !important;
    border-radius: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    display: block !important;
}
.aio-header__nav .sub-menu a:hover,
.aio-header__nav .sub-menu a:focus{
    background: #FFF6DD !important;
    color: #B6766F !important;
    padding: 9px 18px !important;
}

/* ==================================================================
   RESPONSIVE OVERHAUL — header
   Breakpoints: 1280, 1100, 980 (mobile), 640 (small mobile), 380 (tiny)
   ================================================================== */

/* Tablet large 1100–1280: nav tighter, search 160 */
@media (max-width:1280px){
    .aio-header__bar{padding:5px 16px !important;gap:10px !important}
    .aio-header__logo,header.aio-header img.aio-header__logo{height:42px !important;max-height:42px !important;max-width:170px !important}
    .aio-header__search{flex:0 0 160px !important}
}
/* Tablet 980–1100: nav very tight, smaller font */
@media (max-width:1100px){
    .aio-header__bar{padding:5px 14px !important;gap:8px !important}
    .aio-header__nav{margin-inline:8px !important}
    .aio-header__logo,header.aio-header img.aio-header__logo{height:40px !important;max-height:40px !important;max-width:150px !important}
    .aio-header__search{flex:0 0 140px !important}
}

/* Mobile ≤980: drawer nav, full-width search */
@media (max-width:980px){
    .aio-header__bar{
        padding:8px 14px !important;
        gap:10px !important;
        display:grid !important;
        grid-template-columns:auto 1fr auto auto !important;
        grid-template-areas:"toggle logo search cart" !important;
        align-items:center !important;
    }
    .aio-header__menu-toggle{display:inline-flex !important;grid-area:toggle;margin:0 !important}
    .aio-header__logo-link{grid-area:logo;justify-self:start;margin-inline-start:4px}
    .aio-header__search{
        grid-area:search;
        flex:1 1 auto !important;
        min-width:0 !important;
        max-width:100%;
        padding:3px 5px 3px 10px !important;
    }
    .aio-header__search input[type="search"]{font-size:13px !important;padding:5px 4px !important}
    .aio-header__search button{width:30px !important;height:30px !important}
    .aio-header__cart{grid-area:cart;width:38px !important;height:38px !important;flex:0 0 auto}
    .aio-header__logo,header.aio-header img.aio-header__logo{
        height:36px !important;max-height:36px !important;max-width:130px !important;
    }
    /* Drawer nav */
    .aio-header__nav{
        position:absolute !important;
        top:100% !important;
        right:0 !important;
        left:0 !important;
        background:#fff !important;
        max-height:0 !important;
        overflow:hidden !important;
        margin-inline:0 !important;
        padding:0 !important;
        transition:max-height .35s cubic-bezier(.16,1,.3,1), padding .25s ease, box-shadow .25s ease !important;
        border-top:1px solid rgba(73,48,47,0.06) !important;
    }
    .aio-header.is-open .aio-header__nav{
        max-height:calc(100vh - 60px) !important;
        padding:10px 14px 18px !important;
        overflow-y:auto !important;
        box-shadow:0 20px 36px rgba(73,48,47,0.12) !important;
    }
    .aio-nav__list, .aio-header__nav ul{
        display:flex !important;flex-direction:column !important;align-items:stretch !important;gap:2px !important;
    }
    .aio-header__nav > .aio-nav__list > li > a,
    .aio-header__nav .aio-nav__list > li > a{
        padding:12px 16px !important;
        font-size:15px !important;
        border-radius:12px !important;
        justify-content:space-between !important;
        width:100% !important;
    }
    .aio-header__nav .menu-item-has-children > a::after{
        margin-inline-start:auto !important;font-size:11px !important;opacity:.7;
    }
    .aio-header__nav .sub-menu{
        position:static !important;
        opacity:1 !important;visibility:visible !important;transform:none !important;
        box-shadow:none !important;border:none !important;
        background:rgba(207,148,141,0.06) !important;
        padding:4px 0 !important;
        margin:4px 0 6px !important;
        margin-inline-start:14px !important;
        min-width:0 !important;max-width:100% !important;
        border-radius:10px !important;
    }
    .aio-header__nav .sub-menu a{
        padding:10px 16px !important;font-size:14px !important;
        white-space:normal !important;text-overflow:clip !important;overflow:visible !important;
    }
    /* Cart badge nudged for smaller cart pill */
    .aio-header__cart-count{top:-2px !important;right:-2px !important;padding:0 5px !important;font-size:9.5px !important;min-width:16px !important}
}

/* Small mobile ≤640 */
@media (max-width:640px){
    .aio-header__bar{padding:7px 10px !important;gap:8px !important}
    .aio-header__logo,header.aio-header img.aio-header__logo{
        height:32px !important;max-height:32px !important;max-width:108px !important;
    }
    .aio-header__search input[type="search"]::placeholder{font-size:12px}
    .aio-header__search button{width:28px !important;height:28px !important}
    .aio-header__cart{width:34px !important;height:34px !important}
    .aio-header__menu-toggle{width:36px !important;height:36px !important}
}

/* Tiny mobile ≤380: hide search placeholder, allow icons only */
@media (max-width:380px){
    .aio-header__bar{
        grid-template-columns:auto 1fr auto auto !important;
        gap:6px !important;padding:6px 8px !important;
    }
    .aio-header__logo,header.aio-header img.aio-header__logo{max-width:92px !important}
    .aio-header__search{padding:2px 4px 2px 8px !important}
    .aio-header__search input[type="search"]{font-size:12px !important}
    .aio-header__search input[type="search"]::placeholder{color:transparent !important}
}

/* ==================================================================
   RESPONSIVE — Elementor footer: center everything on mobile/tablet
   ================================================================== */
@media (max-width:980px){
    /* Container & columns */
    .elementor-location-footer .elementor-container{
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }
    .elementor-location-footer .elementor-column,
    .elementor-location-footer .elementor-top-column,
    .elementor-location-footer .elementor-col-33,
    .elementor-location-footer .elementor-col-25,
    .elementor-location-footer .elementor-col-50{
        width: 100% !important;
        max-width: 100% !important;
        text-align: center !important;
    }
    .elementor-location-footer .elementor-widget-wrap,
    .elementor-location-footer .elementor-element-populated{
        align-items: center !important;
        align-content: center !important;
        justify-content: center !important;
        text-align: center !important;
    }
    /* Widget content */
    .elementor-location-footer .elementor-widget,
    .elementor-location-footer .elementor-widget-container,
    .elementor-location-footer .elementor-heading-title,
    .elementor-location-footer .elementor-widget-text-editor,
    .elementor-location-footer .elementor-widget-text-editor p,
    .elementor-location-footer .elementor-widget-heading,
    .elementor-location-footer .elementor-widget-html,
    .elementor-location-footer p,
    .elementor-location-footer h1,
    .elementor-location-footer h2,
    .elementor-location-footer h3,
    .elementor-location-footer h4,
    .elementor-location-footer h5,
    .elementor-location-footer h6{
        text-align: center !important;
    }
    /* Icon lists, nav menus */
    .elementor-location-footer .elementor-widget-icon-list .elementor-icon-list-items,
    .elementor-location-footer ul.elementor-icon-list-items,
    .elementor-location-footer .elementor-widget-nav-menu .elementor-nav-menu,
    .elementor-location-footer .elementor-nav-menu,
    .elementor-location-footer ul.menu,
    .elementor-location-footer .menu{
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        display: flex !important;
        flex-wrap: wrap !important;
        padding-inline: 0 !important;
        margin-inline: auto !important;
    }
    .elementor-location-footer .elementor-icon-list-item{
        justify-content: center !important;
    }
    .elementor-location-footer .elementor-icon-list-item a{
        justify-content: center !important;
        text-align: center !important;
    }
    /* Images / logos */
    .elementor-location-footer .elementor-widget-image,
    .elementor-location-footer .elementor-widget-image > .elementor-widget-container,
    .elementor-location-footer .elementor-image{
        text-align: center !important;
    }
    .elementor-location-footer .elementor-widget-image img,
    .elementor-location-footer .elementor-image img{
        margin-inline: auto !important;
        display: inline-block !important;
    }
    /* Social icons / buttons rows */
    .elementor-location-footer .elementor-widget-social-icons .elementor-social-icons-wrapper,
    .elementor-location-footer .elementor-social-icons-wrapper,
    .elementor-location-footer .elementor-widget-button{
        justify-content: center !important;
        text-align: center !important;
        display: flex !important;
        flex-wrap: wrap !important;
    }
    /* Inner sections (rows nested inside footer) */
    .elementor-location-footer .elementor-inner-section .elementor-container{
        flex-direction: column !important;
        align-items: center !important;
    }
    .elementor-location-footer .elementor-inner-section .elementor-column{
        width: 100% !important;
    }
    /* Bottom credit/legal row */
    .elementor-location-footer .elementor-shortcode,
    .elementor-location-footer .elementor-widget-shortcode{
        text-align: center !important;
    }
    /* Twenty Twenty fallback footer (if Elementor footer not used) */
    .site-footer,
    #site-footer,
    .footer-nav-widgets-wrapper,
    .footer-credits,
    .footer-top,
    .footer-menu,
    .footer-widgets-outer-wrapper,
    .footer-widgets,
    .footer-widgets > .widget{
        text-align: center !important;
    }
    .footer-menu,
    .footer-credits .footer-copyright,
    .footer-credits .powered-by-wordpress{
        justify-content: center !important;
        text-align: center !important;
        margin: 0 auto !important;
    }
}
