/*
 Theme Name:   Reemco Astra Child
 Theme URI:    https://reemco.com.sa
 Description:  Child theme for Astra — customized for reemco.com.sa store with safe hooks for Fatima integration.
 Author:       reemco.com.sa
 Author URI:   https://reemco.com.sa
 Template:     astra
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  reemco-astra-child
*/

/* =============================================
   Custom styles below this line.
   Parent Astra styles are loaded via functions.php.
   ============================================= */

/* ══════════════════════════════════════
   BELOW HEADER — DEDICATED MENU BAR
   ══════════════════════════════════════ */
.ast-below-header {
    background: linear-gradient(135deg, #1B5E3B 0%, #164E31 100%);
    border-bottom: none;
    box-shadow: 0 2px 8px rgba(27, 94, 59, 0.15);
}

.ast-below-header .ast-builder-menu-1 .main-header-menu {
    justify-content: center;
}

.ast-below-header .ast-builder-menu-1 .main-header-menu>.menu-item>a {
    color: #fff;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 12px 20px;
    transition: color 0.25s, background 0.25s;
    position: relative;
    letter-spacing: 0.02em;
}

.ast-below-header .ast-builder-menu-1 .main-header-menu>.menu-item>a:hover,
.ast-below-header .ast-builder-menu-1 .main-header-menu>.menu-item.current-menu-item>a {
    color: #C4A265;
    background: rgba(255, 255, 255, 0.1);
}

/* Underline indicator on hover */
.ast-below-header .ast-builder-menu-1 .main-header-menu>.menu-item>a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    right: 50%;
    height: 2px;
    background: #C4A265;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px 2px 0 0;
}

.ast-below-header .ast-builder-menu-1 .main-header-menu>.menu-item>a:hover::after,
.ast-below-header .ast-builder-menu-1 .main-header-menu>.menu-item.current-menu-item>a::after {
    left: 18px;
    right: 18px;
}

/* Override Astra default bg/border on below header row */
.ast-below-header-bar {
    border-bottom: none;
}

/* Submenu styling inside below header */
.ast-below-header .ast-builder-menu-1 .main-header-menu .sub-menu {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.14);
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.ast-below-header .ast-builder-menu-1 .main-header-menu .sub-menu a {
    color: #1A1A2E;
    font-family: 'Cairo', sans-serif;
    font-size: 0.85rem;
    padding: 10px 18px;
    transition: background 0.2s, color 0.2s, padding-right 0.2s;
}

.ast-below-header .ast-builder-menu-1 .main-header-menu .sub-menu a:hover {
    background: #f0f7f2;
    color: #1B5E3B;
    padding-right: 22px;
}

/* ══════════════════════════════════════
   STICKY WRAPPER — Menu + Search
   Combined sticky bar on scroll
   ══════════════════════════════════════ */
.rc-sticky-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9990;
    transform: translateY(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    pointer-events: none;
}

.rc-sticky-wrapper.is-sticky {
    transform: translateY(0);
    pointer-events: auto;
}

/* WP Admin bar adjustment */
.admin-bar .rc-sticky-wrapper {
    top: 32px;
}

@media (max-width: 782px) {
    .admin-bar .rc-sticky-wrapper {
        top: 46px;
    }
}

/* Sticky menu bar — compact version */
.rc-sticky-wrapper .rc-sticky-menu {
    background: linear-gradient(135deg, #1B5E3B 0%, #164E31 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    box-shadow: 0 4px 20px rgba(27, 94, 59, 0.2);
    position: relative;
}

.rc-sticky-wrapper .rc-sticky-menu::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(196, 162, 101, 0.25);
}

.rc-sticky-wrapper .rc-sticky-menu .rc-sticky-logo {
    display: flex;
    align-items: center;
    margin-left: 24px;
    flex-shrink: 0;
}

.rc-sticky-wrapper .rc-sticky-menu .rc-sticky-logo img {
    height: 32px;
    width: auto;
    filter: brightness(0) invert(1);
    transition: opacity 0.2s;
}

.rc-sticky-wrapper .rc-sticky-menu .rc-sticky-logo img:hover {
    opacity: 0.85;
}

.rc-sticky-wrapper .rc-sticky-nav {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.rc-sticky-wrapper .rc-sticky-nav a {
    color: #fff;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 10px 16px;
    text-decoration: none;
    transition: color 0.2s, background 0.2s;
    white-space: nowrap;
    position: relative;
    display: block;
}

.rc-sticky-wrapper .rc-sticky-nav a:hover,
.rc-sticky-wrapper .rc-sticky-nav .current-menu-item a {
    color: #C4A265;
    background: rgba(255, 255, 255, 0.08);
}

.rc-sticky-wrapper .rc-sticky-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    right: 50%;
    height: 2px;
    background: #C4A265;
    transition: left 0.25s, right 0.25s;
    border-radius: 2px 2px 0 0;
}

.rc-sticky-wrapper .rc-sticky-nav a:hover::after {
    left: 16px;
    right: 16px;
}

/* Sticky icons (cart/account) */
.rc-sticky-wrapper .rc-sticky-icons {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: 24px;
    flex-shrink: 0;
}

.rc-sticky-wrapper .rc-sticky-icons a {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    transition: color 0.2s;
    text-decoration: none;
}

.rc-sticky-wrapper .rc-sticky-icons a:hover {
    color: #C4A265;
}

/* Sticky search bar — integrated compact version */
.rc-sticky-wrapper .rc-sticky-search {
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    padding: 6px 20px;
    display: flex;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.rc-sticky-wrapper .rc-sticky-search .rc-search-wrap {
    max-width: 560px;
}

.rc-sticky-wrapper .rc-sticky-search .rc-search-form {
    border-radius: 10px;
    background: #f4f5f7;
}

.rc-sticky-wrapper .rc-sticky-search .rc-search-input {
    padding: 10px 16px;
    font-size: 0.88rem;
}

.rc-sticky-wrapper .rc-sticky-search .rc-search-submit {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 0.92rem;
}

/* ══════════════════════════════════════
   RESPONSIVE — STICKY
   ══════════════════════════════════════ */
@media (max-width: 921px) {
    .rc-sticky-wrapper .rc-sticky-menu {
        flex-wrap: wrap;
        padding: 6px 12px;
    }

    .rc-sticky-wrapper .rc-sticky-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0;
    }

    .rc-sticky-wrapper .rc-sticky-nav a {
        font-size: 0.78rem;
        padding: 8px 10px;
    }

    .rc-sticky-wrapper .rc-sticky-logo {
        margin-left: 12px;
    }

    .rc-sticky-wrapper .rc-sticky-icons {
        margin-right: 12px;
    }

    .rc-sticky-wrapper .rc-sticky-search {
        padding: 5px 12px;
    }

    .rc-sticky-wrapper .rc-sticky-search .rc-search-wrap {
        max-width: 100%;
    }
}

@media (max-width: 544px) {

    .rc-sticky-wrapper .rc-sticky-logo,
    .rc-sticky-wrapper .rc-sticky-icons {
        display: none;
    }

    .rc-sticky-wrapper .rc-sticky-nav a {
        font-size: 0.72rem;
        padding: 7px 8px;
    }

    .rc-sticky-wrapper .rc-sticky-search .rc-search-input {
        padding: 8px 12px;
        font-size: 0.82rem;
    }

    .rc-sticky-wrapper .rc-sticky-search .rc-search-submit {
        width: 36px;
        height: 36px;
    }
}