* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background: #f4f6f9;
    color: #1a1a2e;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ================= NAVBAR ================= */

nav {
    width: 100%;
    background: #1a3a5c;
    color: #fff;
    padding: 0 20px;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* ================= GOBEKA LOGO ================= */

.nav-brand {
    width: 130px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    flex-shrink: 0;
}

.nav-brand img {
    display: block;
    width: 120px !important;
    height: 45px !important;
    max-width: 120px !important;
    max-height: 45px !important;
    object-fit: contain !important;
}

/* ================= NAV LINKS ================= */

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a {
    color: #cddce8;
    font-size: .95rem;
    transition: .3s;
}

.nav-links a:hover {
    color: #fff;
}

/* ================= BUTTONS ================= */

.btn {
    padding: 8px 18px;
    border-radius: 6px;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all .2s;
}

.btn-primary {
    background: #4db8a4;
    color: #fff;
}

.btn-primary:hover {
    background: #3aa08e;
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.4);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
}

/* ================= HERO ================= */

.hero {
    background: linear-gradient(
        135deg,
        #1a3a5c 0%,
        #1e4d6b 60%,
        #145c4b 100%
    );
    color: #fff;
    padding: 4rem 2rem 3rem;
    text-align: center;
}

.hero h1 {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: .75rem;
    letter-spacing: -1px;
}

.hero h1 span {
    color: #4db8a4;
}

.hero p {
    font-size: 1.05rem;
    color: #b8d4e8;
    margin-bottom: 2rem;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.hero-search {
    display: flex;
    max-width: 540px;
    margin: 0 auto 1.5rem;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
}

.hero-search:focus-within {
    border-color: #4db8a4;
}

.hero-search input {
    flex: 1;
    min-width: 0;
    padding: 14px 16px;
    font-size: .95rem;
    border: none;
    outline: none;
    color: #1a1a2e;
}

.hero-search button {
    background: #1a3a5c;
    color: #fff;
    border: none;
    padding: 14px 22px;
    font-weight: 600;
    cursor: pointer;
    font-size: .9rem;
    transition: background .2s;
}

.hero-search button:hover {
    background: #4db8a4;
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.stat {
    text-align: center;
}

.stat strong {
    display: block;
    font-size: 1.5rem;
    color: #4db8a4;
}

.stat span {
    font-size: .8rem;
    color: #b8d4e8;
}

/* ================= MAIN LAYOUT ================= */

.main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ================= CATEGORIES ================= */

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a3a5c;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cat-grid {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.cat-chip {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid #d0dce8;
    background: #fff;
    color: #4a6580;
    transition: all .2s;
}

.cat-chip:hover,
.cat-chip.active {
    background: #1a3a5c;
    color: #fff;
    border-color: #1a3a5c;
}

.cat-chip.active {
    background: #4db8a4;
    border-color: #4db8a4;
}

/* ================= LISTINGS ================= */

.listings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: .5rem;
}

.sort-select {
    padding: 7px 12px;
    border: 1px solid #d0dce8;
    border-radius: 6px;
    font-size: .85rem;
    background: #fff;
    color: #4a6580;
    cursor: pointer;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

.card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e0e8f0;
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
    cursor: pointer;
    position: relative;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(26,58,92,0.1);
}

.card-img {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #f5f5f5;
}

.listing-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-body {
    padding: 12px 14px;
}

.card-cat {
    font-size: .72rem;
    font-weight: 600;
    color: #4db8a4;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 4px;
}

.card-title {
    font-size: .95rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 4px;
    line-height: 1.3;
}

.card-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a3a5c;
    margin-bottom: 6px;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    border-top: 1px solid #f0f4f8;
    padding-top: 8px;
}

/* ================= WISHLIST REMOVE BUTTON ================= */

.removeBtn {
    background: #ff4d4f;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: .3s;
}

.removeBtn:hover {
    background: #d9363e;
}

.seller-info {
    font-size: .78rem;
    color: #7a8fa0;
}

.badge {
    font-size: .7rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
    background: #e8f8f4;
    color: #1a7a60;
}

/* ================= MODAL ================= */

.modal-bg {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10,20,40,0.55);
    z-index: 200;
    align-items: center;
    justify-content: center;
}

