/*
 Theme Name:   GP Factroy - GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Zhipeng Xiong
 Author URI:   https://www.kjwm360.com
 Template:     generatepress
 Version:      1.0
*/


html {
	scroll-behavior: smooth;
}

/* Search Box */
.search_prodbox input.wp-block-search__input {
	margin: 0 !Important;
	border: none !important;
	font-size: 14px !Important;
	height: 35px !Important;
}

.search_prodbox button {
	border-radius: 8px;
	height: 35px !Important;
	padding: 0;
	fill: #000;
	color: #000;
	background: none;
	margin-right: 5px;
}


/* Gallery Slider */
.owl-item figure.wp-block-image {
	width: 100% !Important;
}

.clientslider .owl-item {
	border: 1px solid var(--border);
	border-radius: 0px;
	padding: 5px;
}

/* owl caraousel styling */
.owl-carousel {
	visibility: hidden;
}

.owl-carousel.owl-loaded {
	visibility: visible;
	display: block;
}

.owl-carousel .owl-stage::after {
	display: none;
}

.show .owl-carousel {
	visibility: visible;
	display: block;
}

/* Slide Nav */
.owl-dots {
	text-align: center;
	margin: 10px auto 20px;
	position: static;
	bottom: 20px;
	right: 20px;
}

.owl-dots button,
.owl-dot {
	width: 8px;
	height: 8px;
	opacity: 0.3;
	border-radius: 100px;
	margin: 0 3px;
	background: #ccc !important;
}

.owl-dots button.active,
.owl-dot.active {
	opacity: 0.5;
	background: var(--accent) !important;
}

.owl-stage {
	display: flex;
}

.abs_nav .owl-dots {
	position: absolute;
	bottom: 5px;
}

/* Owl Nav */
.owl-nav button {
	position: absolute;
	top: 41%;
	width: 35px;
	opacity: 1;
	height: 35px;
	transition: all .2s ease-in-out;
	background-repeat: no-repeat;
	background-position: center center !important;
}

.owl-nav button:hover {
	opacity: 1;
}

.owl-nav button span {
	display: none;
}

.owl-nav button.owl-prev {
	left: -20px;
	background-image: url(images/arrow-left.svg) !important;
}

.owl-nav button.owl-next {
	right: -20px;
	background-image: url(images/arrow-right.svg) !important;
}

.owl-dots {}

.owl-carousel .owl-stage::after {
	display: none !important;
}

.latest_post .owl-dots {
	position: absolute;
	margin: 0;
	top: auto;
	bottom: 20px;
}

.testi_slider .owl-item {
	border: 1px solid #f1f1f1;
	border-radius: 8px;
	overflow: hidden;
}

.testi_slider .owl-item img {
	width: 90px;
}

.wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption)::before {
	backdrop-filter: none;
}

.wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
	background: none;
}

.owl-item figcaption {
	height: 100%;
	padding: 0;
	text-indent: -90000px;
}

.owl-item figcaption a {
	display: block;
	height: 100%;
}

/* Hero Owl */
.heroslider .owl-dots {
	display: inline-block;
	margin: 10px 0 0;
	padding: 8px 10px;
	list-style-type: none;
	border: 1px solid var(--border);
	background: #fff;
	border-radius: 100px;
	line-height: 0;
}



/* Sticky */
.sticky {
	position: sticky;
	top: 20px;
	align-self: flex-start;
}


/* SKU label*/

.wc-product-image {
	position: relative;
}

.sku-label {
	position: absolute;
	top: 80px;
	/* 适当调整位置 */
	left: -20px;
	/* 让它稍微往左扩展 */
	background: #17498b;
	color: #fff;
	padding: 5px 30px;
	/* 增加宽度 */
	font-size: 12px;
	font-weight: bold;
	box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.1);
	transform: rotate(-45deg);
	/* 角度可以调整为 -45° 以对齐边角 */
	transform-origin: left top;
	white-space: nowrap;
	/* 防止换行 */
	width: 150px;
	/* 适当调整，使其跨越整个角落 */
	text-align: center;
}

/* Search Tabs */
.search-tabs {
	display: flex;
	border-bottom: 1px solid #eaeaea;
	margin-bottom: 20px;
	width: 100%; 
}
.search-tabs::after{
	content: "";
	display: table;
	clear: both;
}

.tab-link {
	padding: 10px 15px;
	cursor: pointer;
	background: none;
	border: none;
	font-size: 16px;
	font-weight: bold;
	color: #777;
	outline: none;
	transition: color 0.2s ease;
}

.tab-link.active {
	color: #000;
	border-bottom: 2px solid #000;
}

.tab-content {
	display: none;
}

.tab-content.active {
	display: block;
}

.no-result {
	color: #888;
	font-size: 14px;
}

/* Custom Modal */
.custom-modal-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 10001;
	justify-content: center;
	align-items: center;
	padding: 20px;
}

.custom-modal-overlay.is-active {
	display: flex;
}

