/*
 Theme Name:   Astra Child (x3power)
 Template:     astra
 Version:      1.1.6
 Text Domain:  astra-child
*/

/* ================================================================
   x3power — dark + red design system
   Redefine Astra global-color tokens (high specificity beats Astra's
   own :root, whatever the load order), then component polish.
   Roles: 0 accent/link · 1 accent-dark · 2 headings · 3 body ·
          4 alt/elevated surface · 5 base bg · 6 deep surface ·
          7 deepest(footer) · 8 hover surface.
   ================================================================ */
html:root{
  --ast-global-color-0:#e6212f;
  --ast-global-color-1:#c8102e;
  --ast-global-color-2:#f7f3f2;
  --ast-global-color-3:#b8adae;
  --ast-global-color-4:#1e1718;
  --ast-global-color-5:#15100f;
  --ast-global-color-6:#241416;
  --ast-global-color-7:#0f0b0b;
  --ast-global-color-8:#2a2022;

  --x3-red:#e6212f;
  --x3-red-dark:#c8102e;
  --x3-red-deep:#a50e26;
  --x3-bg:#15100f;
  --x3-surface:#1e1718;
  --x3-surface-2:#2a2022;
  --x3-border:rgba(255,255,255,.10);
  --x3-text:#f7f3f2;
  --x3-muted:#b8adae;
}

/* base */
body{background:var(--x3-bg);color:var(--x3-text);}
h1,h2,h3,h4,h5,h6{color:var(--x3-text);letter-spacing:-.01em;}
p,li{color:var(--x3-muted);}
a{color:var(--x3-red);}
a:hover{color:var(--x3-red-dark);}
:focus-visible{outline:2px solid var(--x3-red);outline-offset:2px;}

/* leftover literal-white block backgrounds -> dark surface */
[style*="background-color:#ffffff"],[style*="background-color: #ffffff"],
.has-white-background-color{background-color:var(--x3-surface)!important;}

/* header: sticky, dark, red accents */
.site-header,.ast-primary-header-bar,.main-header-bar{
  background:var(--x3-bg)!important;border-bottom:2px solid var(--x3-red);
}
.ast-primary-header-bar-wrap .ast-primary-header-bar{position:sticky;top:0;z-index:99;}
.main-navigation a,.ast-header-menu a,.main-header-menu a{color:var(--x3-text)!important;font-weight:600;}
.main-navigation a:hover,.menu-item:hover>a,.main-header-menu .current-menu-item>a{color:var(--x3-red)!important;}

