* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --primary-light: #e8f0fe;
    --accent: #c8a455;
    --accent-dark: #b8943f;
    --accent-light: #f5edd6;
    --secondary: #ff6b35;
    --secondary-dark: #e55a2b;
    --success: #16a34a;
    --text: #1a1a2e;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --bg: #f1f5f9;
    --bg-dark: #e2e8f0;
    --white: #ffffff;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
}

html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-dark);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.header {
    background: #f0f0f0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    backdrop-filter: blur(12px);
}

.header-top .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.header-top-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    position: relative;
    perspective: 800px;
    white-space: nowrap;
    flex-shrink: 0;
}

.logo:hover {
    color: var(--text);
}

.logo-img {
    height: 48px;
    width: auto;
    position: relative;
    filter: drop-shadow(0 0 2px rgba(200, 164, 85, 0.3));
    border: none;
    background: transparent;
    border-radius: 0;
    animation: logoSpin 6s ease-in-out infinite, logoShimmer 3s ease-in-out infinite;
}

.logo:hover .logo-img {
    animation: logoSpinFast 1s linear infinite, logoShimmer 1.5s ease-in-out infinite;
    filter: brightness(1.3) drop-shadow(0 0 15px rgba(200, 164, 85, 0.8));
}

@keyframes logoShimmer {
    0%, 100% { filter: brightness(1) drop-shadow(0 0 2px rgba(200, 164, 85, 0.3)); }
    25% { filter: brightness(1.2) drop-shadow(0 0 10px rgba(200, 164, 85, 0.5)); }
    50% { filter: brightness(1.35) drop-shadow(0 0 20px rgba(200, 164, 85, 0.7)); }
    75% { filter: brightness(1.2) drop-shadow(0 0 10px rgba(200, 164, 85, 0.5)); }
}

@keyframes logoSpin {
    0% { transform: rotateY(0deg); }
    40% { transform: rotateY(0deg); }
    50% { transform: rotateY(360deg); }
    100% { transform: rotateY(360deg); }
}

@keyframes logoSpinFast {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(360deg); }
}

.logo-text-group {
    display: flex;
    flex-direction: column;
    line-height: 1;
}
.logo-text {
    background: linear-gradient(135deg, #c8a455 0%, #e8d18c 25%, #c8a455 50%, #a88832 75%, #c8a455 100%);
    background-size: 300% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShimmer 3s ease-in-out infinite;
    letter-spacing: 1px;
    font-size: 22px;
}
.logo-slogan {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-top: 6px;
    padding-right: 0;
    text-align: right;
    background: linear-gradient(135deg, #1a1a1a 0%, #4a4a4a 25%, #1a1a1a 50%, #333 75%, #1a1a1a 100%);
    background-size: 300% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShimmer 3s ease-in-out infinite;
}

@keyframes textShimmer {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 200% center; }
}

.header-nav {
    display: flex;
    gap: 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-item:hover {
    background: rgba(0,0,0,0.06);
    color: var(--text);
}

.nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
}

.nav-svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.nav-compare-img {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    object-fit: contain;
    filter: brightness(0);
    transition: transform 0.3s ease, filter 0.3s ease;
}

.nav-item:hover .nav-compare-img {
    transform: scale(1.15) rotate(-5deg);
    filter: brightness(0) saturate(100%) invert(73%) sepia(14%) saturate(1536%) hue-rotate(4deg) brightness(92%);
}

.nav-item.active .nav-compare-img {
    filter: brightness(0) saturate(100%) invert(73%) sepia(14%) saturate(1536%) hue-rotate(4deg) brightness(92%);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-post {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: var(--white);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(200, 164, 85, 0.3);
}

.btn-post:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(200, 164, 85, 0.4);
    color: var(--white);
}

.btn-auth {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: var(--bg);
    color: var(--text);
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 13px;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-auth svg {
    flex-shrink: 0;
}

.btn-auth:hover {
    background: var(--bg-dark);
    color: var(--text);
}

.hero {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    background: url('/static/images/hero-bg.jpg') center/cover no-repeat;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.85) 0%, rgba(26, 26, 46, 0.6) 50%, rgba(26, 26, 46, 0.75) 100%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 60px 24px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero-content h1 {
    color: var(--white);
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.2;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.hero-subtitle {
    color: rgba(255,255,255,0.8);
    font-size: 17px;
    margin-bottom: 36px;
}

.search-form {
    max-width: 780px;
    margin: 0 auto;
}

.search-fields {
    display: flex;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.search-field {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    border-right: 1px solid var(--border);
}

.search-field:last-of-type {
    border-right: none;
}

.search-field-icon {
    position: absolute;
    left: 16px;
    width: 18px;
    height: 18px;
    color: var(--text-light);
    pointer-events: none;
}

.search-select {
    width: 100%;
    padding: 18px 16px 18px 42px;
    border: none;
    font-size: 15px;
    background: transparent;
    cursor: pointer;
    outline: none;
    color: var(--text);
}

.search-select:disabled {
    background: var(--bg);
    cursor: not-allowed;
    color: var(--text-light);
}

.search-submit {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 18px 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.search-submit:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #0d47a1 100%);
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    margin-top: 36px;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--white);
}

.hero-stat-label {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.2);
}

.main {
    min-height: calc(100vh - 200px);
}

.main-categories {
    padding: 40px 0;
}

.categories-grid-main {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.category-card-main {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px 32px;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border: 1px solid transparent;
}

.category-card-main:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.category-card-main.cars:hover {
    border-color: var(--primary);
}

.category-card-main.tow:hover {
    border-color: var(--secondary);
}

.cat-icon-wrap {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cat-icon-wrap.cars {
    background: var(--primary-light);
    color: var(--primary);
}

.cat-icon-wrap.tow {
    background: #fff2ec;
    color: var(--secondary);
}

.cat-icon-wrap.dealer {
    background: #fef9e7;
}

.category-card-main.dealer:hover {
    border-color: #d97706;
}

.cat-info h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text);
}

.cat-info p {
    color: var(--text-secondary);
    font-size: 14px;
}

.cat-arrow {
    margin-left: auto;
    color: var(--text-light);
    transition: transform 0.2s;
}

.category-card-main:hover .cat-arrow {
    transform: translateX(4px);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 24px;
    font-weight: 700;
}

.see-all {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-weight: 500;
    font-size: 14px;
    transition: gap 0.2s;
}

.see-all:hover {
    gap: 10px;
}

.popular-brands {
    padding: 40px 0;
    background: var(--white);
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 16px;
}

.brand-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 12px;
    background: var(--bg);
    border-radius: var(--radius-lg);
    transition: all 0.2s;
    border: 1px solid transparent;
}

.brand-card:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.brand-logo {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.brand-logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.brand-logo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
}

.brand-name {
    font-size: 12px;
    color: var(--text);
    text-align: center;
    font-weight: 500;
}

.brands-scroll-wrapper {
    position: relative;
}

.brands-swipe-hint {
    display: none;
}

.recent-listings {
    padding: 48px 0;
}

/* v34: minmax 280px → 250px, gap 20px → 16px (compact cards ~272x204) */
.listings-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.listing-card-new {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border: 1px solid transparent;
}

.listing-card-new:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border);
}

