/* Catalog, lot page and cards. Colors come from theme.css tokens. */
.amc-page {
    padding-top: 130px;
    padding-bottom: 60px;
    font-family: var(--font-family);
    color: var(--ink);
    background: var(--bg);
}

.amc-page a {
    color: inherit;
}

.amc-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 14px;
}

.amc-breadcrumbs a {
    color: var(--muted);
    text-decoration: none;
}

.amc-breadcrumbs a:hover {
    color: var(--accent);
}

.amc-breadcrumbs > * + *::before {
    content: "/";
    margin-right: 6px;
    opacity: 0.5;
}

.amc-h1 {
    font-size: clamp(26px, 3vw, 42px);
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin: 0 0 16px;
    color: var(--ink);
}

.amc-h2 {
    font-size: clamp(20px, 2vw, 28px);
    font-weight: 800;
    margin: 0 0 18px;
    color: var(--ink);
}

.amc-lead {
    max-width: 920px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--muted);
    margin-bottom: 24px;
}

.amc-lead p {
    margin: 0 0 10px;
}

.amc-note {
    font-size: 14px;
    line-height: 1.5;
    background: var(--warn-bg);
    border-left: 3px solid var(--warn-line);
    border-radius: 10px;
    padding: 10px 14px;
    color: var(--warn-ink);
}

/* ---------- quick links (SEO slices) ---------- */
.amc-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
}

.amc-quick a,
.amc-quick span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 50px;
    background: var(--chip);
    border: 1px solid var(--line);
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.amc-quick a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.amc-quick .is-current {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
}

.amc-quick small {
    color: var(--muted);
    font-weight: 500;
}

.amc-quick .is-current small {
    color: inherit;
    opacity: 0.8;
}

/* ---------- filter ---------- */
.amc-filter {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 22px;
    margin-bottom: 28px;
}

.amc-filter__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px 16px;
}

.amc-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.amc-field > span {
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
}

.amc-field--pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 8px;
    row-gap: 6px;
}

.amc-field--pair > span {
    grid-column: 1 / -1;
}

.amc-page .amc-field select,
.amc-page .amc-field input {
    width: 100%;
    min-width: 0;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background-color: var(--surface);
    padding: 0 14px;
    font: inherit;
    font-size: 15px;
    color: var(--ink);
    appearance: auto;
}

.amc-page .amc-field select:focus,
.amc-page .amc-field input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.amc-page .amc-field select:disabled {
    opacity: 0.55;
}

.amc-filter__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.amc-filter__label {
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    margin-right: 4px;
}

.amc-chip,
.amc-check {
    position: relative;
}

.amc-chip input,
.amc-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.amc-chip span {
    display: inline-block;
    min-width: 42px;
    text-align: center;
    padding: 7px 12px;
    border-radius: 50px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

.amc-chip input:checked + span {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
}

.amc-chip input:focus-visible + span,
.amc-check input:focus-visible + span {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.amc-check {
    margin-left: 12px;
}

.amc-check span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    color: var(--ink);
}

.amc-check span::before {
    content: "";
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1px solid var(--muted);
    background: var(--surface);
    flex: none;
}

.amc-check input:checked + span::before {
    background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3 7.5l2.5 2.5L11 4.5' stroke='%23fff' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center / 14px no-repeat;
    border-color: var(--accent);
}

.amc-filter__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 18px;
}

.amc-page .amc-filter__submit {
    border-radius: 14px;
    padding: 14px 40px;
    background: var(--accent);
    color: var(--accent-ink);
}

.amc-filter__reset {
    color: var(--accent);
    font-size: 15px;
}

.amc-filter__found {
    margin-left: auto;
    font-size: 14px;
    color: var(--muted);
}

.amc-filter__found b {
    color: var(--ink);
}

.amc-filter__more {
    display: none;
    width: 100%;
    margin-top: 12px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--surface);
    font: inherit;
    font-weight: 600;
    color: var(--ink);
}

/* ---------- cards ---------- */
.amc-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.amc-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

@media (any-hover: hover) {
    .amc-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-hover);
        border-color: var(--accent-soft);
    }
    .amc-card:hover .amc-card__photo img {
        transform: scale(1.04);
    }
}

.amc-card__photo {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--surface-3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%239aa0aa' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 40l4-12a4 4 0 0 1 3.8-2.7h28.4A4 4 0 0 1 50 28l4 12'/%3E%3Crect x='8' y='40' width='48' height='10' rx='3'/%3E%3Ccircle cx='18' cy='50' r='4'/%3E%3Ccircle cx='46' cy='50' r='4'/%3E%3C/svg%3E") center / 64px no-repeat;
}

