/* =============================================================
   HPL Dealers — Profile page + Directory
   ============================================================= */

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

/* ── Dealer Profile Page ──────────────────────────────────── */

.hpl-dp-wrap {
    width: 100%;
    font-family: inherit;
    color: #222;
}

/* Centered container — controls max-width and side padding */
.hpl-dp-container {
    max-width: 1350px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
    width: 100% !important;
}

.hpl-dp-body {
    padding-top: 32px !important;
    padding-bottom: 48px !important;
}

.hpl-dp-header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 28px 0;
    margin-bottom: 0;
}

.hpl-dp-header-inner {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

.hpl-dp-logo {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    background: #f5f5f5;
}

.hpl-dp-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hpl-dp-logo-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: #8B1A1A;
    background: #fdecea;
}

.hpl-dp-info { flex: 1; min-width: 0; }

.hpl-dp-name-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.hpl-dp-name {
    font-size: 26px !important;
    font-weight: 700 !important;
    margin: 0 !important;
    color: #111 !important;
}

.hpl-dp-featured-badge {
    background: #b08700;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.04em;
}

.hpl-dp-desc {
    font-size: 15px;
    color: #555;
    margin: 0 0 12px;
    line-height: 1.6;
}

.hpl-dp-meta-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #666;
}

.hpl-dp-meta-row a { color: #8B1A1A; text-decoration: none; }
.hpl-dp-meta-row a:hover { text-decoration: underline; }

.hpl-dp-section-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    margin: 0 0 16px !important;
    color: #222 !important;
}

/* ── Locations block ──────────────────────────────────────── */

.hpl-dp-locations {
    margin-bottom: 36px;
}

.hpl-dp-loc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.hpl-dp-loc-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
    color: #444;
}

.hpl-dp-loc-card strong {
    font-size: 15px;
    color: #222;
    margin-bottom: 4px;
}

.hpl-dp-loc-card a { color: #8B1A1A; text-decoration: none; }
.hpl-dp-loc-card a:hover { text-decoration: underline; }

/* ── Inventory grid ───────────────────────────────────────── */

.hpl-dp-inventory { margin-bottom: 40px; }

.hpl-dp-inv-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.hpl-dp-no-inv {
    color: #999;
    font-size: 15px;
    padding: 40px 0;
    text-align: center;
}

.hpl-dp-inv-count {
    font-size: 14px;
    font-weight: 400;
    color: #888;
    margin-left: 6px;
}

.hpl-dp-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 28px 0 8px;
}

.hpl-dp-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 6px;
    border: 1px solid #d0d0d0;
    background: #fff;
    color: #333;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.12s, border-color 0.12s;
}