/* v41: shimmer skeleton while photo loads from cloud */
@keyframes img-shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position:  400px 0; }
}

/* v34: image height 200px → 155px (card size ~272x204) */
.listing-img {
    position: relative;
    height: 155px;
    background: linear-gradient(90deg, #e8edf2 25%, #f5f7fa 50%, #e8edf2 75%);
    background-size: 800px 100%;
    animation: img-shimmer 1.4s infinite linear;
    overflow: hidden;
}

.listing-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.listing-card-new:hover .listing-img img {
    transform: scale(1.05);
}

.no-photo {
    width: 100%;
    height: 100%;
    animation: none;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-dark) 100%);
}

/* v34: badge reduced for compact cards */
.badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.dealer {
    background: var(--success);
    color: var(--white);
}

.badge.tow {
    background: var(--secondary);
    color: var(--white);
}

/* v34: padding 18px → 12px (compact cards ~272x204) */
.listing-body {
    padding: 12px;
}

/* v34: price font 20px → 17px (compact cards) */
.listing-price {
    font-size: 17px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 3px;
}

/* v34: title font 15px → 14px */
.listing-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 4px;
    line-height: 1.3;
}

.listing-specs {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.listing-specs-line {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    line-height: 1.4;
    font-weight: 600;
}

.listing-location {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--text-light);
}

.listing-location svg {
    flex-shrink: 0;
}

.listing-location .city-name {
    font-size: 14.5px;
    font-weight: 600;
    color: #b8860b;
}

.regions-section {
    padding: 48px 0;
    background: var(--white);
}

.regions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.region-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--bg);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 14px;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.region-card:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

.region-count {
    background: var(--primary-light);
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 24px;
    text-align: center;
}

.region-card svg {
    color: var(--text-light);
    transition: transform 0.2s;
}

.region-card:hover svg {
    transform: translateX(3px);
    color: var(--primary);
}

.region-card:hover .region-count {
    background: var(--primary);
    color: #fff;
}

.regions-more {
    text-align: center;
    margin-top: 28px;
}

.btn-outline {
    display: inline-block;
    padding: 12px 32px;
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: var(--radius);
    font-weight: 600;
    transition: all 0.2s;
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.promo-section {
    padding: 64px 0;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
}

.promo-bg-animation {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 600px 400px at 20% 50%, rgba(200,164,85,0.15) 0%, transparent 70%),
        radial-gradient(ellipse 500px 300px at 80% 30%, rgba(26,115,232,0.12) 0%, transparent 70%),
        radial-gradient(ellipse 400px 300px at 60% 80%, rgba(22,163,74,0.08) 0%, transparent 70%);
    animation: promoGlow 8s ease-in-out infinite alternate;
}

@keyframes promoGlow {
    0% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
    100% { opacity: 0.7; transform: scale(1); }
}

.promo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.promo-card {
    padding: 40px 28px;
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius-xl);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255,255,255,0.1);
}

.promo-card:hover {
    transform: translateY(-6px);
    background: rgba(255,255,255,0.1);
    border-color: rgba(200,164,85,0.3);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.promo-icon-wrap {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 22px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.promo-card:hover .promo-icon-wrap {
    transform: scale(1.1) rotate(-5deg);
}

.promo-icon-blue {
    background: linear-gradient(135deg, rgba(26,115,232,0.2) 0%, rgba(26,115,232,0.1) 100%);
    color: #60a5fa;
    box-shadow: 0 4px 20px rgba(26,115,232,0.15);
}

.promo-icon-green {
    background: linear-gradient(135deg, rgba(22,163,74,0.2) 0%, rgba(22,163,74,0.1) 100%);
    color: #4ade80;
    box-shadow: 0 4px 20px rgba(22,163,74,0.15);
}

.promo-icon-gold {
    background: linear-gradient(135deg, rgba(200,164,85,0.25) 0%, rgba(200,164,85,0.1) 100%);
    color: #d4a843;
    box-shadow: 0 4px 20px rgba(200,164,85,0.2);
}

.promo-card h3 {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #f1f5f9;
}

.promo-card p {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 14px;
}

.promo-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    font-weight: 600;
    font-size: 14px;
    transition: gap 0.2s, color 0.2s;
}

.promo-link:hover {
    gap: 10px;
    color: #e8c870;
}

.cta-section {
    padding: 48px 0;
}

.cta-content {
    text-align: center;
    padding: 56px 48px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    border-radius: var(--radius-xl);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.cta-content::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}

.cta-content h2 {
    font-size: 30px;
    font-weight: 800;
    margin-bottom: 10px;
    position: relative;
}

.cta-content p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 28px;
    position: relative;
}

.btn-cta {
    display: inline-block;
    padding: 14px 40px;
    background: var(--white);
    color: var(--accent-dark);
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 16px;
    transition: all 0.2s;
    position: relative;
    box-shadow: var(--shadow);
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--accent-dark);
}

.footer {
    background: #0f172a;
    color: var(--white);
    padding: 56px 0 28px;
    margin-top: 48px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 16px;
}

.footer-logo-img {
    height: 44px;
    width: auto;
    filter: brightness(1.2);
    border: none;
    background: transparent;
}

