/**
 * Romb.bg - Modern Ad Card Styles
 * Enhanced visual design with hover effects, better typography, and modern feel
 * Version: 1.0.0
 * Date: 2026-01-14
 */

/* ============================================
   DESIGN SYSTEM EXTENSIONS
   ============================================ */
:root {
    /* Extended color palette */
    --romb-gradient-start: #667eea;
    --romb-gradient-end: #764ba2;
    --romb-gradient: linear-gradient(135deg, var(--romb-gradient-start) 0%, var(--romb-gradient-end) 100%);

    /* Card-specific variables */
    --card-radius: 16px;
    --card-shadow: 0 2px 12px rgba(0,0,0,0.08);
    --card-shadow-hover: 0 8px 24px rgba(0,0,0,0.15);
    --card-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    /* Price colors */
    --price-color: #1a1a2e;
    --price-secondary: #6b7280;

    /* Badge colors */
    --badge-top: #dc3545;
    --badge-premium: #5e72e4;
    --badge-new: #00A699;
}

/* ============================================
   MODERN AD CARD BASE
   ============================================ */

/* Apply to all ad cards in listings */
.item2-gl .card.overflow-hidden,
.home-carousel-items .card,
.feature-ad .card {
    border-radius: var(--card-radius) !important;
    border: none !important;
    box-shadow: var(--card-shadow);
    transition: var(--card-transition);
    overflow: hidden !important;
    background: #fff;
}

/* Hover effect - lift and shadow */
.item2-gl .card.overflow-hidden:hover,
.home-carousel-items .card:hover,
.feature-ad .card:hover {
    transform: translateY(-6px);
    box-shadow: var(--card-shadow-hover);
}

/* ============================================
   IMAGE CONTAINER IMPROVEMENTS
   ============================================ */

/* Grid view images */
.item2-gl #tab-12 .item-card9-img,
.item2-gl #tab-12 .item-card7-imgs {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 75%; /* 4:3 aspect ratio */
    overflow: hidden;
    background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
}

.item2-gl #tab-12 .item-card9-img img,
.item2-gl #tab-12 .item-card7-imgs img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

/* Image zoom on hover */
.item2-gl #tab-12 .card:hover .item-card9-img img,
.item2-gl #tab-12 .card:hover .item-card7-imgs img,
.feature-ad .card:hover img.cover-image {
    transform: scale(1.08);
}

/* List view images - fixed dimensions */
.item2-gl #tab-11 .item-card9-img {
    position: relative;
    overflow: hidden;
    border-radius: var(--card-radius) 0 0 var(--card-radius);
}

.item2-gl #tab-11 .item-card7-imgs {
    height: 200px;
    min-height: 200px;
    max-height: 200px;
}

.item2-gl #tab-11 .item-card7-imgs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

/* ============================================
   RIBBON/BADGE IMPROVEMENTS
   ============================================ */

.ribbon {
    z-index: 10;
}

.ribbon span {
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 6px 14px !important;
    border-radius: 0 4px 4px 0 !important;
}

/* TOP ribbon - red with glow */
.ribbon span.bg-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4);
}

/* PREMIUM ribbon - purple gradient */
.ribbon span.bg-primary {
    background: var(--romb-gradient) !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

/* ============================================
   PRICE DISPLAY IMPROVEMENTS
   ============================================ */

/* Price badge on images - Blue to match site theme */
.price-badge {
    background: #1976D2 !important;
    color: #ffffff !important;
    padding: 8px 14px !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.4);
    border: none !important;
}

/* Dual pricing format */
.price-badge .price-eur {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff !important;
}

.price-badge .price-bgn {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8) !important;
    margin-left: 4px;
}

/* Card footer price */
.item-card9-footer h4,
.item-card9-cost h4 {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--price-color) !important;
    margin: 0 !important;
}

/* Negotiable badge */
.badge-negotiable,
.badge-primary {
    background: var(--romb-gradient) !important;
    border: none !important;
    font-weight: 600;
    padding: 6px 12px !important;
    border-radius: 6px !important;
}

