/* ================================================================
   Explore Card — horizontal listing card for looking.php
   Standalone file, loads AFTER revamp.css. Uses the same design tokens.
   Does NOT touch .listing-card or .listing-grid.
   ================================================================ */

/* ——— EXPLORE GRID ——— */
.explore-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

@media (min-width: 768px) {
    .explore-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }
}

@media (min-width: 1200px) {
    .explore-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
}

/* Banners inside the explore grid should span full width */
.explore-grid .explore-banner-slot {
    grid-column: 1 / -1;
}

/* ——— THE CARD ——— */
.explore-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: visible;
    transition: transform 0.22s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
    position: relative;
    cursor: pointer;
    will-change: transform;
    min-height: 0;
    min-width: 0;
    width: 100%;
}

.explore-card:hover {
    border-color: var(--glass-border-hover);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(37, 99, 235, 0.10);
    transform: translateY(-2px);
}

/* ——— IMAGE AREA (left) — compact square thumbnail ——— */
.explore-card-img {
    position: relative;
    flex: 0 0 100px;
    width: 100px;
    height: 100px;
    align-self: center;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    border-radius: var(--radius);
    margin: 8px;
    margin-right: 0;
}

@media (min-width: 768px) {
    .explore-card-img {
        flex: 0 0 130px;
        width: 130px;
        height: 130px;
        margin: 12px;
        margin-right: 0;
    }
}

.explore-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s var(--ease);
}

.explore-card:hover .explore-card-img img {
    transform: scale(1.06);
}

/* Placeholder inside image area */
.explore-card-img .listing-placeholder-modern {
    width: 100%;
    height: 100%;
    min-height: 100px;
}

/* Status badge — inline in meta row */
.ec-status {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    line-height: 1.4;
}

.ec-status.open {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.ec-status.closed {
    background: rgba(220, 38, 38, 0.12);
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.25);
}

/* AD badge */
.explore-card-img .listing-sponsored-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    top: auto;
    padding: 2px 8px;
    background: rgba(245, 158, 11, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
    font-size: 0.58rem;
    font-weight: 800;
    border-radius: var(--radius-full);
    letter-spacing: 0.08em;
    z-index: 3;
    box-shadow: none;
    text-transform: uppercase;
}

/* Watermark */
.explore-card-img .watermark-overlay {
    position: absolute;
    bottom: 6px;
    right: 6px;
    font-size: 0.58rem;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 3px;
    z-index: 2;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* ——— BODY AREA (right) ——— */
.explore-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 8px 10px;
    gap: 2px;
    position: relative;
    overflow: visible;
}

/* Row 1: Name + category + bookmark */
.ec-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.ec-name-wrap {
    flex: 1;
    min-width: 0;
}

.ec-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    width: 100%;
    transition: color 0.2s;
}

.ec-name:hover {
    color: var(--blue-light);
}

/* Verified + category inline under name */
.ec-meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
    flex-wrap: wrap;
}

.ec-verified {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--blue-light);
}

.ec-verified i {
    font-size: 0.72rem;
    color: var(--blue-light);
}

.ec-cat-badge {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: rgba(37, 99, 235, 0.14);
    border: 1px solid rgba(37, 99, 235, 0.22);
    color: var(--blue-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

/* Bookmark button */
.ec-bookmark {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.22s var(--ease);
}

.ec-bookmark:hover,
.ec-bookmark.saved {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.ec-bookmark.saved i {
    font-weight: 900;
}

/* Row 2: Rating */
.ec-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
}

.ec-rating-num {
    font-weight: 700;
    color: var(--amber);
}

.ec-rating-stars {
    display: flex;
    align-items: center;
    gap: 1px;
}

.ec-rating-count {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Row 3: Distance */
.ec-distance {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.ec-distance i {
    color: var(--blue-light);
    font-size: 0.7rem;
}

/* Row 4: Feature tags */
.ec-tags {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 2px;
    min-width: 0;
}

.ec-tag {
    font-size: 0.62rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    background: var(--glass-hover);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    white-space: nowrap;
    letter-spacing: 0.01em;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Row 5: Actions */
.ec-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: auto;
    padding-top: 4px;
    flex-wrap: wrap;
}

.ec-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.65rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    border: 1px solid var(--glass-border);
    white-space: nowrap;
}

.ec-btn-call {
    background: transparent;
    color: var(--green);
    border-color: rgba(16, 185, 129, 0.25);
}

.ec-btn-call:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.4);
}

.ec-btn-call i {
    font-size: 0.7rem;
}

.ec-btn-directions {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--glass-border);
}

