/* Enhanced tire sizes table styling */
.tire-sizes-section {
    margin: 30px 0;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* FILTER DROPDOWN FIX - Ensure all filter dropdowns are always visible and functional */
.altc-filter-group select,
#filter-category,
#filter-brand,
#filter-application,
#filter-width,
#filter-aspect-ratio,
#filter-rim-diameter {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 35px !important;
    background-color: #fff !important;
    border: 1px solid #ddd !important;
    color: #333 !important;
    font-size: 14px !important;
    line-height: normal !important;
    margin: 0 !important;
    padding: 8px 12px !important;
    text-indent: 0 !important;
    text-transform: none !important;
    z-index: auto !important;
}

/* Ensure filter container is also visible */
.altc-filters-container,
.altc-filters,
.altc-filter-form,
.altc-filter-row,
.altc-filter-group {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Override any theme or page builder styles that might hide filters */
body .altc-filter-group select,
body #filter-category,
body #filter-brand,
body #filter-application,
body #filter-width,
body #filter-aspect-ratio,
body #filter-rim-diameter {
    display: block !important;
    visibility: visible !important;
}

.tire-sizes-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    margin-bottom: 0;
    background: #fff;
}

.tire-sizes-table th {
    background: linear-gradient(135deg, #c41e3a 0%, #a01729 100%);
    color: #fff;
    font-weight: 600;
    padding: 15px 12px;
    text-align: left;
    border-bottom: 2px solid #a01729;
    position: sticky;
    top: 0;
    z-index: 10;
}

.tire-sizes-table td {
    border: none;
    border-bottom: 1px solid #f1f3f4;
    padding: 12px;
    text-align: left;
    vertical-align: middle;
}

.tire-sizes-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.tire-sizes-table tr:hover {
    background-color: #e3f2fd;
    transition: background-color 0.2s ease;
}

.tire-sizes-table tr:last-child td {
    border-bottom: none;
}

/* Enhanced responsiveness for sizes table */
@media only screen and (max-width: 768px) {
    .tire-sizes-section {
        margin: 20px 0;
    }
    
    .tire-sizes-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .tire-sizes-table thead,
    .tire-sizes-table tbody,
    .tire-sizes-table th,
    .tire-sizes-table td,
    .tire-sizes-table tr {
        display: block;
    }
    
    .tire-sizes-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .tire-sizes-table tr {
        border: 1px solid #e5e5e5;
        margin-bottom: 10px;
        border-radius: 6px;
        background: #fff;
        padding: 0;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
    
    .tire-sizes-table td {
        border: none;
        border-bottom: 1px solid #f1f3f4;
        position: relative;
        padding-left: 100px;
        padding-top: 10px;
        padding-bottom: 10px;
        white-space: normal;
    }
    
    .tire-sizes-table td:last-child {
        border-bottom: none;
    }
    
    .tire-sizes-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 12px;
        width: 80px;
        padding-right: 8px;
        white-space: nowrap;
        font-weight: 600;
        color: #555;
        font-size: 11px;
        text-transform: uppercase;
    }
}

@media only screen and (max-width: 480px) {
    .tire-sizes-table td {
        padding-left: 90px;
    }
    
    .tire-sizes-table td:before {
        width: 70px;
        font-size: 10px;
    }
}

/* No image placeholder styling */
.altc-no-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    color: #6c757d;
    font-size: 16px;
    font-weight: 500;
}

.altc-no-image-text {
    text-align: center;
    padding: 20px;
}

/* Tube type badge styling */
.tube-type-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #fff;
    line-height: 1;
}

.tube-type-badge.tube-type-tt {
    background-color: #dc3545; /* Red for Tube Type */
}

.tube-type-badge.tube-type-tl {
    background-color: #28a745; /* Green for Tubeless */
}

/* Tube type column styling */
.tube-type-col {
    width: 100px;
    text-align: center;
}