/* =========
   GLOBAL
   ========= */
:root {
    --green-main: #0f8f36;
    --green-dark: #0a6b28;
    --green-soft: #e9f9ef;
    --bg-page: #f4f6f8;
    --text-main: #1d2428;
    --text-muted: #6b7075;
    --border-soft: #e1e5ea;
    --radius-card: 10px;
    --shadow-soft: 0 10px 25px rgba(15, 20, 25, 0.06);
    --container-width: 1200px;
    --sidebar-width: 270px;
    --font-main: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-main);
    background: var(--bg-page);
    color: var(--text-main);
}

/* =========
   LAYOUT UTAMA
   ========= */

.hp-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 25px 15px 40px;
}

/* Hero hijau besar seperti screenshot */
.hp-hero {
    background: linear-gradient(180deg, #0c7b2f 0%, #0f8f36 100%);
    color: #fff;
    padding: 40px 0 55px;
    margin-bottom: 25px;
}

.hp-hero-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
    text-align: center;
}

.hp-breadcrumb {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 12px;
}

.hp-breadcrumb a {
    color: #fff;
    text-decoration: none;
    opacity: 0.9;
}

.hp-breadcrumb span {
    opacity: 0.7;
}

.hp-hero-title {
    font-size: 30px;
    font-weight: 800;
    margin: 0 0 8px;
}

.hp-hero-subtitle {
    font-size: 14px;
    opacity: 0.95;
    max-width: 520px;
    margin: 0 auto;
}

/* Section "Browse by category" kecil di bawah hero */
.hp-subhero {
    text-align: center;
    margin-bottom: 22px;
}

.hp-subhero h2 {
    font-size: 18px;
    margin: 0 0 4px;
    font-weight: 700;
}

.hp-subhero p {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

/* =========
   GRID: SIDEBAR + CONTENT
   ========= */

.hp-main-grid {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    gap: 18px;
    align-items: flex-start;
}

/* =========
   SIDEBAR FILTER
   ========= */

.hp-sidebar {
    position: sticky;
    top: 25px;
}

.hp-filter-card {
    background: #fff;
    border-radius: var(--radius-card);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-soft);
    padding: 16px 14px;
    margin-bottom: 14px;
    font-size: 13px;
}

.hp-filter-title {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-main);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hp-filter-title span.icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid var(--border-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--green-main);
}

.hp-filter-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hp-filter-list li {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    color: var(--text-muted);
}

.hp-filter-list input[type="checkbox"],
.hp-filter-list input[type="radio"] {
    accent-color: var(--green-main);
}

/* Harga (slider dummy) */
.hp-price-slider {
    height: 4px;
    border-radius: 999px;
    background: #e3e8ef;
    position: relative;
    margin: 10px 0;
}

.hp-price-slider-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    border-radius: inherit;
    background: var(--green-main);
    width: 50%;
}

/* Label kecil di sidebar */
.hp-filter-label-top,
.hp-filter-label-bottom {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

/* =========
   FLAG ICONS (SIDEBAR + PROVIDER ROW)
   ========= */

/* Emoji wrapper or generic inline flag */
.flag, .flag-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    margin-right: 8px;
    font-size: 16px; /* emoji size */
    line-height: 1;
}

/* PNG flags (fallback) in sidebar list */
.hp-filter-list img.flag-img,
.hp-filter-list img[alt] {
    width: 18px;
    height: 12px;
    object-fit: cover;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
    border-radius: 1px;
}

/* Slightly bigger flags in provider card row */
.hp-pc-main .flag,
.hp-pc-main img.flag-img {
    font-size: 16px;
    width: 20px;
    height: 14px;
    margin-right: 8px;
}

/* If image fails to load, show a subtle placeholder block so alignment is kept */
.flag-text {
    display: inline-block;
    min-width: 18px;
    height: 12px;
    background: #f0f2f5;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 12px;
    text-align: center;
    border-radius: 2px;
    padding: 0 3px;
}

