
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Outfit:wght@400;500;600;700;800;900&display=swap');

/* Main website colors */
:root {
    --background: #f7f9f3;
    --green: #287a68;
    --dark-green: #174e45;
    --light-green: #e6f3e9;
    --text: #253a36;
    --white: #ffffff;
    --cream: #fffefa;
    --line: #e3ebe4;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: "DM Sans", Arial, sans-serif;
}

h1, h2, h3 {
    font-family: Outfit, Arial, sans-serif;
}

button, input, select {
    font: inherit;
}

button {
    cursor: pointer;
}

/* Announcement banner */
.topline {
    background: var(--dark-green);
    color: #e5f9e5;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 14px;
}

/* Header */
header {
    background: var(--cream);
    color: #245e53;
    padding: 22px;
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 32px;
    font-weight: 900;
}

header p {
    margin: 5px 0 0;
    color: #71817c;
    font-size: 14px;
}

/* Navigation */
nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    padding: 15px 25px;
}

nav a,
nav button {
    color: #4f6e62;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}

nav button {
    background: none;
    border: none;
    padding: 0;
}

nav button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

nav a:hover,
nav button:hover:not(:disabled) {
    color: var(--green);
}

/* Main content */
main {
    max-width: 1220px;
    margin: 25px auto;
    padding: 0 25px;
}

section {
    margin-bottom: 35px;
}

section h2 {
    color: #264e43;
    font-size: 25px;
    margin-bottom: 5px;
}

.section-description {
    font-size: 13px;
    color: #7b9086;
    margin-top: 5px;
    margin-bottom: 18px;
}

/* Homepage hero */
.hero {
    position: relative;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: linear-gradient(
        110deg,
        #d7efe0,
        #f0f5d2 60%,
        #f9dfc1
    );

    padding: 40px 50px;
    border-radius: 25px;
    min-height: 280px;
    margin-bottom: 20px;
}

.hero-text {
    max-width: 540px;
    position: relative;
    z-index: 2;
}

.eyebrow {
    color: #468775;
    font-size: 11px;
    letter-spacing: 2px;
    font-weight: 800;
}

.hero h1 {
    font-size: 50px;
    line-height: 1.08;
    color: #225b4f;
    margin: 12px 0;
    font-weight: 900;
}

.hero p {
    max-width: 465px;
    color: #5c766a;
    line-height: 1.7;
    font-size: 15px;
    margin-bottom: 22px;
}

.btn {
    display: inline-block;
    background: var(--green);
    color: white;
    padding: 12px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
}

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

/* Simple Pebble illustration */
.hero-art {
    width: 300px;
    height: 220px;
    position: relative;
    flex-shrink: 0;
}

.hill {
    position: absolute;
    width: 280px;
    height: 110px;
    background: #9ccd9e;
    border-radius: 50%;
    bottom: -65px;
    left: 25px;
}

.hero-pebble {
    position: absolute;
    top: 35px;
    left: 100px;

    width: 125px;
    height: 126px;

    background: linear-gradient(140deg, #d4f1b7, #80c9a6);
    border: 5px solid #337866;
    border-radius: 41% 52% 45% 47%;

    display: grid;
    place-items: center;

    font-size: 62px;
    transform: rotate(13deg);
    color: #253a36;
}

.leaf {
    position: absolute;
    font-size: 65px;
    top: 40px;
    left: 15px;
}

.flower {
    position: absolute;
    font-size: 65px;
    top: 10px;
    right: 5px;
}

/* Marketplace statistics */
.stats-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 35px;
}

.statpill {
    background: white;
    border: 1px solid var(--line);
    border-radius: 30px;
    padding: 11px 18px;
    font-size: 12px;
    color: #6b8175;
}

.statpill strong {
    color: #2b6c59;
}

/* Category cards */
.categories {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
}

.cat {
    background: white;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px 10px;
    text-align: center;
}

.cat .emoji {
    display: block;
    font-size: 30px;
    margin-bottom: 8px;
}

.cat strong {
    font-size: 13px;
}

.cat small {
    display: block;
    font-size: 11px;
    color: #90a096;
    margin-top: 5px;
}

.cat:hover {
    border-color: #9bb9a3;
    background: #f5faf5;
}

/* Search controls */
.toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
}

