/* Consistent image frames across cards. Product artwork stays complete;
   editorial imagery fills its frame without stretching. */

/* Archived storefront homepage: the source category artwork is 4:3. */
.fp26-home .fp26-category__media {
  aspect-ratio: 4 / 3;
  background: #eef4f8;
}

/* Product gallery: let the main artwork define the stage height.  The theme's
 * square stage stretched portrait artwork and exposed its black navigation
 * controls while Slick was moving between slides. */
body.fp-refreshed.single-product #content .product-images-content,
body.fp-refreshed.single-product #content .product-images-content figure.woocommerce-product-gallery__wrapper,
body.fp-refreshed.single-product #content .product-images-content .slick-list,
body.fp-refreshed.single-product #content .product-images-content .slick-track,
body.fp-refreshed.single-product #content .product-images-content .slick-slide,
body.fp-refreshed.single-product #content .product-images-content .slick-slide > div,
body.fp-refreshed.single-product #content .product-images-content .zadora-gallery-image,
body.fp-refreshed.single-product #content .product-images-content .woocommerce-product-gallery__image,
body.fp-refreshed.single-product #content .product-images-content .woocommerce-product-gallery__image > a {
  background: #fff !important;
}

body.fp-refreshed.single-product #content .product-images-content .zadora-gallery-image,
body.fp-refreshed.single-product #content .product-images-content .woocommerce-product-gallery__image {
  aspect-ratio: auto !important;
  height: auto !important;
  min-height: 0 !important;
}

body.fp-refreshed.single-product #content .product-images-content .zadora-gallery-image > div,
body.fp-refreshed.single-product #content .product-images-content .woocommerce-product-gallery__image > a {
  display: block !important;
  height: auto !important;
}

body.fp-refreshed.single-product #content .product-images-content .woocommerce-product-gallery__image img:not(.zoomImg),
body.fp-refreshed.single-product #content .product-images-content .zadora-gallery-image img:not(.zoomImg) {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center !important;
}

/* Main previous/next controls: compact white buttons over the artwork. */
body.fp-refreshed.single-product #content .product-images-content figure.woocommerce-product-gallery__wrapper > .slick-arrow {
  z-index: 8 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 42px !important;
  height: 42px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #dbe3f1 !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  color: transparent !important;
  box-shadow: 0 6px 18px rgba(15, 39, 94, 0.14) !important;
  font-size: 0 !important;
  line-height: 1 !important;
  opacity: 1 !important;
  transform: translateY(-50%) !important;
}

body.fp-refreshed.single-product #content .product-images-content figure.woocommerce-product-gallery__wrapper > .slick-arrow:hover,
body.fp-refreshed.single-product #content .product-images-content figure.woocommerce-product-gallery__wrapper > .slick-arrow:focus-visible {
  border-color: #234ec5 !important;
  background: #234ec5 !important;
  box-shadow: 0 8px 22px rgba(35, 78, 197, 0.24) !important;
}

body.fp-refreshed.single-product #content .product-images-content figure.woocommerce-product-gallery__wrapper > .slick-arrow::before {
  content: "" !important;
  display: block !important;
  width: 9px !important;
  height: 9px !important;
  border-top: 2px solid #183b96 !important;
  border-right: 2px solid #183b96 !important;
  font-family: inherit !important;
  opacity: 1 !important;
}

body.fp-refreshed.single-product #content .product-images-content figure.woocommerce-product-gallery__wrapper > .slick-arrow:hover::before,
body.fp-refreshed.single-product #content .product-images-content figure.woocommerce-product-gallery__wrapper > .slick-arrow:focus-visible::before {
  border-color: #fff !important;
}

body.fp-refreshed.single-product #content .product-images-content figure.woocommerce-product-gallery__wrapper > :is(.slick-prev, .fa-chevron-left) {
  left: 12px !important;
}

body.fp-refreshed.single-product #content .product-images-content figure.woocommerce-product-gallery__wrapper > :is(.slick-prev, .fa-chevron-left)::before {
  transform: rotate(-135deg) !important;
}

body.fp-refreshed.single-product #content .product-images-content figure.woocommerce-product-gallery__wrapper > :is(.slick-next, .fa-chevron-right) {
  right: 12px !important;
  left: auto !important;
}

body.fp-refreshed.single-product #content .product-images-content figure.woocommerce-product-gallery__wrapper > :is(.slick-next, .fa-chevron-right)::before {
  transform: rotate(45deg) !important;
}

