/* Marketplace visual alignment bridge (Sprint G Phase 1) */
.bike-latch-marketplace-page {
    --bl-marketplace-surface: #ffffff;
    --bl-marketplace-surface-alt: #fafafa;
    --bl-marketplace-border: #1f1f1f;
    --bl-marketplace-text: #111111;
    --bl-marketplace-muted: #444444;
    --bl-marketplace-accent: #111111;
    --bl-marketplace-accent-soft: #f1efc7;
    --bl-marketplace-highlight: #d8d263;
    --bl-marketplace-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    color: var(--bl-marketplace-text);
}

/* ================================
   Shared Buttons + Badges (Phase 4)
================================ */

.bike-latch-marketplace-shell .bl-btn-primary,
.bike-latch-my-bikes-page .bl-btn-primary,
.inbox-container .bl-btn-primary,
.bike-latch-listing-shell .bl-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid #111;
    border-radius: 999px;
    background: #111;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

/* Inbox keeps yellow primary actions for readability against modal backgrounds. */
.inbox-container .bl-btn-primary {
    background: #f3c100;
    border-color: #d2a700;
    color: #111;
}

.bike-latch-marketplace-shell .bl-btn-secondary,
.bike-latch-my-bikes-page .bl-btn-secondary,
.inbox-container .bl-btn-secondary,
.bike-latch-listing-shell .bl-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid #111;
    border-radius: 999px;
    background: #fff;
    color: #111;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.bike-latch-marketplace-shell .bl-btn-danger,
.bike-latch-my-bikes-page .bl-btn-danger,
.inbox-container .bl-btn-danger,
.bike-latch-listing-shell .bl-btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid #b52a2a;
    border-radius: 999px;
    background: #b52a2a;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.bike-latch-marketplace-shell .bl-badge,
.bike-latch-my-bikes-page .bl-badge,
.inbox-container .bl-badge,
.bike-latch-listing-shell .bl-badge {
    display: inline-flex;
    align-items: center;
    border: 1px solid #d7d7d7;
    background: #fafafa;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 600;
    color: #222;
}

.bike-latch-marketplace-shell .bl-badge-status,
.bike-latch-my-bikes-page .bl-badge-status,
.inbox-container .bl-badge-status,
.bike-latch-listing-shell .bl-badge-status {
    background: #f1efc7;
    border-color: #ddd89b;
    color: #111;
}

.inbox-container .bl-badge-unread td:first-child::before,
.inbox-container .bl-badge-unread td:nth-child(2)::before {
    content: "Unread";
    display: inline-flex;
    align-items: center;
    border: 1px solid #ddd89b;
    background: #f1efc7;
    border-radius: 999px;
    padding: 2px 7px;
    margin-right: 8px;
    font-size: 11px;
    font-weight: 700;
    color: #111;
}

.bike-latch-marketplace-page a {
    color: var(--bl-marketplace-accent);
}

.bike-latch-marketplace-page #marketplace-search-container {
    background: var(--bl-marketplace-surface);
    border: 1px solid #d9d9d9;
    border-radius: 10px;
    padding: 16px 16px 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.bike-latch-marketplace-page .bike-latch-marketplace-filter-status {
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid #d9d9d9;
    border-radius: 10px;
    background: #fff;
}

.bike-latch-marketplace-page .bike-latch-marketplace-filters {
    gap: 14px 18px;
    align-items: flex-start;
}

.bike-latch-marketplace-page .bike-latch-marketplace-filters > .bl-flex-item {
    min-width: 220px;
    padding-right: 0;
    padding-bottom: 0;
    flex: 1 1 240px;
}

.bike-latch-marketplace-page .bike-latch-marketplace-filters label {
    display: inline-block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--bl-marketplace-text);
}

.bike-latch-marketplace-page .bike-latch-marketplace-filters input[type='text'],
.bike-latch-marketplace-page .bike-latch-marketplace-filters select {
    width: 100%;
    max-width: 100%;
    min-height: 36px;
    border: 1px solid var(--bl-marketplace-border);
    border-radius: 8px;
    padding: 6px 10px;
    background: #fff;
}

