body.single-product .ibcpp,
body.single-product .ibcpp * {
  box-sizing: border-box;
}
body.single-product .ibcpp {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.ibcpp-top {
  display: flex;
  align-items: flex-start;
  gap: 56px;
  width: 100%;
}
.ibcpp-gallery {
  flex: 1 1 58%;
  min-width: 0;
}
.ibcpp-summary {
  flex: 1 1 42%;
  min-width: 0;
  padding-top: 6px;
}
.ibcpp-main-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1/1;
  background: #f7f8f8;
  overflow: hidden;
}
.ibcpp-main-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.ibcpp-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 52px;
  height: 52px;
  border: 1px solid #111;
  border-radius: 50%;
  background: #fff;
  color: #111;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}
.ibcpp-prev {
  left: 18px;
}
.ibcpp-next {
  right: 18px;
}
.ibcpp-arrow:disabled {
  opacity: 0.3;
  cursor: default;
}
.ibcpp-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}
.ibcpp-thumb {
  flex: 0 0 112px;
  height: 112px;
  padding: 0;
  border: 1px solid transparent;
  background: #f7f8f8;
  cursor: pointer;
}
.ibcpp-thumb.is-active {
  border-color: #111;
}
.ibcpp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.ibcpp-title {
  margin: 0 0 12px;
  font-size: 34px;
  font-weight: 400;
  line-height: 1.15;
}
.ibcpp-price {
  padding-bottom: 22px;
  border-bottom: 1px solid #e5e5e5;
  font-size: 25px;
}
.ibcpp-price ins {
  text-decoration: none;
}
.ibcpp-price del {
  opacity: 0.45;
}
.ibcpp-short {
  margin-top: 22px;
  color: #777;
  font-size: 16px;
  line-height: 1.65;
}
.ibcpp-vars {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e5e5e5;
}
.ibcpp-var-group + .ibcpp-var-group {
  margin-top: 22px;
}
.ibcpp-label {
  margin-bottom: 12px;
  color: #777;
}
.ibcpp-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.ibcpp-color {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 9px 5px 5px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}
.ibcpp-color.is-selected {
  border-color: #111;
}
.ibcpp-color-dot {
  display: block;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 50%;
}
.ibcpp-color-name {
  font-size: 14px;
}
.ibcpp-attr-select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #ddd;
  background: #fff;
}
.ibcpp-stock {
  margin-top: 16px;
}
.ibcpp-stock .stock {
  margin: 0;
}
.ibcpp-buy-row {
  display: flex;
  gap: 12px;
  width: 100%;
  margin-top: 24px;
}
.ibcpp-qty-wrap {
  display: flex;
  flex: 0 0 150px;
  height: 58px;
  border: 1px solid #ddd;
}
.ibcpp-qty-wrap button {
  flex: 0 0 48px;
  border: 0;
  background: #fff;
  font-size: 20px;
  cursor: pointer;
}
.ibcpp-qty {
  flex: 1 1 auto;
  min-width: 0;
  width: 40px;
  border: 0;
  text-align: center;
}
.ibcpp-cart {
  flex: 1 1 auto;
  min-height: 58px;
  padding: 0 20px;
  border: 1px solid #000;
  background: #000;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}
.ibcpp-cart:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.ibcpp-meta {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid #e5e5e5;
  color: #777;
  font-size: 14px;
  line-height: 1.8;
}
.ibcpp-meta b {
  color: #111;
}
.ibcpp-desc,
.ibcpp-other {
  margin-top: 64px;
  padding-top: 34px;
  border-top: 1px solid #e5e5e5;
}
.ibcpp-desc h2,
.ibcpp-other h2 {
  margin: 0 0 24px;
  font-size: 28px;
  font-weight: 400;
}
.ibcpp-desc > div {
  max-width: 900px;
  color: #666;
  line-height: 1.75;
  margin:auto;
}
.ibcpp-other-row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  width: 100%;
}
.ibcpp-card {
  flex: 1 1 0;
  min-width: 0;
}
.ibcpp-card-img {
  display: block;
  width: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
  background: #f7f8f8;
}
.ibcpp-card-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: 0 !important;
  border-radius: 0 !important;
}
.ibcpp-card h3 {
  margin: 12px 0 5px;
  font-size: 17px;
  font-weight: 400;
}
.ibcpp-card h3 a {
  color: inherit;
  text-decoration: none;
}
.ibcpp-card-price {
  font-size: 15px;
}
@media (max-width: 991px) {
  .ibcpp-top {
    flex-direction: column;
    gap: 34px;
  }
  .ibcpp-gallery,
  .ibcpp-summary {
    flex: 0 0 100%;
    width: 100%;
  }
}
@media (max-width: 767px) {
  body.single-product .ibcpp {
    max-width: 100%;
    padding: 18px 15px 68px;
    overflow-x: hidden;
  }
  .ibcpp-top {
    gap: 28px;
  }
  .ibcpp-arrow {
    width: 42px;
    height: 42px;
  }
  .ibcpp-prev {
    left: 12px;
  }
  .ibcpp-next {
    right: 12px;
  }
  .ibcpp-thumbs {
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
  }
  .ibcpp-thumb {
    flex: 0 0 82px;
    height: 82px;
  }
  .ibcpp-title {
    font-size: 26px;
  }
  .ibcpp-price {
    font-size: 22px;
  }
  .ibcpp-buy-row {
    flex-wrap: wrap;
  }
  .ibcpp-qty-wrap {
    flex: 0 0 108px;
    height: 54px;
  }
  .ibcpp-qty-wrap button {
    flex-basis: 34px;
  }
  .ibcpp-cart {
    min-height: 54px;
  }
  .ibcpp-desc,
  .ibcpp-other {
    margin-top: 42px;
    padding-top: 26px;
  }
  .ibcpp-desc h2,
  .ibcpp-other h2 {
    font-size: 24px;
  }
  .ibcpp-other-row {
    gap: 10px;
  }
  .ibcpp-card {
    flex: 0 0 calc((100% - 20px) / 3);
    max-width: calc((100% - 20px) / 3);
  }
  .ibcpp-card h3 {
    font-size: 13px;
    line-height: 1.25;
  }
  .ibcpp-card-price {
    font-size: 12px;
  }
  .ibcpp-color-name {
    display: none;
  }
  .ibcpp-color {
    padding: 4px;
    border-radius: 50%;
  }
  .ibcpp-color-dot {
    width: 28px;
    height: 28px;
  }
}

