/* --- Root Variables - Adapted from cwa-styles.css --- */
:root {
    /* Use theme's glassmorphism variable names for GeneratePress custom CSS priority */
    --cwa-font-family: -apple-system, BlinkMacFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    --cwa-text-color: #1a202c;
    --cwa-text-color-light: #4a5568;
    
    /* Plugin internal card backgrounds, independent but stylistically similar to theme's global glassmorphism */
    --cwa-card-bg: rgba(255, 255, 255, 0.2);
    --cwa-card-border-color: rgba(255, 255, 255, 0.3);
    --cwa-card-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --cwa-card-hover-shadow: 0 10px 40px 0 rgba(31, 38, 135, 0.25);
    --cwa-card-backdrop-blur: 16px; /* Card inner background blur */

    --cwa-input-bg: rgba(255, 255, 255, 0.75);
    --cwa-input-border: rgba(200, 200, 200, 0.4);
    --cwa-input-focus-border-color: #00AFFF;
    --cwa-input-focus-shadow: 0 0 0 3px rgba(0, 175, 255, 0.25);
    --cwa-primary-btn-bg: linear-gradient(90deg, #00AFFF 0%, #A777E8 100%);
    --cwa-primary-btn-hover-filter: saturate(1.1) brightness(1.05);
    --cwa-primary-btn-text-light: white;
    --cwa-secondary-btn-bg: rgba(255, 255, 255, 0.15);
    --cwa-secondary-btn-text-color: var(--cwa-text-color);
    --cwa-secondary-btn-border: var(--cwa-card-border-color);
    --cwa-secondary-btn-hover-bg: rgba(255, 255, 255, 0.25);
    --cwa-link-color: #00AFFF;
    --cwa-icon-color: #007bff;
    --cwa-error-bg: rgba(220, 53, 69, 0.15);
    --cwa-error-text: #b22222;
    --cwa-error-border: rgba(220, 53, 69, 0.3);
    --cwa-border-radius-large: 20px;
    --cwa-border-radius-header: 16px;
    --cwa-border-radius-medium: 10px;
    --cwa-border-radius-small: 8px; /* Standard rounded corners for inputs/buttons */
}

/* Base styles */
body {
    font-family: var(--cwa-font-family);
    /* background-color: #f3f4f6; */ /* Handled by theme background */
    color: var(--cwa-text-color);
}

/* 1. Remove outermost card frame */
.rbct-container { /* New class, replaces main-container-wrapper glassmorphism styles */
    max-width: 1200px; /* Match theme page width */
    margin-left: auto;
    margin-right: auto;
    padding-top: 1.5rem; /* py-6 */
    padding-bottom: 1.5rem; /* py-6 */
    background: transparent !important; /* Remove background */
    backdrop-filter: none !important; /* Remove blur */
    -webkit-backdrop-filter: none !important; /* Remove blur */
    border: none !important; /* Remove border */
    box-shadow: none !important; /* Remove shadow */
    border-radius: 0 !important; /* Remove border-radius */
}
/* Adjust horizontal padding for content inside rbct-container */
.rbct-container > .rbct-title,
.rbct-container > .main-layout,
.rbct-container > #bike-detail-page,
.rbct-container > #comparison-results {
    padding-left: 1rem; /* px-4 */
    padding-right: 1rem; /* px-4 */
}


/* Plugin's title color consistent with main card, but avoids direct use of theme color variables to prevent conflicts */
.rbct-container .rbct-title { 
    color: var(--cwa-text-color);
    text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.1);
}

/* General card/container styles - still applied to inner filter and list cards */
.cwa-card {
    background: var(--cwa-card-bg);
    backdrop-filter: blur(var(--cwa-card-backdrop-blur));
    -webkit-backdrop-filter: blur(var(--cwa-card-backdrop-blur));
    border: 1px solid var(--cwa-card-border-color);
    box-shadow: var(--cwa-card-shadow);
    border-radius: var(--cwa-border-radius-large);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.cwa-card:hover {
    box-shadow: var(--cwa-card-hover-shadow);
    transform: translateY(-3px);
}

/* Layout for filter and list areas */
.rbct-container .main-layout {
    grid-template-columns: 1fr; /* grid-cols-1 */
}
@media (min-width: 768px) {
    .rbct-container .main-layout {
        /* Adjusted sidebar width to be wider, and gap between sidebar and main content */
        grid-template-columns: 320px 1fr; /* md:grid-cols-[320px_1fr] */
        gap: 2rem; /* md:gap-8 */
    }
}

.rbct-container .main-layout > aside,
.rbct-container .main-layout > main {
    background: var(--cwa-card-bg); /* Use card bg for inner sections */
    backdrop-filter: blur(var(--cwa-card-backdrop-blur));
    -webkit-backdrop-filter: blur(var(--cwa-card-backdrop-blur));
    border: 1px solid var(--cwa-card-border-color);
    box-shadow: var(--cwa-card-shadow);
    border-radius: var(--cwa-border-radius-large); /* Consistent large radius */
}
.rbct-container .main-layout > aside h2,
.rbct-container .main-layout > main h2,
#bike-detail-page h2 { /* Section titles */
    font-size: 1.5rem; /* text-2xl */
    font-weight: 500; /* font-medium */
    color: var(--cwa-text-color);
    margin-bottom: 1.5rem; /* mb-6 */
    padding-bottom: 0.75rem; /* pb-3 */
    border-bottom: 1px solid var(--cwa-input-border); /* border-b border-[var(--cwa-input-border)] */
    text-align: left;
}

