/* Global frontend color overrides to replace legacy blue accents */
:root {
  --tepe-global-accent: #b5412b;
  --tepe-global-accent-dark: #8f2f1d;
  --tepe-global-accent-soft: #efe1d1;
  --tepe-global-accent-tint: #fbf4ea;
  --tepe-global-neutral: #6c5b49;
  --tepe-global-neutral-dark: #4f4132;
  --accent: var(--tepe-global-accent);
  --accent-dark: var(--tepe-global-accent-dark);
  --info: var(--tepe-global-accent);
}

::selection {
  background: rgba(181, 65, 43, 0.18);
  color: #211913;
}

body {
  accent-color: var(--tepe-global-accent);
  --tepe-link-hover-color: var(--tepe-global-accent-dark);
}

body.top-store-dark,
body .top-header,
body .main-header,
body .sticky-header,
body .below-header,
body .sider.overcenter,
body #top-store-mobile-bar {
  --tepe-link-hover-color: #f6e8d8;
}

body .page-head,
body .page-head-woo,
body .page-header,
body .content-wrap,
body .entry-content,
body .page-content,
body .site-main,
body .woocommerce,
body .sm-site-footer {
  --tepe-link-hover-color: var(--tepe-global-accent-dark);
}

@supports (color: color-mix(in srgb, black 50%, white)) {
  body {
    --tepe-link-hover-color: color-mix(in srgb, currentColor 58%, var(--tepe-global-accent-dark));
  }

  body.top-store-dark,
  body .top-header,
  body .main-header,
  body .sticky-header,
  body .below-header,
  body .sider.overcenter,
  body #top-store-mobile-bar {
    --tepe-link-hover-color: color-mix(in srgb, currentColor 72%, #fff);
  }

  body .page-head,
  body .page-head-woo,
  body .page-header,
  body .content-wrap,
  body .entry-content,
  body .page-content,
  body .site-main,
  body .woocommerce,
  body .sm-site-footer {
    --tepe-link-hover-color: color-mix(in srgb, currentColor 58%, var(--tepe-global-accent-dark));
  }
}

body a:focus,
body button:focus,
body input:focus,
body select:focus,
body textarea:focus {
  outline-color: rgba(181, 65, 43, 0.55);
}

body a:hover,
body a:focus {
  color: var(--tepe-link-hover-color) !important;
}

body a.button:hover,
body a.button:focus,
body .button:hover,
body .button:focus,
body .woocommerce a.button:hover,
body .woocommerce a.button:focus,
body .woocommerce button.button:hover,
body .woocommerce button.button:focus,
body .woocommerce input.button:hover,
body .woocommerce input.button:focus {
  color: #fff !important;
}

body .woocommerce-info,
body .woocommerce-message,
body .woocommerce-error {
  border-top-color: var(--tepe-global-accent) !important;
}

body .woocommerce-info::before,
body .woocommerce-message::before,
body .woocommerce-error::before {
  color: var(--tepe-global-accent) !important;
}

/* Parent theme accent color replacements */
body .woocommerce .added_to_cart.wc-forward:hover,
body ul.products .thunk-product-hover .add_to_cart_button:hover:after,
body .woocommerce .thunk-product-hover a.th-button:hover:after,
body .woocommerce ul.products li.product .product_type_variable:hover:after,
body .woocommerce ul.products li.product a.button.product_type_grouped:hover:after,
body .summary .yith-wcwl-add-to-wishlist .add_to_wishlist:hover:before,
body .summary .yith-wcwl-add-to-wishlist .yith-wcwl-wishlistaddedbrowse a::before,
body .summary .yith-wcwl-add-to-wishlist .yith-wcwl-wishlistexistsbrowse a::before,
body .th-hlight-icon,
body .ribbon-btn:hover,
body .thunk-product .yith-wcwl-wishlistexistsbrowse:before,
body .woocommerce .entry-summary a.compare.button:hover:before,
body .th-slide-button,
body .th-slide-button:after,
body .sider.overcenter .sider-inner ul.top-store-menu li a:hover,
body .reply a,
body .single-product .product_meta a,
body .woosw-btn:hover:before,
body .woosw-added:before,
body .wooscp-btn:hover:before,
body #top-store-mobile-bar .count-item,
body a.th-product-compare-btn.button.btn_type.th-added-compare:before,
body .thunk-product-list-section .thunk-list .thunk-product-content .woocommerce-LoopProduct-title:hover,
body .thunk-icon-market .cart-icon .taiowc-icon:hover,
body .woocommerce .entry-summary .th-product-compare-btn.btn_type.th-added-compare,
body .woocommerce .entry-summary a.th-product-compare-btn:before,
body .thunk-icon-market .cart-icon .taiowcp-icon:hover,
body .thunk-icon-market .cart-icon .taiowc-cart-item:hover,
body .thunk-icon-market .cart-icon .taiowcp-cart-item:hover,
body .site-title span a:hover,
body .main-header-bar .header-icon a:hover,
body .woocommerce div.product p.price,
body .woocommerce div.product span.price,
body .sticky-header .header-icon #open-cart a:hover,
body .thunk-wishlist a:hover,
body .thunk-compare a:hover,
body .thunk-quik a:hover {
  color: var(--tepe-global-accent) !important;
}

