/*
Theme Name: Kadence Child
Theme URI: https://baileybespoke.co.uk
Description: Child theme for Kadence, used for Bailey Bespoke. Custom CSS and template overrides live here so they survive parent theme updates.
Author: Bailey Bespoke
Version: 1.1.0
Template: kadence
Text Domain: kadence-child
*/

/* =========================================
   BRAND TOKENS
   Utility colours that have no Kadence palette slot.
   To reskin for another brand, change these three values
   and the palette slots in Appearance > Customise > Colours.
   Brand colours themselves come from Kadence:
     --global-palette1  black      (text, buttons)
     --global-palette2  #C5A059    (antique gold accent)
     --global-palette9  white      (backgrounds)
   ========================================= */
:root {
    --bb-border: #DDDDDD;      /* dividers, inactive gallery dashes, input borders */
    --bb-text-muted: #999999;  /* inactive tab labels */
    --bb-error: #D84E4E;       /* form validation only - not a brand colour */
}

/* =========================================
   BAILEY BESPOKE - MASTER STYLESHEET
   Colours reference tokens above or Kadence palette slots.
   Every var() carries a hex fallback, so nothing breaks
   if a variable is ever unavailable.
   ========================================= */

/* 1. GLOBAL HEADER & NAVIGATION */
.site-header.item-is-sticky .header-top-row { 
    display: none !important; 
}
body.single-product .header-top-row,
body.single-product .site-header-top-section,
body.single-product .site-top-header-wrap,
body.single-product .kadence-top-row { 
    display: none !important; 
}

/* 2. PRODUCT GRID & ICONS */
.woocommerce ul.products li.product .button { 
    display: none !important; 
}
.header-cart-count[data-count="0"], 
.header-cart-count.count-is-zero { 
    display: none !important; 
}

/* 3. SLIDE-OUT DRAWER */
@media screen and (max-width: 767px) {
    #mobile-drawer, #cart-drawer { 
        position: fixed !important; 
        width: 100vw !important; 
        height: 100% !important; 
        z-index: 999999 !important; 
    }
    #mobile-drawer > div, #cart-drawer > div, 
    .drawer-inner, .drawer-content, 
    .cart-content-inner { 
        width: 100% !important; 
        max-width: none !important; 
        height: 100% !important; 
        box-sizing: border-box !important; 
    }
}

@media screen and (min-width: 768px) and (max-width: 1024px) { 
    #mobile-drawer, #cart-drawer { 
        width: 450px !important; 
    } 
}

@media screen and (min-width: 1025px) { 
    #mobile-drawer, #cart-drawer { 
        width: 480px !important; 
        max-width: 100vw !important; 
    } 
}

.teleport-logo { 
    position: fixed !important; 
    top: 25px !important; 
    left: 25px !important; 
    z-index: 99999 !important; 
}
.teleport-logo img { 
    width: 60px !important; 
    height: auto !important; 
    display: block !important; 
}
#mobile-drawer .drawer-inner, 
.popup-drawer-layout-side { 
    padding-top: 60px !important; 
}

/* Remove Underlines from Mobile Menu Custom Links */
#mobile-drawer a,
#mobile-drawer .widget a,
#mobile-drawer .custom-html-widget a {
    text-decoration: none !important;
    box-shadow: none !important; 
}

