/* Link */
.dwe_abs_link {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	text-indent: -99999px;
	z-index: 1;
}

/* Item */
.dwe-brand-grid__item {
	position: relative;
}
.dwe-brand-grid__item .et_pb_button_wrapper {
	position: relative;
	z-index: 2;
}
.dwe-brand-grid__button {
	display: inline-block;
}

/* Thumbnail */
.dwe-brand-grid__thumbnail img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
}

/* Row */
.dwe-brand-grid__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}
/* Long brand names truncate instead of wrapping and squeezing the count
   onto two lines; the "Count Below Name" toggle is the escape hatch. */
.dwe-brand-grid__row:not(.dwe-brand-grid__row--stack) .dwe-brand-grid__title {
	min-width: 0;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}
.dwe-brand-grid__row:not(.dwe-brand-grid__row--stack) .dwe-brand-grid__count-wrap,
.dwe-brand-grid__row:not(.dwe-brand-grid__row--stack) .dwe-brand-grid__count {
	flex-shrink: 0;
	white-space: nowrap;
}
.dwe-brand-grid__row--stack {
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
}

/* Description */
.dwe-brand-grid__description {
	margin: 0;
}

/* Overlay - a white panel covering the card, revealed on hover. Inset from
   the card's edges so it reads as its own framed panel rather than a flush
   full-bleed cover. Sits above everything (including the normal button) via
   z-index, but stays pointer-events:none so the card's own link underneath
   is still clickable - only the overlay's own button re-enables clicks. */
.dwe-brand-grid__overlay {
	position: absolute;
	inset: 20px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	border-radius: 12px;
	text-align: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s ease;
	overflow: auto;
	z-index: 3;
}
.dwe-brand-grid__item:hover .dwe-brand-grid__overlay,
.dwe-brand-grid__item:focus-within .dwe-brand-grid__overlay {
	opacity: 1;
}
.dwe-brand-grid__overlay .et_pb_button_wrapper {
	pointer-events: auto;
}
.dwe-brand-grid__overlay-title,
.dwe-brand-grid__overlay-description {
	margin: 0;
}

/* Empty */
.dwe-brand-grid__empty {
	width: 100%;
	text-align: center;
}

/* Layout 1 */
.dwe-brand-grid__wrapper--layout1 .dwe-brand-grid__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 24px 18px 18px;
	background: #fff;
}
.dwe-brand-grid__wrapper--layout1 .dwe-brand-grid__thumbnail {
	margin-bottom: 16px;
}
.dwe-brand-grid__wrapper--layout1 .dwe-brand-grid__content {
	width: 100%;
	border-top: 1px solid #e2e2e2;
}
.dwe-brand-grid__wrapper--layout1 .dwe-brand-grid__row {
	padding-top: 12px;
	margin-bottom: 12px;
}
.dwe-brand-grid__wrapper--layout1 .dwe-brand-grid__description {
	font-size: 13px;
	color: #666;
	margin-bottom: 12px;
}

/* Layout 2 - logo left (Brand Item background settings tint the card; falls
   back to a neutral tint until set), name/description/button to the right.
   Product count is a small tag above the name - kept out of the image so it
   stays legible no matter how small the thumbnail is set. */
.dwe-brand-grid__wrapper--layout2 .dwe-brand-grid__item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 15px;
	background: #f2f3f1;
	text-align: left;
}
.dwe-brand-grid__wrapper--layout2 .dwe-brand-grid__thumbnail {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 10px;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 8px 20px -12px rgba(0,0,0,.35);
}
.dwe-brand-grid__wrapper--layout2 .dwe-brand-grid__thumbnail img {
	display: block;
	width: auto;
	max-width: 100%;
	object-fit: contain;
}
.dwe-brand-grid__wrapper--layout2 .dwe-brand-grid__content {
	flex: 1;
	min-width: 0;
}
.dwe-brand-grid__wrapper--layout2 .dwe-brand-grid__count {
	display: inline-block;
	margin-bottom: 6px;
	white-space: nowrap;
}
.dwe-brand-grid__wrapper--layout2 .dwe-brand-grid__title {
	display: block;
	margin: 0 0 4px;
}
.dwe-brand-grid__wrapper--layout2 .dwe-brand-grid__description {
	font-size: 13px;
	color: #666;
	margin: 4px 0 10px;
}
.dwe-brand-grid__wrapper--layout2 .dwe-brand-grid__button {
	white-space: nowrap;
}

/* Layout 3 */
.dwe-brand-grid__wrapper--layout3 .dwe-brand-grid__item {
	display: flex;
	flex-direction: column;
	align-items: center;
}
.dwe-brand-grid__wrapper--layout3 .dwe-brand-grid__content {
	width: 100%;
}
.dwe-brand-grid__wrapper--layout3 .dwe-brand-grid__visual {
	position: relative;
	width: 100%;
	aspect-ratio: 1/1;
	border-radius: 20px;
	background: #f4f4f4;
	display: flex;
	align-items: center;
	justify-content: center;
}
.dwe-brand-grid__wrapper--layout3 .dwe-brand-grid__thumbnail {
	width: 64%;
	aspect-ratio: 1/1;
	border-radius: 50%;
	background: #fff;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 12px 24px -14px rgba(0,0,0,.4);
}
.dwe-brand-grid__wrapper--layout3 .dwe-brand-grid__thumbnail img {
	width: 60%;
	height: 60%;
	object-fit: contain;
}
.dwe-brand-grid__wrapper--layout3 .dwe-brand-grid__description {
	font-size: 12px;
	color: #666;
	margin-bottom: 12px;
}