/* Table styles */
.comparison-table th, .comparison-table td,
.detail-table th, .detail-table td {
    padding: 12px 16px; /* py-3 px-4 */
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2); /* border-b border-white/20 */
    color: var(--cwa-text-color);
}
.comparison-table th, .detail-table th {
    background-color: rgba(255, 255, 255, 0.1); /* bg-white/10 */
    font-weight: 600; /* font-semibold */
    color: var(--cwa-text-color);
}
.comparison-table tbody tr:hover,
.detail-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05); /* hover:bg-white/5 */
}
.section-header { /* For table internal headers */
    background-color: rgba(0, 175, 255, 0.1); /* bg-[var(--cwa-link-color)]/10 */
    color: var(--cwa-link-color); /* text-[var(--cwa-link-color)] */
    font-weight: bold; /* font-bold */
}
/* Style for sub-headers within the comparison table for specifications */
.spec-category-header {
    background-color: rgba(255, 255, 255, 0.05); /* bg-white/5 */
    color: var(--cwa-text-color); /* text-[var(--cwa-text-color)] */
    font-weight: 600; /* font-semibold */
}


/* Form elements - apply CWA input styles */
/* Enforce rounded corners for all inputs and selects */
select, input[type="text"], input[type="number"], .cwa-input {
    width: 100%; /* w-full */
    background-color: var(--cwa-input-bg);
    color: var(--cwa-text-color);
    border: 1px solid var(--cwa-input-border);
    border-radius: var(--cwa-border-radius-small); /* rounded-[var(--cwa-border-radius-small)] */
    padding: 12px 15px; /* py-3 px-4 */
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    min-height: 48px; /* min-h-12 */
    line-height: 1.5; /* leading-normal */
    font-size: 1em; /* text-base */
    box-sizing: border-box; /* box-border */
}
/* Ensure type=range inputs don't get the padding/min-height */
input[type="range"] {
    padding: 0; /* Override padding */
    min-height: auto; /* Override min-height */
    border-radius: 0; /* No rounded corners for slider track */
    border: none; /* No border for slider track */
}

/* Specific rounded corners for number inputs in Stack/Reach */
/* These inputs already have cwa-input class, but adding a specific rule for clarity and safety */
#stack-min, #stack-max, #reach-min, #reach-max {
    border-radius: var(--cwa-border-radius-small);
}

select:focus, input[type="text"]:focus, input[type="number"]:focus, .cwa-input:focus {
    outline: none;
    border-color: var(--cwa-input-focus-border-color);
    box-shadow: var(--cwa-input-focus-shadow);
    background-color: rgba(255, 255, 255, 0.98);
}
/* Specific select arrow */
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23495057%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 10px 10px;
    padding-right: 40px;
}
/* Adjusted padding for brand search input to fix overlap */
#brand-search {
    padding-left: 2.5rem; /* pl-10 */
}
input::placeholder {
    color: var(--cwa-text-color);
    opacity: 0.5;
}

/* Buttons - apply CWA button styles */
.cwa-button {
    padding: 10px 18px; /* py-[10px] px-[18px] */
    border-radius: var(--cwa-border-radius-small); /* rounded-[var(--cwa-border-radius-small)] */
    font-weight: 500; /* font-medium */
    transition: all 0.2s ease; /* transition-all duration-200 ease-in-out */
    cursor: pointer; /* cursor-pointer */
    display: inline-flex; /* inline-flex */
    align-items: center; /* items-center */
    justify-content: center; /* justify-center */
    border: none; /* border-none */
    line-height: 1.5; /* leading-normal */
    box-sizing: border-box; /* box-border */
    text-decoration: none; /* no-underline */
    white-space: nowrap; /* whitespace-nowrap */
}
.cwa-button:hover {
    transform: translateY(-2px); /* hover:-translate-y-[2px] */
}
.cwa-button:active {
    transform: translateY(0px); /* active:translate-y-0 */
    filter: brightness(0.95); /* active:brightness-95 */
}

