/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', Arial, sans-serif;
}

/* Disable internal scrolling - force parent page scrolling only */
html, body {
    overflow: hidden !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Make container fit without internal scrolling */
.container {
    height: 100% !important;
    overflow: hidden !important;
}

/* Pagination button styling */
#prev-page, 
#next-page {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    background-color: rgba(0,0,0,0.1) !important;
    border-radius: 4px !important;
    border: none !important;
    font-size: 18px !important;
    cursor: pointer !important;
    margin: 0 4px !important;
    color: #333 !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

#prev-page:hover, 
#next-page:hover {
    background-color: rgba(0,0,0,0.2) !important;
}

#prev-page:disabled, 
#next-page:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

body {
    background-color: #f3f3f3;
    color: #000;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 20px 30px 0 30px;
    flex: 1;
}

/* Header styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.logo {
    font-size: 36px;
    font-weight: bold;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.copyright {
    font-size: 12px;
    max-width: 500px;
    text-align: right;
    opacity: 0.7;
}

/* Vehicle selection styles */
.select-vehicle h3 {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
}

.vehicle-selectors {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 25px;
    position: relative;
}

/* Desktop-only selector and select styles */
@media (min-width: 768px) {
    .selector {
        position: relative;
    }

    .selector select {
        width: 220px;
        padding: 12px 30px 12px 12px;
        background-color: #fff;
        color: #000;
        border: none;
        font-size: 14px;
        text-align: center;
        appearance: none;
        cursor: pointer;
        text-transform: uppercase;
        font-weight: 500;
        border-radius: 6px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
        text-overflow: ellipsis;
    }

    /* Make the model select wider to accommodate longer text */
    #model {
        width: 280px;
    }

    /* Fix dropdown positioning */
    select {
        -webkit-appearance: menulist-button;
        position: relative;
    }

    select option {
        position: relative;
        z-index: 100;
    }

    .selector::after {
        content: "▼";
        font-size: 10px;
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        color: #888;
        pointer-events: none;
    }
}

.action-buttons {
    margin-left: auto;
    display: flex;
    gap: 10px;
}

button {
    padding: 12px 24px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    letter-spacing: 1px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.apply-btn {
    background-color: #A90616;
    color: #fff;
}

.apply-btn:hover {
    background-color: #8a0512;
    box-shadow: 0 3px 8px rgba(169, 6, 22, 0.3);
}

.change-btn {
    background-color: transparent;
    border: 1px solid #A90616;
    color: #A90616;
}

.change-btn:hover {
    background-color: rgba(169, 6, 22, 0.1);
}

/* Vehicle title - HIDE the standalone section */
.vehicle-title {
    display: none; /* Hide the redundant vehicle title section */
}

.vehicle-title h2 {
    display: none; /* Hide the redundant vehicle title heading */
}

/* Main content */
main {
    display: grid;
    grid-template-columns: 40% 60%;
    gap: 0;
}

/* Config panel */
.config-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 0 0 400px;
    padding: 15px;
    background-color: #fafafa;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    color: #000;
}

/* Section headers styling */
.wheel-section h3,
.finish-section h3 {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    color: #555;
}

/* Desktop enhancements for wheel grid */
@media (min-width: 768px) {
    .wheel-section h3 {
        font-size: 14px;
        font-weight: 600;
        text-align: center;
        padding-bottom: 8px;
        margin-bottom: 15px;
    }
    
    .wheel-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .wheel-grid {
        gap: 20px;
        margin-top: 8px;
        margin-bottom: 15px;
        justify-content: center;
        width: 100%;
    }
    
    .wheel-option {
        padding: 15px;
        transition: all 0.25s ease;
    }
    
    .wheel-option img {
        max-width: 100px;
        margin-bottom: 8px;
    }
    
    .wheel-model-name {
        font-size: 12px;
        font-weight: 500;
        margin-top: 6px;
    }
}