.toolbar input,
.toolbar select {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: white;
    color: var(--text);
}

.toolbar input {
    flex: 1;
    min-width: 0;
}

.toolbar input:focus,
.toolbar select:focus {
    outline: 2px solid #9de0c2;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.filter {
    background: white;
    color: var(--dark-green);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 13px;
}

.filter:hover {
    background: var(--light-green);
}

.filter.active {
    background: var(--green);
    color: white;
}

.catalog-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: #71817c;
    margin-bottom: 15px;
}

.catalog-info label {
    display: flex;
    align-items: center;
    gap: 5px;
}

.catalog-info input {
    accent-color: var(--green);
}

/* Catalog cards */
.itemgrid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 13px;
}

.itemcard {
    position: relative;
    background: white;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 20px 10px;
    text-align: center;
    min-width: 0;
    transition: 0.2s;
}

.itempic {
    width: 94px;
    height: 94px;
    background: #f5f8f1;
    margin: auto;
    border-radius: 17px;
    display: grid;
    place-items: center;
    font-size: 43px;
}

.itemcard h3 {
    font-family: "DM Sans", sans-serif;
    font-size: 13px;
    margin: 12px 0 8px;
    min-height: 32px;
}

.itemcard small {
    font-size: 11px;
    color: #91a19a;
}

.itemcard:hover,
.listingcard:hover {
    border-color: #b4d4c0;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px #315e4a10;
}

/* Listing labels */
.tag {
    display: inline-block;
    background: #e8f5e9;
    color: #31836b;
    border-radius: 6px;
    padding: 4px 7px;
    font-size: 10px;
    font-weight: 800;
}

.itemcard .tag {
    position: absolute;
    top: 8px;
    left: 8px;
}

.tag.blocked {
    background: #ffe7e2;
    color: #c16d5b;
}

/* Recent listings */
.listgrid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.listingcard {
    background: white;
    border: 1px solid var(--line);
    border-radius: 15px;
    padding: 18px;
    transition: 0.2s;
}

.listingcard h3 {
    color: var(--dark-green);
    font-size: 17px;
    margin-top: 0;
}

.listingcard p {
    font-size: 13px;
    color: #71817c;
}

.price {
    display: block;
    color: var(--green);
    font-weight: bold;
    margin-top: 12px;
}

.empty {
    background: white;
    border: 1px solid var(--line);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    color: #71817c;
}

.no-results {
    grid-column: 1 / -1;
}

/* Footer */
footer {
    background: var(--cream);
    border-top: 1px solid var(--line);
    text-align: center;
    padding: 30px 20px;
    color: #71817c;
    font-size: 13px;
}

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

/* Responsive layout */
@media (max-width: 1000px) {
    .categories {
        grid-template-columns: repeat(4, 1fr);
    }

    .itemgrid {
        grid-template-columns: repeat(4, 1fr);
    }

    .listgrid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero {
        padding: 30px;
    }

    .hero h1 {
        font-size: 40px;
    }
}

@media (max-width: 700px) {
    main {
        padding: 0 15px;
    }

    .hero {
        padding: 30px 20px;
    }

    .hero h1 {
        font-size: 35px;
    }

    .hero-art {
        display: none;
    }

    .categories {
        grid-template-columns: repeat(2, 1fr);
    }

    .itemgrid {
        grid-template-columns: repeat(2, 1fr);
    }

    .toolbar {
        flex-direction: column;
    }

    .catalog-info {
        flex-wrap: wrap;
    }

    .listgrid {
        grid-template-columns: 1fr;
    }

    nav {
        gap: 15px;
    }
}


/* Hide inactive marketplace pages */
[hidden] {
    display: none !important;
}

/* Navigation search */
nav {
    align-items: center;
}

.searchhead {
    position: relative;
    flex: 1;
    max-width: 380px;
    min-width: 180px;
}

.searchhead input {
    width: 100%;
    background: #f3f6f1;
    border: 1px solid #e4e9e1;
    border-radius: 13px;
    padding: 12px 15px 12px 35px;
    font-size: 14px;
    color: var(--text);
}

.searchhead::before {
    content: "⌕";
    position: absolute;
    left: 12px;
    top: 7px;
    font-size: 23px;
    color: #739286;
    pointer-events: none;
}

