/* =========================================================================
   JR Woo Furniture Builder – Frontend
   Side-by-side: preview (left) | accordion config panel (right)
   ========================================================================= */

/* -------------------------------------------------------------------------
   Builder wrapper
   ------------------------------------------------------------------------- */

.jrwfb-builder {
	display: grid;
	grid-template-columns: 1fr 440px;
	gap: 0;
	margin-top: 40px;
	margin-bottom: 30px;
	border: 1px solid #e8e5e1;
	border-radius: 20px;
	font-family: inherit;
	overflow: hidden;
}

/* -------------------------------------------------------------------------
   LEFT – preview canvas
   ------------------------------------------------------------------------- */

.jrwfb-preview {
	background: #f2f0ed;
	display: flex;
	justify-content: center;
	/* padding: 32px; */
}

.jrwfb-canvas {
	position: relative;
	width: 100%;
}

.jrwfb-layer {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
	z-index: 1;
	display: block !important;
}

.jrwfb-layer--base {
	position: relative;
	z-index: 0 !important;
	display: none;
}

.jrwfb-canvas__empty {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #b5afa7;
	font-size: 0.83em;
	text-align: center;
	padding: 16px;
	pointer-events: none;
}

/* -------------------------------------------------------------------------
   RIGHT – config panel
   ------------------------------------------------------------------------- */

.jrwfb-panel {
	background: #fafafa;
	border-left: 1px solid #e8e5e1;
	display: flex;
	flex-direction: column;
	/* overflow-y: auto;
	max-height: 640px; */
}

.jrwfb-accordion {
	flex: 1;
}

/* -------------------------------------------------------------------------
   Accordion group
   ------------------------------------------------------------------------- */

.jrwfb-group {
	border-bottom: 1px solid #ede9e4;
}

.jrwfb-group:last-child {
	border-bottom: none;
}

/* ---- Header (always visible) ---- */

.jrwfb-group__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 22px;
	cursor: pointer;
	user-select: none;
	transition: background 0.12s;
}

.jrwfb-group__header:hover {
	background: #faf9f7;
}