/* Desktop-only brand section styles */
@media (min-width: 768px) {
    .brand-section {
        margin-bottom: 8px;
        padding: 15px;
        background-color: #A90616;
        border-radius: 6px;
        border-bottom: 1px solid #f3f3f3;
    }

    .brand-section h3 {
        text-transform: uppercase;
        font-size: 12px;
        font-weight: 600;
        margin: 0 0 10px 0;
        letter-spacing: 0.5px;
        color: #f3f3f3;
    }

    /* Filters container for side-by-side layout */
    .filters-container {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .filter-half {
        flex: 1;
        width: 100%;
    }

    .filter-full {
        width: 100%;
    }

    .brand-section .selector {
        width: 100%;
        position: relative;
        margin-bottom: 5px;
    }

    .brand-section .selector select {
        width: 100%;
        padding: 10px 12px;
        font-size: 14px;
        border: 1px solid #ddd;
        border-radius: 4px;
        appearance: none;
        background-color: white;
        cursor: pointer;
    }

    /* Dropdown arrow for all brand section filters */
    .brand-section .selector::after {
        content: '▼';
        font-size: 10px;
        color: #666;
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        pointer-events: none;
    }

    /* Diameter filter container styles */
    .diameter-filter-container {
        position: relative;
    }

    .diameter-filter-container select {
        width: 100%;
        padding: 10px 12px;
        font-size: 14px;
        border: 1px solid #ddd;
        border-radius: 4px;
        appearance: none;
        background-color: white;
        cursor: pointer;
    }
}

/* Wheel grid container with pagination */
.wheel-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 15px;
    margin-bottom: 15px;
    width: 100%;
}

.wheel-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    justify-content: center;
}

/* Dynamic wheel grid layouts */
.wheel-grid-compact {
    grid-template-columns: repeat(2, 1fr);
    max-width: 300px;
    justify-content: start;
}

.wheel-grid-row-1 {
    grid-template-rows: repeat(1, auto);
    margin-bottom: 15px;
    justify-content: start;
}

.wheel-grid-row-2 {
    grid-template-rows: repeat(2, auto);
    margin-bottom: 10px;
}

.wheel-grid-row-3 {
    grid-template-rows: repeat(3, auto);
    margin-bottom: 5px;
}

.wheel-grid-row-4 {
    grid-template-rows: repeat(4, auto);
}

/* Pagination controls should always be visible when there are multiple pages */
.pagination-controls {
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    position: relative;
    z-index: 10;
}

/* Ensure pagination buttons are always visible and clickable */
#prev-page, #next-page {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Disabled state for pagination buttons */
#prev-page:disabled, #next-page:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ccc;
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-dot:hover {
    background-color: #999;
}

.page-dot.active {
    background-color: #A90616;
    transform: scale(1.2);
}

.wheel-option {
    border: 2px solid transparent;
    padding: 15px;
    cursor: pointer;
    text-align: center;
    background-color: #f8f8f8;
    border-radius: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wheel-option:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background-color: #f2f2f2;
}

