/* KandLOutlet Divi Child — storefront fixes
   Loaded after style.css. Keep this file small and additive. */

/* 1. WooCommerce's clearfix pseudo-elements (ul.products::before/::after)
      become empty CSS grid items now that .products is a grid container, which
      pushes the first row out of alignment. Neutralise them. */
body.klo-store ul.products::before,
body.klo-store ul.products::after,
body.klo-store .products::before,
body.klo-store .products::after {
  content: none !important;
  display: none !important;
}

/* 2. Header branding. Divi renders the packaged KandLOutlet lockup through the
      supported `et_html_logo_container` filter: the full lockup (klo-logo.svg)
      on desktop and the compact mark (klo-logo-mark.svg) on small screens via
      <picture><source>. These rules keep the logo crisp and capped so the menu
      stays in place. The CSS wordmark below is kept ONLY as a no-PHP /
      no-asset fallback: it only appears when Divi is still outputting its
      bundled placeholder logo. */
body.klo-store .logo_container a {
  text-decoration: none;
}

body.klo-store .klo-header-logo {
  display: inline-flex;
  align-items: center;
}

body.klo-store .logo_container img#logo {
  display: block;
  width: auto;
  height: 40px;
  max-width: 210px;
}

@media (max-width: 980px) {
  body.klo-store .logo_container img#logo {
    height: 38px;
    max-width: none;
  }
}

/* Fallback only: Divi's bundled placeholder logo is still in play. */
body.klo-store .logo_container:has(img#logo[src*="/themes/Divi/images/logo.png"]) img#logo {
  display: none;
}

body.klo-store .logo_container:has(img#logo[src*="/themes/Divi/images/logo.png"]) a::before {
  content: "K & L OUTLET";
  display: inline-block;
  font-family: var(--klo-font);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.15;
  color: var(--klo-white);
  text-shadow: 0 0 14px rgba(255, 106, 0, 0.45);
}

body.klo-store .logo_container:has(img#logo[src*="/themes/Divi/images/logo.png"]) a::after {
  content: "";
  display: block;
  height: 2px;
  margin-top: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--klo-orange), transparent);
}

@media (max-width: 980px) {
  body.klo-store .logo_container:has(img#logo[src*="/themes/Divi/images/logo.png"]) a::before {
    font-size: 1.1rem;
  }
}

/* 3. Announcement strip renders after the header so it is not covered by
      Divi's fixed navigation. */
body.klo-store .klo-announcement {
  position: relative;
  z-index: 5;
}

/* 4. Full-width storefront: remove Divi's default blog sidebar on all
      storefront pages. Its "Recent Posts / Recent Comments" widgets were
      squeezing WooCommerce archives and the single product into a narrow
      column. The storefront never needs that sidebar. */
body.klo-store #sidebar {
  display: none !important;
}

body.klo-store #content-area,
body.klo-store #left-area {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  padding-right: 0 !important;
}

body.klo-store #main-content .container {
  width: 100%;
  max-width: var(--klo-container);
}

/* Brand: Divi native header/footer dark overrides (Divi modules can carry their
      own light backgrounds). Kept here so style.css stays the token layer. */
body.klo-store #main-header,
body.klo-store #main-header.et-fixed-header,
body.klo-store #main-header .et_pb_menu__wrap,
body.klo-store #main-header .et_pb_menu__menu {
  background-color: transparent;
}

body.klo-store #main-header .et_pb_menu__search-form,
body.klo-store #main-header .et_pb_menu__search-input {
  background: var(--klo-surface-3);
  color: var(--klo-white);
  border-color: var(--klo-border);
}

body.klo-store #main-footer #footer-widgets,
body.klo-store #main-footer .et_pb_section {
  background-color: transparent;
}

body.klo-store #main-footer .et_pb_widget,
body.klo-store #main-footer .footer-widget {
  color: var(--klo-silver);
}

/* Brand: mobile menu (Divi slide-in / dropdown) dark surface. */
body.klo-store #main-header .et_mobile_menu,
body.klo-store .et_mobile_menu {
  background: var(--klo-black-alt);
  border: 1px solid var(--klo-border);
}

body.klo-store .et_mobile_menu li a {
  color: var(--klo-white) !important;
  border-bottom: 1px solid var(--klo-border);
}

body.klo-store .et_mobile_menu li a:hover {
  color: var(--klo-orange) !important;
}

/* Brand: WooCommerce select2 dropdowns / mini-cart widget. */
body.klo-store .woocommerce .widget_shopping_cart_content,
body.klo-store .woocommerce .cart_list,
body.klo-store .woocommerce .widget_shopping_cart .cart_list li a {
  color: var(--klo-silver);
}

body.klo-store .woocommerce.widget_shopping_cart .total {
  color: var(--klo-white);
  border-top: 1px solid var(--klo-border);
}

/* 5. Give WooCommerce content room and keep the product grid sane. */
body.klo-store .klo-product-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

body.klo-store .klo-summary {
  min-width: 0;
}

body.klo-store ul.products {
  margin-left: 0;
  margin-right: 0;
}

/* 6. WooCommerce sets explicit percentage widths on loop items
      (`.columns-3 li.product { width: 30.75% }`) and on the single-product
      summary (`div.summary { width: 48%; float: right }`). Those fight the
      CSS grid: each card rendered ~61px inside a 199px cell (vertical text)
      and the summary was squeezed to half its column. Force them to fill. */
body.klo-store ul.products li.product,
body.klo-store ul.products > li.product,
body.klo-store ul.products li.product.first,
body.klo-store ul.products li.product.last {
  width: auto !important;
  float: none !important;
  margin: 0 !important;
  clear: none !important;
  justify-self: stretch;
}

body.klo-store div.product div.summary,
body.klo-store div.product .summary,
body.klo-store .klo-summary {
  width: 100% !important;
  float: none !important;
}

body.klo-store div.product div.images {
  width: 100% !important;
  float: none !important;
}