.bike-latch-marketplace-page .bike-latch-marketplace-search-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.bike-latch-marketplace-page #marketplace-search-button,
.bike-latch-marketplace-page #marketplace-reset-button {
    min-width: 112px;
    min-height: 38px;
    border-radius: 999px;
    border: 1px solid var(--bl-marketplace-border);
    padding: 0 16px;
    font-weight: 600;
    cursor: pointer;
}

.bike-latch-marketplace-page #marketplace-search-button {
    background: #111;
    border-color: #111;
    color: #fff;
}

.bike-latch-marketplace-page #marketplace-reset-button {
    background: #fff;
    color: var(--bl-marketplace-text);
}

.bike-latch-marketplace-page .bike-latch-marketplace-results {
    margin-top: 14px;
}

.bike-latch-marketplace-page [data-test='listing-grid-root'] {
    background: transparent;
}

.bike-latch-marketplace-page .pagination {
    display: flex;
    justify-content: center;
    gap: 0;
    margin: 14px 0 10px;
}

.bike-latch-marketplace-page .pagination a {
    min-width: 30px;
    min-height: 30px;
    border: 1px solid #111;
    color: #111;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: #fff;
    margin-left: -1px;
}

.bike-latch-marketplace-page .pagination a.active {
    background: #111;
    color: #fff;
}

.bike-latch-marketplace-page .bike-latch-listing-grid-search {
    margin-bottom: 10px;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.bike-latch-marketplace-page .bike-latch-listing-grid-search input[type='text'] {
    min-height: 36px;
    border: 1px solid var(--bl-marketplace-border);
    border-radius: 8px;
    padding: 6px 10px;
    min-width: 260px;
}

.bike-latch-marketplace-page .bike-latch-listing-grid-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.bike-latch-marketplace-page .bike-latch-listing-grid-table thead th {
    background: transparent;
    border: 0;
    color: var(--bl-marketplace-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 4px 10px;
    text-transform: uppercase;
}

.bike-latch-marketplace-page .bike-latch-listing-grid-table tbody tr {
    box-shadow: var(--bl-marketplace-shadow);
    transition: box-shadow 140ms ease, transform 140ms ease;
}

.bike-latch-marketplace-page .bike-latch-listing-grid-table tbody tr:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15), 0 0 0 2px var(--bl-marketplace-highlight);
    transform: translateY(-1px);
}

.bike-latch-marketplace-page .bike-latch-listing-grid-table tbody td {
    background: var(--bl-marketplace-surface);
    border-top: 1px solid #ececec;
    border-bottom: 1px solid #ececec;
    padding: 10px;
}

.bike-latch-marketplace-page .bike-latch-listing-grid-table tbody td:first-child {
    border-left: 1px solid #ececec;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.bike-latch-marketplace-page .bike-latch-listing-grid-table tbody td:last-child {
    border-right: 1px solid #ececec;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.bike-latch-marketplace-page .bl-listing-actions-select {
    min-width: 140px;
    min-height: 34px;
    border: 1px solid #cfcfcf;
    border-radius: 8px;
    background: #fff;
}

.bike-latch-marketplace-page .bike-latch-listing-grid-price {
    font-weight: 700;
    font-size: 18px;
    color: #111;
    white-space: nowrap;
}

.bike-latch-marketplace-page .bike-latch-listing-grid-status > div:first-child {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--bl-marketplace-accent-soft);
    color: #111;
    font-weight: 600;
}

.bike-latch-marketplace-page .bike-latch-listing-grid-description .bike-latch-description-container {
    width: 240px;
    max-width: 240px;
    max-height: 120px;
    padding-bottom: 0;
    color: var(--bl-marketplace-muted);
    line-height: 1.35;
}

.bike-latch-marketplace-page .bike-latch-marketplace-details-shell {
    background: var(--bl-marketplace-surface);
    border: 1px solid #e6e6e6;
    border-radius: 14px;
    padding: 16px;
    box-shadow: var(--bl-marketplace-shadow);
}

.bike-latch-marketplace-page .bike-latch-marketplace-details-header {
    margin-bottom: 10px;
    color: var(--bl-marketplace-text);
}

