/*
Theme Name: TCR Astra Child
Theme URI: http://www.TexTheTech.com
Description: Custom child theme for Astra
Author: TCR Business Services, Tex Bruce
Author URI: http://www.TexTheTech.com
Template: astra
Version: 1.1.0
License: GNU General Public License v2 or later
*/

/* ==========================================================================
   CSS CUSTOM PROPERTIES
   Centralized color definitions for easier maintenance
   ========================================================================== */
:root {
    --tcr-orange: #E47200;
    --tcr-orange-light: #F7941D;
    --tcr-green: #00e400;
    --tcr-black: #000000;
    --tcr-white: #ffffff;
}

/* ==========================================================================
   HEADER NAVIGATION
   Forces white menu text on dark/branded backgrounds
   Note: !important needed to override Astra's inline styles
   ========================================================================== */

/* Primary menu links - all states */
.main-header-menu a,
.main-header-menu .menu-link,
.ast-primary-header-bar .main-header-menu a,
.ast-builder-menu-1 .menu-link,
.ast-builder-menu-1 a,
.site-header .main-navigation a,
.main-navigation .menu-item a {
    color: var(--tcr-white) !important;
}

/* Hover state - orange highlight */
.main-header-menu .menu-item:hover > a,
.main-header-menu .menu-item:hover .menu-link {
    color: var(--tcr-orange) !important;
}

/* Builder menu hover - stays white */
.ast-builder-menu-1 .menu-item:hover .menu-link {
    color: var(--tcr-white) !important;
}

/* Active/current page */
.main-header-menu .current-menu-item > a,
.ast-builder-menu-1 .current-menu-item .menu-link {
    color: var(--tcr-white) !important;
}

/* ==========================================================================
   ORANGE SECTIONS (Spectra blocks)
   Black text with white links for orange backgrounds
   ========================================================================== */
.orange-section,
.orange-section p,
.orange-section span,
.orange-section li,
.orange-section strong,
.orange-section em,
.orange-section h1,
.orange-section h2,
.orange-section h3,
.orange-section h4,
.orange-section h5,
.orange-section h6 {
    color: var(--tcr-black);
}

.orange-section a,
.orange-section a:visited,
.orange-section a:hover,
.orange-section a:focus,
.orange-section a:active {
    color: var(--tcr-white);
    text-decoration: underline;
}

/* ==========================================================================
   WOOCOMMERCE STYLING
   ========================================================================== */

/* Shop/archive titles */
.woocommerce .woocommerce-products-header__title,
.woocommerce-page .woocommerce-products-header__title {
    color: var(--tcr-black);
}

/* Breadcrumbs */
.woocommerce .woocommerce-breadcrumb,
.woocommerce .woocommerce-breadcrumb a,
.woocommerce-page .woocommerce-breadcrumb,
.woocommerce-page .woocommerce-breadcrumb a {
    color: var(--tcr-white);
}

.woocommerce .woocommerce-breadcrumb a:hover,
.woocommerce-page .woocommerce-breadcrumb a:hover {
    color: var(--tcr-green);
    text-decoration: underline;
}

/* Cart table header */
.woocommerce-cart table.shop_table thead th {
    background-color: var(--tcr-black);
    color: var(--tcr-white);
}

/* Cart totals header */
.woocommerce-cart .cart_totals > h2 {
    background-color: var(--tcr-black) !important;
    color: var(--tcr-white) !important;
    padding: 16px 20px;
    margin: 0;
}

/* Order received section headers */
.woocommerce-order-received h2.woocommerce-order-details__title,
.woocommerce-order-received h2.woocommerce-column__title {
    background-color: var(--tcr-black) !important;
    color: var(--tcr-white) !important;
    padding: 16px 20px;
    margin: 0;
}

/* Checkout page styling */
.woocommerce-checkout header.entry-header .entry-title {
    color: var(--tcr-black) !important;
}

.woocommerce-checkout h3,
.woocommerce-checkout #order_review_heading {
    background-color: var(--tcr-black);
    color: var(--tcr-white);
    padding: 14px 18px;
    margin-top: 0;
}

/* ==========================================================================
   GOOGLE MAP OVERLAY
   Click-through to open in Google Maps
   ========================================================================== */
.map-wrapper {
    position: relative;
    width: 100%;
    height: 380px;
    overflow: hidden;
}

.map-wrapper iframe {
    width: 100%;
    height: 100%;
    display: block;
}

.map-click-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    background: transparent;
    cursor: pointer;
}

.map-click-overlay:focus {
    outline: 2px solid var(--tcr-black);
    outline-offset: -2px;
}

/* ==========================================================================
   SEARCH & BUTTON BAR
   Astra-compatible height normalization
   ========================================================================== */
.wp-block-search__inside-wrapper {
    display: flex;
    align-items: center;
    min-height: 48px;
}

.wp-block-button__link {
    min-height: 48px;
}

.wp-block-search__button,
.wp-block-button__link {
    height: 100%;
    display: inline-flex;
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
}

@media (max-width: 921px) {
    .wp-block-search__inside-wrapper,
    .wp-block-button__link {
        min-height: 42px;
        height: auto;
    }
}

/* ==========================================================================
   STICKY BAR LOGO
   Show only when Spectra marks container as stuck
   ========================================================================== */
.sticky-bar .sticky-logo {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.uagb-position__sticky--stuck .sticky-logo {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto;
}