/* ============================================
   CARD CONTENT TYPOGRAPHY
   ============================================ */

/* Category link */
.item-card9 > a:first-child {
    font-size: 12px !important;
    font-weight: 600;
    color: var(--romb-gradient-start) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 4px;
}

/* Ad title */
.item-card9 h4,
.item-card2-text h4 {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #1a1a2e !important;
    line-height: 1.4 !important;
    margin: 8px 0 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-card9 h4:hover,
.item-card2-text h4:hover {
    color: var(--romb-gradient-start) !important;
}

/* Description text */
.item-card9 p,
.item-description {
    font-size: 13px !important;
    color: #6b7280 !important;
    line-height: 1.5 !important;
    margin: 0 !important;
}

/* ============================================
   LOCATION & META INFO
   ============================================ */

.item-card9-desc a,
.item-card2-desc .icons {
    font-size: 12px !important;
    color: #6b7280 !important;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.item-card9-desc a:hover {
    color: var(--romb-gradient-start) !important;
}

.item-card9-desc i,
.item-card2-desc i {
    color: #9ca3af;
}

/* Location chip style */
.item-card9-meta .item-card9-desc a {
    background: #f3f4f6;
    padding: 4px 10px;
    border-radius: 6px;
    transition: all 0.2s;
}

.item-card9-meta .item-card9-desc a:hover {
    background: #e5e7eb;
}

/* ============================================
   CARD FOOTER IMPROVEMENTS
   ============================================ */

.card-footer {
    background: #fafafa !important;
    border-top: 1px solid #f0f0f0 !important;
    padding: 12px 16px !important;
}

.item-card9-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Seller info */
.item-card9-user a,
.item-card2-footer-u a {
    font-size: 13px !important;
    color: #4b5563 !important;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.item-card9-user a:hover,
.item-card2-footer-u a:hover {
    color: var(--romb-gradient-start) !important;
}

/* ============================================
   WISHLIST/FAVORITE BUTTON
   ============================================ */

.item-card9-icons {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 15;
}

.item-card9-icons1 {
    width: 36px !important;
    height: 36px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
    transition: all 0.2s !important;
    backdrop-filter: blur(4px);
    border: none !important;
}

.item-card9-icons1:hover {
    transform: scale(1.1);
    background: #fff !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
}

.item-card9-icons1 i {
    font-size: 16px !important;
    color: #9ca3af;
    transition: color 0.2s;
}

.item-card9-icons1[data-wishlisted="true"] i,
.item-card9-icons1 i.fa-star {
    color: #fbbf24 !important;
}

.item-card9-icons1:hover i {
    color: #fbbf24 !important;
}

/* ============================================
   VERIFICATION BADGES IN CARDS
   ============================================ */

.item-card9-footer .verification-badge,
.item-card9-user .verification-badge {
    font-size: 12px;
}

.item-card9-footer .user-rating,
.item-card9-user .user-rating {
    font-size: 11px;
}

/* ============================================
   GRID VIEW SPECIFIC STYLES
   ============================================ */

/* 4-column grid on large screens */
@media (min-width: 1200px) {
    .item2-gl #tab-12 .col-xl-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

/* 5-column grid on extra large screens */
@media (min-width: 1600px) {
    .item2-gl #tab-12 .col-xl-3 {
        flex: 0 0 20%;
        max-width: 20%;
    }
}

/* Card body padding */
.item2-gl #tab-12 .card-body {
    padding: 14px 16px !important;
}

.item2-gl #tab-12 .card-footer {
    padding: 10px 16px !important;
}

/* ============================================
   LIST VIEW SPECIFIC STYLES
   ============================================ */

.item2-gl #tab-11 .card {
    margin-bottom: 16px !important;
}

.item2-gl #tab-11 .d-md-flex {
    display: flex !important;
}

.item2-gl #tab-11 .card-body {
    padding: 16px 20px !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ============================================
   HOMEPAGE CAROUSEL CARDS
   ============================================ */

.home-carousel-items .item {
    padding: 8px;
}

.home-carousel-items .card {
    margin-bottom: 0 !important;
}

