/* ===========================================================
   Hopson Lumber Company — new-site main stylesheet
   Modern, sleek lumberyard look (Dunn Lumber inspired):
   deep forest green + warm cedar amber, clean type, big hero.
   =========================================================== */

:root {
    /* Color scheme: DARK GRAY / BLACK (active). Two earlier schemes are
       preserved in the comment blocks below for reference/revert -- to
       revert to one of them, comment out these 5 --hl-gray-* lines and
       uncomment the matching 5-line block beneath, then find/replace every
       var(--hl-gray-###) below back to var(--hl-blue-###) or
       var(--hl-green-###) to match. */
    --hl-gray-950: #0e0e0f;
    --hl-gray-900: #18181a;
    --hl-gray-800: #262629;
    --hl-gray-700: #3a3a3f;
    --hl-gray-600: #55565c;
    /* --- PREVIOUS SCHEME: BLUE -------------------------------------
    --hl-blue-950: #0b1f33;
    --hl-blue-900: #0f2a44;
    --hl-blue-800: #153a5c;
    --hl-blue-700: #1c4f7a;
    --hl-blue-600: #2870a3;
    ----------------------------------------------------------------- */
    /* --- ORIGINAL SCHEME: GREEN -------------------------------------
    --hl-green-950: #0d1f16;
    --hl-green-900: #12291d;
    --hl-green-800: #17341f;
    --hl-green-700: #1f4229;
    --hl-green-600: #2b5738;
    ----------------------------------------------------------------- */
    --hl-amber-600: #c8791f;
    --hl-amber-500: #dd9433;
    --hl-amber-400: #e8ab53;
    --hl-cream: #f6f2ea;
    --hl-cream-dark: #ece4d4;
    --hl-tan: #d8c39c;
    --hl-white: #ffffff;
    --hl-ink: #1a1d1b;
    --hl-grey: #5c6360;
    --hl-grey-light: #9aa39d;
    --hl-border: #e2ddd0;
    --hl-danger: #b3402c;
    --hl-success: #2f7d4f;
    --hl-radius: .5rem;
    --hl-radius-lg: 1rem;
    /* Shadow tint follows --hl-gray-950 (now dark gray/black). Previous
       blue and original green rgba kept commented alongside for revert. */
    --hl-shadow: 0 10px 30px -12px rgba(14, 14, 15, .25);
    --hl-shadow-sm: 0 4px 14px -6px rgba(14, 14, 15, .18);
    /* --hl-shadow: 0 10px 30px -12px rgba(11, 31, 51, .25); */
    /* --hl-shadow-sm: 0 4px 14px -6px rgba(11, 31, 51, .18); */
    /* --hl-shadow: 0 10px 30px -12px rgba(13, 31, 22, .25); */
    /* --hl-shadow-sm: 0 4px 14px -6px rgba(13, 31, 22, .18); */
    --hl-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    /* Display font: Poppins (modern sans-serif), active. Original serif
       display font (Fraunces) kept below for revert -- also swap the
       Head.google_fonts value in app/config/head.php back if you revert. */
    --hl-font-display: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    /* --hl-font-display: 'Fraunces', Georgia, serif; */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--hl-font-body), sans-serif;
    color: var(--hl-ink);
    background: var(--hl-white);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--hl-gray-700); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--hl-amber-600); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--hl-font-display), sans-serif;
    font-weight: 600;
    color: var(--hl-gray-950);
    line-height: 1.15;
    margin: 0 0 .3rem;
}

p { line-height: 1.7; color: var(--hl-ink); }

.text-muted-hl { color: var(--hl-grey); }
.eyebrow {
    display: inline-block;
    font-family: var(--hl-font-body), sans-serif;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-size: .75rem;
    color: var(--hl-amber-600);
    margin-bottom: .5rem;
}

.section {
    padding: 4.5rem 0;
}
.section-sm { padding: 2.75rem 0; }
.section-cream { background: var(--hl-cream); }
.section-dark { background: var(--hl-gray-950); color: var(--hl-cream); }
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4, .section-dark p { color: var(--hl-cream); }