.wheel-option.selected {
    border-color: #000;
    background-color: rgba(0, 0, 0, 0.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.wheel-option img {
    width: 100%;
    max-width: 75px;
    height: auto;
    margin: 0 auto 8px;
    display: block;
    transition: transform 0.3s ease;
}

.wheel-option:hover img {
    transform: scale(1.05);
}

.wheel-model-name {
    margin-top: 5px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    text-align: center;
    color: #333;
}

.wheel-option.placeholder {
    cursor: default;
    border-color: transparent !important;
    background-color: transparent;
    opacity: 0.3;
    box-shadow: none;
}

.wheel-option.placeholder:hover {
    transform: none;
    box-shadow: none;
}

.empty-wheel {
    width: 75px;
    height: 75px;
    margin: 0 auto 8px;
    background-color: #f3f3f3;
    border-radius: 50%;
    opacity: 0.3;
}

/* Finish section */
.finish-section {
    margin-top: 15px;
}

.finish-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
    margin-bottom: 10px;
}

.finish-swatch {
    width: 50px;
    height: 50px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.finish-swatch:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.finish-swatch.selected {
    border-color: #000;
    border-width: 2px;
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.finish-name {
    margin-top: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* Preview panel - DESKTOP ONLY */
@media (min-width: 768px) {
    .preview-panel {
        background-color: #f3f3f3;
        padding: 20px 20px 10px 20px;
        padding-top: 40px;
        display: flex;
        flex-direction: column;
    }

    .vehicle-preview {
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 20px;
    }

    #vehicle-image {
        width: 100%;
        height: auto;
        display: block;
    }

    /* Wheel overlay for desktop */
    .wheel-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        pointer-events: none;
    }

    #wheel-overlay-image {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        transition: opacity 0.3s ease;
    }

    /* Create two wheel instances for left and right sides - DESKTOP ONLY */
    .wheel-left,
    .wheel-right {
        position: absolute;
        width: 23%;
        height: auto;
        bottom: 22%;
        transform-origin: center;
    }

    .wheel-left {
        left: 18%;
        transform: translateX(-50%);
    }

    .wheel-right {
        right: 22%;
        transform: translateX(50%);
    }

    /* Add shadow effect to wheels */
    .wheel-left img,
    .wheel-right img {
        width: 100%;
        height: auto;
        filter: drop-shadow(0 5px 3px rgba(0, 0, 0, 0.3));
    }
}

/* Paint section */
.paint-section {
    background-color: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    margin-top: 10px;
}

.paint-section h3 {
    color: #000;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 15px;
}

/* Target the actual flex container with utility classes */
#paint-swatches, 
.paint-swatches.flex.flex-wrap {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.75rem !important; /* 12px */
    justify-content: center !important;
    background-color: transparent !important;
    padding: 0 !important;
    margin-bottom: 15px;
}

/* Target the button elements directly */
#paint-swatches button,
.paint-swatches button {
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    border: 2px solid transparent !important;
    position: relative !important;
    padding: 0 !important;
    overflow: hidden !important;
}

#paint-swatches button:hover,
.paint-swatches button:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15) !important;
}

#paint-swatches button.selected,
.paint-swatches button.selected {
    transform: scale(1.2) !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2) !important;
    border: 2px solid #fff !important;
    z-index: 2 !important;
}

#paint-swatches button.selected::after,
.paint-swatches button.selected::after {
    content: '' !important;
    position: absolute !important;
    bottom: -8px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 6px !important;
    height: 6px !important;
    background-color: #000 !important;
    border-radius: 50% !important;
}

.paint-name {
    color: #000;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    background-color: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    margin: 0 auto;
    max-width: 100%;
}

/* Paint section - desktop specific changes */
.paint-section.mt-6.p-4.bg-gray-50.rounded-lg.shadow {
    background-color: transparent !important;
    padding: 10px 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    margin-top: 0 !important; /* Remove absolute positioning */
}

/* Hide the Paint heading for desktop */
.paint-section h3,
.text-sm.font-medium.text-gray-900.mb-3 {
    display: none !important;
}

/* Paint pagination controls */
.paint-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.paint-pagination-btn {
    background: transparent;
    color: #000;
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    transition: all 0.2s ease;
}

.paint-pagination-btn:hover {
    color: #555;
}

.paint-pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Responsive styles - Keep desktop only */
@media (max-width: 1024px) and (min-width: 768px) {
    .config-panel {
        padding: 20px;
    }
}

/* Loading animation and states */
.component-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    border-radius: 8px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border-top: 4px solid #A90616;
    animation: spin 1s linear infinite;
}

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

/* Image blur during loading */
.loading-blur {
    filter: blur(2px);
    transition: filter 0.3s ease;
}

/* Wheel overlay image transitions */
#wheel-overlay-image {
    transition: opacity 0.3s ease;
}

/* Vehicle preview modifications - DESKTOP ONLY */
@media (min-width: 768px) {
    .vehicle-preview {
        position: relative;
        background-color: #f3f3f3;
        border-radius: 8px;
        overflow: hidden;
        min-height: 300px;
        transition: all 0.3s ease;
    }
}