.home-carousel-items .item-card2-img {
    height: 180px;
    min-height: 180px;
    max-height: 180px;
    border-radius: var(--card-radius) var(--card-radius) 0 0;
    overflow: hidden;
}

.home-carousel-items .item-card2-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.home-carousel-items .card:hover .item-card2-img img {
    transform: scale(1.08);
}

.home-carousel-items .card-body {
    padding: 14px 16px !important;
}

.home-carousel-items .card-footer {
    padding: 10px 16px !important;
}

/* ============================================
   SKELETON LOADING CARDS
   ============================================ */

.card-skeleton {
    border-radius: var(--card-radius);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--card-shadow);
}

.card-skeleton .skeleton-image {
    width: 100%;
    padding-bottom: 75%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

.card-skeleton .skeleton-content {
    padding: 16px;
}

.card-skeleton .skeleton-title {
    height: 20px;
    width: 80%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
    margin-bottom: 12px;
}

.card-skeleton .skeleton-text {
    height: 14px;
    width: 60%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
    margin-bottom: 8px;
}

.card-skeleton .skeleton-price {
    height: 24px;
    width: 40%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
    margin-top: 12px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   EMPTY STATE STYLING
   ============================================ */

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 64px;
    color: #d1d5db;
    margin-bottom: 20px;
}

.empty-state-title {
    font-size: 22px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.empty-state-text {
    font-size: 15px;
    color: #6b7280;
    margin-bottom: 24px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.empty-state .btn {
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 8px;
}

/* ============================================
   MOBILE RESPONSIVE OVERRIDES
   ============================================ */

@media (max-width: 767px) {
    /* Cards stack vertically */
    .item2-gl #tab-11 .d-md-flex {
        display: block !important;
    }

    .item2-gl #tab-11 .item-card9-img {
        border-radius: var(--card-radius) var(--card-radius) 0 0 !important;
        max-width: 100% !important;
        flex: none !important;
    }

    .item2-gl #tab-11 .item-card7-imgs {
        height: 200px !important;
        min-height: 200px !important;
        max-height: 200px !important;
    }

    /* Grid view - 2 columns on mobile */
    .item2-gl #tab-12 .col-lg-6.col-md-12.col-xl-3 {
        flex: 0 0 50%;
        max-width: 50%;
        padding: 4px !important;
    }

    /* Smaller card elements on mobile */
    .item2-gl #tab-12 .card-body {
        padding: 10px 12px !important;
    }

    .item2-gl #tab-12 .card-footer {
        padding: 8px 12px !important;
    }

    .item2-gl #tab-12 .item-card9 h4 {
        font-size: 13px !important;
        min-height: 36px !important;
    }

    .item2-gl #tab-12 .item-description {
        display: none !important; /* Hide description on mobile grid */
    }

    /* Larger touch targets */
    .item-card9-icons1 {
        width: 40px !important;
        height: 40px !important;
    }

    /* Price badge on mobile */
    .price-badge {
        padding: 6px 10px !important;
        font-size: 13px !important;
    }
}

/* Single column on very small screens */
@media (max-width: 480px) {
    .item2-gl #tab-12 .col-lg-6.col-md-12.col-xl-3 {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0 !important;
        margin-bottom: 12px !important;
    }
}

/* ============================================
   LOAD MORE BUTTON
   ============================================ */

.load-more-container {
    text-align: center;
    padding: 24px 0;
}

.btn-load-more {
    background: #fff;
    border: 2px solid var(--romb-gradient-start);
    color: var(--romb-gradient-start);
    padding: 12px 32px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-load-more:hover {
    background: var(--romb-gradient);
    border-color: transparent;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* ============================================
   SORTING/VIEW TOGGLE IMPROVEMENTS
   ============================================ */

.item2-gl-nav {
    margin-bottom: 20px;
    padding: 12px 16px;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.item2-gl-menu .btn {
    border-radius: 8px !important;
    padding: 8px 16px !important;
    font-weight: 500;
}

/* Results count */
.showing-results {
    font-size: 14px;
    color: #6b7280;
}

.showing-results strong {
    color: #1a1a2e;
}
