/*
 Theme Name: CosmicPlus Child
 Template: cosmicplus
 Version: 1.0
*/
.quantity {
  display: inline-flex;
  align-items: center;
  border: 1px solid #3b82f6;
  border-radius: 999px;
  overflow: hidden;
}

.quantity input.qty {
  width: 48px;
  text-align: center;
  border: none;
}

.single_add_to_cart_button {
  margin-left: 16px;
  padding: 10px 28px;
  border-radius: 999px;
}

/* ========== content-product.php ========== */
.woocommerce ul.products {
  display: flex !important;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 50px;
  margin: 0;
}
.woocommerce ul.products::before {
  content: none;
  display: none;
}

@media (max-width: 1100px) {
  .woocommerce ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .woocommerce ul.products {
    grid-template-columns: 1fr;
  }
}

/* Remove default list styling */

.woocommerce ul.products li.product {
  padding: 0;
  margin: 0;
  background: none;
  border: none;
  max-width: 250px;
  width: 100%;
}

.wishlist-page__no-records {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
}

.wishlist-page__no-records-text {
  margin: 0;
  font-size: 32px;
}

.wishlist-page__empty-icon {
  max-width: 470px;
  max-height: 470px;
  height: 100%;
  width: 100%;
}

body.cp-wishlist-empty .wishlist-page__title {
  display: none;
}

/* ========== single product gallery ========== */
body.single-product,
.custom-single-product {
  max-width: 100%;
  overflow-x: hidden;
}

.custom-single-product .product-gallery-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

.custom-single-product .product-gallery-wrapper .woocommerce-product-gallery {
  --cp-gallery-thumb-size: 104px;
  --cp-gallery-thumb-row-height: 153px;

  position: relative;
  width: 100% !important;
  max-width: 620px !important;
  float: none !important;
  margin: 0 auto !important;
}

.custom-single-product .product-gallery-wrapper .flex-viewport {
  width: 100%;
  max-width: 620px;
  height: auto !important;
  aspect-ratio: 1 / 1;
  margin: 0 0 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e7e7e7;
  border-radius: 8px;
  box-shadow: none;
}

.custom-single-product
  .product-gallery-wrapper
  .woocommerce-product-gallery__wrapper {
  height: 100%;
  max-height: 100%;
  margin: 0;
  background: #fff;
  border: 0;
  box-shadow: none;
}

.custom-single-product
  .product-gallery-wrapper
  .woocommerce-product-gallery__image {
  height: 100%;
  max-height: 100%;
  margin: 0;
  background: #fff;
}

.custom-single-product
  .product-gallery-wrapper
  .woocommerce-product-gallery__image
  > a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  min-height: 320px;
  box-sizing: border-box;
  margin: 0;
  padding: 18px;
}

.custom-single-product
  .product-gallery-wrapper
  .woocommerce-product-gallery__image
  img:not(.zoomImg) {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: 100%;
  object-fit: contain !important;
  object-position: center center;
}

.custom-single-product .product-gallery-wrapper .zoomImg {
  max-width: none !important;
  max-height: none !important;
}

.custom-single-product
  .product-gallery-wrapper
  .woocommerce-product-gallery__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  right: 12px;
  top: 12px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  z-index: 4;
}