/* ---------- Buttons ---------- */
.btn { border-radius: 999px; font-weight: 600; padding: .65rem 1.5rem; border: 2px solid transparent; transition: all .15s ease; }
.btn-hl-primary {
    background: var(--hl-amber-600);
    border-color: var(--hl-amber-600);
    color: var(--hl-white);
}
.btn-hl-primary:hover { background: var(--hl-amber-500); border-color: var(--hl-amber-500); color: var(--hl-white); }
.btn-hl-outline {
    background: transparent;
    border-color: var(--hl-cream);
    color: var(--hl-cream);
}
.btn-hl-outline:hover { background: var(--hl-cream); color: var(--hl-gray-950); }
.btn-hl-outline-dark {
    background: transparent;
    border-color: var(--hl-gray-800);
    color: var(--hl-gray-800);
}
.btn-hl-outline-dark:hover { background: var(--hl-gray-800); color: var(--hl-white); }
.btn-hl-sm { padding: .4rem 1rem; font-size: .875rem; }

/* ---------- Top utility bar ---------- */
#top-bar {
    background: var(--hl-gray-950);
    color: var(--hl-cream-dark);
    font-size: .82rem;
    padding: .45rem 0;
}
#top-bar a { color: var(--hl-cream-dark); }
#top-bar a:hover { color: var(--hl-amber-400); }
#top-bar .divider { opacity: .35; margin: 0 .6rem; }

/* ---------- Banner / header ---------- */
#banner {
    background: var(--hl-white) url('/images/background.webp') repeat-y center top;
    border-bottom: 1px solid var(--hl-border);
    padding: 1rem 0;
}
#banner .logo-image { max-height: 96px; }
#banner .brand-wordmark {
    font-family: var(--hl-font-display), sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--hl-gray-950);
    line-height: 1.05;
}
#banner .brand-wordmark span { display: block; font-family: var(--hl-font-body), sans-serif; font-size: .65rem; letter-spacing: .16em; text-transform: uppercase; color: var(--hl-amber-600); font-weight: 700; }
#search-block { display: flex; align-items: center; }
#search-block form { display: flex; flex: 1; width: 100%; }
#search-block input[type="search"] {
    flex: 1;
    border: 1px solid var(--hl-border);
    border-radius: 999px 0 0 999px;
    padding: .55rem 1rem;
    background: var(--hl-cream);
}
#search-block button {
    border: none;
    background: var(--hl-gray-800);
    color: var(--hl-white);
    padding: .55rem 1.1rem;
    border-radius: 0 999px 999px 0;
    font-weight: 600;
}
#store-locator-block { text-align: right; font-size: .9rem; }
#store-locator-block a { display: inline-block; color: var(--hl-ink); font-weight: 600; margin-bottom: .15rem; }
#store-locator-block a:hover { color: var(--hl-amber-600); }
#store-locator-block .msg-badge {
    display: inline-block;
    background: var(--hl-amber-600);
    color: var(--hl-white);
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 700;
    padding: .05rem .4rem;
    margin-left: .25rem;
    vertical-align: top;
}
#store-locator-block .account-toolbar { margin-bottom: 0; }
#store-locator-block .icon-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    font-size: 1.05rem;
    color: var(--hl-ink);
    margin-bottom: 0;
}
#store-locator-block .icon-link:hover { color: var(--hl-amber-600); }
#store-locator-block .icon-badge {
    position: absolute;
    top: -.15rem;
    right: -.15rem;
    background: var(--hl-amber-600);
    color: var(--hl-white);
    border-radius: 999px;
    font-size: .65rem;
    font-weight: 700;
    line-height: 1;
    padding: .18rem .35rem;
    min-width: 1.1rem;
    text-align: center;
}
#store-locator-block .account-menu-toggle {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0;
}
#store-locator-block .account-menu-toggle::after { margin-left: .4rem; vertical-align: .1em; }
#store-locator-block .account-menu-dropdown {
    background: var(--hl-white);
    border: 1px solid var(--hl-border);
    border-radius: var(--hl-radius-lg);
    padding: .4rem 0;
    min-width: 190px;
    box-shadow: 0 12px 28px -12px rgba(13,31,22,.35);
}
#store-locator-block .account-menu-dropdown .dropdown-item { padding: .5rem 1rem; font-size: .88rem; color: var(--hl-ink); font-weight: 600; }
#store-locator-block .account-menu-dropdown .dropdown-item:hover, #store-locator-block .account-menu-dropdown .dropdown-item:focus { background: var(--hl-cream); color: var(--hl-gray-900); }

