/*
Theme Name: Flatsome Child
Description: This is a child theme for Flatsome Theme
Author: UX Themes
Template: flatsome
Version: 3.0.6
*/

/*************** ADD CUSTOM CSS HERE.   ***************/


@media only screen and (max-width: 48em) {
/*************** ADD MOBILE ONLY CSS HERE  ***************/


}

/* HHORSE PDP: existing WooCommerce Brand displayed above the product title. */
.single-product .hhorse-pdp-brand {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0 0 0.45rem;
    font-size: 0.82rem;
    line-height: 1.35;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.single-product .hhorse-pdp-brand__label {
    color: #6f6f6f;
    font-weight: 600;
}

.single-product .hhorse-pdp-brand__links {
    min-width: 0;
    overflow-wrap: anywhere;
}

.single-product .hhorse-pdp-brand__links a {
    color: #1f6fa8;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    text-decoration: none;
    border-bottom: 1px solid rgba(31, 111, 168, 0.35);
}

.single-product .hhorse-pdp-brand__links a:hover,
.single-product .hhorse-pdp-brand__links a:focus-visible {
    color: #15527d;
    border-bottom-color: currentColor;
}

/* HHORSE Phase 5A scoped design tokens. */
.header-wrapper,
.single-product,
.post-type-archive-product,
.tax-product_cat,
.tax-product_brand {
    --hhorse-primary: #102a3a;
    --hhorse-accent: #1f6688;
    --hhorse-text: #1d2a32;
    --hhorse-muted: #64717a;
    --hhorse-border: #d7dde0;
    --hhorse-bg: #f3f4f2;
    --hhorse-cta: #1f6688;
    --hhorse-cta-hover: #154c68;
}

/* Navigation — activated only when Header Bottom is the assigned row. */
.header-wrapper .header-bottom {
    background-color: var(--hhorse-primary);
}

.header-wrapper .header-bottom .nav > li > a {
    color: #fff;
    font-weight: 700;
    letter-spacing: .06em;
    min-height: 48px;
    padding-left: 1rem;
    padding-right: 1rem;
    position: relative;
    text-decoration: none;
}

.header-wrapper .header-bottom .nav > li > a::after {
    background-color: transparent;
    bottom: 8px;
    content: "";
    height: 2px;
    left: 1rem;
    position: absolute;
    right: 1rem;
}

.header-wrapper .header-bottom .nav > li.has-dropdown > a::after {
    right: calc(1rem + 1.25em);
}

.header-wrapper .header-bottom .nav > li.active > a,
.header-wrapper .header-bottom .nav > li.current-menu-item > a,
.header-wrapper .header-bottom .nav > li.current-menu-parent > a,
.header-wrapper .header-bottom .nav > li.current-menu-ancestor > a {
    background-color: transparent;
    color: #fff;
}

.header-wrapper .header-bottom .nav > li > a:hover,
.header-wrapper .header-bottom .nav > li > a:focus-visible {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    text-decoration: none;
}

.header-wrapper .header-bottom .nav > li.active > a::after,
.header-wrapper .header-bottom .nav > li.current-menu-item > a::after,
.header-wrapper .header-bottom .nav > li.current-menu-parent > a::after,
.header-wrapper .header-bottom .nav > li.current-menu-ancestor > a::after,
.header-wrapper .header-bottom .nav > li > a:hover::after,
.header-wrapper .header-bottom .nav > li > a:focus-visible::after {
    background-color: #fff;
}


@media screen and (min-width: 850px) {
    .header-wrapper .header-bottom .flex-row {
        justify-content: flex-start;
    }

    .header-wrapper .header-bottom .header-bottom-nav {
        gap: 0.25rem;
        justify-content: flex-start;
        margin-left: 0 !important;
        margin-right: auto !important;
    }

    .header-wrapper .header-bottom .header-bottom-nav > li {
        margin-left: 0;
        margin-right: 0;
    }
}


/* Header Search Form — native Flatsome Search Form only. */
.header-wrapper .header-search-form-wrapper,
.header-wrapper form.searchform {
    max-width: 46rem;
    min-width: min(25rem, 100%);
    width: 100%;
}

.header-wrapper form.searchform input[type="search"] {
    border-color: #aebac0;
    border-radius: 6px 0 0 6px;
    min-height: 46px;
}

.header-wrapper form.searchform button[type="submit"] {
    background-color: var(--hhorse-accent);
    border-radius: 0 6px 6px 0;
    color: #fff;
    min-height: 46px;
    min-width: 46px;
}

.header-wrapper form.searchform button[type="submit"]:hover,
.header-wrapper form.searchform button[type="submit"]:focus-visible {
    background-color: var(--hhorse-cta-hover);
}

/* PDP CTA — variable-product catalog verified. */
.single-product .product-info .variations {
    margin-bottom: 24px;
}

.single-product .product-info .variations tr + tr th,
.single-product .product-info .variations tr + tr td {
    padding-top: 16px;
}

.single-product .single_variation_wrap .woocommerce-variation-add-to-cart {
    align-items: stretch;
    display: flex;
    gap: 12px;
}

.single-product .single_add_to_cart_button.button.alt {
    background-color: var(--hhorse-cta);
    border-color: var(--hhorse-cta-hover);
    border-radius: 6px;
    color: #fff;
    flex: 1 1 auto;
    font-weight: 700;
    min-height: 50px;
    min-width: 240px;
    padding-left: 24px;
    padding-right: 24px;
}

.single-product .single_add_to_cart_button.button.alt:hover,
.single-product .single_add_to_cart_button.button.alt:focus-visible {
    background-color: var(--hhorse-cta-hover);
    color: #fff;
}

.single-product .single_add_to_cart_button.button.alt.disabled,
.single-product .single_add_to_cart_button.button.alt:disabled {
    background-color: #b8c0c4;
    border-color: #9da7ac;
    color: #445058;
    cursor: not-allowed;
    opacity: 1;
}

/* Shop / Category — confirmed Flatsome product-card selectors. */
.post-type-archive-product .product-small .box-image,
.tax-product_cat .product-small .box-image,
.tax-product_brand .product-small .box-image {
    aspect-ratio: 4 / 5;
    background-color: var(--hhorse-bg);
    overflow: hidden;
}

.post-type-archive-product .product-small .box-image img,
.tax-product_cat .product-small .box-image img,
.tax-product_brand .product-small .box-image img {
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.post-type-archive-product .product-small .box-text,
.tax-product_cat .product-small .box-text,
.tax-product_brand .product-small .box-text {
    padding-top: 12px;
}

/* Tabs — semantic Description content only. */
.single-product .woocommerce-Tabs-panel--description h2,
.single-product .woocommerce-Tabs-panel--description h3 {
    margin: 24px 0 8px;
}

.single-product .woocommerce-Tabs-panel--description ul {
    margin: 12px 0 16px 24px;
}

.single-product .woocommerce-Tabs-panel--description li + li {
    margin-top: 4px;
}

.single-product .woocommerce-Tabs-panel--description table {
    margin: 16px 0 24px;
}

/* Keyboard focus — scoped to native Header search and PDP CTA. */
.header-wrapper form.searchform input[type="search"]:focus-visible,
.header-wrapper form.searchform button:focus-visible,
.single-product .single_add_to_cart_button:focus-visible {
    outline: 3px solid #f2b84b;
    outline-offset: 2px;
}

@media only screen and (max-width: 48em) {
    .header-wrapper .header-search-form-wrapper,
    .header-wrapper form.searchform {
        max-width: none;
        min-width: 0;
    }

    .single-product .single_variation_wrap .woocommerce-variation-add-to-cart {
        flex-wrap: wrap;
    }

    .single-product .single_add_to_cart_button.button.alt {
        flex-basis: 100%;
        min-width: 0;
        width: 100%;
    }

    .single-product .hhorse-pdp-brand {
        margin-bottom: 0.35rem;
    }
}

/* HHORSE Navigation accessibility — native linked parents + separate mobile toggles. */
.header-wrapper .header-bottom .nav > li > a:focus,
.header-wrapper .nav-dropdown a:focus,
.mobile-sidebar .nav-sidebar a:focus,
.mobile-sidebar .nav-sidebar button.toggle:focus {
    box-shadow: inset 0 0 0 3px #f2b84b !important;
    outline: 3px solid #f2b84b !important;
    outline-offset: -3px !important;
}

@media screen and (max-width: 849px) {
    .mobile-sidebar .nav-sidebar li > a {
        align-items: center;
        display: flex;
        line-height: 1.35;
        min-height: 44px;
    }

    .mobile-sidebar .nav-sidebar li.has-child > a {
        padding-right: 52px;
    }

    .mobile-sidebar .nav-sidebar li > button.toggle {
        align-items: center;
        display: flex;
        justify-content: center;
        min-height: 44px;
        min-width: 44px;
    }
}

/* HHORSE Swatches accessibility — all native variable-product swatches. */
.single-product form.variations_form .ux-swatch {
    min-height: 44px;
    min-width: 44px;
    padding: 8px 12px;
}

.single-product form.variations_form .ux-swatch:focus,
.single-product form.variations_form .ux-swatch:focus-visible {
    outline: 3px solid #f2b84b !important;
    outline-offset: 3px !important;
}

/* HHORSE desktop navigation keyboard support: expose native dropdown while keyboard focus is inside. */
@media (min-width: 850px) {
    #wide-nav .nav > li.menu-item-has-children.hh-keyboard-open > .nav-dropdown {
        left: -15px;
        opacity: 1;
        visibility: visible;
    }
}
