/* ==========================================================================
   Allure Bundle Builder — Shared UI (sidebar + wizard)
   ========================================================================== */

:root {
	--abb-brand:      #722f37;
	--abb-brand-text: #ffffff;
	--abb-bg:         #ffffff;
	--abb-border:     #e5e5e5;
	--abb-muted:      #666666;
	--abb-radius:     10px;
}

/* Category tabs */
.abb-categories {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.abb-category-tab {
	padding: 6px 14px;
	border-radius: 10px;
	background: var(--wp--preset--color--base, var(--abb-bg));
	font-size: var(--wp--preset--font-size--small, 0.875rem);
	text-transform: uppercase;
	cursor: pointer;
	color: var(--wp--preset--color--black);
	border: none;
	transition: border-color 0.15s, background 0.15s, color 0.15s;
	white-space: nowrap;
}

.abb-category-tab:hover {
	border-color: var(--wp--preset--color--black);
}

.abb-category-tab.is-active {
	background: var(--abb-brand);
	border-color: var(--abb-brand);
	color: var(--abb-brand-text);
}

.abb-product-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 15px 10px;
}

/* Product cards */
.abb-product-card {
	cursor: pointer;
}

.abb-product-card.is-out-of-stock {
	opacity: 0.45;
	cursor: default;
	pointer-events: none;
}

.abb-product-card__img {
	margin-bottom: 10px;
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0);
	transition: outline 0.3s, border-color 0.3s;
	filter: brightness(0.97);
}

.abb-product-card__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.abb-product-card__name {
	font-family: var(--wp--preset--font-family--heading, inherit);
	font-size: 12px;
	line-height: 1.35;
	margin: 0;
}

.abb-product-card__price {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: var(--wp--preset--color--black);
}

.abb-product-card__price ins {
	text-decoration: none;
}

.abb-product-card__price ins .woocommerce-Price-amount {
	color: var(--wp--preset--color--accent);
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 500;
}

.abb-product-card:hover .abb-product-card__img {
    border-color: var(--abb-border);
}

.abb-product-card.is-selected .abb-product-card__img {
	border-color: var(--abb-brand);
}

/* Loading / errors */
.abb-loading {
	text-align: center;
	padding: 28px 22px;
	font-size: 13px;
	color: var(--abb-muted);
}

.abb-error {
	padding: 8px 22px;
	color: #cc0000;
	font-size: 13px;
}

/* Variation labels + swatches */
.abb-variation-select-wrap {
	margin-bottom: 14px;
}

.abb-configure-addons .wc-pao-addons-container {
	display: grid;
	gap: 14px;
	margin: 0;
}

.abb-configure-addons .wc-pao-addon-container {
	margin: 0 !important;
	padding: 0;
}

.abb-configure-addons .wc-pao-addon-wrap {
	margin-top: 0;
}

.abb-configure-selects .abb-variation-label,
.abb-configure-addons .wc-pao-addon-container .wc-pao-addon-name {
	display: block !important;
	margin-bottom: 6px !important;
	font-size: 12px !important;
	font-weight: 600 !important;
	text-transform: uppercase;
	color: var(--wp--preset--color--black);
}

.abb-variation-label .required,
.wc-pao-addon-name .required {
	display: none;
}

.abb-configure-selects .abb-variation-select,
.abb-configure-addons .wc-pao-addon-wrap .wc-pao-addon-select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--wp--preset--color--black);
	border-radius: 10px;
	font-size: 14px;
	color: var(--wp--preset--color--black);
	box-sizing: border-box;
    appearance: none;
    background: transparent;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='16' fill='none'%3E%3Cpath fill='%230B0A07' d='M21.902 0c1.122 0 1.746 1.298 1.046 2.174L12.665 15.042a1.34 1.34 0 0 1-2.092 0L.295 2.174C-.405 1.297.22 0 1.341 0h20.56Z'/%3E%3C/svg%3E");
    background-position-x: calc(100% - 1rem);
    background-position-y: 50%;
    background-repeat: no-repeat;
    background-size: .625rem auto;
}

.abb-configure-selects .abb-variation-select:focus,
.abb-configure-addons .wc-pao-addon-wrap .wc-pao-addon-select:focus {
	outline: none;
	border-color: var(--wp--preset--color--black);
}

.abb-configure-addons .wc-pao-addon-container input[type="text"],
.abb-configure-addons .wc-pao-addon-container input[type="email"],
.abb-configure-addons .wc-pao-addon-container textarea {
	width: 100% !important;
	height: auto !important;
	padding: 10px 12px !important;
	border: 1px solid var(--wp--preset--color--black);
	border-radius: 10px !important;
	font-size: 14px !important;
}

.abb-configure-addons .wc-pao-addon-container input:focus,
.abb-configure-addons .wc-pao-addon-container textarea:focus {
	outline: none;
	border-color: var(--wp--preset--color--black);
}

.abb-variation-images-swatch {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.abb-variation-image-swatch {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	padding: 4px;
	border-radius: var(--abb-radius);
	border: 2px solid transparent;
	transition: border-color 0.2s;
	max-width: 90px;
	text-align: center;
}

.abb-variation-image-swatch::before {
	content: attr(data-value);
	position: absolute;
	top: calc(100% + 4px);
	left: 50%;
	transform: translateX(-50%);
	background: rgba(0, 0, 0, 0.7);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	text-align: center;
	line-height: 1.3;
	padding: 4px 6px;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.2s;
	white-space: nowrap;
}

.abb-variation-image-swatch::after {
	content: '';
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-bottom: 4px solid rgba(0, 0, 0, 0.7);
	opacity: 0;
	transition: opacity 0.2s;
}

.abb-variation-image-swatch:hover::before,
.abb-variation-image-swatch:hover::after {
	opacity: 1;
}

.abb-variation-image-swatch img {
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: 6px;
	display: block;
}

.abb-variation-image-swatch.selected,
.abb-variation-image-swatch:hover {
	border-color: var(--abb-brand);
}

.abb-file-btn {
	width: 100%;
	font-size: 12px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.abb-file-btn[hidden] {
	display: none;
}

/* File upload preview (PAO) */
.abb-file-preview {
	display: none;
}

.abb-file-preview.abb-file-uploaded {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
}

.abb-file-uploaded__thumb {
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	border-radius: 4px;
	overflow: hidden;
	background: var(--abb-border);
}

.abb-file-uploaded__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.abb-file-uploaded__name {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 14px;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	text-transform: none;
}

.abb-file-uploaded__remove {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: none;
	background: transparent;
	color: var(--abb-muted);
	cursor: pointer;
	font-size: 14px;
	padding: 0;
}

.abb-file-uploaded__remove:hover {
	color: var(--wp--preset--color--black);
}

.abb-file-uploaded__remove-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	border: 1px solid currentColor;
	border-radius: 50%;
	font-size: 12px;
	line-height: 1;
}

.wc-pao-addon-wrap small {
	display: none;
}