@media (max-width: 767px) {
  body.fp-refreshed.single-product #content .product-images-content figure.woocommerce-product-gallery__wrapper > .slick-arrow {
    width: 38px !important;
    height: 38px !important;
  }
}
.fp26-home .fp26-category__media img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
}
.fp26-home .fp26-product__media img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
}

/* Optional modern homepage: the available artwork is portrait. A square
   stage keeps the whole design visible without making the cards too tall. */
body.fp-modern :is(.fp-category-image, .fp-product-image) {
  height: auto;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #eef3f8;
}
body.fp-modern :is(.fp-category-image, .fp-product-image) img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
}

/* WooCommerce catalogue and landing-page product cards. */
body.fp-refreshed .tb-products-grid .product-thumb {
  overflow: hidden;
  background: #fff;
}
body.fp-refreshed .tb-products-grid .product-thumb > a {
  display: block;
  width: 100%;
  height: 100%;
}
body.fp-refreshed .tb-products-grid .product-thumb > a > img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center !important;
}

/* Product gallery: main images and thumbnails should never lose artwork. */
body.fp-refreshed.single-product #content .woocommerce-product-gallery__image {
  overflow: hidden;
  background: #fff;
}
body.fp-refreshed.single-product #content .woocommerce-product-gallery__image img:not(.zoomImg) {
  display: block;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center !important;
}
body.fp-refreshed.single-product #content .product-thumbnails .image-thumbnail-item {
  overflow: hidden;
  background: #fff;
}
body.fp-refreshed.single-product #content .product-thumbnails .image-thumbnail-item img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
}

/* Editorial cards intentionally fill their frame, but never stretch. */
body.fp-refreshed:is(.blog, .archive.category) .zadora_post .blog-image,
body.fp-refreshed:is(.blog, .archive.category) .zadora_post .blog-image > a {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #f1f3f7;
}
body.fp-refreshed:is(.blog, .archive.category) .zadora_post .blog-image img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-height: none;
  object-fit: cover !important;
  object-position: center 25% !important;
}
body.fp-refreshed:is(.blog, .single-post, .archive.category) .post-thumb {
  overflow: hidden;
  background: #f1f3f7;
}
body.fp-refreshed:is(.blog, .single-post, .archive.category) .post-thumb img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
}

/* Basket, wishlist and mini-cart thumbnails use a neutral square stage. */
body.fp-refreshed :is(.woocommerce-cart-form, .wishlist_table, .widget_shopping_cart) .product-thumbnail,
body.fp-refreshed .widget_shopping_cart .mini_cart_item > a:first-child {
  overflow: hidden;
  background: #f7f8fb;
}
body.fp-refreshed :is(.woocommerce-cart-form, .wishlist_table, .widget_shopping_cart) img {
  object-fit: contain !important;
  object-position: center !important;
}

@media (max-width: 767px) {
  .fp26-home .fp26-category__media { aspect-ratio: 4 / 3; }
  .fp26-home .fp26-product__media { aspect-ratio: 1 / 1; }
  body.fp-modern :is(.fp-category-image, .fp-product-image) { aspect-ratio: 1 / 1; }
  body.fp-refreshed.single-product #content .product-thumbnails .image-thumbnail-item {
    aspect-ratio: 1 / 1;
  }
  body.fp-refreshed.single-product #content .product-thumbnails .image-thumbnail-item img {
    height: 100% !important;
  }
  body.fp-refreshed:is(.blog, .archive.category) .zadora_post .blog-image {
    aspect-ratio: 4 / 3;
  }
}