/* ---------- Nav ---------- */
.navbar.hl-navbar {
    background: var(--hl-gray-950) !important;
    padding: 0;
    box-shadow: 0 6px 16px -6px rgba(13,31,22,.45);
    position: relative;
    z-index: 20;
}
.hl-navbar .navbar-nav { width: 100%; justify-content: center; }
.hl-navbar .nav-link {
    color: var(--hl-cream-dark) !important;
    font-weight: 600;
    font-size: .92rem;
    padding: .9rem 1.05rem !important;
    letter-spacing: .01em;
}
.hl-navbar .nav-link:hover, .hl-navbar .nav-link.active { color: var(--hl-amber-400) !important; }
.hl-navbar .dropdown-menu {
    background: #000000;
    border: none;
    border-radius: 0 0 .5rem .5rem;
    padding: .4rem 0;
}
.hl-navbar .dropdown-item { color: var(--hl-cream-dark); padding: .5rem 1.25rem; font-size: .9rem; }
.hl-navbar .dropdown-item:hover, .hl-navbar .dropdown-item:focus { background: var(--hl-tan); color: var(--hl-gray-900); }
.hl-navbar .dropdown-divider { border-top-color: var(--hl-grey-light); opacity: .35; margin: .3rem 1.25rem; }
.hide-small { display: inline; }
@media (max-width: 991px) { .hide-small { display: none; } }
@media (min-width: 992px) and (max-width: 1199.98px) {
    .hl-navbar .nav-item-about,
    .hl-navbar .nav-item-locations { display: none; }
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    background: var(--hl-white);
    color: var(--hl-ink);
    overflow: hidden;
    border-bottom: 1px solid var(--hl-border);
}
.hero .hero-inner {
    position: relative;
    z-index: 2;
    padding: 5.5rem 0 6rem;
}
.hero .hero-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
.hero .hero-bg-overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(90deg, rgba(255,255,255,.94) 0%, rgba(255,255,255,.82) 45%, rgba(255,255,255,.55) 100%);
}
.hero h1 {
    color: var(--hl-gray-900);
    font-size: clamp(2.1rem, 4vw, 3.35rem);
    max-width: 15ch;
}
.hero p.lead { color: var(--hl-grey); font-size: 1.15rem; max-width: 46ch; }
.hero .hero-actions { margin-top: 1.75rem; display: flex; gap: .85rem; flex-wrap: wrap; }
.hero .hero-stats {
    margin-top: 3rem;
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
}
.hero .hero-stats .stat-num {
    font-family: var(--hl-font-display), sans-serif;
    font-size: 2rem;
    color: var(--hl-amber-600);
    font-weight: 700;
    line-height: 1;
}
.hero .hero-stats .stat-label { font-size: .82rem; color: var(--hl-grey); text-transform: uppercase; letter-spacing: .08em; margin-top: .25rem; }

/* hero-framing.svg is inlined via readfile() in home/index.php, so it's
   part of the page DOM and can be themed with plain CSS instead of
   hardcoded hex -- it follows the active --hl-gray-* palette and updates
   automatically if that palette ever changes. */
.hero-framing-sky-start { stop-color: var(--hl-gray-700); }
.hero-framing-sky-end { stop-color: var(--hl-gray-950); }

/* Secondary page hero (shorter, used on interior pages) */
.page-hero {
    background: linear-gradient(160deg, var(--hl-gray-600), var(--hl-gray-950));
    color: var(--hl-cream);
    padding: 1.6rem 0;
    position: relative;
    overflow: hidden;
}
.page-hero h1 { color: var(--hl-white); font-size: clamp(1.75rem, 3vw, 2.5rem); }
.page-hero p { color: inherit; }
.page-hero .breadcrumb-hl { font-size: .85rem; color: var(--hl-cream-dark); }
.page-hero .breadcrumb-hl a { color: var(--hl-amber-400); }

