/* Vehicle Tire Wheel Manager Public Styles */

/* Container Styles */
.vtwm-filter-container {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.vtwm-vehicle-selector {
    background: #f8f9fa;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 25px;
    margin: 20px 0;
}

/* Messages */
.vtwm-messages {
    margin-bottom: 20px;
}

.vtwm-message {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-weight: 500;
}

.vtwm-error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.vtwm-success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Form Styles */
.vtwm-filter-form {
    display: grid;
    gap: 20px;
}

.vtwm-selector-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.vtwm-filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.vtwm-selector-field,
.vtwm-filter-field {
    display: flex;
    flex-direction: column;
}

.vtwm-selector-field label,
.vtwm-filter-field label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
    font-size: 14px;
}

.vtwm-vehicle-select,
.vtwm-filter-select,
.vtwm-filter-input {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.vtwm-vehicle-select:focus,
.vtwm-filter-select:focus,
.vtwm-filter-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.2);
}

.vtwm-vehicle-select:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

/* Filter Type Toggles */
.vtwm-filter-types {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
}

.vtwm-filter-type {
    display: flex;
    align-items: center;
    gap: 5px;
}

.vtwm-filter-type input[type="radio"] {
    margin: 0;
}

.vtwm-filter-type label {
    margin: 0;
    font-weight: 500;
    cursor: pointer;
}

/* Action Buttons */
.vtwm-selector-actions,
.vtwm-filter-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.vtwm-search-btn,
.vtwm-clear-btn {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.vtwm-search-btn:hover {
    background: #005a87;
    color: #fff;
}

.vtwm-clear-btn {
    background: #666;
}

.vtwm-clear-btn:hover {
    background: #555;
    color: #fff;
}

/* Results Section */
.vtwm-filter-results {
    margin-top: 30px;
}

.vtwm-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e1e1e1;
}

.vtwm-results-info {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.vtwm-results-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.vtwm-per-page-selector select {
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Product Grid */
.vtwm-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.vtwm-product-item {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.vtwm-product-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.vtwm-product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
}

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

.vtwm-product-item:hover .vtwm-product-image img {
    transform: scale(1.05);
}

.vtwm-product-content {
    padding: 20px;
}

.vtwm-product-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.vtwm-product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.vtwm-product-title a:hover {
    color: #0073aa;
}

.vtwm-product-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
}

/* Product Specifications */
.vtwm-product-specs {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.vtwm-product-specs h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
}

.vtwm-product-specs ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.vtwm-product-specs li {
    font-size: 13px;
    color: #555;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
}

.vtwm-product-specs li:last-child {
    margin-bottom: 0;
}

/* WooCommerce Integration */
.vtwm-wc-product {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e1e1e1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vtwm-product-price {
    font-size: 18px;
    font-weight: 700;
    color: #0073aa;
}

.vtwm-add-to-cart {
    background: #28a745;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.vtwm-add-to-cart:hover {
    background: #218838;
    color: #fff;
}

.vtwm-out-of-stock {
    color: #dc3545;
    font-weight: 600;
    font-size: 13px;
}

/* No Results */
.vtwm-no-results {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #666;
}

.vtwm-no-results h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 20px;
}

.vtwm-no-results p {
    margin: 0;
    font-size: 14px;
}

/* Pagination */
.vtwm-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.vtwm-pagination-btn {
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #ddd;
    color: #0073aa;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.vtwm-pagination-btn:hover {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.vtwm-pagination-current {
    padding: 8px 12px;
    background: #0073aa;
    color: #fff;
    border: 1px solid #0073aa;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
}

.vtwm-pagination-dots {
    padding: 8px 4px;
    color: #666;
}

/* Load More Button */
#vtwm-load-more {
    display: block;
    margin: 20px auto;
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#vtwm-load-more:hover {
    background: #005a87;
}

/* Loading States */
.vtwm-loading-indicator {
    display: none;
    text-align: center;
    padding: 20px;
    color: #666;
}

.vtwm-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.vtwm-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1000;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .vtwm-filter-container,
    .vtwm-vehicle-selector {
        padding: 15px;
        margin: 15px 0;
    }
    
    .vtwm-selector-row,
    .vtwm-filter-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .vtwm-filter-types {
        flex-direction: column;
        gap: 10px;
    }
    
    .vtwm-selector-actions,
    .vtwm-filter-actions {
        flex-direction: column;
    }
    
    .vtwm-search-btn,
    .vtwm-clear-btn {
        width: 100%;
        text-align: center;
    }
    
    .vtwm-results-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .vtwm-results-controls {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .vtwm-products-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .vtwm-wc-product {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .vtwm-add-to-cart {
        width: 100%;
        text-align: center;
        padding: 10px 16px;
    }
    
    .vtwm-pagination {
        gap: 5px;
    }
    
    .vtwm-pagination-btn,
    .vtwm-pagination-current {
        padding: 6px 10px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .vtwm-product-content {
        padding: 15px;
    }
    
    .vtwm-product-title {
        font-size: 16px;
    }
    
    .vtwm-product-excerpt {
        font-size: 13px;
    }
    
    .vtwm-product-specs {
        padding: 10px;
    }
    
    .vtwm-product-specs li {
        flex-direction: column;
        gap: 2px;
    }
}

/* Print Styles */
@media print {
    .vtwm-filter-container,
    .vtwm-vehicle-selector,
    .vtwm-pagination,
    #vtwm-load-more,
    .vtwm-filter-actions,
    .vtwm-selector-actions {
        display: none !important;
    }
    
    .vtwm-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .vtwm-product-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .vtwm-filter-container,
    .vtwm-vehicle-selector,
    .vtwm-product-item {
        border-width: 2px;
    }
    
    .vtwm-search-btn,
    .vtwm-add-to-cart {
        border: 2px solid;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .vtwm-product-item,
    .vtwm-product-image img,
    .vtwm-vehicle-select,
    .vtwm-filter-select,
    .vtwm-filter-input,
    .vtwm-search-btn,
    .vtwm-clear-btn,
    .vtwm-add-to-cart,
    .vtwm-pagination-btn {
        transition: none;
    }
    
    .vtwm-product-item:hover {
        transform: none;
    }
    
    .vtwm-product-item:hover .vtwm-product-image img {
        transform: none;
    }
    
    .vtwm-loading::after {
        animation: none;
    }
}
