/* =========================================================
   LocalBusiness — shared front-end styles
   Notes:
   - This file is loaded by BOTH the public site and the admin /
     business / user dashboards. New rules added for the 2026 public
     redesign are scoped under either the public-only classes
     (.lb-public-nav, .lb-secondary-nav, .lb-hero, .lb-deal-card, etc.)
     OR the public-main wrapper, so the admin/dashboard look is left
     untouched.
   ========================================================= */

:root {
    --lb-primary: #ff5722;
    --lb-primary-dark: #e64a19;
    --lb-primary-soft: #fff3ed;
    --lb-secondary: #1e293b;
    --lb-accent: #facc15;
    --lb-success: #16a34a;
    --lb-light: #f8fafc;
    --lb-muted: #64748b;
    --lb-border: #e2e8f0;
    --lb-radius: 12px;
    --lb-radius-sm: 8px;
    --lb-shadow: 0 4px 16px rgba(15, 23, 42, .06);
    --lb-shadow-md: 0 10px 30px rgba(15, 23, 42, .08);
    --lb-shadow-lg: 0 18px 50px rgba(15, 23, 42, .12);
    --lb-fast: 160ms ease;
    --lb-med: 280ms cubic-bezier(.22, .61, .36, 1);
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f6f7fb;
    color: #1f2937;
    font-size: 14.5px;
}
a { color: var(--lb-primary); }
a:hover { color: var(--lb-primary-dark); }

/* ---------- Buttons ---------- */
.btn-primary,
.bg-primary {
    background-color: var(--lb-primary) !important;
    border-color: var(--lb-primary) !important;
}
.btn-primary:hover { background-color: var(--lb-primary-dark) !important; border-color: var(--lb-primary-dark) !important; }
.text-primary { color: var(--lb-primary) !important; }
.btn-outline-primary { color: var(--lb-primary); border-color: var(--lb-primary); }
.btn-outline-primary:hover { background-color: var(--lb-primary); color: #fff; }

/* ---------- Cards ---------- */
.card {
    border: 1px solid var(--lb-border);
    border-radius: var(--lb-radius);
    box-shadow: var(--lb-shadow);
}
.card-header {
    background: #fff;
    border-bottom: 1px solid var(--lb-border);
    font-weight: 600;
}

.navbar-brand b { color: var(--lb-primary); }
.navbar.bg-white { box-shadow: 0 1px 3px rgba(0, 0, 0, .04); }

/* =========================================================
   PUBLIC-ONLY 2026 redesign
   Scoped under .public-main or specific public-* classes so admin
   panels keep their existing look.
   ========================================================= */

.public-main { background: #f6f7fb; }

/* ---------- Top bar (public site) ---------- */
.lb-public-nav {
    background: #fff;
    border-bottom: 1px solid var(--lb-border);
    box-shadow: 0 1px 3px rgba(15, 23, 42, .04);
    position: sticky;
    top: 0;
    z-index: 1030;
}
.lb-public-nav .navbar-brand {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--lb-secondary);
}
.lb-public-nav .navbar-brand b { color: var(--lb-primary); }
.lb-public-nav .lb-search {
    flex: 1;
    max-width: 460px;
}
.lb-public-nav .lb-search .form-control {
    border-right: 0;
    border-color: var(--lb-border);
}
.lb-public-nav .lb-search .btn { border-color: var(--lb-border); }

.lb-icon-btn {
    width: 42px; height: 42px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center; justify-content: center;
    border: 1px solid var(--lb-border);
    background: #fff;
    color: var(--lb-secondary);
    transition: var(--lb-fast);
}
.lb-icon-btn:hover { color: var(--lb-primary); border-color: var(--lb-primary); }

/* The account dropdown carries grouped Login/Register headers for guests, which
   need more room than Bootstrap's default menu width. */
.lb-account-menu { min-width: 220px; }

/* ---------- Secondary nav (under top bar, desktop only) ---------- */
.lb-secondary-nav {
    background: #fff;
    border-bottom: 1px solid var(--lb-border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.lb-secondary-nav .container {
    display: flex;
    gap: 4px;
    padding-top: 6px;
    padding-bottom: 6px;
}
.lb-secondary-nav a {
    flex: 0 0 auto;
    padding: 10px 16px;
    border-radius: var(--lb-radius-sm);
    font-weight: 500;
    color: var(--lb-secondary);
    text-decoration: none;
    transition: var(--lb-fast);
    white-space: nowrap;
    font-size: 14.5px;
}
.lb-secondary-nav a:hover {
    color: var(--lb-primary);
    background: var(--lb-primary-soft);
}
.lb-secondary-nav a.active {
    color: var(--lb-primary);
    background: var(--lb-primary-soft);
}

/* ---------- Off-canvas mobile menu ---------- */
.lb-offcanvas {
    background: #fff;
}
.lb-offcanvas .offcanvas-header {
    border-bottom: 1px solid var(--lb-border);
    padding: 16px 20px;
}
.lb-offcanvas .offcanvas-body { padding: 8px; }
.lb-offcanvas .lb-mobile-menu a {
    display: flex; align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--lb-radius-sm);
    color: var(--lb-secondary);
    font-weight: 500;
    text-decoration: none;
    transition: var(--lb-fast);
}
.lb-offcanvas .lb-mobile-menu a:hover,
.lb-offcanvas .lb-mobile-menu a.active {
    background: var(--lb-primary-soft);
    color: var(--lb-primary);
}
.lb-offcanvas .lb-mobile-menu a i { font-size: 20px; width: 22px; text-align: center; }
.lb-offcanvas .lb-mobile-cta { padding: 16px; border-top: 1px solid var(--lb-border); }

/* ---------- Mobile search row (below the brand strip) ---------- */
.lb-mobile-search {
    /* Sits below the sticky brand strip and scrolls away with the page, so the
       pinned header stays compact on a phone. */
    padding: 10px 0;
    background: #fff;
    border-bottom: 1px solid var(--lb-border);
}
.lb-mobile-search-field { position: relative; }
.lb-mobile-search-field > i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--lb-muted);
    font-size: 17px;
    pointer-events: none;
}
.lb-mobile-search-field .form-control {
    height: 46px;
    /* Room for the icon on the left; pill shape to match the mock-up. */
    padding-left: 44px;
    border-radius: 999px;
    border-color: var(--lb-border);
    background: #fff;
    font-size: 15px;
}
.lb-mobile-search-field .form-control:focus {
    border-color: var(--lb-primary);
    box-shadow: 0 0 0 3px rgba(255, 87, 34, .12);
}

