
/* Ship Check (Dark) */

.ship-check--dark {
    max-width: 860px;
    background: #f6f6f6;
    padding: 20px 25px;
    margin: 20px 0 15px;
}

/* Title */
.ship-check--dark .ship-check__title {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.15;
  font-weight: 800;
  color: #000;
}

/* Grid Row */
.ship-check--dark .ship-check__row {
  display: grid;
  gap: 16px;
  align-items: stretch;
}

.ship-check--dark .ship-check__row--3 {
  grid-template-columns: 1fr 1fr;
}

/* Inputs (select + input) */

.ship-check--dark .ship-check__input::placeholder {
    color: #ccc !important;
}

.ship-check--dark .ship-check__input {
    height: 39px;
    width: 100%;
    border: 2px solid rgb(0 0 0 / 16%);
    background: #ececec;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 800;
    color: #000000;
    outline: none;
}

.ship-check--dark .ship-check__input::placeholder {
  color: rgba(255, 255, 255, 0.55);
  font-weight: 800;
}

.ship-check--dark .ship-check__input:focus {
  border-color: rgba(255, 255, 255, 0.55);
}

/* Select arrow (custom) */
.ship-check--dark .ship-check__select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='20' width='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'><path d='M5 7l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;

  padding-right: 45px; /* space for arrow */
}

/* If theme is adding its own arrow via wrapper/pseudo */
.ship-check--dark .form-select::after,
.ship-check--dark .select::after,
.ship-check--dark .form-field--select::after {
  display: none !important;
}

/* Button */


.ship-check--dark .ship-check__btn {
    height: 45px;
    width: 100%;
    border: 0;
    background: #0e7dc2;
    color: #ffffff;
    border-radius: 0;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0.06em;
    cursor: pointer;
    grid-column: 1 / -1;
    font-family: "erbaum";
}
/* Message */
.ship-check--dark .ship-check__msg {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
}

.ship-check--dark .ship-check__msg.is-error {
    color: #ff0000;
}

.ship-check--dark .ship-check__msg.is-ok {
  color: rgb(66 147 72 / 90%);
}

/* Mobile */
@media (max-width: 640px) {
  .ship-check--dark {
    padding: 16px 16px;
    margin: 22px 0 12px;
  }
  .autoparts .quantity-and-cart-btn-wrapper {
    grid-template-columns: 120px 1fr;
}

  .ship-check--dark .ship-check__row--3 {
    grid-template-columns: 1fr;
    gap: 12px;
  }


.ship-check--dark .ship-check__title {
    margin: 0 0 16px;
    font-size: 15px;
    line-height: 1.15;
    font-weight: 800;
    color: #000000;
}

  .ship-check--dark .ship-check__input {
    height: 40px;
    font-size: 11px;
    padding: 0 11px;
    border-radius: 0;
  }

  .ship-check--dark .ship-check__btn {
    height: 35px;
    font-size: 13px;
    letter-spacing: 0.05em;
  }

  .ship-check--dark .ship-check__msg {
    font-size: 9px;
    margin-top: 12px;
  }
}

/* Downloadable Documents (custom field: download_pdf) */
.download-pdf {
  text-align: center;
  margin: 40px auto;
}

.download-pdf-heading {
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.download-pdf-link {
  display: inline-block;
  padding: 14px 60px;
  border: 2px solid #0E7DC2;
  background: transparent;
  color: #0E7DC2;
  text-transform: uppercase;
  font-weight: 400;
  letter-spacing: 0.5px;
  text-decoration: none;
}

.download-pdf-link:hover,
.download-pdf-link:focus {
  background: #0E7DC2;
  color: #fff;
}

/* ============================================================
   Product page only: un-fix the site header & nav.
   Because the product page now has its own sticky bar (top desktop /
   bottom mobile), keeping the header fixed too would double-stack.
   Scoped via body.is-product-page (added in templates/layout/base.html)
   so other pages keep their fixed header untouched.
   ============================================================ */
body.is-product-page .header {
  position: static !important;
  top: auto !important;
}

body.is-product-page .s48meganav-layout {
  position: absolute !important;
  top: auto !important;
}

/* The theme's JS injects an inline padding-top on <body> to clear the fixed
   header. Since header is now static on product page, that padding leaves
   empty space at the top — force it back to 0. !important is required to
   beat the inline style. */
body.is-product-page {
  padding-top: 0 !important;
}

/* ============================================================
   Sticky Product Bar
   - Desktop: fixed at top, full row with tabs underneath
   - Mobile : fixed at bottom, only the CTA button
   - Shown when main Final-Price + ATC wrapper scrolls out of view
   ============================================================ */
.sticky-product-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transform: translateY(-100%);
  transition: transform 0.25s ease;
  pointer-events: none;
  visibility: hidden;
}

