/* Warm cream background + forest green accent */
:root {
    --bg: #ffffff;
    --bg--elem: rgba(255, 255, 255, 0.78);
    --card: #ffffff;

    --primary: #1f2937;
    --primary-hover: #111827;
    --secondary: #901802;
    /* forest green */

    --text: #1f2937;
    --text--bbg: var(--bg);
    --muted: #6b7280;
    --border: rgba(31, 41, 55, 0.10);

    --text-color: var(--text);
}

html,
body {
    overflow-x: hidden;
    width: 100%;
}

body {
    background: var(--bg);
    color: var(--primary);
}

header {
    background-color: var(--bg--elem);
    border-bottom: 1px solid var(--border);
}

.logoutBtn,
.listBtn,
.searchBTN {
    background: var(--secondary);
    border-color: var(--secondary);
    color: #fff;
}

.logoutBtn:hover,
.listBtn:hover,
.searchBTN:hover {
    background: #14532d;
    border-color: #14532d;
}

.navigation a:hover {
    border-bottom-color: var(--secondary);
    color: var(--secondary);
}

#searchinp {
    background: #fff;
    border: 1px solid var(--border);
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: 'Gideon Roman', serif;
    /* font-weight: 400; */
    font-style: normal;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 100px;
    font-size: 62.5%;
    /* 1rem = 10px */
}

header {
    position: fixed;
    z-index: 9999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
    background-color: #58483d4d;
    backdrop-filter: blur(10px);
    gap: 1rem;
    width: 100%;
    height: 65px;
}

header>* {
    padding-top: 0;
}

.logoCTN {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    height: 65px;
    gap: 0;
    overflow: hidden;
    flex-shrink: 0;
}

.imagCtn {
    height: 2.4rem;
    display: flex;
    align-items: center;
    padding-left: 5px;
    flex-shrink: 0;
}

.imagCtn #logo {
    height: 100%;
    width: auto;
    padding: 0;
    object-fit: contain;
    object-position: center bottom;
}

.logoCTN h1 {
    font-size: 2rem;
    color: #0c2e53;
    padding-top: 0;
    line-height: 1;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

@media (max-width: 480px) {
    .logoCTN h1 {
        font-size: 1.5rem;
    }

    .imagCtn {
        height: 1.8rem;
    }
}

.textCtn {
    display: flex;
    flex-direction: column;
}

.searchCTN {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 0 1 auto;
    width: 35%;
    min-width: 250px;
    max-width: 500px;
    margin: 0 auto;
}

.searchCTN form,
.searchCTN #searchinp {
    object-fit: contain;
    object-position: center;
    width: 100%;
}

.searchBTN {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 30.6px;
    height: 21.2px;
    overflow: hidden;
    border-radius: 20px;
    border: 2px solid var(--primary);

}

.searchBTN #searchICN {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    background-color: var(--bg);
}

.logoutBtn {
    /* margin-right: 4rem; */
    margin-left: 2rem;
    padding: 0.5rem;
    font-size: 1rem;
    background-color: var(--secondary);
    color: var(--text--bbg);
    border-radius: 20px;
    border: 2px solid var(--primary);
    transition: 0.3s ease;
}

.logoutBtn:hover {
    box-shadow: 0 0 30px var(--primary);
    border: 2px solid var(--primary);
    transform: scale(1.1);
}

.navCtn {
    display: inline-flex;
    justify-content: end;
    margin-right: 0;
    flex-shrink: 0;
}

.navigation {
    display: flex;
    justify-content: center;
    align-items: center;
}

.navigation a {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-left: 1.2rem;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: 0.3s ease;
}

.navigation a:hover {
    border-bottom: 3px solid var(--primary);
    color: var(--primary);
}

/* Icon group (messages + bell) */
.nav-icons {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.nav-icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem !important;
    border-bottom: none !important;
    padding: 0.2rem 0.35rem;
}

.nav-icon-btn:hover {
    border-bottom: none !important;
    color: var(--secondary) !important;
    transform: scale(1.15);
    transition: transform 0.2s ease, color 0.2s ease;
}

.nav-badge {
    position: absolute;
    top: -5px;
    right: -4px;
    background: #dc2626;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 10px;
    line-height: 1.4;
    pointer-events: none;
}

.listBtn {
    padding: 4px;
    font-size: 1rem;
    /* padding-right: 0.5rem;
    padding-left: 0.5rem; */
    background-color: var(--primary);
    color: var(--text--bbg);
    border-radius: 20px;
    border: 2px solid var(--primary);
    transition: 0.9s ease;
}