.jrwfb-group__meta {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.jrwfb-group__name {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #1a1a1a;
}

.jrwfb-group__current {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 12px;
	color: #888;
}

.jrwfb-group__thumb {
	width: 20px;
	height: 20px;
	border-radius: 3px;
	object-fit: cover;
	flex-shrink: 0;
}

.jrwfb-group__chevron {
	font-size: 20px;
	color: #bbb;
	line-height: 1;
	transition: transform 0.2s;
	transform: rotate(0deg);
}

.jrwfb-group.is-open .jrwfb-group__chevron {
	transform: rotate(90deg);
}

/* ---- Body (hidden when collapsed) ---- */

.jrwfb-group__body {
	display: none;
	padding: 0 22px 20px;
}

.jrwfb-group.is-open .jrwfb-group__body {
	display: block;
}

/* -------------------------------------------------------------------------
   Swatches grid (2 columns)
   ------------------------------------------------------------------------- */

.jrwfb-swatches {
	display: flex;
	gap: 5px;
	flex-wrap: wrap;
}

.jrwfb-swatch {
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	margin-bottom: 10px;
}

.jrwfb-swatch img {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: block;
	margin-right: 12px;
}

.jrwfb-swatch__label {
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #555;
	line-height: 1.2;
}

.jrwfb-swatch__btn {
	width: 100%;
	height: 50px;
	border: 3px solid #ddd;
	border-radius: 40px;
	background: #fff;
	cursor: pointer;
	padding: 2px 5px;
	padding-right: 20px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	color: #666;
	transition: all 0.2s ease;
	font-family: inherit;
}
.jrwfb-swatch-type-text .jrwfb-swatch__btn {
	padding-left: 20px;
}
.jrwfb-swatch__btn:hover {
	border-color: #767676;
	background: #f9f9f9;
}

.jrwfb-swatch__btn .jrwfb-attr-swatch-title {
	font-weight: bold;
	font-size: 14px;
}

.jrwfb-swatch--selected .jrwfb-swatch__btn .jrwfb-attr-swatch-title {
	color: #000;
}
.jrwfb-swatch--selected .jrwfb-swatch__btn {
	border-color: #767676;
	background: #fff;
	-webkit-box-shadow: 3px 3px 15px 0 rgba(0, 0, 0, .3);
-moz-box-shadow: 3px 3px 15px 0 rgba(0, 0, 0, .3);
box-shadow: 3px 3px 15px 0 rgba(0, 0, 0, .3);
}

/* -------------------------------------------------------------------------
   Panel footer – price
   ------------------------------------------------------------------------- */

.jrwfb-panel__footer {
	padding: 18px 22px;
	border-top: 1px solid #ede9e4;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

.jrwfb-panel__cart {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
}

/* Quantity control */
.jrwfb-qty {
	display: flex;
	align-items: stretch;
	border: 1px solid #ddd;
	border-radius: 6px;
	overflow: hidden;
	height: 42px;
}

.jrwfb-qty__btn {
	width: 36px;
	background: #f5f5f5;
	border: none;
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	color: #333;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s;
	padding: 0;
	font-family: inherit;
	flex-shrink: 0;
}

.jrwfb-qty__btn:hover {
	background: #e8e8e8;
}

.jrwfb-qty__input {
	width: 44px;
	border: none;
	border-left: 1px solid #ddd;
	border-right: 1px solid #ddd;
	text-align: center;
	font-size: 14px;
	font-family: inherit;
	-moz-appearance: textfield;
	outline: none;
}

.jrwfb-qty__input::-webkit-inner-spin-button,
.jrwfb-qty__input::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Add to cart button */
.jrwfb-add-to-cart {
	height: 42px;
	padding: 0 20px;
	background: #1a1a1a;
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
	letter-spacing: 0.03em;
	transition: background 0.2s, opacity 0.2s;
	white-space: nowrap;
}

.jrwfb-add-to-cart:hover:not(:disabled) {
	background: #333;
}

.jrwfb-add-to-cart:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.jrwfb-panel__price {
	font-size: 1.35em;
	font-weight: 700;
	color: #1a1a1a;
}

.jrwfb-panel__price:empty {
	display: none;
}

/* =========================================================================
   Builder Attributes – Swatches
   ========================================================================= */

.jrwfb-builder-attrs-section {
	padding: 16px 0;
	border-bottom: 1px solid #ede9e4;
}

.jrwfb-builder-attrs-section:last-child {
	border-bottom: none;
}

.jrwfb-attr-group {
	padding: 0 18px 16px;
}

.jrwfb-attr-group.jrwfb-children-group {
	padding: 0 18px 16px;
}

.jrwfb-children-swatches {
	display: flex;
    gap: 10px;
	flex-wrap: wrap;
}

.jrwfb-child-swatch .jrwfb-swatch__btn img {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: block;
	margin-right: 12px;
}
.jrwfb-attr-group__label {
	display: block;
	font-size: 22px;
	font-weight: 600;
	margin-bottom: 20px;
	color: #222;
}

.jrwfb-attr-group__label .required {
	color: #e74c3c;
}

/* Swatches grid */



.jrwfb-swatch__price {
	display: none;
}

.jrwfb-swatch__label {
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #666;
	line-height: 1.2;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Price display */
.jrwfb-panel__price-label {
	font-size: 12px;
	color: #666;
	display: block;
	margin-bottom: 0;
}

.jrwfb-panel__price-value {
	display: block;
	font-size: 30px;
	font-weight: 700;
	color: #1a1a1a;
}

/* -------------------------------------------------------------------------
   Discounted price display
   ------------------------------------------------------------------------- */

.jrwfb-panel__price-original {
	display: inline-block;
	font-size: 16px;
	font-weight: 400;
	color: #aaa;
	text-decoration: line-through;
	margin-right: 4px;
}

.jrwfb-panel__price-discount-badge {
	display: inline-block;
	font-size: 12px;
	font-weight: 700;
	color: #fff;
	background: #e74c3c;
	border-radius: 4px;
	padding: 2px 6px;
	vertical-align: middle;
	margin-right: 6px;
	letter-spacing: 0.02em;
}

/* -------------------------------------------------------------------------
   Price "from" label
   ------------------------------------------------------------------------- */

.jrwfb-price-from {
	padding: 12px 18px 4px;
	font-size: 13px;
	color: #888;
}

.jrwfb-price-from__label {
	margin-right: 4px;
}

.jrwfb-price-from__value {
	font-weight: 700;
	color: #1a1a1a;
}

/* Responsive swatches */
@media (max-width: 700px) {

}