.footer-logo-text-group {
    display: flex;
    flex-direction: column;
    line-height: 1;
    align-items: flex-end;
}
.footer-logo-text {
    background: linear-gradient(135deg, #c8a455 0%, #e8d18c 25%, #c8a455 50%, #a88832 75%, #c8a455 100%);
    background-size: 300% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShimmer 3s ease-in-out infinite;
}
.footer-logo-slogan {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-top: 6px;
    text-align: right;
    background: linear-gradient(135deg, #ccc 0%, #fff 25%, #ccc 50%, #999 75%, #ccc 100%);
    background-size: 300% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShimmer 3s ease-in-out infinite;
}

.footer-desc {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.08);
    border-radius: 8px;
    color: var(--white);
    font-size: 13px;
    transition: all 0.2s;
    border: 1px solid rgba(255,255,255,0.1);
}

.social-link:hover {
    background: rgba(255,255,255,0.15);
    color: var(--white);
}

.footer-col h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 18px;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 12px;
}

.footer-col a {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    color: rgba(255,255,255,0.4);
    font-size: 13px;
}

.ym-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border: 1px solid rgba(200,164,85,0.35);
    border-radius: 20px;
    background: rgba(200,164,85,0.07);
    color: rgba(200,164,85,0.65);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.3px;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ym-badge:hover {
    border-color: rgba(200,164,85,0.7);
    background: rgba(200,164,85,0.14);
    color: #c8a455;
}

.ym-badge svg {
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

.catalog-header {
    background: var(--white);
    padding: 28px 0;
    border-bottom: 1px solid var(--border);
}

.catalog-header h1 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
}

.catalog-header .count {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 400;
}

.filters-bar {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg);
    transition: all 0.2s;
}

.filter-btn:hover {
    background: var(--bg-dark);
    color: var(--text);
}

.filter-btn.active {
    background: var(--primary);
    color: var(--white);
}

.catalog-content {
    padding: 24px 0;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
}

.filters-sidebar {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 88px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.filters-sidebar.collapsed {
    padding: 12px 24px;
}

.filters-sidebar.collapsed .filters-toggle {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filters-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 0;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filters-toggle:hover {
    color: var(--primary);
}

.filters-toggle span {
    flex: 1;
    text-align: left;
}

.filters-chevron {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.filters-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.filter-select {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    background: var(--white);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    color: var(--text);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.filter-range {
    display: flex;
    gap: 8px;
    align-items: center;
    max-width: 100%;
    overflow: hidden;
}

.filter-range input {
    flex: 1;
    min-width: 0;
    width: 0;
    padding: 11px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    -moz-appearance: textfield;
}

.filter-range input::-webkit-outer-spin-button,
.filter-range input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.filter-range input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.filter-range span {
    color: var(--text-light);
    flex-shrink: 0;
}

.filter-submit {
    padding: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-submit:hover {
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.filter-reset {
    text-align: center;
    font-size: 13px;
}

.filter-reset a {
    color: var(--text-secondary);
    transition: color 0.2s;
}

.filter-reset a:hover {
    color: var(--primary);
}

.catalog-main {
    min-width: 0;
}

/* v34: minmax 280px → 250px, gap 20px → 16px (compact cards ~272x204) */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.listing-card {
    display: block;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border: 1px solid transparent;
}

.listing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border);
}

/* v34: image height 200px → 155px (compact cards ~272x204) */
.listing-image {
    position: relative;
    height: 155px;
    background: linear-gradient(90deg, #e8edf2 25%, #f5f7fa 50%, #e8edf2 75%);
    background-size: 800px 100%;
    animation: img-shimmer 1.4s infinite linear;
    overflow: hidden;
}

.listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: transform;
}

.page-loaded .listing-image img {
    transition: transform 0.3s;
}

.listing-card:hover .listing-image img {
    transform: scale(1.05);
}

.no-image {
    width: 100%;
    height: 100%;
    animation: none;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-dark) 100%);
}

/* v34: badge padding/position reduced for compact cards */
.listing-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.badge-dealer {
    background: var(--success);
    color: var(--white);
}

.badge-tow {
    background: var(--secondary);
    color: var(--white);
}

/* v34: padding 18px → 12px (compact cards ~272x204) */
.listing-info {
    padding: 12px;
}

/* v34: title font 15px → 14px */
.listing-info .listing-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

/* v34: price font 20px → 17px */
.listing-info .listing-price {
    font-size: 17px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 4px;
}

.listing-info .listing-location {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-light);
    font-size: 13px;
}

.listing-info .listing-specs {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.listing-photo-dealer-name {
    position: absolute;
    bottom: 8px;
    left: 8px;
    display: inline-block;
    max-width: calc(100% - 16px);
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    color: #f0d68a;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 36px;
    padding: 20px;
}

.page-btn {
    padding: 10px 24px;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius);
    font-weight: 600;
    transition: all 0.2s;
}

.page-btn:hover {
    background: var(--primary-dark);
    color: var(--white);
    transform: translateY(-1px);
}

.page-info {
    color: var(--text-secondary);
    font-size: 14px;
}

.no-results {
    text-align: center;
    padding: 64px;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.no-results-icon {
    color: var(--text-light);
    margin-bottom: 16px;
}

.no-results p {
    color: var(--text-secondary);
    font-size: 16px;
}

.listing-page {
    padding: 24px 0;
}

.breadcrumbs {
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

.breadcrumbs a {
    color: var(--text-secondary);
}

.breadcrumbs a:hover {
    color: var(--primary);
}

.listing-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 28px;
    box-shadow: var(--shadow);
}

.listing-gallery,
.listing-details {
    min-width: 0;
    overflow: hidden;
}

.gallery-main {
    height: 420px;
    background: var(--bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.85);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.2s;
    z-index: 5;
    opacity: 0.7;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    -webkit-focus-ring-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.gallery-arrow:hover {
    background: #fff;
    color: #374151;
    opacity: 1;
    box-shadow: 0 3px 12px rgba(0,0,0,0.2);
}

.gallery-arrow-left {
    left: 12px;
}

.gallery-arrow-right {
    right: 12px;
}

.gallery-counter {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 12px;
    pointer-events: none;
}

.gallery-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
}

.gallery-thumbs .thumb {
    width: 72px;
    height: 54px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.gallery-thumbs .thumb:hover,
.gallery-thumbs .thumb.active {
    border-color: var(--primary);
}

.listing-specs-line {
    font-size: 17px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 12px;
}

.dealer-company-divider {
    color: var(--text-light);
    font-size: 16px;
    flex-shrink: 0;
}

.badge-private {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    background: #f3e8ff;
    color: #7c3aed;
}

.listing-details h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.listing-price-block {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.listing-price-block .price {
    font-size: 30px;
    font-weight: 800;
    color: var(--text);
}

.listing-location-block {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 16px;
    margin: 8px 0;
}

.listing-location-block svg {
    color: var(--primary);
    flex-shrink: 0;
}

.listing-dealer-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 4px;
    flex-wrap: nowrap;
    max-width: 100%;
    overflow: hidden;
}

.listing-dealer-row .badge-dealer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    background: var(--success);
    color: var(--white);
    flex-shrink: 0;
}

.dealer-company-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 260px;
    cursor: pointer;
    transition: max-width 0.3s ease;
}
.dealer-company-name.expanded {
    white-space: normal;
    overflow: visible;
    max-width: none;
    text-overflow: unset;
}

.listing-views-comments-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 6px 0 4px;
    font-size: 14px;
    white-space: nowrap;
}