.categBtn {
    padding: 0.2rem;
    font-size: 1.2rem;
    padding-right: 0.9rem;
    padding-left: 0.9rem;
    background-color: transparent;
    color: var(--primary);
    transition: 0.3s ease;
}

.categBtn:hover {
    font-size: 1.3rem;
    /* border-bottom: 1px solid var(--primary) */
}

#searchinp {
    color: var(--primary);
    font-size: 16px;
    caret-color: var(--primary);
    height: 2rem;
    width: 100%;
    padding: 0rem;
    padding-left: 0.4rem;
    font-weight: 200;
    border: 2px solid var(--muted);
    background-color: var(--muted);
    border-radius: 150px 0px 0px 150px;
}

.searchBTN {
    height: 2rem;
    width: 3rem;
    padding: 0.2rem;
    /* margin-right: 13rem; */
    font-size: 20px;
    padding-right: 0.9rem;
    padding-left: 0.9rem;
    background-color: var(--primary-hover);
    color: var(--text--bbg);
    border-radius: 0px 150px 150px 0px;
    border: 2px solid var(--primary-hover);
    transition: 0.3s ease;
}

.searchBTN:hover {
    background-color: var(--primary);
    border-color: var(--primary);
}

main {
    display: flex;
    flex-direction: column;
    padding-top: 65px;
}

.home-section {
    background-color: transparent;
    height: fit-content;
    margin-bottom: 0.5rem;
    padding: 1rem 2rem;
}

.home-section h2 {
    font-size: 2rem;
    color: #0c2e53;
    padding: 0.5rem 1rem;
}

#popular-week-container,
#fallOfHammer-container,
#newListings-container,
#featured-container,
#budget-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding-top: 15px;
    padding-bottom: 20px; /* Room for box-shadow and scaling */

    /* hide scrollbar (Firefox) */
    scrollbar-width: none;
}

#popular-week-container::-webkit-scrollbar,
#fallOfHammer-container::-webkit-scrollbar,
#newListings-container::-webkit-scrollbar,
#featured-container::-webkit-scrollbar,
#budget-container::-webkit-scrollbar {
    display: none;
    /* hide scrollbar (Chrome/Edge/Safari) */
}

/* --- Scrollable wrapper + circular arrow buttons --- */
.scrollable {
    background-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    /* space between arrow + row */
}

/* Let the middle container take the width */
.scrollable>#popular-week-container,
.scrollable>#fallOfHammer-container,
.scrollable>#newListings-container,
.scrollable>#featured-container,
.scrollable>#budget-container {
    flex: 1 1 auto;
    min-width: 0;
    /* important so it can shrink without overflow */
}

/* Circular arrow buttons, bigger */
.scroll-arrow {
    width: 52px;
    height: 52px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: rgba(255, 255, 255, 0.35);
    border: 1px solid rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(8px);
    cursor: pointer;

    flex: 0 0 auto;
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.scroll-arrow i {
    font-size: 38px;
    /* bigger icon */
    color: #0c2e53;
    line-height: 1;
}

.scroll-arrow:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.55);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
}

.scroll-arrow:active {
    transform: translateY(0px) scale(0.98);
}

@media (max-width: 768px) {
    .scroll-arrow {
        display: none !important;
    }

    .scrollable {
        gap: 0;
    }

    .home-section {
        padding: 0.75rem 1rem;
    }

    .home-section h2 {
        font-size: 1.8rem;
        padding: 0.5rem 0;
    }
}

/* optional: make snap feel nicer (one card aligns) */
#popular-week-container>*,
#fallOfHammer-container>*,
#newListings-container>*,
#featured-container>*,
#budget-container>* {
    scroll-snap-align: start;
}

/* --- Catawiki Style Mega Menu --- */
.mega-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: -100px;
    margin-top: 1.5rem;
    width: 650px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(12, 46, 83, 0.15);
    border: 1px solid rgba(12, 46, 83, 0.08);
    z-index: 10000;
    padding: 1.5rem;
    animation: fadeInDown 0.2s ease;
}