.bike-latch-marketplace-page .bike-latch-marketplace-detail-hero {
    margin-bottom: 14px;
    padding: 14px;
    border: 1px solid #ececec;
    border-radius: 14px;
    background: linear-gradient(180deg, #fffef6 0%, #ffffff 100%);
}

.bike-latch-marketplace-page .bike-latch-marketplace-detail-hero-top {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 10px;
}

.bike-latch-marketplace-page .bike-latch-marketplace-detail-id-pill {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    border: 1px solid #111;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    background: #fff;
}

.bike-latch-marketplace-page .bike-latch-marketplace-detail-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
    gap: 14px;
    align-items: start;
}

.bike-latch-marketplace-page .bike-latch-marketplace-detail-eyebrow {
    color: var(--bl-marketplace-muted);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.bike-latch-marketplace-page .bike-latch-marketplace-detail-title {
    margin-top: 4px;
    margin-bottom: 8px;
    font-size: 30px;
    line-height: 1.1;
    font-weight: 800;
    color: #111;
}

.bike-latch-marketplace-page .bike-latch-marketplace-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.bike-latch-marketplace-page .bike-latch-marketplace-detail-meta-pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid #d8d8d8;
    border-radius: 999px;
    padding: 3px 10px;
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    color: #222;
}

.bike-latch-marketplace-page .bike-latch-marketplace-detail-seller {
    margin-bottom: 10px;
    font-size: 15px;
    color: #111;
}

.bike-latch-marketplace-page .bike-latch-marketplace-details-actions--hero {
    margin-bottom: 0;
    padding-top: 8px;
    border-top: 1px solid #ececec;
}

.bike-latch-marketplace-page .bike-latch-marketplace-detail-hero-side {
    display: grid;
    gap: 10px;
}

.bike-latch-marketplace-page .bike-latch-marketplace-price-row--hero {
    margin: 0;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 4px;
    align-items: baseline;
    padding: 12px 14px;
}

.bike-latch-marketplace-page .bike-latch-marketplace-price-row--hero > span:first-child {
    color: var(--bl-marketplace-muted);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.bike-latch-marketplace-page .bike-latch-marketplace-price-row--hero > span:nth-child(2),
.bike-latch-marketplace-page .bike-latch-marketplace-price-row--hero > span:nth-child(3) {
    font-size: 24px;
    font-weight: 800;
}

.bike-latch-marketplace-page .bike-latch-marketplace-detail-side-card {
    border: 1px solid #ececec;
    border-radius: 12px;
    background: #fff;
    padding: 10px 12px;
    display: grid;
    gap: 8px;
    color: #222;
}

.bike-latch-marketplace-page .bike-latch-marketplace-detail-side-card > div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.bike-latch-marketplace-page .bike-latch-marketplace-detail-side-card > div > span:first-child {
    color: var(--bl-marketplace-muted);
    font-weight: 600;
}

.bike-latch-marketplace-page .bike-latch-marketplace-detail-side-card a {
    color: #111;
    text-decoration: underline;
    font-weight: 600;
}

.bike-latch-marketplace-page .bike-latch-marketplace-details-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 12px;
    color: var(--bl-marketplace-muted);
}

.bike-latch-marketplace-page .bike-latch-marketplace-details-grid {
    gap: 12px 16px;
}

.bike-latch-marketplace-page .bike-latch-marketplace-details-grid > .flex-item {
    background: var(--bl-marketplace-surface-alt);
    border: 1px solid #ececec;
    border-radius: 12px;
    padding: 12px;
    min-width: 220px;
    padding-right: 12px;
    padding-bottom: 12px;
}

.bike-latch-marketplace-page .bike-latch-marketplace-details-column-title {
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e4e4e4;
    color: #111;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.bike-latch-marketplace-page .bike-latch-marketplace-price-row {
    margin: 8px 0;
    padding: 8px 10px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #111;
    color: #111;
    font-weight: 700;
    font-size: 18px;
}

.bike-latch-marketplace-page .bike-latch-marketplace-images {
    margin-top: 0;
    margin-bottom: 0;
    gap: 10px;
    display: grid;
    grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
    align-items: stretch;
}

