.jbx-product-gallery,
.jbx-product-purchase,
.jbx-top-banner {
  --jbx-ink: #141719;
  --jbx-muted: #60676b;
  --jbx-line: #d9dcde;
  --jbx-soft: #f3f5f5;
  --jbx-accent: #ce4615;
  color: var(--jbx-ink);
  font-family: "Archivo", sans-serif;
}

.jbx-widget-empty {
  padding: 16px;
  border: 1px solid #e2e5e6;
  color: #60676b;
  font-family: "Archivo", sans-serif;
}

/* Product gallery */
.jbx-product-gallery {
  width: 100%;
}

.jbx-gallery-stage-wrap {
  position: relative;
  overflow: hidden;
  background: #f7f8f8;
}

.jbx-gallery-stage,
.jbx-gallery-image {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.jbx-gallery-stage {
  aspect-ratio: 4 / 5;
}

.jbx-gallery-stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.jbx-gallery-zoom-hint {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 7px 10px;
  background: rgba(20, 23, 25, .78);
  color: #fff;
  font-size: .7rem;
  letter-spacing: .04em;
  pointer-events: none;
}

.jbx-gallery-thumbnails {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.jbx-gallery-thumb {
  aspect-ratio: 1;
  padding: 3px;
  border: 1px solid var(--jbx-line);
  background: #fff;
  cursor: pointer;
  opacity: .72;
  transition: border-color .2s ease, opacity .2s ease;
}

.jbx-gallery-thumb:hover,
.jbx-gallery-thumb.is-active {
  border-color: var(--jbx-ink);
  opacity: 1;
}

.jbx-gallery-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jbx-gallery-lightbox[hidden] {
  display: none;
}

.jbx-gallery-lightbox {
  position: fixed;
  z-index: 99999;
  inset: 0;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  align-items: center;
  justify-items: center;
  padding: 40px;
  background: rgba(14, 17, 18, .94);
}

.jbx-lightbox-figure {
  display: grid;
  width: min(100%, 1000px);
  height: min(100%, 850px);
  margin: 0;
  place-items: center;
}

.jbx-lightbox-figure img {
  display: block;
  max-width: 100%;
  max-height: calc(100% - 32px);
  object-fit: contain;
}

.jbx-lightbox-figure figcaption {
  max-width: 100%;
  margin-top: 12px;
  color: #fff;
  font-size: .8rem;
  text-align: center;
}

.jbx-lightbox-close,
.jbx-lightbox-arrow {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .45);
  background: transparent;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

.jbx-lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 1.8rem;
}

/* Product purchase panel */
.jbx-product-purchase .cart {
  display: grid;
  gap: 16px;
}

.jbx-stock {
  color: var(--jbx-muted);
  font-size: .8rem;
}

.jbx-stock__label {
  margin-bottom: 7px;
}

.jbx-stock__track {
  width: min(100%, 280px);
  height: 4px;
  overflow: hidden;
  background: #e4e7e8;
}

.jbx-stock__track span {
  display: block;
  height: 100%;
  background: var(--jbx-accent);
}

.jbx-stock--out {
  color: #a92d20;
}

.jbx-stock--available {
  color: #3d684e;
}

.jbx-pay-on-delivery {
  display: grid;
  gap: 4px;
  padding: 13px 15px;
  border-left: 3px solid var(--jbx-accent);
  background: var(--jbx-soft);
  color: var(--jbx-muted);
  font-size: .8rem;
  line-height: 1.45;
}

.jbx-pay-on-delivery strong {
  color: var(--jbx-ink);
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.jbx-delivery-costs-hint,
.jbx-delivery-costs-fallback {
  margin: 7px 0 0;
  color: var(--jbx-muted);
  font-size: .76rem;
  line-height: 1.4;
}

.jbx-delivery-costs-hint::before,
.jbx-delivery-costs-fallback::before {
  content: "\2193";
  margin-right: 6px;
  color: var(--jbx-accent);
  font-weight: 700;
}

.jbx-product-purchase .quantity {
  display: flex;
  align-items: center;
  gap: 10px;
}

.jbx-product-purchase .single_add_to_cart_button {
  min-height: 48px;
  width: 100%;
  border: 1px solid var(--jbx-ink);
  background: var(--jbx-ink);
  color: #fff;
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}

.jbx-product-purchase .single_add_to_cart_button:hover {
  background: var(--jbx-accent);
  border-color: var(--jbx-accent);
}

.jbx-product-purchase .wapf-field-container {
  margin-bottom: 17px;
}

.jbx-product-purchase .wapf-field-label {
  display: block;
  margin-bottom: 7px;
  color: var(--jbx-ink);
  font-weight: 700;
}

.jbx-product-purchase .wapf-input {
  max-width: 100%;
}

/* Responsive top banner: keeps the message readable instead of clipping it. */
.jbx-top-banner {
  width: 100%;
  overflow: hidden;
  background: var(--jbx-ink);
  color: #fff;
}

.jbx-top-banner__inner {
  display: flex;
  width: min(100% - 48px, 1440px);
  min-height: 38px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 0;
  font-size: .75rem;
  line-height: 1.35;
}

.jbx-top-banner__message,
.jbx-top-banner__detail,
.jbx-top-banner__phone {
  min-width: 0;
}

.jbx-top-banner__message {
  font-weight: 700;
}

.jbx-top-banner__detail {
  color: #d9ddde;
  text-align: center;
}

.jbx-top-banner__phone {
  flex: 0 0 auto;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 767px) {
  .jbx-gallery-lightbox {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    padding: 54px 12px 24px;
  }

  .jbx-lightbox-arrow {
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
  }

  .jbx-top-banner__inner {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    padding: 8px 16px;
  }

  .jbx-top-banner__message {
    white-space: normal;
  }

  .jbx-top-banner__detail {
    grid-column: 1 / -1;
    max-width: 100%;
    text-align: left;
  }

  .jbx-top-banner__phone {
    align-self: center;
    white-space: nowrap;
  }
}
