/* Pale/washed-out tints of the logo's own gradient (blue/pink/orange - ui/theme/Color.kt's
   Accent* tokens on the Kotlin app) instead of the old unrelated green palette this page used
   to have - the website should read as the same brand as the logo and the mobile app, just
   toned down for a text-heavy page instead of the logo's full saturation. */
:root {
    --color-primary: #3563E0;
    --color-primary-container: #E4EAFB;
    --color-on-primary-container: #1B3B8C;
    --color-pink-container: #FFE3F1;
    --color-on-pink-container: #9C1361;
    --color-orange-container: #FFEEDC;
    --color-on-orange-container: #8A4B0A;
    --color-background: #FAFAFE;
    --color-surface: #FFFFFF;
    --color-surface-variant: #F2F3FB;
    --color-on-surface: #1C1B1F;
    --color-on-surface-variant: #5C5D66;
    --color-outline: #E2E3EF;
    --color-error: #BA1A1A;
    --color-pending: #B77B1E;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    /* A faint pastel wash of all three brand hues instead of a flat fill - same idea as the
       mobile app's BrandHeroBackground glow blobs, just far paler since this sits behind body
       text on every page, not inside a bold gradient banner. */
    background:
        radial-gradient(ellipse 900px 500px at 15% 0%, rgba(255, 45, 149, 0.05), transparent 60%),
        radial-gradient(ellipse 900px 500px at 85% 0%, rgba(245, 124, 31, 0.05), transparent 60%),
        var(--color-background);
    background-attachment: fixed;
    color: var(--color-on-surface);
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.hero {
    text-align: center;
    padding: 20px 24px;
}

.hero .hero-logo {
    display: block;
    margin: 0 auto 20px;
    /* Rendered at its own native size (279x150) per explicit request, not scaled down like the
       previous logo file - only capped so it can't overflow a narrow viewport. */
    max-width: 100%;
    height: auto;
}

.hero h1 {
    font-size: 36px;
    margin: 0 0 12px;
}

.hero p {
    color: var(--color-on-surface-variant);
    font-size: 18px;
    max-width: 560px;
    margin: 0 auto;
}

.search-form {
    margin-top: 28px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.search-form input[type="text"] {
    width: 320px;
    max-width: 70vw;
    padding: 12px 16px;
    border: 1px solid var(--color-outline);
    border-radius: 10px;
    font-size: 15px;
}

.btn {
    display: inline-block;
    padding: 12px 20px;
    border-radius: 10px;
    border: none;
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
}

.btn:hover { opacity: 0.92; text-decoration: none; color: #fff; }

.btn-outline {
    background: transparent;
    color: var(--color-on-surface);
    border: 1px solid var(--color-outline);
}

.section-title {
    font-size: 22px;
    font-weight: 600;
    margin: 48px 0 20px;
}

.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.item-card {
    background: var(--color-surface);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--color-outline);
    transition: transform 0.15s ease;
}

.item-card:hover { transform: translateY(-2px); text-decoration: none; }

.item-card .thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--color-surface-variant) center/cover no-repeat;
}

.item-card .info { padding: 14px; }
.item-card .info .title { font-weight: 600; color: var(--color-on-surface); margin-bottom: 4px; }
.item-card .info .category { font-size: 13px; color: var(--color-on-surface-variant); }

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--color-on-surface-variant);
}

.how-it-works {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin: 24px 0 56px;
}

.how-step {
    background: var(--color-surface);
    border: 1px solid var(--color-outline);
    border-radius: 14px;
    padding: 24px;
}

.how-step .step-number {
    display: inline-flex;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-primary-container);
    color: var(--color-on-primary-container);
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 12px;
}

.site-footer {
    text-align: center;
    padding: 32px 24px;
    color: var(--color-on-surface-variant);
    font-size: 14px;
    border-top: 1px solid var(--color-outline);
    margin-top: 40px;
}

.site-footer a {
    display: inline-block;
    margin-top: 6px;
    color: var(--color-on-surface-variant);
    text-decoration: underline;
}

/* Footer: "Dizayn Sanat" first, the legal links to its right; wraps on phones. */
.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 16px;
    margin-top: 8px;
}

