/* Frontend review media display */

.awi-review-media {
	margin-top: 10px;
}

.awi-review-media__images {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 8px;
}

.awi-review-media__image-link {
	display: block;
	width: 72px;
	height: 72px;
	border-radius: 6px;
	overflow: hidden;
	border: 1px solid #eee;
	transition: transform 0.2s;
}

.awi-review-media__image-link:hover {
	transform: scale(1.05);
}

.awi-review-media__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.awi-review-media__videos {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.awi-review-media__video {
	position: relative;
	width: 120px;
	height: 90px;
	border-radius: 6px;
	overflow: hidden;
	background: #000;
}

.awi-review-media__video-link {
	display: block;
	position: relative;
	width: 100%;
	height: 100%;
}

.awi-review-media__video-thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.awi-review-media__play-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: #fff;
	font-size: 24px;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
	pointer-events: none;
}

.awi-review-media__video-player {
	width: 120px;
	height: 90px;
	border-radius: 6px;
}

.awi-review-title {
	display: block;
	margin-bottom: 4px;
}

.awi-review-variation {
	display: inline-block;
	margin-top: 6px;
	padding: 2px 8px;
	background: #f5f5f5;
	border-radius: 4px;
	font-size: 12px;
	color: #666;
}

.awi-aplus,
.awi-aplus-images,
.awi-aplus-slides,
.woocommerce-Tabs-panel--description,
.woocommerce-Tabs-panel--description .awi-aplus {
	max-width: 100%;
	overflow: hidden;
}

.woocommerce-Tabs-panel--description img,
.awi-aplus img,
.awi-aplus-img,
.awi-aplus-images img,
.awi-aplus-slides img {
	display: block;
	max-width: 100% !important;
	width: auto !important;
	height: auto !important;
	margin: 12px auto;
	object-fit: contain;
}

.awi-aplus-images,
.awi-aplus-slides {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* Video blocks are stripped on import — hide any leftover markup. */
.awi-aplus-video,
.awi-aplus-videos,
.awi-aplus-video__player {
	display: none !important;
}

/* Comparison / A+ tables */
.awi-compare-table-wrap,
.woocommerce-Tabs-panel--description .awi-compare-table-wrap {
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	margin: 24px 0;
	border: 1px solid #e8e8e8;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
	-webkit-overflow-scrolling: touch;
}

.awi-compare-table,
.woocommerce-Tabs-panel--description table.awi-compare-table,
.woocommerce-Tabs-panel--description .awi-aplus table,
.woocommerce-Tabs-panel--description table {
	width: 100%;
	min-width: 560px;
	border-collapse: separate;
	border-spacing: 0;
	margin: 0;
	font-size: 14px;
	line-height: 1.45;
	color: #1f2937;
	background: #fff;
}

.woocommerce-Tabs-panel--description table:not(.awi-compare-table) {
	margin: 24px 0;
	border: 1px solid #e8e8e8;
	border-radius: 12px;
	overflow: hidden;
	display: table;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.awi-compare-table caption,
.woocommerce-Tabs-panel--description .awi-compare-table caption {
	caption-side: top;
	padding: 14px 16px;
	font-size: 16px;
	font-weight: 700;
	text-align: left;
	color: #111827;
	background: #fafafa;
	border-bottom: 1px solid #e8e8e8;
}

.awi-compare-table th,
.awi-compare-table td,
.woocommerce-Tabs-panel--description .awi-compare-table th,
.woocommerce-Tabs-panel--description .awi-compare-table td,
.woocommerce-Tabs-panel--description .awi-aplus table th,
.woocommerce-Tabs-panel--description .awi-aplus table td,
.woocommerce-Tabs-panel--description table th,
.woocommerce-Tabs-panel--description table td {
	padding: 12px 14px;
	border-bottom: 1px solid #eef0f2;
	border-right: 1px solid #eef0f2;
	vertical-align: middle;
	text-align: center;
	background: #fff;
}

.awi-compare-table tr:last-child th,
.awi-compare-table tr:last-child td,
.woocommerce-Tabs-panel--description .awi-compare-table tr:last-child th,
.woocommerce-Tabs-panel--description .awi-compare-table tr:last-child td,
.woocommerce-Tabs-panel--description table tr:last-child th,
.woocommerce-Tabs-panel--description table tr:last-child td {
	border-bottom: none;
}

.awi-compare-table th:last-child,
.awi-compare-table td:last-child,
.woocommerce-Tabs-panel--description .awi-compare-table th:last-child,
.woocommerce-Tabs-panel--description .awi-compare-table td:last-child,
.woocommerce-Tabs-panel--description table th:last-child,
.woocommerce-Tabs-panel--description table td:last-child {
	border-right: none;
}

.awi-compare-table thead th,
.awi-compare-table tr:first-child th,
.awi-compare-table__head,
.woocommerce-Tabs-panel--description .awi-compare-table thead th,
.woocommerce-Tabs-panel--description .awi-compare-table tr:first-child th,
.woocommerce-Tabs-panel--description table thead th,
.woocommerce-Tabs-panel--description table tr:first-child th {
	background: #111827;
	color: #fff;
	font-weight: 600;
	font-size: 13px;
	letter-spacing: 0.01em;
	border-bottom-color: #111827;
	border-right-color: rgba(255, 255, 255, 0.08);
}

.awi-compare-table__label,
.awi-compare-table th:first-child,
.awi-compare-table td:first-child,
.woocommerce-Tabs-panel--description .awi-compare-table th:first-child,
.woocommerce-Tabs-panel--description .awi-compare-table td:first-child,
.woocommerce-Tabs-panel--description table th:first-child,
.woocommerce-Tabs-panel--description table td:first-child {
	text-align: left;
	font-weight: 600;
	color: #111827;
	background: #f8fafc;
	white-space: nowrap;
	min-width: 140px;
	position: sticky;
	left: 0;
	z-index: 1;
}

.awi-compare-table tbody tr:nth-child(even) td:not(:first-child),
.woocommerce-Tabs-panel--description .awi-compare-table tbody tr:nth-child(even) td:not(:first-child),
.woocommerce-Tabs-panel--description table tbody tr:nth-child(even) td:not(:first-child) {
	background: #fcfcfd;
}

.awi-compare-table tbody tr:hover td,
.woocommerce-Tabs-panel--description .awi-compare-table tbody tr:hover td,
.woocommerce-Tabs-panel--description table tbody tr:hover td {
	background: #fff7ed;
}

.awi-compare-table tbody tr:hover td:first-child,
.woocommerce-Tabs-panel--description .awi-compare-table tbody tr:hover td:first-child,
.woocommerce-Tabs-panel--description table tbody tr:hover td:first-child {
	background: #ffedd5;
}

@media (max-width: 640px) {
	.awi-compare-table,
	.woocommerce-Tabs-panel--description table.awi-compare-table {
		font-size: 13px;
		min-width: 480px;
	}

	.awi-compare-table th,
	.awi-compare-table td,
	.woocommerce-Tabs-panel--description .awi-compare-table th,
	.woocommerce-Tabs-panel--description .awi-compare-table td {
		padding: 10px 12px;
	}
}

.awi-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.awi-lightbox__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.85);
}

