/* OpenClassify Native 2.1 frontend — consistent marketplace layout. */
:root {
    --page-bg: #f5f7f8;
    --card-bg: #fff;
    --ink-soft: #3e4a58;
    --line-strong: #cbd3db;
    --focus: color-mix(in srgb, var(--primary) 24%, transparent);
    --radius: 5px;
    --radius-lg: 7px;
    --card-shadow: 0 7px 24px rgba(18, 35, 52, .07);
}

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

main {
    min-height: 48vh;
}

.page-shell {
    width: min(1280px, calc(100% - 40px));
}

.narrow {
    width: min(820px, calc(100% - 40px));
}

.button,
.post-button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: var(--radius);
    line-height: 1.2;
    text-decoration: none;
}

input,
select,
textarea {
    border-radius: var(--radius);
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible,
summary:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 1px;
}

.eyebrow {
    letter-spacing: .08em;
}

.section-block {
    padding-block: 42px;
}

.section-heading {
    margin-bottom: 20px;
}

.section-heading h2 {
    margin: 3px 0 0;
    font-size: clamp(22px, 2.2vw, 31px);
}

/* Header and search */
.top-strip {
    border-bottom: 1px solid #e6eaee;
    background: #f9fafb;
}

.site-header {
    position: relative;
    z-index: 40;
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.header-main {
    min-height: 78px;
    grid-template-columns: minmax(150px, auto) minmax(500px, 1fr) auto;
    gap: 22px;
}

.wordmark {
    min-width: 0;
    font-size: 21px;
    font-weight: 900;
    letter-spacing: -.03em;
    text-decoration: none;
}

.header-search {
    height: 50px;
    grid-template-columns: minmax(145px, .85fr) minmax(210px, 1.65fr) minmax(135px, .75fr) 108px;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    box-shadow: none;
}

.header-search label {
    min-height: 48px;
    padding: 0 11px;
}

.header-search label + label {
    border-left-color: #e1e5e9;
}

.header-search input,
.header-search select {
    height: 48px;
    padding: 0;
    color: var(--ink);
    font-size: 13px;
}

.header-search button {
    min-width: 0;
    padding: 0 14px;
    border: 0;
    border-radius: 0;
    background: var(--primary);
    color: #fff;
    font-weight: 850;
}

.account-nav {
    justify-content: flex-end;
    gap: 10px;
}

.category-bar {
    border-top: 1px solid #edf0f2;
}

.category-links {
    min-height: 43px;
}

/* Home */
.hero-section {
    padding: 64px 0 58px;
    background:
        radial-gradient(circle at 80% 20%, rgba(255,255,255,.15), transparent 30%),
        linear-gradient(118deg, color-mix(in srgb, var(--primary) 92%, #000), var(--primary));
}

.hero-content h1 {
    max-width: 760px;
    margin: 9px 0 12px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.04;
    letter-spacing: -.045em;
}

.hero-content > p {
    max-width: 720px;
    margin-bottom: 25px;
    font-size: 17px;
}

.hero-search {
    border: 1px solid rgba(255,255,255,.5);
    border-radius: var(--radius);
    box-shadow: 0 14px 35px rgba(5, 20, 35, .23);
}

.hero-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.category-grid {
    gap: 10px;
}

.category-tile {
    min-height: 78px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: none;
}

.category-tile:hover {
    border-color: var(--primary);
    box-shadow: var(--card-shadow);
    transform: translateY(-1px);
}

.category-code {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--primary) 8%, #fff);
}

.banner-row {
    gap: 16px;
}

.market-banner {
    min-height: 190px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}

.how-section {
    border-block: 1px solid var(--line);
    background: #fff;
}

.how-grid article,
.sell-callout {
    border-radius: var(--radius-lg);
}

/* Listing cards and result pages */
.listing-layout {
    gap: 14px;
}

.listing-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--card-bg);
    box-shadow: 0 2px 10px rgba(18, 35, 52, .035);
    transition: border-color .18s, box-shadow .18s, transform .18s;
}

.listing-card:hover {
    border-color: #b9c5cf;
    box-shadow: var(--card-shadow);
    transform: translateY(-1px);
}

