.masm-stock-wrap {
    margin: 20px 0;
    padding: 18px;
    border-radius: 12px;
    background: var(--masm-shortcode-bg-color, #fff);
}
.masm-stock-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}
.masm-stock-card {
    border: 1px solid var(--masm-card-border-color, #ddd);
    border-radius: 10px;
    overflow: hidden;
    background: var(--masm-card-bg-color, #fff);
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.masm-card-image {
    display: block;
    aspect-ratio: 4 / 3;
    background: #f3f3f3;
    overflow: hidden;
    color: #777;
    text-decoration: none;
}
.masm-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.masm-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 180px;
    color: #888;
}
.masm-card-body {
    padding: 14px;
}
.masm-status-label {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--masm-status-available, #1f6feb);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}
.masm-status-negotiating .masm-status-label {
    background: var(--masm-status-negotiating, #c77700);
}
.masm-status-sold {
    opacity: .7;
}
.masm-status-sold .masm-status-label {
    background: var(--masm-status-sold, #777);
}
.masm-card-body h3 {
    margin: 10px 0 8px;
    font-size: 18px;
    line-height: 1.4;
}
.masm-card-body h3 a {
    color: inherit;
    text-decoration: none;
}
.masm-price-main {
    margin: 8px 0 10px;
    font-size: 15px;
}
.masm-price-main strong {
    font-size: 24px;
    color: var(--masm-price-color, #d60000);
}
.masm-card-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px 10px;
    font-size: 13px;
    color: #333;
}
.masm-detail-button {
    display: block;
    margin-top: 14px;
    padding: 9px 12px;
    border-radius: 6px;
    background: var(--masm-detail-button-color, #222);
    color: #fff !important;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
}
.masm-empty {
    padding: 18px;
    border: 1px solid #ddd;
    background: #fafafa;
}
.masm-single {
    max-width: 1100px;
    margin: 0 auto;
    padding: 18px;
    border-radius: 12px;
    background: var(--masm-detail-page-bg-color, #fff);
}
.masm-single-header h1 {
    color: var(--masm-detail-title-color, #222);
}
.masm-single h2 {
    color: var(--masm-detail-section-title-color, #222);
    border-left: 5px solid var(--masm-primary-color, #1f6feb);
    padding-left: 10px;
}
.masm-single-header h1 {
    margin-top: 10px;
}
.masm-single-top {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr);
    gap: 20px;
    align-items: start;
    margin: 20px 0;
}
.masm-single-photo {
    padding: 10px;
    border: 1px solid var(--masm-detail-main-photo-border-color, #eee);
    border-radius: 10px;
    background: var(--masm-detail-main-photo-bg-color, #f3f3f3);
}
.masm-single-photo img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}
.masm-single-price-box {
    border: 1px solid var(--masm-card-border-color, #ddd);
    border-radius: 10px;
    padding: 18px;
    background: var(--masm-price-box-bg-color, #fffdf7);
}
.masm-single-total {
    border-bottom: 1px solid #e5d8b0;
    padding-bottom: 12px;
    margin-bottom: 12px;
}
.masm-single-total strong {
    display: block;
    font-size: 36px;
    color: var(--masm-price-color, #d60000);
    line-height: 1.2;
}
.masm-price-sub {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px solid #eee;
}
.masm-price-note {
    margin: 12px 0 0;
    font-size: 13px;
    color: #555;
}
.masm-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--masm-detail-summary-border-color, #ddd);
    margin: 20px 0;
    background: var(--masm-detail-summary-bg-color, #fff);
}
.masm-summary-grid div {
    padding: 12px;
    border-right: 1px solid var(--masm-detail-summary-border-color, #ddd);
    border-bottom: 1px solid var(--masm-detail-summary-border-color, #ddd);
}
.masm-summary-grid span {
    display: block;
    color: #666;
    font-size: 13px;
}
.masm-summary-grid strong {
    display: block;
    margin-top: 4px;
    font-size: 16px;
}
.masm-spec-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0 24px;
}
.masm-spec-table th,
.masm-spec-table td {
    border: 1px solid var(--masm-table-border-color, #ddd);
    padding: 10px;
    text-align: left;
    vertical-align: top;
}
.masm-spec-table th {
    width: 28%;
    background: var(--masm-table-header-bg-color, #f6f6f6);
}
.masm-comment-boxes section {
    border: 1px solid var(--masm-detail-comment-border-color, #ddd);
    border-radius: 8px;
    padding: 14px;
    margin: 12px 0;
    background: var(--masm-detail-comment-bg-color, #fff);
}
.masm-comment-boxes h3 {
    margin-top: 0;
}
.masm-equipment-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 24px;
}
.masm-equipment-list span {
    border: 1px solid var(--masm-table-border-color, #ddd);
    border-radius: 999px;
    padding: 5px 10px;
    background: var(--masm-equipment-bg-color, #fafafa);
    font-size: 14px;
}
.masm-photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin: 12px 0 24px;
    padding: 12px;
    border-radius: 10px;
    background: var(--masm-detail-gallery-bg-color, #fff);
}
.masm-photo-gallery img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}
@media (max-width: 768px) {
    .masm-single-top {
        grid-template-columns: 1fr;
    }
    .masm-summary-grid {
        grid-template-columns: 1fr 1fr;
    }
    .masm-card-specs {
        grid-template-columns: 1fr;
    }
}
.masm-photo-item {
    margin: 0;
}
.masm-photo-item figcaption {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.5;
    color: #555;
}

.masm-equipment-display-groups {
    display: grid;
    gap: 14px;
    margin: 12px 0 24px;
}
.masm-equipment-display-group {
    border: 1px solid var(--masm-table-border-color, #e5e5e5);
    border-radius: 8px;
    padding: 12px;
    background: var(--masm-detail-equipment-group-bg-color, #fff);
}
.masm-equipment-display-group h3 {
    margin: 0 0 8px;
    font-size: 16px;
}
.masm-equipment-display-group .masm-equipment-list {
    margin-bottom: 0;
}

.masm-tax-label {
    display: inline-block;
    margin-left: 6px;
    font-size: 12px;
    color: #666;
    font-weight: 700;
}

/* 検索フォーム・ページ送り */
.masm-search-form {
    margin: 0 0 26px;
    padding: 22px;
    border: 1px solid var(--masm-search-border-color, var(--masm-card-border-color, #e0e4ea));
    border-radius: 16px;
    background: var(--masm-search-bg-color, #fff);
    color: var(--masm-search-text-color, #333);
    box-shadow: 0 8px 28px rgba(15, 23, 42, .06);
}
.masm-search-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--masm-search-border-color, #e0e4ea);
}
.masm-search-title {
    margin: 0;
    color: var(--masm-search-heading-color, #222);
    font-size: 22px;
    line-height: 1.3;
}
.masm-search-description {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--masm-search-text-color, #555);
}
.masm-search-panel {
    padding: 14px;
    border: 1px solid var(--masm-search-border-color, #e0e4ea);
    border-radius: 12px;
    background: color-mix(in srgb, var(--masm-search-bg-color, #fff) 92%, #f5f7fb);
    margin-bottom: 12px;
}
.masm-search-panel-title {
    margin: 0 0 10px;
    color: var(--masm-search-heading-color, #222);
    font-weight: 800;
    font-size: 14px;
}
.masm-search-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 12px 14px;
}
.masm-search-grid-main {
    grid-template-columns: minmax(240px, 2fr) repeat(3, minmax(150px, 1fr));
}
.masm-search-field,
.masm-search-grid label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 700;
    font-size: 13px;
    color: var(--masm-search-label-color, #333);
}
.masm-search-field span,
.masm-search-grid label span,
.masm-search-range > span {
    color: var(--masm-search-label-color, #333);
}
.masm-search-grid input,
.masm-search-grid select,
.masm-search-range input {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--masm-search-input-border-color, #d6dce5);
    border-radius: 9px;
    padding: 8px 11px;
    font-weight: 400;
    background: var(--masm-search-input-bg-color, #fff);
    color: var(--masm-search-text-color, #333);
    box-shadow: inset 0 1px 2px rgba(0,0,0,.03);
}
.masm-search-grid input:focus,
.masm-search-grid select:focus,
.masm-search-range input:focus {
    outline: none;
    border-color: var(--masm-primary-color, #1f6feb);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--masm-primary-color, #1f6feb) 18%, transparent);
}
.masm-search-range-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 12px 14px;
}
.masm-search-range {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
}
.masm-search-range > div {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 7px;
    align-items: center;
}
.masm-search-range em {
    font-style: normal;
    color: var(--masm-search-text-color, #666);
}
.masm-search-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 14px;
}
.masm-search-checks {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.masm-search-check {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 7px !important;
    min-height: 38px;
    padding: 7px 11px;
    border: 1px solid var(--masm-search-border-color, #e0e4ea);
    border-radius: 999px;
    background: var(--masm-search-input-bg-color, #fff);
    color: var(--masm-search-label-color, #333);
    font-weight: 700;
    font-size: 13px;
}
.masm-search-check input {
    margin: 0;
}
.masm-search-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}
.masm-search-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 22px;
    border: 1px solid var(--masm-detail-button-color, #222);
    border-radius: 999px;
    background: var(--masm-detail-button-color, #222);
    color: var(--masm-search-button-text-color, #fff);
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
}
.masm-search-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid var(--masm-search-clear-border-color, #d6dce5);
    border-radius: 999px;
    background: var(--masm-search-clear-bg-color, #fff);
    color: var(--masm-search-clear-text-color, #333);
    text-decoration: none;
    font-weight: 700;
}
.masm-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 28px 0 0;
    flex-wrap: wrap;
}
.masm-pagination a,
.masm-pagination span {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d6dce5;
    border-radius: 6px;
    text-decoration: none;
    background: #fff;
}
.masm-pagination .masm-page-current {
    background: var(--masm-primary-color, #0b5ed7);
    color: #fff;
    border-color: var(--masm-primary-color, #0b5ed7);
}
@media (max-width: 900px) {
    .masm-search-grid {
        grid-template-columns: repeat(2, minmax(160px, 1fr));
    }
}
@media (max-width: 600px) {
    .masm-search-grid {
        grid-template-columns: 1fr;
    }
}


.masm-card-image {
    position: relative;
}
.masm-appeal-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 6px 0;
}
.masm-card-image .masm-appeal-labels {
    position: absolute;
    top: 7px;
    left: 7px;
    right: 7px;
    z-index: 2;
    margin: 0;
    pointer-events: none;
}
.masm-appeal-label {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #ff8a00;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    box-shadow: 0 1px 3px rgba(0,0,0,.16);
}
.masm-appeal-labels-card {
    margin-top: 8px;
    margin-bottom: 0;
}
.masm-appeal-labels-single {
    margin: 10px 0 16px;
}
.masm-appeal-labels-single .masm-appeal-label {
    font-size: 13px;
    min-height: 24px;
}
.masm-appeal-special_selection,
.masm-appeal-excellent_condition,
.masm-appeal-featured_deal {
    background: #d60000;
}
.masm-appeal-low_mileage,
.masm-appeal-one_owner_label,
.masm-appeal-non_smoking_label,
.masm-appeal-no_repair_history_label,
.masm-appeal-records_available_label,
.masm-appeal-warranty_included_label {
    background: #1f6feb;
}
.masm-appeal-price_revised,
.masm-appeal-bargain {
    background: #c77700;
}
.masm-appeal-work_recommended,
.masm-appeal-kei_cargo,
.masm-appeal-delivery_recommended,
.masm-appeal-freezer_truck_label,
.masm-appeal-refrigerated_truck_label,
.masm-appeal-low_temp_freezer_label,
.masm-appeal-max_load_available,
.masm-appeal-wide_cargo_bed,
.masm-appeal-truck_equipment_rich {
    background: #0a7a4b;
}

.masm-single-back {
    margin: 10px 0 18px;
}

.masm-single-back a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: 999px;
    background: var(--masm-detail-button-color, #222222);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92rem;
}

.masm-single-back a:hover {
    opacity: 0.86;
    color: #fff;
}

.masm-single-back-bottom {
    margin-top: 28px;
}


@media (max-width: 900px) {
    .masm-search-head {
        display: block;
    }
    .masm-search-grid,
    .masm-search-grid-main,
    .masm-search-range-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 640px) {
    .masm-search-form {
        padding: 15px;
        border-radius: 12px;
    }
    .masm-search-grid,
    .masm-search-grid-main,
    .masm-search-range-grid {
        grid-template-columns: 1fr;
    }
    .masm-search-bottom,
    .masm-search-actions {
        align-items: stretch;
        flex-direction: column;
    }
    .masm-search-actions,
    .masm-search-submit,
    .masm-search-clear {
        width: 100%;
    }
}


/* 詳細ページ：メイン画像下サムネイル */
.masm-main-gallery-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}
.masm-main-gallery-caption {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    background: rgba(0,0,0,.06);
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}
.masm-main-thumbnails {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
    padding: 2px 2px 8px;
}
.masm-main-thumb {
    flex: 0 0 auto;
    width: 78px;
    height: 58px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 7px;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
}
.masm-main-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 5px;
}
.masm-main-thumb.is-active {
    border-color: var(--masm-primary-color, #1f6feb);
}


.masm-ask-price strong { letter-spacing: .04em; }
.masm-popup-photo { cursor: zoom-in; }
.masm-photo-popup-trigger { display:block; width:100%; padding:0; border:0; background:transparent; cursor: zoom-in; }
.masm-photo-popup-trigger img { display:block; width:100%; height:auto; }
.masm-photo-modal { display:none; position:fixed; inset:0; z-index:99999; align-items:center; justify-content:center; padding:24px; }
.masm-photo-modal.is-open { display:flex; }
.masm-photo-modal-backdrop { position:absolute; inset:0; background:rgba(0,0,0,.72); }
.masm-photo-modal-inner { position:relative; z-index:1; max-width:min(96vw,1100px); max-height:92vh; background:#111; border-radius:12px; padding:14px; box-shadow:0 20px 60px rgba(0,0,0,.4); }
.masm-photo-modal-inner img { display:block; max-width:100%; max-height:78vh; width:auto; height:auto; margin:auto; border-radius:8px; }
.masm-photo-modal-close { position:absolute; top:-16px; right:-16px; width:40px; height:40px; border:0; border-radius:50%; background:#fff; color:#111; font-size:26px; line-height:1; cursor:pointer; box-shadow:0 2px 12px rgba(0,0,0,.25); }
.masm-photo-modal-caption { margin:10px 4px 0; color:#fff; font-size:14px; text-align:center; }
body.masm-modal-open { overflow:hidden; }
@media (max-width: 600px) { .masm-photo-modal { padding:12px; } .masm-photo-modal-close { top:6px; right:6px; } .masm-photo-modal-inner { padding:10px; } }
