/* Overrides for Divi rules that depend on Divi's runtime JS we don't ship.
   Keeps Divi's authored CSS intact; only neutralizes hide-until-animated states
   and adds layout for components Divi normally hydrates. */

/* --- 1. Reveal elements Divi hides while waiting for waypoint/scroll JS --- */
.et-waypoint:not(.et_pb_counters) {
  opacity: 1 !important;
}
.et-pb-before-scroll-animation {
  opacity: 1 !important;
}
.et_animated {
  opacity: 1 !important;
  animation: none !important;
}
.et_pb_preload .et_pb_section_video_bg,
.et_pb_preload > div {
  visibility: visible !important;
}
.et_pb_preload:before {
  display: none !important;
}

/* --- 2. Slider: show only the active slide; site.js handles rotation --- */
.et_pb_slider {
  position: relative;
}
.et_pb_slider .et_pb_slide {
  display: none;
}
.et_pb_slider .et_pb_slide.et-pb-active-slide {
  display: block;
}
.et_pb_slides {
  position: relative;
}

/* --- 3. Contact form: hide labels visually (sr-only), style fields --- */
.et_pb_contact_form_label {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.et_pb_contact_form .et_pb_contact_field {
  margin-bottom: 16px;
}

.et_pb_contact_form .et_pb_contact_field input,
.et_pb_contact_form .et_pb_contact_field textarea {
  width: 100%;
  padding: 16px;
  background-color: #eee;
  border: none !important;
  border-radius: 0 !important;
  font-size: 14px;
  color: #999;
  box-sizing: border-box;
}

.et_pb_contact_form .et_pb_contact_field textarea {
  min-height: 140px;
  resize: vertical;
}

.et_pb_contact_form .et_contact_bottom_container {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
}

/* --- 4. Hide hCaptcha (no key, no JS bundle) so it doesn't render broken --- */
.et_pb_contact_form .h-captcha,
.et_pb_contact_form .hcaptcha-widget-id {
  display: none !important;
}

/* --- 5. Block-button styling (Divi normally hydrates these) --- */
.et_pb_contact_submit,
.et_pb_button {
  display: inline-block;
  cursor: pointer;
}

/* --- 6. Fullwidth header: ensure background images are visible --- */
.et_pb_fullwidth_header .et_pb_fullwidth_header_overlay {
  background-color: transparent;
}

/* --- 7. DiviBar: slide-in from bottom (avoids fixed header at z-index 99999) --- */
#divibar-49241 {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100000;
  background: #f6f4ef;
  padding: 16px 56px 16px 24px;
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.18);
}
#divibar-49241 .divibars-content-inner,
#divibar-49241 .divibars-body,
#divibar-49241 .et_pb_section,
#divibar-49241 .et_pb_row {
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
}
#divibar-49241 .et_pb_row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto !important;
}
#divibar-49241 .et_pb_text_inner p {
  margin: 0;
  padding: 0;
}
#divibar-49241 .et_pb_button {
  background-color: #fff;
  color: #111 !important;
  border: 2px solid #111;
  border-radius: 999px;
  padding: 0.4em 1.2em !important;
  font-weight: 600;
  white-space: nowrap;
}
#divibar-49241 .divibars-close-container {
  position: absolute;
  top: 6px;
  right: 10px;
}
#divibar-49241 .divibars-close {
  background: transparent;
  border: 0;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  color: #555;
}

/* --- 8. Module layout Divi expects but isn't in our consolidated bundle --- */

/* Row clearfix (columns float left and need a clear) */
.et_pb_row::after {
  content: "";
  display: table;
  clear: both;
}

/* Team member card (used on /store/ as product cards) */
.et_pb_team_member {
  text-align: center;
  margin-bottom: 30px;
}
.et_pb_team_member_image {
  display: block;
  margin: 0 auto 18px;
  max-width: 100%;
}
.et_pb_team_member_image img {
  display: block;
  width: 100%;
  height: auto;
}
.et_pb_team_member_description {
  padding: 0 10px;
}
.et_pb_team_member h1.et_pb_module_header,
.et_pb_team_member h2.et_pb_module_header,
.et_pb_team_member h3.et_pb_module_header,
.et_pb_team_member h4,
.et_pb_team_member h5.et_pb_module_header,
.et_pb_team_member h6.et_pb_module_header {
  margin: 0 0 4px;
  padding: 0;
}
.et_pb_team_member .et_pb_member_position {
  margin: 0 0 10px;
  color: #666;
  font-size: 14px;
}