/* Keep header and dark-surface text hovers readable instead of forcing the accent */
body .top-header .top-header-bar a:hover,
body .main-header-bar .header-icon a:hover,
body .main-header-bar .site-title span a:hover,
body .sticky-header .header-icon a:hover,
body .sticky-header .site-title span a:hover,
body .sticky-header .header-icon #open-cart a:hover,
body .sider.overcenter .sider-inner ul.top-store-menu li a:hover,
body #top-store-mobile-bar a:hover,
body .thunk-icon-market .cart-icon .taiowc-icon:hover,
body .thunk-icon-market .cart-icon .taiowcp-icon:hover,
body .thunk-icon-market .cart-icon .taiowc-cart-item:hover,
body .thunk-icon-market .cart-icon .taiowcp-cart-item:hover {
  color: var(--tepe-link-hover-color) !important;
}

body .toggle-cat-wrap,
body #search-button,
body .thunk-icon .cart-icon,
body .single_add_to_cart_button.button.alt,
body .woocommerce #respond input#submit.alt,
body .woocommerce a.button.alt,
body .woocommerce button.button.alt,
body .woocommerce input.button.alt,
body .woocommerce #respond input#submit,
body .woocommerce button.button,
body .woocommerce input.button,
body .cat-list a:after,
body .tagcloud a:hover,
body .thunk-tags-wrapper a:hover,
body .btn-main-header,
body .page-contact .leadform-show-form input[type='submit'],
body .woocommerce .widget_price_filter .top-store-widget-content .ui-slider .ui-slider-range,
body .woocommerce .widget_price_filter .top-store-widget-content .ui-slider .ui-slider-handle,
body .entry-content form.post-password-form input[type='submit'],
body #top-store-mobile-bar a,
body .header-support-icon,
body .count-item,
body .nav-links .page-numbers.current,
body .nav-links .page-numbers:hover,
body .woocommerce .thunk-woo-product-list span.onsale,
body .top-store-site section.thunk-ribbon-section .content-wrap:before,
body .woocommerce .return-to-shop a.button,
body .widget_product_search [type='submit']:hover,
body .comment-form .form-submit [type='submit'],
body .top-store-slide-post .owl-nav button.owl-prev:hover,
body .top-store-slide-post .owl-nav button.owl-next:hover,
body .top-store-load-more button,
body article.thunk-post-article .thunk-readmore.button {
  background: linear-gradient(135deg, var(--tepe-global-accent) 0%, #cd5235 100%) !important;
  color: #fff !important;
}

body .open-cart p.buttons a:hover,
body .woocommerce #respond input#submit.alt:hover,
body .woocommerce a.button.alt:hover,
body .woocommerce button.button.alt:hover,
body .woocommerce input.button.alt:hover,
body .woocommerce #respond input#submit:hover,
body .woocommerce button.button:hover,
body .woocommerce input.button:hover,
body .thunk-slide .owl-nav button.owl-prev:hover,
body .thunk-slide .owl-nav button.owl-next:hover,
body .thunk-list-grid-switcher a.selected,
body .thunk-list-grid-switcher a:hover,
body .woocommerce .woocommerce-error .button:hover,
body .woocommerce .woocommerce-info .button:hover,
body .woocommerce .woocommerce-message .button:hover,
body #searchform [type='submit']:hover,
body .woocommerce nav.woocommerce-pagination ul li a:focus,
body .woocommerce nav.woocommerce-pagination ul li a:hover,
body .woocommerce nav.woocommerce-pagination ul li span.current,
body .thunk-top2-slide.owl-carousel .owl-nav button:hover,
body .product-slide-widget .owl-carousel .owl-nav button:hover,
body .thunk-slide.thunk-brand .owl-nav button:hover,
body .th-testimonial .owl-carousel .owl-nav button.owl-prev:hover,
body .th-testimonial .owl-carousel .owl-nav button.owl-next:hover,
body .top-store-load-more button:hover,
body article.thunk-post-article .thunk-readmore.button:hover {
  background: linear-gradient(135deg, var(--tepe-global-accent-dark) 0%, #a93a24 100%) !important;
  color: #fff !important;
}

body .thunk-product-hover .th-button.add_to_cart_button,
body .woocommerce ul.products .thunk-product-hover .add_to_cart_button,
body .woocommerce ul.products li.product .product_type_variable,
body .woocommerce ul.products li.product a.button.product_type_grouped,
body .top-store-load-more button,
body .woocommerce .woocommerce-error .button,
body .woocommerce .woocommerce-info .button,
body .woocommerce .woocommerce-message .button,
body #searchform [type='submit']:hover,
body .page-contact .leadform-show-form input[type='submit'],
body .widget_product_search [type='submit']:hover,
body .thunk-slide .owl-nav button.owl-prev:hover,
body .thunk-slide .owl-nav button.owl-next:hover,
body .thunk-slide.thunk-brand .owl-nav button:hover,
body .th-testimonial .owl-carousel .owl-nav button.owl-prev:hover,
body .th-testimonial .owl-carousel .owl-nav button.owl-next:hover,
body .thunk-list-grid-switcher a.selected,
body .thunk-list-grid-switcher a:hover {
  border-color: var(--tepe-global-accent) !important;
}

body .loader {
  border-right-color: var(--tepe-global-accent) !important;
  border-bottom-color: var(--tepe-global-accent) !important;
  border-left-color: var(--tepe-global-accent) !important;
}

body .comment-form .form-submit [type='submit'],
body article.thunk-post-article .thunk-readmore.button,
body .btn-main-header,
body .header-support-icon,
body .woocommerce .thunk-woo-product-list span.onsale {
  box-shadow: 0 10px 24px rgba(181, 65, 43, 0.22) !important;
}

/* Generic button polish */
body .woocommerce a.button,
body .woocommerce button.button,
body .woocommerce input.button,
body .button,
body button,
body input[type='submit'] {
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

body .woocommerce a.button:hover,
body .woocommerce button.button:hover,
body .woocommerce input.button:hover,
body .button:hover,
body button:hover,
body input[type='submit']:hover {
  box-shadow: 0 12px 22px rgba(143, 47, 29, 0.22);
}

/* Frontend plugin overrides */
body #b2bking_request_custom_quote_button,
body #b2bking_request_custom_quote_button.b2bking_button_quote_shortcode,
body .b2bking_button_quote_productpage,
body button.b2bking_purchase_lists_view_list,
body button#b2bking_purchase_list_new_button,
body button.b2bking_bulkorder_form_container_bottom_add_button,
body button.b2bking_myaccount_start_conversation_button,
body .b2bking_myaccount_conversation_endpoint_button,
body button.b2bking_subaccounts_container_top_button,
body button.b2bking_subaccounts_new_account_container_content_bottom_button,
body button.b2bking_subaccounts_edit_account_container_content_bottom_button,
body .b2bking_myaccount_individual_offer_bottom_line_add button.b2bking_myaccount_individual_offer_bottom_line_button,
body #b2bking_return_agent {
  background: linear-gradient(135deg, var(--tepe-global-accent) 0%, #cd5235 100%) !important;
  border-color: transparent !important;
  color: #fff !important;
}

body #b2bking_request_custom_quote_button:hover,
body #b2bking_request_custom_quote_button.b2bking_button_quote_shortcode:hover,
body .b2bking_button_quote_productpage:hover,
body button.b2bking_purchase_lists_view_list:hover,
body button#b2bking_purchase_list_new_button:hover,
body button.b2bking_bulkorder_form_container_bottom_add_button:hover,
body button.b2bking_myaccount_start_conversation_button:hover,
body .b2bking_myaccount_conversation_endpoint_button:hover,
body button.b2bking_subaccounts_container_top_button:hover,
body button.b2bking_subaccounts_new_account_container_content_bottom_button:hover,
body button.b2bking_subaccounts_edit_account_container_content_bottom_button:hover,
body .b2bking_myaccount_individual_offer_bottom_line_add button.b2bking_myaccount_individual_offer_bottom_line_button:hover,
body #b2bking_return_agent:hover {
  background: linear-gradient(135deg, var(--tepe-global-accent-dark) 0%, #a93a24 100%) !important;
  color: #fff !important;
}

body button.b2bking_purchase_lists_add_to_cart,
body button.b2bking_subaccounts_account_button,
body button.b2bking_subaccounts_edit_account_container_content_bottom_button_delete,
body button.b2bking_myaccount_view_conversation_button,
body button.b2bking_bulkorder_form_container_bottom_save_button,
body button.b2bking_bulkorder_form_container_bottom_update_button,
body button.b2bking_bulkorder_form_container_bottom_delete_button,
body button.b2bking_bulkorder_form_container_newline_button,
body #b2bking_myaccount_conversation_endpoint_container_top button,
body button#b2bking_conversation_make_offer_vendor {
  background: var(--tepe-global-neutral) !important;
  border-color: transparent !important;
  color: #fff !important;
}

body button.b2bking_purchase_lists_add_to_cart:hover,
body button.b2bking_subaccounts_account_button:hover,
body button.b2bking_subaccounts_edit_account_container_content_bottom_button_delete:hover,
body button.b2bking_myaccount_view_conversation_button:hover,
body button.b2bking_bulkorder_form_container_bottom_save_button:hover,
body button.b2bking_bulkorder_form_container_bottom_update_button:hover,
body button.b2bking_bulkorder_form_container_bottom_delete_button:hover,
body button.b2bking_bulkorder_form_container_newline_button:hover,
body #b2bking_myaccount_conversation_endpoint_container_top button:hover,
body button#b2bking_conversation_make_offer_vendor:hover {
  background: var(--tepe-global-neutral-dark) !important;
  color: #fff !important;
}

body .b2bking-drop-area {
  border-color: rgba(181, 65, 43, 0.45) !important;
  background: #fdf6ee !important;
}

body .b2bking-drop-area.highlight {
  border-color: var(--tepe-global-accent) !important;
  background: #faece1 !important;
}

body .b2bking_has_color,
body table.b2bking_tiered_price_table tbody td.b2bking_has_color {
  background: var(--tepe-global-accent) !important;
  background-color: var(--tepe-global-accent) !important;
  color: #fff !important;
}

body table#b2bking_purchase_lists_table thead tr th {
  background: var(--tepe-global-neutral) !important;
  color: #fff !important;
}

body .b2bking_checkbox_child {
  border-left-color: rgba(108, 91, 73, 0.8) !important;
}

/* Keep utility accents warm on forms and pagination */
body .woocommerce .widget_price_filter .price_slider_amount .button,
body .woocommerce nav.woocommerce-pagination ul li span.current,
body .woocommerce nav.woocommerce-pagination ul li a:hover,
body .woocommerce nav.woocommerce-pagination ul li a:focus,
body .nav-links .page-numbers.current,
body .nav-links .page-numbers:hover {
  background: linear-gradient(135deg, var(--tepe-global-accent) 0%, #cd5235 100%) !important;
  border-color: var(--tepe-global-accent) !important;
  color: #fff !important;
}

body .woocommerce input[type='text']:focus,
body .woocommerce input[type='email']:focus,
body .woocommerce input[type='tel']:focus,
body .woocommerce input[type='password']:focus,
body .woocommerce textarea:focus,
body .woocommerce select:focus {
  border-color: rgba(181, 65, 43, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(181, 65, 43, 0.12) !important;
}
