.ebike-finder {
    --ebike-text: #111827;
    --ebike-muted: #6b7280;
    --ebike-border: #e5e7eb;
    --ebike-soft: #f3f4f6;
    --ebike-pill: #f4f4f5;
    --ebike-exact: #ab2328;
    --ebike-adjacent: #6b7280;
    --ebike-radius: 22px;
    max-width: 1120px;
    margin: 0 auto;
    color: var(--ebike-text);
    font-family: inherit;
}

.ebike-finder *,
.ebike-finder *::before,
.ebike-finder *::after {
    box-sizing: border-box;
}

.ebike-finder-header {
    margin-bottom: 22px;
}

.ebike-finder-title {
    margin: 0 0 8px 0 !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    color: var(--ebike-text) !important;
    letter-spacing: -0.02em;
}

.ebike-finder-meta {
    margin: 0 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: var(--ebike-muted) !important;
}

.ebike-finder-card {
    background: #fff;
    border: 1px solid var(--ebike-border);
    border-radius: var(--ebike-radius);
    padding: 28px 32px;
}

.ebike-finder-question + .ebike-finder-question {
    margin-top: 26px;
    padding-top: 26px;
    border-top: 1px solid #f3f4f6;
}

.ebike-finder-qhead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.ebike-finder-qhead h4 {
    margin: 0 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #4b5563 !important;
    line-height: 1.4 !important;
}

.ebike-reset-btn {
    flex-shrink: 0;
    appearance: none;
    background: #fff !important;
    border: 1px solid var(--ebike-border) !important;
    border-radius: 8px !important;
    color: #4b5563 !important;
    cursor: pointer;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    padding: 6px 10px !important;
    box-shadow: none !important;
    text-transform: none !important;
}

.ebike-reset-btn:hover,
.ebike-reset-btn:focus {
    background: #f3f4f6 !important;
    border-color: #d1d5db !important;
    color: var(--ebike-text) !important;
    outline: none !important;
    box-shadow: none !important;
}

.ebike-finder-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ebike-option-btn {
    appearance: none;
    background: var(--ebike-pill) !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 999px !important;
    color: #374151 !important;
    cursor: pointer;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    padding: 8px 16px !important;
    box-shadow: none !important;
    text-transform: none !important;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ebike-option-btn:hover {
    background: var(--ebike-exact) !important;
    border-color: var(--ebike-exact) !important;
    color: #fff !important;
}

.ebike-option-btn:focus,
.ebike-option-btn:active {
    outline: none !important;
    box-shadow: none !important;
}

.ebike-option-btn.selected,
.ebike-option-btn.selected:hover,
.ebike-option-btn.selected:focus,
.ebike-option-btn.selected:active {
    background: #18181b !important;
    border-color: #18181b !important;
    color: #fff !important;
}

.ebike-finder-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    margin: 18px 4px;
    font-size: 13px;
    color: #4b5563;
}

.ebike-finder-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ebike-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ebike-dot--exact {
    background: var(--ebike-exact);
}

.ebike-dot--adjacent {
    background: var(--ebike-adjacent);
}

.ebike-finder-results-card {
    padding: 0;
    overflow: hidden;
}

.ebike-finder-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.ebike-finder-table,
.ebike-finder-table tbody,
.ebike-finder-table thead,
.ebike-finder-table tr,
.ebike-finder-table th,
.ebike-finder-table td {
    border: none !important;
    background: transparent !important;
    outline: none !important;
}

.ebike-finder-table {
    width: 100%;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    margin: 0 !important;
    background: #fff !important;
}

.ebike-finder-table th,
.ebike-finder-table td {
    text-align: left !important;
    vertical-align: middle !important;
    padding: 16px 20px !important;
    border: none !important;
}

.ebike-finder-table thead th {
    background: #fff !important;
    color: var(--ebike-text) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-bottom: 2px solid var(--ebike-border);
    white-space: nowrap;
}

.ebike-finder-table tbody tr + tr td {
    border-top: 1px solid #f3f4f6;
}

.ebike-bikes-row td {
    border-top: none !important;
    padding-top: 24px !important;
    padding-bottom: 32px !important;
}