.custom-single-product .product-gallery-wrapper .cp-gallery-stage-btn,
.custom-single-product
  .product-gallery-wrapper
  .cp-gallery-thumbs-carousel__btn {
  appearance: none;
  border: 1px solid #e7e7e7;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #412474;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.custom-single-product .product-gallery-wrapper .cp-gallery-stage-btn:hover,
.custom-single-product
  .product-gallery-wrapper
  .cp-gallery-thumbs-carousel__btn:hover {
  border-color: #412474;
  box-shadow: 0 10px 22px rgba(65, 36, 116, 0.18);
}

.custom-single-product .product-gallery-wrapper .cp-gallery-stage-btn {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 42px;
  height: 42px;
  transform: translateY(-50%);
}

.custom-single-product .product-gallery-wrapper .cp-gallery-stage-btn--prev {
  left: 12px;
}

.custom-single-product .product-gallery-wrapper .cp-gallery-stage-btn--next {
  right: 12px;
}

.custom-single-product .product-gallery-wrapper .cp-gallery-stage-btn span,
.custom-single-product
  .product-gallery-wrapper
  .cp-gallery-thumbs-carousel__btn
  span {
  display: block;
  font-size: 24px;
  line-height: 1;
  transform: translateY(-1px);
}

.custom-single-product .product-gallery-wrapper .cp-gallery-thumbs-carousel {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: var(--cp-gallery-thumb-row-height);
  box-sizing: border-box;
  margin-top: 14px;
  padding: 0 44px;
}

.custom-single-product
  .product-gallery-wrapper
  .cp-gallery-thumbs-carousel__viewport {
  width: 100%;
  height: var(--cp-gallery-thumb-row-height);
  box-sizing: border-box;
  overflow: hidden;
}

.custom-single-product
  .product-gallery-wrapper
  .cp-gallery-thumbs-carousel__btn {
  position: absolute;
  top: 41%;
  z-index: 2;
  width: 34px;
  height: 34px;
  transform: translateY(-50%);
}

.custom-single-product
  .product-gallery-wrapper
  .cp-gallery-thumbs-carousel__btn--prev {
  left: 0;
}

.custom-single-product
  .product-gallery-wrapper
  .cp-gallery-thumbs-carousel__btn--next {
  right: 0;
}

.custom-single-product .product-gallery-wrapper .flex-control-thumbs {
  display: flex !important;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: var(--cp-gallery-thumb-row-height);
  box-sizing: border-box;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  border: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.custom-single-product
  .product-gallery-wrapper
  .flex-control-thumbs::-webkit-scrollbar {
  display: none;
}

.custom-single-product .product-gallery-wrapper .flex-control-thumbs li {
  flex: 0 0 var(--cp-gallery-thumb-size);
  width: var(--cp-gallery-thumb-size) !important;
  height: var(--cp-gallery-thumb-size);
  box-sizing: border-box;
  float: none !important;
  margin: 0 !important;
  padding: 0;
  border: 0;
}

.custom-single-product .product-gallery-wrapper .flex-control-thumbs::before,
.custom-single-product .product-gallery-wrapper .flex-control-thumbs::after {
  content: none;
}

.custom-single-product .product-gallery-wrapper .flex-control-thumbs img {
  display: block;
  width: var(--cp-gallery-thumb-size) !important;
  height: var(--cp-gallery-thumb-size) !important;
  padding: 7px;
  box-sizing: border-box;
  object-fit: contain;
  object-position: center center;
  background: #fff;
  border: 1px solid #e7e7e7;
  border-radius: 8px;
  opacity: 0.72;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    opacity 0.2s ease,
    transform 0.2s ease;
}

.custom-single-product .product-gallery-wrapper .flex-control-thumbs img:hover,
.custom-single-product
  .product-gallery-wrapper
  .flex-control-thumbs
  img.flex-active,
.custom-single-product
  .product-gallery-wrapper
  .flex-control-thumbs
  img[aria-current="true"] {
  border-color: #412474;
  opacity: 1;
}

.custom-single-product .product-gallery-wrapper .cp-thumbs-carousel {
  display: none !important;
}

@media (max-width: 575px) {
  .custom-single-product .product-gallery-wrapper .woocommerce-product-gallery {
    --cp-gallery-thumb-size: 78px;
    --cp-gallery-thumb-row-height: 108px;
  }

  .custom-single-product
    .product-gallery-wrapper
    .woocommerce-product-gallery__image
    > a {
    min-height: 260px;
    padding: 12px;
  }

  .custom-single-product .product-gallery-wrapper .cp-gallery-stage-btn {
    width: 36px;
    height: 36px;
  }

  .custom-single-product .product-gallery-wrapper .cp-gallery-stage-btn--prev {
    left: 8px;
  }

  .custom-single-product .product-gallery-wrapper .cp-gallery-stage-btn--next {
    right: 8px;
  }

  .custom-single-product .product-gallery-wrapper .cp-gallery-thumbs-carousel {
    padding: 0 38px;
  }

  .custom-single-product
    .product-gallery-wrapper
    .cp-gallery-thumbs-carousel__btn {
    width: 30px;
    height: 30px;
  }

  .custom-single-product .product-gallery-wrapper .flex-control-thumbs {
    gap: 8px;
  }

  .custom-single-product .product-gallery-wrapper .flex-control-thumbs li {
    flex-basis: var(--cp-gallery-thumb-size);
    width: var(--cp-gallery-thumb-size) !important;
  }

  .custom-single-product .product-gallery-wrapper .flex-control-thumbs img {
    width: var(--cp-gallery-thumb-size) !important;
    height: var(--cp-gallery-thumb-size) !important;
    padding: 6px;
  }
}

/* WooCommerce fullscreen gallery */
#photoswipe-fullscreen-dialog,
.pswp {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  max-width: none !important;
  height: 100vh !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: #000 !important;
  z-index: 2147483000 !important;
  overflow: hidden !important;
}

#photoswipe-fullscreen-dialog::backdrop {
  background: #000 !important;
}

#photoswipe-fullscreen-dialog .pswp,
#photoswipe-fullscreen-dialog .pswp__scroll-wrap,
.pswp .pswp__scroll-wrap {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

#photoswipe-fullscreen-dialog .pswp__bg,
.pswp .pswp__bg {
  background: #000 !important;
  opacity: 1 !important;
}

#photoswipe-fullscreen-dialog .pswp__container,
#photoswipe-fullscreen-dialog .pswp__zoom-wrap,
.pswp .pswp__container,
.pswp .pswp__zoom-wrap {
  backface-visibility: hidden;
}

#photoswipe-fullscreen-dialog .pswp__img,
.pswp .pswp__img {
  background: #fff;
}