.awi-lightbox__img {
	position: relative;
	max-width: 90vw;
	max-height: 90vh;
	border-radius: 8px;
	z-index: 1;
}

.awi-lightbox__close {
	position: absolute;
	top: 16px;
	right: 16px;
	background: none;
	border: none;
	color: #fff;
	font-size: 32px;
	cursor: pointer;
	z-index: 2;
	line-height: 1;
}

.awi-amazon-cta {
	margin: 12px 0 16px;
	max-width: 100%;
}

.awi-amazon-cta__button {
	display: inline-block;
	padding: 12px 20px;
	background: #ff9900;
	color: #111 !important;
	font-weight: 700;
	font-size: 14px;
	line-height: 1.2;
	text-decoration: none !important;
	border-radius: 8px;
	border: 1px solid #e47911;
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset;
	transition: background 0.15s ease;
}

.awi-amazon-cta__button:hover,
.awi-amazon-cta__button:focus {
	background: #f0c14b;
	color: #111 !important;
}

.awi-amazon-cta__disclosure {
	margin: 8px 0 0;
	font-size: 12px;
	color: #666;
	line-height: 1.4;
}

/* Hide variation selectors on Amazon-imported products */
body.awi-hide-variations.single-product .product form.cart table.variations,
body.awi-hide-variations.single-product .product form.cart .variations,
body.awi-hide-variations.single-product .product .variations_form .variations,
.product.awi-hide-variations form.cart table.variations,
.product.awi-hide-variations form.cart .variations,
.product.awi-hide-variations .reset_variations {
	display: none !important;
}

/*
 * Hide quantity + Add to cart form. Amazon CTA is rendered outside the form
 * (woocommerce_single_product_summary) when this option is enabled.
 */
body.awi-hide-purchase.single-product .product form.cart,
.product.awi-hide-purchase form.cart {
	display: none !important;
}

body.awi-hide-purchase.single-product .product .awi-amazon-cta,
.product.awi-hide-purchase .awi-amazon-cta {
	display: block !important;
	margin-top: 8px;
}