/* Product detail page: footer must not be sticky */
body.single-product footer,
body.single-product #bwp-footer,
body.single-product .site-footer {
  position: static !important;
  bottom: auto !important;
  z-index: auto !important;
}

/* =========================================================
   v1.0.2 - Variation + purchase-row alignment
========================================================= */

.ibcpp-var-group.is-color {
  width: 100%;
}

.ibcpp-colors {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 42px;
}

.ibcpp-color {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  gap: 8px;
  height: 42px;
  justify-content: center;
  line-height: 1;
  margin: 0;
  min-width: 0;
  padding: 6px 10px 6px 6px;
  vertical-align: middle;
}

.ibcpp-color.is-selected {
  border-color: #111;
}

.ibcpp-color-dot {
  flex: 0 0 28px;
  height: 28px;
  width: 28px;
}

.ibcpp-color-name {
  align-items: center;
  display: inline-flex;
  height: 28px;
  line-height: 1;
  margin: 0;
}

.ibcpp-buy-row {
  align-items: stretch;
  display: flex;
  gap: 16px;
  margin-top: 28px;
  width: 100%;
}

.ibcpp-qty-wrap {
  align-items: stretch;
  display: flex;
  flex: 0 0 188px;
  height: 72px;
  margin: 0;
}

.ibcpp-qty-wrap button,
.ibcpp-qty {
  height: 100%;
  margin: 0;
}

.ibcpp-qty-wrap button {
  align-items: center;
  display: flex;
  flex: 0 0 62px;
  justify-content: center;
  line-height: 1;
  padding: 0;
}

