/*
 Theme Name: Kadence Child
 Template: kadence
 Author: Andy Chen
 Description: A child theme for Kadence.
 Version: 1.0
*/

/* ---------------- HEADER ----------------  */

/* Remove default margins and padding for .header-html-inner */
.header-html-inner {
    display: flex;
    align-items: center; /* Vertically centers all content */
}

.header-html-inner strong {
    margin-right: 3em;
}

/* Adjust the icon size and alignment */
.header-html-inner .material-icons {
    vertical-align: middle; /* Fallback for non-flexbox scenarios */
    margin-right: .2em; /* Right margin to text */
}


/* Cart icon and total css */
#main-header .header-cart-button .header-cart-total{
	font-size:1em;
}

/* ---------------- HEADER END----------------  */

/* ---------------- SIDEBAR ----------------  */
.sidebar-inner-wrap{
	padding-left: 10px;
	padding-right: 20px;
}
/* ---------------- SIDEBAR END----------------  */


/* ---------------- LINKS ----------------  */
.entry-content :is(p, li, td, th, blockquote, figcaption, h1, h2, h3, h4, h5, h6) a[target="_blank"]::after {
  content: " ↗︎";
  font-size: 1em;
  opacity: 0.7;
}

a.kb-button[target="_blank"]::after {
  content: " ↗︎";
  font-size: 1em;
  opacity: 0.7;
}


/* ---------------- LINKS END----------------  */

/* ---------------- SCREENREADER----------------  */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
/* ---------------- SCREENREADER END----------------  */

/* ---------------- POPUP MAKER----------------  */
.pum-overlay.pum-active,
	.pum-overlay.pum-active .popmake.active {
    		display: block !important;
	}
/* ---------------- POPUP MAKER END----------------  */

/* ---------------- IHEARTRADIO WIDGET----------------  */

@media (max-width: 768px) {
  #ihrw-widget {
    display: none !important;
  }
}


#ihrw-widget {
  display: none;
  position: fixed;
  bottom: 0px;
  right: 0px;
  z-index: 9999;
}

#ihrw-widget.show {
  display: block;
}

#ihrw-toggle-widget {	
  background-color: white;
  background-image: url('/wp-content/uploads/iHeartRadio_Vertical_Logo_color_black-scaled.png');
  background-size: 50%;
  background-position: center;
  background-repeat: no-repeat;
  border: none;
  border-radius: 50%;
  width: 100px;
  height: 100px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  padding: 0;
}
#ihrw-toggle-widget:hover {
  box-shadow: 0 0 12px rgba(198, 0, 43, 0.5);
}
#ihrw-label {
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 15px;
  color: #101820;
  background: white; 
  padding: 4px 8px;   
  border-radius: 6px;
  text-align: right;
  margin-top: 8px;
}
#ihrw-toggle-row {
  display: flex;
  justify-content: flex-end; 
  align-items: center;
  padding: 10px;
}

#ihrw-toggle-row.show {
  display: flex;
}

#ihrw-widget-content {
  display: none;
  margin-top: 10px;
  background: white;
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
#ihrw-widget-content.show {
  display: block;
}

/* close and open buttons */
#ihrw-close-widget::before { content: ">"; }
#ihrw-open-widget::before { content: "<"; }

#ihrw-close-widget:hover, #ihrw-open-widget:hover { color: white; background: #C6002B;  }

#ihrw-open-widget,
#ihrw-close-widget {
  background: white;
  width:40px;
  height:40px;          
  padding:0;            
  border-radius:50%;   
  align-items:center; 
  justify-content:center;
  border: none;
  font-size: 1.5rem;
  padding: 0;
  line-height: 1;
  cursor: pointer;
  color: #C6002B;
  margin-right: auto;  
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

#ihrw-close-widget {
  display:flex;
}

#ihrw-open-widget {
  display: none;
  position: fixed;
  right: 20px;
  bottom: 20px; 
  padding:0;
  z-index: 10000;
  background: white;
  color: #C6002B;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  width: 40px; height: 40px;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
#ihrw-open-widget.show {
  display: flex;
}




/* ---------------- IHEARTRADIO WIDGET END----------------  */




/* ---------------- WOOCOMMERCE----------------  */

/* Checkout hide random Paypal label text */
li.payment_method_ppcp-gateway label {
    display: none !important;
}


/* -----Product Collection----- */
/* Fix next and previous button styling */
.wc-block-next-previous-buttons__button {
  box-sizing: content-box; /* undo theme-wide border-box */
  padding: 0;              /* kill inherited padding */
  min-width: 0;
  min-height: 0;
}

