/* --- Global Grid Components --- */
.wonyx-car-grid {
    display: grid;
    gap: 24px;
    width: 100%;
}

.wonyx-grid-home {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.wonyx-grid-recent {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

@media (max-width: 768px) {
    /* Home aur Recent dono layouts automatic 1 column stack me transform ho jayenge */
    .wonyx-grid-home, 
    .wonyx-grid-recent {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    }
    
    .wonyx-car-card {
        margin-bottom: 16px; /* Rows spacing buffer */
    }
    
    .wonyx-recent-layout-container {
        flex-direction: column;
        gap: 20px !important;
        margin-top: 0px !important;
    }

    .wonyx-left-sidebar-wrapper {
        flex: 1 1 100%;
        width: 100%;
        position: static !important;
    }
}

/* Sidebar Interaction Styling Hooks */
.wonyx-sidebar-make-link:hover {
    background: #8f8c8726 !important;
    color: #646464 !important;
    padding-left: 16px !important; /* Smooth sliding hover layout change shift */
}

.wonyx-sidebar-filter-panel {
    background: #F8FAFC;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #3341551a;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.wonyx-recent-layout-container {
    display: flex;
    gap: 30px;
    width: 100%;
    margin-top: 30px;
    align-items: flex-start;
}

.wonyx-left-sidebar-wrapper {
    flex: 0 0 280px; /* Sidebar Width Fixed */
    position: sticky;
    top: 20px;
}

.wonyx-right-grid-wrapper {
    flex: 1;
}

.wonyx-car-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    position: relative;
    box-sizing: border-box;
    width: 100%;
}

.wonyx-img-viewport {
    position: relative;
    width: 100%;
    height: 192px;
    overflow: hidden;
    background-color: #f3f4f6;
}

.wonyx-status-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 30;
    font-size: 11px;
    font-weight: 900;
    padding: 8px 15px;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2em;
}

.wonyx-slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    will-change: transform;
}

.wonyx-slider-track img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
}

.wonyx-card-content {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
}

.wonyx-meta-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #1e293b;
    font-weight: 700;
    line-height: 1.25;
}

.wonyx-spec-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    background: #f8fafc;
    padding: 10px;
    border-radius: 12px;
    font-size: 16px;
    color: #475569;
    margin-bottom: 16px;
    line-height: 1.5;
}

.wonyx-action-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

h3.wonyx.Meta.Title {
    font-size: 20px !important;
}

.wonyx-btn-quote {
    display: block;
    text-align: center;
    text-decoration: none !important;
    padding: 10px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    border: none;
}

.wonyx-btn-info {
    display: block;
    text-align: center;
    background: #0f172a;
    color: #fff;
    text-decoration: none !important;
    padding: 10px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    border: 1px solid #1e293b;
}

/* --- Filter Component UI --- */
.wonyx-filter-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    background: #f8fafc;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    margin-bottom: 24px;
    align-items: center;
    width:100%;
    box-sizing:border-box;
}

.wonyx-input-wrapper {
    flex: 1;
    min-width: 150px;
}

.wonyx-input-wrapper-sm {
    flex: 1;
    min-width: 100px;
}

.wonyx-input-field {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
    padding: 12px 20px !important;
}

.wonyx-filter-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
}

.wonyx-reset-link {
    font-size: 13px;
    color: #ef4444;
    text-decoration: none;
    font-weight: bold;
    margin-left: 5px;
}

/* --- Detailed Profile Component --- */
.wonyx-detailed-view {
    margin: 0 auto;
    padding: 10px;
    color: #1e293b;
    box-sizing: border-box;
}

.wonyx-back-anchor {
    display: inline-block;
    margin-bottom: 20px;
    text-decoration: none;
    color: #475569;
    font-weight: bold;
    font-size: 14px;
}



.wonyx-large-viewport {
    position: relative;
    width: 100%;
    height: 350px;
    overflow: hidden;
    background: #0f172a;
    border-radius: 16px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: flex;
}

.wonyx-tech-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.wonyx-tech-table tr {
    border-bottom: 1px solid #f1f5f9;
}

.wonyx-tech-table td {
    padding: 8px 0;
    font-size: 16px;
    line-height: 2em;
}

/* ==========================================
   GLOBAL BOX MODEL FIX (CRITICAL FOR LAYOUTS)
   ========================================== */
.wonyx-detailed-view,
.wonyx-detailed-view *,
.wonyx-details-split,
.wonyx-left-specs-column,
.wonyx-right-form-card {
    box-sizing: border-box !important; /* Isse padding/border width ke andar mathematically lock ho jayenge */
}

/* ==========================================
   DESKTOP VIEW COMPONENT RATIO (60% / 40%)
   ========================================== */
.wonyx-details-split {
    display: flex !important;
    gap: 30px !important;
    width: 100% !important;
    align-items: flex-start !important;
}

/* Left Column: 60% Perfect Cap */
.wonyx-left-specs-column {
    flex: 0 0 60% !important;
    width: 60% !important;
    padding: 20px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(51, 65, 85, 0.1) !important; /* Alpha color structure clean handling */
}

/* Right Column: Remaining 40% me se 30px gap minus kiya */
.wonyx-right-form-card {
    flex: 0 0 calc(40% - 30px) !important; 
    width: calc(40% - 30px) !important;
    background: #F8FAFC !important;
    padding: 20px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(51, 65, 85, 0.1) !important;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1) !important;
}

/* ==========================================
   MOBILE RESPONSIVE MATRIX OVERRIDES (MAX 768px)
   ========================================== */
@media (max-width: 768px) {
    .wonyx-details-split {
        flex-direction: column !important;
        gap: 24px !important;
    }

    /* Strict 100% scale alignment with padding auto-containment */
    .wonyx-left-specs-column,
    .wonyx-right-form-card {
        flex: 0 0 100% !important;
        width: 100% !important;
        /* Padding safe zone optimization */
        padding: 15px !important; 
    }
}

.wonyx-single-title {
    margin: 0 0 15px 0;
    font-size: 22px;
    font-weight: 900;
    color: #0f172a;
}

.wonyx-parts-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.wonyx-part-badge {
    font-size: 11px;
    background: #e2e8f0;
    color: #1e293b;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
}

/* --- Pagination Utilities --- */
.wonyx-pagination-wrap {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
    align-items: center;
}

.wonyx-pag-btn {
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
}

.wonyx-pag-info {
    font-size: 13px;
    color: #64748b;
    font-weight: bold;
}