/* 4. LUXURY CART STYLING */
.woocommerce-mini-cart__buttons .button:not(.checkout) { 
    display: none !important; 
}
.woocommerce-mini-cart__buttons .checkout {
    width: 100% !important; 
    padding: 12px 0 !important; 
    margin-top: 20px !important;
    font-family: 'Mulish', sans-serif !important; 
    font-size: 13px !important; 
    font-weight: 600 !important;
    text-transform: uppercase !important; 
    letter-spacing: 2px !important;
    background-color: var(--global-palette1, #000000) !important; 
    color: var(--global-palette9, #ffffff) !important; 
    border: 1px solid var(--global-palette1, #000000) !important;
    height: auto !important; 
    line-height: 1 !important; 
    display: block !important;
}
.woocommerce-mini-cart__buttons .checkout:hover { 
    background-color: var(--global-palette9, #ffffff) !important; 
    color: var(--global-palette2, #C5A059) !important; 
    border: 1px solid var(--global-palette2, #C5A059) !important; 
}
.woocommerce-mini-cart-item img { 
    width: 90px !important; 
    max-width: 90px !important; 
    border-radius: 0px !important; 
    margin-right: 20px !important; 
}
.woocommerce-mini-cart-item a { 
    font-family: 'Playfair Display', serif !important; 
    font-size: 16px !important; 
    font-weight: 500 !important; 
    text-decoration: none !important; 
}
#cart-drawer .drawer-header .drawer-title, 
#cart-drawer .drawer-header h2, 
.kadence-cart-title { 
    font-size: 0 !important; 
    color: transparent !important; 
}
#cart-drawer .drawer-header .drawer-title::after, 
#cart-drawer .drawer-header h2::after, 
.kadence-cart-title::after {
    content: "Shopping Bag"; 
    font-size: 22px !important; 
    font-family: 'Playfair Display', serif !important; 
    color: var(--global-palette1, #000000) !important;
    text-transform: uppercase; 
    letter-spacing: 1px; 
    display: block !important; 
    visibility: visible !important;
}

/* Minimalist Item Removal (Banish Default Red Circles) */
.woocommerce ul.cart_list li a.remove, 
.woocommerce ul.product_list_widget li a.remove, 
.woocommerce-mini-cart-item a.remove { 
    color: var(--global-palette1, #000000) !important; 
    background: transparent !important; 
    border: none !important; 
    font-weight: 300 !important; 
    font-size: 22px !important; 
    border-radius: 0 !important;
    line-height: 1 !important;
    display: inline-block !important;
}
.woocommerce ul.cart_list li a.remove:hover, 
.woocommerce ul.product_list_widget li a.remove:hover, 
.woocommerce-mini-cart-item a.remove:hover { 
    color: var(--global-palette2, #C5A059) !important; 
    background: transparent !important; 
}

/* 5. SINGLE PRODUCT & EXTRAS */
@media (min-width: 768px) {
    .product_title, 
    .product .summary .price, 
    .product .summary .woocommerce-product-details__short-description, 
    .product .cart, 
    .product_meta {
        text-align: left !important; 
        justify-content: flex-start !important; 
        width: 100% !important;
    }
}
.product .summary .price { 
    font-family: 'Mulish', sans-serif !important; 
    font-size: 22px !important; 
    color: var(--global-palette1, #000000) !important; 
}
.woocommerce-tabs ul.tabs li.reviews_tab, 
#tab-reviews { 
    display: none !important; 
}

.single-product-extras { 
    margin-top: 30px !important; 
    width: 100% !important; 
    display: block !important; 
}
.single-product-extras::before { 
    content: "" !important; 
    display: block !important; 
    width: 75% !important; 
    height: 1px !important; 
    background-color: var(--bb-border, #DDDDDD) !important; 
    margin: 0 auto 25px auto !important; 
}
.single-product-extras ul li { 
    position: relative !important; 
    padding-left: 30px !important; 
    margin-bottom: 10px !important; 
    list-style: none !important; 
}
.single-product-extras ul li::before { 
    content: "" !important; 
    position: absolute !important; 
    left: 0 !important; 
    top: 50% !important; 
    transform: translateY(-50%) !important; 
    width: 22px !important; 
    height: 22px !important; 
    background-size: contain !important; 
    background-repeat: no-repeat !important; 
    display: block !important; 
}
.single-product-extras ul li:nth-child(1)::before { 
    background-image: url('assets/icons/sketch-logo.svg'); 
}
.single-product-extras ul li:nth-child(2)::before { 
    background-image: url('assets/icons/recycle.svg'); 
}
.single-product-extras ul li:nth-child(3)::before { 
    background-image: url('assets/icons/call-bell-light.svg'); 
}

/* 6. CHECKOUT */
.woocommerce-checkout .content-container, 
body.woocommerce-checkout { 
    background-color: var(--global-palette9, #ffffff) !important; 
}
.woocommerce form .form-row input.input-text, 
.woocommerce form .form-row textarea { 
    border: none !important; 
    border-bottom: 1px solid var(--global-palette2, #C5A059) !important; 
    background: transparent !important; 
    padding: 10px 0px !important; 
}
.woocommerce form .form-row .required { 
    color: var(--global-palette2, #C5A059) !important; 
    visibility: visible !important; 
}

/* 7. HIDE QUANTITY & CART BUTTON STYLING */
.woocommerce .quantity, 
form.cart .quantity { 
    display: none !important; 
}
.woocommerce div.product form.cart .button { 
    width: 100% !important; 
    height: 40px !important; 
    padding: 0 !important; 
    background-color: var(--global-palette1, #000000) !important; 
    color: var(--global-palette9, #ffffff) !important; 
    font-family: 'Mulish', sans-serif !important; 
    font-size: 13px !important; 
    text-transform: uppercase !important; 
    letter-spacing: 2px !important; 
    border: 1px solid var(--global-palette1, #000000) !important; 
    margin-top: 25px !important; 
    
    display: flex !important; 
    align-items: center !important; 
    justify-content: center !important; 
    line-height: 1 !important;
}
.woocommerce div.product form.cart .button:hover { 
    background-color: var(--global-palette9, #ffffff) !important; 
    color: var(--global-palette2, #C5A059) !important; 
    border: 1px solid var(--global-palette2, #C5A059) !important; 
}

/* 8. LUXURY TABS (WITH MOBILE ACCORDION STRIP) */
body.single-product div.product .woocommerce-tabs { 
    padding-top: 40px !important; 
    margin-top: 0 !important; 
    clear: both !important; 
} 
.woocommerce div.product .woocommerce-tabs .panel, 
.woocommerce div.product .woocommerce-tabs ul.tabs { 
    border: none !important; 
    background: transparent !important; 
    margin: 0 !important; 
}
.woocommerce div.product .woocommerce-tabs ul.tabs li { 
    background: transparent !important; 
    border: none !important; 
    margin-right: 40px !important; 
}
.woocommerce div.product .woocommerce-tabs ul.tabs li a { 
    font-family: 'Playfair Display', serif !important; 
    font-size: 16px !important; 
    text-transform: uppercase !important; 
    color: var(--bb-text-muted, #999999) !important; 
}
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { 
    color: var(--global-palette1, #000000) !important; 
    border-bottom: 1px solid var(--global-palette2, #C5A059) !important; 
}
.woocommerce div.product .woocommerce-tabs .panel h2 { 
    display: none !important; 
}

@media (max-width: 767px) {
    .woocommerce div.product .woocommerce-tabs,
    .woocommerce div.product .woocommerce-tabs .panel,
    .woocommerce div.product .woocommerce-tabs ul.tabs,
    .kadence-woo-tabs .wc-tab,
    .kadence-woo-tabs .kadence-accordion-title,
    .woocommerce-tabs.accordion-wrapper .accordion-title {
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .woocommerce div.product .woocommerce-tabs ul.tabs li {
        margin-right: 20px !important; 
        display: inline-block !important; 
    }
}

/* 9. CURATED FOR YOU SPACING */
section.related.products { 
    margin-top: 80px !important; 
    margin-bottom: 80px !important; 
}

/* 10. HOMEPAGE FORM (FINAL GOLD MASTER) */
body.home .mailpoet_form {
    display: flex !important;
    flex-direction: row !important;
    align-items: start !important;
    gap: 15px !important;
    width: 440px !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-bottom: 40px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    position: relative !important; 
}

body.home .mailpoet_paragraph {
    display: block !important;
    flex: 0 0 auto !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.home .mailpoet_text {
    width: 300px !important;
    height: 50px !important;
    background: transparent !important;
    border: 1px solid var(--global-palette9, #ffffff) !important;
    color: var(--global-palette9, #ffffff) !important;
    padding: 0 15px !important;
    box-sizing: border-box !important;
    border-radius: 0 !important;
}

body.home input.mailpoet_submit {
    width: 125px !important;
    height: 50px !important;
    line-height: 50px !important;
    padding: 0 !important;
    background: transparent !important;
    border: 1px solid var(--global-palette9, #ffffff) !important;
    color: var(--global-palette9, #ffffff) !important;
    border-radius: 0 !important;
    margin: 0 !important;
    font-family: 'Mulish', sans-serif !important;
    font-size: 13px !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
}
body.home input.mailpoet_submit:hover {
    background-color: var(--global-palette9, #ffffff) !important;
    color: var(--global-palette1, #000000) !important;
}

body.home .mailpoet_paragraph { 
    overflow: visible !important; 
    position: relative !important; 
}
body.home .parsley-errors-list {
    position: absolute !important;
    top: 55px !important; 
    left: 0 !important;
    width: 100% !important;
    color: var(--bb-error, #D84E4E) !important;
    font-size: 11px !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 99 !important;
    text-align: left !important;
    display: block !important;
}

body.home .mailpoet_message {
    position: absolute !important;
    top: 100% !important; 
    margin-top: 10px !important; 
    left: 0 !important;
    width: 100% !important; 
    text-align: center !important;
    color: var(--bb-error, #D84E4E) !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    padding: 0 !important;
    z-index: 10 !important;
}

body.home .mailpoet_validate_success { 
    display: none !important; 
}
body.home .mailpoet_form label { 
    display: none !important; 
}

@media (max-width: 767px) {
    body.home .mailpoet_form {
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important; 
        max-width: 360px !important;
        gap: 15px !important;
    }
    body.home .mailpoet_paragraph,
    body.home .mailpoet_text,
    body.home input.mailpoet_submit {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 auto !important;
    }
    body.home .parsley-errors-list {
        position: relative !important;
        top: auto !important;
        margin-top: 5px !important;
    }
    body.home .mailpoet_message {
        position: relative !important;
        top: auto !important;
        margin-top: 10px !important;
        width: 100% !important;
    }
}

/* 11. ATELIER EMPTY CART SPACING */
.woocommerce .wc-empty-cart-message {
    margin-bottom: 40px !important;
    display: block !important;
}
.woocommerce p.return-to-shop {
    margin-top: 0px !important; 
}

/* 12. HIDE INJECTED DEFAULT CODES */
a.added_to_cart.wc-forward {
    display: none !important;
}

/* 13. ATELIER SUCCESS BANNER */
.woocommerce-message {
    background-color: transparent !important;
    color: var(--global-palette1, #000000) !important;
    border: 1px solid var(--global-palette1, #000000) !important; 
    box-shadow: none !important; 
    border-radius: 0px !important;
    padding: 15px 30px !important;
}
.woocommerce-message::before {
    display: none !important;
}

/* 14. GLOBAL REMOVE ICON PURGE */
.woocommerce a.remove,
.woocommerce-page a.remove,
.woocommerce table.shop_table a.remove,
.woocommerce table.cart a.remove {
    color: var(--global-palette1, #000000) !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    font-weight: 300 !important;
    font-size: 24px !important;
    border-radius: 0 !important;
    line-height: 1 !important;
    display: inline-block !important;
}
.woocommerce a.remove:hover,
.woocommerce-page a.remove:hover,
.woocommerce table.shop_table a.remove:hover,
.woocommerce table.cart a.remove:hover {
    color: var(--global-palette2, #C5A059) !important;
    background: transparent !important;
    background-color: transparent !important;
}

/* =========================================
   15. ATELIER LUXURY LINKS & GRID PROTECTION
   ========================================= */

/* 15A. Standard Text Links (With strict exclusions for buttons and Kadence grid titles) */
.entry-content p a:not(.kb-button):not(.wp-block-button__link):not(.button):not(.woocommerce-LoopProduct-link):not(.woocommerce-loop-product__link):not(.woocommerce-LoopProduct-link-title):not(.woocommerce-loop-product__title_link),
.entry-content li a:not(.kb-button):not(.wp-block-button__link):not(.button):not(.woocommerce-LoopProduct-link):not(.woocommerce-loop-product__link):not(.woocommerce-LoopProduct-link-title):not(.woocommerce-loop-product__title_link) {
    text-decoration: none !important;
    border-bottom: 1px solid transparent !important;
    transition: border-color 0.3s ease, color 0.3s ease !important;
}

/* Elegant gold reveal on true text hover */
.entry-content p a:not(.kb-button):not(.wp-block-button__link):not(.button):not(.woocommerce-LoopProduct-link):not(.woocommerce-loop-product__link):not(.woocommerce-LoopProduct-link-title):not(.woocommerce-loop-product__title_link):hover,
.entry-content li a:not(.kb-button):not(.wp-block-button__link):not(.button):not(.woocommerce-LoopProduct-link):not(.woocommerce-loop-product__link):not(.woocommerce-LoopProduct-link-title):not(.woocommerce-loop-product__title_link):hover {
    text-decoration: none !important;
    color: var(--global-palette2, #C5A059) !important; /* Antique Gold */
    border-bottom: 1px solid var(--global-palette2, #C5A059) !important;
}

/* 15B. Protecting Button Structures (Keeps the physical outline borders intact) */
.kb-button,
.wp-block-button__link,
.button {
    text-decoration: none !important;
    box-shadow: none !important;
}

/* 15C. Kadence Custom Grid Title Protection (No underlines, just gold hover) */
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link-title,
.woocommerce ul.products li.product a.woocommerce-loop-product__title_link,
.entry-content .woocommerce ul.products li.product a.woocommerce-LoopProduct-link-title {
    text-decoration: none !important;
    border-bottom: none !important;
    border: none !important;
    box-shadow: none !important;
    background-image: none !important;
}

/* Sophisticated gold color shift for the product title */
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link-title:hover,
.woocommerce ul.products li.product a.woocommerce-loop-product__title_link:hover,
.entry-content .woocommerce ul.products li.product a.woocommerce-LoopProduct-link-title:hover {
    color: var(--global-palette2, #C5A059) !important;
    transition: color 0.3s ease !important;
}

/* =========================================
   16. Product Page Variations Menu Tweaks & Image Gallery  
========================================= */

/* Restrict the overall variation area */
.woocommerce div.product form.cart .variations {
    width: 100% !important;
    max-width: 350px !important;
}

/* Align labels perfectly to the left */
.woocommerce div.product form.cart .variations td.label {
    width: 35% !important;
    text-align: left !important;
    padding-bottom: 12px !important;
}

/* Align the boxes perfectly to the left next to the labels */
.woocommerce div.product form.cart .variations td.value {
    width: 65% !important;
    text-align: left !important;
    padding-bottom: 12px !important;
}

/* The Box Sizing: Shorter depth, tighter length */
.woocommerce div.product form.cart .variations select {
    width: auto !important; 
    min-width: 170px !important; 
    max-width: 230px !important; 
    font-family: inherit !important;
    font-size: 14px !important;
    padding: 4px 8px !important; 
    border: 1px solid var(--bb-border, #DDDDDD) !important;
    background-color: transparent !important;
    border-radius: 0px !important;
}

/* Strip Kadence's absolute positioning and force a clean flex row */
.woocommerce div.product div.images .flex-control-thumbs {
    position: relative !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin-top: 15px !important;
    padding: 0 !important;
    justify-content: flex-start !important;
}

/* Nuke the javascript positioning on the individual thumbnails */
.woocommerce div.product div.images .flex-control-thumbs li {
    position: static !important; 
    width: 85px !important; /* Locks them to a crisp, non-stretched size */
    float: none !important;
    transform: none !important;
}

/* Ensure the thumbnail images don't stretch past their limits */
.woocommerce div.product div.images .flex-control-thumbs li img {
    width: 100% !important;
    max-width: 100px !important; /* Prevents the blur */
    height: auto !important;
    display: block !important;
}

/* =========================================
   17. ATELIER GALLERY UX (THE INVISIBLE HITBOX FIX)
========================================= */

/* 1. Kill the clunky magnifying glass icon & hover zoom */
.woocommerce div.product div.images .woocommerce-product-gallery__trigger { display: none !important; }
.zoomImg { display: none !important; visibility: hidden !important; }

/* 2. Format the layout row for the dashes */
.woocommerce div.product div.images .flex-control-thumbs {
    display: flex !important;
    justify-content: center !important;
    gap: 15px !important;
    margin-top: 25px !important;
    padding: 0 !important;
    list-style: none !important;
}

/* 3. Turn the container box into the physical dash */
.woocommerce div.product div.images .flex-control-thumbs li {
    width: 45px !important;
    height: 3px !important; /* Dash thickness */
    background-color: var(--bb-border, #DDDDDD) !important; /* Inactive light grey */
    position: relative !important;
    border-radius: 0 !important;
    float: none !important; /* Overrides Kadence formatting */
    transition: background-color 0.3s ease !important;
}

/* 4. Turn the dash black when active or hovered (Uses modern CSS :has selector) */
.woocommerce div.product div.images .flex-control-thumbs li:has(img.flex-active),
.woocommerce div.product div.images .flex-control-thumbs li:hover {
    background-color: var(--global-palette1, #000000) !important;
}

/* 5. Make the photograph an invisible, clickable ghost overlay */
.woocommerce div.product div.images .flex-control-thumbs li img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important; /* Completely hides the blurry photo */
    cursor: pointer !important;
    z-index: 10 !important;
    display: block !important;
}