/*
Theme Name: EcoloxTech
Theme URI: https://ecoloxtech.com
Author: EcoloxTech
Description: Onsite HOCl generation technology — WooCommerce theme for ecoloxtech.com. Carries the EcoloxTech 2.0 design system, the Industries and Research custom post types, the quote-request commerce flow, and the full JSON-LD schema layer.
Version: 1.0.40
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.0
License: Proprietary
Text Domain: ecoloxtech
Tags: woocommerce, business, seo
*/

/* The design system lives in assets/css/main.css and is enqueued from
   functions.php. This file exists for the theme header and for any
   WordPress-specific overrides that do not belong in the design system. */

/* --- WordPress core classes ------------------------------------------- */
.alignleft   { float: left; margin: .5rem 1.5rem 1rem 0; }
.alignright  { float: right; margin: .5rem 0 1rem 1.5rem; }
.aligncenter { display: block; margin-inline: auto; }
.alignwide   { width: min(100% - 2.5rem, 1200px); margin-inline: auto; }
.alignfull   { width: 100%; }

.wp-caption { max-width: 100%; }
.wp-caption-text, figcaption {
  font-size: var(--step--1); color: var(--muted); margin-top: .5rem; text-align: left;
}
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.screen-reader-text:focus {
  position: static; width: auto; height: auto; clip: auto;
  background: var(--brand); color: #fff; padding: .75rem 1.25rem;
}

.sticky { position: relative; }
.bypostauthor { display: block; }

/* --- Admin bar offset ------------------------------------------------- */
.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}

/* --- Gutenberg blocks in prose ---------------------------------------- */
.prose .wp-block-image { margin-block: 2rem; }
.prose .wp-block-image img { border-radius: var(--r-md); }
.prose .wp-block-quote {
  border-left: 3px solid var(--accent); padding-left: var(--sp-5);
  font-family: var(--font-display); font-size: var(--step-2); line-height: 1.35; color: var(--ink);
}
.prose .wp-block-table table { width: 100%; }
.prose .wp-block-separator { border-top: 1px solid var(--line); margin-block: var(--sp-7); }
.prose .wp-block-button__link { border-radius: var(--r-pill); background: var(--brand); }

/* --- Menus -------------------------------------------------------------
   wp_nav_menu() outputs ul > li > a, where the design system's static
   build used bare <a> children. These rules reconcile the two without
   touching the design system file. */
.nav ul, .nav ol { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .15rem; }
.nav li { margin: 0; position: relative; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }

/* Second-level dropdowns */
.nav .sub-menu {
  display: none; position: absolute; top: calc(100% + .35rem); left: 0;
  flex-direction: column; align-items: stretch; gap: 0; min-width: 14rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-lg); padding: .35rem; z-index: 50;
}
.nav li:hover > .sub-menu,
.nav li:focus-within > .sub-menu,
.nav li.is-open > .sub-menu { display: flex; }
.nav .sub-menu a { white-space: normal; padding: .55rem .7rem; }

/*
 * The sub-menu hangs .35rem below its parent, and that gap belongs to neither
 * element — so moving the pointer from "Learn" down into the menu crossed a
 * strip where nothing was hovered, and the menu closed before it could be
 * reached. This invisible bridge fills the gap.
 */
.nav .sub-menu::before {
  content: ""; position: absolute; left: 0; right: 0; top: -.5rem; height: .5rem;
}

/* Caret on items that open a sub-menu. */
.nav .menu-item-has-children > a {
  display: inline-flex; align-items: center; gap: .3rem;
}
.nav .menu-item-has-children > a::after {
  content: ""; width: .38rem; height: .38rem; margin-top: -.18rem;
  border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg); transition: transform .15s ease; opacity: .7;
}
.nav li:hover > a::after,
.nav li:focus-within > a::after,
.nav li.is-open > a::after { transform: rotate(225deg); margin-top: .18rem; }

.nav .current-menu-item > a,
.nav .current_page_item > a,
.nav .current-menu-ancestor > a {
  background: var(--mist); color: var(--brand-700);
}

/*
 * Mobile panel. Must match the width at which main.css collapses the nav
 * (1023px since the two-tier header); a mismatch leaves a band of widths where
 * the collapsed panel shows with the desktop dropdown rules still active.
 *
 * In the panel the group is shown open, as a labelled section: a hover
 * dropdown inside a tap-driven panel is a menu inside a menu.
 */
@media (max-width: 1023px) {
  .site-header.open .nav ul { flex-direction: column; align-items: stretch; gap: 0; width: 100%; }
  .site-header.open .nav .sub-menu {
    display: flex; position: static; border: 0; box-shadow: none; padding: 0 0 0 1rem; min-width: 0;
  }
  .site-header.open .nav .sub-menu::before { display: none; }
  .site-header.open .nav .menu-item-has-children > a::after { display: none; }
  /*
   * Only a heading with no page behind it ("Learn", href="#") becomes an
   * inert section label. SHOP is a parent too, but it is also /shop/ — making
   * every parent inert would have left the shop unreachable from the phone menu.
   */
  .site-header.open .nav .menu-item-has-children > a[href="#"] {
    font-size: .75rem; font-weight: 660; letter-spacing: .1em; text-transform: uppercase;
    color: var(--muted); pointer-events: none;
  }
}

/* Cart count chip in the header */
.header-cta .btn span {
  display: inline-grid; place-items: center; min-width: 1.25rem; height: 1.25rem;
  padding: 0 .35rem; border-radius: var(--r-pill);
  background: var(--brand); color: #fff; font-size: .72rem; font-weight: 700;
}

/* --- Pagination ------------------------------------------------------- */
.pagination { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: center; margin-top: var(--sp-7); }
.pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.6rem; height: 2.6rem; padding: 0 .75rem;
  border: 1.5px solid var(--line); border-radius: var(--r-md);
  text-decoration: none; color: var(--body); font-weight: 560; font-size: .93rem;
}
.pagination .page-numbers:hover { border-color: var(--brand); color: var(--brand-700); }
.pagination .page-numbers.current { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination .page-numbers.dots { border-color: transparent; }

/* Footer legal links (Privacy, Terms, Warranty, Shipping & Returns) - added 2026-10-05 */
.footer-legal ul {
	display: grid;
	grid-template-columns: repeat(2, auto);
	justify-content: start;
	gap: .25rem 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.footer-legal li {
	margin: 0;
}
.footer-legal a {
	color: inherit;
	text-decoration: none;
	opacity: .85;
}
.footer-legal a:hover,
.footer-legal a:focus-visible {
	opacity: 1;
	text-decoration: underline;
}

/* Footer newsletter fields: white so they stand out on the light footer - added 2026-10-05 */
.footer-newsletter .field input,
.footer-newsletter .field select {
	background: #fff;
	color: var(--ink, #2c2c2c);
	border-color: var(--line, #dde7e2);
}
.footer-newsletter .field input::placeholder {
	color: var(--muted, #6b6f6d);
	opacity: 1;
}
.footer-newsletter .field input:focus,
.footer-newsletter .field select:focus {
	border-color: var(--brand, #018175);
}
.footer-newsletter .field select option {
	color: var(--ink, #2c2c2c);
	background: #fff;
}