/* Ensure sidebar list items keep content aligned */
.hp-filter-list li span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Prevent image from being hidden by overflow on small containers */
.hp-filter-list li {
    overflow: visible;
}

/* =========
   CONTENT KANAN
   ========= */

.hp-content {
    min-width: 0;
}

/* Header "Hosting Providers" */
.hp-list-header {
    background: #fff;
    border-radius: var(--radius-card);
    border: 1px solid var(--border-soft);
    padding: 14px 18px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-soft);
}

.hp-list-header-title {
    font-size: 15px;
    font-weight: 800;
    margin: 0 0 3px;
}

.hp-list-header-sub {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
}

/* Bar "Promoted" */
.hp-promoted-bar {
    background: var(--green-main);
    border-radius: var(--radius-card) var(--radius-card) 0 0;
    color: #fff;
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: -5px;
}

/* List card provider */
.hp-provider-card {
    display: grid;
    grid-template-columns: 80px minmax(0, 1.8fr) 170px 170px;
    align-items: center;
    gap: 16px;
    background: #fff;
    border-radius: var(--radius-card);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-soft);
    padding: 14px 18px;
    margin-bottom: 10px;
    font-size: 13px;
}

/* Kolom logo */
.hp-pc-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hp-pc-logo img {
    max-width: 70px;
    max-height: 40px;
    object-fit: contain;
}

/* Kolom info utama */
.hp-pc-main {
    min-width: 0;
}

.hp-pc-name {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 4px;
}

.hp-pc-rating-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
}

.hp-pc-stars {
    color: #f4b000;
    font-weight: 700;
}

.hp-pc-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid #ffeeda;
    background: #fff7e5;
    color: #b97700;
}

/* Kolom harga */
.hp-pc-price {
    text-align: right;
    font-size: 12px;
    color: var(--text-muted);
}

.hp-pc-price-amount {
    color: var(--green-main);
    font-size: 15px;
    font-weight: 800;
    margin: 3px 0;
}

.hp-pc-price span.hp-currency {
    font-size: 11px;
}

/* Kolom tombol */
.hp-pc-actions {
    text-align: right;
}

.hp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 10px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.12s ease, transform 0.05s ease, box-shadow 0.12s ease;
}

.hp-btn-ghost {
    background: #fff;
    color: var(--green-main);
    border-color: var(--green-main);
}

.hp-btn-solid {
    background: var(--green-main);
    color: #fff;
}

.hp-btn + .hp-btn {
    margin-top: 6px;
}

.hp-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(15, 143, 54, 0.18);
}

/* Pagination */
.hf-pagination {
    margin-top: 18px;
    display: flex;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
}

.hf-page {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-soft);
    background: #fff;
    text-decoration: none;
    color: var(--green-main);
    font-weight: 700;
}

.hf-page.active {
    background: var(--green-main);
    color: #fff;
}

.hf-page.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.hf-ellipsis {
    padding: 6px 4px;
    color: var(--text-muted);
}

/* =========
   RESPONSIVE
   ========= */

@media (max-width: 992px) {
    .hp-main-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .hp-sidebar {
        position: static;
        order: 2;
    }
    .hp-provider-card {
        grid-template-columns: 70px minmax(0, 1.6fr) 1fr;
        grid-template-rows: auto auto;
    }
    .hp-pc-actions {
        grid-column: 2 / 4;
        text-align: left;
        margin-top: 8px;
    }
}

@media (max-width: 720px) {
    .hp-hero {
        padding: 28px 0 36px;
    }
    .hp-hero-title {
        font-size: 24px;
    }
    .hp-provider-card {
        grid-template-columns: 60px minmax(0, 1fr);
        grid-template-rows: auto auto auto;
        row-gap: 10px;
    }
    .hp-pc-price {
        text-align: left;
        grid-column: 2;
    }
    .hp-pc-actions {
        grid-column: 1 / 3;
        text-align: left;
    }
}
