/* ================================================
   Horus 1 - Website Main Stylesheet
   هوية بصرية: أحمر #e60b0b + فضي #aab0b6
   ================================================ */

/* === Fonts === */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800&display=swap');

/* === Variables === */
:root {
    --red: #e60b0b;
    --red-dark: #a50f0f;
    --red-light: #fdeaea;
    --silver: #aab0b6;
    --silver-lt: #e2e8f0;
    --bg: #f4f6fb;
    --white: #ffffff;
    --text: #1e2139;
    --dark: #060606;
    --muted: #6b7280;
    --radius: 14px;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.07);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.1);
}

/* === Reset === */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Tajawal', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.65;
    padding-bottom: 70px;
    /* bottom-nav space */
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* ================================================
   HEADER
   ================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--dark);
    border-bottom: 1px solid var(--silver-lt);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    gap: 10px;
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--red);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.site-logo span {
    color: var(--text);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--muted);
}

.header-actions select {
    border: 1px solid var(--silver-lt);
    border-radius: 8px;
    padding: 4px 8px;
    font-family: 'Tajawal', sans-serif;
    font-size: 13px;
    color: var(--text);
    background: var(--white);
    cursor: pointer;
}

.btn-post-ad {
    background: linear-gradient(90deg, var(--red), var(--red-dark));
    color: var(--white);
    font-weight: 700;
    font-size: 13px;
    padding: 7px 16px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 3px 10px rgba(230, 11, 11, 0.3);
    transition: all 0.2s;
    white-space: nowrap;
}

.header-user-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s;
}

.header-user-icon:hover {
    background: var(--red-light);
    color: var(--red) !important;
}

.header-user-icon i {
    transition: all 0.3s;
}

.header-user-icon:hover i {
    color: var(--red);
    transform: scale(1.1);
}

.btn-post-ad:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(230, 11, 11, 0.4);
}

/* ================================================
   SEARCH
   ================================================ */
.search-section {
    background: var(--white);
    padding: 12px 16px;
    border-bottom: 1px solid var(--silver-lt);
}

.search-row {
    display: flex;
    gap: 8px;
}

.search-input {
    flex: 2;
    padding: 10px 14px;
    border: 1.5px solid var(--silver-lt);
    border-radius: var(--radius);
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: var(--red);
}

.search-location {
    flex: 1;
    min-width: 0;
}

.btn-search {
    background: var(--red);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    padding: 0 18px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.btn-search:hover {
    background: var(--red-dark);
}

/* ================================================
   CATEGORIES
   ================================================ */
.categories-section {
    background: var(--white);
    padding: 12px 0;
    border-bottom: 1px solid var(--silver-lt);
}

.categories-scroll {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 10px 16px;
    scrollbar-width: none;
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

.cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 64px;
    cursor: pointer;
    transition: transform 0.2s;
}

.cat-item:hover {
    transform: translateY(-3px);
}

.cat-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    transition: all 0.25s;
    border: 2px solid transparent;
}

.cat-item.active .cat-circle,
.cat-item:hover .cat-circle {
    background: var(--red-light);
    border-color: var(--red);
}

.cat-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}

.cat-item.active .cat-label {
    color: var(--red);
}

/* ================================================
   BANNER SLIDER
   ================================================ */
.banner-section {
    padding: 14px 16px;
    background: var(--white);
    overflow: hidden;
}

.banner-track {
    display: flex;
    gap: 12px;
    animation: scrollBanners 25s linear infinite;
}

.banner-track:hover {
    animation-play-state: paused;
}

@keyframes scrollBanners {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.banner-item {
    min-width: 280px;
    height: 110px;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.banner-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    display: flex;
    align-items: flex-end;
    padding: 10px 12px;
    color: var(--white);
    font-weight: 700;
    font-size: 14px;
}

/* ================================================
   ADS SECTIONS
   ================================================ */
.ads-section {
    padding: 14px 16px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.section-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text);
}

.section-link {
    font-size: 13px;
    color: var(--red);
    font-weight: 600;
}

.ads-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
}

.ads-scroll::-webkit-scrollbar {
    display: none;
}

/* === Ad Card === */
.ad-card {
    min-width: 175px;
    max-width: 175px;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    position: relative;
    transition: transform 0.25s, box-shadow 0.25s;
    flex-shrink: 0;
}

.ad-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.ad-img-wrap {
    position: relative;
    height: 120px;
    overflow: hidden;
}

.ad-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.ad-card:hover .ad-img-wrap img {
    transform: scale(1.06);
}

.ad-actions {
    position: absolute;
    top: 7px;
    left: 7px;
    display: flex;
    gap: 5px;
}

.ad-action-btn {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    border: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s;
}

.ad-action-btn:hover {
    transform: scale(1.15);
}

.ad-badge-featured {
    position: absolute;
    bottom: 7px;
    right: 7px;
    background: var(--red);
    color: var(--white);
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 10px;
}

.ad-body {
    padding: 9px 10px;
}

.ad-price {
    font-size: 15px;
    font-weight: 800;
    color: var(--red);
    margin-bottom: 3px;
}

.ad-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}

.ad-title-link:hover .ad-title {
    color: var(--red);
}

.ad-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 5px;
}

.ad-badge {
    background: var(--bg);
    border: 1px solid var(--silver-lt);
    color: var(--muted);
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 6px;
}

.ad-meta {
    font-size: 11px;
    color: var(--silver);
    display: flex;
    gap: 4px;
    align-items: center;
}

/* ================================================
   FOOTER
   ================================================ */
.site-footer {
    background: var(--white);
    border-top: 1px solid var(--silver-lt);
    padding: 24px 16px;
    margin-top: 10px;
}

.footer-top {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.footer-logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--red);
    margin-bottom: 8px;
}

.footer-col {
    flex: 1;
    min-width: 120px;
}

.footer-title {
    font-weight: 800;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--red);
    display: inline-block;
}

.footer-col a {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 6px;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--red);
}

.footer-bottom {
    text-align: center;
    font-size: 12px;
    color: var(--silver);
    padding-top: 14px;
    border-top: 1px solid var(--silver-lt);
}

/* ================================================
   BOTTOM NAV (Mobile)
   ================================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    background: var(--white);
    border-top: 1px solid var(--silver-lt);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 6px 0 8px;
    z-index: 200;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.07);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: var(--muted);
    cursor: pointer;
    transition: color 0.2s;
    min-width: 50px;
}

.bottom-nav-item svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
}

.bottom-nav-item.active {
    color: var(--red);
}

.bottom-nav-add {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 24px;
    box-shadow: 0 4px 14px rgba(230, 11, 11, 0.4);
    margin-top: -18px;
    border: 3px solid var(--white);
    cursor: pointer;
    transition: transform 0.2s;
}

.bottom-nav-add:hover {
    transform: scale(1.1) rotate(90deg);
}