/* ---------- Home banner slider ---------- */
.lb-banner-wrap { padding: 16px 0 4px; }

.lb-banner-slider { position: relative; }

.lb-banner-track {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    border-radius: 14px;
    /* Hide the scrollbar: the arrows and dots are the affordance here, and a
       visible bar under a banner looks like a rendering fault. */
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.lb-banner-track::-webkit-scrollbar { display: none; }

.lb-banner-slide {
    /* Exactly one slide per view, at every breakpoint. */
    flex: 0 0 100%;
    min-width: 100%;
    scroll-snap-align: start;
}
.lb-banner-slide > a { display: block; }
.lb-banner-slide picture { display: block; }

.lb-banner-slide img {
    display: block;
    width: 100%;
    /* A fixed ratio keeps every slide the same height, so the page does not
       jump as the track scrolls between differently proportioned artwork.
       object-fit covers the box and centres the crop. */
    aspect-ratio: 1600 / 450;
    object-fit: cover;
    object-position: center;
    border-radius: 14px;
    background: #eef0f5;
}

.lb-banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px; height: 38px;
    border-radius: 50%;
    border: 1px solid var(--lb-border);
    background: rgba(255, 255, 255, .92);
    color: var(--lb-secondary);
    display: inline-flex;
    align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .12);
    transition: var(--lb-fast);
    z-index: 2;
}
.lb-banner-arrow:hover { color: var(--lb-primary); border-color: var(--lb-primary); }
.lb-banner-prev { left: 10px; }
.lb-banner-next { right: 10px; }

