/* Car Sale page — full redesign */
.cs-page {
    background: #f4f7fb;
    color: #0f172a;
}

/* Override global style.css `a { display: inline-block }` inside car sale */
.cs-page .cs-car-card,
.cs-page .cs-car-card__img-link,
.cs-page .cs-car-card__cta {
    box-sizing: border-box;
}

.cs-page .cs-car-card__img-link {
    display: block;
    width: 100%;
    height: 100%;
}

.cs-page .cs-car-card__title a,
.cs-page .cs-car-card__cta {
    display: block;
    text-decoration: none;
}

.cs-page .cs-car-card__icon-btn {
    display: inline-flex;
    text-decoration: none;
}

/* Hero */
.cs-hero {
    position: relative;
    overflow: hidden;
    padding: 56px 16px 64px;
}

.cs-hero__bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #0f2744 0%, #1e4a7a 28%, #2B7AC4 52%, #3d8f5c 78%, #7CB342 100%);
}

.cs-hero__bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.14) 0%, transparent 42%),
        radial-gradient(circle at 85% 75%, rgba(255, 255, 255, 0.08) 0%, transparent 40%);
}

.cs-hero__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, transparent 35%, rgba(0, 0, 0, 0.12) 100%);
}

.cs-hero__lines {
    position: absolute;
    inset: 0;
    opacity: 0.16;
    background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.22) 0 1px, transparent 1px 28px);
}

.cs-hero__inner {
    position: relative;
    z-index: 1;
    max-width: 72rem;
    margin: 0 auto;
    text-align: center;
}

.cs-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.cs-hero__title {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 900;
    color: #fff !important;
    margin: 0 0 10px;
    line-height: 1.1;
}

.cs-hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.92) !important;
    margin: 0 0 28px;
}

.cs-search {
    max-width: 56rem;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 24px 60px rgba(15, 39, 68, 0.22);
    backdrop-filter: blur(8px);
}

.cs-search__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    font-weight: 800;
    color: #1e3a5f;
    font-size: 1rem;
}

.cs-search__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .cs-search__grid { grid-template-columns: 1fr; }
}

.cs-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 6px;
}

.cs-field select {
    width: 100%;
    height: 52px;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    padding: 0 14px;
    font-size: 0.95rem;
    background: #fff;
    color: #0f172a;
}

.cs-field select:focus {
    outline: none;
    border-color: #2B7AC4;
    box-shadow: 0 0 0 3px rgba(43, 122, 196, 0.15);
}

.cs-search__btn {
    width: 100%;
    height: 54px;
    border: 0;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #2B7AC4 0%, #7CB342 100%);
    box-shadow: 0 10px 28px rgba(43, 122, 196, 0.28);
    transition: transform 0.15s, box-shadow 0.15s;
}

.cs-search__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(43, 122, 196, 0.34);
}

.cs-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 36rem;
    margin: 28px auto 0;
}

@media (max-width: 640px) {
    .cs-stats { grid-template-columns: 1fr; max-width: 14rem; }
}

.cs-stat {
    padding: 14px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #fff;
}

.cs-stat strong {
    display: block;
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1.1;
}

.cs-stat span {
    font-size: 0.82rem;
    opacity: 0.88;
}

/* Section shell */
.cs-section {
    padding: 56px 16px;
}

.cs-section--soft { background: #eef3f9; }
.cs-section--white { background: #fff; }

.cs-wrap {
    max-width: 72rem;
    margin: 0 auto;
}

.cs-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.cs-section-head h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 900;
    margin: 0 0 6px;
    color: #0f172a;
}

.cs-section-head p {
    margin: 0;
    color: #64748b;
    font-size: 0.95rem;
}

.cs-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid #dbe3ee;
    background: #fff;
    color: #1e3a5f !important;
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}

.cs-link-btn:hover {
    background: #f8fafc;
    border-color: #2B7AC4;
    text-decoration: none;
}

/* Browse tabs */
.cs-tabs {
    display: inline-flex;
    gap: 6px;
    padding: 6px;
    border-radius: 14px;
    background: #e2e8f0;
    margin: 0 auto 24px;
}

.cs-tabs-wrap { text-align: center; }

