/* ==========================================================================
   Elan kartı — şəkil slideri + detallı məlumat
   ========================================================================== */

.ad-card {
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s ease, transform .2s ease;
}

.ad-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}

/* --- Qalereya --- */
.ad-gallery {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.ad-gallery-link {
    display: block;
}

.ad-gallery-img {
    width: 100%;
    display: block;
    background: #e9e9e9;
    transition: opacity .15s ease;
}

.ad-gallery-img.is-loading {
    opacity: .45;
}

.ad-gallery-empty {
    width: 100%;
    height: 280px;
    background: #e4e4e4;
    color: #b0b0b0;
    font-size: 28px;
    border-radius: 12px;
}

.ad-gal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
    color: #1a1a1a;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity .18s ease, background .18s ease;
    z-index: 3;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
}

.ad-gal-nav:hover {
    background: #fff;
}

.ad-gal-prev { left: 8px; }
.ad-gal-next { right: 8px; }

.ad-gallery:hover .ad-gal-nav {
    opacity: 1;
}

/* Toxunma ekranlarda oxlar həmişə görünsün */
@media (hover: none) {
    .ad-gal-nav {
        opacity: .85;
        width: 30px;
        height: 30px;
    }
}

.ad-gal-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 8px;
    display: flex;
    justify-content: center;
    gap: 5px;
    z-index: 3;
    pointer-events: none;
}

.ad-gal-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .55);
    box-shadow: 0 0 2px rgba(0, 0, 0, .4);
    transition: background .15s ease, width .15s ease;
}

.ad-gal-dots span.active {
    background: #fff;
    width: 16px;
    border-radius: 3px;
}

.ad-gal-count {
    position: absolute;
    right: 8px;
    bottom: 8px;
    z-index: 3;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 10px;
}

.ad-gal-count i {
    font-size: 10px;
    margin-right: 3px;
}

/* Badge-lər indi qalereyanın içindədir — mövqeyi ona görə tənzimlənir */
.ad-gallery .badgets-container {
    top: 14px;
    width: calc(100% - 20px);
    z-index: 2;
}

/* --- Kart mətn hissəsi --- */
.ad-card-link {
    display: block;
    color: inherit;
}

.ad-card-link:hover {
    color: inherit;
}

.ad-unit-price {
    margin-top: 2px;
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.ad-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
    font-size: 13px;
    color: #374151;
}

.ad-spec {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.ad-spec i {
    font-size: 11px;
    color: #1D74D8;
    margin-right: 5px;
}

.ad-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.ad-tag {
    font-size: 11px;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 20px;
    background: #ffffff;
    color: #4b5563;
    border: 1px solid #e5e7eb;
    white-space: nowrap;
}

.ad-tag-blue {
    background: #eef5fe;
    color: #1D74D8;
    border-color: #cfe2fb;
}

.ad-tag-green {
    background: #ecfdf3;
    color: #12805c;
    border-color: #cdf0df;
}

.ad-metro {
    margin-top: 8px;
    font-size: 13px;
    color: #374151;
    display: flex;
    align-items: center;
}

.ad-metro i {
    color: #1D74D8;
    font-size: 12px;
    margin-right: 5px;
}

@media only screen and (max-width: 768px) {
    .ad-gallery-empty { height: 220px; }
    .ad-specs, .ad-metro { font-size: 12px; gap: 8px; }
    .ad-unit-price { font-size: 12px; }
}

@media only screen and (max-width: 480px) {
    .ad-gallery-empty { height: 150px; }
    .ad-specs { gap: 6px; font-size: 11px; margin-top: 6px; }
    .ad-tag { font-size: 10px; padding: 3px 6px; }
    .ad-metro { font-size: 11px; }
    .ad-unit-price { font-size: 11px; }
    .ad-gal-nav { width: 26px; height: 26px; font-size: 11px; }
}

@media only screen and (max-width: 380px) {
    .ad-gallery-empty { height: 120px; }
}
