/* ---------- VARIABLES & RESET ---------- */
:root {
    --purple: #7100ff;
    --bg: #ffffff;
    --text: #1d1d1d;
    --card-bg: #ffffff;
    --radius: 18px;
    --shadow: 0 8px 24px rgba(0, 0, 0, .05);
    --shadow-hover: 0 12px 30px rgba(0, 0, 0, .08);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
    /* ← hilangkan garis bawah */
}

/* ---------- LAYOUT BASICS ---------- */
body {
    background: var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.center {
    text-align: center;
}

header {
    padding: 40px 20px 20px;
}

h1.logo {
    font-size: 3rem;
    color: var(--purple);
    font-weight: 700;
    text-transform: lowercase;
}

a.logo-sm {
    font-size: 2rem;
    color: var(--purple);
    font-weight: 700;
    text-transform: lowercase;
}

/* ---------- SEARCH BAR ---------- */
.search-wrapper {
    width: 100%;
    max-width: 740px;
    margin: 0 auto 40px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px;
}

.search-wrapper input[type=search] {
    flex: 1;
    padding: 16px 18px;
    font-size: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: var(--radius);
    outline: none;
    transition: border .2s;
}

.search-wrapper input[type=search]:focus {
    border-color: var(--purple);
}

.search-wrapper button {
    background: var(--purple);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    padding: 14px 20px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background .2s;
}

.search-wrapper button:hover {
    background: #5800cc;
}

.search-wrapper button .icon {
    width: 20px;
    height: 20px;
}

/* ---------- MAIN GRID / SECTIONS ---------- */
main {
    flex: 1;
    width: 100%;
}

.trending,
.packages,
.results {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

.trending h2,
.packages h2 {
    font-size: 1.3rem;
    margin-bottom: 24px;
    font-weight: 600;
}

/* ---------- CARD GRID ---------- */
.card-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
    background: var(--card-bg);
    padding: 22px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform .2s, box-shadow .2s;
    display: flex;
    gap: 18px;
    align-items: flex-start;
    list-style: none;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.card img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 14px;
    flex-shrink: 0;
}

.card h3 {
    font-size: 1.05rem;
    margin-bottom: 6px;
    font-weight: 700;
}

.card p {
    font-size: .94rem;
    line-height: 1.45;
    color: #555;
}

.price {
    font-weight: 700;
    color: #111;
}

/* ---------- GOOGLE CSE OVERRIDE ---------- */
.gsc-control-cse {
    width: 100% !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.gsc-webResult,
.gsc-result {
    border: none !important;
}

.gcsc-branding,
.gs-spelling {
    display: none !important;
}

/* ---------- FOOTER ---------- */
footer {
    padding: 20px;
    background: #f1f3f5;
    text-align: center;
    font-size: .9rem;
}

/* ---------- RESPONSIVE ---------- */
@media(max-width:600px) {
    h1.logo {
        font-size: 2.5rem;
    }

    .search-wrapper input[type=search] {
        padding: 14px;
    }

    .search-wrapper button {
        padding: 12px 16px;
    }

    .card {
        flex-direction: row;
        padding: 18px;
    }

    .card img {
        width: 60px;
        height: 60px;
    }
}

/* ---------- GOOGLE CSE STYLING — FINAL & RESPONSIVE CARD STYLE ---------- */

/* Container utama CSE */
.gsc-control-cse {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    width: 100% !important;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

/* Kartu hasil pencarian */
.gsc-webResult.gsc-result {
    background: #ffffff;
    padding: 22px;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    margin-bottom: 28px !important;
    border: 1px solid #f0f0f0;
    transition: box-shadow 0.2s ease;
}

.gsc-webResult.gsc-result:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

/* Judul */
.gs-title,
.gs-title * {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1d1d1d;
    text-decoration: none !important;
}

/* URL */
.gsc-url {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 6px;
    display: block;
}

/* Deskripsi */
.gs-snippet {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #333;
}

/* Spasi antar bagian dalam hasil */
.gsc-thumbnail-inside,
.gsc-url-top,
.gsc-table-cell-snippet-close {
    margin-bottom: 10px;
}

/* Sembunyikan elemen yang tidak dibutuhkan */
.gsc-cursor-box,
.gsc-adBlock,
.gsc-resultsHeader,
.gcsc-find-more-on-google,
.gcsc-branding {
    display: none !important;
}

/* Container luar hasil pencarian */
.results {
    padding-top: 20px;
    padding-bottom: 40px;
}

/* ---------- RESPONSIVE UNTUK HP ---------- */
@media (max-width: 600px) {
    .gsc-webResult.gsc-result {
        padding: 18px;
    }

    .gs-title,
    .gs-title * {
        font-size: 1rem;
    }

    .gsc-url {
        font-size: 0.75rem;
    }

    .gs-snippet {
        font-size: 0.9rem;
    }
}