/* ============================================================
   IVK Tour Grid — Frontend CSS v1.0
   ============================================================
   Phase 1: minimal card design
   Naming: .ivk-tg-* (Tour Grid prefix)
   ============================================================ */


/* ── Grid container ─────────────────────────────────────── */

.ivk-tg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin: 24px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}


/* ── Card ───────────────────────────────────────────────── */

.ivk-tg-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none !important;
    color: inherit;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    position: relative;
}

.ivk-tg-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: #fb501b;
}

.ivk-tg-card:focus-visible {
    outline: 2px solid #fb501b;
    outline-offset: 2px;
}


/* ── Card image ─────────────────────────────────────────── */

.ivk-tg-card-image {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f3f4f6;
}

.ivk-tg-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.ivk-tg-card:hover .ivk-tg-card-image img {
    transform: scale(1.04);
}


/* ── Card body ──────────────────────────────────────────── */

.ivk-tg-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px 16px;
    flex-grow: 1;
}


/* ── OTA badge ──────────────────────────────────────────── */

.ivk-tg-badge {
    display: inline-block;
    width: max-content;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
    line-height: 1.5;
}

.ivk-tg-badge-klook     { background: #ef5601; color: #ffffff; }
.ivk-tg-badge-viator    { background: #008768; color: #ffffff; }
.ivk-tg-badge-kkday     { background: #25bec9; color: #ffffff; }
.ivk-tg-badge-gyg       { background: #1c4cbb; color: #ffffff; }
.ivk-tg-badge-civitatis { background: #ea0558; color: #ffffff; }
.ivk-tg-badge-trazy     { background: #fbbf24; color: #1a1a1a; }
.ivk-tg-badge-headout   { background: #8000ff; color: #ffffff; }
.ivk-tg-badge-seoulpass { background: #1f2937; color: #ffffff; }
.ivk-tg-badge-default   { background: #6b7280; color: #ffffff; }


/* ── Title ──────────────────────────────────────────────── */

.ivk-tg-card-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    margin: 4px 0 0;
    color: #111827;
    /* Truncate at 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;  /* 2 lines × line-height */
}


/* ── Rating ─────────────────────────────────────────────── */

.ivk-tg-card-rating {
    font-size: 13px;
    color: #4b5563;
    line-height: 1.4;
}


/* ── Price ──────────────────────────────────────────────── */

.ivk-tg-card-price {
    font-size: 22px;
    font-weight: 700;
    color: #fb501b;
    line-height: 1.2;
    margin-top: auto;  /* push to bottom of card body */
}

.ivk-tg-card-price-per {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    margin-left: 2px;
}


/* ── CTA ────────────────────────────────────────────────── */

.ivk-tg-card-cta {
    display: block;
    padding: 9px 14px;
    background: #f3f4f6;
    color: #111827;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    margin-top: 4px;
    transition: background 0.15s ease, color 0.15s ease;
}

.ivk-tg-card:hover .ivk-tg-card-cta {
    background: #fb501b;
    color: #ffffff;
}


/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 600px) {
    .ivk-tg-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .ivk-tg-card-title {
        font-size: 14px;
    }
    .ivk-tg-card-price {
        font-size: 20px;
    }
}
