/* ==========================================================================
   Business directory frontend
   Built on top of the bootstrap 5 bundle already shipped with the app.
   ========================================================================== */

:root {
    --dir-primary: #0d6b5f;
    --dir-primary-dark: #095248;
    --dir-primary-soft: #e6f4f1;
    --dir-accent: #ff6b35;
    --dir-ink: #16232b;
    --dir-muted: #6b7a85;
    --dir-line: #e6ebef;
    --dir-bg: #f7f9fa;
    --dir-radius: 14px;
    --dir-shadow: 0 2px 14px rgba(16, 40, 50, .07);
    --dir-shadow-lg: 0 10px 30px rgba(16, 40, 50, .12);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--dir-ink);
    background: #fff;
}

a { text-decoration: none; }

.btn-primary {
    background: var(--dir-primary);
    border-color: var(--dir-primary);
}
.btn-primary:hover, .btn-primary:focus {
    background: var(--dir-primary-dark);
    border-color: var(--dir-primary-dark);
}
.btn-outline-primary {
    color: var(--dir-primary);
    border-color: var(--dir-primary);
}
.btn-outline-primary:hover {
    background: var(--dir-primary);
    border-color: var(--dir-primary);
}
.text-primary { color: var(--dir-primary) !important; }
.text-muted-2 { color: var(--dir-muted); }

/* ---------------- header ---------------- */

.dir-header {
    background: #fff;
    border-bottom: 1px solid var(--dir-line);
    position: sticky;
    top: 0;
    z-index: 1030;
}
.dir-header .navbar { padding: .65rem 0; }
.dir-header .brand-text {
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--dir-primary);
    letter-spacing: -.4px;
}
.dir-header .nav-link {
    font-weight: 500;
    color: var(--dir-ink);
    padding: .5rem .9rem;
}
.dir-header .nav-link:hover { color: var(--dir-primary); }
.btn-add-listing { border-radius: 999px; padding: .5rem 1.15rem; font-weight: 600; }
.dropdown-menu { border: 1px solid var(--dir-line); box-shadow: var(--dir-shadow); border-radius: 12px; }

/* the app's bootstrap build ships without the toggler icon, so draw our own */
.dir-header .navbar-toggler {
    border: 1px solid var(--dir-line);
    border-radius: 8px;
    padding: .4rem .55rem;
}
.dir-header .navbar-toggler:focus { box-shadow: none; }
.dir-header .navbar-toggler-icon {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--dir-ink);
    position: relative;
}
.dir-header .navbar-toggler-icon::before,
.dir-header .navbar-toggler-icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 22px;
    height: 2px;
    background: var(--dir-ink);
}
.dir-header .navbar-toggler-icon::before { top: -7px; }
.dir-header .navbar-toggler-icon::after  { top: 7px; }

/* on small screens the menu becomes a stacked panel */
@media (max-width: 991.98px) {
    .dir-header .navbar-collapse {
        border-top: 1px solid var(--dir-line);
        margin-top: .6rem;
        padding-top: .6rem;
    }
    .dir-header .btn-add-listing { display: block; margin-top: .5rem; text-align: center; }
    .dir-header .dropdown-menu { border: none; box-shadow: none; padding-left: .8rem; }
}

/* ---------------- hero ---------------- */