/* Truncate product title to 2 lines and add min height */
ul.wc-block-product-template.is-product-collection-layout-carousel > li.wc-block-product h2.wp-block-post-title a {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2; 
  overflow: hidden;
  min-height: 2.8em; /* ~2 lines at line-height 1.4 */
}

/* Remove box shadows from products */
ul.wc-block-product-template.is-product-collection-layout-carousel > li.wc-block-product,
ul.wc-block-product-template.is-product-collection-layout-carousel > li.wc-block-product::before,
ul.wc-block-product-template.is-product-collection-layout-carousel > li.wc-block-product::after {
  box-shadow: none !important;
}

/* Remove hover / focus / active shadows from next & previous buttons */
.wc-block-next-previous-buttons__button,
.wc-block-next-previous-buttons__button:hover,
.wc-block-next-previous-buttons__button:focus,
.wc-block-next-previous-buttons__button:active,
.wc-block-next-previous-buttons__button:focus-visible {
  box-shadow: none !important;
}

/* -----Product Collection End ----- */



/* Responsive number of products per row based on screen size */
.woocommerce ul.products {
  display: grid;
  grid-gap: 20px; /* adjust spacing */
}


/* 5 products */
@media (min-width: 1600px) {
  .woocommerce ul.products {
    grid-template-columns: repeat(5, 1fr);
  }
}


/* 4 products */
@media (min-width: 1200px) and (max-width: 1599px) {
  .woocommerce ul.products {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* 3 products */
@media (min-width: 900px) and (max-width: 1199px) {
  .woocommerce ul.products {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 2 products */
@media (max-width: 899px) {
  .woocommerce ul.products {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 1 products */
@media (max-width: 675px) {
  .woocommerce ul.products {
    grid-template-columns: repeat(1, 1fr);
  }
}

/* Minimum product width */
.products li.product {
  flex: 1 1 250px; /* flex-grow, flex-shrink, flex-basis */
  min-width: 200px;
}

/* Increase Max Content Width for Shop Product Catalog*/
body.woocommerce #primary .content-container.site-container {
  max-width: 2000px;
  margin: 0 auto;
}

body.woocommerce .content-container.site-container {
  display: flex;
}

body.woocommerce #main {
  flex: 1;
}

/* Product Catalog Filter SIDEBAR */

/* Price slider filter */
.wc-block-product-filter-price-slider__left.text input.min,
.wc-block-product-filter-price-slider__right.text input.max {
  max-width: 85px!important;
}

/* Category filter Show More Text */
.wc-block-product-filter-checkbox-list__show-more {
    color: #000 !important;
}
/* Remove hover background from "Show more…" button */
.wp-block-woocommerce-product-filters 
.wc-block-product-filter-checkbox-list__show-more:hover,
.wp-block-woocommerce-product-filters 
.wc-block-product-filter-checkbox-list__show-more:focus {
    background: transparent !important;
}



/* When Tablet size move sidebar with filters above products*/
body.woocommerce #secondary :where(.wc-block-mini-cart__badge) {
  color: var(--global-palette9)
}


body.woocommerce #secondary {
  	flex: 15% 0 0; /* or a fixed value like 300px */
	min-width: 270px;
	order: -1;
}

/* Unsticky sidebar on shop page */
body.woocommerce #secondary .sidebar-inner-wrap{
	position: static;
	top: auto !important;
    /* Remove any max-height restrictions if needed */
    max-height: none  !important;
}
/* Tablet and below: reorder to stack vertically */
@media (max-width: 1024px) {
  body.woocommerce .content-container.site-container {
    flex-direction: column;
  }
  
  /* Move sidebar above main content */
  body.woocommerce #secondary {
    order: 1;      
    width: 100%;   /* Full width on mobile/tablet */
    margin-bottom: 1.5em; /* spacing if needed */
  }
  body.woocommerce #main {
    order: 2;      
    width: 100%;
  }
	body.woocommerce .content-container.site-container {
    display: flex;
    flex-direction: column;
  }
	
}

/*	Pagination */
/* Center the WooCommerce pagination */
.woocommerce nav.woocommerce-pagination {
  text-align: center; 
}