/* Primary Button */
.cwa-button-primary { /* Applied to start-compare-button */
    background: var(--cwa-primary-btn-bg);
    color: var(--cwa-primary-btn-text-light);
    padding: 14px 28px; /* py-[14px] px-[28px] */
    box-shadow: 0 5px 15px 0 rgba(0, 118, 255, 0.3);
    font-size: 1em; /* text-base */
}
.cwa-button-primary:hover {
    filter: var(--cwa-primary-btn-hover-filter);
    box-shadow: 0 7px 18px 0 rgba(0, 118, 255, 0.35);
}
.cwa-button-primary:disabled {
    background: #adb5bd;
    filter: none;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.65;
    transform: translateY(0);
}

/* Secondary Buttons */
.cwa-button-secondary { /* Applied to clear-compare-list button and add-to-compare */
    background-color: var(--cwa-secondary-btn-bg);
    color: var(--cwa-secondary-btn-text-color);
    border: 1px solid var(--cwa-secondary-btn-border);
    padding: 10px 18px;
}
.cwa-button-secondary:hover {
    background-color: var(--cwa-secondary-btn-hover-bg);
}
/* Specific adjustment for the plus button on cards */
.add-to-compare-button {
    background-color: var(--cwa-link-color); /* bg-[var(--cwa-link-color)] */
    color: var(--cwa-primary-btn-text-light);
    border: none; /* border-none */
    border-radius: 50%; /* rounded-full */
    width: 32px; /* w-8 */
    height: 32px; /* h-8 */
    font-size: 1rem; /* text-base */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: transform 0.2s ease, background-color 0.2s ease;
}
.add-to-compare-button:hover {
    background-color: var(--cwa-input-focus-border-color); /* bg-[var(--cwa-input-focus-border-color)] */
    transform: scale(1.1);
}
.add-to-compare-button:disabled {
    background-color: #adb5bd;
    cursor: not-allowed;
    opacity: 0.65;
    transform: none;
    box-shadow: none;
}
/* Ensure the plus icon is not stretched */
.add-to-compare-button i {
    line-height: 1; /* leading-none */
    display: inline-block; /* inline-block */
    vertical-align: middle; /* align-middle */
}


/* Message box styling */
#custom-message-box > div { /* Target the inner div of message box */
    background: var(--cwa-card-bg);
    backdrop-filter: blur(var(--cwa-card-backdrop-blur));
    -webkit-backdrop-filter: blur(var(--cwa-card-backdrop-blur));
    border: 1px solid var(--cwa-card-border-color);
    box-shadow: var(--cwa-card-shadow);
    border-radius: var(--cwa-border-radius-large);
    color: var(--cwa-text-color);
}
#custom-message-box #close-message-box {
    background: var(--cwa-primary-btn-bg);
    color: var(--cwa-primary-btn-text-light);
    padding: 0.5rem 1rem; /* py-2 px-4 */
    border-radius: var(--cwa-border-radius-small); /* rounded-[var(--cwa-border-radius-small)] */
    box-shadow: 0 2px 5px rgba(0, 118, 255, 0.3);
}
#custom-message-box #close-message-box:hover {
    filter: var(--cwa-primary-btn-hover-filter);
}


/* Price Range Slider Custom Styles - Adapted to image */
.range-slider-container {
    background-color: rgba(255, 255, 255, 0.1); /* bg-white/10 */
    border-radius: var(--cwa-border-radius-medium); /* rounded-[var(--cwa-border-radius-medium)] */
    border: 1px solid var(--cwa-card-border-color);
    padding: 15px; /* p-[15px] */
    position: relative; /* relative */
}
.price-bars, .weight-bars { /* Apply to both price and weight bars */
    display: flex; /* flex */
    justify-content: space-between; /* justify-between */
    height: 40px; /* h-10 */
    gap: 2px; /* gap-0.5 */
    margin-bottom: 20px; /* mb-5 */
    align-items: flex-end; /* items-end */
}
.price-bar, .weight-bar { /* Apply to both price and weight bars */
    background-color: #e0e0e0; /* bg-[#e0e0e0] */
    width: 100%; /* w-full */
    flex-grow: 1; /* flex-grow */
    border-radius: 2px; /* rounded-[2px] */
}