/* ---------- Lead intro callout (e.g. Special Orders) ---------- */
.section-lead-intro { background: var(--hl-cream); padding: 2rem 0; border-bottom: 1px solid var(--hl-border); }
.lead-intro-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.1rem;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}
.lead-intro-icon {
    flex: 0 0 auto;
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--hl-gray-950);
    color: var(--hl-amber-400);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
}
.lead-intro-text {
    font-family: var(--hl-font-display), sans-serif;
    font-style: italic;
    font-size: 1.3rem;
    color: var(--hl-gray-950);
    margin: 0;
    line-height: 1.4;
}
@media (max-width: 767px) {
    .lead-intro-panel { flex-direction: column; gap: .6rem; }
}

/* ---------- Offer / icon list ---------- */
.icon-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (min-width: 768px) { .icon-list { grid-template-columns: repeat(3, 1fr); } }
.icon-list__item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .6rem;
    background: var(--hl-white);
    border: 1px solid var(--hl-border);
    border-radius: var(--hl-radius-lg);
    padding: 1.25rem;
    height: 100%;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.icon-list__item:hover { transform: translateY(-3px); box-shadow: var(--hl-shadow-sm); border-color: var(--hl-amber-500); }
.icon-list__icon {
    width: 52px; height: 52px;
    display: flex; align-items: center; justify-content: center;
    background: var(--hl-cream);
    border-radius: 50%;
}
.icon-list__icon img { width: 30px; height: 30px; object-fit: contain; }
.icon-list__item h3 { font-family: var(--hl-font-body), sans-serif; font-weight: 700; font-size: 1rem; margin: 0; color: var(--hl-ink); }

/* ---------- Cards ---------- */
.hl-card {
    background: var(--hl-white);
    border: 1px solid var(--hl-border);
    border-radius: var(--hl-radius-lg);
    padding: 1.75rem;
}
.hl-card:only-child { height: 100%; }
.hl-card-flush { padding: 0; overflow: hidden; }
.hl-card .card-icon-circle {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--hl-gray-950);
    color: var(--hl-amber-400);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 1rem;
}

.product-category-card {
    position: relative;
    border-radius: var(--hl-radius-lg);
    overflow: hidden;
    min-height: 220px;
    color: var(--hl-white);
    background: linear-gradient(180deg, rgba(13,31,22,.15), rgba(13,31,22,.92)), var(--hl-gray-700);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}
.product-category-card h3 { color: var(--hl-white); margin: 0 0 .25rem; font-size: 1.2rem; }
.product-category-card span.arrow { color: var(--hl-amber-400); font-weight: 700; }
.product-category-card:hover { color: var(--hl-white); }
.product-category-card:hover span.arrow { text-decoration: underline; }

/* ---------- Icon circle (contact page etc.) ---------- */
.icon-circle {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--hl-gray-950);
    color: var(--hl-amber-400);
    display: flex; align-items: center; justify-content: center;
}