.lb-banner-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-top: 10px;
}
.lb-banner-dots button {
    width: 8px; height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #cbd5e1;
    transition: var(--lb-fast);
}
.lb-banner-dots button.active {
    background: var(--lb-primary);
    /* Widened rather than enlarged, so the row's height never shifts. */
    width: 20px;
    border-radius: 999px;
}

@media (max-width: 767.98px) {
    .lb-banner-wrap { padding: 4px 0 0; }
    .lb-banner-track { border-radius: 12px; }
    .lb-banner-slide img { border-radius: 12px; }

    /* Phones, WITH a dedicated mobile image: the artwork was authored for this
       shape, so a taller box is safe and fills the screen properly.
       `.has-mobile` is set server-side because <picture> swaps the resource,
       NOT the CSS box — a media query alone cannot tell the two cases apart. */
    .lb-banner-slide.has-mobile img { aspect-ratio: 16 / 10; }

    /* Phones, WITHOUT one: keep the wide desktop ratio. It renders short, but
       every pixel of the artwork is visible. Cropping to a squarer box here
       would discard ~50% of a 1600x450 banner's width and take the headline
       with it, which is the exact failure a mobile upload exists to avoid. */
    .lb-banner-slide:not(.has-mobile) img { aspect-ratio: 1600 / 450; }

    /* Arrows are redundant next to a swipe, and they cover the artwork. */
    .lb-banner-arrow { display: none; }
}

/* ---------- Home display-ad row (was inside the hero) ---------- */
.lb-home-ad-wrap { padding: 14px 0 0; }
.lb-home-ad-wrap :is(img, iframe) { max-width: 100%; }