.sticky-product-bar.is-active {
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
}

.sticky-product-bar__row {
  padding: 10px 0;
}

.sticky-product-bar__row-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sticky-product-bar__image {
  flex: 0 0 auto;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.sticky-product-bar__image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.sticky-product-bar__info {
  flex: 1 1 auto;
  min-width: 0;
}

.sticky-product-bar__title {
  font-weight: 700;
  font-size: 17px;
  text-transform: uppercase;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #1a1a1a;
}

.sticky-product-bar__item {
  font-size: 12px;
  color: #666;
  margin-top: 2px;
}

.sticky-product-bar__rating {
  margin-top: 4px;
}

.sticky-product-bar__rating:empty {
  display: none;
}

/* Shrink the reviews.io snippet inside the sticky bar (stars + count) */
.sticky-product-bar__rating .ruk_rating_snippet {
  font-size: 14px;
  line-height: 1;
}

.sticky-product-bar__rating .ruk-rating-snippet-count {
  font-size: 11px;
  margin-left: 4px;
}

.sticky-product-bar__price {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sticky-product-bar__price-cut {
  text-decoration: line-through;
  color: #999;
  font-size: 14px;
}

.sticky-product-bar__price-main {
  font-weight: 700;
  font-size: 18px;
  white-space: nowrap;
  color: #1a1a1a;
}

.sticky-product-bar__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sticky-product-bar__btn {
  margin: 0;
  white-space: nowrap;
  padding: 12px 28px;
}

.sticky-product-bar__back {
  background: transparent;
  border: 1px solid #d0d0d0;
  color: #333;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.sticky-product-bar__back:hover {
  background: #f5f5f5;
}

.sticky-product-bar__tabs {
  background: #ededed;
}

.sticky-product-bar__tabs-nav {
  display: flex;
  gap: 0;
  overflow-x: auto;
}

/* Variant options expandable panel (Choose Options click) */
.sticky-product-bar__panel {
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  /* overflow: visible so the dropdown list can extend below the panel
     without being clipped. Opacity:0 hides content during the open/close
     transition, so the lack of clipping doesn't cause visual glitches. */
  overflow: visible;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.2s ease;
  /* Stack panel above the gray tabs strip (which is later in DOM) so the
     dropdown list inside the panel renders on top of the tabs. */
  position: relative;
  z-index: 5;
}

.sticky-product-bar__panel.is-open {
  max-height: 600px;
  opacity: 1;
}

.sticky-product-bar__panel-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
}

.sticky-product-bar__panel-content {
  flex: 1 1 auto;
  min-width: 0;
}

.sticky-product-bar__panel-content .productView-options-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  border-bottom: 0 !important;
  align-items: flex-end;
  margin: 0;
}

/* Make variant dropdowns wider inside the sticky panel */
.sticky-product-bar__panel-content .form-field {
  flex: 1 1 360px;
  min-width: 280px;
  margin: 0;
}

.sticky-product-bar__panel-content .form-select,
.sticky-product-bar__panel-content .form-input {
  width: 100%;
  min-width: 0;
}

.sticky-product-bar__panel-close {
  flex: 0 0 auto;
  background: transparent;
  border: 1px solid #d0d0d0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.sticky-product-bar__panel-close:hover {
  background: #f5f5f5;
  color: #000;
}

/* Custom dropdown (replaces native <select> inside the panel) */
.sticky-dropdown {
  position: relative;
  width: 100%;
}

