/**
 * Dacia Feed Pro - Complete CSS File
 * Version: 1.2.0
 * Updated with single column layout and simplified design
 */

/* ===================================
   RESET AND BASE STYLES
   =================================== */

.dacia-feed-wrapper {
    display: flex;
    gap: 30px;
    max-width: 1400px;
    margin: 0;
    padding: 20px;
    font-family: inherit;
    color: #000000;
    line-height: 1.6;
}

.dacia-feed-wrapper * {
    box-sizing: border-box;
}

/* ===================================
   SIDEBAR FILTERS
   =================================== */

.dacia-filters-sidebar {
    width: 20%;  
    max-width: 300px;  /* Add max-width for very large screens */
    min-width: 240px;  /* Add min-width for usability */
    flex-shrink: 0;
    padding: 0 24px 24px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

/* Filter Header */
.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
}

.filter-header p {
    margin: 0;
    font-size: 21px;
    font-weight: 600;
    color: #000000;
}

.clear-filters {
    background: none;
    border: none;
    color: #ec6528;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    transition: color 0.2s;
}

.clear-filters:hover {
	color: #ec6528;
    text-decoration:underline;
}

/* Filter Sections */
.filter-section {
    margin-bottom: 28px;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 20px;
}

.filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 0 16px 0!important;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #000000;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}

.filter-title:hover {
    color: #000000;
}

.toggle-icon {
    font-size: 18px;
    color: #757575;
    transition: transform 0.2s;
}

.filter-content {
    display: block;
    transition: all 0.3s ease;
    max-height: 500px;
    overflow-y: auto;
}

.filter-content.collapsed {
    display: none;
}

/* Filter Checkboxes */
.filter-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 14px;
    color: #000000;
    transition: color 0.2s;
}

.filter-checkbox:hover {
    color: #000000;
}

.filter-checkbox input[type="checkbox"] {
    margin-right: 10px;
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: #646b52;
}

.filter-checkbox span {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-checkbox .count {
    margin-left: auto;
    color: #757575;
    font-size: 13px;
    font-weight: 400;
}
/* Special rule for motorizare display*/
#section-motorizare .filter-content,
#section-price .filter-content {
    max-height: none;
    overflow-y: visible;
}

/* Price Range */
.price-values {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.price-value-min,
.price-value-max {
    font-size: 14px;
    color: #333;
}

/* Slider Container - IMPORTANT */
.price-slider-container {
    position: relative;
    width: 100%;
    height: 20px;
    margin: 10px 0 20px 0;
}

/* Background track */
.price-track {
    position: absolute;
    width: 100%;
    height: 5px;
    background: #ddd;
    border-radius: 3px;
    top: 50%;
    transform: translateY(-50%);
}

/* Active range */
.price-progress {
    position: absolute;
    height: 5px;
    background: #333;
    border-radius: 3px;
    top: 50%;
    transform: translateY(-50%);
}

/* BOTH range inputs - positioned absolutely on top of each other */
.price-input-min,
.price-input-max {
    position: absolute;
    width: 100%;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    height: 20px;
    top: 0;
    margin: 0;
}

/* Style the handles */
.price-input-min::-webkit-slider-thumb,
.price-input-max::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #666;
    cursor: pointer;
    pointer-events: all;
    position: relative;
    z-index: 1;
}

.price-input-min::-moz-range-thumb,
.price-input-max::-moz-range-thumb {
    -moz-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #666;
    cursor: pointer;
    pointer-events: all;
    position: relative;
    z-index: 1;
    border: none;
}

/* Make sure input max is below input min for proper z-index */
.price-input-min {
    z-index: 2;
}

/* Color Filters */
.color-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.color-filter {
    width: 20px;
    height: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 0;  /* Changed from 50% to 0 for square */
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.color-filter:hover {
    transform: scale(1.3);
    border-color: #9ca3af;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.color-filter.active {
    border-color: #3b82f6;
    border-width: 2px;
    box-shadow: 0 0 0 1px #fff, 0 0 0 3px #3b82f6;
}

.color-filter.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 10px;
    font-weight: bold;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.8);
}