/* Blurb (used for prices, icon+text callouts) */
.et_pb_blurb {
  text-align: center;
  margin-bottom: 24px;
}
.et_pb_blurb_content {
  max-width: 550px;
  margin: 0 auto;
  position: relative;
}
.et_pb_blurb_container {
  display: block;
}
.et_pb_blurb .et_pb_main_blurb_image {
  display: block;
  text-align: center;
  margin-bottom: 14px;
}
.et_pb_blurb .et_pb_main_blurb_image .et_pb_image_wrap {
  display: inline-block;
}
.et_pb_blurb .et_pb_blurb_description p {
  margin: 0;
  padding: 0;
}
.et_pb_blurb .et_pb_module_header {
  margin: 0 0 6px;
}
.et_pb_blurb_position_top .et_pb_main_blurb_image {
  margin-bottom: 14px;
}

/* Horizontal divider */
.et_pb_divider {
  position: relative;
  display: block;
  height: 0;
  margin: 0 auto 30px;
  border-top: 1px solid #e5e5e5;
}
.et_pb_divider_internal {
  display: none;
}
.et_pb_space {
  height: 23px;
  border: 0;
  margin: 0;
}

/* Button-module wrapper (button is its own module on store cards) */
.et_pb_button_module_wrapper {
  text-align: center;
  margin-bottom: 24px;
}
.et_pb_button_module_wrapper .et_pb_button {
  display: inline-block;
}

/* Image module — center inside its column, no flow break */
.et_pb_image {
  text-align: center;
  margin-bottom: 24px;
}
.et_pb_image .et_pb_image_wrap {
  display: inline-block;
  position: relative;
}
.et_pb_image img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Code module — used for SVG icons in store; allow inline */
.et_pb_code {
  text-align: center;
  margin-bottom: 18px;
}
.et_pb_code_inner svg,
.et_pb_code_inner img {
  display: inline-block;
  max-width: 100%;
}

/* Section default spacing was already in divi.css; ensure backgrounds visible */
.et_pb_section.et_pb_with_background {
  background-size: cover;
  background-position: center;
}

/* Header-content title alignment in fullwidth headers */
.et_pb_fullwidth_header .header-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 60px 20px;
}
.et_pb_fullwidth_header .header-content-container {
  max-width: 720px;
  margin: 0 auto;
}

/* --- 9. Cart UI --- */
.khl-cart-count {
  font-weight: 600;
}
.khl-add-btn {
  border: 2px solid #111;
  background: transparent;
  color: #111 !important;
  border-radius: 999px;
  padding: 0.45em 1.4em !important;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background 200ms ease,
    color 200ms ease;
}
.khl-add-btn:hover {
  background: #111;
  color: #fff !important;
}
.khl-add-btn:disabled {
  opacity: 0.7;
  cursor: default;
}

.khl-cart {
  max-width: 920px;
  margin: 0 auto;
  text-align: left;
  font-family: "Roboto", "Helvetica", "Arial", sans-serif;
  color: #1f1f1f;
}
.khl-cart-empty {
  text-align: center;
  padding: 40px 0;
  color: #555;
  font-size: 16px;
}
.khl-cart-empty a {
  color: #1f1f1f;
  text-decoration: underline;
  font-weight: 600;
}
.khl-cart-empty a:hover {
  color: #ffb500;
}

.khl-cart-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.khl-cart-table th,
.khl-cart-table td {
  padding: 14px 14px;
  border-bottom: 1px solid #eaeaea;
  vertical-align: middle;
  color: #1f1f1f;
}
.khl-cart-table tbody tr:last-child td {
  border-bottom: 0;
}
.khl-cart-table th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
  color: #777;
  background: #fafafa;
}
.khl-cart-thumb-cell {
  width: 92px;
}
.khl-cart-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  background: #f4f4f4;
}
.khl-cart-qty {
  width: 64px;
  padding: 8px;
  border: 1px solid #d0d0d0;
  background: #fff;
  color: #1f1f1f;
  border-radius: 4px;
  font-size: 14px;
}
.khl-cart-qty:focus {
  outline: 2px solid #ffb500;
  outline-offset: -1px;
}
.khl-cart-remove {
  background: transparent;
  border: 0;
  color: #999;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 10px;
  border-radius: 4px;
}
.khl-cart-remove:hover {
  background: #fdecec;
  color: #b91c1c;
}