.ec-btn-directions:hover {
    background: var(--glass-hover);
    border-color: var(--glass-border-hover);
    color: var(--blue-light);
}

.ec-btn-directions i {
    font-size: 0.7rem;
}

/* ——— SKELETON LOADER ——— */
.explore-card.skeleton {
    pointer-events: none;
    background: var(--glass);
    border-color: var(--glass-border);
}

.explore-card.skeleton .ec-skel-img {
    flex: 0 0 auto;
    width: 110px;
    min-height: 110px;
    margin: 10px;
    margin-right: 0;
    border-radius: var(--radius);
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0.03) 0%,
        rgba(255, 255, 255, 0.09) 50%,
        rgba(255, 255, 255, 0.03) 100%);
    background-size: 400% 100%;
    animation: shimmerLoad 1.5s ease infinite;
}

@media (min-width: 768px) {
    .explore-card.skeleton .ec-skel-img {
        width: 130px;
        min-height: 120px;
        margin: 12px;
        margin-right: 0;
    }
}

.explore-card.skeleton .ec-skel-body {
    flex: 1;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ec-skel-line {
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0.03) 0%,
        rgba(255, 255, 255, 0.09) 50%,
        rgba(255, 255, 255, 0.03) 100%);
    background-size: 400% 100%;
    animation: shimmerLoad 1.5s ease infinite;
}

.ec-skel-line.w70 { width: 70%; }
.ec-skel-line.w50 { width: 50%; }
.ec-skel-line.w90 { width: 90%; }
.ec-skel-line.w40 { width: 40%; }
.ec-skel-line.h14 { height: 14px; }

/* Shimmer animation (shared name from revamp.css) */
@keyframes shimmerLoad {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ——— LIGHT MODE REFINEMENTS ——— */
[data-theme="light"] .explore-card {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(37, 99, 235, 0.10);
    box-shadow: 0 2px 12px rgba(10, 22, 40, 0.06);
}

[data-theme="light"] .explore-card:hover {
    border-color: rgba(37, 99, 235, 0.22);
    box-shadow: 0 8px 28px rgba(10, 22, 40, 0.10);
}

[data-theme="light"] .ec-bookmark {
    background: rgba(241, 245, 249, 0.9);
    border-color: rgba(148, 163, 184, 0.2);
    color: #94a3b8;
}

[data-theme="light"] .ec-bookmark:hover,
[data-theme="light"] .ec-bookmark.saved {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

[data-theme="light"] .ec-tag {
    background: rgba(241, 245, 249, 0.9);
    border-color: rgba(148, 163, 184, 0.2);
    color: #475569;
}

[data-theme="light"] .ec-btn-call {
    border-color: rgba(16, 185, 129, 0.2);
}

[data-theme="light"] .ec-btn-directions {
    border-color: rgba(148, 163, 184, 0.2);
    color: #475569;
}

[data-theme="light"] .explore-card.skeleton .ec-skel-img,
[data-theme="light"] .ec-skel-line {
    background: linear-gradient(90deg,
        rgba(0, 0, 0, 0.03) 0%,
        rgba(0, 0, 0, 0.07) 50%,
        rgba(0, 0, 0, 0.03) 100%);
    background-size: 400% 100%;
    animation: shimmerLoad 1.5s ease infinite;
}