.searchhead input:focus {
    outline: 2px solid #9de0c2;
}

/* Homepage section headings */
.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.section-link {
    color: var(--green);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}

.section-link:hover {
    text-decoration: underline;
}

/* Hero illustration labels */
.art-label {
    position: absolute;
    background: var(--cream);
    padding: 9px 13px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
    z-index: 3;
}

.care {
    left: 5px;
    bottom: 38px;
    transform: rotate(-9deg);
}

.friend {
    right: -5px;
    bottom: 48px;
    transform: rotate(8deg);
}

/* Actual catalog images */
.itempic img {
    width: 100%;
    height: 100%;
    padding: 8px;
    object-fit: contain;
}

.itempic {
    overflow: hidden;
}

.itempic .fallback {
    font-size: 40px;
}

.itemcard h3 {
    min-height: 20px;
    margin-bottom: 12px;
}

.itemcard {
    padding: 18px 10px;
}

/* Catalog page */
.page-title {
    font-size: 38px;
    color: var(--dark-green);
    margin: 10px 0;
}

.back {
    background: none;
    border: none;
    padding: 0;
    margin-bottom: 25px;
    color: var(--green);
    font-size: 13px;
    font-weight: 700;
}

.back:hover {
    text-decoration: underline;
}

footer a {
    color: var(--green);
}

/* Mobile navigation */
@media (max-width: 700px) {
    .searchhead {
        flex-basis: 100%;
        max-width: none;
    }

    .section-heading {
        align-items: flex-start;
    }

    .section-link {
        font-size: 11px;
    }

    .page-title {
        font-size: 29px;
    }
}


/* Account navigation */
.nav-account {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

nav .account-button {
    padding: 8px 13px;
    border: 1px solid #c5d9cd;
    border-radius: 10px;
    color: var(--green);
    background: var(--cream);
    font-size: 12px;
    font-weight: bold;
}

nav .account-button.filled {
    background: var(--green);
    color: white;
    border-color: var(--green);
}

#accountName {
    color: var(--green);
    font-size: 13px;
    font-weight: bold;
}

/* Multiple action buttons */
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.btn {
    border: none;
    cursor: pointer;
}

.btn.secondary {
    background: #e6f3e9;
    color: var(--dark-green);
}

.btn.secondary:hover {
    background: #d5eadc;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Popup windows */
.modal {
    width: min(460px, 92vw);
    max-height: 90vh;
    overflow-y: auto;

    background: var(--cream);
    color: var(--text);

    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 30px;

    box-shadow: 0 20px 70px #174e4530;
}

.modal.wide {
    width: min(650px, 92vw);
}

.modal::backdrop {
    background: #173d3566;
}

.modal h2 {
    color: var(--dark-green);
    margin: 0 25px 10px 0;
    font-size: 27px;
}

.modal-description {
    color: #71817c;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 22px;
}

.close-modal {
    position: absolute;
    right: 15px;
    top: 12px;

    background: transparent;
    border: none;

    color: #71817c;
    font-size: 26px;
}

/* Forms */
.field {
    margin-bottom: 17px;
}

.field label {
    display: block;
    color: var(--dark-green);
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 7px;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    background: white;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 12px;
    font: inherit;
    font-size: 14px;
}

.field textarea {
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: 2px solid #9de0c2;
}

.modal form > .btn {
    width: 100%;
}

/* Demo accounts */
.demo-accounts {
    margin-top: 22px;
    padding-top: 15px;
    border-top: 1px solid var(--line);
}

.demo-accounts p {
    color: #71817c;
    font-size: 13px;
}

.demo-accounts button {
    background: var(--light-green);
    color: var(--dark-green);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 8px 12px;
    margin: 4px;
    font-size: 12px;
}

.demo-accounts button:hover {
    background: #d5eadc;
}

/* Interactive item cards */
.itemcard {
    cursor: pointer;
}

.itemcard:focus-visible {
    outline: 2px solid var(--green);
}

#itemDetails > .itempic {
    width: 110px;
    height: 110px;
    margin: 0 auto 20px;
}

#itemDetails > h2,
#itemDetails > .modal-description {
    text-align: center;
}