/* Ensure parent has relative positioning and defined height to contain absolute children */
.price-slider, .weight-slider {
    position: relative; /* relative */
    width: 100%; /* w-full */
    margin-bottom: 10px; /* mb-2.5 */
    height: 20px; /* h-5 */
}

/* Track and Range: visually centered within the 20px height parent */
.price-slider .slider-track, .weight-slider .slider-track {
    position: absolute; /* absolute */
    width: 100%; /* w-full */
    height: 4px; /* h-1 */
    background-color: #e0e0e0; /* bg-[#e0e0e0] */
    border-radius: 5px; /* rounded-md */
    top: 50%; /* top-1/2 */
    transform: translateY(-50%); /* -translate-y-1/2 */
    z-index: 1; /* z-10 */
}
.price-slider .slider-range, .weight-slider .slider-range {
    position: absolute; /* absolute */
    height: 4px; /* h-1 */
    background-color: var(--cwa-link-color); /* bg-[var(--cwa-link-color)] */
    border-radius: 5px; /* rounded-md */
    top: 50%; /* top-1/2 */
    transform: translateY(-50%); /* -translate-y-1/2 */
    z-index: 2; /* z-20 */
}

/* Range Inputs: Absolutely positioned to cover the entire interactive area */
.price-slider input[type="range"],
.weight-slider input[type="range"] {
    -webkit-appearance: none; /* Remove default styling */
    -moz-appearance: none;
    appearance: none;
    position: absolute; /* absolute */
    top: 0; /* top-0 */
    left: 0; /* left-0 */
    width: 100%; /* w-full */
    height: 100%; /* h-full */
    background: transparent; /* bg-transparent */
    border: none; /* border-none */
    cursor: pointer; /* cursor-pointer */
    margin: 0; /* m-0 */
    padding: 0; /* p-0 */
}

/* Thumb styles: Centered correctly within the transparent input's bounds */
.price-slider input[type="range"]::-webkit-slider-thumb, .weight-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px; /* w-5 */
    height: 20px; /* h-5 */
    background: white; /* bg-white */
    border: 2px solid var(--cwa-link-color); /* border-2 border-[var(--cwa-link-color)] */
    border-radius: 50%; /* rounded-full */
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    /* Reverted margin-top to 0px */
    margin-top: 0px; 
    /* Removed z-index from pseudo-element */
}
.price-slider input[type="range"]::-moz-range-thumb, .weight-slider input[type="range"]::-moz-range-thumb {
    width: 20px; /* w-5 */
    height: 20px; /* h-5 */
    background: white; /* bg-white */
    border: 2px solid var(--cwa-link-color); /* border-2 border-[var(--cwa-link-color)] */
    border-radius: 50%; /* rounded-full */
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    /* Reverted margin-top to 0px */
    margin-top: 0px; 
    /* Removed z-index from pseudo-element */
}


/* ==================================================
   Dual-Range Slider — Thumb-Only Pointer Events
   ================================================== */

/* 禁掉整个滑块的事件捕获，只留 thumb 本身可点 */
.price-slider input[type=range],
.weight-slider input[type=range] {
  pointer-events: none;    /* 轨道吃不到事件 */
}

/* 仅让拇指（thumb）可点 */
.price-slider input[type=range]::-webkit-slider-thumb,
.weight-slider input[type=range]::-webkit-slider-thumb {
  pointer-events: auto;
}

.price-slider input[type=range]::-moz-range-thumb,
.weight-slider input[type=range]::-moz-range-thumb {
  pointer-events: auto;
}

/* ==================================================
   Dual-Range Slider — 平级 z-index + Active 提权
   ================================================== */

/* 1) 先删除或注释掉以下旧规则： */
// #price-min-slider { z-index: 7; }
// #price-max-slider { z-index: 6; }
// .price-slider input[type=range] { pointer-events: none; }
// price-slider::-webkit-slider-thumb { pointer-events: auto; }
// … 以及所有 weight-slider 那组

/* 2) 然后添加这一组新规则： */
/* ———— 基础：两个滑块同层级 ———— */
.price-slider  input[type=range],
.weight-slider input[type=range] {
  position: absolute;  /* 你已有 */
  inset: 0;            /* 你已有 */
  z-index: 3;          /* 确保滑块在滑条之上 (z-index: 2) */
}

/* ———— 拖动（:active）或聚焦（:focus）时，当前滑块提到最顶 ———— */
.price-slider  input[type=range]:active,
.price-slider  input[type=range]:focus,
.weight-slider input[type=range]:active,
.weight-slider input[type=range]:focus {
  z-index: 4 !important;  /* 当前操作的滑块在最上面 */
}


