/*
Theme Name: Barry Hawkins AuctionForge
Theme URI: https://barry-hawkins.smoothbyteit.dev
Description: Custom theme replicating the Barry L Hawkins branding for the AuctionForge auction catalogue subdomain.
Author: SmoothByteIT
Author URI: https://smoothbyteit.dev
Version: 1.0.0
License: Proprietary
Text Domain: bh-auctionforge
*/

/* ============================================
   BARRY L HAWKINS — AuctionForge Subdomain
   Branding & Global Styles
   ============================================ */

/* ----- CSS CUSTOM PROPERTIES ----- */
:root {
    --bh-navy: #002C53;
    --bh-accent: #ED1C24;
    --bh-white: #FFFFFF;
    --bh-dark: #000000;
    --bh-grey-heading: #373737;
    --bh-grey-body: #595959;
    --bh-grey-light: #E8E6E6;
    --bh-teal: #009490;
    --bh-phone-red: #ED1C24;

    --bh-font-heavy: 'Nunito Sans', 'Avenir', sans-serif;
    --bh-font-light: 'Nunito Sans', 'Avenir', sans-serif;
    --bh-font-serif: 'Bodoni Moda', 'Georgia', serif;
    --bh-font-legal: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
}

/* ----- GLOBAL RESETS ----- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--bh-font-light);
    font-weight: 300;
    font-size: 14px;
    line-height: 1.8em;
    color: var(--bh-navy);
    background-color: var(--bh-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--bh-font-heavy);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1.1em;
}

/* ═══════════════════════════════════
   HEADER
   ═══════════════════════════════════ */

.bh-header {
    background-color: var(--bh-navy);
    border-bottom: none;
    position: sticky;
    top: 0;
    z-index: 9999;
    transition: box-shadow 0.3s ease;
}

.bh-header.scrolled {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.bh-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    height: 100px;
}

/* Logo */
.bh-logo a {
    display: flex;
    align-items: center;
}

.bh-logo img {
    width: 212px;
    height: 48px;
    object-fit: contain;
}

/* Right Side Group */
.bh-header-right {
    display: flex;
    align-items: center;
    gap: 0;
}

/* ----- NAVIGATION ----- */
.bh-nav {
    margin-left: auto; /* Pushes everything to the right */
    display: flex;
    align-items: center;
}

.bh-nav ul.bh-menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 40px; /* Wide spacing from target */
}

.bh-nav ul.bh-menu > li {
    position: relative;
    display: flex;
    align-items: center;
}

.bh-nav ul.bh-menu > li > a,
.bh-nav ul.bh-menu > li > span.bh-parent-label {
    font-family: var(--bh-font-heavy);
    font-weight: 800;
    font-size: 11.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--bh-white);
    padding: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: color 0.3s ease;
    white-space: nowrap;
    line-height: 1;
}

/* Nav Item Dividers (Removed per target design) */
.bh-nav ul.bh-menu > li:not(:last-child)::after {
    content: none;
}

.bh-nav ul.bh-menu > li > a:hover,
.bh-nav ul.bh-menu > li > span.bh-parent-label:hover,
.bh-nav ul.bh-menu > li.current-menu-item > a {
    color: var(--bh-accent);
}

/* Dropdown caret */
.bh-nav .bh-caret {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    margin-left: 2px;
    margin-top: 1px; /* Subtle nudge for visual baseline */
    transition: transform 0.3s ease;
}

.bh-nav ul.bh-menu > li:hover .bh-caret {
    transform: rotate(180deg);
}

/* Dropdown */
.bh-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    background: var(--bh-white);
    border: 1px solid var(--bh-grey-light);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    min-width: 240px;
    z-index: 10000;
    padding: 6px 0;
    animation: bh-dropdown-fade 0.2s ease;
}

@keyframes bh-dropdown-fade {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.bh-nav ul.bh-menu > li:hover > .bh-dropdown {
    display: block;
}

.bh-dropdown a {
    display: block;
    padding: 10px 24px;
    font-family: var(--bh-font-heavy);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--bh-dark);
    transition: all 0.2s ease;
}

.bh-dropdown a:hover {
    background-color: #f8f8f8;
    color: var(--bh-accent);
    padding-left: 28px;
}

/* Vertical separator before phone */
.bh-nav-separator {
    width: 1px;
    height: 20px;
    background-color: var(--bh-grey-light);
    margin: 0 8px;
}

/* Phone in header */
.bh-header-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 12px;
    padding-left: 12px;
    border-left: 1px solid var(--bh-grey-light);
}

.bh-header-phone .bh-phone-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.bh-header-phone .bh-phone-icon svg {
    width: 100%;
    height: 100%;
}

.bh-header-phone {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 24px;
    margin-left: 15px;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    align-self: stretch;
    margin-top: 0;
    margin-bottom: 0;
}