/* Prevent the broken image icon from showing */
img {
    transition: opacity 0.2s ease;
}
img[src=""], img:not([src]) {
    opacity: 0;
}

/* Style updates for the Apply and Change buttons for better visual feedback */
.apply-btn, .change-btn {
    transition: all 0.2s ease;
}

.apply-btn:hover {
    background-color: #8a0512;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.apply-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Pagination improvements */
.page-dot {
    transition: all 0.2s ease;
}

.page-dot:hover {
    transform: scale(1.2);
}

/* Image error state */
img.error {
    display: none;
}

/* Desktop-only brand select styling */
@media (min-width: 768px) {
    .brand-select-styled {
        display: block;
        width: 100%;
        padding: 10px 14px;
        font-size: 14px;
        font-weight: 500;
        color: #333;
        background-color: white;
        border: 1px solid #ddd;
        border-radius: 4px;
        cursor: pointer;
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: none;
        transition: border-color 0.2s, box-shadow 0.2s;
    }

    .brand-select-styled:hover {
        border-color: #aaa;
    }

    .brand-select-styled:focus {
        outline: none;
        border-color: #666;
        box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
    }
}

/* W+1 Logo styling */
.brand-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0 20px 0;
}

.w1-logo {
    max-width: 220px;
    width: 100%;
    height: auto;
}

.wheel-option.placeholder {
    cursor: default;
    border-color: transparent !important;
}

/* Target specific classes seen in the developer tools screenshot - DESKTOP ONLY */
@media (min-width: 768px) {
    .paint-swatches.flex.flex-wrap.gap-2.justify-center {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.75rem !important; /* Slightly larger than gap-2 */
        justify-content: center !important;
        background-color: transparent !important;
        margin-bottom: 15px !important;
        padding: 0 !important;
    }

    [data-color] {
        width: 30px !important;
        height: 30px !important;
        border-radius: 50% !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
        border: 2px solid transparent !important;
        position: relative !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    [data-color]:hover {
        transform: scale(1.1) !important;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15) !important;
    }

    [data-color].selected {
        transform: scale(1.2) !important;
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2) !important;
        border: 2px solid #fff !important;
        z-index: 2 !important;
    }

    [data-color].selected::after {
        content: '' !important;
        position: absolute !important;
        bottom: -8px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 6px !important;
        height: 6px !important;
        background-color: #000 !important;
        border-radius: 50% !important;
    }

    .text-sm.font-medium.text-gray-900.mb-3 {
        font-size: 14px !important;
        font-weight: 500 !important;
        margin-bottom: 15px !important;
        text-align: center !important;
    }
}