.cs-tab {
    border: 0;
    background: transparent;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.88rem;
    color: #64748b;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.cs-tab.active {
    background: linear-gradient(135deg, #2B7AC4, #2563eb);
    color: #fff;
    box-shadow: 0 6px 16px rgba(43, 122, 196, 0.25);
}

.cs-tab-panel { display: none; }
.cs-tab-panel.active { display: block; }

.cs-carousel {
    position: relative;
}

.cs-carousel__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 0;
    background: #fff;
    color: #2B7AC4;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.cs-carousel__nav:hover { background: #f0f7ff; }
.cs-carousel__nav--prev { left: -12px; }
.cs-carousel__nav--next { right: -12px; }
.cs-carousel__nav.hidden { display: none; }

.cs-browse-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

@media (max-width: 991px) {
    .cs-browse-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
    .cs-browse-grid { grid-template-columns: 1fr; }
}

.cs-browse-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px 16px;
    text-align: center;
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}

.cs-browse-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
    border-color: #2B7AC4;
    text-decoration: none;
    color: inherit;
}

.cs-browse-card__logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(43, 122, 196, 0.12), rgba(124, 179, 66, 0.12));
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-browse-card__logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cs-browse-card h3 {
    font-size: 0.95rem;
    font-weight: 800;
    margin: 0 0 8px;
    color: #0f172a;
}

.cs-browse-card__count {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(124, 179, 66, 0.15);
    color: #4d7c0f;
    font-size: 0.75rem;
    font-weight: 800;
}

.cs-empty-note {
    grid-column: 1 / -1;
    text-align: center;
    padding: 32px 16px;
    color: #64748b;
    background: #fff;
    border-radius: 16px;
    border: 1px dashed #cbd5e1;
}

/* Car cards */
.cs-cars-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.cs-cars-grid > .cs-car-card {
    min-width: 0;
    width: 100%;
    height: 100%;
}

@media (max-width: 1199px) {
    .cs-cars-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 991px) {
    .cs-cars-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    .cs-cars-grid { grid-template-columns: minmax(0, 1fr); }
}

.cs-car-card {
    display: flex !important;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    margin: 0;
}

.cs-car-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.1);
}

.cs-car-card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #e2e8f0;
}

.cs-car-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s;
}

.cs-car-card:hover .cs-car-card__media img {
    transform: scale(1.05);
}

.cs-car-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2B7AC4, #7CB342);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
}

.cs-car-card__actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
}

.cs-car-card__icon-btn {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cs-car-card__icon-btn:hover { color: #ef4444; }

.cs-car-card__body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.cs-car-card__title {
    font-size: 1.05rem;
    font-weight: 900;
    margin: 0 0 4px;
    color: #0f172a;
    line-height: 1.35;
}

.cs-car-card__title a {
    color: inherit;
    text-decoration: none;
}

.cs-car-card:hover .cs-car-card__title a { color: #2B7AC4; }

.cs-car-card__meta-line {
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 12px;
}

.cs-car-card__specs {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.cs-car-card__specs li {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #475569;
    min-width: 0;
}

.cs-car-card__specs li span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cs-car-card__specs li i {
    width: 14px;
    flex-shrink: 0;
    color: #2B7AC4;
}

.cs-car-card__footer {
    border-top: 1px solid #eef2f7;
    padding-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}

.cs-car-card__price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.cs-car-card__price {
    font-weight: 900;
    color: #1e5aa8;
    line-height: 1.2;
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    word-break: break-word;
}

.cs-car-card__views {
    font-size: 0.75rem;
    color: #64748b;
    white-space: nowrap;
}

.cs-car-card__cta {
    display: flex !important;
    align-items: center;
    justify-content: center;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2B7AC4, #7CB342);
    color: #fff !important;
    font-size: 0.88rem;
    font-weight: 800;
    text-align: center;
}

.cs-load-more-wrap { text-align: center; margin-top: 32px; }

.cs-load-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    height: 48px;
    padding: 0 24px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #2B7AC4, #7CB342);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(43, 122, 196, 0.22);
}

.cs-load-more:disabled { opacity: 0.6; cursor: not-allowed; }

.cs-loader {
    display: none;
    text-align: center;
    margin-top: 20px;
    color: #64748b;
    font-weight: 700;
}

/* Trust section */
.cs-trust {
    background: linear-gradient(180deg, #eef3f9 0%, #fff 100%);
}

.cs-trust-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

@media (max-width: 768px) {
    .cs-trust-grid { grid-template-columns: 1fr; }
}

.cs-trust-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 28px 22px;
    text-align: center;
    transition: box-shadow 0.2s, transform 0.2s;
}

.cs-trust-card:hover {
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

.cs-trust-card__icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2B7AC4, #7CB342);
    color: #fff;
    font-size: 1.4rem;
    font-weight: 900;
}

.cs-trust-card h3 {
    font-size: 1.05rem;
    font-weight: 900;
    margin: 0 0 8px;
}

.cs-trust-card p {
    margin: 0;
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.55;
}
