/* =========================================================
   AGABOZORG HEADER
   Exact visual language of the Agabozorg homepage header.
   Scoped to avoid conflicts with the active theme.
   ========================================================= */

.aga-header-plugin {
    --aga-header-gold: #c99a4a;
    --aga-header-gold-dark: #9d6f25;
    --aga-header-black: #171717;
    --aga-header-line: #e9e3d9;
    --aga-header-white: #fff;
    direction: rtl;
    width: 100%;
    position: relative;
    z-index: 99990;
    font-family: Tahoma, "Segoe UI", Arial, sans-serif;
    line-height: 1.8;
}

.aga-header-plugin,
.aga-header-plugin *,
.aga-header-plugin *::before,
.aga-header-plugin *::after {
    box-sizing: border-box;
}

.aga-header-plugin a {
    text-decoration: none;
    color: inherit;
}

.aga-header-shell {
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto;
}

/* Top black bar */
.aga-header-topbar {
    width: 100%;
    background: var(--aga-header-black);
    color: #eee;
    font-size: 12px;
}

.aga-header-topbar-inner {
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

/* Main header */
.aga-header-site-header {
    width: 100%;
    min-height: 94px;
    background: rgba(255, 255, 255, .98);
    border-bottom: 1px solid var(--aga-header-line);
    position: relative;
    z-index: 99991;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .01);
}

.aga-header-main {
    min-height: 94px;
    display: grid;
    grid-template-columns: 180px 1fr auto;
    align-items: center;
    gap: 30px;
}

/* Logo */
.aga-header-logo {
    display: block;
    width: 150px;
    height: 78px;
    overflow: hidden;
}

.aga-header-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Navigation */
.aga-header-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 26px;
    font-size: 14px;
    font-weight: 700;
}

.aga-header-nav a {
    position: relative;
    padding: 31px 0;
    color: #3b3b3b;
    white-space: nowrap;
}

.aga-header-nav a::after {
    content: "";
    position: absolute;
    right: 0;
    left: 0;
    bottom: 20px;
    height: 2px;
    background: var(--aga-header-gold);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .2s ease;
}

.aga-header-nav a:hover::after,
.aga-header-nav a.is-active::after {
    transform: scaleX(1);
}

.aga-header-nav a:hover {
    color: #222;
}

/* Account + cart */
.aga-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.aga-header-action {
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 12px;
    border: 1px solid var(--aga-header-line);
    border-radius: 12px;
    background: #fff;
    color: #303030;
    font-size: 12px;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.aga-header-action:hover {
    border-color: #d8c8ad;
    box-shadow: 0 8px 22px rgba(40, 30, 20, .06);
    transform: translateY(-1px);
}

.aga-header-action svg,
.aga-header-mobile-account svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    flex: 0 0 auto;
}

.aga-header-mobile-account {
    display: none;
}

/*
 * Woodmart normally outputs its own header before wp_body_open().
 * The homepage already has the desired header, while on every other
 * front-end page this plugin supplies the replacement.
 */
body.aga-header-plugin-active .whb-header,
body.aga-header-plugin-active .whb-main-header,
body.aga-header-plugin-active .whb-sticky-header {
    display: none !important;
}

body.aga-header-plugin-active .main-page-wrapper {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Tablet */
@media (max-width: 1000px) {
    .aga-header-main {
        grid-template-columns: 140px 1fr auto;
        gap: 12px;
    }

    .aga-header-nav {
        gap: 15px;
    }

    .aga-header-nav a {
        font-size: 12px;
    }

    .aga-header-actions {
        display: none;
    }

    .aga-header-mobile-account {
        display: grid;
        place-items: center;
        width: 42px;
        height: 42px;
        border: 1px solid var(--aga-header-line);
        border-radius: 12px;
        background: #fff;
    }
}

/* Mobile */
@media (max-width: 650px) {
    .aga-header-shell {
        width: min(100% - 24px, 1240px);
    }

    .aga-header-topbar {
        font-size: 9px;
    }

    .aga-header-topbar-inner span:last-child {
        display: none;
    }

    .aga-header-main {
        min-height: 72px;
        grid-template-columns: 100px 1fr auto;
    }

    .aga-header-site-header {
        min-height: 72px;
    }

    .aga-header-logo {
        width: 100px;
        height: 60px;
    }

    .aga-header-nav {
        display: none;
    }

    .aga-header-mobile-account {
        width: 40px;
        height: 40px;
    }
}
