﻿:root {
    --haraz-green: #5B8C3B;
    --haraz-green-dark: #456D2D;
    --haraz-green-secondary: #6A9A47;
    --haraz-background: #F5F7F4;
    --haraz-white: #FFFFFF;
    --haraz-text: #243020;
    --haraz-muted: #64748B;
    --haraz-border: #E2E8F0;
    --haraz-gold: #D4AF37;
}

html {
    position: relative;
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    color: var(--haraz-text);
    background: var(--haraz-background);
    direction: rtl;
    text-align: right;
    font-family: 'Tajawal', sans-serif;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

a {
    text-decoration: none;
}

.haraz-main-content {
    min-height: calc(100vh - 170px);
}

/* =========================================================
   APP HEADER
========================================================= */

.haraz-app-header {
    position: sticky;
    top: 0;
    z-index: 1020;
    width: 100%;
    background: var(--haraz-green);
    box-shadow: 0 3px 12px rgba(37,68,25,.16);
}

.haraz-header-container {
    padding-top: 14px;
    padding-bottom: 12px;
}

.haraz-header-top-row {
    display: grid;
    grid-template-columns: auto minmax(0,1fr) auto;
    align-items: center;
    gap: 10px;
}

.haraz-header-brand {
    color: #FFFFFF;
    font-size: 1.55rem;
    font-weight: 800;
    white-space: nowrap;
}

    .haraz-header-brand:hover {
        color: #FFFFFF;
        opacity: .95;
    }

.haraz-header-search {
    min-width: 0;
    height: 42px;
    display: grid;
    grid-template-columns: minmax(0,1fr) 40px;
    align-items: center;
    padding: 4px;
    background: #FFFFFF;
    border-radius: 22px;
}

    .haraz-header-search input {
        width: 100%;
        min-width: 0;
        height: 34px;
        padding: 5px 12px;
        color: #111111;
        background: transparent;
        border: 0;
        outline: 0;
        font-size: .82rem;
    }

        .haraz-header-search input::placeholder {
            color: #94A3B8;
        }

    .haraz-header-search button {
        width: 40px;
        height: 34px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #FFFFFF;
        background: var(--haraz-green);
        border: 0;
        border-radius: 17px;
    }

.haraz-menu-button {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    background: var(--haraz-green-secondary);
    border: 0;
    border-radius: 20px;
    font-size: 1.15rem;
}

.haraz-location-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}

.haraz-location-select {
    height: 42px;
    overflow: hidden;
    background: var(--haraz-green-secondary);
    border-radius: 14px;
}

    .haraz-location-select select {
        width: 100%;
        height: 42px;
        padding: 6px 12px;
        color: #FFFFFF;
        background-color: var(--haraz-green-secondary);
        border: 0;
        outline: 0;
        font-size: .8rem;
        font-weight: 500;
        cursor: pointer;
    }

    .haraz-location-select option {
        color: #1F2937;
        background: #FFFFFF;
    }

/* =========================================================
   DRAWER
========================================================= */

.haraz-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    visibility: hidden;
    pointer-events: none;
}

    .haraz-drawer-overlay.open {
        visibility: visible;
        pointer-events: auto;
    }

.haraz-drawer-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    background: rgba(15,23,42,.60);
    border: 0;
    opacity: 0;
    transition: opacity .22s ease;
}

.haraz-drawer-overlay.open .haraz-drawer-backdrop {
    opacity: 1;
}

.haraz-side-drawer {
    position: absolute;
    top: 0;
    right: 0;
    width: min(320px, 88vw);
    height: 100%;
    display: grid;
    grid-template-rows: auto 1fr auto;
    background: #F8FAFC;
    box-shadow: -10px 0 30px rgba(0,0,0,.22);
    transform: translateX(105%);
    transition: transform .25s ease;
}

.haraz-drawer-overlay.open .haraz-side-drawer {
    transform: translateX(0);
}

.haraz-drawer-profile {
    margin: 10px;
    padding: 16px;
    display: grid;
    grid-template-columns: 72px minmax(0,1fr);
    gap: 13px;
    align-items: center;
    color: #FFFFFF;
    background: var(--haraz-green);
    border-radius: 22px;
}

.haraz-drawer-avatar {
    width: 72px;
    height: 72px;
    padding: 3px;
    overflow: hidden;
    background: #FFFFFF;
    border-radius: 50%;
}

    .haraz-drawer-avatar img {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
        border-radius: 50%;
    }