.sticky-dropdown__native {
  display: none !important;
}

.sticky-dropdown__button {
  width: 100%;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid #d0d0d0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  text-align: left;
  color: #1a1a1a;
  line-height: 1.4;
}

.sticky-dropdown__button:focus {
  outline: 2px solid #0E7DC2;
  outline-offset: -1px;
}

.sticky-dropdown__label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sticky-dropdown__arrow {
  flex: 0 0 auto;
  font-size: 14px;
  transition: transform 0.15s ease;
}

.sticky-dropdown.is-open .sticky-dropdown__arrow {
  transform: rotate(180deg);
}

.sticky-dropdown__list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background: #fff;
  border: 1px solid #d0d0d0;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  max-height: 260px;
  overflow-y: auto;
  z-index: 100;
  display: none;
}

.sticky-dropdown.is-open .sticky-dropdown__list {
  display: block;
}

.sticky-dropdown__option {
  padding: 10px 16px;
  cursor: pointer;
  font-size: 15px;
  color: #1a1a1a;
}

.sticky-dropdown__option:hover {
  background: #f5f5f5;
}

.sticky-dropdown__option.is-selected {
  background: #0E7DC2;
  color: #fff;
}

.sticky-dropdown__option.is-disabled {
  color: #aaa;
  cursor: not-allowed;
  background: transparent;
}

.sticky-product-bar__tab {
  padding: 14px 24px;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #333;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.sticky-product-bar__tab:hover,
.sticky-product-bar__tab:focus {
  border-bottom-color: #0E7DC2;
  color: #000;
}

/* MOBILE — only the CTA button, fixed at bottom */
@media (max-width: 800px) {
  .sticky-product-bar {
    top: auto;
    bottom: 0;
    transform: translateY(100%);
    border-top: 1px solid #e5e5e5;
    border-bottom: none;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
  }

  .sticky-product-bar.is-active {
    transform: translateY(0);
  }

  .sticky-product-bar__row {
    padding: 0;
  }

  .sticky-product-bar__row-inner {
    gap: 0;
    padding: 0;
  }

  .sticky-product-bar__image,
  .sticky-product-bar__info,
  .sticky-product-bar__price,
  .sticky-product-bar__back,
  .sticky-product-bar__tabs {
    display: none;
  }

  /* Mobile: button at bottom, panel slides up above it */
  .sticky-product-bar {
    display: flex;
    flex-direction: column-reverse;
  }

  /* Panel grows to content; X can overflow above without being clipped */
  .sticky-product-bar__panel {
    overflow: visible;
  }

  .sticky-product-bar__panel.is-open {
    max-height: 70vh;
  }

  .sticky-product-bar__panel-inner {
    display: block;
    padding: 24px 16px 16px;
  }

  .sticky-product-bar__panel-content {
    width: 100%;
  }

  /* Stack form fields vertically on mobile, full width */
  .sticky-product-bar__panel-content .productView-options-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    width: 100%;
  }

  .sticky-product-bar__panel-content .form-field {
    flex: 1 1 100%;
    min-width: 0;
    width: 100%;
    margin: 0;
  }

  /* X close button: top-right, half above the panel (overlapping) */
  .sticky-product-bar__panel-close {
    position: absolute;
    top: -18px;
    right: 14px;
    z-index: 2;
    width: 36px;
    height: 36px;
    background: #fff;
    border: 1px solid #d0d0d0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  }

  /* Sticky bar sits at viewport bottom on mobile, so dropdown opens UPWARD
     (drop-up) — otherwise the options list would render below the field,
     under the CTA button / off-screen and get clipped. */
  .sticky-dropdown__list {
    top: auto;
    bottom: calc(100% + 4px);
  }

  .sticky-dropdown.is-open .sticky-dropdown__arrow {
    /* arrow flips up to match drop-up direction */
    transform: rotate(180deg);
  }

  .sticky-product-bar__actions {
    width: 100%;
    padding: 0;
    gap: 0;
  }

  .sticky-product-bar__btn {
    width: 100%;
    border-radius: 0;
    padding: 18px;
    font-size: 16px;
  }
}
