/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme
 Author:       XTemos
 Author URI:   http://xtemos.com
 Template:     woodmart
 Version:      1.0.0
 Text Domain:  woodmart
*/

/* Keep the open cart visible when optimized CSS changes rule order. */
body:not(.et-elementor) .cart-widget-side.wd-side-hidden.wd-opened {
    transform: translate3d(0, 0, 0) !important;
}

/* Keep the page clear behind the open cart; retain outside-click closing. */
body:not(.et-elementor):has(> .cart-widget-side.wd-opened) > .wd-close-side {
    background-color: transparent !important;
}

/* Preserve WoodMart accent buttons when Used CSS moves generic button rules later. */
body:not(.et-elementor) .single_add_to_cart_button,
body:not(.et-elementor) .cart-widget-side .btn-accent,
body:not(.et-elementor) .cart-widget-side .woocommerce-mini-cart__buttons .checkout {
    --btn-color: var(--btn-accented-color, #fff);
    --btn-color-hover: var(--btn-accented-color-hover, #fff);
    --btn-bgcolor: var(--btn-accented-bgcolor, #f04055);
    --btn-bgcolor-hover: var(--btn-accented-bgcolor-hover, #f04055);
    --btn-brd-radius: var(--btn-accented-brd-radius, 5px);
    --btn-box-shadow: var(--btn-accented-box-shadow, none);
    --btn-box-shadow-hover: var(--btn-accented-box-shadow-hover, none);
}

/* Keep the cart link readable on the theme's navy default button. */
body:not(.et-elementor) .cart-widget-side .woocommerce-mini-cart__buttons .btn-cart,
body:not(.et-elementor) .cart-widget-side .woocommerce-mini-cart__buttons .btn-cart:hover {
    color: #fff;
}

/* ElectroTaavon: readable shopping controls, 2026-10-09. */
body:not(.et-elementor):not(.wp-admin) {
    --et-ux-ink: #152544;
    --et-ux-action: #bd1838;
    --et-ux-action-hover: #a31330;
}

/* Keep the purchase action easy to identify and read. */
body:not(.et-elementor) .product-grid-item .wd-add-btn > a,
body:not(.et-elementor) .single_add_to_cart_button,
body:not(.et-elementor) .cart-widget-side .btn-accent,
body:not(.et-elementor) .cart-widget-side .woocommerce-mini-cart__buttons .checkout,
body:not(.et-elementor) .woocommerce .checkout-button,
body:not(.et-elementor) .woocommerce #place_order {
    --btn-color: #fff;
    --btn-color-hover: #fff;
    --btn-bgcolor: var(--et-ux-action);
    --btn-bgcolor-hover: var(--et-ux-action-hover);
    background-color: var(--et-ux-action) !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 700;
    line-height: 1.6;
    min-height: 48px;
    padding: 10px 14px;
    border-radius: 8px;
}
body:not(.et-elementor) .product-grid-item .wd-add-btn > a:hover,
body:not(.et-elementor) .single_add_to_cart_button:hover,
body:not(.et-elementor) .cart-widget-side .btn-accent:hover,
body:not(.et-elementor) .woocommerce .checkout-button:hover,
body:not(.et-elementor) .woocommerce #place_order:hover {
    background-color: var(--et-ux-action-hover) !important;
}

body:not(.et-elementor) .product-grid-item .wd-entities-title {
    font-size: 16px !important;
    line-height: 1.65;
    height: auto !important;
    min-height: 3.3em;
    max-height: none;
}
body:not(.et-elementor) .product-grid-item .price {
    font-size: 17px !important;
    font-weight: 700;
    line-height: 1.65;
    color: #086b70;
}
body:not(.et-elementor) .product-grid-item .price del { font-size: .85em; }
body:not(.et-elementor) .summary .price { font-size: 24px !important; line-height: 1.6; }
body:not(.et-elementor) .summary .woocommerce-product-details__short-description,
body:not(.et-elementor) .woocommerce-Tabs-panel,
body:not(.et-elementor) .woocommerce form .form-row label,
body:not(.et-elementor) .woocommerce-checkout-review-order,
body:not(.et-elementor) .woocommerce-cart-form,
body:not(.et-elementor) .cart_totals,
body:not(.et-elementor) .woocommerce-mini-cart-item { font-size: 16px; line-height: 1.8; }

/* Text fields only: keep checkbox and radio controls native. */
body:not(.et-elementor) .searchform input[name="s"],
body:not(.et-elementor) .woocommerce input[type="text"],
body:not(.et-elementor) .woocommerce input[type="email"],
body:not(.et-elementor) .woocommerce input[type="tel"],
body:not(.et-elementor) .woocommerce input[type="number"],
body:not(.et-elementor) .woocommerce input[type="password"],
body:not(.et-elementor) .woocommerce select,
body:not(.et-elementor) .woocommerce textarea,
body:not(.et-elementor) .woocommerce .select2-selection--single {
    font-size: 16px !important;
    min-height: 48px;
    border-color: #8b95a7;
    border-radius: 8px;
}
body:not(.et-elementor) .searchform .searchsubmit { min-width: 48px; min-height: 48px; }
body:not(.et-elementor) .woocommerce form .form-row { margin-bottom: 18px; }
body:not(.et-elementor) .woocommerce form .form-row label { color: var(--et-ux-ink); font-weight: 600; }
body:not(.et-elementor) .woocommerce .select2-selection--single .select2-selection__rendered { line-height: 46px; }
body:not(.et-elementor) .woocommerce .select2-selection--single .select2-selection__arrow { height: 46px; }

body:not(.et-elementor) .quantity .minus,
body:not(.et-elementor) .quantity .plus { min-width: 44px; min-height: 48px; font-size: 20px; }
body:not(.et-elementor) .quantity input.qty { min-width: 50px; min-height: 48px; font-size: 16px; }
body:not(.et-elementor) .variations .wd-swatch { min-width: 44px; min-height: 44px; }
body:not(.et-elementor) .variations .reset_variations { min-height: 44px; padding-block: 10px; font-size: 15px; }
body:not(.et-elementor) .cart-widget-side .close-side-widget a { min-height: 44px; font-size: 16px; }
body:not(.et-elementor) .cart-widget-side .woocommerce-mini-cart__buttons a { min-height: 48px; font-size: 16px; }
body:not(.et-elementor) .wd-header-cart > a,
body:not(.et-elementor) .wd-header-my-account > a { min-height: 44px; min-width: 44px; }
body:not(.et-elementor) .mobile-nav .wd-nav-mobile > li > a { min-height: 48px; font-size: 16px; }

/* Keyboard focus stays visible on both light and colored surfaces. */
body:not(.et-elementor):not(.wp-admin) a:focus-visible,
body:not(.et-elementor):not(.wp-admin) button:focus-visible,
body:not(.et-elementor):not(.wp-admin) input:focus-visible,
body:not(.et-elementor):not(.wp-admin) select:focus-visible,
body:not(.et-elementor):not(.wp-admin) textarea:focus-visible,
body:not(.et-elementor):not(.wp-admin) [role="radio"]:focus-visible {
    outline: 3px solid #152544 !important;
    outline-offset: 3px;
    box-shadow: 0 0 0 2px #fff;
}

@media (max-width: 767px) {
    body:not(.et-elementor) .cart-widget-side { width: min(86vw, 360px) !important; max-width: calc(100vw - 24px); }
    body:not(.et-elementor) .single-product .product_title { font-size: 23px !important; line-height: 1.7; }
    body:not(.et-elementor) .summary .cart .single_add_to_cart_button { flex: 1 1 180px; }
    body:not(.et-elementor) .woocommerce-checkout h3,
    body:not(.et-elementor) .cart_totals h2 { font-size: 21px; line-height: 1.7; }
    body:not(.et-elementor) .woocommerce-Tabs-panel table { font-size: 15px; }
}
/* Name each colour so selection does not rely on colour perception. */
body:not(.et-elementor) .variations .wd-swatches-single { display: flex; flex-wrap: wrap; gap: 8px; }
body:not(.et-elementor) .variations .wd-swatch.wd-bg {
  width: auto !important; min-width: 64px; height: auto !important;
  min-height: 68px; flex-direction: column; gap: 5px; padding: 6px;
  border: 1px solid #8b95a7; border-radius: 8px !important;
  background: #fff; color: #152544;
}
body:not(.et-elementor) .variations .wd-swatch.wd-bg .wd-swatch-bg {
  width: 28px !important; height: 28px !important; min-width: 28px;
  border-radius: 50%;
}
body:not(.et-elementor) .variations .wd-swatch.wd-bg .wd-swatch-text {
  display: block !important; font-size: 14px; line-height: 1.5;
}
body:not(.et-elementor) .variations .wd-swatch.wd-active {
  border-color: #152544; box-shadow: inset 0 0 0 1px #152544;
}
body:not(.et-elementor) .et-ux-quantity-help { flex-basis: 100%; margin: 8px 0 12px; color: #152544; font-size: 16px; line-height: 1.8; }
body:not(.et-elementor) .summary form.cart { flex-wrap: wrap; gap: 8px; }
body:not(.et-elementor) .summary form.cart .single_add_to_cart_button.disabled {
  opacity: .5 !important; cursor: not-allowed;
}
/* Keep the complete name and action readable in narrow product cards. */
body:not(.et-elementor) .product-grid-item .wd-entities-title {
  max-height: none !important; overflow: visible !important;
  line-height: 1.65 !important;
}
body:not(.et-elementor) .product-grid-item .wd-entities-title a { display: block; overflow-wrap: anywhere; }
body:not(.et-elementor) .product-grid-item .wd-add-btn-replace .wd-action-text {
  white-space: normal !important; overflow: visible !important;
  text-overflow: clip !important; height: auto !important;
  line-height: 1.5 !important; transform: none !important;
}
body:not(.et-elementor) .product-grid-item .wd-add-btn-replace .wd-action-icon { display: none !important; }
@media (max-width: 767px) {
  body:not(.et-elementor) .wd-toolbar-label { white-space: normal !important; text-overflow: clip !important; font-size: 12px; line-height: 1.4; }
  body:not(.et-elementor) .wd-toolbar .wd-tools-element > a { min-height: 56px; }
}
@media (prefers-reduced-motion: reduce) {
    body:not(.et-elementor) .product-grid-item *, body:not(.et-elementor) .cart-widget-side, body:not(.et-elementor) .wd-close-side { transition-duration: .01ms !important; }
}

/* Keep the live Elementor price and header notice easy to read. */
body:not(.et-elementor) .wd-single-price .price { font-size: 24px !important; line-height: 1.6; color: #086b70 !important; }
body:not(.et-elementor) .header-banner.wd-hb { background-color: #086b70 !important; color: #fff; }
body:not(.et-elementor) .header-banner.wd-hb p { font-size: 16px; line-height: 1.8; }
body:not(.et-elementor) .header-banner .wd-hb-close a { min-width: 44px; min-height: 44px; }

body:not(.et-elementor) .et-ux-quantity-help { text-align: right; }