.listing-badge-views-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0 4px;
    flex-wrap: nowrap;
}

.listing-badge-views-row .badge-dealer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    background: var(--success);
    color: var(--white);
    flex-shrink: 0;
}

.listing-views-comments {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 1;
    min-width: 0;
    font-size: 14px;
    white-space: nowrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-item svg {
    color: var(--primary);
    flex-shrink: 0;
}

.contact-item a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.contact-item a:hover {
    text-decoration: underline;
}

.contact-empty {
    color: var(--text-light);
}

.no-image-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 100%;
    min-height: 300px;
    color: var(--text-light);
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-dark) 100%);
    border-radius: var(--radius-lg);
    font-size: 14px;
}

.listing-date {
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-light);
}

.description-card {
    margin-top: 20px;
    background: #f5f5f5;
    border-radius: var(--radius-lg);
    padding: 24px 28px;
}

.description-card-header h3 {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.description-card-body p {
    margin: 0;
    font-size: 15px;
    line-height: 1.75;
    color: #444;
    white-space: pre-line;
}

.description-inline {
    display: none;
}

.description-inline h3 {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.description-inline p {
    margin: 0;
    font-size: 15px;
    line-height: 1.75;
    color: #444;
    white-space: pre-line;
}

.specs-table {
    margin: 20px 0;
}

.specs-table h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.specs-table table {
    width: 100%;
}

.specs-table td {
    padding: 10px 0;
    font-size: 16px;
    border-bottom: 1px solid var(--bg);
}

.specs-table td:first-child {
    color: var(--text-secondary);
}

.contact-block {
    background: var(--bg);
    padding: 20px;
    border-radius: var(--radius-lg);
    margin: 16px 0 4px;
}

.contact-block h3 {
    font-size: 15px;
    margin-bottom: 12px;
}

.contact-block p {
    margin-bottom: 8px;
    font-size: 14px;
}

.similar-section {
    margin-top: 40px;
}

.similar-section h2 {
    font-size: 20px;
    margin-bottom: 20px;
}

.about-page {
    padding: 40px 0;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    padding: 48px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.about-content h1 {
    font-size: 28px;
    margin-bottom: 24px;
}

.about-content h2 {
    font-size: 20px;
    margin: 24px 0 12px;
}

.about-content p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 12px;
}

.contact-info {
    background: var(--bg);
    padding: 24px;
    border-radius: var(--radius-lg);
    margin-top: 24px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 15px;
}

.error-page {
    padding: 100px 0;
    text-align: center;
}

.error-content h1 {
    font-size: 100px;
    color: var(--primary);
    margin-bottom: 16px;
}

.error-content p {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.btn-primary {
    display: inline-block;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border-radius: var(--radius);
    font-weight: 600;
    transition: all 0.2s;
}

.btn-primary:hover {
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.auth-page {
    padding: 60px 0;
    min-height: calc(100vh - 300px);
    display: flex;
    align-items: center;
}

.auth-card {
    max-width: 420px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 44px;
    box-shadow: var(--shadow-lg);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h1 {
    font-size: 24px;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group small {
    color: var(--text-light);
    font-size: 12px;
}

.telegram-label {
    display: flex;
    align-items: center;
    gap: 6px;
}

.telegram-tooltip-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    outline: none;
}

.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
}

.telegram-tooltip {
    display: none;
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    width: 280px;
    padding: 12px 14px;
    background: var(--text);
    color: #fff;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    z-index: 100;
    pointer-events: none;
}

.telegram-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--text);
}

.telegram-tooltip-trigger:hover .telegram-tooltip,
.telegram-tooltip-trigger:focus .telegram-tooltip {
    display: block;
}

.code-input {
    text-align: center;
    font-size: 24px !important;
    letter-spacing: 8px;
    font-weight: 600;
}

.btn-submit {
    padding: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-submit:hover {
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.auth-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.profile-page {
    padding: 32px 0;
}

.profile-header {
    margin-bottom: 32px;
}

.profile-header h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.profile-header p {
    color: var(--text-secondary);
}

.profile-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
}

.profile-sidebar {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 16px;
    box-shadow: var(--shadow);
    height: fit-content;
}

.profile-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.profile-nav-item:hover {
    background: var(--bg);
}

.profile-nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
}

.profile-nav-item.logout {
    color: #dc2626;
    margin-top: 16px;
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

.profile-nav-item.logout:hover {
    background: #fef2f2;
}

.nav-icon {
    font-size: 18px;
}

.profile-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.profile-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 28px;
    box-shadow: var(--shadow);
}

.profile-card h2 {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-label {
    color: var(--text-secondary);
    min-width: 140px;
    font-size: 14px;
}

.info-value {
    font-weight: 500;
}

.badge-verified {
    background: #dcfce7;
    color: #16a34a;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge-unverified {
    background: #fef3c7;
    color: #d97706;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.quick-actions {
    display: flex;
    gap: 16px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 24px;
    background: var(--bg);
    border-radius: var(--radius-lg);
    color: var(--text);
    font-weight: 500;
    transition: all 0.2s;
}

.action-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.action-icon {
    font-size: 20px;
}

@media (max-width: 1024px) {
    .catalog-layout {
        grid-template-columns: 1fr;
    }
    
    .filters-sidebar {
        position: static;
    }
    
    .listing-layout {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .hero-content h1 {
        font-size: 32px;
    }
}

.nav-scroll-hint {
    display: none !important;
}

@media (max-width: 768px) {
    .header-top .container {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 20px;
        gap: 12px;
    }
    
    .header-nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        position: relative;
        -webkit-overflow-scrolling: touch;
        padding-right: 30px;
    }

    .header-nav::-webkit-scrollbar {
        display: none;
    }
    
    .hero {
        min-height: 400px;
    }
    
    .hero-content h1 {
        font-size: 26px;
    }
    
    .hero-subtitle {
        font-size: 15px;
    }
    
    .search-fields {
        flex-direction: column;
        border-radius: var(--radius-lg);
    }
    
    .search-field {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    
    .search-submit {
        justify-content: center;
    }
    
    .hero-stats {
        gap: 20px;
    }
    
    .hero-stat-value {
        font-size: 22px;
    }
    
    .categories-grid-main {
        grid-template-columns: 1fr;
    }
    
    .promo-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .footer-brand {
        grid-column: 1 / -1;
    }
    
    .brands-scroll-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding-bottom: 8px;
    }
    .brands-scroll-wrapper::-webkit-scrollbar {
        display: none;
    }
    .brands-grid {
        display: flex;
        flex-wrap: nowrap;
        gap: 12px;
        grid-template-columns: unset;
        width: max-content;
    }
    .brands-grid .brand-card {
        min-width: 90px;
        scroll-snap-align: start;
        flex-shrink: 0;
    }
    .brands-swipe-hint {
        display: flex;
        align-items: center;
        gap: 5px;
        font-size: 12px;
        color: #c8a455;
        font-weight: 600;
        margin-bottom: 10px;
        animation: swipe-blink 1.2s infinite ease-in-out;
        pointer-events: none;
    }
    .brands-swipe-hint svg {
        animation: swipe-arrow 1.2s infinite ease-in-out;
    }
    @keyframes swipe-blink {
        0%, 100% { opacity: 1; }
        50%       { opacity: 0.3; }
    }
    @keyframes swipe-arrow {
        0%   { transform: translateX(0); }
        50%  { transform: translateX(5px); }
        100% { transform: translateX(0); }
    }
    
    .profile-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        background: var(--white);
        z-index: 1000;
        box-shadow: 4px 0 20px rgba(0,0,0,0.15);
        transition: left 0.3s ease;
        padding: 20px 0;
        overflow-y: auto;
    }
    .profile-sidebar.open {
        left: 0;
    }
    .profile-nav {
        flex-direction: column;
        flex-wrap: nowrap;
    }
    .profile-nav-item {
        flex: unset;
        min-width: unset;
        justify-content: flex-start;
        padding: 14px 24px;
        font-size: 15px;
    }
    .profile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.4);
        z-index: 999;
    }
    .profile-menu-overlay.show {
        display: block;
    }
    .profile-menu-toggle {
        display: flex !important;
        align-items: center;
        gap: 8px;
        padding: 10px 18px;
        background: var(--white);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
        margin-bottom: 16px;
        color: var(--text);
        box-shadow: var(--shadow-sm);
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .profile-page .container {
        padding-left: 12px;
        padding-right: 12px;
        overflow-x: hidden;
    }
    
    .profile-header h1 {
        font-size: 24px;
    }
    
    .profile-header p {
        font-size: 14px;
    }
    
    .btn-telegram {
        font-size: 13px;
        padding: 10px 16px;
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }
    
    .btn-add-email {
        font-size: 12px;
        padding: 4px 8px;
    }
    
    .bot-status-card {
        padding: 16px;
    }
    
    .quick-actions {
        flex-direction: column;
    }
    
    .nav-scroll-hint {
        display: flex !important;
        align-items: center;
        justify-content: center;
        position: absolute;
        right: 0;
        width: 32px;
        height: 36px;
        background: linear-gradient(to left, rgba(255,255,255,0.95) 50%, transparent);
        color: var(--accent);
        z-index: 5;
        animation: scrollHintPulse 2s ease-in-out infinite;
        cursor: pointer;
        order: 4;
    }
    
    @keyframes scrollHintPulse {
        0%, 100% { opacity: 1; transform: translateX(0); }
        50% { opacity: 0.5; transform: translateX(5px); }
    }
    
    .header-top .container {
        position: relative;
    }

    .nav-item span {
        display: none;
    }
    .nav-item {
        padding: 8px;
        min-width: 40px;
        justify-content: center;
    }
    .nav-svg {
        width: 26px;
        height: 26px;
    }

    .footer-col a, .footer-col li {
        word-break: normal;
        overflow-wrap: break-word;
        font-size: 12px;
        line-height: 1.4;
    }
    
    .footer-col li {
        margin-bottom: 6px;
    }
    
    .footer-col h4 {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .listing-card .vc-label, .listing-card #comments-word-display {
        display: none !important;
    }

    .description-inline {
        display: block !important;
        background: #f5f5f5;
        border-radius: var(--radius-lg);
        padding: 20px 24px;
        margin: 16px 0;
    }

    .description-card {
        display: none !important;
    }

    .profile-page .listings-grid {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    /* v34: max-width 400px → 340px for compact mobile cards */
    .profile-page .listing-card {
        width: 100%;
        max-width: 340px;
    }

    .profile-main .profile-card {
        text-align: left;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .bot-status-card {
        flex-direction: column;
        text-align: center;
    }
    .package-counter-block {
        flex-direction: column;
        text-align: center;
    }

    .listing-layout {
        grid-template-columns: 1fr !important;
        padding: 16px !important;
        gap: 16px !important;
        overflow: hidden !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .listing-gallery,
    .listing-details {
        min-width: 0 !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    .gallery-main {
        height: 260px !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    .gallery-thumbs {
        flex-wrap: nowrap;
        overflow-x: auto;
        max-width: 100% !important;
    }

    .listing-price-block .price {
        font-size: 24px !important;
        word-break: break-word;
    }

    .listing-location-line,
    .listing-info-block {
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .listing-image {
        height: 180px;
    }

    .listing-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .listing-details {
        overflow-wrap: break-word;
        word-break: break-word;
        max-width: 100%;
        min-width: 0;
    }

    .listing-location-block {
        max-width: 100%;
        flex-wrap: wrap;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .listing-price-block {
        flex-wrap: wrap;
        max-width: 100%;
    }

    .listing-title-row {
        flex-wrap: wrap;
    }

    .listing-title-row h1 {
        font-size: 20px !important;
    }

    .contact-btn,
    .btn-contact {
        width: 100%;
        box-sizing: border-box;
    }
}

.profile-menu-toggle {
    display: none;
}

.profile-menu-overlay {
    display: none;
}

/* ========== Profile Cabinet Styles ========== */

.bot-link-status {
    margin-top: 4px;
}

.bot-status-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.bot-status-linked {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.bot-status-unlinked {
    background: #fffbeb;
    border-color: #fde68a;
}

.bot-status-indicator {
    flex-shrink: 0;
}

.bot-status-info {
    flex: 1;
}

.bot-status-info p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 6px;
}

.bot-status-info code {
    background: rgba(0,0,0,0.06);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}

.bot-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

.bot-status-badge-green {
    background: #dcfce7;
    color: #16a34a;
}

.bot-status-badge-orange {
    background: #fef3c7;
    color: #d97706;
}

.btn-telegram {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #0088cc;
    color: var(--white);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-telegram:hover {
    background: #006da3;
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,136,204,0.3);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px;
    background: var(--bg);
    border-radius: var(--radius-lg);
    transition: all 0.2s;
    border: 1px solid transparent;
    text-align: center;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--border);
    color: var(--text);
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.stat-pending .stat-value { color: #d97706; }
.stat-published .stat-value { color: #16a34a; }
.stat-rejected .stat-value { color: #dc2626; }
.stat-revision .stat-value { color: #ea580c; }
.stat-inactive .stat-value { color: #64748b; }

.stat-pending:hover { border-color: #fde68a; background: #fffbeb; }
.stat-published:hover { border-color: #bbf7d0; background: #f0fdf4; }
.stat-rejected:hover { border-color: #fecaca; background: #fef2f2; }
.stat-revision:hover { border-color: #fed7aa; background: #fff7ed; }
.stat-inactive:hover { border-color: #cbd5e1; background: #f8fafc; }

/* Listings tabs */
.listings-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.listings-tabs::-webkit-scrollbar {
    display: none;
}

.listings-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg);
    transition: all 0.2s;
    white-space: nowrap;
}

.listings-tab:hover {
    background: var(--bg-dark);
    color: var(--text);
}

.listings-tab.active {
    background: var(--primary);
    color: var(--white);
}

.tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(0,0,0,0.1);
}

.listings-tab.active .tab-count {
    background: rgba(255,255,255,0.3);
}

.tab-count-pending { background: #fef3c7; color: #92400e; }
.tab-count-published { background: #dcfce7; color: #166534; }
.tab-count-rejected { background: #fecaca; color: #991b1b; }
.tab-count-revision { background: #fed7aa; color: #9a3412; }
.tab-count-inactive { background: #e2e8f0; color: #475569; }

.listings-tab.active .tab-count-pending,
.listings-tab.active .tab-count-published,
.listings-tab.active .tab-count-rejected,
.listings-tab.active .tab-count-revision,
.listings-tab.active .tab-count-inactive {
    background: rgba(255,255,255,0.3);
    color: var(--white);
}

/* Listing cards */
.my-listings-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.my-listing-card {
    display: flex;
    gap: 20px;
    padding: 16px;
    background: var(--bg);
    border-radius: var(--radius-lg);
    transition: all 0.2s;
    border: 1px solid transparent;
}

.my-listing-card:hover {
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.my-listing-photo {
    width: 160px;
    height: 120px;
    border-radius: var(--radius);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-dark);
}

.my-listing-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-dark) 100%);
}

.my-listing-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.my-listing-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.my-listing-card {
    cursor: pointer;
}

a.my-listing-photo {
    display: block;
    text-decoration: none;
}

.my-listing-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}

.my-listing-title-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.my-listing-title-link:hover {
    color: var(--primary);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-published {
    background: #dcfce7;
    color: #166534;
}

.status-rejected {
    background: #fecaca;
    color: #991b1b;
}

.status-revision {
    background: #fed7aa;
    color: #9a3412;
}

.status-inactive {
    background: #e2e8f0;
    color: #475569;
}

.status-sold {
    background: linear-gradient(135deg, #f0d68a 0%, #d4a84b 100%);
    color: #1a1a2e;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.status-payment {
    background: #dbeafe;
    color: #1e40af;
    animation: pulse-payment 2s ease-in-out infinite;
}

@keyframes pulse-payment {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.btn-pay-listing {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: linear-gradient(135deg, #c8a455, #d4b76a);
    color: #1a1a2e;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn-pay-listing:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(200, 164, 85, 0.35);
    color: #1a1a2e;
    text-decoration: none;
}

.my-listing-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
}

.my-listing-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.my-listing-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Moderation comment */
.moderation-comment {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-top: 4px;
    font-size: 14px;
    line-height: 1.5;
}

.moderation-comment-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-size: 13px;
}

.moderation-comment p {
    color: inherit;
    opacity: 0.9;
}

.moderation-rejected {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.moderation-revision {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
}

/* Listing action buttons */
.my-listing-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
    flex-wrap: wrap;
}

.inline-form {
    display: inline;
}

.btn-deactivate {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: transparent;
    border: 1px solid #dc2626;
    color: #dc2626;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-deactivate:hover {
    background: #dc2626;
    color: var(--white);
}

.btn-renew-listing {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: transparent;
    border: 1px solid #c8a455;
    color: #c8a455;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.btn-renew-listing:hover {
    background: #c8a455;
    color: #1a1a2e;
}

.btn-edit-listing {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent-dark);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-edit-listing:hover {
    background: var(--accent);
    color: var(--white);
}

.btn-view-listing {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-view-listing:hover {
    background: var(--primary);
    color: var(--white);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-state-icon {
    margin-bottom: 16px;
}

.empty-state-text {
    color: var(--text-secondary);
    font-size: 16px;
}

/* Responsive for profile cabinet */
@media (max-width: 768px) {
    .bot-status-card {
        flex-direction: column;
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .stat-card {
        padding: 12px 8px;
    }
    
    .stat-value {
        font-size: 22px;
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    .profile-card {
        padding: 16px;
    }
    
    .profile-card h2 {
        font-size: 16px;
        margin-bottom: 14px;
    }
    
    .info-label {
        min-width: 100px;
        font-size: 13px;
    }
    
    .info-value {
        font-size: 13px;
    }
    
    .info-row {
        gap: 8px;
    }
    
    .my-listing-card {
        flex-direction: column;
        padding: 12px;
    }
    
    .my-listing-photo {
        width: 100%;
        height: 200px;
    }
    
    .my-listing-top {
        flex-direction: column;
        gap: 6px;
    }
    
    .my-listing-title {
        font-size: 14px;
    }
    
    .my-listing-price {
        font-size: 16px;
    }
    
    .my-listing-meta {
        font-size: 12px;
    }
    
    .my-listing-actions {
        flex-wrap: wrap;
    }
    
    .listings-filter-mobile {
        display: block !important;
    }
    .listings-tabs {
        display: none !important;
    }
}

/* Mobile filter dropdown */
.listings-filter-mobile {
    display: none;
    margin-bottom: 16px;
    position: relative;
}

.filter-dropdown-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 16px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.filter-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 100;
    margin-top: 4px;
    overflow: hidden;
}

.filter-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    font-size: 14px;
    color: var(--text);
    text-decoration: none;
    transition: background 0.15s;
}

.filter-dropdown-item:hover {
    background: var(--bg);
}

.filter-dropdown-item.active {
    background: var(--bg-dark);
    font-weight: 600;
}

/* Nav icon animations */
.nav-item .nav-svg {
    transition: transform 0.3s ease, color 0.3s ease;
}
.nav-item:hover .nav-svg {
    transform: scale(1.15) rotate(-5deg);
    color: var(--accent);
}
.nav-item.active .nav-svg {
    color: var(--primary);
}
.nav-vin .vin-icon {
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
}
.nav-vin:hover .vin-icon {
    transform: scale(1.2) rotate(-8deg);
    filter: drop-shadow(0 2px 6px rgba(200, 164, 85, 0.5));
}
.nav-vin:hover .vin-icon path,
.nav-vin:hover .vin-icon rect {
    fill: var(--accent);
}
.nav-vin:hover .vin-icon circle:not([fill="#6b7280"]),
.nav-vin:hover .vin-icon line {
    stroke: var(--accent);
}
.nav-vin:hover .vin-icon circle[fill="#6b7280"] {
    fill: #8B7535;
}
.nav-vin.active .vin-icon {
    filter: drop-shadow(0 1px 3px rgba(200, 164, 85, 0.25));
}
.nav-vin.active .vin-icon path,
.nav-vin.active .vin-icon rect {
    fill: var(--primary);
}
.nav-vin.active .vin-icon circle:not([fill="#6b7280"]),
.nav-vin.active .vin-icon line {
    stroke: var(--primary);
}
.nav-vin.active .vin-icon circle[fill="#6b7280"] {
    fill: #1a365d;
}

.custom-file-upload + .file-upload-name + input[type="file"],
.custom-file-upload ~ input[type="file"] {
    display: none;
}
.custom-file-upload {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary), #2a4a7f);
    color: #fff;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 8px rgba(26, 54, 93, 0.2);
}
.custom-file-upload:hover {
    background: linear-gradient(135deg, #2a4a7f, var(--primary));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 54, 93, 0.3);
}
.custom-file-upload svg {
    flex-shrink: 0;
}
.file-upload-name {
    display: inline-block;
    margin-left: 10px;
    color: #6b7280;
    font-size: 13px;
}

/* Category card icon animations */
.cat-icon-wrap svg {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.category-card-main:hover .cat-icon-wrap svg {
    transform: scale(1.15);
}
.cat-icon-wrap.cars {
    background: linear-gradient(135deg, #e8f0fe 0%, #d2e3fc 100%);
}
.cat-icon-wrap.tow {
    background: linear-gradient(135deg, #fff2ec 0%, #ffe0cc 100%);
}

/* VIN page feature icon SVG sizing */
.feature-icon svg {
    width: 36px;
    height: 36px;
    color: #4361ee;
}

/* VIN page spinner */
.btn-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* VIN section heading SVG */
.result-section h3 svg {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 6px;
}

.vin-header h1 svg {
    width: 28px;
    height: 28px;
    vertical-align: middle;
    margin-right: 4px;
}

.error-icon svg {
    width: 48px;
    height: 48px;
    color: #c62828;
}

.legal-page {
    padding: 40px 0 60px;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-sm);
}

.legal-content h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.legal-date {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 30px;
}

.legal-content h2 {
    font-size: 20px;
    font-weight: 600;
    margin-top: 28px;
    margin-bottom: 12px;
    color: var(--text);
}

.legal-content p {
    margin-bottom: 10px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.legal-content ul {
    margin: 8px 0 16px 24px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.legal-content li {
    margin-bottom: 4px;
}

.auth-consent {
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--bg);
    border-radius: var(--radius);
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.6;
    text-align: center;
}

.auth-consent a {
    color: var(--primary);
    text-decoration: underline;
}

.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.auth-tab {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: var(--bg);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.auth-tab:first-child {
    border-right: 1px solid var(--border);
}

.auth-tab.active {
    background: var(--white);
    color: var(--primary);
}

.auth-tab:hover:not(.active) {
    background: #e8e8e8;
}

.auth-tab-content {
    display: none;
}

.auth-tab-content.active {
    display: block;
}

.tg-auth-block {
    text-align: center;
    padding: 20px 0;
}

.tg-auth-steps {
    text-align: left;
    margin-bottom: 24px;
}

.tg-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 15px;
    color: var(--text-secondary);
}

.tg-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.tg-qr-wrapper {
    margin: 20px 0;
}

.tg-qr-img {
    width: 200px;
    height: 200px;
    border-radius: var(--radius);
    border: 2px solid var(--border);
}

.tg-qr-hint {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 8px;
}

.tg-or-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 20px 0;
}

.tg-or-divider::before,
.tg-or-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.tg-or-divider span {
    color: var(--text-light);
    font-size: 14px;
}

.btn-telegram {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: #2AABEE;
    color: white;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-telegram:hover {
    background: #229ED9;
    color: white;
}

.tg-status-block {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    padding: 12px 16px;
    background: #f0f7ff;
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--text-secondary);
}

.tg-status-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #e0e0e0;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Views badge on listing card */
.listing-views-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(4px);
}
.listing-views-badge svg {
    opacity: 0.9;
}

/* Comment count on listing card */
.listing-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    margin-top: 2px;
    gap: 8px;
}
.listing-card-footer .listing-location,
.listing-card-footer p.listing-location {
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
    padding: 0;
}
.listing-card-footer .listing-card-meta-right {
    flex-shrink: 0;
    margin-left: auto;
}
.listing-card-footer .card-stats {
    flex-shrink: 0;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 13px;
    color: #999;
}
.listing-vc-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #777;
}
.listing-vc-item svg {
    flex-shrink: 0;
}
.listing-vc-comments:hover {
    color: #b8860b;
}
.listing-card-meta-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.listing-card-views {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #888;
}
.listing-card-comments {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #888;
}
.listing-card-comments svg {
    stroke: #b8860b;
}

/* Comment notifications in profile */
.comment-notifications-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}
.comment-notif-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px 20px;
    border-left: 3px solid #ddd;
    transition: all 0.2s;
}
.comment-notif-unread {
    background: #fffbeb;
    border-left-color: #b8860b;
}
.comment-notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.comment-notif-author {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 14px;
    color: #1a1a2e;
}
.comment-notif-date {
    font-size: 12px;
    color: #999;
}
.comment-notif-text {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 8px;
}
.comment-notif-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}
.comment-notif-link:hover {
    text-decoration: underline;
}
.profile-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}
.profile-empty .empty-icon {
    margin-bottom: 16px;
}

/* Views count on listing detail page */
.listing-views-count {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #888;
    margin-top: 8px;
}

/* Comments open button */
.comments-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #b8860b, #d4a020);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 12px;
    width: 100%;
    justify-content: center;
}
.comments-open-btn:hover {
    background: linear-gradient(135deg, #9a7209, #b8860b);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(184,134,11,0.3);
}

/* Comments Modal */
.comments-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.comments-modal {
    background: #fff;
    border-radius: 16px;
    max-width: 560px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}
.comments-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #eee;
}
.comments-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #1a1a2e;
}
.comments-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}
.comments-modal-close:hover {
    color: #333;
}
.comments-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
    min-height: 120px;
}
.comments-loading, .comments-empty {
    text-align: center;
    color: #999;
    padding: 40px 0;
    font-size: 14px;
}
.comment-item {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}
.comment-item:last-child {
    border-bottom: none;
}
.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.comment-author {
    font-weight: 600;
    font-size: 14px;
    color: #1a1a2e;
}
.comment-date {
    font-size: 12px;
    color: #aaa;
}
.comment-delete {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 20px;
    color: #ccc;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.comment-delete:hover {
    color: #e74c3c;
}
.comment-text {
    font-size: 14px;
    color: #444;
    line-height: 1.5;
    word-break: break-word;
}
.comments-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    align-items: flex-end;
}
.comments-modal-footer textarea {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    resize: none;
    min-height: 44px;
    max-height: 100px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}
.comments-modal-footer textarea:focus {
    border-color: #b8860b;
}
.comment-send-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #b8860b, #d4a020);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}
.comment-send-btn:hover {
    background: linear-gradient(135deg, #9a7209, #b8860b);
}
.comments-login-prompt {
    justify-content: center;
    font-size: 14px;
    color: #888;
}
.comments-login-prompt a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.filter-count {
    display: inline-block;
    background: rgba(184, 134, 11, 0.15);
    color: #b8860b;
    font-size: 11px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: 4px;
}
.filter-btn.active .filter-count {
    background: rgba(255,255,255,0.3);
    color: #fff;
}

.btn-user {
    max-width: 160px;
    white-space: nowrap;
}
.btn-user-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100px;
    display: inline-block;
    vertical-align: middle;
}

.sidebar-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e74c3c;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    border-radius: 9px;
    padding: 0 5px;
    margin-left: 6px;
}

.admin-delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.9);
    color: #fff;
    border: 2px solid #fff;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    line-height: 1;
    padding: 0;
}
.admin-delete-btn:hover {
    background: rgba(200, 35, 51, 1);
    transform: scale(1.15);
}
.admin-edit-btn {
    position: absolute;
    top: 8px;
    right: 44px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.9);
    color: #fff;
    border: 2px solid #fff;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    line-height: 1;
    padding: 0;
    text-decoration: none;
}
.admin-edit-btn:hover {
    background: rgba(29, 78, 216, 1);
    transform: scale(1.15);
}
.listing-image, .listing-img {
    position: relative;
}

.admin-delete-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.admin-delete-modal {
    background: #1a1a2e;
    border: 1px solid #b8860b;
    border-radius: 12px;
    padding: 24px 28px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    color: #fff;
}
.admin-delete-modal h3 {
    margin-bottom: 12px;
    color: #dc3545;
    font-size: 18px;
}
.admin-delete-modal p {
    margin-bottom: 20px;
    color: #ccc;
    font-size: 14px;
}
.admin-delete-modal-btns {
    display: flex;
    gap: 12px;
    justify-content: center;
}
.admin-delete-modal-btns button {
    padding: 10px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}
.admin-delete-confirm {
    background: #dc3545;
    color: #fff;
}
.admin-delete-confirm:hover {
    background: #c82333;
}
.admin-delete-cancel {
    background: #333;
    color: #ccc;
    border: 1px solid #555;
}
.admin-delete-cancel:hover {
    background: #444;
}

/* ===== КАРУСЕЛЬ ФОТО НА КАРТОЧКАХ ОБЪЯВЛЕНИЙ ===== */
.listing-image, .listing-img {
    position: relative;
    overflow: hidden;
}
.card-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.48);
    border: 1.5px solid rgba(184, 134, 11, 0.55);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    padding: 0;
    flex-shrink: 0;
}
.card-carousel-btn svg {
    width: 18px;
    height: 18px;
    pointer-events: none;
}
.card-carousel-prev { left: 8px; }
.card-carousel-next { right: 8px; }
.card-carousel-btn:hover {
    background: rgba(184, 134, 11, 0.82);
    border-color: rgba(184, 134, 11, 0.9);
}
.listing-card:hover .card-carousel-btn,
.listing-card-new:hover .card-carousel-btn {
    opacity: 1;
}
.card-photo-counter {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.52);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    z-index: 10;
    pointer-events: none;
    line-height: 1.5;
}
/* Мобильные: стрелки всегда видны */
@media (max-width: 768px) {
    .card-carousel-btn {
        opacity: 1;
        width: 30px;
        height: 30px;
    }
    .card-carousel-btn svg {
        width: 15px;
        height: 15px;
    }
    .card-carousel-prev { left: 5px; }
    .card-carousel-next { right: 5px; }
}
