/**
 * Waris Elementor Widgets - Product Tabs Grid Frontend Styling
 */

/* Container */
.waris-product-tabs-grid {
	position: relative;
	width: 100%;
	box-sizing: border-box;
}

.waris-product-tabs-grid *,
.waris-product-tabs-grid *::before,
.waris-product-tabs-grid *::after {
	box-sizing: border-box;
}

/* Header */
.waris-tabs-header {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-end;
	margin-bottom: 30px;
	gap: 20px;
}

.waris-header-title-box {
	display: flex;
	flex-direction: column;
}

.waris-header-subtitle {
	display: block;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 2.5px;
	text-transform: uppercase;
	color: #c59b6b;
	margin-bottom: 6px;
	line-height: 1.2;
}

.waris-header-title {
	margin: 0;
	font-size: 32px;
	font-weight: 800;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: #102a43;
	line-height: 1.15;
}

/* Tabs Navigation */
.waris-tabs-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 15px;
}

.waris-tab-btn {
	background-color: transparent;
	color: #334e68;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	border: none;
	outline: none;
	cursor: pointer;
	padding: 8px 18px;
	border-radius: 0;
	transition: all 0.25s ease;
	line-height: 1;
	user-select: none;
}

.waris-tab-btn:hover {
	color: #0b2238;
	background-color: #f0f4f8;
}

.waris-tab-btn.active {
	background-color: #102a43;
	color: #ffffff;
	cursor: default;
}

/* Tabs Panels */
.waris-tab-panel {
	display: none;
}

.waris-tab-panel.active {
	display: block;
	animation: warisFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes warisFadeIn {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Product Grid */
.waris-products-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	column-gap: 20px;
	row-gap: 32px;
	width: 100%;
}

/* Product Card */
.waris-product-card {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	background: transparent;
	transition: all 0.3s ease;
}

/* Thumbnail Wrap */
.waris-product-thumb-wrap {
	position: relative;
	width: 100%;
	overflow: hidden;
	border-radius: 4px;
	background-color: #f8fafc;
}

.waris-product-thumb {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	position: relative;
}

.waris-product-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
	transition: transform 0.45s ease;
}

.waris-product-thumb-wrap.has-zoom-effect:hover .waris-product-thumb img {
	transform: scale(1.06);
}

/* Top-Left Badge */
.waris-product-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	background-color: #0b1d33;
	color: #e6af62;
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	padding: 4px 8px;
	border-radius: 2px;
	line-height: 1;
	pointer-events: none;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Top-Right Quick Bag Button */
.waris-quick-cart-btn {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 3;
	width: 38px;
	height: 38px;
	border-radius: 50% !important;
	background-color: #ffffff;
	color: #102a43;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	padding: 0 !important;
	margin: 0 !important;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
	cursor: pointer;
	transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
	border: none;
	text-decoration: none;
	line-height: 1;
}

.waris-quick-cart-btn svg {
	width: 17px;
	height: 17px;
	stroke: #102a43;
	fill: none;
	transition: stroke 0.25s ease;
}

.waris-quick-cart-btn:hover {
	background-color: #102a43;
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(16, 42, 67, 0.25);
}

.waris-quick-cart-btn:hover svg {
	stroke: #ffffff;
}

/* WooCommerce loading & added states for quick cart */
.waris-quick-cart-btn.loading {
	opacity: 0.75;
}

.waris-quick-cart-btn.loading::after {
	content: "";
	position: absolute;
	width: 16px;
	height: 16px;
	border: 2px solid #102a43;
	border-top-color: transparent;
	border-radius: 50%;
	animation: warisSpin 0.6s linear infinite;
}

.waris-quick-cart-btn.added::before {
	content: "\2713";
	font-weight: bold;
	color: #2b8a3e;
	position: absolute;
	top: -6px;
	right: -6px;
	background: #ffffff;
	border-radius: 50%;
	width: 16px;
	height: 16px;
	font-size: 11px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

@keyframes warisSpin {
	to {
		transform: rotate(360deg);
	}
}

/* Product Info */
.waris-product-info {
	padding-top: 12px;
	display: flex;
	flex-direction: column;
}

.waris-product-title {
	margin: 0 0 6px 0;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
}

.waris-product-title a {
	color: #102a43;
	text-decoration: none;
	transition: color 0.2s ease;
	display: -webkit-box;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.waris-product-title a:hover {
	color: #c59b6b;
}

.waris-product-price {
	font-size: 15px;
	font-weight: 700;
	color: #102a43;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
}

.waris-product-price del {
	color: #829ab1;
	font-weight: 400;
	font-size: 13.5px;
	text-decoration: line-through;
}

.waris-product-price ins {
	text-decoration: none;
	color: #c93b2b;
	font-weight: 700;
}

.waris-no-products {
	padding: 40px 20px;
	text-align: center;
	color: #627d98;
	font-size: 15px;
	background: #f8fafc;
	border-radius: 4px;
	width: 100%;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
	.waris-products-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: 16px;
		row-gap: 24px;
	}
	.waris-header-title {
		font-size: 26px;
	}
}

@media (max-width: 640px) {
	.waris-tabs-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
	}

	.waris-tabs-nav {
		width: 100%;
		justify-content: flex-start;
		overflow-x: auto;
		flex-wrap: nowrap;
		padding-bottom: 6px;
		-webkit-overflow-scrolling: touch;
	}

	.waris-tab-btn {
		white-space: nowrap;
		flex-shrink: 0;
	}

	.waris-products-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: 12px;
		row-gap: 20px;
	}

	.waris-product-title {
		font-size: 14px;
	}

	.waris-product-price {
		font-size: 14px;
	}
}

@media (max-width: 420px) {
	.waris-products-grid {
		grid-template-columns: 1fr;
	}
}

/* ==========================================================================
   Hero Slider Compatibility Fix for Razzi Slides
   ========================================================================== */
.razzi-slides-elementor,
.elementor-editor-active .razzi-slides-elementor,
.elementor-editor-preview .razzi-slides-elementor {
	opacity: 1 !important;
}

.razzi-slides-elementor .item-slider {
	background-position: center center !important;
	background-repeat: no-repeat !important;
}