.ebike-path-count {
    font-size: 13px !important;
    color: var(--ebike-muted) !important;
    text-align: right !important;
}
.ebike-path-count strong {
    color: var(--ebike-exact);
    font-size: 15px;
}

.ebike-path-row td {
    background-color: var(--ebike-soft) !important;
    border-top: 4px solid #fff !important; /* Thick white border to separate from previous products */
    border-bottom: 1px solid var(--ebike-border) !important;
}

.ebike-finder-table tbody tr:first-child td {
    border-top: none !important;
}

.ebike-finder-table tbody td {
    font-size: 14px;
    color: var(--ebike-text);
}

.ebike-finder-empty-row td {
    text-align: center !important;
    padding: 56px 24px !important;
}

.ebike-finder-empty {
    margin: 0 !important;
    color: var(--ebike-muted) !important;
    font-size: 15px !important;
}

.ebike-path-val {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    line-height: 1.35;
}

.ebike-path-val.is-open {
    color: #9ca3af;
}

.ebike-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    width: 100%;
}

.ebike-product-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--ebike-border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    text-decoration: none !important;
}

.ebike-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.ebike-product-card-image {
    display: block;
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f9fafb;
    position: relative;
    border-bottom: 1px solid var(--ebike-border);
}

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

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

.ebike-product-card-no-image {
    width: 100%;
    height: 100%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ebike-product-card-no-image::after {
    content: "No Image";
    color: #9ca3af;
    font-size: 12px;
}

.ebike-product-card-content {
    display: flex;
    flex-direction: column;
    padding: 16px;
    flex-grow: 1;
    background: #f9fafb;
}

.ebike-product-card-title {
    margin: 0 0 12px 0 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
}

.ebike-product-card-title a {
    color: var(--ebike-exact) !important;
    text-decoration: none !important;
}

.ebike-product-card-title a:hover {
    color: #8e1c20 !important;
}

.ebike-product-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--ebike-exact);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ebike-product-card-bottom {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    margin-top: auto;
    gap: 12px;
}

.ebike-product-card-price {
    display: flex;
    flex-direction: column;
    margin: 0;
}

.ebike-product-card-price del {
    font-size: 13px;
    color: #9ca3af;
    text-decoration: line-through;
    opacity: 0.8;
}

.ebike-product-card-price ins {
    text-decoration: none;
}

.ebike-product-card-price .amount,
.ebike-product-card-price > span {
    font-size: 16px;
    font-weight: 700;
    color: var(--ebike-exact);
}

.ebike-product-card-price del .amount {
    font-size: 13px;
    font-weight: normal;
    color: #9ca3af;
}

.ebike-product-card-button {
    display: inline-block;
    text-align: center;
    background: var(--ebike-exact) !important;
    color: #fff !important;
    text-decoration: none !important;
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
    line-height: 1.2;
}

.ebike-product-card-button:hover {
    background: #8e1c20 !important;
    color: #fff !important;
}

@keyframes ebikeShimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.ebike-shimmer {
    animation: ebikeShimmer 2s infinite linear;
    background: linear-gradient(to right, #f6f7f8 4%, #edeef1 25%, #f6f7f8 36%);
    background-size: 1000px 100%;
}

.ebike-skeleton-group { margin-bottom: 24px; }
.ebike-skeleton-title { height: 16px; width: 120px; border-radius: 4px; margin-bottom: 16px; }
.ebike-skeleton-pill { height: 36px; width: 100px; border-radius: 18px; display: inline-block; margin-right: 8px; }

.ebike-spinner {
    border: 3px solid #eee;
    border-top: 3px solid var(--ebike-exact);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    animation: ebike-spin 0.8s linear infinite;
    margin: 12px auto;
}

@keyframes ebike-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .ebike-finder-title {
        font-size: 22px !important;
    }

    .ebike-finder-card {
        padding: 20px 16px;
        border-radius: 18px;
    }

    .ebike-finder-qhead {
        align-items: flex-start;
    }

    .ebike-finder-table th,
    .ebike-finder-table td {
        padding: 12px 14px;
    }
}