.custom-modal {
	background: #fff;
	padding: 30px 40px 40px;
	max-width: 600px;
	width: 100%;
	border-radius: 12px;
	position: relative;
	max-height: 90vh;
	overflow-y: auto;

}
.custom-modal h3{;
	font-size: 34px;
	font-weight: 700;
	margin-bottom: 20px;
	text-align: center;
}
.custom-modal p {
	margin-bottom: 0;
}
.custom-modal-close {
	position: absolute;
	top: 10px;
	right: 15px;
	font-size: 28px;
    font-weight: bold;
	background: none;
	border: none;
	cursor: pointer;
	color: #888;
}
.custom-modal-close:hover, .custom-modal-close:focus {
	outline: none;
	color: black;
	background: none;
	
}
.whatsapp-alternative {
	text-align: center;
	font-size: 14px;
	margin-top: 0;
}

.whatsapp-alternative a {
	color: #f59e0b;
	text-decoration: none;
}

.whatsapp-alternative a:hover {
	text-decoration: underline;
}

@media (max-width: 600px) {
	.custom-modal {
		width: 90vw;
		padding: 20px;
	}
}

#quote {
	scroll-margin-top: 180px;
}

.quote-link.hidden {
	display: none;
}

.quote-link {
	opacity: 0;
	transition: opacity 0.3s ease;
}

.quote-link.show {
	display: list-item;
	opacity: 1;
}

/* Contact Form 7 */


.floating {
	position: relative;
	margin-bottom: 25px;
  }

  .floating > p {
	margin: 0 !important;
  }

  .wpcf7-form br {
	display: none;
  }

  .cf7-float {
	width: 100%;
	padding: 16px 12px 6px;
	font-size: 16px;
	border: 1px solid #ddd;
	border-radius: 4px;
	transition: all 0.3s ease;
  }

  /* 隐藏 placeholder */
  .cf7-float::placeholder {
	color: transparent;
  }

  .floating label {
	position: absolute;
	top: 10px;
	left: 12px;
	color: #777;
	font-size: 16px;
	pointer-events: none;
	transition: all 0.2s ease;
	padding: 0 5px;
  }
  input.floating label{
	background: #f7f8f9;
  }

  textarea.floating label{
	background-color: white;
  }

  /* 上浮效果 */
  .floating.focused label,
  .floating input.cf7-float:focus + label,
  .floating input.cf7-float.filled + label,
  .floating input.cf7-float:not(:placeholder-shown) + label,
  .floating textarea.cf7-float:focus + label,
  .floating textarea.cf7-float.filled + label,
  .floating textarea.cf7-float:not(:placeholder-shown) + label {
	top: -8px;
	font-size: 13px;
	color: var(--accent);
	background: #f7f8f9;
  }

  .floating textarea.cf7-float {
	min-height: 120px;
	padding-top: 16px;
	resize: vertical;
  }

  .cf7-float:focus {
	border-color: var(--accent) !important;
	outline: none;
	box-shadow: 0 0 0 2px rgba(255, 183, 22, 0.2);
  }

  .wpcf7-submit {
	background: var(--accent) !important;
	color: white;
	border: none;
	width: 100%;
	padding: 12px 24px;
	font-size: 16px;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.3s;
  }

  .wpcf7-submit:hover {
	background: var(--contrast) !important;
  }

  .wpcf7-not-valid {
	border-color: #dc3232;
  }

  .wpcf7-not-valid + label {
	color: #dc3232;
  }

/* 隐藏CF7生成的br标签 */
.wpcf7-form br {
    display: none;
}

/* woocommerce */
.woocommerce div.product h1.product_title{
	font-size: 2rem;
	font-weight: 700;
	margin-bottom: 20px;
}
.woocommerce div.product h2{
	font-size: 1.75rem;
	font-weight: 700;
	margin-bottom: 20px;
}
.woocommerce div.product h3{
	font-size: 1.5rem;
	font-weight: 700;
	margin-bottom: 20px;
}
.woocommerce div.product h3.gbp-card__title{
	font-size: 1.25rem;
    margin-bottom: 0;
	font-weight: 500;
}
.woocommerce div.product .wc-tabs-wrapper{
	padding-top: 1rem;
}

#quote a.button{
	background: var(--accent);
	color: #fff;
	padding: 10px 20px;
	border-radius: 4px;
	font-size: 16px;
	text-decoration: none;
	transition: background 0.3s;
}
#quote a.button:hover{
	background: var(--contrast);
}
/* WooCommerce Category */
.woocommerce ul.products li.product, 
.woocommerce-page ul.products li.product {
    text-align: center;
    box-shadow: 0 0 25px rgba(0,0,0,.1);
    -webkit-box-shadow: 0 0 25px rgba(0,0,0,.1);
    -moz-box-shadow: 0 0 25px rgba(0,0,0,.1);
    -ms-box-shadow: 0 0 25px rgba(0,0,0,.1);
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    padding: .5em 30px;
    font-size: 20px;
	color: var(--contrast);
	font-weight: 700;
	text-align: center;
	margin: 0;
	line-height: 1.2;
}
.woocommerce ul.products li.product a:hover	.woocommerce-loop-product__title {
	color: var(--accent);
}
.woocommerce ul.products li.product .button {
    margin: 20px 0 30px;
	background-color: var(--accent);
	transition: background 0.3s;
}
.woocommerce ul.products li.product .button:hover {
	background-color: var(--contrast);
}