.dir-hero {
    background: linear-gradient(135deg, var(--dir-primary) 0%, #0f8a79 100%);
    color: #fff;
    padding: 4.5rem 0 5.5rem;
    position: relative;
}
.dir-hero h1 {
    font-weight: 800;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    letter-spacing: -.7px;
}
.dir-hero p.lead { opacity: .92; }

.search-card {
    background: #fff;
    border-radius: var(--dir-radius);
    box-shadow: var(--dir-shadow-lg);
    padding: .6rem;
}
.search-card .form-control,
.search-card .form-select {
    border: none;
    box-shadow: none !important;
    padding: .85rem 1rem;
    font-size: .98rem;
}
.search-card .search-divider { border-left: 1px solid var(--dir-line); }
.search-card .btn { border-radius: 10px; padding: .85rem 1.6rem; font-weight: 600; }

.hero-stats { margin-top: 2.2rem; }
.hero-stats .stat { text-align: center; }
.hero-stats .stat b { display: block; font-size: 1.5rem; font-weight: 800; }
.hero-stats .stat span { font-size: .85rem; opacity: .85; }

/* ---------------- sections ---------------- */

.dir-section { padding: 3.5rem 0; }
.dir-section.bg-soft { background: var(--dir-bg); }
.section-head { margin-bottom: 1.8rem; }
.section-head h2 {
    font-weight: 750;
    font-size: 1.5rem;
    letter-spacing: -.3px;
    margin-bottom: .25rem;
}
.section-head p { color: var(--dir-muted); margin: 0; font-size: .95rem; }

/* ---------------- category tiles ---------------- */

.cat-tile {
    display: block;
    background: #fff;
    border: 1px solid var(--dir-line);
    border-radius: var(--dir-radius);
    padding: 1.4rem 1rem;
    text-align: center;
    height: 100%;
    transition: .18s ease;
    color: var(--dir-ink);
}
.cat-tile:hover {
    border-color: var(--dir-primary);
    box-shadow: var(--dir-shadow);
    transform: translateY(-2px);
    color: var(--dir-primary);
}
.cat-tile i {
    font-size: 1.9rem;
    color: var(--dir-primary);
    display: block;
    margin-bottom: .6rem;
}
.cat-tile .cat-name { font-weight: 600; font-size: .95rem; display: block; }
.cat-tile .cat-count { font-size: .8rem; color: var(--dir-muted); }

/* ---------------- listing card ---------------- */

.listing-card {
    background: #fff;
    border: 1px solid var(--dir-line);
    border-radius: var(--dir-radius);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: .18s ease;
}
.listing-card:hover { box-shadow: var(--dir-shadow-lg); transform: translateY(-3px); }
.listing-card .lc-media {
    position: relative;
    aspect-ratio: 16 / 10;
    background: var(--dir-bg);
    overflow: hidden;
}
.listing-card .lc-media img { width: 100%; height: 100%; object-fit: cover; }
.listing-card .lc-badges {
    position: absolute;
    top: .6rem;
    left: .6rem;
    display: flex;
    gap: .35rem;
    flex-wrap: wrap;
}
.badge-featured { background: var(--dir-accent); color: #fff; }
.badge-verified { background: var(--dir-primary); color: #fff; }
.listing-card .badge { font-size: .7rem; font-weight: 600; padding: .34em .6em; border-radius: 6px; }

.listing-card .lc-body { padding: 1rem 1.1rem 1.15rem; flex: 1; display: flex; flex-direction: column; }
.listing-card .lc-cat { font-size: .78rem; color: var(--dir-primary); font-weight: 600; text-transform: uppercase; letter-spacing: .3px; }
.listing-card .lc-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: .25rem 0 .3rem;
    color: var(--dir-ink);
    line-height: 1.3;
}
.listing-card .lc-title:hover { color: var(--dir-primary); }
.listing-card .lc-meta { font-size: .87rem; color: var(--dir-muted); display: flex; align-items: start; gap: .35rem; margin-bottom: .5rem; }
.listing-card .lc-foot {
    margin-top: auto;
    padding-top: .75rem;
    border-top: 1px solid var(--dir-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rating-stars { color: #f5a623; font-size: .9rem; }
.rating-value { font-weight: 700; font-size: .9rem; }
.rating-count { color: var(--dir-muted); font-size: .82rem; }

.open-now { color: #1a9d5c; font-weight: 600; font-size: .82rem; }
.closed-now { color: #d1495b; font-weight: 600; font-size: .82rem; }

/* photo-less listings (most imported ones) get a branded tile, not a grey box */
.listing-card .lc-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--dir-primary-soft) 0%, #d3ece6 100%);
    color: var(--dir-primary);
    overflow: hidden;
}
.listing-card .lc-placeholder i { font-size: 2.6rem; opacity: .9; }
.listing-card .lc-placeholder-letter {
    position: absolute;
    right: -6px;
    bottom: -22px;
    font-size: 5rem;
    font-weight: 800;
    line-height: 1;
    color: #fff;
    opacity: .45;
}

/* ---------------- listings page ---------------- */

.page-head {
    background: var(--dir-bg);
    border-bottom: 1px solid var(--dir-line);
    padding: 1.8rem 0;
}
.page-head h1 { font-size: 1.6rem; font-weight: 750; margin: 0; }
.breadcrumb { margin: 0 0 .4rem; font-size: .85rem; }
.breadcrumb a { color: var(--dir-muted); }

.filter-card {
    background: #fff;
    border: 1px solid var(--dir-line);
    border-radius: var(--dir-radius);
    padding: 1.2rem;
    position: sticky;
    top: 90px;
}
.filter-card h6 { font-weight: 700; font-size: .95rem; margin-bottom: .8rem; }
.filter-group { margin-bottom: 1.2rem; }
.filter-group:last-child { margin-bottom: 0; }

/* ---------------- detail page ---------------- */

.detail-cover {
    height: 300px;
    /* listings without a cover photo fall back to the brand gradient
       instead of an empty grey band */
    background: linear-gradient(135deg, var(--dir-primary) 0%, #0f8a79 100%);
    position: relative;
    overflow: hidden;
}
.detail-cover.no-image { height: 190px; }
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }

.detail-headcard {
    background: #fff;
    border: 1px solid var(--dir-line);
    border-radius: var(--dir-radius);
    box-shadow: var(--dir-shadow);
    padding: 1.5rem;
    margin-top: -70px;
    position: relative;
    z-index: 2;
}
.detail-logo {
    width: 92px;
    height: 92px;
    border-radius: 14px;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: var(--dir-shadow);
    background: #fff;
}
.detail-headcard h1 { font-size: 1.65rem; font-weight: 800; margin: 0; letter-spacing: -.4px; }
.verified-tick { color: var(--dir-primary); font-size: 1.05rem; }

.detail-box {
    background: #fff;
    border: 1px solid var(--dir-line);
    border-radius: var(--dir-radius);
    padding: 1.4rem;
    margin-bottom: 1.2rem;
}
.detail-box h5 { font-weight: 700; font-size: 1.1rem; margin-bottom: 1rem; }

.info-row { display: flex; gap: .8rem; padding: .6rem 0; border-bottom: 1px solid var(--dir-line); }
.info-row:last-child { border-bottom: none; }
.info-row i { color: var(--dir-primary); font-size: 1.1rem; margin-top: .1rem; }
.info-row .info-label { font-size: .8rem; color: var(--dir-muted); display: block; }
.info-row .info-value { font-weight: 500; word-break: break-word; }

.chip-list { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip {
    background: var(--dir-primary-soft);
    color: var(--dir-primary-dark);
    border-radius: 999px;
    padding: .35rem .85rem;
    font-size: .85rem;
    font-weight: 500;
}

.hours-table td { padding: .5rem .3rem; border-bottom: 1px solid var(--dir-line); font-size: .92rem; }
.hours-table tr.today td { background: var(--dir-primary-soft); font-weight: 600; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.gallery-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; cursor: pointer; }

.review-item { padding: 1rem 0; border-bottom: 1px solid var(--dir-line); }
.review-item:last-child { border-bottom: none; }
.review-avatar {
    width: 42px; height: 42px; border-radius: 50%;
    background: var(--dir-primary-soft); color: var(--dir-primary-dark);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
}
.owner-reply {
    background: var(--dir-bg);
    border-left: 3px solid var(--dir-primary);
    padding: .7rem .9rem;
    border-radius: 0 8px 8px 0;
    margin-top: .7rem;
    font-size: .92rem;
}

.sticky-contact { position: sticky; top: 90px; }

.star-input { display: inline-flex; flex-direction: row-reverse; gap: .2rem; }
.star-input input { display: none; }
.star-input label { font-size: 1.6rem; color: #d6dde2; cursor: pointer; }
.star-input input:checked ~ label,
.star-input label:hover,
.star-input label:hover ~ label { color: #f5a623; }

/* ---------------- pricing ---------------- */

.plan-card {
    background: #fff;
    border: 2px solid var(--dir-line);
    border-radius: var(--dir-radius);
    padding: 2rem 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: .18s ease;
}
.plan-card:hover { box-shadow: var(--dir-shadow-lg); }
.plan-card.popular { border-color: var(--dir-primary); box-shadow: var(--dir-shadow-lg); }
.plan-card .popular-tag {
    position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
    background: var(--dir-primary); color: #fff;
    font-size: .75rem; font-weight: 700;
    padding: .3rem .9rem; border-radius: 999px;
    white-space: nowrap;
}
.plan-card .plan-name { font-weight: 750; font-size: 1.2rem; }
.plan-card .plan-price { font-size: 2.2rem; font-weight: 800; color: var(--dir-primary); }
.plan-card .plan-price small { font-size: .9rem; font-weight: 500; color: var(--dir-muted); }
.plan-card .plan-mrp { text-decoration: line-through; color: var(--dir-muted); font-size: 1rem; }
.plan-features { list-style: none; padding: 0; margin: 1.2rem 0; flex: 1; }
.plan-features li { padding: .45rem 0; font-size: .92rem; display: flex; gap: .55rem; }
.plan-features li i { color: var(--dir-primary); margin-top: .15rem; }

/* ---------------- city tiles ---------------- */

.city-tile {
    display: block;
    border-radius: var(--dir-radius);
    overflow: hidden;
    position: relative;
    height: 150px;
    background: var(--dir-primary);
    color: #fff;
}
.city-tile img { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.city-tile .city-name {
    position: absolute; inset: auto 0 0 0;
    padding: .9rem;
    background: linear-gradient(transparent, rgba(0,0,0,.6));
    font-weight: 700;
}
.city-tile .city-count { font-size: .8rem; font-weight: 400; opacity: .9; display: block; }

/* ---------------- claim / attribution ---------------- */

.claim-banner {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: var(--dir-radius);
    padding: 1rem 1.25rem;
    margin-top: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.claim-banner strong { display: block; color: #9a3412; }
.claim-banner span { font-size: .9rem; color: #7c2d12; }

.osm-attribution {
    font-size: .82rem;
    color: var(--dir-muted);
    background: var(--dir-bg);
    border-radius: 10px;
    padding: .7rem .9rem;
    margin: 0 0 1.5rem;
}
.osm-attribution a { color: var(--dir-primary); text-decoration: underline; }

.badge-unclaimed {
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
}

/* ---------------- footer ---------------- */

.dir-footer {
    background: #10242b;
    color: #c8d3d8;
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}
.dir-footer .footer-brand { color: #fff; font-weight: 750; }
.dir-footer h6 { color: #fff; font-weight: 650; margin-bottom: .9rem; font-size: .95rem; }
.dir-footer .footer-contact {
    list-style: none;
    padding: 0;
    margin: 1.1rem 0 1.2rem;
    font-size: .88rem;
}
.dir-footer .footer-contact li {
    display: flex;
    gap: .6rem;
    margin-bottom: .55rem;
    line-height: 1.5;
}
.dir-footer .footer-contact i { color: var(--dir-primary); margin-top: .15rem; }
.dir-footer .footer-contact a { color: #c8d3d8; }
.dir-footer .footer-contact a:hover { color: #fff; }
.dir-footer .footer-links { list-style: none; padding: 0; margin: 0; }
.dir-footer .footer-links li { margin-bottom: .45rem; }
.dir-footer .footer-links a { color: #c8d3d8; font-size: .9rem; }
.dir-footer .footer-links a:hover { color: #fff; }
.dir-footer .footer-social a {
    display: inline-flex; width: 36px; height: 36px;
    align-items: center; justify-content: center;
    border-radius: 50%; background: rgba(255,255,255,.08);
    color: #fff; margin-right: .4rem;
}
.dir-footer .footer-social a:hover { background: var(--dir-primary); }
.dir-footer .footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    margin-top: 2.2rem; padding-top: 1.2rem;
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
    font-size: .85rem;
}

/* ---------------- empty state ---------------- */

.empty-state { text-align: center; padding: 3.5rem 1rem; }
.empty-state i { font-size: 3rem; color: var(--dir-line); }
.empty-state h5 { margin-top: 1rem; font-weight: 700; }
.empty-state p { color: var(--dir-muted); }

/* ---------------- responsive ---------------- */

@media (max-width: 991.98px) {
    .filter-card, .sticky-contact { position: static; }
    .detail-headcard { margin-top: -40px; }
    .detail-cover { height: 200px; }
}
@media (max-width: 575.98px) {
    .dir-hero { padding: 3rem 0 3.5rem; }
    .search-card .search-divider { border-left: none; border-top: 1px solid var(--dir-line); }
    .dir-section { padding: 2.5rem 0; }
}