.ibcpp-qty {
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;
  flex: 1 1 auto;
  font-size: 16px;
  line-height: 72px;
  padding: 0;
}

.ibcpp-cart {
  align-items: center;
  display: flex;
  height: 72px;
  justify-content: center;
  line-height: 1;
  margin: 0;
  min-height: 72px;
  padding: 0 24px;
}

.price {
  font-size: 24px;
}

/* Product detail page footer remains non-sticky */
body.single-product footer,
body.single-product #bwp-footer,
body.single-product .site-footer {
  bottom: auto !important;
  position: static !important;
  z-index: auto !important;
}

@media (max-width: 767px) {
  .ibcpp-colors {
    gap: 10px;
  }

  .ibcpp-color {
    height: 40px;
    padding: 5px 9px 5px 5px;
  }

  .ibcpp-color-dot {
    flex-basis: 28px;
    height: 28px;
    width: 28px;
  }

  .ibcpp-color-name {
    display: inline-flex;
    height: 28px;
  }

  .ibcpp-buy-row {
    gap: 10px;
    margin-top: 24px;
  }

  .ibcpp-qty-wrap {
    flex: 0 0 118px;
    height: 54px;
  }

  .ibcpp-qty-wrap button {
    flex-basis: 38px;
  }

  .ibcpp-qty {
    font-size: 15px;
    line-height: 54px;
  }

  .ibcpp-cart {
    height: 54px;
    min-height: 54px;
    padding: 0 14px;
  }
}

/* =========================================================
   v1.0.3 - Other Products layout
========================================================= */

.ibcpp-other h2 {
  text-align: center;
}

.ibcpp-other-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.ibcpp-card {
  flex: 0 0 calc((100% - 60px) / 4);
  max-width: calc((100% - 60px) / 4);
  min-width: 0;
  width: calc((100% - 60px) / 4);
}

/* Keep the existing 3-across mobile layout */
@media (max-width: 767px) {
  .ibcpp-other-row {
    gap: 10px;
    justify-content: center;
  }

  .ibcpp-card {
    flex: 0 0 calc((100% - 20px) / 3);
    max-width: calc((100% - 20px) / 3);
    width: calc((100% - 20px) / 3);
  }
}

/* =========================================================
   v1.0.4 - Desktop gallery layout + vector arrows
========================================================= */

/* Gallery becomes: vertical thumbnails on the left, main image on the right */
.ibcpp-gallery {
  align-items: flex-start;
  display: flex;
  flex: 1 1 58%;
  gap: 14px;
  min-width: 0;
}

.ibcpp-main-wrap {
  flex: 1 1 auto;
  min-width: 0;
  order: 2;
}

.ibcpp-thumbs {
  display: flex;
  flex: 0 0 112px;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 12px;
  margin-top: 0;
  max-height: 100%;
  order: 1;
  overflow-x: hidden;
  overflow-y: auto;
  width: 112px;
}

.ibcpp-thumb {
  flex: 0 0 112px;
  height: 112px;
  width: 112px;
}

/* Proper vector arrows, no text characters */
.ibcpp-arrow {
  align-items: center;
  display: flex;
  justify-content: center;
  padding: 0;
}

.ibcpp-arrow svg {
  display: block;
  height: 22px;
  width: 22px;
}

.ibcpp-arrow svg path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

/* Mobile stays practical: main image first, thumbnails below in a row */
@media (max-width: 767px) {
  .ibcpp-gallery {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .ibcpp-main-wrap {
    order: 1;
    width: 100%;
  }

  .ibcpp-thumbs {
    flex: none;
    flex-direction: row;
    gap: 8px;
    margin-top: 0;
    max-height: none;
    max-width: 100%;
    order: 2;
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  .ibcpp-thumb {
    flex: 0 0 82px;
    height: 82px;
    width: 82px;
  }

  .ibcpp-arrow svg {
    height: 20px;
    width: 20px;
  }
}