/* ---------- Forms ---------- */
.hl-form label { font-weight: 600; font-size: .88rem; color: var(--hl-gray-950); margin-bottom: .3rem; display: block; }
.hl-form .form-control, .hl-form select.form-control, .hl-form textarea, .hl-form input:not(.form-check-input) {
    border: 1px solid var(--hl-border);
    border-radius: var(--hl-radius);
    padding: .65rem .85rem;
    width: 100%;
    background: var(--hl-white);
}
.hl-form .form-control:focus, .hl-form input:focus, .hl-form textarea:focus, .hl-form select:focus {
    outline: none;
    border-color: var(--hl-amber-500);
    box-shadow: 0 0 0 3px rgba(200,121,31,.15);
}
.form-card {
    background: var(--hl-white);
    border: 1px solid var(--hl-border);
    border-radius: var(--hl-radius-lg);
    padding: 2rem;
    box-shadow: var(--hl-shadow-sm);
}
.hl-alert { border-radius: var(--hl-radius); padding: .9rem 1.1rem; font-size: .92rem; margin-bottom: 1.25rem; }
.hl-alert-success { background: #e8f5ec; color: var(--hl-success); border: 1px solid #bfe4cb; }
.hl-alert-error { background: #fbeae6; color: var(--hl-danger); border: 1px solid #f0c3b8; }

/* ---------- Login / register forms ---------- */
.auth-card {
    max-width: 440px;
    margin: 0 auto;
    background: var(--hl-white);
    border: 1px solid var(--hl-border);
    border-radius: var(--hl-radius-lg);
    padding: 2.25rem;
    box-shadow: var(--hl-shadow-sm);
}
.auth-toggle { display: flex; gap: .5rem; margin-bottom: 1.5rem; background: var(--hl-cream); border-radius: 999px; padding: .3rem; }
.auth-toggle a { flex: 1; text-align: center; padding: .5rem; border-radius: 999px; font-weight: 700; font-size: .85rem; color: var(--hl-grey); }
.auth-toggle a.active { background: var(--hl-gray-950); color: var(--hl-white); }

/* ---------- Account dashboard ---------- */
.account-shell { display: grid; grid-template-columns: 240px 1fr; gap: 2rem; }
@media (max-width: 767px) { .account-shell { grid-template-columns: 1fr; } }
.account-nav { background: var(--hl-cream); border-radius: var(--hl-radius-lg); padding: 1.25rem; }
.account-nav .role-badge {
    display: inline-block;
    background: var(--hl-gray-950);
    color: var(--hl-amber-400);
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: .2rem .55rem;
    border-radius: 999px;
    margin-bottom: 1rem;
}
.account-nav a {
    display: block;
    padding: .55rem .6rem;
    border-radius: .4rem;
    color: var(--hl-ink);
    font-weight: 600;
    font-size: .9rem;
}
/* ---------- Admin content editor table ---------- */
.hl-admin-table-wrap { overflow-x: auto; }
.hl-admin-table { width: 100%; border-collapse: collapse; }
.hl-admin-table th {
    text-align: left;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--hl-cream-dark);
    border-bottom: 1px solid var(--hl-border);
    padding: .6rem .75rem;
}
.hl-admin-table td {
    padding: .7rem .75rem;
    border-bottom: 1px solid var(--hl-border);
    vertical-align: middle;
}
.hl-admin-table tbody tr:last-child td { border-bottom: none; }

.account-nav a:hover, .account-nav a.active { background: var(--hl-gray-950); color: var(--hl-white); }
.account-nav a .badge-count {
    float: right;
    background: var(--hl-amber-600);
    color: var(--hl-white);
    border-radius: 999px;
    font-size: .68rem;
    padding: .05rem .45rem;
}

/* ---------- Messaging ---------- */
.thread-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--hl-border); border-radius: var(--hl-radius-lg); overflow: hidden; }
.thread-list li a {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--hl-border);
    color: var(--hl-ink);
}
.thread-list li:last-child a { border-bottom: none; }
.thread-list li a:hover { background: var(--hl-cream); }
.thread-list li a.unread { background: #fff7ec; font-weight: 700; }
.thread-list .thread-meta { font-size: .78rem; color: var(--hl-grey); white-space: nowrap; }
.thread-list .thread-preview { color: var(--hl-grey); font-weight: 400; font-size: .88rem; display: block; }
.thread-list .thread-people { color: var(--hl-grey); font-weight: 400; font-size: .78rem; display: block; margin-top: .15rem; }
.thread-list .thread-people strong { color: var(--hl-ink); font-weight: 600; }

.message-thread { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.5rem; }
.message-bubble {
    max-width: 70%;
    padding: .85rem 1.1rem;
    border-radius: var(--hl-radius-lg);
    background: var(--hl-cream);
}
.message-bubble .meta { font-size: .72rem; color: var(--hl-grey); margin-bottom: .25rem; }
.message-bubble.mine { align-self: flex-end; background: var(--hl-gray-950); color: var(--hl-white); }
.message-bubble.mine .meta { color: var(--hl-cream-dark); }

/* ---------- Footer ---------- */
#footer { background: var(--hl-gray-950); color: var(--hl-cream-dark); }
.footer-outer-content { padding: 3.5rem 0 2.5rem; }
.footer-title .title-one { font-family: var(--hl-font-display), sans-serif; font-size: 1.9rem; color: var(--hl-white); font-weight: 700; letter-spacing: .04em; }
.footer-title .title-two { font-family: var(--hl-font-body), sans-serif; font-size: .78rem; letter-spacing: .28em; color: var(--hl-amber-400); font-weight: 700; margin-bottom: .5rem; }
.footer-title .footer-logo { max-width: 240px; width: 100%; height: auto; filter: brightness(0) invert(1); opacity: 1; margin-bottom: 1rem; }
@media (max-width: 991.98px) {
    .footer-title { text-align: center; }
    .footer-title .footer-logo { margin-left: auto; margin-right: auto; }
    .footer-title .footer-credo { margin-left: auto; margin-right: auto; }
}
.footer-credo { color: var(--hl-cream-dark); max-width: 42ch; margin-bottom: 2rem; opacity: .85; }
.footer-section h4 { color: var(--hl-white); font-family: var(--hl-font-body), sans-serif; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .85rem; }
.footer-section ul li { margin-bottom: .45rem; }
.footer-section a { color: var(--hl-cream-dark); font-size: .9rem; }
.footer-section a:hover { color: var(--hl-amber-400); }
.store-hours-table td { padding: .15rem .3rem .15rem 0; font-size: .88rem; color: var(--hl-cream-dark); }
@media (min-width: 992px) and (max-width: 1199.98px) {
    .footer-outer-content .row { --bs-gutter-x: .75rem; }
    .store-hours-table td { padding-right: .2rem; }
}
#sub-footer { background: var(--hl-gray-950); border-top: 1px solid rgba(255,255,255,.08); padding: 1rem 0; font-size: .78rem; }
#sub-footer a { color: var(--hl-cream-dark); margin-left: 1rem; }
#sub-footer a:hover { color: var(--hl-amber-400); }
#sub-footer .list-inline { text-align: center; margin-bottom: 0; }
#sub-footer .list-inline-item { color: var(--hl-cream-dark); }
@media (min-width: 768px) {
    #sub-footer .list-inline { text-align: left; }
}

.scroll-to-top {
    position: fixed; right: 1.25rem; bottom: 1.25rem;
    width: 42px; height: 42px;
    display: none; align-items: center; justify-content: center;
    background: var(--hl-gray-950); color: var(--hl-white) !important;
    border-radius: 50%;
    box-shadow: var(--hl-shadow-sm);
}

/* ---------- Locations ---------- */
.location-card { border: 1px solid var(--hl-border); border-radius: var(--hl-radius-lg); overflow: hidden; height: 100%; }
.location-card .location-card-header { background: var(--hl-gray-950); color: var(--hl-white); padding: 1.5rem; }
.location-card .location-card-header h3 { color: var(--hl-white); }
.location-card .location-card-body { padding: 1.5rem; }

/* ---------- Misc ---------- */
.content-block { text-align: left; }
.content-block h2, .content-block h3, .content-block h4 { margin-top: 1.25em; }

/* Do It Best catalog link buttons, rendered by the DoItBestLinks component
   in place of a [do-it-best-links] placeholder inside a content block. */
.doitbest-links { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1rem 0 2rem; }

.badge-new { background: var(--hl-amber-600); color: var(--hl-white); font-size: .68rem; padding: .2rem .5rem; border-radius: 999px; font-weight: 700; text-transform: uppercase; }
.divider-amber { width: 56px; height: 3px; background: var(--hl-amber-600); border-radius: 999px; margin: .75rem 0 1.25rem; }

/* Between 768px and 1021px, #logo/#search-block/#store-locator-block still
   carry Bootstrap's col-md-N and col-lg-N widths and stay side by side in one
   row -- there isn't enough room in that range for the search bar and the
   account toolbar (messages/orders/account-menu icons) together, and the
   account toolbar runs off the right edge of the screen. Force the same
   full-width stacked layout used below 768px through that range too,
   using ID selectors so they win over the Bootstrap column classes. */
@media (min-width: 768px) and (max-width: 1021.98px) {
    #banner #logo,
    #banner #search-block,
    #banner #store-locator-block {
        flex: 0 0 100%;
        max-width: 100%;
    }
    #logo { text-align: center; }
    #logo a { justify-content: center; }
    #search-block { margin-top: .75rem; justify-content: center; }
    #store-locator-block { text-align: center; margin-top: .75rem; }
}