.haraz-drawer-profile-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

    .haraz-drawer-profile-copy span {
        color: #DDEFD2;
        font-size: .68rem;
    }

    .haraz-drawer-profile-copy strong {
        margin-top: 2px;
        overflow: hidden;
        font-size: 1rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .haraz-drawer-profile-copy small {
        align-self: flex-start;
        margin-top: 7px;
        padding: 4px 8px;
        color: #FFFFFF;
        background: rgba(255,255,255,.15);
        border-radius: 10px;
        font-size: .58rem;
        font-weight: 700;
    }

.haraz-drawer-items {
    padding: 2px 10px 10px;
    overflow-y: auto;
}

.haraz-drawer-item {
    min-height: 49px;
    display: grid;
    grid-template-columns: 38px minmax(0,1fr);
    gap: 9px;
    align-items: center;
    margin: 3px 0;
    padding: 7px 10px;
    color: #0F172A;
    background: #FFFFFF;
    border: 1px solid #EEF2F7;
    border-radius: 13px;
    font-size: .82rem;
    font-weight: 700;
}

    .haraz-drawer-item:hover {
        color: var(--haraz-green);
        background: #FBFDF9;
    }

.haraz-drawer-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: .85rem;
}

    .haraz-drawer-icon.green {
        color: var(--haraz-green);
        background: #EEF5EA;
    }

    .haraz-drawer-icon.gold {
        color: #A97600;
        background: #FFF7E6;
    }

    .haraz-drawer-icon.blue {
        color: #2563EB;
        background: #EEF4FF;
    }

    .haraz-drawer-icon.pink {
        color: #16A34A;
        background: #FFF0F3;
    }

    .haraz-drawer-icon.purple {
        color: #7C3AED;
        background: #F3F0FF;
    }

    .haraz-drawer-icon.gray {
        color: #64748B;
        background: #F1F5F9;
    }

    .haraz-drawer-icon.cyan {
        color: #0284C7;
        background: #EAF8FD;
    }

.haraz-drawer-footer {
    min-height: 42px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--haraz-muted);
    background: #EEF5EA;
    font-size: .66rem;
}

    .haraz-drawer-footer strong {
        color: var(--haraz-green);
    }

/* =========================================================
   BOTTOM NAV
========================================================= */

.haraz-bottom-nav {
    display: none;
}

/* =========================================================
   DESKTOP FOOTER
========================================================= */

.haraz-desktop-footer {
    margin-top: 25px;
    padding: 16px 0;
    color: rgba(255,255,255,.9);
    background: var(--haraz-green);
    text-align: center;
    font-size: .76rem;
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 991px) {

    body {
        padding-bottom: 72px;
    }

    .haraz-desktop-footer {
        display: none;
    }

    .haraz-header-container {
        padding-right: 12px;
        padding-left: 12px;
    }

    .haraz-header-brand {
        font-size: 1.35rem;
    }

    .haraz-bottom-nav {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 2000;
        height: 72px;
        display: grid;
        grid-template-columns: repeat(5,1fr);
        align-items: center;
        background: #FFFFFF;
        border-top: 1px solid #E6EAE3;
        box-shadow: 0 -4px 18px rgba(15,23,42,.08);
    }

    .haraz-bottom-item {
        height: 72px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        color: #64748B;
        font-size: .62rem;
    }

        .haraz-bottom-item > i,
        .haraz-bottom-icon-wrap > i {
            font-size: 1.08rem;
        }

        .haraz-bottom-item.active {
            color: var(--haraz-green);
        }

    .haraz-add-item {
        position: relative;
    }

    .haraz-bottom-add-circle {
        width: 56px;
        height: 56px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #FFFFFF;
        background: var(--haraz-green);
        border: 4px solid #FFFFFF;
        border-radius: 50%;
        box-shadow: 0 6px 18px rgba(91,140,59,.30);
        transform: translateY(-9px);
    }

        .haraz-bottom-add-circle i {
            font-size: 1.35rem;
        }

    .haraz-bottom-icon-wrap {
        position: relative;
        display: inline-flex;
    }

    .haraz-bottom-badge {
        position: absolute;
        top: -8px;
        left: -12px;
        min-width: 17px;
        height: 17px;
        padding: 1px 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #FFFFFF;
        background: #EF4444;
        border-radius: 9px;
        font-size: .5rem;
        font-weight: 800;
    }
}

@media (max-width: 480px) {

    .haraz-header-container {
        padding-top: 12px;
        padding-bottom: 10px;
    }

    .haraz-header-top-row {
        gap: 8px;
    }

    .haraz-header-brand {
        font-size: 1.25rem;
    }

    .haraz-menu-button {
        width: 38px;
        height: 38px;
    }

    .haraz-header-search {
        height: 40px;
    }

        .haraz-header-search input {
            font-size: .76rem;
        }
}