.bh-header-phone a {
    font-family: var(--bh-font-heavy);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.05em;
    color: var(--bh-white);
    white-space: nowrap;
}

.bh-header-phone a:hover {
    color: var(--bh-accent);
}

/* Header Accent Bar (Red Line) */
.bh-header-accent-bar {
    height: 10px; /* Thicker accent bar */
    background-color: var(--bh-accent);
    width: 100%;
    border-top: 4px solid var(--bh-white); /* 4px White gap per target */
}

/* ----- MOBILE HAMBURGER ----- */
.bh-hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 10px;
    background: none;
    border: none;
    z-index: 10001;
}

.bh-hamburger span {
    display: block;
    width: 26px;
    height: 2px;
    background-color: var(--bh-white);
    transition: all 0.35s ease;
    transform-origin: center;
}

.bh-hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.bh-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.bh-hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile overlay */
.bh-mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bh-mobile-overlay.active {
    display: block;
    opacity: 1;
}

/* ═══════════════ RESPONSIVE ═══════════════ */

@media (max-width: 991px) {
    .bh-hamburger {
        display: flex;
    }

    .bh-nav {
        display: none;
        position: fixed;
        top: 0;
        right: -100%;
        width: 320px;
        max-width: 85vw;
        height: 100vh;
        background: var(--bh-white);
        flex-direction: column;
        z-index: 10000;
        padding-top: 70px;
        overflow-y: auto;
        transition: right 0.35s ease;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    }

    .bh-nav.active {
        display: flex;
        right: 0;
    }

    .bh-nav ul.bh-menu {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .bh-nav ul.bh-menu > li > a,
    .bh-nav ul.bh-menu > li > span.bh-parent-label {
        padding: 16px 24px;
        border-bottom: 1px solid var(--bh-grey-light);
        width: 100%;
        font-size: 14px;
    }

    .bh-dropdown {
        position: static;
        box-shadow: none;
        border: none;
        border-bottom: 1px solid var(--bh-grey-light);
        background: #fafafa;
        animation: none;
        min-width: unset;
    }

    .bh-dropdown a {
        padding: 12px 24px 12px 44px;
        border-bottom: 1px solid #f0f0f0;
    }

    .bh-dropdown a:hover {
        padding-left: 48px;
    }

    .bh-header-phone {
        padding: 16px 24px;
        border-left: none;
        border-bottom: 1px solid var(--bh-grey-light);
        margin-left: 0;
        width: 100%;
    }

    .bh-nav-separator {
        display: none;
    }

    /* Show dropdown always on mobile (accordion-style toggle via JS) */
    .bh-nav ul.bh-menu > li.bh-dropdown-open > .bh-dropdown {
        display: block;
    }
}

@media (max-width: 767px) {
    .bh-logo img {
        width: 170px;
    }

    .bh-header-inner {
        padding: 10px 16px;
    }
}

/* ═══════════════════════════════════
   FOOTER
   ═══════════════════════════════════ */

.bh-footer {
    background-color: #F2F2F2;
    border-top: 1px solid #E0E0E0;
    padding: 60px 24px 60px;
    margin-top: 0;
}

.bh-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.bh-footer-col {}

.bh-footer-heading {
    font-family: var(--bh-font-heavy);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.05em;
    color: var(--bh-navy);
    text-transform: uppercase;
    margin-bottom: 24px;
    line-height: 1em;
}

/* Address */
.bh-footer-contact-details p {
    font-family: var(--bh-font-light);
    font-weight: 400;
    font-size: 14px;
    line-height: 1.6em;
    color: #777;
    margin: 0;
}

.bh-footer-contact-details a {
    color: #777;
    transition: color 0.3s ease;
}

.bh-footer-contact-details a:hover {
    color: var(--bh-accent);
}

.bh-footer-spacer {
    height: 1.6em;
}

.bh-footer-address a:hover {
    color: var(--bh-accent);
}

/* Contact icons */
.bh-footer-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.bh-footer-contact-item svg {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.bh-footer-contact-item .bh-contact-text {
    font-family: var(--bh-font-heavy);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.05em;
    color: var(--bh-white);
}

.bh-footer-contact-item .bh-contact-text a {
    color: var(--bh-white);
}

.bh-footer-contact-item .bh-contact-text a:hover {
    color: var(--bh-accent);
}

/* TPO Logos */
.bh-footer-accred {
    margin-top: 20px;
}

.bh-footer-accred img {
    max-width: 296px;
    height: auto;
}

/* Legal links */
.bh-footer-legal {
    margin-top: 20px;
}

.bh-footer-legal a,
.bh-footer-legal span {
    font-family: var(--bh-font-legal);
    font-size: 12px;
    line-height: 1.7em;
    display: block;
}

.bh-footer-legal a {
    color: var(--bh-white);
    text-decoration: underline;
}

.bh-footer-legal span {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
}

.bh-footer-legal a:hover {
    color: var(--bh-accent);
}

/* Social bar */
.bh-social-bar {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.bh-social-bar a {
    display: inline-flex;
    width: 32px;
    height: 32px;
    background-color: #000;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.bh-social-bar a:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.bh-social-bar a svg {
    width: 18px;
    height: 18px;
    fill: #FFF;
}

/* Newsletter */
.bh-footer-newsletter h3 {
    font-family: var(--bh-font-heavy);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.05em;
    color: var(--bh-white);
    text-transform: uppercase;
    margin-bottom: 18px;
    line-height: 1em;
}

.bh-footer-newsletter input[type="text"],
.bh-footer-newsletter input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--bh-grey-light);
    font-family: var(--bh-font-light);
    font-size: 14px;
    font-weight: 300;
    margin-bottom: 10px;
    outline: none;
    transition: border-color 0.3s ease;
    background: var(--bh-white);
    color: var(--bh-dark);
}

.bh-footer-newsletter input:focus {
    border-color: var(--bh-navy);
}

.bh-footer-newsletter button {
    font-family: var(--bh-font-heavy);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background-color: var(--bh-accent);
    color: var(--bh-white);
    border: 2px solid var(--bh-accent);
    padding: 12px 32px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 4px;
}

.bh-footer-newsletter button:hover {
    background-color: var(--bh-white);
    border-color: var(--bh-white);
    color: var(--bh-navy);
}

/* Footer bottom bar */
.bh-footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0;
    padding: 20px 0 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.bh-footer-bottom-heading {
    font-family: var(--bh-font-heavy);
    font-weight: 700;
    font-size: 20px;
    color: var(--bh-grey-body);
    margin-bottom: 10px;
    text-transform: none;
    letter-spacing: 0;
}

.bh-footer-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.bh-footer-bottom p,
.bh-footer-bottom a {
    font-family: var(--bh-font-light);
    font-weight: 300;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    margin: 0;
}

.bh-footer-bottom a:hover {
    color: var(--bh-accent);
}

/* Footer responsive */
@media (max-width: 767px) {
    .bh-footer-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .bh-footer {
        padding: 40px 16px 0;
    }

    .bh-footer-bottom-row {
        flex-direction: column;
        text-align: center;
    }
}

/* ═══════════════════════════════════
   CONTENT AREA
   ═══════════════════════════════════ */

.site-main {
    min-height: calc(100vh - 200px);
}

.entry-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 24px;
}

