:root {
	--darkpurplegradient: linear-gradient(45deg, #050061, #1700D5);
	--altpurplegradient: linear-gradient(45deg, #1700D5, #ADA2FF);
	--extralightpurplegradient: linear-gradient(180deg, #BDB7EA, #DAD7FF);
	--lightpurplegradient: radial-gradient(#3AA066, #64D898);
	--extralightpurple: #DAD7FF;
	--lightpurple: #9D8FDB;
	--midpurple: #483D98;
	--darkpurple: #231F68;
	--opacitypurple: rgba(157, 143, 219, 0.3);
	--extralightcyan: #CCFFE5;
	--lightcyan: #8FEFC1;
	--midcyan: #64D898;
	--darkcyan: #39B76F;
	--extralightgray: #F9F9F9;
	
}


.bam-customizer{
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding:0px;
	max-height: 75vh;

}



#bam-user-image{
    background: linear-gradient(0deg, #1700D5, #050061);
	width: 30vh;
	height: auto;
border-radius: 16px;
}
		
.bam-tabs{
    overflow-x: auto;
    white-space: nowrap;
    box-sizing: border-box;
    padding-left: 8px;
    padding-right: 8px;
    gap: 12px;
    display: flex;
    flex-wrap: nowrap;           /* ✅ hide scrollbar on Firefox */
}

/* ✅ Hide scrollbar on WebKit (Chrome, Safari) */
.bam-tabs::-webkit-scrollbar{
    display: none;
}

.bam-tab {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    box-sizing: border-box;
}

.bam-tab img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}



.bam-user-name{
	display: block;
	text-align: left;
	float: left;
	color: white;
	align-self: center;
}	
		
.bam-category-container{
	width: 100%;
	margin: 0 auto; /* ✅ Centers it horizontally */
	text-align: center;
	grid-column: 1 / span 2;
	height: 100%;
	min-height: 200px;
	overflow-x: hidden; /* was: auto */
    overflow-y: auto;
}
		
.bam-preview{
	width: 100%;
	margin: 8px; /* ✅ Centers it horizontally */
	text-align: center;
	grid-column: 1 / span 2;
	grid-row: 1;
	display: flex;
    align-items: center;
	justify-content: center;
	position: relative;
	z-index: 0;


}
		
.bam-tab{
	cursor: pointer;
	padding: 0;
	margin: 0;
	border-radius: 50%;
	background: rgba(0,0,0,0);
	color: white;
	border: none;
	font-size: 14px;
 flex: 0 0 40px;
height: 40px;
	transition: background 0.5s;
	filter: brightness(0) saturate(100%) invert(48%) sepia(29%) saturate(5783%) hue-rotate(226deg) brightness(99%) contrast(103%);
}
		
.bam-tab img{
	width: 70%;
	vertical-align: middle;
}
		
.bam-tab:hover{
	background: var(--opacitypurple);
}
		
.bam-tab.active{
	filter: none;
	background: var(--altpurplegradient);
	transition: background 0.5s;
}
	
.bam-category {
    display: grid;
	grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    width: 100%;
    overflow-y: auto;
    padding: 4px;
	max-height: 100%;
}
		
.bam-item,
.none{
    position: relative;
    aspect-ratio: 1 / 1;
    width: 100%;
    overflow: visible;
    border: 2px solid transparent;
    border-radius: 16px;
    background: transparent;
    display: flex;              /* ✅ Enable flex */
    align-items: center;        /* ✅ Vertically center */
    justify-content: center;    /* ✅ Horizontally center */
    padding: 10px;              /* Optional: add padding for better spacing */
    transition: border .75s;
	
}
		
.bam-item.rare{
	background: linear-gradient(135deg, #1700D5, transparent, transparent) padding-box,
              transparent border-box;
	border: 2px solid transparent;
	transition: border 1s;
}

.bam-item.rare:after{
	content: 'Rare';
	background: linear-gradient(45deg, #00846E, #00F067);
		background: linear-gradient(45deg, #1700D5, #1700D5, #866BFF) padding-box,
              linear-gradient(45deg, #1700D5, #DAD7FF, #ADA2FF) border-box;
	border-radius: 16px 0px 16px 0px;
	border-right: 2px solid transparent;
	border-left: 2px solid transparent;
	padding: 4px 6px;
	position: absolute;
	top: 0px;
	left: 0px;
	font-size: 10pt;
	font-weight: 600;
	color: #fff; 
}
		
.bam-item.locked{
	pointer-events: none;
	position: relative;
}
		
.bam-item.locked .lock-overlay{
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: rgba(0, 0, 0, 0.6);
	color: white;
	padding: 5px 10px;
	border-radius: 4px;
	font-weight: bold;
}
		
.bam-item.locked.rare img{
	opacity: 0.5;
}
		
.bam-item.locked.rare img.coin-icon{
	opacity: 1;
	width: 20px;
	height: 20px;
	filter: none;
}
		
.bam-item .price-badge.buy-item-button{
    position: absolute;
    bottom: 0px;
    transform: translateX(-50%);
    background: var(--darkpurplegradient);
    color: white;
    padding: 4px;
    border-radius: 8px 8px 16px 16px;
    font-weight: 600;
    font-size: 12px;
	z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    cursor: pointer;
}

/* Coin icon in button */
.bam-item .coin-icon{
    width: 16px;
    height: 16px;
    margin-right: 6px;
	margin-left: 0;
}

.bam-item img,
.none img,
.bam-none-image {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    display: block;
    margin: auto;
    z-index: 1;
    position: relative;
    top: auto;
    transform: none;
}

.bam-item.locked img.coin-icon{
    width: 16px;
    height: 16px;
    margin-right: 6px;
	filter: none;
}

.bam-item-wrapper{
    width: 100%;
    height: 100%;
}

.bam-item.selected{
	background: #1700D5;
}

.bam-item.selected.rare{
		background: linear-gradient(135deg, #CCFFE5, #1700D5, #1700D5) padding-box,
              transparent border-box;
}
		
.lock-overlay{
	position: absolute;
	top: 5px;
	right: 5px;
	background: rgba(0, 0, 0, 0.7);
	color: white;
	font-size: 12px;
	padding: 4px;
	border-radius: 50%;
}

.back-button{
				filter: brightness(0) saturate(100%) invert(100%) sepia(100%) saturate(0%) hue-rotate(194deg) brightness(103%) contrast(105%);
	width: 40px;
	height: 40px;
	padding: 0;
	margin-top: 24px;
	margin-left: 8px;
}
		
.bam-items-outer-wrapper{
	display: flex;
  align-items: stretch;
	margin: 0;
	width: 100%;
  flex-grow: 1;      /* This fills the remaining height */
  overflow-x: hidden; /* was: auto */
    overflow-y: auto;
    max-width: 100%;
  -webkit-overflow-scrolling: touch; /* smooth scroll on iOS */
	white-space: nowrap;
	height: 100%;
	    border-radius: 0 0 16px 16px;
    background: #070087;
}

.bam-items-inner-wrapper{
	position: relative;
	display: block;
	margin-bottom: 0px;
	grid-column: 2;
	grid-row: 1;
	height: auto;
	padding: 0;
	margin: 0px;
	width: 100%;
}
		
.bam-tabs{
	background: linear-gradient(45deg, #1700D5, #4129FF);
	position: relative;
	width: 100%;
	grid-column: 1 / span 2;
	flex-wrap: nowrap;
	overflow-x: auto;
	vertical-align: middle;
	display: flex;
	gap: 24px;
	padding: 16px;
	z-index: 9999;
	border-radius: 16px 16px 0 0;
}

#bam-category-title{
	text-align: center;
	font-size: 16px;
	font-weight: 700;
	white-space: nowrap;
	color: white;
	margin-left: 0px;
	margin-bottom: 8px;
}

.bam-tabs::-webkit-scrollbar{
	display: none;
}
		
.user-coins{
	display: flex;
	justify-content: end;
	gap: 10px;
	margin-top: 0px;
}
					
.bam-preview-wrapper{
	width: 100%;
	display: flex;
	text-align: center;
	border-radius: 0;
	
			
}
		
.buy-item-button{
	width: 100%;
	border: 0;
	border-radius: 16px;
	position: relative;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
}
		
.price-badge{
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(to right, #7f6ee9, #c1c8ff);
    color: white;
    padding: 0;
    border-radius: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    pointer-events: auto;
    z-index: 2;
    white-space: nowrap;
    opacity: 1 !important;
    filter: none !important;
	display: inline-flex; /* ✅ Ensures tight layout */
    align-items: center;   /* ✅ Vertical center */
    justify-content: center; /* ✅ Horizontal center */
}
	
.bam-item.locked{
    position: relative;
    pointer-events: none; /* disables item clicks */
}

.bam-item .buy-item-button{
    pointer-events: auto; /* re-enable click just on the price badge */
    cursor: pointer;
    z-index: 10;
    position: relative;
		animation: glowPulse 1.5s infinite linear;

}
	
		
.bam-item.locked.rare img{
	filter: contrast(60%);
}

		
@keyframes glowPulse{
    0%, 100% {
        filter: none;
    }
    50% {
        
		filter: brightness(0) saturate(100%) invert(91%) sepia(43%) saturate(460%) hue-rotate(71deg) brightness(100%) contrast(88%);
    }
}

@media only screen and (min-width: 768px){
		.bam-customizer {
			max-width: 100%;
			display: grid;
			grid-template-columns: 2fr 5fr;
			grid-template-rows: 1fr;
			grid-column-gap: 4px;
			grid-row-gap: 0px;
			padding: 25px;
			align-items: start; /* ✅ Vertically align grid items */
			vertical-align: top;
			height: 100%;
		}
			
		.bam-items-outer-wrapper{
			width: 100%;
			display: block;
			grid-column-gap: 0px;
			grid-row-gap: 0px;
			grid-column: 2;
			height: 100%;
			margin: 0;
			padding: 0;
			vertical-align: middle;
			grid-column: 2;
			grid-row: 2;
		}

		.bam-category-container{
			width: 100%;
			margin: 0;
			overflow-x: hidden;
			overflow-y: auto;
			
		}
	
		.bam-preview{
			width: 100%;
			margin: 0 auto;
			padding: 0;
		}
	
		.back-button{
			grid-row: 2;
		}
			
		.bam-preview-wrapper{
		    width: 100%;
			padding: 0;
			display: grid;
			grid-template-columns: 1fr;
			grid-row: 1 / span 2;
			background: transparent;
			border-bottom: 0;
			height: 100%;
		}

		.bam-items-inner-wrapper{
			position: relative;
			display: grid;
			grid-template-columns: repeat(1, 1fr);
			grid-template-columns: 1fr 5fr;
			gap: 0px;
			grid-column: 2;
			grid-row: 1;
			height: fit-content;
		}
			
		#bam-category-title{
			background: var(--darkpurplegradient);
			display: flex;
			align-items: center; /* ✅ Vertically center text */
			justify-content: left; /* Optional: center horizontally */
			height: 100%;
			border-radius: 16px 0 0 0;
			padding-left: 16px;
			margin: 0;
			color: white;
			font-weight: 400;
			grid-column: 1;
		}

		.bam-tabs{
			border-radius: 0 16px 0 0;
			position: relative;
			width: 100%;
			flex-wrap: nowrap;
			overflow-x: auto;
			padding: 0;
			margin: 0;
			vertical-align: middle;
			display: flex;
			gap: 24px;
			overflow-x: auto;
			padding: 16px;
			z-index: 9999;
			grid-column: 2;
			border-top: 0;
		}

		.bam-tabs::-webkit-scrollbar{
			display: none; /* Chrome, Safari */
		}

		.bam-tab{
			display: flex;
			align-items: center;
			justify-content: center;
			transition: background 0.5s ease-in-out;
		}

		.bam-tab.active{
			filter: none;
			background: var(--opacitypurple);
			transition: background 0.5s ease-in-out;
		}
			
		.bam-category{
			display: grid;
			grid-template-columns: repeat(6, 1fr);
			max-height: 300px;
			min-height: 250px;
		}
	
		.bam-preview img{
			max-width: 100%;
		}
		
		#user-coins-display{
			grid-row: 1;
		}
		
	
		#bam-user-image{
    background: linear-gradient(0deg, #1700D5, #050061);
	width: 100%;
	max-width: 300px;
	height: auto;
	border-radius: 16px;
			padding: 0;
			margin: 0;
			
		}

}

@media screen and (max-width: 480px) {
  body {
    overscroll-behavior-x: none;
    touch-action: pan-y;
  }

  .bam-tabs {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .bam-tabs::-webkit-scrollbar {
    display: none;
  }
}