/* promo strip helper */
.x3-promo-bar{background:var(--x3-red-dark);color:#fff;text-align:center;font-weight:700;padding:.55rem 1rem;letter-spacing:.02em;}

/* buttons: solid deep red + white text (AA), rounded, focus ring */
.ast-button,.button,.wp-block-button__link,
.woocommerce a.button,.woocommerce button.button,.woocommerce button.button.alt,
.woocommerce #respond input#submit,.woocommerce .widget_price_filter .button,
.wp-block-uagb-buttons-child a,.uagb-button__wrapper a{
  background:var(--x3-red-dark)!important;border-color:var(--x3-red-dark)!important;color:#fff!important;
  border-radius:6px;font-weight:700;letter-spacing:.01em;
}
.ast-button:hover,.button:hover,.wp-block-button__link:hover,
.woocommerce a.button:hover,.woocommerce button.button:hover,.woocommerce button.button.alt:hover{
  background:var(--x3-red-deep)!important;border-color:var(--x3-red-deep)!important;color:#fff!important;
}

/* sale badge */
.woocommerce span.onsale{background:var(--x3-red)!important;color:#fff!important;border-radius:999px;font-weight:700;padding:.35em .7em;}

/* product cards */
.woocommerce ul.products li.product,.wc-block-grid__product{
  background:var(--x3-surface);border:1px solid var(--x3-border);border-radius:10px;padding:14px;
  transition:transform .18s cubic-bezier(.22,1,.36,1),border-color .18s;
}
.woocommerce ul.products li.product:hover,.wc-block-grid__product:hover{transform:translateY(-4px);border-color:var(--x3-red);}
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .price,.woocommerce div.product p.price,
.woocommerce ul.products li.product .price .amount{color:var(--x3-text)!important;font-weight:700;}

/* forms / inputs */
input,select,textarea,.woocommerce form .form-row input.input-text,.select2-selection{
  background:var(--x3-surface)!important;color:var(--x3-text)!important;border:1px solid var(--x3-border)!important;border-radius:6px;
}
input::placeholder,textarea::placeholder{color:#8a7f80;}

/* footer: deepest */
.site-footer,.footer-adv,.ast-small-footer{background:#0f0b0b!important;border-top:1px solid var(--x3-border);}
.site-footer p,.site-footer li,.site-footer span{color:var(--x3-muted);}
.site-footer a{color:var(--x3-text);}
.site-footer a:hover{color:var(--x3-red);}

/* tables / misc surfaces */
.woocommerce table.shop_table,.woocommerce-cart .cart_totals{background:var(--x3-surface);color:var(--x3-text);border-color:var(--x3-border);}
hr,.wp-block-separator{border-color:var(--x3-border);}

/* hero: dark scrim over the (demo) image so it reads dark; text stays white */
.entry-content > .spectra-is-root-container:first-of-type{position:relative;}
.entry-content > .spectra-is-root-container:first-of-type::before{
  content:""!important;position:absolute!important;inset:0!important;z-index:1!important;pointer-events:none;
  background:linear-gradient(90deg,rgba(21,16,15,.94) 0%,rgba(21,16,15,.72) 42%,rgba(21,16,15,.34) 100%)!important;
  opacity:1!important;
}
.entry-content > .spectra-is-root-container:first-of-type > *{position:relative;z-index:2;}

/* Always-visible header search box (CRO: visible box > icon, +91% search usage) */
.ast-header-search .ast-search-menu-icon.slide-search{display:inline-flex!important;align-items:center;}
.ast-header-search .ast-search-menu-icon.slide-search .search-form{
  position:static!important;visibility:visible!important;opacity:1!important;
  width:190px!important;height:auto!important;overflow:visible!important;padding:0!important;transform:none!important;
  background:transparent!important;box-shadow:none!important;
}
.ast-header-search .ast-search-menu-icon .search-field{
  display:block!important;width:100%!important;background:var(--x3-surface)!important;color:var(--x3-text)!important;
  border:1px solid var(--x3-border)!important;border-radius:999px!important;padding:.45rem 2.2rem .45rem .95rem!important;
  height:auto!important;font-size:.9rem!important;
}
.ast-header-search .ast-search-menu-icon .search-field::placeholder{color:#8a7f80;}
.ast-header-search .ast-search-menu-icon .search-submit{display:none!important;}
.ast-header-search .ast-search-menu-icon .ast-icon{position:absolute;right:12px;pointer-events:none;color:var(--x3-red);}
.ast-header-search .ast-search-menu-icon .slide-search a.slide-search{position:absolute;right:10px;}

/* trust bar layout + language switcher */
.x3-promo-bar{display:flex;align-items:center;justify-content:center;position:relative;gap:1rem;}
.x3-promo-lang{position:absolute;right:1rem;top:50%;transform:translateY(-50%);display:flex;gap:.7rem;list-style:none;margin:0;padding:0;}
.x3-promo-lang li{display:inline-flex;margin:0;}
.x3-promo-lang a{color:#fff!important;display:inline-flex;align-items:center;gap:.3rem;font-weight:600;font-size:.82rem;opacity:.9;}
.x3-promo-lang a:hover{opacity:1;}
.x3-promo-lang img{width:18px;height:auto;border-radius:2px;}
@media(max-width:921px){.x3-promo-lang{display:none;}}

/* mobile: full-width search row */
@media(max-width:921px){
  .ast-below-header-bar .ast-search-menu-icon.slide-search,
  .ast-below-header-bar .ast-search-menu-icon.slide-search .search-form{width:100%!important;}
  .ast-below-header-bar .ast-search-menu-icon .search-field{width:100%!important;}
  .ast-below-header-wrap .ast-builder-layout-element{width:100%;padding:8px 16px;}
}

/* X3POWER text wordmark (interim logo — replace with real logo when available) */
.site-title{display:block!important;margin:0;line-height:1;}
.site-title a{color:var(--x3-text)!important;font-weight:900!important;font-style:italic;text-transform:uppercase;letter-spacing:-.03em;font-size:1.9rem!important;}
.site-title a:hover{color:var(--x3-red)!important;}
.ast-site-identity{padding:0;}

/* hide leftover demo (DNK) footer logo; wordmark/tagline carry the brand */
.site-footer img[src*='logo@2x-free'],.site-footer img[src*='logo-free-img'],.site-footer img[src*='logo1-free']{display:none!important;}
/* tidy empty product grid (until real catalog) */
.woocommerce ul.products:empty{display:none;}