/* WordPress defaults reset */
.wp-block-group,
.wp-block-cover {
    padding: 0;
}

/* ═══════════════════════════════════
   AUCTIONFORGE INTEGRATION
   ═══════════════════════════════════ */

/* Ensure AuctionForge content wraps properly */
.auctionforge-wrap {
    min-height: calc(100vh - 200px);
}

/* Button styling matching the main site */
.bh-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--bh-font-heavy);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--bh-white);
    background-color: var(--bh-dark);
    border: 2px solid var(--bh-dark);
    padding: 12px 28px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bh-btn:hover {
    background-color: var(--bh-navy);
    border-color: var(--bh-navy);
    color: var(--bh-white);
}

.bh-btn-outline {
    background-color: transparent;
    color: var(--bh-dark);
}

.bh-btn-outline:hover {
    background-color: var(--bh-navy);
    color: var(--bh-white);
}

.bh-btn-accent {
    background-color: var(--bh-accent);
    border-color: var(--bh-accent);
}

.bh-btn-accent:hover {
    background-color: #b8154c;
    border-color: #b8154c;
}

/* ═══════════════════════════════════
   UTILITY / ANIMATIONS
   ═══════════════════════════════════ */

::selection {
    background-color: var(--bh-navy);
    color: var(--bh-white);
}

/* Smooth link transitions */
a, button, input, textarea {
    transition: all 0.3s ease;
}

/* Screen reader text */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ------------------------------------------------
 * 10. AUCTION GRID OPTIMIZATION
 * ------------------------------------------------ */
.bp-auctions.bp-d-flex {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    gap: 30px !important;
    margin: 20px 0 !important;
    padding: 0 !important;
}

.bp-auctions .bp-lot {
    flex: 1 1 calc(25% - 30px);
    min-width: 280px;
    max-width: 380px; /* Maintains card proportions */
    margin: 0 !important;
    box-sizing: border-box;
}

/* Adjustments for Tablet */
@media (max-width: 1200px) {
    .bp-auctions .bp-lot {
        flex: 1 1 calc(33.333% - 30px);
    }
}

/* Adjustments for Mobile */
@media (max-width: 768px) {
    .bp-auctions.bp-d-flex {
        justify-content: center !important;
    }
    .bp-auctions .bp-lot {
        flex: 1 1 100%;
        max-width: 100%;
    }
}
