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

:root {
    --primary: #1677ff;
    --primary-dark: #0864df;
    --green: #18a957;
    --orange: #f59b23;
    --red: #d74646;
    --page: #f1f4f8;
    --white: #ffffff;
    --text: #17253a;
    --muted: #65758a;
    --light: #8d99a8;
    --border: #dfe6ee;
    --shadow: 0 12px 38px rgba(31, 56, 87, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    color: var(--text);
    background: var(--page);
    font-family: "Plus Jakarta Sans", sans-serif;
}

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

button,
input,
textarea,
select {
    font-family: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    height: 70px;
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    border-bottom: 1px solid var(--border);
}

.site-header-inner {
    width: 100%;
    max-width: 1240px;
    height: 100%;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 30px;
}

.site-logo {
    display: flex;
    align-items: center;
}

.site-logo img {
    width: 170px;
    height: 48px;
    object-fit: contain;
}

.site-nav {
    height: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-nav a {
    height: 100%;
    min-width: 105px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    border-bottom: 3px solid transparent;
    font-size: 12px;
    font-weight: 700;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.header-primary-button,
.logout-link {
    padding: 10px 14px;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 800;
}

.header-primary-button {
    color: var(--white);
    background: var(--primary);
}

.logout-link {
    color: var(--red);
    background: #fff0f0;
}

.product-page,
.marketplace-page,
.product-detail-page,
.manage-products-page {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 30px 20px 60px;
}

.product-form-card,
.product-gallery-card,
.product-information-card,
.product-description-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 19px;
    box-shadow: var(--shadow);
}

.product-form-card {
    padding: 32px;
}

.page-heading,
.manage-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border);
}

.page-heading span,
.manage-heading span,
.marketplace-hero span {
    display: block;
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.1px;
    margin-bottom: 7px;
}

.page-heading h1,
.manage-heading h1,
.marketplace-hero h1 {
    font-size: 29px;
    letter-spacing: -1px;
    margin-bottom: 8px;
}

.page-heading p,
.manage-heading p,
.marketplace-hero p {
    max-width: 650px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.7;
}

.outline-button,
.cancel-button {
    min-height: 43px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    color: var(--primary);
    background: #edf5ff;
    font-size: 11px;
    font-weight: 800;
}

.alert {
    margin-top: 22px;
    padding: 13px 15px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.6;
}

.alert-error {
    color: #b92828;
    background: #fff0f0;
    border: 1px solid #ffd4d4;
}

.alert-success {
    color: #08783b;
    background: #eafbf2;
    border: 1px solid #c8efda;
}

.form-section {
    padding: 28px 0;
    border-bottom: 1px solid var(--border);
}

.section-title {
    margin-bottom: 21px;
}

.section-title h2 {
    font-size: 17px;
    margin-bottom: 5px;
}

.section-title p {
    color: var(--muted);
    font-size: 11px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 17px;
}

.form-grid-three {
    grid-template-columns: 1.3fr .7fr 1fr;
}

.form-group {
    position: relative;
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 800;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 11px;
    outline: none;
    color: var(--text);
    background: #fbfcfe;
    font-size: 12px;
    transition: .2s ease;
}

.form-group input,
.form-group select {
    height: 50px;
    padding: 0 14px;
}

.form-group textarea {
    min-height: 185px;
    padding: 14px;
    resize: vertical;
    line-height: 1.7;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(22, 119, 255, .09);
}

.character-count {
    position: absolute;
    right: 12px;
    bottom: 9px;
    padding: 3px 6px;
    border-radius: 6px;
    color: var(--light);
    background: rgba(255, 255, 255, .92);
    font-size: 9px;
}

.image-dropzone {
    min-height: 165px;
    padding: 25px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 2px dashed #cbd6e4;
    border-radius: 14px;
    background: #f8fafc;
    transition: .2s ease;
}

.image-dropzone:hover {
    border-color: var(--primary);
    background: #f0f6ff;
}

.upload-symbol {
    width: 48px;
    height: 48px;
    margin-bottom: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: var(--white);
    background: var(--primary);
    font-size: 27px;
    font-weight: 500;
}

.image-dropzone strong {
    font-size: 13px;
}

.image-dropzone span {
    color: var(--muted);
    font-size: 10px;
    margin-top: 6px;
}