.modal-bg.open {
    display: flex;
}

.modal {
    background: #fff;
    border-radius: 14px;
    width: min(900px, 95vw);
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2rem;
    max-width: 900px;
    position: relative;
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: #7a8fa0;
    line-height: 1;
}

/* ================= GALLERY ================= */

.gallery {
    position: relative;
    width: 100%;
}

.gallery-image {
    width: 100%;
    max-height: 350px;
    object-fit: contain;
    border-radius: 10px;
}

.gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,.45);
    color: white;
    font-size: 26px;
    cursor: pointer;
    transition: .25s;
}

.gallery-btn:hover {
    background: #1a3a5c;
}

.left {
    left: 10px;
}

.right {
    right: 10px;
}

.modal-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f4f8;
    font-size: .9rem;
}

.detail-row span:first-child {
    color: #7a8fa0;
}

.detail-row span:last-child {
    font-weight: 600;
    color: #1a1a2e;
}

/* ================= WISHLIST BUTTON ================= */

.wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: #bbb;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    transition: .25s;
    z-index: 50;
}

.wishlist-btn:hover {
    transform: scale(1.1);
}

.wishlist-btn.saved {
    color: #e63946;
}

/* ================= CONTACT BUTTON ================= */

.contact-btn {
    width: 100%;
    margin-top: 1.5rem;
    padding: 14px;
    background: #1a3a5c;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}

.contact-btn:hover {
    background: #4db8a4;
}

/* ================= POST FORM ================= */

.form-panel {
    display: none;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e0e8f0;
    padding: 2rem;
    margin-bottom: 2rem;
}

.form-panel.open {
    display: block;
}

.form-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a3a5c;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.form-row {
    margin-bottom: 1.1rem;
}

.form-row label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: #4a6580;
    margin-bottom: 5px;
}

.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 10px 13px;
    border: 1.5px solid #d0dce8;
    border-radius: 7px;
    font-size: .9rem;
    color: #1a1a2e;
    background: #fafcfe;
    transition: border-color .2s;
    font-family: inherit;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: #4db8a4;
}