.price-range-inputs { /* Renamed to .slider-value-display and applied to weight as well */
    display: flex; /* flex */
    justify-content: space-between; /* justify-between */
    align-items: center; /* items-center */
    width: 100%; /* w-full */
    font-weight: bold; /* font-bold */
    color: var(--cwa-text-color);
    font-size: 0.9em; /* text-[0.9em] */
    position: static;
    bottom: auto;
    left: auto;
}

/* Price tooltip specific styles */
.cwa-card .relative #price-tooltip-trigger { /* Increased specificity */
    position: absolute; /* absolute */
    top: 0.8rem; /* top-[0.8rem] */
    right: 0.8rem; /* right-[0.8rem] */
    cursor: help; /* cursor-help */
    font-size: 0.8em; /* text-[0.8em] */
}

#price-tooltip-content {
    position: absolute; /* absolute */
    background-color: var(--cwa-card-bg); /* bg-[var(--cwa-card-bg)] */
    backdrop-filter: blur(var(--cwa-card-backdrop-blur));
    -webkit-backdrop-filter: blur(var(--cwa-card-backdrop-blur));
    border: 1px solid var(--cwa-card-border-color);
    box-shadow: var(--cwa-card-shadow);
    border-radius: var(--cwa-border-radius-medium); /* rounded-[var(--cwa-border-radius-medium)] */
    padding: 10px; /* p-2.5 */
    width: 250px; /* w-[250px] */
    top: 30px; /* top-[30px] */
    right: 0; /* right-0 */
    z-index: 50; /* z-50 */
    color: var(--cwa-text-color);
    text-align: left; /* text-left */
    line-height: 1.4; /* leading-tight */
}
/* Optional: Add a subtle arrow to the tooltip */
#price-tooltip-content::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--cwa-card-border-color); /* border-b-[8px] border-b-[var(--cwa-card-border-color)] */
    top: -8px; /* -top-2 */
    right: 15px; /* right-[15px] */
}
#price-tooltip-content::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 7px solid var(--cwa-card-bg); /* border-b-[7px] border-b-[var(--cwa-card-bg)] */
    top: -7px; /* -top-[7px] */
    right: 16px; /* right-[16px] */
}



/* Brand Search & Usage Type Checkbox List */
.brand-list-container, .usage-type-list-container {
    border: 1px solid var(--cwa-card-border-color);
    background-color: rgba(255, 255, 255, 0.1); /* bg-white/10 */
    border-radius: var(--cwa-border-radius-medium); /* rounded-[var(--cwa-border-radius-medium)] */
    max-height: 200px; /* max-h-[200px] */
    overflow-y: auto; /* overflow-y-auto */
}
.brand-list-item, .usage-type-list-item {
    color: var(--cwa-text-color);
}
.brand-list-item:hover, .usage-type-list-item:hover {
    background-color: rgba(255, 255, 255, 0.05); /* hover:bg-white/5 */
}
.brand-list-item input[type="checkbox"], .usage-type-list-item input[type="checkbox"] {
    border-color: var(--cwa-input-border); /* border-[var(--cwa-input-border)] */
    accent-color: var(--cwa-link-color); /* accent-[var(--cwa-link-color)] */
    border-radius: var(--cwa-border-radius-small); /* rounded-[var(--cwa-border-radius-small)] */
}
/* Style for the search icon in the input field */
.relative input + .fas.fa-search {
    color: var(--cwa-text-color-light); /* text-[var(--cwa-text-color-light)] */
}

/* Option Bike card image position changed to left */
#all-bikes-list .cwa-card {
    display: flex; /* flex */
    flex-direction: row; /* flex-row */
    align-items: center; /* items-center */
    text-align: left; /* text-left */
    padding: 1rem; /* p-4 */
}

#all-bikes-list .bike-card-image {
    width: 120px; /* w-[120px] */
    height: 100px; /* h-[100px] */
    flex-shrink: 0; /* flex-shrink-0 */
    object-fit: contain; /* object-contain */
    margin-right: 1rem; /* mr-4 */
    margin-bottom: 0; /* mb-0 */
    border-radius: 8px; /* rounded-lg */
}

#all-bikes-list .bike-card-info { /* New div to wrap text information */
    flex-grow: 1; /* flex-grow */
    min-width: 0; /* min-w-0 */
    overflow-wrap: break-word; /* break-words */
    word-break: break-word; /* break-words */
}