.amc-card__photo::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 45%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.45), transparent);
    pointer-events: none;
}

.amc-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.amc-card__photo img.is-broken {
    visibility: hidden;
}

.amc-card__tags {
    position: absolute;
    z-index: 1;
    top: 10px;
    left: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.amc-tag {
    background: rgba(12, 14, 18, 0.78);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 12px;
    line-height: 1;
    padding: 6px 10px;
    border-radius: 50px;
}

.amc-tag--warn {
    background: rgba(201, 87, 87, 0.95);
}

.amc-card__score {
    position: absolute;
    z-index: 1;
    top: 10px;
    right: 10px;
    min-width: 34px;
    height: 34px;
    padding: 0 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    background: #f4a51c;
    color: #111;
    font-weight: 800;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.amc-card__body {
    display: flex;
    flex-direction: column;
    gap: 9px;
    flex: 1 1 auto;
    padding: 16px 16px 18px;
}

.amc-card__title {
    font-weight: 800;
    font-size: 17px;
    line-height: 1.25;
    color: var(--ink);
    text-decoration: none;
}

.amc-page .amc-card__title,
.amc-card__title {
    color: var(--ink);
}

.amc-card__title:hover {
    color: var(--accent);
}

.amc-card__grade {
    font-size: 13px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.amc-card__specs {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.amc-card__specs li {
    font-size: 12.5px;
    line-height: 1;
    padding: 6px 9px;
    border-radius: 8px;
    background: var(--chip);
    color: var(--ink);
}

.amc-card__auction {
    font-size: 13px;
    color: var(--muted);
}

.amc-card__prices {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.amc-card__orig {
    font-size: 13px;
    color: var(--muted);
}

.amc-card__orig b {
    color: var(--ink);
    font-weight: 600;
}

.amc-card__total {
    font-size: 22px;
    font-weight: 800;
    color: var(--ink);
    margin-top: 4px;
    letter-spacing: -0.01em;
}

.amc-card__total small {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0;
}

.amc-card__total--ask {
    font-size: 16px;
    color: var(--accent);
}

.amc-card .amc-lead-btn {
    margin-top: 12px;
    padding: 12px 18px;
    font-size: 15px;
    border-radius: 12px;
    width: 100%;
    background: var(--accent);
    color: var(--accent-ink);
}

.amc-card .amc-lead-btn:hover {
    background: var(--accent-strong);
    opacity: 1;
}

.amc-empty {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 36px;
    text-align: center;
}

.amc-empty p {
    max-width: 560px;
    margin: 0 auto 18px;
    font-size: 16px;
    color: var(--muted);
}

/* ---------- pagination / links / seo text ---------- */
.amc-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 34px 0 10px;
}

.amc-pagination .page-numbers {
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    text-decoration: none;
    font-weight: 700;
}

.amc-pagination a.page-numbers:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.amc-pagination .page-numbers.current {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
}

.amc-pagination .page-numbers.dots {
    border: 0;
    background: none;
}

.amc-links {
    margin-top: 50px;
}

.amc-links__list {
    list-style: none;
    margin: 0;
    padding: 0;
    columns: 5 180px;
    column-gap: 24px;
}

.amc-links__list li {
    break-inside: avoid;
    padding: 4px 0;
}

.amc-links__list a {
    color: var(--ink);
    text-decoration: none;
    font-size: 15px;
}

.amc-links__list a:hover {
    color: var(--accent);
}

.amc-links__list span {
    color: var(--muted);
    font-size: 13px;
}

.amc-seo-text {
    margin-top: 50px;
    padding: 26px 28px;
    border-radius: 20px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    line-height: 1.65;
    color: var(--muted);
    font-size: 15px;
}

.amc-seo-text h2 {
    margin-top: 0;
}

.amc-seo-text p {
    margin: 0 0 10px;
}

.amc-seo-text b {
    color: var(--ink);
}

.amc-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.amc-stats div {
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
}

.amc-stats b {
    display: block;
    font-size: 20px;
    color: var(--ink);
}

.amc-stats span {
    font-size: 13px;
    color: var(--muted);
}

.amc-content {
    margin-top: 50px;
    line-height: 1.6;
}

/* ---------- lot page ---------- */
.amc-lot__top {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.amc-gallery__main {
    display: block;
    border-radius: 22px;
    overflow: hidden;
    background: var(--surface-3);
    aspect-ratio: 4 / 3;
    border: 1px solid var(--line);
}

.amc-gallery__main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.amc-gallery__thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.amc-gallery__thumb {
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    border: 2px solid transparent;
    padding: 0;
    cursor: pointer;
    background: var(--surface-3);
    opacity: 0.75;
    transition: opacity 0.2s ease, border-color 0.2s ease;
}

.amc-gallery__thumb:hover {
    opacity: 1;
}

.amc-gallery__thumb.is-active {
    border-color: var(--accent);
    opacity: 1;
}

.amc-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.amc-gallery__hint {
    font-size: 13px;
    color: var(--muted);
    margin: 10px 0 0;
}

.amc-gallery__empty {
    aspect-ratio: 4 / 3;
    border-radius: 22px;
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
}

.amc-pricebox {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 24px;
    position: sticky;
    top: 110px;
}

.amc-pricebox__label {
    font-size: 14px;
    color: var(--muted);
    font-weight: 600;
}

.amc-pricebox__total {
    font-size: clamp(30px, 3vw, 42px);
    font-weight: 800;
    margin: 4px 0 6px;
    color: var(--ink);
    letter-spacing: -0.02em;
}

.amc-pricebox__total--ask {
    font-size: 24px;
    color: var(--accent);
}

.amc-pricebox__orig {
    font-size: 15px;
    color: var(--muted);
    margin-bottom: 14px;
}

.amc-pricebox__orig b {
    color: var(--ink);
}

.amc-page .amc-pricebox__btn {
    width: 100%;
    border-radius: 14px;
    padding: 16px 20px;
    margin-top: 6px;
    background: var(--accent);
    color: var(--accent-ink);
}

.amc-pricebox__small {
    font-size: 13px;
    color: var(--muted);
    margin: 10px 0 18px;
}

.amc-specs {
    margin: 0;
    border-top: 1px solid var(--line);
}

.amc-specs div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
}

.amc-specs dt {
    color: var(--muted);
}

.amc-specs dd {
    margin: 0;
    font-weight: 600;
    text-align: right;
    overflow-wrap: anywhere;
    color: var(--ink);
}

.amc-calc {
    margin-top: 44px;
    max-width: 860px;
}

.amc-calc__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    color: var(--ink);
}

.amc-calc__table td {
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.amc-calc__table td:last-child {
    text-align: right;
    white-space: nowrap;
    font-weight: 600;
    padding-left: 16px;
}

.amc-calc__sub td {
    color: var(--muted);
}

.amc-calc__total td {
    font-size: 20px;
    font-weight: 800;
    border-bottom: 0;
    padding-top: 16px;
}

.amc-calc__notes {
    margin: 16px 0 0;
    padding-left: 18px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--muted);
}

.amc-similar {
    margin-top: 50px;
}

.amc-more {
    display: inline-block;
    margin-top: 18px;
    font-weight: 700;
    color: var(--accent);
}

.amc-page .amc-more {
    color: var(--accent);
}

.amc-legend {
    margin-top: 40px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px 22px;
    color: var(--ink);
}

.amc-legend summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 17px;
}

.amc-legend__list {
    columns: 2 320px;
    column-gap: 30px;
    margin-top: 14px;
    font-size: 14px;
    color: var(--muted);
}

.amc-legend__list li {
    break-inside: avoid;
    padding: 4px 0;
}

.amc-legend__list b {
    display: inline-block;
    min-width: 34px;
    color: var(--ink);
}

/* ---------- responsive ---------- */
@media (max-width: 1200px) {
    .amc-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .amc-filter__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .amc-page {
        padding-top: 110px;
    }
    .amc-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }
    .amc-filter__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .amc-lot__top {
        grid-template-columns: 1fr;
    }
    .amc-pricebox {
        position: static;
    }
    .amc-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .amc-filter {
        padding: 16px;
        border-radius: 18px;
    }
    .amc-filter__grid {
        grid-template-columns: 1fr;
    }
    .amc-filter__found {
        margin-left: 0;
        width: 100%;
    }
    .amc-page .amc-filter__submit {
        width: 100%;
    }
    .amc-grid {
        grid-template-columns: 1fr;
    }
    .amc-check {
        margin-left: 0;
    }
    .amc-calc__table td:last-child {
        white-space: normal;
    }
    .amc-filter:not(.is-open) .amc-field--extra {
        display: none;
    }
    .amc-filter__more {
        display: block;
    }
    .amc-filter.is-open .amc-filter__more {
        display: none;
    }
    .amc-seo-text {
        padding: 20px;
    }
}