.form-row textarea {
    resize: vertical;
    min-height: 90px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.emoji-picker {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.emoji-opt {
    padding: 8px 12px;
    border: 1.5px solid #d0dce8;
    border-radius: 7px;
    cursor: pointer;
    font-size: 1.2rem;
    background: #fff;
    transition: all .2s;
}

.emoji-opt:hover,
.emoji-opt.selected {
    border-color: #4db8a4;
    background: #e8f8f4;
}

.submit-btn {
    width: 100%;
    padding: 13px;
    background: #1a3a5c;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: .5rem;
    transition: background .2s;
}

.submit-btn:hover {
    background: #4db8a4;
}

/* ================= EMPTY ================= */

.empty {
    text-align: center;
    padding: 3rem;
    color: #7a8fa0;
}

.empty div {
    font-size: 2.5rem;
    margin-bottom: .75rem;
}

/* ================= TOAST ================= */

.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #1a3a5c;
    color: #fff;
    padding: 13px 22px;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 500;
    z-index: 500;
    opacity: 0;
    transform: translateY(20px);
    transition: all .35s;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* ================= MOBILE LISTINGS ================= */

@media (max-width: 600px) {
    .hero h1 {
        font-size: 1.7rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .hero {
        padding: 3rem 1rem 2rem;
    }

    .main {
        padding: 1.5rem 12px;
    }

    .hero-search input {
        padding: 12px 10px;
        font-size: .85rem;
    }

    .hero-search button {
        padding: 12px 14px;
        font-size: .82rem;
    }

    .card-img {
        height: 170px;
    }

    .card-body {
        padding: 10px;
    }

    .card-title {
        font-size: .88rem;
        overflow-wrap: anywhere;
    }

    .card-price {
        font-size: 1rem;
    }
}

/* ================= PAGINATION ================= */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.pagination a {
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 8px;
    background: #fff;
    color: #1a3a5c;
    border: 1px solid #d0dce8;
    font-weight: 600;
    transition: .2s;
}

.pagination a:hover {
    background: #1a3a5c;
    color: #fff;
}

.pagination a.active {
    background: #4db8a4;
    color: #fff;
    border-color: #4db8a4;
}

/* ================= FOOTER ================= */

.footer {
    background: #1a3a5c;
    color: #fff;
    margin-top: 70px;
    width: 100%;
}

.footer-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-brand,
.footer-links,
.footer-social {
    min-width: 0;
}

.footer-brand h2 {
    font-size: 2rem;
    margin-bottom: 12px;
}

.footer-brand span {
    color: #4db8a4;
}

.footer-brand p {
    color: #d8e2ec;
    line-height: 1.7;
}

.footer-links h3,
.footer-social h3 {
    margin-bottom: 18px;
}

.footer-links a,
.footer-social a {
    display: block;
    color: #d8e2ec;
    text-decoration: none;
    margin-bottom: 12px;
    transition: color .3s;
}

.footer-links a:hover,
.footer-social a:hover {
    color: #4db8a4;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.15);
    text-align: center;
    padding: 20px;
    font-size: .9rem;
    color: #d8e2ec;
    overflow-wrap: anywhere;
}

/* ================= MOBILE FOOTER ================= */

@media (max-width: 600px) {
    .footer-container {
        grid-template-columns: minmax(0, 1fr);
        padding: 35px 20px;
        gap: 28px;
    }

    .footer-container > *,
    .footer-brand,
    .footer-links,
    .footer-social {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .footer-brand h2 {
        font-size: 1.8rem;
    }

    .footer-brand p,
    .footer-links a,
    .footer-social a {
        overflow-wrap: anywhere;
    }

    .footer-social img,
    .footer-social svg {
        max-width: 100%;
        height: auto;
    }

    .footer-bottom {
        padding: 18px 14px;
        font-size: .82rem;
    }
}

/* ================= HAMBURGER MENU ================= */

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
}

/* ================= MOBILE NAV ================= */

@media (max-width: 768px) {
    nav {
        position: sticky;
        top: 0;
        z-index: 1000;
        display: flex;
        justify-content: space-between;
        align-items: center;
        height: 60px;
        padding: 0 15px;
    }

    nav .nav-brand {
        width: 110px;
        height: 60px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        overflow: hidden;
        flex-shrink: 0;
    }

    nav .nav-brand img {
        width: 105px !important;
        height: 42px !important;
        max-width: 105px !important;
        max-height: 42px !important;
        object-fit: contain !important;
        display: block !important;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 60px;
        right: -100%;
        width: 260px;
        max-width: 85vw;
        height: calc(100vh - 60px);
        height: calc(100dvh - 60px);
        background: #1a3a5c;
        display: flex;
        flex-direction: column;
        padding: 25px;
        gap: 18px;
        transition: right .35s ease;
        z-index: 999;
        overflow-y: auto;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        width: 100%;
        color: #fff;
        font-size: 17px;
        padding: 12px;
        background: rgba(255,255,255,.08);
        border-radius: 8px;
    }

    .nav-links .btn {
        width: 100%;
    }
}

/* ================= RELATED LISTINGS ================= */

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.related-card {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #eee;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: .25s;
}

.related-card:hover {
    transform: translateY(-3px);
}

.related-card img {
    display: block;
    width: 100%;
    height: 120px;
    object-fit: cover;
}

#relatedSection {
    margin-top: 60px;
    display: none;
}

/* ================= DISABLE STICKY SEARCH ================= */

.sticky-search-bar {
    display: none !important;
}

/* ================= ADMIN DASHBOARD ================= */

.dashboard-stats {
    max-width: 1400px;
    margin: 20px auto 0;
    padding: 0 20px;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    width: fit-content;
    min-width: 220px;
}

.stat-icon {
    font-size: 2rem;
}

.stat-card strong {
    display: block;
    font-size: 1.7rem;
    color: #1a3a5c;
}

.stat-card span {
    display: block;
    margin-top: 3px;
    font-size: .85rem;
    color: #7a8fa0;
}