.bike-latch-marketplace-page .bike-latch-marketplace-gallery-shell {
    margin-top: 10px;
    margin-bottom: 10px;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.bike-latch-marketplace-page .bike-latch-marketplace-section-title--gallery {
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e8e8e8;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 13px;
}

.bike-latch-marketplace-page .bike-latch-marketplace-image-tile {
    min-height: 110px;
}

.bike-latch-marketplace-page .bike-latch-marketplace-image-tile > div,
.bike-latch-marketplace-page .bike-latch-marketplace-image-tile > div > a {
    height: 100%;
}

.bike-latch-marketplace-page .bike-latch-marketplace-image-tile--primary {
    grid-column: 1;
    grid-row: 1 / span 2;
    min-height: 240px;
}

.bike-latch-marketplace-page .bike-latch-marketplace-images .flex-image-item {
    border: 1px solid #ececec;
    border-radius: 10px;
    background: #fff;
    padding: 6px;
    overflow: hidden;
}

.bike-latch-marketplace-page .bike-latch-marketplace-images img {
    width: 100%;
    max-width: none !important;
    height: 100%;
    min-height: 90px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.bike-latch-marketplace-page .bike-latch-marketplace-image-tile--primary img {
    min-height: 226px;
}

.bike-latch-marketplace-page .bike-latch-marketplace-description-grid {
    gap: 12px 16px;
}

.bike-latch-marketplace-page .bike-latch-marketplace-description-grid > .flex-item {
    background: var(--bl-marketplace-surface-alt);
    border: 1px solid #ececec;
    border-radius: 12px;
    padding: 12px;
    padding-right: 12px;
    padding-bottom: 12px;
    min-width: 260px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.bike-latch-marketplace-page .bike-latch-marketplace-section-title {
    margin-bottom: 8px;
    color: var(--bl-marketplace-text);
}

@media (max-width: 900px) {
    .bike-latch-marketplace-page .bike-latch-marketplace-search-actions {
        flex-wrap: wrap;
    }

    .bike-latch-marketplace-page .bike-latch-listing-grid-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .bike-latch-marketplace-page .pagination {
        justify-content: flex-start;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 2px;
    }

    .bike-latch-marketplace-page .bike-latch-listing-grid-description .bike-latch-description-container {
        width: 180px;
        max-width: 180px;
    }

    .bike-latch-marketplace-page .bike-latch-marketplace-detail-hero-grid {
        grid-template-columns: 1fr;
    }

    .bike-latch-marketplace-page .bike-latch-marketplace-detail-title {
        font-size: 24px;
    }

    .bike-latch-marketplace-page .bike-latch-marketplace-images {
        grid-template-columns: 1fr 1fr;
    }

    .bike-latch-marketplace-page .bike-latch-marketplace-image-tile--primary {
        grid-column: 1 / -1;
        grid-row: auto;
        min-height: 180px;
    }

    .bike-latch-marketplace-page .bike-latch-marketplace-image-tile--primary img {
        min-height: 166px;
    }
}

@media (max-width: 600px) {
    .bike-latch-marketplace-page .bike-latch-marketplace-images {
        grid-template-columns: 1fr;
    }
}

/* --- Marketplace: widen + center, scoped to Bike Latch UI --- */
.bike-latch-marketplace-shell {
  width: min(94vw, 1600px);
  max-width: 100%;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

/* Prevent theme max-width constraints inside the marketplace shell */
.bike-latch-marketplace-shell .container,
.bike-latch-marketplace-shell .content-area,
.bike-latch-marketplace-shell .site-main,
.bike-latch-marketplace-shell .site-content,
.bike-latch-marketplace-shell .entry-content,
.bike-latch-marketplace-shell .wp-site-blocks,
.bike-latch-marketplace-shell .inside-article,
.bike-latch-marketplace-shell .post,
.bike-latch-marketplace-shell article {
  max-width: none !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Make sure tables/grids can actually expand */
.bike-latch-marketplace-shell table {
  width: 100%;
}

/* Optional: reduce accidental narrow columns */
.bike-latch-marketplace-shell .bike-latch-marketplace-page {
  width: 100%;
  max-width: 100%;
}

/* Marketplace listing-grid cards mode */
.bike-latch-marketplace-shell .bl-marketplace-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
  margin-top: 12px;
}

.bike-latch-marketplace-shell .bl-marketplace-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.bike-latch-marketplace-shell .bl-marketplace-card-image {
  background: #f5f5f5;
  border-bottom: 1px solid #ececec;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bike-latch-marketplace-shell .bl-marketplace-card-image-link,
.bike-latch-marketplace-shell .bl-marketplace-card-image-link img {
  display: block;
  width: 100%;
  height: 100%;
}

.bike-latch-marketplace-shell .bl-marketplace-card-image-link img {
  object-fit: cover;
}

.bike-latch-marketplace-shell .bl-marketplace-card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.bike-latch-marketplace-shell .bl-marketplace-card-body {
  padding: 12px;
  display: grid;
  gap: 8px;
}

.bike-latch-marketplace-shell .bl-marketplace-card-title {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.25;
  color: #111;
}

.bike-latch-marketplace-shell .bl-marketplace-card-subtitle {
  color: #555;
  font-size: 13px;
}

.bike-latch-marketplace-shell .bl-marketplace-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bike-latch-marketplace-shell .bl-marketplace-card-select,
.bike-latch-my-bikes-page .bl-marketplace-card-select {
  display: flex;
  justify-content: flex-end;
}

.bike-latch-marketplace-shell .bl-marketplace-card-select input[type='checkbox'],
.bike-latch-my-bikes-page .bl-marketplace-card-select input[type='checkbox'] {
  inline-size: 18px;
  block-size: 18px;
}

.bike-latch-marketplace-shell .bl-marketplace-card-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d7d7d7;
  background: #fafafa;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  line-height: 1.2;
}

.bike-latch-marketplace-shell .bl-marketplace-card-badge-status {
  background: #f1efc7;
  border-color: #ddd89b;
}

.bike-latch-marketplace-shell .bl-marketplace-card-price {
  font-size: 22px;
  font-weight: 700;
  color: #111;
  line-height: 1.1;
}

.bike-latch-marketplace-shell .bl-marketplace-card-distance,
.bike-latch-marketplace-shell .bl-marketplace-card-owner {
  color: #444;
  font-size: 13px;
}

.bike-latch-marketplace-shell .bl-marketplace-card-owner a {
  color: #111;
  text-decoration: underline;
}

.bike-latch-marketplace-shell .bl-marketplace-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 2px;
}

.bike-latch-marketplace-shell .bl-marketplace-card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #111;
  border-radius: 999px;
  text-decoration: none;
  color: #111;
  background: #fff;
}

.bike-latch-marketplace-shell .bl-marketplace-card-actions .bl-listing-actions-select {
  flex: 1 1 160px;
  min-width: 140px;
}

@media (max-width: 1100px) {
  .bike-latch-marketplace-shell .bl-marketplace-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .bike-latch-marketplace-shell .bl-marketplace-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ================================
   My Bikes (Sprint G Phase 3)
================================ */

.bike-latch-my-bikes-page {
  color: #111;
}

.bike-latch-my-bikes-page > .bike-latch-my-bikes-banner,
.bike-latch-my-bikes-page > [data-bind*='name: \"tab-control\"'],
.bike-latch-my-bikes-page > .bike-latch-my-bikes-tab-panel {
  margin-top: 12px;
}

.bike-latch-my-bikes-page .bike-latch-my-bikes-banner {
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  background: #fffdf0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  padding: 12px 14px;
}

.bike-latch-my-bikes-page .bike-latch-my-bikes-banner-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.bike-latch-my-bikes-page .bike-latch-my-bikes-banner-actions button {
  min-height: 36px;
  border-radius: 999px;
  padding: 0 14px;
}

.bike-latch-my-bikes-page .bl-limit-notice,
#my-searches-container .bl-limit-notice {
  border: 1px solid #e1db95;
  border-radius: 12px;
  background: #fffdf0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  padding: 12px 14px;
}

.bike-latch-my-bikes-page .bl-limit-notice-header,
#my-searches-container .bl-limit-notice-header {
  margin-bottom: 8px;
}

.bike-latch-my-bikes-page .bl-limit-notice [data-test^='limit-upgrade-banner-message'],
#my-searches-container .bl-limit-notice [data-test^='limit-upgrade-banner-message'] {
  color: #222;
  line-height: 1.45;
}