/* ===================================
   MAIN CONTENT AREA
   =================================== */

.dacia-feed-main {
    flex: 1;  /* This will automatically take up the remaining 80% */
    min-width: 0;
    width: 80%;  /* Explicitly set to 80% */
}

/* Feed Header */
.feed-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.results-info {
    margin: 0 0 12px 0;
    font-size: 21px;
    font-weight: 600;
    color: #000000;
}

.results-info span {
    font-weight: 600;
    color: #000000;
}

/* Search Tags */
.search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.search-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #646b52;
    font-weight: 500;
    animation: fadeIn 0.3s ease;
}

.search-tag button {
    background: none;
    border: none;
    color: #646b52;
    cursor: pointer;
    padding: 0;
    font-size: 18px;
    line-height: 1;
    margin-left: 4px;
    transition: color 0.2s;
}

.search-tag button:hover {
    color: #646b52;
}

/* Sort Select */
.sort-select {
    padding: 10px 16px;
    padding-right: 40px;
    border: 1px solid #ccc;
	border-radius:0;
    font-size: 14px;
    cursor: pointer;
    min-width: 180px;
    background: white;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    appearance: none;
    transition: border-color 0.2s;
}

.sort-select:focus {
    outline: none;
    border-color: #ccc;
}

/* ===================================
   CARS GRID - SINGLE COLUMN LAYOUT
   =================================== */

.dacia-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

/* Car Card - Horizontal Layout */
.dacia-card {
    overflow: hidden;
    display: flex;
    flex-direction: row;
	padding-bottom:30px;
	border-bottom: 1px solid #c6c6c6;
    margin-bottom: 25px;
    /* Removed transition and hover transform */
}

/* Card Image - Horizontal layout */
.card-image {
    position: relative;
    width: 300px;
    min-width: 300px;
    height: 200px;
    background: #f9fafb;
    overflow: hidden;
    flex-shrink: 0;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease; /* Keep zoom effect only for image */
}

/* Keep hover zoom only for image */
.dacia-card:hover .card-image img {
    transform: scale(1.05);
}

/* Card Content - Horizontal layout */
.card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-title{
    font-size: 21px!important;
	text-transform: uppercase!important;
    font-weight: 600!important;
	margin-bottom:1em;
}
/* New card engine style */
.card-engine {
    font-size: 14px;
    color: #000000;
    margin-bottom: 0.8em;
    font-weight: 500;
}

/* New card delivery style with icon */
.card-delivery {
    font-size: 14px;
    color: #000000;
    margin-bottom: 12px;
    padding-left: 24px;
    position: relative;
    display: flex;
    align-items: center;
}

.card-delivery::before {
    content: '';
    position: absolute;
    left: 0;
    width: 18px;
    height: 18px;
    background: url('https://vanzari.dacia.ro/static/version1755781621/frontend/RCR/dacia/ro_RO/images/time.svg') no-repeat center;
    background-size: contain;
}

/* Card Features - Simplified */

.card-financing {
    padding: 8px;
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 6px;
    font-size: 12px;
    color: #92400e;
    text-align: center;
    margin-bottom: 12px;
}

/* Card Pricing */
.card-pricing {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}

.price-columns {
    display: flex;
    gap: 0;  /* Remove gap */
    justify-content: space-between;  /* Changed from flex-start */
    align-items: flex-start;
    width: 100%;  /* Full width */
}

.price-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;  /* Changed from flex: 0 0 auto to flex: 1 */
    min-width: 0;  /* Changed from min-width: 100px */
}

.price-value {
    font-size: 28px;
    font-weight: 700;
    color: #d6d2c4;
    margin-bottom: 6px;
}

.price-value.promo {
    color: #646b52;
}