@media (max-width: 767px) {
    #store-locator-block { text-align: center; margin-top: .75rem; }
    #search-block { margin-top: .75rem; justify-content: center; }
    #logo { text-align: center; }
    #logo a { justify-content: center; }
    .hero .hero-inner { padding: 3.25rem 1.25rem 3.5rem; text-align: left; }
    .footer-title .footer-logo { max-width: 100%; }
    .footer-title, .footer-section { text-align: center; margin-bottom: 2rem; }
    .footer-title:last-child, .footer-section:last-child { margin-bottom: 0; }
    .store-hours-table { margin-left: auto; margin-right: auto; }
    .scroll-to-top { bottom: 3.25rem; }
}

/* ---------- Admin: status badges & rich text editor ---------- */
.hl-status-badge { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 700; text-transform: uppercase; }
.hl-status-published { background: var(--hl-gray-950); color: var(--hl-white); }
.hl-status-draft { background: var(--hl-border); color: var(--hl-ink); }
.hl-rich-text-editor .ql-editor { min-height: 280px; }

/* Raw-HTML view: the plain textarea shown by the editor's "View HTML" /
   "View Formatted" toggle button, in place of the Quill editor. */
textarea.hl-html-source {
    width: 100%;
    min-height: 280px;
    padding: 1rem;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: .85rem;
    line-height: 1.5;
    white-space: pre;
    color: var(--hl-ink);
    background: var(--hl-cream);
    border: 1px solid var(--hl-border);
    border-radius: var(--hl-radius);
}

