/**
 * Product Card Grid Styles
 * Styles for reusable product card grid template
 *
 * @package WebTyre
 * @since 1.0.0
 */

/* Product Card Image Container */
.product-card__image {
	position: relative;
	overflow: hidden;
}

.product-card__image .image {
	position: relative;
	width: 100%;
	height: 0;
	padding-bottom: 100%; /* Square aspect ratio */
	overflow: hidden;
}

.product-card__image .image__body {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: block;
}

.product-card__image .image__tag {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.product-card:hover .product-card__image .image__tag {
	transform: scale(1.05);
}

/* Product Card Badges */
.product-card__badge {
	position: absolute;
	z-index: 2;
}

.product-card__badge--sale {
	top: 10px;
	left: 10px;
}

.product-card__badge--category {
	top: 10px;
	right: 10px;
}

.product-card__badge .tag-badge--sale {
	display: inline-block;
    position: relative;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    z-index: 0;
    height: 16px;
    padding: 3px 11px 0;
}


.product-card__badge .status-badge__text {
	color: #333;
	font-weight: 500;
}

/* Meta Fields Overlay - Right Side */
.product-card__meta-overlay {
	position: absolute;
	top: 0;
	right: 0;
	width: 60px;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: linear-gradient(to left, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 100%);
	opacity: 0;
	transform: translateX(100%);
	transition: opacity 0.3s ease, transform 0.3s ease;
	z-index: 3;
	padding: 10px 5px;
}

.product-card:hover .product-card__meta-overlay,
.product-card__image:active .product-card__meta-overlay {
	opacity: 1;
	transform: translateX(0);
}

.product-card__meta-overlay-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}

/* Tire Label Items in Overlay */
.product-card__meta-overlay .tire-label-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 45px;
	height: 45px;
	background-color: rgba(255, 255, 255, 0.95);
	border-radius: 4px;
	padding: 4px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	transition: transform 0.2s ease;
}

.product-card__meta-overlay .tire-label-item:hover {
	transform: scale(1.1);
}

.product-card__meta-overlay .tire-label-icon {
	width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 2px;
}

.product-card__meta-overlay .tire-label-icon svg {
	width: 100%;
	height: 100%;
}

.product-card__meta-overlay .tire-label-grade {
	font-size: 14px;
	font-weight: 700;
	color: #333;
	line-height: 1;
}

/* Fuel Label */
.product-card__meta-overlay .fuel-label .tire-label-icon {
	color: #ffa500;
}

/* Grip Label */
.product-card__meta-overlay .grip-label .tire-label-icon {
	color: #4caf50;
}

/* Noise Label */
.product-card__meta-overlay .noise-label .tire-label-icon {
	color: #2196f3;
}

/* Noise Level Display */
.product-card__meta-overlay .noise-level-display {
	margin-top: 4px;
}

.product-card__meta-overlay .noise-db-value {
	font-size: 11px;
	color: #fff;
	font-weight: 600;
	background-color: rgba(0, 0, 0, 0.5);
	padding: 5px 6px;
	border-radius: 2px;
}

/* Product Card Tags */
.product-card__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 8px;
	margin-bottom: 8px;
    padding-left: 16px;
}

.product-card__tags .feature-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 8px;
	font-size: 11px;
	border-radius: 3px;
	font-weight: 500;
}

.product-card__tags .vl-badge {
	background-color: #e3f2fd;
	color: #1976d2;
}

.product-card__tags .seasons-badge {
	background-color: #fff3e0;
	color: #f57c00;
}

.product-card__tags .feature-badge i {
	font-size: 10px;
}

/* Product Card Add to Cart */
.product-card__addtocart {
	margin-top: 12px;
}