.image-preview-grid {
    margin-top: 15px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.preview-image {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    position: relative;
    border-radius: 11px;
    background: #e9eef5;
}

.preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-image span {
    position: absolute;
    left: 7px;
    bottom: 7px;
    padding: 4px 6px;
    border-radius: 5px;
    color: var(--white);
    background: rgba(0, 0, 0, .64);
    font-size: 8px;
    font-weight: 700;
}

.form-actions {
    padding-top: 25px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.primary-button {
    min-height: 43px;
    padding: 0 18px;
    border: none;
    border-radius: 9px;
    color: var(--white);
    background: var(--primary);
    font-size: 11px;
    font-weight: 800;
}

.primary-button:hover,
.header-primary-button:hover,
.hero-sell-button:hover,
.detail-primary-button:hover {
    background: var(--primary-dark);
}

/* Marketplace */

.marketplace-hero {
    min-height: 235px;
    padding: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    overflow: hidden;
    border-radius: 21px;
    color: var(--white);
    background:
        radial-gradient(circle at 12% 0%, rgba(24, 169, 87, .58), transparent 32%),
        linear-gradient(135deg, #102f56, #1677ff);
    box-shadow: var(--shadow);
}

.marketplace-hero span {
    color: #a9d3ff;
}

.marketplace-hero h1 {
    max-width: 720px;
    font-size: 34px;
}

.marketplace-hero p {
    color: rgba(255, 255, 255, .76);
}

.hero-sell-button {
    min-width: 145px;
    min-height: 48px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    color: var(--white);
    background: rgba(255, 255, 255, .17);
    border: 1px solid rgba(255, 255, 255, .26);
    font-size: 12px;
    font-weight: 800;
}

.marketplace-toolbar {
    margin: 20px 0;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 18px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.marketplace-search {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 230px 100px;
    gap: 10px;
}

.marketplace-search input,
.marketplace-search select {
    height: 44px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 9px;
    outline: none;
    color: var(--text);
    background: #f8fafc;
    font-size: 11px;
}

.marketplace-search button {
    border: none;
    border-radius: 9px;
    color: var(--white);
    background: var(--primary);
    font-size: 11px;
    font-weight: 800;
}

.result-count {
    color: var(--muted);
    font-size: 10px;
    white-space: nowrap;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 17px;
}

.product-card {
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: transform .25s ease, box-shadow .25s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 17px 42px rgba(31, 56, 87, .13);
}

.product-card-image {
    height: 225px;
    display: block;
    overflow: hidden;
    position: relative;
    background: #e8edf4;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.product-card:hover .product-card-image img {
    transform: scale(1.045);
}

.product-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    background: linear-gradient(135deg, #12345c, #1677ff);
    font-size: 42px;
    font-weight: 800;
}

.sold-badge,
.detail-sold-badge {
    position: absolute;
    padding: 7px 10px;
    border-radius: 7px;
    color: var(--white);
    background: rgba(215, 70, 70, .94);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.sold-badge {
    top: 10px;
    right: 10px;
}

.product-card-body {
    padding: 15px;
}

.product-card-category,
.detail-category {
    color: var(--primary);
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-bottom: 7px;
}

.product-card h2 {
    min-height: 42px;
    font-size: 13px;
    line-height: 1.55;
}

.product-card h2 a:hover {
    color: var(--primary);
}

.product-price {
    color: var(--primary);
    font-size: 17px;
    font-weight: 800;
    margin-top: 9px;
}

.product-card-meta {
    margin-top: 11px;
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-top: 1px solid var(--border);
    color: var(--light);
    font-size: 8px;
}

.empty-marketplace {
    min-height: 380px;
    padding: 50px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 17px;
    box-shadow: var(--shadow);
}

.empty-icon {
    width: 72px;
    height: 72px;
    margin-bottom: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    color: var(--white);
    background: linear-gradient(135deg, #1677ff, #18a957);
    font-size: 29px;
    font-weight: 800;
}

.empty-marketplace h2 {
    font-size: 19px;
    margin-bottom: 7px;
}

.empty-marketplace p {
    color: var(--muted);
    font-size: 11px;
}

.empty-marketplace a {
    margin-top: 17px;
    padding: 10px 14px;
    border-radius: 9px;
    color: var(--white);
    background: var(--primary);
    font-size: 10px;
    font-weight: 800;
}

/* Product details */

.back-link {
    display: inline-flex;
    margin-bottom: 16px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
}

.product-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) 390px;
    gap: 20px;
    align-items: start;
}

.product-gallery-card,
.product-information-card {
    padding: 18px;
}

.main-product-image {
    height: 540px;
    overflow: hidden;
    position: relative;
    border-radius: 14px;
    background: #e8edf4;
}

.main-product-image > img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f4f6f9;
}

.detail-sold-badge {
    top: 14px;
    right: 14px;
}

.product-thumbnails {
    margin-top: 12px;
    display: flex;
    gap: 9px;
    overflow-x: auto;
}

.product-thumbnail {
    width: 74px;
    height: 74px;
    flex: 0 0 74px;
    overflow: hidden;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 9px;
    background: #e7ecf3;
}

.product-thumbnail.active {
    border-color: var(--primary);
}

.product-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-information-card {
    position: sticky;
    top: 90px;
}

.product-information-card h1 {
    font-size: 25px;
    line-height: 1.35;
    letter-spacing: -.7px;
}

.detail-price {
    color: var(--primary);
    font-size: 27px;
    font-weight: 800;
    margin-top: 15px;
}

.detail-facts {
    margin: 22px 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid var(--border);
    border-radius: 11px;
}

.detail-facts div {
    padding: 13px 8px;
    text-align: center;
    border-right: 1px solid var(--border);
}

.detail-facts div:last-child {
    border-right: none;
}

.detail-facts span {
    display: block;
    color: var(--light);
    font-size: 8px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.detail-facts strong {
    font-size: 11px;
}

.detail-location {
    padding: 12px 13px;
    border-radius: 9px;
    color: var(--muted);
    background: #f4f7fa;
    font-size: 10px;
}

.detail-location strong {
    color: var(--text);
}

.detail-primary-button {
    width: 100%;
    min-height: 48px;
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 10px;
    color: var(--white);
    background: var(--primary);
    font-size: 12px;
    font-weight: 800;
}

.sold-button {
    cursor: not-allowed;
    background: #9ba7b5;
}

.seller-mini-card {
    margin-top: 18px;
    padding-top: 17px;
    display: flex;
    align-items: center;
    gap: 11px;
    border-top: 1px solid var(--border);
}

.seller-avatar {
    width: 45px;
    height: 45px;
    flex: 0 0 45px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--white);
    background: linear-gradient(135deg, #1677ff, #18a957);
    font-weight: 800;
}

.seller-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.seller-mini-card span {
    display: block;
    color: var(--light);
    font-size: 8px;
    margin-bottom: 4px;
}

.seller-mini-card div > a {
    font-size: 11px;
    font-weight: 800;
}

.product-description-card {
    margin-top: 20px;
    padding: 27px;
}

.product-description-card h2 {
    font-size: 17px;
    margin-bottom: 15px;
}

.product-description {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.9;
}

/* Manage products */

.manage-heading {
    padding-bottom: 0;
    border-bottom: none;
}

.status-tabs {
    margin: 22px 0 16px;
    display: flex;
    gap: 8px;
}

.status-tabs a {
    padding: 9px 13px;
    border-radius: 20px;
    color: var(--muted);
    background: var(--white);
    border: 1px solid var(--border);
    font-size: 10px;
    font-weight: 700;
}

.status-tabs a.active {
    color: var(--white);
    background: var(--primary);
    border-color: var(--primary);
}

.manage-product-list {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.manage-product-card {
    padding: 13px;
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr) auto;
    gap: 17px;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.manage-product-image {
    height: 105px;
    overflow: hidden;
    border-radius: 10px;
    background: #e8edf4;
}

.manage-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.manage-product-info h2 {
    font-size: 14px;
    margin: 7px 0;
}

.manage-product-price {
    color: var(--primary);
    font-size: 16px;
    font-weight: 800;
}

.manage-product-info p {
    color: var(--light);
    font-size: 9px;
    margin-top: 7px;
}

.status-label {
    display: inline-flex;
    padding: 5px 7px;
    border-radius: 6px;
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
}

.status-active {
    color: #08783b;
    background: #e9f9f0;
}

.status-sold {
    color: #b32929;
    background: #fff0f0;
}

.status-hidden {
    color: #65758a;
    background: #edf1f5;
}

.manage-product-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}

.manage-product-actions form {
    display: inline-flex;
}

.small-outline-button,
.small-primary-button,
.small-warning-button,
.small-muted-button {
    min-height: 34px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 7px;
    font-size: 9px;
    font-weight: 800;
}

.small-outline-button {
    color: var(--primary);
    background: #edf5ff;
}

.small-primary-button {
    color: var(--white);
    background: var(--primary);
}

.small-warning-button {
    color: #9a5d00;
    background: #fff3dd;
}

.small-muted-button {
    color: var(--muted);
    background: #edf1f5;
}

@media (max-width: 1000px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .product-detail-layout {
        grid-template-columns: 1fr;
    }

    .product-information-card {
        position: static;
    }
}

@media (max-width: 780px) {
    .site-nav {
        display: none;
    }

    .site-header-inner {
        justify-content: space-between;
    }

    .form-grid,
    .form-grid-three {
        grid-template-columns: 1fr;
    }

    .marketplace-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .marketplace-search {
        grid-template-columns: 1fr;
    }

    .marketplace-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

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

    .image-preview-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .manage-product-card {
        grid-template-columns: 105px minmax(0, 1fr);
    }

    .manage-product-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

@media (max-width: 520px) {
    .site-header {
        height: 62px;
    }

    .site-header-inner {
        padding: 0 11px;
    }

    .site-logo img {
        width: 120px;
        height: 40px;
    }

    .header-primary-button,
    .logout-link {
        padding: 9px 10px;
        font-size: 9px;
    }

    .product-page,
    .marketplace-page,
    .product-detail-page,
    .manage-products-page {
        padding: 12px 8px 35px;
    }

    .product-form-card {
        padding: 20px 16px;
        border-radius: 14px;
    }

    .page-heading,
    .manage-heading {
        flex-direction: column;
    }

    .marketplace-hero {
        min-height: auto;
        padding: 28px 20px;
        border-radius: 15px;
    }

    .marketplace-hero h1 {
        font-size: 27px;
    }

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

    .product-card-image {
        height: 280px;
    }

    .main-product-image {
        height: 360px;
    }

    .detail-facts {
        grid-template-columns: 1fr;
    }

    .detail-facts div {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .detail-facts div:last-child {
        border-bottom: none;
    }

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

    .manage-product-card {
        grid-template-columns: 90px minmax(0, 1fr);
        gap: 12px;
    }

    .manage-product-image {
        height: 90px;
    }
}

/* 2026 social commerce update */
.header-secondary-button{padding:10px 14px;border-radius:9px;color:var(--primary);background:#edf5ff;font-size:10px;font-weight:800}
.form-group textarea.small-textarea{min-height:105px}.marketplace-disclaimer,.payment-disclaimer{padding:15px 16px;border-radius:11px;color:#795100;background:#fff7e8;border:1px solid #ffe1ad;font-size:10px;line-height:1.7}.marketplace-disclaimer strong,.payment-disclaimer strong{display:block;color:#9a5d00;margin-bottom:4px}
.condition-card-badge,.detail-condition-badge{position:absolute;top:10px;left:10px;padding:7px 9px;border-radius:7px;color:#fff;background:rgba(14,50,92,.88);font-size:8px;font-weight:800;text-transform:uppercase}.discounted-price,.regular-price,.contact-price{color:var(--primary)}.product-price del,.detail-price del,.manage-product-price del{margin-left:8px;color:var(--text-light);font-size:10px;font-weight:500}.negotiable-label{display:inline-flex;margin-top:7px;padding:5px 7px;border-radius:6px;color:#8a5900;background:#fff3dd;font-size:8px;font-weight:800}.negotiable-notice{margin-top:12px;padding:10px 11px;border-radius:8px;color:#8a5900;background:#fff3dd;font-size:10px;font-weight:700}
.social-action-bar{margin-top:16px;padding:9px;display:grid;grid-template-columns:repeat(5,1fr);gap:7px;background:#fff;border:1px solid var(--border);border-radius:13px;box-shadow:var(--shadow)}.social-action-bar form{display:contents}.social-action-bar button,.social-action-bar a{min-height:42px;padding:0 10px;display:flex;align-items:center;justify-content:center;gap:7px;border:none;border-radius:9px;color:var(--text-medium);background:transparent;font-size:10px;font-weight:800}.social-action-bar button:hover,.social-action-bar a:hover,.social-action-bar button.active{color:var(--primary);background:#edf5ff}.social-action-bar span{min-width:20px;padding:3px 5px;border-radius:10px;background:#e9eef4;font-size:8px}
.product-lower-layout{margin-top:20px;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:20px;align-items:start}.comments-card{padding:27px}.comments-heading{display:flex;justify-content:space-between;gap:15px;padding-bottom:14px;border-bottom:1px solid var(--border)}.comments-heading h2{font-size:17px}.comments-heading span{color:var(--text-light);font-size:9px}.empty-comments{padding:40px 0;color:var(--text-light);text-align:center;font-size:10px}.comment-list{max-height:500px;overflow-y:auto;padding:15px 0;display:flex;flex-direction:column;gap:13px}.comment-item{display:flex;align-items:flex-start;gap:10px}.comment-avatar{width:36px;height:36px;flex:0 0 36px;overflow:hidden;display:flex;align-items:center;justify-content:center;border-radius:50%;color:#fff;background:linear-gradient(135deg,#1677ff,#18a957);font-size:11px;font-weight:800}.comment-avatar img{width:100%;height:100%;object-fit:cover}.comment-content{flex:1;padding:11px 12px;border-radius:10px;background:#f3f6f9}.comment-header{display:flex;justify-content:space-between;gap:8px;margin-bottom:5px}.comment-header a{font-size:10px;font-weight:800}.comment-header span{color:var(--text-light);font-size:7px}.comment-content p{color:var(--text-medium);font-size:10px;line-height:1.6}.comment-form{padding-top:15px;border-top:1px solid var(--border)}.comment-form textarea,.message-form textarea{width:100%;min-height:90px;padding:12px;resize:vertical;border:1px solid var(--border);border-radius:10px;outline:none;color:var(--text-dark);background:#fbfcfe;font-size:10px;line-height:1.6}.comment-form button,.message-form button,.modal-submit-button{min-height:40px;margin-top:9px;padding:0 15px;border:none;border-radius:8px;color:#fff;background:var(--primary);font-size:10px;font-weight:800}.login-comment-link{margin-top:15px;min-height:42px;display:flex;align-items:center;justify-content:center;border-radius:9px;color:var(--primary);background:#edf5ff;font-size:10px;font-weight:800}.delivery-box{margin-top:22px;padding:16px;border-radius:11px;background:#f4f7fa}.delivery-box h3{font-size:12px;margin-bottom:7px}.delivery-box p{color:var(--text-medium);font-size:10px;line-height:1.7}.payment-disclaimer{margin-top:22px}
.action-modal{position:fixed;inset:0;z-index:1000;padding:20px;display:flex;align-items:center;justify-content:center;background:rgba(9,22,40,.68);backdrop-filter:blur(7px);opacity:0;visibility:hidden;transition:.25s}.action-modal.active{opacity:1;visibility:visible}.action-modal-card{width:100%;max-width:520px;position:relative;padding:28px;border-radius:17px;background:#fff;box-shadow:0 30px 80px rgba(0,0,0,.28)}.action-modal-card h2{font-size:20px;margin-bottom:7px}.action-modal-card>p{color:var(--text-medium);font-size:10px;line-height:1.7;margin-bottom:20px}.modal-close{width:36px;height:36px;position:absolute;top:14px;right:14px;border:none;border-radius:50%;background:#edf1f5;font-size:22px}.modal-form-group{margin-bottom:15px}.modal-form-group label{display:block;margin-bottom:7px;font-size:10px;font-weight:800}.modal-form-group input,.modal-form-group textarea{width:100%;border:1px solid var(--border);border-radius:10px;padding:12px;font-size:11px}.modal-form-group input{height:48px}.modal-form-group textarea{min-height:120px;resize:vertical}
.offer-columns{margin-top:22px;display:grid;grid-template-columns:1fr 1fr;gap:20px;align-items:start}.offer-section-card{padding:22px;background:#fff;border:1px solid var(--border);border-radius:17px;box-shadow:var(--shadow)}.offer-section-heading{padding-bottom:14px;display:flex;justify-content:space-between;border-bottom:1px solid var(--border)}.offer-section-heading h2{font-size:15px}.offer-section-heading span{color:var(--primary);font-size:10px;font-weight:800}.empty-offer{padding:40px 10px;color:var(--text-light);text-align:center;font-size:10px}.offer-list{padding-top:14px;display:flex;flex-direction:column;gap:12px}.offer-card{padding:15px;border:1px solid var(--border);border-radius:11px;background:#fbfcfe}.offer-card-top{display:flex;justify-content:space-between;gap:12px;margin-bottom:10px}.offer-card-top div>span{display:block;color:var(--text-light);font-size:7px;text-transform:uppercase;margin-bottom:4px}.offer-card-top strong{font-size:10px}.offer-card h3{font-size:12px;margin-bottom:9px}.offer-amount{color:var(--primary);font-size:17px;font-weight:800;margin-bottom:9px}.offer-card p{color:var(--text-medium);font-size:10px;line-height:1.6}.offer-actions{margin-top:13px;display:flex;gap:7px}.offer-actions form{display:flex;gap:7px}.offer-status{display:inline-flex;padding:5px 7px;border-radius:6px;font-size:8px;font-weight:800;text-transform:uppercase}.status-pending{color:#8a5900;background:#fff3dd}.status-accepted{color:#08783b;background:#e9f9f0}.status-rejected{color:#b32929;background:#fff0f0}.accept-button,.reject-button{min-height:34px;padding:0 10px;border:none;border-radius:7px;font-size:9px;font-weight:800}.accept-button{color:#fff;background:var(--primary)}.reject-button{color:#b32929;background:#fff0f0}
.messages-page{max-width:1240px}.messages-layout{height:calc(100vh - 130px);min-height:560px;display:grid;grid-template-columns:340px minmax(0,1fr);gap:16px}.conversation-list,.message-thread{overflow:hidden;background:#fff;border:1px solid var(--border);border-radius:17px;box-shadow:var(--shadow)}.conversation-list-heading{height:65px;padding:0 18px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--border)}.conversation-list-heading h1{font-size:18px}.conversation-list-heading span{color:var(--primary);font-size:10px;font-weight:800}.empty-conversations{padding:40px 20px;color:var(--text-light);text-align:center;font-size:10px}.conversation-item{padding:13px 15px;display:flex;gap:10px;border-bottom:1px solid var(--border)}.conversation-item:hover,.conversation-item.active{background:#edf5ff}.conversation-avatar{width:43px;height:43px;flex:0 0 43px;overflow:hidden;display:flex;align-items:center;justify-content:center;border-radius:50%;color:#fff;background:linear-gradient(135deg,#1677ff,#18a957);font-size:13px;font-weight:800}.conversation-avatar img{width:100%;height:100%;object-fit:cover}.conversation-preview{min-width:0;flex:1}.conversation-preview strong{display:block;font-size:10px;margin-bottom:3px}.conversation-preview span{display:block;overflow:hidden;color:var(--primary);white-space:nowrap;text-overflow:ellipsis;font-size:8px;margin-bottom:4px}.conversation-preview p{overflow:hidden;color:var(--text-light);white-space:nowrap;text-overflow:ellipsis;font-size:8px}.message-thread{display:flex;flex-direction:column}.thread-header{min-height:65px;padding:12px 18px;display:flex;align-items:center;justify-content:space-between;gap:15px;border-bottom:1px solid var(--border)}.thread-header h2{font-size:14px;margin-bottom:4px}.thread-header a{color:var(--primary);font-size:9px;font-weight:700}.thread-header>span{color:#8a5900;font-size:8px}.thread-messages{flex:1;overflow-y:auto;padding:20px;background:#f7f9fc}.message-bubble-row{margin-bottom:10px;display:flex}.message-bubble-row.mine{justify-content:flex-end}.message-bubble-row.theirs{justify-content:flex-start}.message-bubble{max-width:72%;padding:11px 13px;border-radius:13px}.mine .message-bubble{color:#fff;background:var(--primary);border-bottom-right-radius:4px}.theirs .message-bubble{background:#fff;border:1px solid var(--border);border-bottom-left-radius:4px}.message-bubble p{font-size:10px;line-height:1.6}.message-bubble span{display:block;margin-top:5px;opacity:.68;font-size:7px}.message-form{padding:13px;display:grid;grid-template-columns:1fr auto;gap:9px;border-top:1px solid var(--border)}.message-form textarea{min-height:48px;max-height:120px}.message-form button{min-width:70px;height:48px;margin-top:0}.empty-thread{height:100%;padding:40px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}
@media(max-width:1000px){.product-lower-layout{grid-template-columns:1fr}}
@media(max-width:800px){.offer-columns,.messages-layout{grid-template-columns:1fr}.messages-layout{height:auto}.conversation-list{max-height:350px;overflow-y:auto}.message-thread{min-height:600px}}
@media(max-width:540px){.social-action-bar{grid-template-columns:1fr 1fr}.action-modal{padding:10px;align-items:flex-start;overflow-y:auto}.action-modal-card{padding:24px 18px;margin-top:20px}.message-form{grid-template-columns:1fr}.message-form button{width:100%}}

:root{--text-dark:var(--text);--text-medium:var(--muted);--text-light:var(--light)}
.comments-card{background:#fff;border:1px solid var(--border);border-radius:19px;box-shadow:var(--shadow)}
.offers-page,.messages-page{width:100%;max-width:1180px;margin:0 auto;padding:30px 20px 60px}

/* Cart, delivery and direct order update */
.delivery-preview-box { margin-top: 15px; padding: 13px; border-radius: 10px; background: #f4f7fa; }
.delivery-preview-box h3 { font-size: 11px; margin-bottom: 7px; }
.delivery-preview-box p { color: var(--muted); font-size: 8px; line-height: 1.7; }
.delivery-preview-box small { display: block; color: var(--light); font-size: 7px; margin-top: 5px; }
.product-cart-box { margin-top: 18px; }
.product-cart-box > label { display: block; color: var(--muted); font-size: 8px; font-weight: 700; margin-bottom: 7px; }
.product-cart-box > div { display: grid; grid-template-columns: 90px minmax(0,1fr); gap: 8px; }
.product-cart-box input { height: 47px; padding: 0 11px; border: 1px solid var(--border); border-radius: 9px; outline: none; }
.product-cart-box button { border: none; border-radius: 9px; color: #fff; background: var(--primary); font-size: 11px; font-weight: 800; }
.detail-secondary-button { width: 100%; min-height: 43px; margin-top: 8px; border: none; border-radius: 9px; color: var(--primary); background: #edf5ff; font-size: 10px; font-weight: 800; }
@media (max-width: 520px) { .product-cart-box > div { grid-template-columns: 75px minmax(0,1fr); } }
.product-view-cart { width: 100%; min-height: 39px; margin-top: 8px; display: flex; align-items: center; justify-content: center; border-radius: 9px; color: var(--primary); border: 1px solid #cfe1fb; font-size: 9px; font-weight: 800; }


@media(max-width:720px){
    .social-action-bar{grid-template-columns:repeat(2,1fr)}
}


/* Safe premium depth for product image only — no layout changes */
.main-product-image {
    background: radial-gradient(circle at 50% 12%, #ffffff 0%, #f7f9fc 58%, #edf2f8 100%);
}

.main-product-image > img {
    filter: drop-shadow(0 20px 28px rgba(31, 45, 76, .20));
    transition: transform .3s ease, filter .3s ease;
}

.main-product-image:hover > img {
    transform: translateY(-2px) scale(1.01);
    filter: drop-shadow(0 23px 32px rgba(31, 45, 76, .24));
}

/* Marketplace functional filter panel — isolated styles */
.marketplace-filter-panel {
    align-items: stretch;
    gap: 16px;
    padding: 16px;
}

.marketplace-filter-form {
    display: block;
    min-width: 0;
}

.marketplace-filter-main-row,
.marketplace-filter-advanced-row {
    display: grid;
    gap: 12px;
}

.marketplace-filter-main-row {
    grid-template-columns: minmax(260px, 1.8fr) minmax(180px, .75fr) minmax(165px, .65fr);
}

.marketplace-filter-advanced-row {
    margin-top: 12px;
    grid-template-columns: repeat(6, minmax(125px, 1fr));
}

.marketplace-filter-field {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.marketplace-filter-field > span {
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .45px;
}

.marketplace-filter-form input,
.marketplace-filter-form select {
    width: 100%;
    height: 46px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
    color: var(--text);
    background: #f8fafc;
    font-size: 11px;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.marketplace-filter-form input:focus,
.marketplace-filter-form select:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(22, 119, 255, .09);
}

.marketplace-filter-footer {
    margin-top: 14px;
    padding-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid var(--border);
}

.marketplace-filter-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
}

.marketplace-filter-checkbox input {
    width: 17px;
    height: 17px;
    padding: 0;
    accent-color: var(--primary);
}

.marketplace-filter-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.marketplace-search-button,
.marketplace-clear-button {
    min-height: 43px;
    padding: 0 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 800;
}

.marketplace-search-button {
    min-width: 145px;
    border: none;
    color: var(--white);
    background: var(--primary);
}

.marketplace-search-button:hover {
    background: var(--primary-dark);
}

.marketplace-search-button.is-loading {
    opacity: .72;
    pointer-events: none;
}

.marketplace-clear-button {
    color: var(--muted);
    background: #edf1f5;
}

.marketplace-clear-button:hover {
    color: var(--primary);
    background: #edf5ff;
}

.marketplace-result-summary {
    min-width: 110px;
    padding: 13px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    color: var(--muted);
    background: #f5f8fc;
    text-align: center;
}

.marketplace-result-summary strong {
    color: var(--primary);
    font-size: 21px;
    line-height: 1;
}

.marketplace-result-summary span {
    margin-top: 5px;
    font-size: 9px;
    font-weight: 800;
}

.marketplace-result-summary small {
    margin-top: 5px;
    color: var(--light);
    font-size: 7px;
}

.marketplace-empty-clear {
    min-height: 40px;
    margin-top: 15px;
    padding: 0 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    color: var(--primary);
    background: #edf5ff;
    font-size: 10px;
    font-weight: 800;
}

.marketplace-limit-note {
    margin-top: 18px;
    color: var(--muted);
    text-align: center;
    font-size: 10px;
}

@media (max-width: 1180px) {
    .marketplace-filter-advanced-row {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }
}

@media (max-width: 820px) {
    .marketplace-filter-main-row,
    .marketplace-filter-advanced-row {
        grid-template-columns: 1fr 1fr;
    }

    .marketplace-search-field {
        grid-column: 1 / -1;
    }

    .marketplace-filter-panel {
        flex-direction: column;
    }

    .marketplace-result-summary {
        flex-direction: row;
        gap: 7px;
    }

    .marketplace-result-summary span,
    .marketplace-result-summary small {
        margin-top: 0;
    }
}

@media (max-width: 540px) {
    .marketplace-filter-main-row,
    .marketplace-filter-advanced-row {
        grid-template-columns: 1fr;
    }

    .marketplace-search-field {
        grid-column: auto;
    }

    .marketplace-filter-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .marketplace-filter-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .marketplace-filter-actions:has(.marketplace-search-button:only-child) {
        grid-template-columns: 1fr;
    }

    .marketplace-search-button,
    .marketplace-clear-button {
        width: 100%;
    }
}


/* Product owner edit/delete controls — isolated styles */
.manage-product-actions-expanded {
    max-width: 330px;
}

.small-edit-button,
.small-delete-button {
    min-height: 34px;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 800;
}

.small-edit-button {
    color: #ffffff;
    background: linear-gradient(135deg, #1677ff, #5b5cff);
    box-shadow: 0 7px 16px rgba(22,119,255,.16);
}

.small-delete-button {
    color: #b52f3e;
    background: #fff0f2;
    border: 1px solid #ffd3d9;
}

.small-delete-button:hover {
    color: #ffffff;
    background: #d74646;
    border-color: #d74646;
}

.existing-product-images {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 12px;
}

.existing-product-image {
    min-width: 0;
    overflow: hidden;
    position: relative;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #f8fafc;
}

.existing-product-image img {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: block;
    object-fit: cover;
    border-radius: 9px;
}

.existing-product-image span {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
}

.existing-product-image input {
    accent-color: #d74646;
}

.existing-product-image b {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 7px;
    border-radius: 7px;
    color: #ffffff;
    background: rgba(17,43,75,.88);
    font-size: 7px;
    text-transform: uppercase;
}

@media (max-width: 900px) {
    .existing-product-images {
        grid-template-columns: repeat(3, minmax(110px, 1fr));
    }
}

@media (max-width: 540px) {
    .existing-product-images {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .manage-product-actions-expanded {
        max-width: none;
    }
}


/* Product report, privacy and moderation UI */
.social-action-bar .report-product-link{color:#c63838;background:#fff3f3;border-color:#ffd3d3;}
.report-product-page{width:min(680px,calc(100% - 28px));margin:40px auto 90px;}
.report-product-card{padding:28px;border:1px solid #dfe7f0;border-radius:20px;background:#fff;box-shadow:0 18px 45px rgba(25,58,105,.1);}
.report-kicker{display:block;color:#d43d3d;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.8px;margin-bottom:7px;}
.report-product-card h1{font-size:27px;margin:0 0 8px}.report-product-card>p{color:#67778b;font-size:13px;line-height:1.7;margin-bottom:22px}.report-product-card label{display:flex;flex-direction:column;gap:8px;margin-bottom:16px;color:#34455a;font-size:12px;font-weight:800}.report-product-card select,.report-product-card textarea{width:100%;border:1px solid #dbe3ed;border-radius:11px;background:#f8fafc;color:#192a40;font:inherit;outline:none}.report-product-card select{height:46px;padding:0 12px}.report-product-card textarea{height:150px;padding:12px;resize:vertical}.report-form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}.report-form-actions a,.report-form-actions button{min-height:44px;padding:0 16px;display:inline-flex;align-items:center;border-radius:10px;border:0;text-decoration:none;font-size:11px;font-weight:800}.report-form-actions a{color:#53657c;background:#eef2f7}.report-form-actions button{color:#fff;background:#d43d3d}.report-product-card>small{display:block;margin-top:16px;color:#7a899b;font-size:10px;}

/* Marketplace image hero and quick card actions */
.marketplace-hero{position:relative;overflow:hidden;background-image:linear-gradient(90deg,rgba(4,35,66,.88),rgba(18,103,232,.68)),url('/img/marketplace.png')!important;background-size:cover!important;background-position:center!important}.marketplace-hero>*{position:relative;z-index:1}.marketplace-result-count{display:none!important}.product-card{position:relative}.market-card-quick-actions{position:absolute;top:12px;right:12px;z-index:8;display:flex;gap:8px}.market-card-quick-actions form{margin:0}.market-card-quick-actions button{width:38px;height:38px;position:relative;display:flex;align-items:center;justify-content:center;border:1px solid rgba(255,255,255,.9);border-radius:50%;background:#fff;color:#1677ff;box-shadow:0 8px 22px rgba(24,49,82,.22);font-size:17px;transition:.2s ease}.market-card-quick-actions button:hover{transform:translateY(-2px)}.market-wishlist-button.active,.market-cart-button.active{color:#fff;background:#f04464}.market-cart-button b{min-width:18px;height:18px;padding:0 4px;position:absolute;top:-6px;right:-6px;display:flex;align-items:center;justify-content:center;border:2px solid #fff;border-radius:20px;color:#fff;background:#f04464;font-size:8px}.market-cart-button.active b{background:#1677ff}


/* Marketplace result count removed + clearer 3D quick actions */
.marketplace-result-summary {
    display: none !important;
}

.marketplace-filter-card {
    grid-template-columns: minmax(0, 1fr) !important;
}

.market-card-quick-actions {
    top: 12px !important;
    right: 12px !important;
    gap: 10px !important;
}

.market-card-quick-actions button {
    width: 44px !important;
    height: 44px !important;
    border: 2px solid rgba(255,255,255,.96) !important;
    background: linear-gradient(145deg,#ffffff,#eef4ff) !important;
    box-shadow:
        0 9px 0 rgba(17,71,151,.18),
        0 15px 25px rgba(20,53,98,.28),
        inset 0 2px 3px rgba(255,255,255,.95) !important;
    color: #1267e8 !important;
    transform: translateY(0);
}

.market-card-quick-actions button svg {
    width: 21px;
    height: 21px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.market-wishlist-button svg {
    fill: rgba(18,103,232,.08);
}

.market-card-quick-actions button:hover {
    transform: translateY(-3px) !important;
    box-shadow:
        0 11px 0 rgba(17,71,151,.16),
        0 18px 30px rgba(20,53,98,.32),
        inset 0 2px 3px rgba(255,255,255,.95) !important;
}

.market-card-quick-actions button:active {
    transform: translateY(4px) !important;
    box-shadow:
        0 3px 0 rgba(17,71,151,.18),
        0 7px 14px rgba(20,53,98,.22) !important;
}

.market-wishlist-button.active {
    color: #ffffff !important;
    background: linear-gradient(145deg,#ff5d79,#d92f52) !important;
    border-color: #ffd8e0 !important;
}

.market-wishlist-button.active svg {
    fill: currentColor;
}

.market-cart-button.active {
    color: #ffffff !important;
    background: linear-gradient(145deg,#ff5a5a,#d92f3f) !important;
    border-color: #ffd4d7 !important;
}

.market-cart-button b {
    min-width: 20px !important;
    height: 20px !important;
    top: -7px !important;
    right: -7px !important;
    font-size: 9px !important;
    font-weight: 900 !important;
    background: #ff365d !important;
    box-shadow: 0 4px 10px rgba(180,28,64,.35);
}

.market-cart-button.active b {
    background: #143f9d !important;
}

@media (max-width: 640px) {
    .market-card-quick-actions button {
        width: 40px !important;
        height: 40px !important;
    }

    .market-card-quick-actions button svg {
        width: 19px;
        height: 19px;
    }
}