.price-value.rabla {
    color: #ec6528;
    font-size: 28px;
}

.price-value sup {
    font-size: 0.6em;
    vertical-align: super;
    margin-left: 1px;
}

.price-label {
    font-size: 12px;
	font-weight:600;
    color: #000000;
    letter-spacing: 0.5px;
    line-height: 1.3;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.price-vat {
    font-size: 12px;
	font-weight:normal;
    color: #000000;
    text-transform: none;
    letter-spacing: normal;
    margin-top: 2px;
}

.price-request {
    text-align: center;
    color: #000000;
    font-size: 16px;
    padding: 12px 0;
}

/* Remove strikethrough */
.price-value.strike {
    text-decoration: none !important;
    color: #111827; /* Normal color */
    font-size: 20px; /* Same size as normal */
    font-weight: 700;
}

.price-request {
    text-align: center;
    color: #6b7280;
    font-size: 16px;
    padding: 12px 0;
}

/* Card Actions - Simplified */
.card-actions {
    display: flex;
    margin-top: 16px;
    width: 33.333%;  /* Same as one-third of the price columns */
}


/* Details button - limited width */
.btn-details {
    padding: 12px 20px;
    background: #646b52;
    color: white;
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    font-weight: 400;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    width: 100%;  
}

.btn-details:hover:not(:disabled) {
    color: white;
}

.btn-details:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===================================
   PAGINATION
   =================================== */

.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-top: 40px;
    padding: 20px 0;
}

.page-btn {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    transition: all 0.2s;
    padding: 0 12px;
}

.page-btn:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: #9ca3af;
	color: #646b52;
    font-weight: 600;
}

.page-btn.active {
    background: #646b52;
    color: white;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f9fafb;
}

/* ===================================
   LOADING STATES
   =================================== */

.initial-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #6b7280;
}

.initial-loading p {
    margin-top: 20px;
    font-size: 16px;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 12px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { 
        opacity: 0;
        transform: translateY(-10px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

/* Tablet */
@media (max-width: 992px) {
	.dacia-filters-sidebar {
        width: 25%;  /* Slightly wider on tablets */
    }
    
    .dacia-feed-main {
        width: 75%;
    }

    .dacia-card {
        flex-direction: column;
    }
    
    .card-image {
        width: 100%;
        height: 250px;
    }
    
    .dacia-feed-wrapper {
        gap: 20px;
    }
    
    .dacia-filters-sidebar {
        width: 240px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .dacia-feed-wrapper {
        flex-direction: column;
        padding: 10px;
    }
    
    .dacia-filters-sidebar {
        width: 100%;  /* Full width on mobile */
        position: static;
        margin-bottom: 20px;
    }
    
    .dacia-feed-main {
        width: 100%;
    }
    
    .dacia-card {
        flex-direction: column;
    }
    
    .card-image {
        width: 100%;
        height: 200px;
    }
    
    .feed-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sort-select {
        width: 100%;
    }
    
    .btn-details {
        max-width: 100%;
    }
    
    .pagination-wrapper {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .page-btn {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
}

/* Very small mobile */
@media (max-width: 480px) {
    .filter-header h3 {
        font-size: 18px;
    }
    
    .card-title {
        font-size: 16px;
    }
    
    .card-image {
        height: 180px;
    }
    
    .price-value {
        font-size: 18px;
    }
    
    .price-value.rabla {
        font-size: 20px;
    }
    
    .card-content {
        padding: 15px;
    }
}

/* ===================================
   UTILITY CLASSES
   =================================== */

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none !important;
}

/* ===================================
   PRINT STYLES
   =================================== */

@media print {
    .dacia-filters-sidebar,
    .feed-controls,
    .pagination-wrapper {
        display: none;
    }
    
    .dacia-feed-wrapper {
        display: block;
    }
    
    .dacia-card {
        break-inside: avoid;
        margin-bottom: 20px;
    }
}