/* Wishlist presentation only: retain YITH links, nonces and cart handlers. */
body.fp-refreshed.woocommerce-wishlist .wishlist_table {
  width: 100%; border: 1px solid var(--fp-line); border-radius: 16px;
  border-collapse: separate; border-spacing: 0; overflow: hidden;
  background: #fff; box-shadow: 0 8px 28px #1b2a6b08; color: var(--fp-ink);
}
body.fp-refreshed.woocommerce-wishlist .wishlist_table th {
  background: var(--fp-soft); color: var(--fp-ink); font-size: 14px; font-weight: 600; padding: 18px 16px;
}
body.fp-refreshed.woocommerce-wishlist .wishlist_table td {
  padding: 22px 16px; vertical-align: middle; border: 0; border-top: 1px solid var(--fp-line); font-size: 14px;
}
body.fp-refreshed.woocommerce-wishlist .wishlist_table .product-thumbnail { width: 132px; min-width: 108px; }
body.fp-refreshed.woocommerce-wishlist .wishlist_table .product-thumbnail img {
  width: 96px !important; height: 112px !important; max-width: 100%; object-fit: contain; border-radius: 10px; background: var(--fp-soft);
}
body.fp-refreshed.woocommerce-wishlist .wishlist_table .product-name a { color: var(--fp-ink); font-weight: 600; line-height: 1.7; }
body.fp-refreshed.woocommerce-wishlist .wishlist_table .product-price { font-weight: 600; white-space: nowrap; }
body.fp-refreshed.woocommerce-wishlist .wishlist_table .wishlist-in-stock {
  display: inline-block; padding: 5px 12px; border: 0; border-radius: 20px; background: #edf7f1; color: #246344; white-space: nowrap;
}
body.fp-refreshed.woocommerce-wishlist .wishlist_table .product-add-to-cart a {
  display: inline-flex !important; align-items: center; justify-content: center; min-height: 44px;
  padding: 10px 18px !important; border: 1px solid var(--fp-accent); border-radius: 10px;
  background: var(--fp-accent) !important; color: #fff !important; font-size: 14px; font-weight: 600; white-space: nowrap;
}
body.fp-refreshed.woocommerce-wishlist .wishlist_table .product-remove a { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; color: var(--fp-ink); }
@media (max-width: 767px) {
  body.fp-refreshed.woocommerce-wishlist .wishlist_table thead { display: none; }
  body.fp-refreshed.woocommerce-wishlist .wishlist_table,
  body.fp-refreshed.woocommerce-wishlist .wishlist_table tbody { display: block; }
  body.fp-refreshed.woocommerce-wishlist table.wishlist_table > tbody > tr { display: grid; grid-template-columns: 108px minmax(0, 1fr); padding: 16px; gap: 12px; position: relative; border-bottom: 1px solid var(--fp-line); }
  body.fp-refreshed.woocommerce-wishlist .wishlist_table td { display: block; width: auto; min-width: 0; padding: 0; border: 0; text-align: left !important; }
  body.fp-refreshed.woocommerce-wishlist .wishlist_table .product-remove { grid-column: 2; justify-self: end; }
  body.fp-refreshed.woocommerce-wishlist .wishlist_table .product-thumbnail { grid-column: 1; grid-row: 2 / span 3; }
  body.fp-refreshed.woocommerce-wishlist .wishlist_table .product-name,
  body.fp-refreshed.woocommerce-wishlist .wishlist_table .product-price,
  body.fp-refreshed.woocommerce-wishlist .wishlist_table .product-stock-status { grid-column: 2; }
  body.fp-refreshed.woocommerce-wishlist .wishlist_table .product-add-to-cart { grid-column: 1 / -1; }
  body.fp-refreshed.woocommerce-wishlist .wishlist_table .product-add-to-cart a { width: 100%; }
  body.fp-refreshed.woocommerce-wishlist ul.wishlist_table { padding: 0; list-style: none; }
  body.fp-refreshed.woocommerce-wishlist ul.wishlist_table > li { padding: 20px; margin: 0; border-bottom: 1px solid var(--fp-line); }
  body.fp-refreshed.woocommerce-wishlist ul.wishlist_table .item-wrapper { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; }
  body.fp-refreshed.woocommerce-wishlist ul.wishlist_table .product-thumbnail { width: 96px; min-width: 0; grid-column: 1; grid-row: 1; float: none; }
  body.fp-refreshed.woocommerce-wishlist ul.wishlist_table .item-details { width: auto; min-width: 0; grid-column: 2; grid-row: 1; float: none; }
  body.fp-refreshed.woocommerce-wishlist ul.wishlist_table .product-name h3 { margin: 0 0 12px; font-size: 16px; line-height: 1.7; }
  body.fp-refreshed.woocommerce-wishlist ul.wishlist_table .additional-info-wrapper { margin: 16px 0 0; }
  body.fp-refreshed.woocommerce-wishlist ul.wishlist_table .product-add-to-cart { margin-top: 16px; }
  body.fp-refreshed.woocommerce-wishlist ul.wishlist_table .product-remove { margin-top: 12px; text-align: right; }
}