.listing-card .listing-image {
    overflow: hidden;
    background: #edf1f3;
}

.listing-card .listing-image > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.listing-card-body {
    display: flex;
    flex-direction: column;
    padding: 15px 16px 14px;
}

.listing-card-meta {
    gap: 9px;
    color: var(--muted);
    font-size: 11px;
}

.listing-card h3 {
    margin: 7px 0 6px;
    font-size: 16px;
    line-height: 1.32;
}

.listing-card h3 a {
    text-decoration: none;
}

.listing-card-excerpt {
    margin: 0 0 9px;
    color: var(--ink-soft);
    font-size: 12px;
    line-height: 1.55;
}

.listing-card-bottom {
    margin-top: auto;
    padding-top: 8px;
}

.listing-card-bottom strong {
    font-size: 18px;
}

.seller-line {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #edf0f2;
}

.listing-card-actions {
    top: 9px;
    right: 9px;
    gap: 6px;
}

.listing-card-actions button,
.listing-card-actions a {
    width: 34px;
    height: 34px;
    border-color: #d7dde2;
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(17, 29, 43, .1);
}

.listing-card-actions button:hover,
.listing-card-actions a:hover,
.listing-card-actions button.active {
    border-color: var(--accent);
    color: var(--accent);
}

.listing-layout.list-view .listing-card {
    grid-template-columns: minmax(210px, 27%) minmax(0, 1fr);
    min-height: 200px;
}

.listing-layout.list-view .listing-image {
    min-height: 200px;
    border-right: 1px solid var(--line);
}

.listing-layout.grid-view .listing-card {
    display: flex;
    flex-direction: column;
}

.listing-layout.grid-view .listing-image {
    height: auto;
    aspect-ratio: 4 / 3;
}

.search-layout {
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 25px;
    padding-block: 34px 58px;
}

.filter-panel {
    position: sticky;
    top: 18px;
    padding: 19px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: none;
}

.filter-panel form {
    gap: 14px;
}

.filter-panel label {
    gap: 6px;
}

.filter-panel input,
.filter-panel select,
.result-controls select {
    min-height: 43px;
    border-color: var(--line-strong);
}

.filter-title {
    margin-bottom: 17px;
    padding-bottom: 13px;
    border-bottom: 1px solid var(--line);
}

.results-panel {
    min-width: 0;
}

.results-heading {
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 19px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
}

.results-heading h1 {
    margin: 3px 0 0;
    font-size: clamp(24px, 3vw, 34px);
}

.result-controls {
    gap: 8px;
}

.active-filter-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid color-mix(in srgb, var(--primary) 24%, #fff);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--primary) 7%, #fff);
    color: var(--primary);
    font-weight: 750;
}

.active-filter-chip a {
    font-size: 18px;
    line-height: 1;
    text-decoration: none;
}

/* Listing detail */
.listing-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    padding-block: 18px 14px;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.listing-breadcrumbs a {
    text-decoration: none;
}

.listing-breadcrumbs > :last-child {
    overflow: hidden;
    color: var(--ink);
    text-overflow: ellipsis;
}

.listing-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    padding-bottom: 48px;
}

.listing-main {
    min-width: 0;
    display: grid;
    gap: 20px;
}

.listing-gallery,
.listing-copy,
.listing-comments,
.contact-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: none;
}

.listing-gallery {
    padding: 12px;
}

.gallery-primary {
    min-height: 440px;
    height: min(62vw, 590px);
    display: grid;
    place-items: center;
    border-radius: var(--radius);
}

.gallery-primary img {
    max-height: 100%;
}

.gallery-thumbs {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 7px;
    margin-top: 9px;
}