/* Product Section Styles - DESKTOP ONLY */
@media (min-width: 768px) {
    .product-section {
        margin-top: 0;
        margin-bottom: 15px;
        background: #fff;
        border-radius: 6px;
        overflow: hidden;
        border: 1px solid #f3f3f3;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }
    
    .product-section h3 {
        font-size: 12px;
        font-weight: 600;
        margin: 0;
        padding: 12px 15px;
        background-color: #A90616;
        color: #f8f8f8;
        text-transform: uppercase;
        border-bottom: 1px solid #f3f3f3;
        letter-spacing: 0.5px;
        line-height: 1.3;
    }

    /* Style for the vehicle name within the product heading */
    .product-section h3 .vehicle-name {
        display: block;
        font-size: 11px;
        font-weight: 500;
        margin-top: 2px;
        letter-spacing: 2px;
        opacity: 0.9;
        text-transform: uppercase;
    }

    .product-container {
        max-height: none; /* Remove fixed height restriction */
        min-height: auto; /* Allow container to size based on content */
        overflow: visible; /* Changed from hidden to visible */
        padding: 0;
        display: flex;
        flex-direction: column;
    }

    /* Redesign product grid as a list view */
    .product-grid {
        display: flex;
        flex-direction: column;
        gap: 1px;
        background-color: #f5f5f5;
        padding: 0;
        min-height: auto; /* Allow grid to size based on content */
        max-height: none; /* Remove height restriction */
    }

    /* Product items styling - each product is 90px tall */
    .product-item {
        display: flex;
        align-items: center;
        padding: 10px 12px;
        height: 90px;
        box-sizing: border-box;
        background-color: #fff;
        border-bottom: 1px solid #f0f0f0;
        transition: all 0.2s ease;
        cursor: pointer;
    }

    .product-item:hover {
        background-color: #f9f9f9;
    }

    .product-item.selected {
        background-color: #f0f8ff;
        border-left: 3px solid #A90616;
    }
    
    /* Adjust product image container for thumbnail layout */
    .product-image {
        width: 70px;
        height: 70px;
        min-width: 70px;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #f9f9f9;
        border-radius: 4px;
        overflow: hidden;
        margin-right: 12px;
    }

    .product-image img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

    /* Modern product info layout */
    .product-info {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        min-width: 0;
        height: 100%;
        padding: 2px 0;
    }

    /* Top row: Title and Fitment badge */
    .product-top-row {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 4px;
    }

    .product-title {
        font-size: 13px;
        font-weight: 600;
        color: #333;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex: 1;
        margin-right: 8px;
        line-height: 1.2;
    }

    /* Fitment badge styling */
    .product-fitment-badge {
        display: flex;
        align-items: center;
        gap: 3px;
        padding: 2px 6px;
        border-radius: 12px;
        font-size: 10px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .product-fitment-badge.staggered {
        background-color: #e8f4fd;
        color: #1e40af;
        border: 1px solid #bfdbfe;
    }

    .product-fitment-badge.square {
        background-color: #f0fdf4;
        color: #166534;
        border: 1px solid #bbf7d0;
    }

    .fitment-icon {
        font-size: 8px;
        line-height: 1;
    }

    .fitment-text {
        font-size: 9px;
        font-weight: 600;
    }

    /* Specs row: Front and Rear specifications */
    .product-specs-row {
        display: flex;
        gap: 12px;
        margin-bottom: 4px;
        flex-wrap: wrap;
    }

    .spec-item {
        display: flex;
        align-items: center;
        gap: 3px;
        font-size: 11px;
        line-height: 1.2;
    }

    .spec-label {
        font-weight: 600;
        color: #666;
        text-transform: uppercase;
        font-size: 9px;
        letter-spacing: 0.3px;
    }

    .spec-value {
        color: #333;
        font-weight: 500;
        font-size: 11px;
    }

    /* Bottom row: Additional info and View Details */
    .product-bottom-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: auto;
        gap: 8px;
    }

    .product-additional-info {
        display: flex;
        gap: 8px;
        align-items: center;
        flex: 1;
    }
    
    .product-buttons {
        display: flex;
        gap: 4px;
        align-items: center;
        flex-shrink: 0;
    }

    .bolt-pattern,
    .finish-info {
        font-size: 10px;
        color: #888;
        background-color: #f5f5f5;
        padding: 1px 4px;
        border-radius: 3px;
        font-weight: 500;
    }

    .view-details-btn {
        font-size: 10px;
        background-color: #A90616;
        color: #ffffff;
        text-decoration: none;
        padding: 4px 8px;
        font-weight: 600;
        border-radius: 4px;
        transition: all 0.2s ease;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        flex-shrink: 0;
        border: none;
        cursor: pointer;
    }

    .view-details-btn:hover {
        background-color: #8a0512;
        color: #ffffff;
        text-decoration: none;
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(169, 6, 22, 0.3);
    }

    .no-products-message {
        padding: 20px;
        text-align: center;
        color: #666;
        font-size: 14px;
        background: #f9f9f9;
    }

    /* Restore original pagination styling */
    .pagination-controls {
        position: relative;
        display: flex !important;
        justify-content: center;
        align-items: center;
        margin-top: 0;
        margin-bottom: 0;
        padding: 8px 0;
        gap: 10px;
        background-color: #A90616;
        border-top: 1px solid #eee;
        z-index: 10;
    }
    
    /* Pagination arrows - make them more visible and clickable */
    #prev-page,
    #next-page,
    .pagination-prev,
    .pagination-next {
        width: 32px;
        height: 32px;
        background: rgba(0,0,0,0.05);
        border-radius: 4px;
        border: none;
        cursor: pointer;
        color: #333;
        font-size: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        opacity: 1 !important;
        visibility: visible !important;
        margin: 0 5px;
    }
    
    #prev-page:hover,
    #next-page:hover,
    .pagination-prev:hover,
    .pagination-next:hover {
        background: rgba(0,0,0,0.1);
        color: #000;
    }
    
    /* Add page indicator between arrows */
    .pagination-info {
        font-size: 12px;
        color: #666;
        margin: 0 8px;
        display: inline-block;
    }
}

/* Basic button hover effect and cursor */
button:hover {
    opacity: 0.9;
}

/* Hide paint section toggle on desktop - mobile only feature */
@media (min-width: 768px) {
    .paint-section-toggle {
        display: none !important;
    }
}

/* Lower toggle button styles - consistent across desktop and mobile */
.lower-toggle-btn {
    position: absolute !important;
    bottom: 10px !important;
    right: 50% !important;
    transform: translateX(50%) !important;
    width: 140px !important;
    height: 30px !important;
    font-size: 10px !important;
    border-radius: 20px !important;
    background: #ffffff !important;
    border: 2px solid #f3f3f3 !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12) !important;
    z-index: 1000 !important;
    display: flex !important;
    overflow: hidden !important;
    cursor: pointer !important;
    letter-spacing: 0.5px !important;
    font-weight: 600 !important;
}

/* Sliding background pill */
.lower-toggle-btn::before {
    content: '' !important;
    position: absolute !important;
    top: 2px !important;
    left: 2px !important;
    width: calc(50% - 2px) !important;
    height: calc(100% - 4px) !important;
    background: #333333 !important;
    border-radius: 16px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 1 !important;
    transform: translateX(0) !important;
}

/* When lowered is active, slide the background to the right */
.lower-toggle-btn[data-active="lowered"]::before {
    transform: translateX(calc(100% + 2px)) !important;
}

/* Toggle option base styling */
.lower-toggle-btn .toggle-option {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 50% !important;
    height: 100% !important;
    padding: 0 !important;
    text-align: center !important;
    transition: color 0.3s ease !important;
    position: relative !important;
    z-index: 2 !important;
    letter-spacing: 0.5px !important;
    background: transparent !important;
    border: none !important;
}

/* Active option (white text on dark background) */
.lower-toggle-btn .toggle-option.active {
    color: #ffffff !important;
}

/* Inactive option (dark text on light background) */
.lower-toggle-btn .toggle-option.inactive {
    color: #666666 !important;
}

/* Ensure no pseudo-elements interfere with the design */
.lower-toggle-btn .toggle-option:before,
.lower-toggle-btn .toggle-option:after {
    display: none !important;
}

/* Ask about fitment button styles */
.ask-fitment-btn {
    font-size: 10px;
    background-color: #000000;
    color: #ffffff;
    text-decoration: none;
    padding: 4px 8px;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
    border: none;
    cursor: pointer;
    margin-left: 4px;
}

.ask-fitment-btn:hover {
    background-color: #333333;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Fitment Modal Styles */
.fitment-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.fitment-modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.fitment-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e5e5;
    background: #f8f9fa;
}

.fitment-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.fitment-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.fitment-modal-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

.fitment-modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.fitment-response {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    white-space: pre-wrap;
}

.fitment-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.fitment-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #40B4B4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

.fitment-loading p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Mobile responsive styles for modal */
@media (max-width: 768px) {
    .fitment-modal-content {
        width: 95%;
        max-height: 90vh;
        margin: 20px;
    }
    
    .fitment-modal-header {
        padding: 16px 20px;
    }
    
    .fitment-modal-title {
        font-size: 16px;
    }
    
    .fitment-modal-body {
        padding: 20px;
    }
    
    .ask-fitment-btn {
        font-size: 9px;
        padding: 3px 6px;
        margin-left: 2px;
    }
} 