/* Individual listings and offers */
.detail-listing,
.offer-card {
    background: white;
    border: 1px solid var(--line);
    border-radius: 14px;

    margin-bottom: 15px;
    padding: 20px;
}

.detail-listing h3,
.offer-card h3 {
    color: var(--dark-green);
    margin: 10px 0;
}

.detail-listing p,
.offer-card p {
    font-size: 14px;
    color: #71817c;
    overflow-wrap: anywhere;
}

.detail-listing .price {
    color: var(--green);
    margin-bottom: 16px;
}

.offer-card {
    max-width: 750px;
}

/* Short notifications */
#toast {
    position: fixed;
    bottom: 25px;
    right: 25px;
    max-width: calc(100vw - 50px);

    background: var(--dark-green);
    color: white;

    padding: 14px 22px;
    border-radius: 12px;
    font-size: 14px;

    box-shadow: 0 8px 25px #174e4530;
    z-index: 100;
}

/* Mobile adjustments */
@media (max-width: 700px) {
    .modal {
        padding: 22px;
    }

    .nav-account {
        justify-content: center;
    }

    .hero-actions {
        gap: 8px;
    }

    .hero-actions .btn {
        font-size: 12px;
    }
}


/* Images on marketplace listings */
.listingcard .itempic {
    width: 100%;
    height: 120px;
    margin-bottom: 15px;
    background: #f5f8f1;
}

.listingcard .itempic img {
    max-width: 110px;
    max-height: 110px;
}

.listingcard h3 {
    margin-top: 10px;
}

/* Item previews inside forms */
.listing-preview {
    background: #f5f8f1;
    border: 1px solid var(--line);
    border-radius: 12px;

    padding: 15px;
    margin: 15px 0;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;

    text-align: center;
}

.listing-preview .itempic {
    width: 100px;
    height: 100px;
    margin: 0;
}

.listing-preview strong {
    color: var(--dark-green);
    font-size: 15px;
}

.listing-preview small {
    color: #71817c;
    font-size: 12px;
}

/* Images on incoming and outgoing offers */
.offer-card .itempic {
    width: 90px;
    height: 90px;
    margin: 15px 0;
}


/* Trade rooms */
.trade-room {
    max-width: 850px;

    background: white;
    border: 1px solid var(--line);
    border-radius: 20px;

    padding: 25px;
    margin-bottom: 20px;
}

.trade-room h2,
.trade-room h3 {
    color: var(--dark-green);
}

.trade-room > .tag {
    margin-bottom: 15px;
}

/* Item and trade information */
.trade-summary {
    display: flex;
    align-items: center;
    gap: 20px;

    background: #f5f8f1;
    border-radius: 14px;
    padding: 20px;

    margin-bottom: 25px;
}

.trade-summary .itempic {
    width: 110px;
    height: 110px;
    margin: 0;
    flex-shrink: 0;
}

.trade-summary h2 {
    margin: 0 0 10px;
    font-size: 25px;
}

.trade-summary p {
    color: #71817c;
    font-size: 14px;
    margin: 6px 0;
    overflow-wrap: anywhere;
}

/* Trading confirmation steps */
.trade-step {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 15px;
    padding: 18px 0;

    border-bottom: 1px solid var(--line);
}

.trade-step strong {
    display: block;
    color: var(--dark-green);
    font-size: 14px;
    margin-bottom: 8px;
}

.trade-step small {
    display: block;
    color: #71817c;
    font-size: 12px;
    margin: 4px 0;
}

.trade-step .btn {
    flex-shrink: 0;
}

/* Trading safety reminder */
.trade-reminder {
    background: var(--light-green);
    color: var(--dark-green);

    border-radius: 10px;
    padding: 15px;

    font-size: 13px;
    line-height: 1.6;

    margin: 20px 0;
}

/* Offer status */
.offer-card .trade-status {
    color: var(--green);
    font-weight: bold;
}

.offer-card .hero-actions {
    margin-top: 18px;
}

/* Mobile trading layout */
@media (max-width: 600px) {
    .trade-room {
        padding: 17px;
    }

    .trade-summary {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }

    .trade-step {
        flex-wrap: wrap;
    }

    .trade-step .btn {
        width: 100%;
    }
}