.khl-cart-totals {
  margin-left: auto;
  width: fit-content;
  min-width: 280px;
  padding: 16px 20px;
  background: #fff;
  border: 1px solid #eaeaea;
  border-radius: 8px;
  margin-bottom: 24px;
  color: #1f1f1f;
}
.khl-cart-totals-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 15px;
  color: #444;
}
.khl-cart-totals-grand {
  border-top: 1px solid #eaeaea;
  margin-top: 8px;
  padding-top: 12px;
  font-weight: 700;
  font-size: 18px;
  color: #111;
}

.khl-cart-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}
.khl-cart-clear {
  background: transparent;
  border: 1px solid #ccc;
  color: #555;
  padding: 0.6em 1.2em;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.khl-cart-clear:hover {
  border-color: #111;
  color: #111;
}
.khl-cart-checkout {
  background-color: #111 !important;
  border: 2px solid #111 !important;
  color: #fff !important;
  border-radius: 999px;
  padding: 0.6em 1.8em !important;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
}
.khl-cart-checkout:hover {
  background-color: #ffb500 !important;
  border-color: #ffb500 !important;
  color: #111 !important;
}
.khl-cart-notice {
  font-size: 12px;
  color: #888;
  text-align: right;
  margin: 0;
}

/* "Out of stock" emphasis on store cards */
.et_pb_blurb_description p {
  line-height: 1.4;
}
.et_pb_blurb p:only-child {
  margin: 0;
}
.et_pb_team_member.is-oos {
  opacity: 0.78;
}

/* --- 10. Blog grid (used on /articles/) --- */
/* Without salvattore JS the columns don't get wrapped — use CSS Grid directly */
.et_pb_blog_grid_wrapper {
  width: 100%;
}
.et_pb_blog_grid {
  width: 100%;
}
.et_pb_ajax_pagination_container {
  width: 100%;
}
.et_pb_salvattore_content[data-columns] {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  width: 100%;
}
@media (max-width: 980px) {
  .et_pb_salvattore_content[data-columns] {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}
@media (max-width: 640px) {
  .et_pb_salvattore_content[data-columns] {
    grid-template-columns: 1fr;
  }
}

article.et_pb_post {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 6px;
  padding: 24px 22px;
  box-shadow: 0 12px 18px -6px rgba(0, 0, 0, 0.18);
  margin: 0; /* override Divi defaults */
  transition:
    transform 200ms ease,
    box-shadow 200ms ease;
}
article.et_pb_post:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 24px -6px rgba(0, 0, 0, 0.25);
}

article.et_pb_post .entry-title {
  margin: 0 0 12px;
  padding: 0;
  font-family: "Roboto", "Helvetica", "Arial", sans-serif;
  font-size: 17px;
  line-height: 1.4em;
  font-weight: 700;
  color: #1f1f1f;
}
article.et_pb_post .entry-title a {
  color: #1f1f1f;
  text-decoration: none;
}
article.et_pb_post .entry-title a:hover {
  color: #023b6d;
}

article.et_pb_post .post-content {
  color: #555;
  font-size: 14px;
  line-height: 1.6em;
  flex: 1 1 auto;
}
article.et_pb_post .post-content-inner p {
  margin: 0 0 14px;
  padding: 0;
}
article.et_pb_post .post-meta {
  margin-top: 12px;
  font-size: 12px;
  color: #888;
}

/* "Read More" affordance — Divi's grid posts often don't have it; add via :after on title */
article.et_pb_post .entry-title a:after {
  content: " →";
  color: #023b6d;
  font-weight: 700;
  opacity: 0;
  transition: opacity 150ms ease;
}
article.et_pb_post:hover .entry-title a:after {
  opacity: 1;
}