.bike-latch-my-bikes-page .bl-limit-notice-plan,
#my-searches-container .bl-limit-notice-plan {
  margin-top: 6px;
  color: #333;
  font-size: 13px;
}

.bike-latch-my-bikes-page .bl-limit-notice-help-text,
#my-searches-container .bl-limit-notice-help-text {
  margin-top: 8px;
  font-size: 13px;
  color: #4a4a4a;
}

.bike-latch-my-bikes-page .bl-limit-notice-actions,
#my-searches-container .bl-limit-notice-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

#my-searches-container .bl-limit-notice-actions button {
  min-height: 36px;
  border-radius: 999px;
  padding: 0 14px;
}

.bike-latch-my-bikes-page .bike-latch-my-bikes-tab-panel {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 14px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  padding: 14px;
}

.bike-latch-my-bikes-page .bike-latch-my-bikes-grid-panel {
  margin-top: 2px;
}

.bike-latch-my-bikes-page [data-test='listing-grid-root'] {
  background: transparent;
}

.bike-latch-my-bikes-page .bike-latch-listing-grid-search {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.bike-latch-my-bikes-page .bike-latch-listing-grid-search input[type='text'] {
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid #d8d8d8;
  padding: 6px 10px;
}

.bike-latch-my-bikes-page .pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 8px 0 12px;
}