#all-bikes-list .add-to-compare-button {
    position: static; /* static */
    margin-left: auto; /* ml-auto */
    align-self: center; /* self-center */
    flex-shrink: 0; /* flex-shrink-0 */
    width: 32px; /* w-8 */
    height: 32px; /* h-8 */
    border-radius: 50%; /* rounded-full */
}

#all-bikes-list .add-to-compare-button:hover {
    background-color: var(--cwa-input-focus-border-color); /* bg-[var(--cwa-input-focus-border-color)] */
    transform: scale(1.1);
}
#all-bikes-list .add-to-compare-button:disabled {
    background-color: #adb5bd;
    cursor: not-allowed;
    opacity: 0.65;
    transform: none;
    box-shadow: none;
}
/* Ensure the plus icon is not stretched */
.add-to-compare-button i {
    line-height: 1; /* leading-none */
    display: inline-block; /* inline-block */
    vertical-align: middle; /* align-middle */
}


/* Comparison bar behavior - always fixed at bottom, full width */
.bottom-compare-bar {
    position: fixed; /* fixed */
    bottom: 0; /* bottom-0 */
    left: 0; /* left-0 */
    right: 0; /* right-0 */
    width: 100vw; /* w-screen */
    z-index: 40; /* z-40 */
    background: var(--cwa-card-bg);
    backdrop-filter: blur(var(--cwa-card-backdrop-blur));
    -webkit-backdrop-filter: blur(var(--cwa-card-backdrop-blur));
    border-top: 1px solid var(--cwa-card-border-color); /* border-t border-[var(--cwa-card-border-color)] */
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
    padding-top: 1rem; /* py-4 */
    padding-bottom: 1rem; /* py-4 */
    border-radius: var(--cwa-border-radius-large) var(--cwa-border-radius-large) 0 0; /* rounded-t-[var(--cwa-border-radius-large)] */
    display: flex; /* flex */
    align-items: center; /* items-center */
    justify-content: center; /* justify-center */
    transition: all 0.3s ease-in-out; /* transition-all duration-300 ease-in-out */
    transform: translateY(0); /* translate-y-0 */
}

/* Inner content area of the bottom comparison bar */
.bottom-compare-bar > div { /* Target the inner div with max-w-[1200px] */
    padding-left: 1rem; /* px-4 */
    padding-right: 1rem; /* px-4 */
}

/* Inner elements of the bottom comparison bar */
.bottom-compare-bar #selected-bikes-preview .relative {
    background-color: rgba(255, 255, 255, 0.1); /* bg-white/10 */
    border: 1px solid var(--cwa-card-border-color);
    border-radius: var(--cwa-border-radius-small); /* rounded-[var(--cwa-border-radius-small)] */
    color: var(--cwa-text-color);
    box-shadow: none; /* shadow-none */
}
.bottom-compare-bar .remove-from-compare {
    background-color: var(--cwa-error-text); /* bg-[var(--cwa-error-text)] */
    color: var(--cwa-primary-btn-text-light);
    border: none; /* border-none */
}
.bottom-compare-bar .remove-from-compare:hover {
    background-color: #c0392b; /* hover:bg-[#c0392b] */
}
.bottom-compare-bar #clear-compare-list {
    background-color: var(--cwa-secondary-btn-bg);
    color: var(--cwa-secondary-btn-text-color);
    border: 1px solid var(--cwa-secondary-btn-border);
    padding: 0.5rem 1rem; /* py-2 px-4 */
}
.bottom-compare-bar #clear-compare-list:hover {
    background-color: var(--cwa-secondary-btn-hover-bg);
}
.bottom-compare-bar #start-compare-button {
    background: var(--cwa-primary-btn-bg);
    color: var(--cwa-primary-btn-text-light);
    padding: 0.5rem 1rem; /* py-2 px-4 */
    box-shadow: 0 3px 8px rgba(0, 118, 255, 0.2);
}
.bottom-compare-bar #start-compare-button:hover {
    filter: var(--cwa-primary-btn-hover-filter);
}

/* Size and corresponding height item styles */
.height-range-item {
    display: flex; /* flex */
    align-items: center; /* items-center */
    margin-bottom: 0.5rem; /* mb-2 */
    font-size: 0.95em; /* text-[0.95em] */
    color: var(--cwa-text-color);
}

.height-range-item .size-label {
    font-weight: 600; /* font-semibold */
    width: 40px; /* w-10 */
    flex-shrink: 0; /* flex-shrink-0 */
    margin-right: 1rem; /* mr-4 */
}

