/*
Theme Name: AutoDeal Child Theme v6
Template: autodeal
Version: 1.5
*/

/* === Model Card Custom Styling (v115) === */
.tfcl-model-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px; /* Adds spacing between cards */
    justify-content: flex-start;
}

.tfcl-model-card {
    width: calc(33.333% - 16px);
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    padding: 10px 10px 0 10px !important; /* Top/left/right: 10px, Bottom: 0 */
}

.tfcl-model-card:hover {
    transform: translateY(-5px);
}

.tfcl-model-card img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 12px 12px 0 0; /* Rounded top corners */
    display: block;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .tfcl-model-card {
        width: calc(50% - 12px);
    }
}

@media (max-width: 600px) {
    .tfcl-model-card {
        width: 100%;
    }
}

/* === Model Card Styling Fix for Make → Model Page (v115) === */
.tf_listing-item {
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    background: #fff;
    padding: 10px 10px 0 10px !important;
}
.tf_listing-item:hover {
    transform: translateY(-5px);
}
.tf_car-listing .tf_image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 12px 12px 0 0 !important; /* Rounded top corners */
    display: block;
    margin: 0 auto;
}

/* === Model Enhancements === */
.tf_car-listing.tf-model-card {
    position: relative;
    transition: transform 0.3s ease;
    padding: 10px 10px 0 10px !important;
}
.tf_car-listing.tf-model-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.tf_car-listing .model-meta-footer {
    padding: 15px;
    text-align: center;
}
.tf_car-listing .listing-count {
    font-size: 14px;
    margin-bottom: 8px;
    color: #555;
}

/* View Model Button */
.view-model-btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #f06424;
    color: #fff !important;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.3s ease;
}
.view-model-btn:hover {
    background-color: #d7541d;
}

/* Model Badge */
.model-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: #ff4d4f;
    color: #fff;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: bold;
    z-index: 9;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* === Local View Listings Button Styling === */
.tf-model-view-btn {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 20px;
    background-color: #f06424;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    text-align: center;
    background-color: #ffffff;
    color: #ff6600;
    border: 2px solid #ff6600;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    display: inline-block;
    transition: all 0.3s ease;
    margin-top: 6px;
    margin-bottom: 10px;
}
.tf-model-view-btn:hover {
    background-color: #ff6600;
    color: #ffffff;
    text-decoration: none;
}

/* === Model Card Listing Enhancements === */
.tf_car-listing {
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 10px 10px 0 10px !important;
}
.tf_car-listing:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}
.model-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #e63946;
    color: white;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: bold;
    z-index: 2;
}
.tf_car-listing .listing-count {
    font-size: 13px;
    color: #333;
    text-align: center;
    margin-top: 10px;
    margin-bottom: -5px;
}

/* Model Variant Button Styling */
.tf-model-view-btn {
    background-color: #ffffff;
    color: #ff6600;
    border: 2px solid #ff6600;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    display: inline-block;
    transition: all 0.3s ease;
    margin-top: 6px;
    margin-bottom: 10px;
}

.tf-model-view-btn:hover {
    background-color: #ff6600;
    color: #ffffff;
    text-decoration: none;
}

/* --- Car Title padding (h2) --- */
h2.tf_car_title {
    padding-left: 5px !important;
    padding-top: 5px !important;
}

/* --- List Inline left padding --- */
ul.list-inline {
    padding-left: 5px !important;
}

/* Ensure images inside all cards are centered and not indented */
.tfcl-model-card img,
.tf_listing-item img,
.tf_car-listing img {
    display: block;
    margin: 0 auto;
}