.hpl-dp-page-btn:hover { background: #f5f5f5; border-color: #bbb; color: #333; }

.hpl-dp-page-btn--active {
    background: #8B1A1A !important;
    border-color: #8B1A1A !important;
    color: #fff !important;
    pointer-events: none;
}

.hpl-dp-page-ellipsis {
    color: #aaa;
    padding: 0 4px;
    font-size: 13px;
}

@media (max-width: 900px) {
    .hpl-dp-inv-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .hpl-dp-container { padding-left: 16px !important; padding-right: 16px !important; }
    .hpl-dp-header-inner { flex-direction: column; }
    .hpl-dp-logo { width: 72px; height: 72px; }
    .hpl-dp-inv-grid { grid-template-columns: 1fr; }
}

/* ── Dealer Directory ─────────────────────────────────────── */

.hpl-dir-wrap {
    width: 100%;
    font-family: inherit;
    color: #222;
}

.hpl-dir-search-bar {
    display: flex;
    align-items: stretch;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.hpl-dir-bar-kw,
.hpl-dir-bar-loc {
    display: flex;
    align-items: center;
    padding: 0 14px;
    gap: 8px;
    flex: 1;
}

.hpl-dir-bar-loc {
    border-left: 1px solid #e8e8e8;
}

.hpl-dir-bar-kw input,
.hpl-dir-bar-loc input {
    background: transparent;
    border: none;
    font-size: 15px;
    color: #222;
    padding: 14px 0;
    flex: 1;
    outline: none;
    min-width: 0;
}

.hpl-dir-bar-kw input::placeholder,
.hpl-dir-bar-loc input::placeholder { color: #bbb; }

.hpl-dir-bar-loc input { width: 90px; }

.hpl-dir-bar-loc select {
    background: transparent;
    border: none;
    font-size: 13px;
    color: #666;
    outline: none;
    cursor: pointer;
    padding: 4px 2px;
}

.hpl-dir-submit {
    background: #8B1A1A;
    color: #fff;
    border: none;
    padding: 0 28px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
    flex-shrink: 0;
}

.hpl-dir-submit:hover { background: #a82020; }

.hpl-dir-geo-error { color: #c0392b; font-size: 13px; margin: 4px 0 10px; }

.hpl-dir-toolbar {
    margin: 14px 0;
    font-size: 13px;
    color: #888;
}

.hpl-dir-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.hpl-dir-no-results {
    grid-column: 1/-1;
    text-align: center;
    padding: 60px 24px;
    color: #aaa;
    font-size: 15px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

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

.hpl-dir-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    transition: box-shadow 0.15s, border-color 0.15s;
}

.hpl-dir-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.09);
    border-color: #8B1A1A;
}

.hpl-dir-card--featured {
    border-color: #b08700;
    box-shadow: 0 0 0 1px #b08700;
}

.hpl-dir-featured-badge {
    position: absolute;
    top: -1px;
    right: 16px;
    background: #b08700;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 0 0 6px 6px;
    letter-spacing: 0.04em;
}

.hpl-dir-card-logo {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    background: #f5f5f5;
    margin-bottom: 14px;
    flex-shrink: 0;
}

.hpl-dir-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hpl-dir-card-logo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: #8B1A1A;
    background: #fdecea;
}

.hpl-dir-card-body { flex: 1; }

.hpl-dir-card-name {
    font-size: 16px !important;
    font-weight: 700 !important;
    margin: 0 0 8px !important;
    color: #111 !important;
}

.hpl-dir-card-locs {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
    color: #777;
    margin-bottom: 8px;
}

.hpl-dir-more-locs { font-size: 12px; color: #aaa; }

.hpl-dir-card-desc {
    font-size: 13px;
    color: #666;
    margin: 0 0 12px;
    line-height: 1.5;
}

.hpl-dir-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.hpl-dir-listing-count { font-size: 12px; color: #aaa; }

.hpl-dir-card-btn {
    background: #8B1A1A;
    color: #fff;
    text-decoration: none;
    padding: 7px 14px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.15s;
}

.hpl-dir-card-btn:hover { background: #a82020; color: #fff; }

@media (max-width: 900px) { .hpl-dir-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .hpl-dir-grid { grid-template-columns: 1fr; } }

/* ── Directory Pagination ─────────────────────────────────── */

.hpl-dir-pagination {
    padding: 24px 0 8px;
}

.hpl-dir-pages {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.hpl-dir-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 6px;
    border: 1px solid #d0d0d0;
    background: #fff;
    color: #333;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
}

.hpl-dir-page-btn:hover { background: #f5f5f5; border-color: #bbb; }

.hpl-dir-page-btn--active {
    background: #8B1A1A !important;
    border-color: #8B1A1A !important;
    color: #fff !important;
    pointer-events: none;
}

.hpl-dir-page-ellipsis {
    color: #aaa;
    padding: 0 4px;
    font-size: 13px;
}

/* ── Dealer shelf card overrides ──────────────────────────── */

.hpl-dealer-card .hpl-dealer-card-logo {
    width: 100%;
    height: 100px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #f0f0f0;
    overflow: hidden;
}

.hpl-dealer-card .hpl-dealer-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hpl-dealer-card-logo-initials {
    font-size: 22px;
    font-weight: 700;
    color: #8B1A1A;
}

.hpl-dealer-card-count {
    font-size: 11px;
    color: #aaa;
    margin-top: 2px;
}