.mega-menu.show {
    display: block;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.cat-link {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    color: #0c2e53 !important;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.cat-link:hover {
    background: rgba(12, 46, 83, 0.05);
    border-color: rgba(12, 46, 83, 0.1);
    transform: translateX(3px);
}

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

.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

@media (max-width: 900px) {
    .desktop-only {
        display: none;
    }

    .mobile-only {
        display: block;
    }
}

.mobile-nav-wrapper {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.mobile-menu-btn {
    display: none;
    font-size: 2.2rem;
    background: none;
    color: var(--primary);
    cursor: pointer;
    border: none;
}

.mobile-close-btn {
    display: none;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2.5rem;
    background: none;
    color: var(--primary);
    cursor: pointer;
    border: none;
}

.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    backdrop-filter: blur(4px);
}

@media (max-width: 900px) {
    body {
        gap: 40px;
        font-size: 55%;
        /* Make things smaller on mobile */
    }

    header {
        padding-left: 1rem;
        padding-right: 1rem;
        height: 60px;
        width: 100%;
        left: 0;
    }

    .logoCTN {
        max-width: 150px;
    }

    .logoCTN h1 {
        font-size: 1.4rem;
    }

    .mobile-menu-btn {
        display: block;
        margin-left: auto;
        padding: 0.5rem;
    }

    .mobile-nav-wrapper {
        position: fixed;
        top: 0;
        right: -320px;
        width: 320px;
        max-width: 100vw;
        height: 100vh;
        background: #fff;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
        z-index: 99999;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 4rem 1.5rem 2rem;
        gap: 1.2rem;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .mobile-nav-wrapper.open {
        right: 0;
    }

    .mobile-nav-wrapper.open~.mobile-overlay {
        display: block;
    }

    .mobile-close-btn {
        display: block;
        top: 0.5rem;
        right: 1rem;
    }

    .navCtn {
        margin-right: 0;
        width: 100%;
    }

    .navigation {
        flex-direction: column;
        gap: 0.8rem;
        width: 100%;
        align-items: flex-start;
    }

    .navigation a {
        margin-left: 0;
        font-size: 1.5rem;
        width: 100%;
        padding: 0.6rem 0;
        border-bottom: 1px solid var(--border);
    }

    .nav-icons {
        width: 100%;
        justify-content: flex-start;
        gap: 1.5rem;
        padding: 0.8rem 0;
    }

    .btnCtn {
        width: 100%;
        margin-top: 0.5rem;
    }

    .listBtn {
        width: 100%;
        padding: 0.8rem;
        border-radius: 12px;
        font-size: 1.2rem;
    }

    .searchCTN {
        width: 100%;
        margin: 1rem 0;
        max-width: none;
    }

    #searchinp {
        height: 3.5rem;
        font-size: 1.2rem;
        padding-left: 1rem;
        background-color: #f9fafb;
        border: 1.5px solid var(--border);
    }

    .searchBTN {
        height: 3.5rem;
        width: 4rem;
        font-size: 1.2rem;
    }

    /* Mobile Categories */
    .mobile-categories {
        width: 100%;
        border-bottom: 1px solid var(--border);
        padding-bottom: 1rem;
    }

    .mobile-categories .categBtn {
        width: 100%;
        text-align: left;
        padding: 1rem 0;
        font-size: 1.8rem;
        font-weight: 700;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .mobile-mega-menu {
        display: none;
        padding-left: 1rem;
    }

    .mobile-mega-menu.show {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 0.5rem;
    }

    .mobile-mega-menu .mega-menu-grid {
        display: flex;
        flex-direction: column;
        gap: 0.2rem;
    }

    .mobile-mega-menu .cat-link {
        font-size: 1.4rem;
        padding: 0.6rem 0;
    }

    .mega-menu {
        display: none !important;
        /* Hide desktop mega menu on mobile */
    }
}

/* =========================================
   FOOTER STYLES
========================================= */

.main-footer {
    background: #0a111a;
    color: #fff;
    padding: 5rem 0 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.brand-col .footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: #fff;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.brand-col .footer-logo img {
    height: 40px;
    filter: brightness(0) invert(1);
}

.footer-tagline {
    color: #8a94a1;
    line-height: 1.6;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    max-width: 300px;
}

.footer-socials {
    display: flex;
    gap: 1.2rem;
}

.footer-socials a {
    color: #8a94a1;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.footer-socials a:hover {
    color: var(--secondary);
    transform: translateY(-3px);
}

.footer-col h4 {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 2rem;
    position: relative;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--secondary);
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 1rem;
}

.footer-col ul li a {
    color: #8a94a1;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.footer-col ul li a:hover {
    color: #fff;
    padding-left: 5px;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    color: #5b6574;
    font-size: 0.85rem;
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem 1rem;
    }

    .brand-col {
        grid-column: span 2;
    }

    .footer-tagline {
        max-width: none;
    }
}

@media (max-width: 500px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .brand-col {
        grid-column: span 1;
    }
}