/* Custom Product Per Page Dropdown */
body.woocommerce #main .custom-products-per-page{
	font-size: 90%;
  	line-height: 30px;
}
body.woocommerce #main .custom-products-per-page select.products_per_page{
	margin-right:15px;
	padding-bottom: 3px;
  	padding-top: 2px;
  	padding-left: 5px;
	font-size: 90%;
}
/* Ordering of shop top row*/
.kadence-shop-top-row {
  display: flex;
  flex-wrap: wrap;
}
body.woocommerce #main .kadence-woo-results-count { order: 1; }
body.woocommerce #main .custom-products-per-page {order: 2;}
body.woocommerce #main .kadence-woo-ordering { order: 3; }
body.woocommerce #main .kadence-woo-toggle { order: 4; }

/* Woocommerce Product Page Image background */
.woocommerce div.product div.images img,
.woocommerce ul.products li.product a img {
    border-radius: 4px; /* optional: softens corners */
}



/* ---------------- WOOCOMMERCE END ----------------  */

/* ---------------- YOUTUBE VIDEOS ----------------  */

/* Styling for the YouTube container */

.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}


.youtube-video-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
  transition: inherit;
}


/* Apply a hover effect: zoom-in */
.video-wrapper:hover {
    transform: scale(1.03); /* Slight zoom-in */
}

.video-wrapper.playing:hover {
  transform: none !important;
  cursor: default;
}

/* Remove hover effects when video starts playing */
.youtube-video-container.playing {
    transform: none !important;
    cursor: default;
}


/* Ensure the thumbnail fills the container */
.youtube-video-container .video-thumbnail {
  width: 100%;
  height: 100%;           /* ← changed from auto */
  object-fit: cover;      /* ← new: crops to fill */
}


/* Play button should overlay the thumbnail */
.youtube-video-container .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Material Icons';
    font-size: 60px;
    color: #00974e; /* Green play button */
    cursor: pointer;
    z-index: 10;
    background: none;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out, color 0.3s ease-in-out;
}

/* Play button scale effect & color change on hover */
.youtube-video-container:hover .play-button {
    transform: translate(-50%, -50%) scale(1.2); /* Slightly increase size */
    opacity: 0.9; /* Make it slightly more visible */
}

/* Hide play button and thumbnail when video starts */
.youtube-video-container.playing .play-button,
.youtube-video-container.playing .video-thumbnail {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}

.youtube-video-container.playing iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ---------------- YOUTUBE VIDEOS END ----------------  */

/* ---------------- RESPONSIVE UI ----------------  */

/* Adjust logo size based on device/window width 
	#masthead .site-branding a.brand img {
		max-width: 250px;
 	}
*/

/* Adjust when window/device width is <1800px */
@media (max-width: 1800px) {
	/* Header Menu Navigation */
	#masthead .main-navigation .primary-menu-container > ul > li > a {
		font-size: 22px;
	}
	/* Header Menu Navigation Dropdowns */
	#masthead .header-navigation .header-menu-container ul ul li.menu-item > a{
		font-size: 18px
	}
	#main-header a.button.header-button.button-size-custom{
		font-size: 22px;
	}
}

/* Adjust when window/device width is <1600px */
@media (max-width: 1600px) {
	/* Header Menu Navigation */
	#masthead .main-navigation .primary-menu-container > ul > li > a {
		font-size: 18px;
	}
	/* Header Menu Navigation Dropdowns */
	#masthead .header-navigation .header-menu-container ul ul li.menu-item > a{
		font-size: 16px
	}
	/* Header Contact Us Button*/
	#main-header a.button.header-button.button-size-custom{
		font-size: 18px;
	}
}

/* Adjust when window/device width is <1600px */
@media (max-width: 1360px) {
	/* Header Menu Navigation */
	#masthead .main-navigation .primary-menu-container > ul > li > a {
		font-size: 16px;
	}
	/* Header Menu Navigation Dropdowns */
	#masthead .header-navigation .header-menu-container ul ul li.menu-item > a{
		font-size: 14px
	}
	/* Header Contact Us Button*/
	#main-header a.button.header-button.button-size-custom{
		font-size: 16px;
	}
	/* Header Search Button */
	.search-toggle-label {
	  	font-size: 16px;
	}
	.search-toggle-open .search-toggle-icon svg {
	 	width: 16px;
	  	height: 16px;
	}
	.header-cart-wrap .header-cart-button .kadence-svg-iconset .kadence-svg-icon.kadence-shopping-cart-svg {
	  font-size: 2rem;
	}
}


/* Header Contact Us Button nowrap */
#main-header a.button.header-button.button-size-custom {
  white-space: nowrap;
}

/* ---------------- RESPONSIVE UI END ----------------  */