/* Match the live site's typography inside the editor. Content blocks render
   on the public site wrapped in .content-block, styled by the global h1-h6/p
   rules and Bootstrap's heading sizes -- but Quill's own snow theme resets
   all of that (Helvetica 13px, margin:0), so the editor looked nothing like
   the finished page. These rules copy the same font-family, color, size and
   spacing into the editor so what you see while editing is a close match to
   what renders live. (List-item indentation/bullet spacing is left to
   Quill's own CSS -- it's tightly coupled to its counter/bullet mechanics --
   and the editor's column width can differ slightly from the live page's,
   so it won't be a pixel-perfect match at every screen size.) */
.hl-rich-text-editor .ql-editor {
    font-family: var(--hl-font-body), sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--hl-ink);
    padding: 1.5rem;
}
.hl-rich-text-editor .ql-editor p { margin: 0 0 1rem; line-height: 1.7; color: var(--hl-ink); }
.hl-rich-text-editor .ql-editor h1,
.hl-rich-text-editor .ql-editor h2,
.hl-rich-text-editor .ql-editor h3,
.hl-rich-text-editor .ql-editor h4,
.hl-rich-text-editor .ql-editor h5,
.hl-rich-text-editor .ql-editor h6 {
    font-family: var(--hl-font-display), sans-serif;
    font-weight: 600;
    line-height: 1.15;
    color: var(--hl-gray-950);
    margin: 0 0 .3rem;
}
.hl-rich-text-editor .ql-editor h2,
.hl-rich-text-editor .ql-editor h3,
.hl-rich-text-editor .ql-editor h4 { margin-top: 1.25em; }
.hl-rich-text-editor .ql-editor h1 { font-size: 2.5rem; }
.hl-rich-text-editor .ql-editor h2 { font-size: 2rem; }
.hl-rich-text-editor .ql-editor h3 { font-size: 1.75rem; }
.hl-rich-text-editor .ql-editor h4 { font-size: 1.5rem; }
.hl-rich-text-editor .ql-editor h5 { font-size: 1.25rem; }
.hl-rich-text-editor .ql-editor h6 { font-size: 1rem; }
.hl-rich-text-editor .ql-editor ol,
.hl-rich-text-editor .ql-editor ul { margin: 0 0 1rem; }