.gallery-thumbs button {
    overflow: hidden;
    padding: 2px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.gallery-thumbs button:hover,
.gallery-thumbs button:focus {
    border-color: var(--primary);
}

.gallery-thumbs img {
    border-radius: 3px;
}

.listing-copy {
    padding: clamp(20px, 3vw, 32px);
}

.listing-title-row {
    align-items: flex-start;
    gap: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.listing-title-row h1 {
    max-width: 760px;
    margin: 5px 0 10px;
    font-size: clamp(26px, 3.5vw, 40px);
    line-height: 1.14;
    letter-spacing: -.035em;
}

.listing-submeta {
    gap: 8px 15px;
    color: var(--muted);
    font-size: 12px;
}

.detail-actions {
    flex: 0 0 auto;
    justify-content: flex-end;
}

.detail-actions form {
    margin: 0;
}

.detail-actions .button {
    min-height: 40px;
    padding: 8px 12px;
}

.tag-list,
.card-tags {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.tag-list {
    margin: 16px 0 0;
}

.tag-list a,
.card-tags span {
    padding: 5px 9px;
    border: 1px solid #dbe2e8;
    border-radius: 999px;
    background: #f5f8fa;
    color: #4c6073;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}

.tag-list a:hover,
.tag-list a.active {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.card-tags {
    margin: 1px 0 8px;
}

.card-tags span {
    padding: 3px 7px;
    font-size: 10px;
}

.verified-listing-note {
    margin: 20px 0;
}

.spec-grid {
    margin: 22px 0;
    border-radius: var(--radius);
}

.spec-grid > div {
    min-height: 69px;
    display: grid;
    align-content: center;
    gap: 3px;
    padding: 13px 16px;
}

.spec-grid > div:nth-last-child(-n+2) {
    border-bottom: 0;
}

.listing-description {
    padding-top: 3px;
}

.listing-description h2,
.listing-comments h2 {
    margin: 0 0 17px;
    font-size: 23px;
}

.listing-description p {
    margin-block: 0 1em;
}

.report-box {
    margin-top: 26px;
    padding: 13px 15px;
    border: 1px solid var(--line);
    background: #fafbfc;
}

.report-box summary,
.inquiry-box summary {
    cursor: pointer;
    font-weight: 800;
}

.report-box form,
.inquiry-box form {
    display: grid;
    gap: 13px;
    margin-top: 14px;
}

.listing-comments {
    padding: 25px;
}

.comment-form {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.comment-form textarea {
    min-height: 100px;
}

.comment-item {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
}

.comment-item .seller-avatar {
    width: 38px;
    height: 38px;
}

.comment-item header {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.comment-item header time {
    margin-left: auto;
    color: var(--muted);
    font-size: 11px;
}

.contact-card {
    position: sticky;
    top: 18px;
    overflow: hidden;
    padding: 0;
}

.detail-price {
    padding: 23px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--primary) 6%, #fff);
}

.detail-price strong {
    display: block;
    font-size: 29px;
    line-height: 1.15;
}

.detail-price span {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.detail-condition,
.seller-card,
.seller-actions,
.contact-card > .full-button,
.contact-card > .contact-email,
.contact-card > .inquiry-box,
.contact-card > .contact-gate,
.contact-card > .safety-note {
    margin-inline: 20px;
}

.detail-condition {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 17px 0;
    border-bottom: 1px solid var(--line);
}

.seller-card {
    padding: 19px 0 13px;
}

.seller-actions {
    padding-bottom: 16px;
}

.seller-actions .button {
    flex: 1 1 120px;
    padding-inline: 10px;
}

.contact-card > .full-button {
    width: calc(100% - 40px);
}

.contact-email {
    display: block;
    padding: 11px 0;
    overflow-wrap: anywhere;
    text-align: center;
}

.inquiry-box,
.contact-gate {
    margin-top: 13px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.safety-note {
    margin-top: 18px !important;
    margin-bottom: 20px !important;
    border-left-width: 3px;
    font-size: 11px;
}

/* Publish */
.publish-header {
    padding: 42px 0 34px;
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.publish-header h1 {
    margin: 5px 0 7px;
    font-size: clamp(29px, 4vw, 44px);
}

.publish-header p {
    max-width: 740px;
    margin: 0;
    color: var(--muted);
}

.publish-layout {
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 24px;
    padding-block: 30px 58px;
}

.publish-form {
    display: grid;
    gap: 18px;
}

.form-card {
    position: relative;
    padding: 25px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: none;
}

.form-card h2 {
    margin: 0 0 21px 42px;
    font-size: 21px;
}

.form-section-number {
    top: 22px;
    left: 22px;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
}

.form-grid {
    gap: 17px;
}

.form-grid label,
.dynamic-fields label {
    gap: 7px;
    color: #344252;
    font-size: 12px;
    font-weight: 800;
}

.form-grid input,
.form-grid select,
.form-grid textarea,
.dynamic-fields input,
.dynamic-fields select,
.dynamic-fields textarea {
    min-height: 45px;
    border-color: var(--line-strong);
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
}

.form-grid textarea {
    min-height: 155px;
}

.form-grid small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 500;
}

.modern-uploader {
    padding: 13px;
    border-radius: var(--radius);
    background: #f8fafb;
}

.upload-zone {
    min-height: 136px;
    border-radius: var(--radius);
}

.modern-uploader.has-files .upload-zone {
    min-height: 62px;
    grid-template-columns: auto auto 1fr;
    justify-items: start;
    padding: 10px 14px;
    text-align: left;
}

.modern-uploader.has-files .upload-zone .ui-icon {
    width: 25px;
    height: 25px;
}

.sortable-preview,
.image-preview {
    grid-template-columns: repeat(5, minmax(80px, 1fr));
}

.location-picker {
    grid-column: 1 / -1;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fafb;
}

.location-picker label {
    display: grid;
    gap: 6px;
}

.location-picker select:disabled {
    background: #eef1f3;
    color: #8b96a1;
}

.dynamic-fields {
    margin-top: 17px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.existing-images {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.existing-images > div {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    overflow-x: auto;
}

.existing-images img {
    width: 96px;
    height: 74px;
    border-radius: var(--radius);
    object-fit: cover;
}

.publish-guide {
    top: 18px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: none;
}

.publish-submit {
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
}

/* Blog and content pages */
.content-hero,
.page-content-hero {
    padding: 48px 0 40px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(120deg, #eef4f7, #fff);
}

.content-hero h1,
.page-content-hero h1 {
    max-width: 820px;
    margin: 5px 0 9px;
    font-size: clamp(31px, 5vw, 50px);
    line-height: 1.08;
    letter-spacing: -.04em;
}

.content-hero p {
    max-width: 730px;
    color: var(--ink-soft);
    font-size: 16px;
}

.blog-tag-filter {
    max-width: 920px;
    margin-top: 20px;
}

.blog-index-section {
    padding-block: 34px 64px;
}

.blog-index-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.blog-card {
    height: 100%;
    border-radius: var(--radius-lg);
    box-shadow: none;
    transition: transform .18s, box-shadow .18s;
}

.blog-card:hover {
    box-shadow: var(--card-shadow);
    transform: translateY(-2px);
}

.blog-card-link {
    height: 100%;
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.blog-card-media {
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-bottom: 1px solid var(--line);
    background: #edf1f3;
}

.blog-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 18px;
}

.blog-card-meta {
    color: var(--muted);
    font-size: 11px;
}

.blog-card-content h2 {
    margin: 8px 0;
    font-size: 20px;
    line-height: 1.28;
}

.blog-card-content p {
    margin: 0 0 13px;
    color: var(--ink-soft);
    font-size: 13px;
}

.blog-card-content > strong {
    margin-top: auto;
    padding-top: 9px;
    color: var(--primary);
}

.article-header {
    padding: 44px 0 0;
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.article-back {
    display: inline-block;
    margin-bottom: 28px;
    color: var(--primary);
    font-weight: 800;
    text-decoration: none;
}

.article-header h1 {
    margin: 7px 0 13px;
    font-size: clamp(32px, 5vw, 55px);
    line-height: 1.06;
    letter-spacing: -.045em;
}

.article-header .narrow > p {
    color: var(--ink-soft);
    font-size: 18px;
    line-height: 1.65;
}

.article-cover {
    overflow: hidden;
    max-height: none;
    margin-top: 30px;
    margin-bottom: -42px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #eef1f3;
}

.article-cover img {
    width: 100%;
    max-height: 580px;
    aspect-ratio: 16 / 8;
    object-fit: cover;
}

.article-body {
    margin-top: 42px;
    padding-block: 64px;
    font-size: 16px;
    line-height: 1.8;
}

.article-body h2,
.content-article h2 {
    margin-top: 1.8em;
    font-size: 26px;
}

.article-body img {
    margin-block: 22px;
}

.related-articles {
    padding-top: 0;
}

.blog-grid article {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
}

.blog-grid article a {
    display: block;
    text-decoration: none;
}

.blog-grid article img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.blog-grid article h3,
.blog-grid article span {
    display: block;
    padding: 16px;
}

.blog-grid article img + h3 {
    margin: 0;
}

.content-layout {
    grid-template-columns: 235px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    padding-block: 32px 64px;
}

.content-sidebar {
    position: sticky;
    top: 18px;
    overflow: hidden;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
}

.content-sidebar .eyebrow {
    padding: 9px 10px;
}

.content-sidebar a {
    display: block;
    padding: 10px;
    border-radius: var(--radius);
    text-decoration: none;
}

.content-sidebar a:hover {
    background: #f0f4f6;
    color: var(--primary);
}

.content-article {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
}

.page-cover {
    overflow: hidden;
    margin: 0;
    border-bottom: 1px solid var(--line);
    background: #edf1f3;
}

.page-cover img {
    width: 100%;
    max-height: 430px;
    aspect-ratio: 16 / 6;
    object-fit: cover;
}

.content-article > .prose {
    max-width: 850px;
    padding: clamp(24px, 5vw, 54px);
}

/* Account, seller and utility states */
.account-layout,
.seller-content,
.reviews-layout {
    padding-block: 32px 58px;
}

.account-sidebar,
.account-panel,
.verification-card,
.kyc-card,
.review-form-card,
.followed-sellers article {
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: none;
}

.account-sidebar,
.account-panel,
.review-form-card {
    border-radius: var(--radius-lg);
}

.seller-hero-inner {
    padding-block: 38px;
}

.empty-state {
    padding: 54px 24px;
    border: 1px dashed #c8d1d9;
    border-radius: var(--radius-lg);
    background: #fff;
    text-align: center;
}

.pagination {
    margin-top: 24px;
}

.site-footer {
    margin-top: 0;
}

[dir="rtl"] .header-search label + label {
    border-right: 1px solid #e1e5e9;
    border-left: 0;
}

[dir="rtl"] .listing-layout.list-view .listing-image {
    border-right: 0;
    border-left: 1px solid var(--line);
}

[dir="rtl"] .comment-item header time {
    margin-right: auto;
    margin-left: 0;
}

@media (max-width: 1120px) {
    .header-main {
        grid-template-columns: auto minmax(380px, 1fr) auto;
        gap: 13px;
    }

    .header-search {
        grid-template-columns: 135px minmax(170px, 1fr) 96px;
    }

    .header-search .search-category {
        display: none;
    }

    .listing-detail-grid {
        grid-template-columns: minmax(0, 1fr) 330px;
    }

    .listing-layout.grid-view {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .page-shell {
        width: min(100% - 28px, 1280px);
    }

    .header-main {
        grid-template-columns: auto 1fr auto;
    }

    .header-search {
        grid-column: 1 / -1;
        margin-bottom: 13px;
    }

    .listing-detail-grid,
    .publish-layout {
        grid-template-columns: 1fr;
    }

    .contact-card,
    .publish-guide {
        position: static;
    }

    .listing-detail-grid .contact-card {
        grid-row: 2;
    }

    .search-layout {
        grid-template-columns: 230px minmax(0, 1fr);
    }

    .blog-index-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gallery-primary {
        height: min(72vw, 580px);
        min-height: 340px;
    }
}

@media (max-width: 720px) {
    .hero-section {
        padding-block: 42px;
    }

    .hero-search {
        grid-template-columns: 1fr 54px;
    }

    .hero-search label:first-child {
        grid-column: 1 / -1;
        min-height: 44px;
        border-bottom: 1px solid var(--line);
    }

    .hero-search label:nth-child(2) {
        border-left: 0;
    }

    .hero-search label:nth-child(3) {
        display: none;
    }

    .hero-search button {
        min-width: 54px;
    }

    .hero-search button span {
        display: none;
    }

    .search-layout {
        display: block;
        padding-block: 20px 45px;
    }

    .filter-panel {
        position: fixed;
        z-index: 120;
        inset: 0 auto 0 0;
        width: min(90vw, 340px);
        overflow-y: auto;
        border-radius: 0;
        transform: translateX(-105%);
        transition: transform .2s;
    }

    .filter-panel.is-open {
        transform: translateX(0);
    }

    [dir="rtl"] .filter-panel {
        right: 0;
        left: auto;
        transform: translateX(105%);
    }

    [dir="rtl"] .filter-panel.is-open {
        transform: translateX(0);
    }

    .filter-mobile-button {
        display: inline-flex;
    }

    .results-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .result-controls {
        width: 100%;
        justify-content: space-between;
    }

    .listing-layout.list-view .listing-card {
        grid-template-columns: 150px minmax(0, 1fr);
        min-height: 168px;
    }

    .listing-layout.list-view .listing-image {
        min-height: 168px;
    }

    .listing-card-excerpt {
        display: none;
    }

    .listing-title-row {
        display: block;
    }

    .detail-actions {
        justify-content: flex-start;
        margin-top: 16px;
    }

    .listing-copy,
    .listing-comments,
    .form-card {
        padding: 19px;
    }

    .form-card h2 {
        margin-left: 38px;
    }

    .form-section-number {
        top: 18px;
        left: 18px;
    }

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

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

    .content-sidebar {
        position: static;
        display: flex;
        gap: 3px;
        overflow-x: auto;
    }

    .content-sidebar .eyebrow {
        display: none;
    }

    .content-sidebar a {
        flex: 0 0 auto;
    }

    .article-cover {
        margin-bottom: -25px;
    }

    .article-body {
        margin-top: 25px;
        padding-block: 45px;
    }
}

.blog-article {
    display: block;
}

.blog-hero,
.blog-preview {
    background: #fff;
}

.category-section {
    padding-top: 46px;
}

.seller-name {
    color: var(--primary);
    font-weight: 850;
    text-decoration: none;
}

.seller-history {
    margin-bottom: 38px;
}

.seller-history details,
.seller-reviews {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.seller-reviews {
    margin-bottom: 54px;
}

.phone-code-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin-top: 10px;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.table-actions form {
    margin: 0;
}

@media (max-width: 520px) {
    .page-shell,
    .narrow {
        width: min(100% - 20px, 1280px);
    }

    .top-strip {
        display: none;
    }

    .header-search {
        grid-template-columns: 104px minmax(0, 1fr) 48px;
    }

    .header-search button {
        width: 48px;
        padding: 0;
    }

    .header-search button span {
        display: none;
    }

    .hero-content h1 {
        font-size: 34px;
    }

    .listing-layout.grid-view {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .listing-layout.grid-view .listing-card-body {
        padding: 10px;
    }

    .listing-layout.grid-view .listing-card-meta,
    .listing-layout.grid-view .seller-line,
    .listing-layout.grid-view .listing-card-excerpt,
    .listing-layout.grid-view .card-tags {
        display: none;
    }

    .listing-layout.grid-view .listing-card h3 {
        font-size: 13px;
    }

    .listing-layout.list-view .listing-card {
        grid-template-columns: 124px minmax(0, 1fr);
        min-height: 145px;
    }

    .listing-layout.list-view .listing-image {
        min-height: 145px;
    }

    .listing-card-actions button,
    .listing-card-actions a {
        width: 30px;
        height: 30px;
    }

    .listing-card-actions {
        flex-direction: column;
    }

    .gallery-primary {
        min-height: 260px;
        height: 82vw;
    }

    .gallery-thumbs {
        grid-template-columns: repeat(5, 1fr);
    }

    .detail-actions .button span {
        display: none;
    }

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

    .spec-grid > div {
        border-bottom: 1px solid var(--line) !important;
    }

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

    .modern-uploader.has-files .upload-zone {
        grid-template-columns: auto 1fr;
    }

    .modern-uploader.has-files .upload-zone span {
        display: none;
    }

    .blog-index-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .content-hero,
    .page-content-hero {
        padding-block: 34px 28px;
    }

    .article-header {
        padding-top: 30px;
    }
}