/* Cookie consent banner (analytics only load after "Kabul Et"). */
.cookie-banner {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 1000;
    max-width: 420px;
    background: var(--color-surface);
    border: 1px solid var(--color-outline);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(28, 27, 31, 0.15);
    padding: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0; flex: 1 1 100%; font-size: 13px; line-height: 1.5; color: var(--color-on-surface); }
@media (max-width: 480px) { .cookie-banner { right: 16px; max-width: none; } }
.cookie-actions { display: flex; gap: 8px; margin-left: auto; }

/* Legal pages */
.legal { max-width: 760px; padding: 40px 16px 24px; line-height: 1.65; }
.legal h1 { font-size: 28px; margin: 0 0 4px; }
.legal h2 { font-size: 19px; margin: 28px 0 8px; }
.legal .legal-meta { color: var(--color-on-surface-variant); margin: 0 0 20px; font-size: 14px; }
.legal li { margin-bottom: 6px; }

/* Item detail page */
.item-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px 0;
}

.item-detail .photos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.item-detail .photos img { width: 100%; border-radius: 12px; aspect-ratio: 1/1; object-fit: cover; background: var(--color-surface-variant); }
.item-detail h1 { margin-top: 0; }
.item-detail .meta { color: var(--color-on-surface-variant); margin-bottom: 20px; }

/* ---------- Completed trades: square split corner-to-corner (home strip + trade page) ---------- */
.trade-split {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--color-surface-variant);
}
.trade-split .tri {
    position: absolute;
    inset: 0;
    background: var(--color-surface-variant) center/cover no-repeat;
}
/* top-left triangle = offered item, bottom-right = the item asked for */
.trade-split .tri-top { clip-path: polygon(0 0, 100% 0, 0 100%); }
.trade-split .tri-bottom { clip-path: polygon(100% 0, 100% 100%, 0 100%); }
/* thin white seam along the diagonal */
.trade-split::after {
    content: "";
    position: absolute;
    left: -10%;
    top: 50%;
    width: 120%;
    height: 4px;
    background: #fff;
    transform: rotate(-45deg);
}
.trade-badge img { width: 70%; height: 70%; margin-top: 15%; display: inline-block; vertical-align: top; }
.trade-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 1;
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px;
    border-radius: 50%;
    background: #fff;
    color: var(--color-primary);
    font-size: 22px;
    font-weight: 700;
    line-height: 44px;
    text-align: center;
    box-shadow: 0 4px 14px rgba(28, 27, 31, 0.25);
}
.trade-card .info .title { line-height: 1.35; }

.trade-page { padding-bottom: 24px; }
.trade-hero {
    display: grid;
    grid-template-columns: minmax(0, 380px) 1fr;
    gap: 32px;
    align-items: center;
    padding: 16px 0 8px;
}
.trade-split.big { border-radius: 20px; }
.trade-split.big .trade-badge { width: 60px; height: 60px; margin: -30px 0 0 -30px; line-height: 60px; font-size: 28px; }
.trade-hero h1 { font-size: 28px; margin: 10px 0 12px; line-height: 1.3; }
.trade-hero h1 .swap { color: var(--color-primary); }
.trade-hero .muted { color: var(--color-on-surface-variant); margin: 0 0 18px; }
.trade-done {
    display: inline-block;
    background: #E3F4EA;
    color: #1E7B4F;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 600;
}
.trade-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 32px; }
.trade-side {
    background: var(--color-surface);
    border: 1px solid var(--color-outline);
    border-radius: 18px;
    padding: 18px;
}
.trade-side h2 { font-size: 20px; margin: 10px 0 4px; }
.trade-side .meta { color: var(--color-on-surface-variant); font-size: 14px; margin-bottom: 12px; }
.trade-side .photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.trade-side .photos img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 10px; background: var(--color-surface-variant); }
.trade-side .desc { white-space: pre-line; line-height: 1.6; }
.side-label { display: inline-block; color: #fff; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; }
.trade-side.offered .side-label { background: #F57C1F; }
.trade-side.target .side-label { background: var(--color-primary); }
.side-deleted { display: inline-block; margin-left: 6px; background: #FDE7E7; color: var(--color-error); border-radius: 999px; padding: 3px 10px; font-size: 12px; }

@media (max-width: 720px) {
    .trade-hero, .trade-sides { grid-template-columns: 1fr; }
    .trade-hero h1 { font-size: 22px; }
}