/* Keep the Quill toolbar in view while scrolling through long content.
   Quill inserts .ql-toolbar as the element immediately BEFORE the editor
   container, not inside it, so it can't be targeted via .hl-rich-text-editor
   as a descendant -- it's scoped globally since Quill only appears on the
   admin content/DIY editors. No admin page has a sticky top nav to clear,
   so top: 0 pins it flush to the viewport edge. */
.ql-toolbar.ql-snow {
    position: sticky;
    top: 0;
    z-index: 15;
    background: var(--hl-white);
    box-shadow: var(--hl-shadow-sm);
}

.attribution {
    padding: .750rem;
    font-size: .85rem;
    text-align: center;
    background: var(--hl-gray-950);
    color: var(--hl-gray-600);
}

/* ---------- Brand Slider (homepage tool-brand logo strip) ---------- */
.brand-slider-section { padding-top: 0; }
.brand-slider {
    overflow: hidden;
    border-top: 1px solid var(--hl-border);
    border-bottom: 1px solid var(--hl-border);
    background: var(--hl-white);
    padding: 1.5rem 0;
}
.brand-slider-track {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    width: max-content;
    will-change: transform;
    /* JS (see main.js) sets the transform + transition for the stepped,
       right-to-left auto-advance. This is just the resting state. */
    transition: transform .9s ease;
}
.brand-slider-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 90px;
    padding: 0 .5rem;
}
.brand-slider-item a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.brand-slider-item img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(1);
    opacity: .65;
    transition: filter .2s ease, opacity .2s ease;
}
.brand-slider-item a:hover img,
.brand-slider-item a:focus img {
    filter: grayscale(0);
    opacity: 1;
}
@media (max-width: 575.98px) {
    .brand-slider-item { width: 130px; height: 70px; }
}

/* ---------- Saw Cut Divider (homepage, between What We Offer and Brands We Carry) ---------- */
.saw-cut-divider {
    position: relative;
    height: 3rem;
    margin-bottom: 2rem;
    overflow: hidden;
}
.saw-cut-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--hl-border);
    transform: translateY(-50%);
}
.saw-blade-travel {
    position: absolute;
    top: 50%;
    left: -60px;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    animation: saw-travel 7s linear infinite;
}
.saw-blade-spin {
    width: 100%;
    height: 100%;
    animation: saw-spin .4s linear infinite;
    filter: drop-shadow(0 2px 4px rgba(14, 14, 15, .35));
}
.saw-blade-svg { width: 100%; height: 100%; display: block; }
.saw-blade-body, .saw-blade-tooth { fill: var(--hl-gray-800); }
.saw-blade-rim { fill: none; stroke: var(--hl-gray-950); stroke-width: 1.5; }
.saw-blade-vent { fill: var(--hl-white); }
.saw-spark {
    position: absolute;
    top: 50%;
    left: 38px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--hl-amber-500);
    opacity: 0;
}
.saw-spark-1 { animation: saw-spark-fly 7s linear infinite; animation-delay: 0s; }
.saw-spark-2 { animation: saw-spark-fly 7s linear infinite; animation-delay: .1s; }
.saw-spark-3 { animation: saw-spark-fly 7s linear infinite; animation-delay: .18s; }

@keyframes saw-travel {
    0% { left: -60px; }
    100% { left: 100%; }
}
@keyframes saw-spin {
    to { transform: rotate(-360deg); }
}
@keyframes saw-spark-fly {
    0%, 48% { opacity: 0; transform: translate(0, 0) scale(1); }
    50% { opacity: 1; transform: translate(4px, -4px) scale(1); }
    62% { opacity: 0; transform: translate(10px, -20px) scale(.4); }
    100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .saw-blade-travel, .saw-blade-spin, .saw-spark { animation: none; }
    .saw-blade-travel { left: 50%; margin-left: -22px; }
}