.bike-latch-my-bikes-page .pagination a {
  min-width: 30px;
  min-height: 30px;
  border: 1px solid #111;
  margin-left: -1px;
  background: #fff;
  color: #111;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bike-latch-my-bikes-page .pagination a.active {
  background: #111;
  color: #fff;
}

.bike-latch-my-bikes-page .bl-grid-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.bike-latch-my-bikes-page .bl-grid-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 220px;
}

.bike-latch-my-bikes-page .bl-grid-toolbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 260px;
  flex-wrap: wrap;
}

.bike-latch-my-bikes-page .bl-grid-toolbar-right .pad-top-5 {
  width: 100%;
  margin-top: 0;
}

.bike-latch-my-bikes-page .bl-grid-toolbar-right .pad-top-5 > div:last-child {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

/* Reuse marketplace card renderer styling on My Bikes pages */
.bike-latch-my-bikes-page .bl-marketplace-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
  margin-top: 10px;
}

.bike-latch-my-bikes-page .bl-marketplace-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.bike-latch-my-bikes-page .bl-marketplace-card-image {
  background: #f5f5f5;
  border-bottom: 1px solid #ececec;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bike-latch-my-bikes-page .bl-marketplace-card-image-link,
.bike-latch-my-bikes-page .bl-marketplace-card-image-link img {
  display: block;
  width: 100%;
  height: 100%;
}

.bike-latch-my-bikes-page .bl-marketplace-card-image-link img {
  object-fit: cover;
}

.bike-latch-my-bikes-page .bl-marketplace-card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-weight: 600;
}

.bike-latch-my-bikes-page .bl-marketplace-card-body {
  padding: 12px;
  display: grid;
  gap: 8px;
}

.bike-latch-my-bikes-page .bl-marketplace-card-title {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.25;
  color: #111;
}

.bike-latch-my-bikes-page .bl-marketplace-card-subtitle {
  color: #555;
  font-size: 13px;
}

.bike-latch-my-bikes-page .bl-marketplace-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bike-latch-my-bikes-page .bl-marketplace-card-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d7d7d7;
  background: #fafafa;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  line-height: 1.2;
}

.bike-latch-my-bikes-page .bl-marketplace-card-badge-status {
  background: #f1efc7;
  border-color: #ddd89b;
}

.bike-latch-my-bikes-page .bl-marketplace-card-price {
  font-size: 22px;
  font-weight: 700;
  color: #111;
  line-height: 1.1;
}

.bike-latch-my-bikes-page .bl-marketplace-card-distance,
.bike-latch-my-bikes-page .bl-marketplace-card-owner {
  color: #444;
  font-size: 13px;
}

.bike-latch-my-bikes-page .bl-marketplace-card-owner a {
  color: #111;
  text-decoration: underline;
}

.bike-latch-my-bikes-page .bl-marketplace-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 2px;
}

.bike-latch-my-bikes-page .bl-marketplace-card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #111;
  border-radius: 999px;
  text-decoration: none;
  color: #111;
  background: #fff;
}

.bike-latch-my-bikes-page .bl-marketplace-card-actions .bl-listing-actions-select {
  flex: 1 1 160px;
  min-width: 140px;
}

