/**
 * WP Amazon Affiliate - Fast & Clean AAWP Replica Stylesheet with Dynamic Theming
 */

.wpaa-container {
	margin: 25px 0 35px 0;
	clear: both;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	font-size: 15px;
	color: #334155;
	line-height: 1.5;
}

.aawp-product {
	position: relative;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: var(--wpaa-box-radius, 8px);
	margin-bottom: 20px;
	padding: 20px;
	box-sizing: border-box;
	transition: box-shadow 0.2s ease-in-out, border-color 0.2s ease-in-out;
	box-shadow: var(--wpaa-box-shadow, 0 1px 4px rgba(0, 0, 0, 0.04));
}
.aawp-product:hover {
	box-shadow: var(--wpaa-box-hover-shadow, 0 6px 16px rgba(0, 0, 0, 0.08));
	border-color: #cbd5e1;
}

.aawp-product--horizontal {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	gap: 20px;
	align-items: center;
}

.aawp-product__ribbon {
	position: absolute;
	top: 0px;
	right: 15px;
	background: #567d14;
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 4px 10px;
	border-bottom-left-radius: calc(var(--wpaa-box-radius, 8px) * 0.6);
	border-bottom-right-radius: calc(var(--wpaa-box-radius, 8px) * 0.6);
	z-index: 3;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

.aawp-product__ribbon--bestseller {
	background: var(--wpaa-ribbon-bestseller, #f59e0b);
}

.aawp-product__ribbon--sale {
	background: var(--wpaa-ribbon-sale, #ef4444);
	left: 15px;
	right: auto;
}

.aawp-product__ribbon--new {
	background: #3b82f6;
	left: 15px;
	right: auto;
}

.aawp-product__thumb {
	flex: 0 0 130px;
	max-width: 130px;
	text-align: center;
	position: relative;
}

.aawp-product__image-link {
	display: block;
	line-height: 0;
}

.aawp-product__image {
	max-width: 100%;
	height: auto;
	max-height: 130px;
	object-fit: contain;
	margin: 0 auto;
	transition: transform 0.2s ease;
}
.aawp-product:hover .aawp-product__image {
	transform: scale(1.03);
}

.aawp-product__no-image, .aawp-preview-demo-img {
	width: 100px;
	height: 100px;
	background: #f1f5f9;
	border: 1px dashed #cbd5e1;
	border-radius: calc(var(--wpaa-box-radius, 8px) * 0.75);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #94a3b8;
	font-size: 12px;
	margin: 0 auto;
}
.aawp-preview-demo-img .dashicons {
	font-size: 32px;
	width: 32px;
	height: 32px;
	color: #94a3b8;
}

.aawp-product__content {
	flex: 1 1 auto;
	min-width: 0;
}

.aawp-product__title {
	font-size: 16px;
	font-weight: 700;
	color: #0f172a;
	text-decoration: none;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin-bottom: 8px;
	line-height: 1.35;
}
.aawp-product__title:hover {
	color: #2563eb;
	text-decoration: underline;
}

.aawp-product__rating {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 8px;
}

.aawp-stars {
	display: inline-block;
	width: 80px;
	height: 16px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23cbd5e1'%3E%3Cpath d='M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E") repeat-x 0 0;
	background-size: 16px 16px;
	position: relative;
}

.aawp-stars__inner {
	display: block;
	height: 100%;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fbbf24'%3E%3Cpath d='M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E") repeat-x 0 0;
	background-size: 16px 16px;
}

.aawp-reviews-count {
	font-size: 12px;
	color: #64748b;
}

.aawp-product__description ul {
	margin: 0;
	padding-left: 18px;
	font-size: 13px;
	color: #475569;
}
.aawp-product__description li {
	margin-bottom: 3px;
}

.aawp-product__footer {
	flex: 0 0 170px;
	max-width: 170px;
	text-align: right;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-end;
	gap: 8px;
}

.aawp-product__pricing {
	text-align: right;
}

.aawp-product__price--old {
	font-size: 13px;
	color: #94a3b8;
	text-decoration: line-through;
	margin-right: 4px;
}

.aawp-product__price--current {
	font-size: 19px;
	font-weight: 800;
	color: #0f172a;
}

.aawp-prime-tag {
	display: inline-block;
	background: #00a8e1;
	color: #ffffff;
	font-weight: 800;
	font-size: 10px;
	padding: 2px 6px;
	border-radius: 3px;
	text-transform: uppercase;
	margin-left: 4px;
	vertical-align: middle;
}

.aawp-button {
	display: inline-block;
	background: var(--wpaa-btn-bg, #f79b23);
	color: var(--wpaa-btn-color, #111827);
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	padding: 10px 18px;
	border-radius: calc(var(--wpaa-box-radius, 8px) * 0.75);
	text-align: center;
	transition: background 0.15s ease, transform 0.1s ease, color 0.15s ease;
	border: none;
	cursor: pointer;
}
.aawp-button:hover {
	background: var(--wpaa-btn-hover, #f59e0b);
	color: var(--wpaa-btn-color, #111827);
	text-decoration: none;
}

.aawp-button--small {
	padding: 6px 12px;
	font-size: 13px;
}

.aawp-product__info {
	font-size: 11px;
	color: #94a3b8;
	display: block;
}

.aawp-disclaimer {
	font-size: 12px;
	color: #94a3b8;
	margin-top: 10px;
	text-align: right;
	font-style: italic;
}

/* Grid layout */
.aawp-grid {
	display: grid;
	gap: 20px;
	margin-bottom: 20px;
}
.aawp-grid--1 { grid-template-columns: 1fr; }
.aawp-grid--2 { grid-template-columns: repeat(2, 1fr); }
.aawp-grid--3 { grid-template-columns: repeat(3, 1fr); }
.aawp-grid--4 { grid-template-columns: repeat(4, 1fr); }
.aawp-grid--5 { grid-template-columns: repeat(5, 1fr); }
.aawp-grid--6 { grid-template-columns: repeat(6, 1fr); }

.aawp-product--vertical {
	display: flex;
	flex-direction: column;
	text-align: center;
	height: 100%;
}
.aawp-product--vertical .aawp-product__thumb {
	max-width: 100%;
	flex: 0 0 auto;
	margin-bottom: 12px;
}
.aawp-product--vertical .aawp-product__content {
	flex: 1 0 auto;
}
.aawp-product--vertical .aawp-product__footer {
	flex: 0 0 auto;
	max-width: 100%;
	width: 100%;
	align-items: center;
	margin-top: 15px;
}
.aawp-product--vertical .aawp-button {
	width: 100%;
}

/* List layout */
.aawp-list {
	list-style: none;
	padding: 0;
	margin: 0 0 20px 0;
	border: 1px solid #e2e8f0;
	border-radius: var(--wpaa-box-radius, 8px);
	overflow: hidden;
}
.aawp-list__item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 18px;
	border-bottom: 1px solid #f1f5f9;
	gap: 15px;
}
.aawp-list__item:last-child {
	border-bottom: none;
}
.aawp-list__title {
	flex: 1 1 auto;
	font-weight: 600;
	color: #0f172a;
	text-decoration: none;
}
.aawp-list__title:hover {
	text-decoration: underline;
}
.aawp-list__price {
	font-weight: 700;
	color: #0f172a;
	white-space: nowrap;
}

/* Table layout */
.aawp-table-responsive {
	overflow-x: auto;
	margin-bottom: 20px;
}
.aawp-table {
	width: 100%;
	border-collapse: collapse;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: var(--wpaa-box-radius, 8px);
}
.aawp-table__head {
	background: #f8fafc;
	padding: 12px 15px;
	text-align: left;
	font-size: 13px;
	font-weight: 700;
	color: #475569;
	border-bottom: 2px solid #e2e8f0;
}
.aawp-table__td {
	padding: 12px 15px;
	border-bottom: 1px solid #f1f5f9;
	vertical-align: middle;
}
.aawp-table__td--thumb {
	width: 80px;
	text-align: center;
}
.aawp-table__image {
	max-width: 60px;
	max-height: 60px;
	object-fit: contain;
}
.aawp-table__title-link {
	font-weight: 600;
	color: #0f172a;
	text-decoration: none;
}
.aawp-table__title-link:hover {
	text-decoration: underline;
}

@media (max-width: 768px) {
	.aawp-product--horizontal {
		flex-direction: column;
		text-align: center;
	}
	.aawp-product__thumb, .aawp-product__footer {
		max-width: 100%;
		flex: 0 0 auto;
		align-items: center;
	}
	.aawp-product__footer {
		margin-top: 15px;
		width: 100%;
	}
	.aawp-product__pricing {
		text-align: center;
	}
	.aawp-button {
		width: 100%;
	}
	.aawp-grid {
		grid-template-columns: 1fr !important;
	}
}