.product-card__addtocart .add-to-cart-btn {
	width: 100%;
	padding: 0.75rem 1.25rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	transition: all 0.3s ease;
	position: relative;
	background: #0149ae;
	border-color: #0149ae;
	color: #fff;
	border-radius: 0px;
	font-size: 0.9rem;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.product-card__addtocart .add-to-cart-btn:hover {
	background: #333333;
	border-color: #333333;
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.product-card__addtocart .add-to-cart-btn.loading {
	opacity: 0.7;
	pointer-events: none;
}

.product-card__addtocart .add-to-cart-btn.loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 20px;
	margin: -10px 0 0 -10px;
	border: 2px solid #fff;
	border-top-color: transparent;
	border-radius: 50%;
	animation: spin 0.6s linear infinite;
}

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

.product-card__addtocart .add-to-cart-btn i {
	font-size: 14px;
}

/* Product Card Add to Cart Icon Button - Loading & Success States */
.product-card__addtocart-icon {
	position: relative;
	transition: all 0.3s ease;
}

.product-card__addtocart-icon.adding-to-cart {
	opacity: 0.7;
	pointer-events: none;
}

.product-card__addtocart-icon.adding-to-cart svg {
	opacity: 0.5;
}

/* Loading Spinner Overlay */
.product-card__addtocart-icon .add-to-cart-spinner {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 20px;
	margin: -10px 0 0 -10px;
	border: 2px solid #e52727;
	border-top-color: transparent;
	border-radius: 50%;
	animation: spin 0.6s linear infinite;
	z-index: 10;
}

/* Success Checkmark */
.product-card__addtocart-icon .add-to-cart-checkmark {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 24px;
	height: 24px;
	background-color: #28a745;
	color: #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	font-weight: bold;
	z-index: 10;
	animation: checkmarkPop 0.4s ease;
	box-shadow: 0 2px 8px rgba(40, 167, 69, 0.4);
}

@keyframes checkmarkPop {
	0% {
		transform: translate(-50%, -50%) scale(0);
		opacity: 0;
	}
	50% {
		transform: translate(-50%, -50%) scale(1.2);
	}
	100% {
		transform: translate(-50%, -50%) scale(1);
		opacity: 1;
	}
}

.product-card__addtocart-icon.added-to-cart {
	background-color: #28a745 !important;
}

.product-card__addtocart-icon.added-to-cart svg {
	fill: #fff;
}

/* Product Card Prices */
.product-card__prices {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.product-card__price--old {
	text-decoration: line-through;
	color: #999;
	font-size: 0.9rem;
}

.product-card__price--current {
	font-size: 1.25rem;
	font-weight: 700;
	color: #333;
}
.home .status-badge--style--success .status-badge__body {
    position: relative;
    padding: 0;
}
.home .status-badge--style--success .status-badge__body {
    content: "";
    background-color: #3377ff;
    width: 100%;
    -webkit-transform: skewX(-20deg);
    transform: skewX(-20deg);
    display: block;
    top: 0;
    left: 0;
    right: 0;
    max-height: 16px;
    padding: 0px 7px 0;
    border-radius: 2.5px;
    height: 16px;
    min-height: 16px;
}
.home .product-card__badge .status-badge__text {
    padding: 0;
    color: #ffffff;
    font-weight: 500;
    padding: 0 !important;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 500;
    -webkit-transform: skewX(20deg);
    transform: skewX(20deg);
    color: #fff !important;
    margin-top: 2px;
    line-height: 16px;
}
/* Mobile Responsive */
@media (max-width: 768px) {
	.product-card__meta-overlay {
		opacity: 1;
		transform: translateX(0);
		width: 50px;
		padding: 8px 3px;
	}
	
	.product-card__meta-overlay .tire-label-item {
		width: 40px;
		height: 40px;
	}
	
	.product-card__meta-overlay .tire-label-icon {
		width: 18px;
		height: 18px;
	}
	
	.product-card__meta-overlay .tire-label-grade {
		font-size: 12px;
	}
	
	.product-card__addtocart .add-to-cart-btn {
		padding: 0.6rem 1rem;
		font-size: 0.85rem;
	}
}

/* Touch Device Support */
@media (hover: none) {
	.product-card__meta-overlay {
		opacity: 1;
		transform: translateX(0);
	}
}

/* Horizontal Layout Meta Display - Below Title */
.product-card--layout--horizontal .product-card__meta-display {
	margin-top: 8px;
	margin-bottom: 8px;
}

.product-card--layout--horizontal .product-card__meta-display-content {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.product-card--layout--horizontal .tire-label-item {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 4px;
	background-color: rgba(255, 255, 255, 0.95);
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	padding: 6px 10px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	transition: all 0.2s ease;
	cursor: help;
}

.product-card--layout--horizontal .tire-label-item:hover {
	background-color: #fff;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
	transform: translateY(-1px);
}

.product-card--layout--horizontal .tire-label-icon {
	width: 18px;
	height: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	flex-shrink: 0;
}

.product-card--layout--horizontal .tire-label-icon svg {
	width: 100%;
	height: 100%;
}

.product-card--layout--horizontal .tire-label-grade {
	font-size: 13px;
	font-weight: 700;
	color: #333;
	line-height: 1;
}

/* Fuel Label - Horizontal */
.product-card--layout--horizontal .fuel-label .tire-label-icon {
	color: #ffa500;
}

/* Grip Label - Horizontal */
.product-card--layout--horizontal .grip-label .tire-label-icon {
	color: #4caf50;
}

/* Noise Label - Horizontal */
.product-card--layout--horizontal .noise-label .tire-label-icon {
	color: #2196f3;
}

/* Noise Level Display - Horizontal */
.product-card--layout--horizontal .noise-level-display--horizontal {
	margin: 0;
}

.product-card--layout--horizontal .noise-level-display--horizontal .noise-db-value {
	font-size: 12px;
	color: #666;
	font-weight: 600;
	background-color: #f5f5f5;
	padding: 6px 10px;
	border-radius: 4px;
	border: 1px solid #e0e0e0;
	writing-mode: horizontal-tb;
	text-orientation: mixed;
}