@media (max-width: 1100px) {
  .bike-latch-my-bikes-page .bl-marketplace-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .bike-latch-my-bikes-page .bl-grid-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .bike-latch-my-bikes-page .bl-grid-toolbar-right {
    justify-content: flex-start;
  }

  .bike-latch-my-bikes-page .bl-grid-toolbar-right .pad-top-5 > div:last-child {
    justify-content: flex-start;
  }

  .bike-latch-my-bikes-page .bl-marketplace-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .bike-latch-my-bikes-page .bike-latch-my-bikes-tab-panel {
    padding: 10px;
  }
}

/* ================================
   Listing History Cards
================================ */

.bike-latch-listing-shell .bl-history-cards {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}

.bike-latch-listing-shell .bl-history-card {
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  padding: 16px 18px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.bike-latch-listing-shell .bl-history-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
}

.bike-latch-listing-shell .bl-history-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}

.bike-latch-listing-shell .bl-history-date {
  font-weight: 600;
  font-size: 14px;
  color: #111;
}

.bike-latch-listing-shell .bl-history-owner {
  font-size: 13px;
  color: #666;
}

.bike-latch-listing-shell .bl-history-card-body {
  font-size: 14px;
  color: #333;
  line-height: 1.5;
}

.bike-latch-listing-shell .bl-history-changes {
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 10px 12px;
  font-family: inherit;
  white-space: normal;
}

.bike-latch-listing-shell .bl-history-change-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.bike-latch-listing-shell .bl-history-change-block {
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 10px;
  padding: 10px;
  min-width: 0;
}

.bike-latch-listing-shell .bl-history-change-title {
  margin-bottom: 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #555;
}

.bike-latch-listing-shell .bl-history-change-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  margin-bottom: 4px;
}

.bike-latch-listing-shell .bl-history-change-row > span:first-child {
  color: #666;
  font-weight: 600;
}

.bike-latch-listing-shell .bl-history-owner > div {
  display: inline;
}

.bike-latch-listing-shell .bl-history-owner > div > span {
  display: inline;
}

.bike-latch-listing-shell .bl-history-owner a {
  color: #111;
  text-decoration: underline;
}

.bike-latch-listing-shell .bl-history-change-block .imgThumbnail {
  max-width: 100%;
  height: auto;
}

.bike-latch-listing-shell .bl-history-change-block > div:not(.bl-history-change-title):not(.bl-history-change-row) {
  margin-bottom: 4px;
}

.bike-latch-listing-shell .bl-current-state-cards {
  margin-top: 0;
}

.bike-latch-listing-shell .bl-current-state-card .bl-history-card-body {
  font-size: 14px;
}

.bike-latch-listing-shell .bl-current-state-grid {
  display: grid;
  gap: 12px;
}

.bike-latch-listing-shell .bl-current-state-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.bike-latch-listing-shell .bl-current-state-columns--details {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 0.8fr);
}

.bike-latch-listing-shell .bl-current-state-section {
  border: 1px solid #ececec;
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
  min-width: 0;
}

.bike-latch-listing-shell .bl-current-state-section > div {
  margin-bottom: 4px;
  word-break: break-word;
}

.bike-latch-listing-shell .bl-current-state-section > div:last-child {
  margin-bottom: 0;
}

.bike-latch-listing-shell .bl-current-state-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #555;
  margin-bottom: 6px;
}

.bike-latch-listing-shell .bl-current-state-images-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.bike-latch-listing-shell .bl-current-state-image-cell {
  border: 1px solid #ececec;
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  min-width: 0;
}

.bike-latch-listing-shell .bl-current-state-image-cell .imgThumbnail {
  max-width: 100%;
  height: auto;
}

@media (max-width: 1100px) {
  .bike-latch-listing-shell .bl-current-state-columns,
  .bike-latch-listing-shell .bl-current-state-columns--details {
    grid-template-columns: 1fr 1fr;
  }

  .bike-latch-listing-shell .bl-current-state-images-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .bike-latch-listing-shell .bl-history-change-grid {
    grid-template-columns: 1fr;
  }

  .bike-latch-listing-shell .bl-current-state-columns,
  .bike-latch-listing-shell .bl-current-state-columns--details,
  .bike-latch-listing-shell .bl-current-state-images-grid {
    grid-template-columns: 1fr;
  }
}
