/* Frontend CSS dla wtyczki Ogłoszenia Samochodowe */

.car-ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.car-ad-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e8e8e8;
}

.car-ad-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.car-ad-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.car-ad-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.car-ad-price {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #2c5aa0;
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 16px;
}

.car-ad-content {
    padding: 20px;
}

.car-ad-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    text-decoration: none;
    display: block;
}

.car-ad-title:hover {
    color: #2c5aa0;
    text-decoration: none;
}

.car-ad-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 15px 0;
    font-size: 14px;
    color: #666;
}

.car-ad-meta-item {
    display: flex;
    align-items: center;
}

.car-ad-meta-item strong {
    margin-right: 5px;
}

.car-ad-description {
    color: #555;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.car-ad-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.car-feature {
    background: #f0f8ff;
    color: #2c5aa0;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

/* Single Car Ad Page */
.single-car-ad {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.car-ad-gallery {
    margin-bottom: 30px;
}

.car-ad-main-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 20px;
}

.car-ad-details {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.car-ad-info {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.car-ad-sidebar {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.car-price-big {
    font-size: 32px;
    font-weight: bold;
    color: #2c5aa0;
    margin-bottom: 20px;
    text-align: center;
}

.car-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 20px 0;
}

.car-spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.car-spec-label {
    font-weight: 600;
    color: #333;
}

.car-spec-value {
    color: #666;
}

.car-features-list {
    margin-top: 20px;
}

.car-features-list h3 {
    color: #333;
    margin-bottom: 15px;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.feature-item {
    display: flex;
    align-items: center;
    color: #2c5aa0;
    font-size: 14px;
}

.feature-item::before {
    content: "✓";
    color: #28a745;
    font-weight: bold;
    margin-right: 8px;
}

/* Contact section */
.car-contact {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.phone-reveal {
    background: #2c5aa0;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    width: 100%;
    margin-bottom: 15px;
    transition: background-color 0.3s ease;
}

.phone-reveal:hover {
    background: #1e3d6f;
}

.phone-number {
    font-size: 20px;
    font-weight: bold;
    color: #2c5aa0;
    text-align: center;
    padding: 15px;
    background: #f0f8ff;
    border-radius: 6px;
    margin-bottom: 15px;
}

.inquiry-form {
    margin-top: 20px;
}

.inquiry-form h3 {
    margin-bottom: 15px;
    color: #333;
}

.inquiry-form input,
.inquiry-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
}

.inquiry-form button {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    width: 100%;
    transition: background-color 0.3s ease;
}

.inquiry-form button:hover {
    background: #218838;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 6px;
    margin-top: 15px;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 6px;
    margin-top: 15px;
    border: 1px solid #f5c6cb;
}

/* Responsive */
@media (max-width: 768px) {
    .car-ads-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .car-ad-details {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .car-specs {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .car-ad-sidebar {
        position: static;
    }
}