/* ---------- Fixed mobile bottom bar ---------- */
.lb-bottom-nav {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 1035;
    display: flex;
    background: #fff;
    border-top: 1px solid var(--lb-border);
    box-shadow: 0 -2px 10px rgba(15, 23, 42, .06);
    /* Clears the iOS home indicator so the labels are not cut off. */
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.lb-bottom-nav a {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 7px 2px 6px;
    text-decoration: none;
    color: var(--lb-muted);
    /* 10px, not 11px: five slots leave ~78px each on a 390px phone. */
    font-size: 10px;
    font-weight: 600;
    line-height: 1.1;
    transition: var(--lb-fast);
    /* Sized for the tallest slot (icon row + two label lines), and top-aligned
       rather than centred: with justify-content:center a one-line label sits
       lower than the first line of a two-line one, so they would not share a
       baseline — which is the whole point of the fixed icon row below. */
    justify-content: flex-start;
    min-height: 66px;
}
/* All icons reserve the same 26px row, including the taller CTA circle below,
   so the labels below them stay on one baseline. */
.lb-bottom-nav a i {
    font-size: 19px;
    line-height: 1;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.lb-bottom-nav a span {
    max-width: 100%;
    /* Wrap instead of ellipsis: with five slots a two-word label like
       "Expert Consult" cannot fit one line, and "Expert Con…" reads worse than
       two short lines. Clamped to 2 so the bar height stays predictable. */
    white-space: normal;
    text-align: center;
    line-height: 1.15;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Expert Consult is the bar's call to action, not a peer tab: accent colour at
   all times (even when another page is active) and a filled circle behind the
   icon so it reads as a button. */
.lb-bottom-nav a.lb-bn-cta { color: var(--lb-primary); }
.lb-bottom-nav a.lb-bn-cta i {
    width: 26px;
    border-radius: 50%;
    background: var(--lb-primary);
    color: #fff;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(255, 87, 34, .35);
}
/* The CTA is accent-coloured at all times, so colour alone cannot show that you
   are ON it. A ring gives the active state a second, independent signal. */
.lb-bottom-nav a.lb-bn-cta.active i {
    box-shadow: 0 0 0 3px rgba(255, 87, 34, .28), 0 2px 6px rgba(255, 87, 34, .35);
}
.lb-bottom-nav a.lb-bn-cta.active span { text-decoration: underline; }
.lb-bottom-nav a.active,
.lb-bottom-nav a:active { color: var(--lb-primary); }

/* NOTE: the clearance that stops this bar covering the footer lives further
   down, immediately AFTER `footer.lb-footer`'s own rule. It cannot live here:
   a media query adds no specificity, so the later `padding` shorthand on
   `footer.lb-footer` would reset `padding-bottom` and the reservation would
   silently do nothing. */

/* ---------- Hero ---------- */
.lb-hero {
    background:
        radial-gradient(circle at 80% -10%, rgba(255, 255, 255, .15), transparent 50%),
        linear-gradient(135deg, var(--lb-primary) 0%, #f97316 60%, #fb923c 100%);
    color: #fff;
    padding: 60px 0 70px;
    position: relative;
    overflow: hidden;
}
.lb-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 10% 80%, rgba(255, 255, 255, .12), transparent 40%);
    pointer-events: none;
}
.lb-hero h1 {
    font-weight: 800;
    letter-spacing: -.02em;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.15;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}
.lb-hero p { font-size: 17px; opacity: .95; }
.lb-hero .form-control { height: 48px; border-radius: 8px; border: 0; }
.lb-hero .btn { height: 48px; }

/* Compact page-header band: a title + one line of copy, no more. Used on
   listing/landing pages (deals, vaayu-setu, expert-consult) where the hero is
   a heading strip, not a call to action, so it should not eat the fold. */
.lb-hero.lb-hero-slim { padding: 22px 0; }
.lb-hero.lb-hero-slim h1 { font-size: clamp(20px, 3vw, 26px); margin-bottom: 2px; }
.lb-hero.lb-hero-slim p  { font-size: 14px; margin-bottom: 0; }
@media (max-width: 767.98px) {
    .lb-hero.lb-hero-slim { padding: 18px 0; }
}

/* ---------- Section headings ---------- */
.lb-section { padding: 56px 0; }
.lb-section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 22px;
    flex-wrap: wrap;
    gap: 12px;
}
.lb-section-head h3 {
    font-weight: 800;
    letter-spacing: -.02em;
    margin: 0;
    font-size: clamp(20px, 2.4vw, 26px);
}
.lb-section-head .lb-eyebrow {
    color: var(--lb-primary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: .12em;
}
.lb-view-all {
    color: var(--lb-primary);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.lb-view-all:hover { color: var(--lb-primary-dark); }

/* ---------- Horizontal carousel (CSS scroll-snap) ---------- */
.lb-carousel {
    position: relative;
}
.lb-carousel-track {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    padding: 4px 4px 18px 4px;     /* room for shadow + scrollbar gap */
    scrollbar-width: thin;
}
.lb-carousel-track > * {
    flex: 0 0 280px;
    scroll-snap-align: start;
}
@media (min-width: 768px) {
    .lb-carousel-track > * { flex: 0 0 300px; }
}
.lb-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px; height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--lb-border);
    box-shadow: var(--lb-shadow);
    color: var(--lb-secondary);
    display: inline-flex;
    align-items: center; justify-content: center;
    cursor: pointer;
    z-index: 4;
    transition: var(--lb-fast);
}
.lb-carousel-arrow:hover { color: var(--lb-primary); border-color: var(--lb-primary); }
.lb-carousel-arrow.lb-prev { left: -22px; }
.lb-carousel-arrow.lb-next { right: -22px; }
.lb-carousel-arrow:disabled,
.lb-carousel-arrow.is-disabled { opacity: .4; cursor: default; }
@media (max-width: 767px) {
    .lb-carousel-arrow { display: none; }
}

/* ---------- Carousel: exact-fit variant (.lb-carousel-fit) ----------
   The base carousel sizes slides in fixed pixels, so how many you see depends
   on the viewport. This variant instead divides the track so exactly N slides
   fill the width: 2 on mobile, 4 from the md breakpoint up. The subtracted
   figure is the total gap between the visible slides — (N-1) x 18px — because
   `gap` is added BETWEEN flex items and would otherwise push the last one out
   of view. */
.lb-carousel-fit .lb-carousel-track > * {
    flex: 0 0 calc((100% - 18px) / 2);          /* 2 up: one 18px gap */
    scroll-snap-align: start;
}
@media (min-width: 768px) {
    .lb-carousel-fit .lb-carousel-track > * {
        flex: 0 0 calc((100% - 54px) / 4);      /* 4 up: three 18px gaps */
    }
}
/* Arrows stay available on mobile here — swipe still works, but this variant is
   used for sections where the arrows are the discoverable affordance. They move
   inside the track because the base -22px position would sit off-screen on a
   phone, and shrink so they cover as little of the card as possible. */
@media (max-width: 767.98px) {
    .lb-carousel-fit .lb-carousel-arrow {
        display: inline-flex;
        width: 32px; height: 32px;
        background: rgba(255, 255, 255, .93);
    }
    .lb-carousel-fit .lb-carousel-arrow.lb-prev { left: 2px; }
    .lb-carousel-fit .lb-carousel-arrow.lb-next { right: 2px; }
    /* Nothing to page through when everything already fits. */
    .lb-carousel-fit .lb-carousel-arrow.is-disabled { display: none; }
}

/* ---------- Deal card (public new variant) ---------- */
.lb-deal-card {
    border: 1px solid var(--lb-border);
    border-radius: var(--lb-radius);
    background: #fff;
    overflow: hidden;
    transition: transform var(--lb-med), box-shadow var(--lb-med);
    height: 100%;
    display: flex; flex-direction: column;
}
.lb-deal-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--lb-shadow-md);
}
.lb-deal-card .lb-deal-img {
    aspect-ratio: 4/3;
    object-fit: cover;
    width: 100%;
    background: #f1f5f9;
    display: block;
}
.lb-deal-card .lb-deal-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.lb-deal-card .lb-deal-biz {
    font-size: 12px;
    color: var(--lb-muted);
    margin-bottom: 6px;
    display: flex; align-items: center; gap: 6px;
}
.lb-deal-card .lb-deal-biz img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; }
.lb-deal-card .lb-deal-title {
    font-weight: 600;
    color: #0f172a;
    line-height: 1.3;
    margin-bottom: 10px;
    min-height: 38px;
    font-size: 15px;
}
.lb-deal-card .lb-price-strike { text-decoration: line-through; color: #94a3b8; font-size: 13px; }
.lb-deal-card .lb-price-now    { color: var(--lb-primary); font-weight: 700; font-size: 18px; }
.lb-deal-card .lb-deal-badge {
    position: absolute;
    top: 10px; left: 10px;
    background: var(--lb-primary);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
}

/* ---------- Business card ---------- */
.lb-biz-card {
    border: 1px solid var(--lb-border);
    border-radius: var(--lb-radius);
    background: #fff;
    overflow: hidden;
    transition: transform var(--lb-med), box-shadow var(--lb-med);
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}
.lb-biz-card:hover { transform: translateY(-4px); box-shadow: var(--lb-shadow-md); color: inherit; }
.lb-biz-card .lb-biz-cover {
    aspect-ratio: 16/8;
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%) center/cover no-repeat;
}
.lb-biz-card .lb-biz-body {
    padding: 16px;
    position: relative;
}
.lb-biz-card .lb-biz-logo {
    width: 56px; height: 56px;
    border-radius: 12px;
    border: 3px solid #fff;
    object-fit: cover;
    background: #fff;
    box-shadow: var(--lb-shadow);
    margin-top: -42px;
    margin-bottom: 8px;
}
.lb-biz-card h6 { font-weight: 700; margin-bottom: 4px; line-height: 1.25; }
.lb-biz-card .lb-biz-meta { color: var(--lb-muted); font-size: 13px; }