.height-range-bar-container {
    flex-grow: 1; /* flex-grow */
    height: 16px; /* h-4 */
    background-color: #e0e0e0; /* bg-[#e0e0e0] */
    border-radius: 8px; /* rounded-lg */
    overflow: hidden; /* overflow-hidden */
    position: relative; /* relative */
}

.height-range-bar {
    height: 100%; /* h-full */
    background: linear-gradient(90deg, #6a82fb 0%, #fc5c7d 100%); /* Custom gradient, keep */
    border-radius: 8px; /* rounded-lg */
    position: absolute; /* absolute */
    left: 0; /* left-0 */
    top: 0; /* top-0 */
    display: flex; /* flex */
    align-items: center; /* items-center */
    justify-content: center; /* justify-content */
    color: white; /* text-white */
    font-size: 0.8em; /* text-[0.8em] */
    font-weight: bold; /* font-bold */
    min-width: 20px; /* min-w-[20px] */
}

/* Reference image placeholder */
.cwa-card-image-placeholder {
    background-color: rgba(0,0,0,0.05); /* bg-black/5 */
    display: flex; /* flex */
    align-items: center; /* items-center */
    justify-content: center; /* justify-center */
    color: #a0aec0; /* text-[#a0aec0] */
    font-size: 0.9em; /* text-[0.9em] */
    border: 1px dashed rgba(0,0,0,0.1); /* border border-dashed border-black/10 */
    min-height: 100px; /* min-h-[100px] */
}


/* Responsive Adjustments (for screens <= 768px) */
@media (max-width: 768px) {
    .rbct-container {
        padding: 1rem; /* p-4 */
    }
    .rbct-container .main-layout > aside,
    .rbct-container .main-layout > main {
        padding: 1rem; /* p-4 */
    }
    .rbct-container .rbct-title {
        font-size: 1.8rem; /* text-[1.8rem] */
    }
    .rbct-container .main-layout > aside h2,
    .rbct-container .main-layout > main h2,
    #bike-detail-page h2 {
        font-size: 1.3em; /* text-[1.3em] */
        margin-bottom: 1rem; /* mb-4 */
        padding-bottom: 0.5rem; /* pb-2 */
    }
    select, input[type="text"], input[type="number"] {
        padding: 10px 12px; /* py-2.5 px-3 */
        min-height: 40px; /* min-h-10 */
    }
    .range-slider-container {
        height: auto; /* h-auto */
        padding: 10px; /* p-2.5 */
    }
    .price-slider, .weight-slider {
        margin-bottom: 5px; /* mb-1 */
    }
    .price-slider input[type="range"], .weight-slider input[type="range"] {
        top: 0; /* top-0 */
        margin-top: 0; /* mt-0 */
    }

    .add-to-compare-button {
        width: 28px; /* w-7 */
        height: 28px; /* h-7 */
    }
    .bottom-compare-bar {
        padding-top: 0.75rem; /* py-3 */
        padding-bottom: 0.75rem; /* py-3 */
        border-radius: var(--cwa-border-radius-large) var(--cwa-border-radius-large) 0 0; /* rounded-t-[var(--cwa-border-radius-large)] */
    }
    .bottom-compare-bar > div {
        width: 100%; /* w-full */
        justify-content: center; /* justify-center */
        padding-left: 1rem; /* px-4 */
        padding-right: 1rem; /* px-4 */
    }
    .bottom-compare-bar .flex.gap-4 { /* Target the buttons container directly for mobile alignment */
        justify-content: center !important; /* !justify-center */
    }

    /* Mobile option bike card image adjustments */
    #all-bikes-list .cwa-card {
        flex-direction: column; /* flex-col */
        text-align: center; /* text-center */
    }

    #all-bikes-list .bike-card-image {
        width: 100%; /* w-full */
        height: 120px; /* h-[120px] */
        margin-right: 0; /* mr-0 */
        margin-bottom: 0.75rem; /* mb-3 */
    }

    #all-bikes-list .add-to-compare-button {
        position: absolute; /* absolute */
        top: 0.5rem; /* top-2 */
        right: 0.5rem; /* right-2 */
        margin-left: 0; /* ml-0 */
        width: 28px; /* w-7 */
        height: 28px; /* h-7 */
        border-radius: 50%; /* rounded-full */
        flex-shrink: unset; /* flex-shrink-0 (undoing previous override) */
    }
    /* Style for image in comparison table header */
    .comparison-bike-image {
        width: 60px; /* w-[60px] */
        height: 40px; /* h-10 */
        margin-bottom: 0.5rem; /* mb-2 */
    }
}

