/*
Theme Name: OceanWP Child
Theme URI: https://oceanwp.org/
Description: OceanWP WordPress theme example child theme.
Author: Nick
Author URI: https://oceanwp.org/
Template: oceanwp
Version: 1.0
*/

/* Parent stylesheet should be loaded from functions.php not using @import */

/* Hide the Digital Catalogs menu item if the user is NOT logged in */
body:not(.logged-in) .e-n-menu .e-n-menu-item:has(> .e-n-menu-title > a[href="/digital-catalogs/"]) {
  display: none !important;
}

/* Fallback for older browsers (hides just the link if :has isn't supported) */
body:not(.logged-in) .e-n-menu a[href="/digital-catalogs/"] {
  display: none !important;
}

/* If Elementor outputs absolute URLs, this covers both http/https and the dev domain */
body:not(.logged-in) .e-n-menu a[href*="/digital-catalogs/"] {
  display: none !important;
}

/* Proceed to Cart button spacing */
.woocommerce-cart .woocommerce .wc-proceed-to-checkout a.checkout-button {
	margin-bottom: 20px !important;
}

/* Thumbnails Width */
.woocommerce .woo-entry-image {
  display: inline-block;
  position:relative;
  width: 200px;
  height: 200px;
  margin: auto;
  text-align: center;
}

.woocommerce .woo-entry-image img {
  display: inline-block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  margin: auto;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.woocommerce .woocommerce-password-strength.short {
	color: red;
}

/* Testimonial Video Aspect Ratio */
.e-hosted-video{
	--video-aspect-ratio: 16:9 !important;
}

/* Limit the gallery width and center it */
.woocommerce div.product div.images,
.woocommerce .woocommerce-product-gallery {
  max-width: 600px;  /* adjust to taste */
  margin: 0 auto;
}

/* Make the main image scale down nicely and cap its height */
.woocommerce div.product div.images
  .woocommerce-product-gallery__image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 620px;          /* adjust to taste */
  object-fit: contain;        /* preserve aspect ratio within the box */
}

/* Ensure the wrapper doesn’t force overflow weirdness */
.woocommerce div.product div.images
  .woocommerce-product-gallery__image {
  overflow: hidden;
  background: #fff;           /* optional: gives a clean frame */
}

/* Optional: if the zoom script injects an oversized absolute image */
.woocommerce-product-gallery .zoomImg {
  display: none !important;   /* comment this out if you want to keep zoom */
}

/* Optional: tighten things up on small screens */
@media (max-width: 640px) {
  .woocommerce div.product div.images,
  .woocommerce .woocommerce-product-gallery {
    max-width: 100%;
  }
  .woocommerce div.product div.images
    .woocommerce-product-gallery__image img {
    max-height: 70vh;         /* keep it within the viewport height */
  }
}