/* ---------- Classified card ---------- */
.lb-classified-card {
    border: 1px solid var(--lb-border);
    border-radius: var(--lb-radius);
    background: #fff;
    overflow: hidden;
    transition: var(--lb-med);
    text-decoration: none;
    color: inherit;
    height: 100%;
    display: flex; flex-direction: column;
}
.lb-classified-card:hover { transform: translateY(-3px); box-shadow: var(--lb-shadow-md); color: inherit; }
.lb-classified-card .lb-classified-img {
    aspect-ratio: 4/3;
    object-fit: cover;
    width: 100%;
    background: #f1f5f9;
}
.lb-classified-card .lb-classified-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.lb-classified-card .lb-classified-cat {
    font-size: 12px;
    color: var(--lb-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.lb-classified-card h6 { font-weight: 600; margin-bottom: 8px; min-height: 38px; }
.lb-classified-card .lb-classified-foot { display: flex; justify-content: space-between; align-items: center; }

/* ---------- Donation card (public preview = title + photo + category) ---------- */
.lb-donation-card {
    border: 1px solid var(--lb-border);
    border-radius: var(--lb-radius);
    background: #fff;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
    transition: var(--lb-med);
}
.lb-donation-card:hover { transform: translateY(-3px); box-shadow: var(--lb-shadow-md); color: inherit; }
.lb-donation-card .lb-don-img {
    aspect-ratio: 4/3;
    object-fit: cover;
    width: 100%;
    background: #f1f5f9;
}
.lb-donation-card .lb-don-img-fallback {
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    display: flex; align-items: center; justify-content: center;
}
.lb-donation-card .lb-don-img-fallback i {
    font-size: 60px;
    color: var(--lb-primary);
    opacity: .8;
}
.lb-donation-card .lb-don-body { padding: 14px; }
.lb-donation-card .lb-don-cat {
    display: inline-block;
    font-size: 11px;
    color: var(--lb-primary);
    background: var(--lb-primary-soft);
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.lb-donation-card h6 { font-weight: 600; margin: 0; line-height: 1.3; }

/* ---------- Status pills (kept for compatibility) ---------- */
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.pill-active   { background: #dcfce7; color: #166534; }
.pill-pending  { background: #fef3c7; color: #92400e; }
.pill-rejected { background: #fee2e2; color: #991b1b; }
.pill-expired  { background: #f1f5f9; color: #475569; }
.pill-redeemed { background: #dbeafe; color: #1e40af; }

/* ---------- Reward-type badge (deals) ---------- */
.reward-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}
.reward-badge.rewards    { background: #dcfce7; color: #166534; }
.reward-badge.no-rewards { background: #f1f5f9; color: #475569; }
.reward-badge i { font-size: 12px; }

/* ---------- Loyalty pill (existing) ---------- */
.loyalty-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600;
}
.loyalty-bronze   { background: #fef3c7; color: #92400e; }
.loyalty-silver   { background: #e2e8f0; color: #475569; }
.loyalty-gold     { background: #fde68a; color: #78350f; }
.loyalty-platinum { background: #c7d2fe; color: #3730a3; }

/* ---------- Existing classes kept intact (admin/dashboard rely on them) ---------- */
.deal-card .deal-img {
    aspect-ratio: 4/3;
    object-fit: cover;
    width: 100%;
    border-top-left-radius: var(--lb-radius);
    border-top-right-radius: var(--lb-radius);
}
.deal-card .deal-badge {
    position: absolute;
    top: 10px; left: 10px;
    background: var(--lb-primary);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}
.deal-card .deal-title { font-weight: 600; color: #0f172a; line-height: 1.3; min-height: 38px; }
.deal-card .price-strike { text-decoration: line-through; color: #94a3b8; }
.deal-card .price-now    { color: var(--lb-primary); font-weight: 700; font-size: 18px; }

/* old hero kept for any non-redesigned page that still references it */
:not(.public-main) .lb-hero { padding: 60px 0 80px; }

.cat-tile {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: #fff; border: 1px solid var(--lb-border); border-radius: 12px;
    padding: 22px 10px; text-align: center; transition: .2s; height: 100%;
    text-decoration: none; color: var(--lb-secondary);
}
.cat-tile:hover { transform: translateY(-2px); box-shadow: var(--lb-shadow); border-color: var(--lb-primary); }
.cat-tile i { font-size: 30px; color: var(--lb-primary); margin-bottom: 8px; }

/* business profile bits used by business.php detail */
.biz-cover { height: 240px; background: #1e293b center/cover no-repeat; border-radius: 14px; }
.biz-logo  { width: 110px; height: 110px; border-radius: 16px; border: 4px solid #fff; object-fit: cover; margin-top: -55px; background: #fff; }
.rating-stars { color: var(--lb-accent); }

/* coupon */
.coupon-card {
    background: #fff; border: 2px dashed var(--lb-primary);
    border-radius: 14px; padding: 22px;
    position: relative; overflow: hidden;
}
.coupon-card .code {
    font-family: 'Courier New', monospace;
    font-weight: 700; font-size: 22px; letter-spacing: 2px;
    color: var(--lb-primary);
}

/* utility */
.text-muted-2 { color: var(--lb-muted); }
.divider { height: 1px; background: var(--lb-border); margin: 18px 0; }
.shadow-sm-x { box-shadow: 0 1px 3px rgba(15, 23, 42, .05); }

/* ---------- Footer ---------- */
footer.lb-footer {
    background: var(--lb-secondary);
    color: #cbd5e1;
    padding: 56px 0 24px;
    margin-top: 60px;
}
footer.lb-footer h6 { color: #fff; font-weight: 700; margin-bottom: 16px; letter-spacing: -.01em; }
footer.lb-footer a  { color: #94a3b8; text-decoration: none; display: block; padding: 4px 0; transition: var(--lb-fast); }
footer.lb-footer a:hover { color: #fff; }
footer.lb-footer .copy { border-top: 1px solid #334155; margin-top: 30px; padding-top: 18px; font-size: 13px; color: #94a3b8; }

/* Clearance for the fixed mobile bottom bar (.lb-bottom-nav).
   MUST stay after the `footer.lb-footer` shorthand above: same specificity, so
   source order decides, and declaring it earlier makes it a no-op that lets the
   bar cover the copyright and Terms/Privacy row. */
@media (max-width: 991.98px) {
    footer.lb-footer { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- Mobile tweaks ---------- */
@media (max-width: 767.98px) {
    .lb-hero { padding: 40px 0 50px; }
    .lb-section { padding: 40px 0; }
}

/* Reduce motion on user request */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}


/* =========================================================
   HOME: DEAL CATEGORY STRIP
   Horizontal scroller of category icons, showing only the
   categories that currently have at least one live deal.
   Scroll-snap gives native touch/swipe; the arrows are for
   mouse users and disable themselves at either end.
   ========================================================= */
.lb-cat-strip-wrap {
    padding: 36px 0 8px;
}
.lb-cat-strip {
    position: relative;
}
.lb-cat-track {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scroll-behavior: smooth;
    padding: 4px 2px 14px;
    /* Hide the scrollbar but keep the element scrollable. */
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.lb-cat-track::-webkit-scrollbar { display: none; }

.lb-cat-item {
    flex: 0 0 auto;
    scroll-snap-align: start;
    width: 116px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 10px 14px;
    background: #fff;
    border: 1px solid var(--lb-border, #e2e8f0);
    border-radius: 16px;
    text-decoration: none;
    color: var(--lb-secondary, #0f172a);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.lb-cat-item:hover {
    transform: translateY(-4px);
    border-color: var(--lb-primary, #ff5722);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .10);
    color: var(--lb-secondary, #0f172a);
}
.lb-cat-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--lb-primary, #ff5722);
    background: var(--lb-primary-soft, rgba(255, 87, 34, .10));
    transition: background .18s ease, color .18s ease;
}
.lb-cat-item:hover .lb-cat-icon {
    background: var(--lb-primary, #ff5722);
    color: #fff;
}
.lb-cat-name {
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    /* Two lines max, so long category names cannot break the row height. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.lb-cat-count {
    font-size: 11px;
    color: #64748b;
}

.lb-cat-arrow {
    position: absolute;
    top: 38%;
    transform: translateY(-50%);
    z-index: 3;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--lb-border, #e2e8f0);
    background: #fff;
    color: var(--lb-secondary, #0f172a);
    box-shadow: 0 4px 12px rgba(15, 23, 42, .10);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity .18s ease;
}
.lb-cat-prev { left: -8px; }
.lb-cat-next { right: -8px; }
.lb-cat-arrow.is-disabled {
    opacity: 0;
    pointer-events: none;
}
/* Arrows are pointless on touch devices, which swipe instead. */
@media (max-width: 767.98px) {
    .lb-cat-arrow { display: none; }
    .lb-cat-item  { width: 104px; }
}

/* Lettered-circle fallback used where a business logo would normally sit. */
.lb-biz-logo-initial {
    display: inline-flex;
    padding: 0;
    background: none;
    border: none;
}


/* ==========================================================================
   Deals without a photo
   --------------------------------------------------------------------------
   Deal images used to be mandatory, so every card rendered a bare <img> and a
   deal saved without one produced a browser broken-image icon. Photos are now
   optional, so DealEngine::imageHtml() emits this placeholder instead: a tinted
   panel carrying the discount (or the deal's initial) plus a tag glyph.

   The hue comes from a hash of the deal title, so two adjacent cards without
   photos do not look like a rendering fault, and the same deal keeps the same
   colour on every page.
   ========================================================================== */
.lb-deal-ph {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    linear-gradient(135deg,
      hsl(var(--ph-hue, 18) 72% 94%) 0%,
      hsl(var(--ph-hue, 18) 62% 86%) 100%);
  border-bottom: 1px solid rgba(0, 0, 0, .05);
}

/* Oversized watermark glyph, bled off the corner so it reads as texture
   rather than as a missing-image symbol. */
.lb-deal-ph-icon {
  position: absolute;
  right: -10px;
  bottom: -16px;
  font-size: 84px;
  line-height: 1;
  color: hsl(var(--ph-hue, 18) 55% 62%);
  opacity: .22;
  pointer-events: none;
}

.lb-deal-ph-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  color: hsl(var(--ph-hue, 18) 65% 28%);
}

.lb-deal-ph-pct    { font-size: 34px; font-weight: 800; letter-spacing: -1px; }
.lb-deal-ph-off    { font-size: 12px; font-weight: 700; letter-spacing: 2px; opacity: .75; margin-top: 2px; }
.lb-deal-ph-letter { font-size: 46px; font-weight: 800; }

/* The business-profile and business-panel cards use .deal-img, which is a
   different box; keep the placeholder honouring whatever height it sets. */
.deal-img.lb-deal-ph { min-height: 120px; }

@media (max-width: 575.98px) {
  .lb-deal-ph-icon { font-size: 64px; }
  .lb-deal-ph-pct  { font-size: 26px; }
  .lb-deal-ph-letter { font-size: 34px; }
}

/* ==========================================================================
   Reward Deals highlight
   --------------------------------------------------------------------------
   Reward Deals sort ahead of No-Rewards deals. Position alone is too subtle to
   notice on a grid, so they also carry a warm ring and a corner flash. Applied
   via DealEngine::cardClass(), which returns nothing when the admin turns
   `reward_deals_first` off — so switching the feature off removes the visual
   treatment too, rather than leaving a highlight that no longer means anything.
   ========================================================================== */
.lb-deal-card.lb-deal-reward {
  border-color: rgba(255, 87, 34, .38);
  box-shadow: 0 2px 10px rgba(255, 87, 34, .10);
}

.lb-deal-card.lb-deal-reward:hover {
  border-color: rgba(255, 87, 34, .6);
  box-shadow: 0 8px 22px rgba(255, 87, 34, .18);
}

/* Thin accent bar along the top edge of a reward deal card. */
.lb-deal-card.lb-deal-reward::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ff5722, #ff9800);
  z-index: 2;
  pointer-events: none;
}


/* Deal detail hero when no photo was uploaded — same generated tile as the
   listings, but at hero proportions instead of a card thumbnail. */
.lb-deal-hero-ph {
  aspect-ratio: 16 / 10;
  min-height: 220px;
}
.lb-deal-hero-ph .lb-deal-ph-icon  { font-size: 160px; right: -20px; bottom: -30px; }
.lb-deal-hero-ph .lb-deal-ph-pct   { font-size: 72px; }
.lb-deal-hero-ph .lb-deal-ph-off   { font-size: 18px; letter-spacing: 4px; }
.lb-deal-hero-ph .lb-deal-ph-letter{ font-size: 96px; }

@media (max-width: 575.98px) {
  .lb-deal-hero-ph .lb-deal-ph-icon   { font-size: 110px; }
  .lb-deal-hero-ph .lb-deal-ph-pct    { font-size: 48px; }
  .lb-deal-hero-ph .lb-deal-ph-letter { font-size: 64px; }
}