/* Adjust font sizes for sidebar labels */
/* Keep labels visible and distinct */
.sidebar-label {
    font-size: 0.9em; /* text-[0.9em] */
    font-weight: bold; /* font-bold */
    color: var(--cwa-text-color);
}

/* Adjust general input and select font size in sidebar */
/* Make input/select text slightly smaller than labels to avoid overwhelming */
aside .cwa-input {
    font-size: 0.85em; /* text-[0.85em] */
    padding: 8px 12px; /* py-2 px-3 */
    min-height: 38px; /* min-h-[38px] */
}

/* Adjust font size for checkboxes labels in lists */
/* Ensure checkbox text is readable but not too large */
.brand-list-item span, .usage-type-list-item span {
    font-size: 0.85em; /* text-[0.85em] */
}
/* Ensure the parent category labels remain distinct, match sidebar-label size */
.usage-type-list-item.font-semibold {
    font-size: 0.9em; /* text-[0.9em] */
}


/* Center content in comparison table cells */
.comparison-table td, .comparison-table th { /* Apply to both td and th for comprehensive centering */
    text-align: center; /* text-center */
}

/* New styles for Bike Detail Page Image (Square) */
#detail-bike-image {
    width: 100%; /* 确保宽度填充父容器 */
    height: 250px; /* 设置一个固定的高度，例如250px */
    object-fit: contain; /* 确保图片完整显示在容器内，不会被裁剪 */
    border-radius: var(--cwa-border-radius-medium);
    background-color: rgba(0,0,0,0.05); /* 添加背景色，以防图片有透明部分 */
    display: block; /* 确保是块级元素 */
}


/* New styles for Star Rating */
.star-rating-container {
    display: flex; /* flex */
    align-items: center; /* items-center */
    font-size: 1.5rem; /* text-2xl */
    color: #ccc; /* text-[#ccc] */
    cursor: pointer; /* cursor-pointer */
}

.star-rating-container .star {
    position: relative; /* relative */
    color: #ccc; /* text-[#ccc] */
    transition: color 0.2s ease, transform 0.1s ease;
}

.star-rating-container .star.filled {
    color: #ffc107; /* text-[#ffc107] */
}

.star-rating-container .star.half-filled {
    position: relative; /* relative */
    color: #ffc107; /* text-[#ffc107] */
    overflow: hidden; /* overflow-hidden */
}

.star-rating-container .star.half-filled::after {
    content: '\2605'; /* Unicode star character, can be Font Awesome if desired */
    position: absolute; /* absolute */
    left: 0; /* left-0 */
    top: 0; /* top-0 */
    width: 50%; /* w-1/2 */
    overflow: hidden; /* overflow-hidden */
    color: #ffc107; /* text-[#ffc107] */
}

/* Base Font Awesome star style */
.star-rating-container .fas.fa-star {
    color: inherit; /* inherit */
    text-shadow: 0 1px 1px rgba(0,0,0,0.1); /* text-shadow custom */
}
/* Half-star using Font Awesome */
.star-rating-container .star.half-filled .fa-star::before {
    content: '\f089'; /* Font Awesome half-star icon if available, otherwise use custom overlay or another approach */
}

/* Interactive hover effects */
.star-rating-container.interactive .star:hover,
.star-rating-container.interactive .star:hover ~ .star {
    color: #ffda6a; /* text-[#ffda6a] */
}
.star-rating-container.interactive .star:hover,
.star-rating-container.interactive .star.hovered {
    color: #ffc107; /* text-[#ffc107] */
}

/* Specific styling for the half star when using a single character/icon */
.star-rating-container .star.half-filled {
    color: #ffc107; /* text-[#ffc107] */
}
/* This custom class will be applied by JS to visually represent half-filled state */
.star-rating-container .star-icon.half-filled-overlay {
    position: relative; /* relative */
    display: inline-block; /* inline-block */
    vertical-align: top; /* align-top */
    line-height: 1; /* leading-none */
}
.star-rating-container .star-icon.half-filled-overlay::after {
    content: '\f089'; /* Example: Font Awesome half star, if exists */
    font-family: "Font Awesome 5 Free"; /* font-['Font_Awesome_5_Free'] */
    font-weight: 900; /* font-black */
    position: absolute; /* absolute */
    left: 0; /* left-0 */
    top: 0; /* top-0 */
    width: 50%; /* w-1/2 */
    overflow: hidden; /* overflow-hidden */
    color: #ffc107; /* text-[#ffc107] */
}

/* Ensure Font Awesome icons use the correct font-family */
.star-rating-container .fas {
    font-family: "Font Awesome 6 Free";
    font-weight: 900; /* font-black */
}
