/**
 * BBC Bullion Shop — Styles
 *
 * Dark theme with gold accents, matching the Bullion Banker design system.
 */

/* ── Reset & Container ──────────────────────────────── */
.bbc-shop {
	position: relative;
	width: 100%;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	color: #ffffff;
	box-sizing: border-box;

	--container-width: 1320px;
}

.bbc-shop *,
.bbc-shop *::before,
.bbc-shop *::after {
	box-sizing: border-box;
}

/* ── Toolbar ────────────────────────────────────────── */

.bbc-shop__toolbar-wrapper {
	padding: 20px 0;
	border-block: 1px solid #2F2F2F;
}

.bbc-shop__toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	max-width: var(--container-width);
	width: 90%;
	margin: 0 auto;
}

/* ── Category Filter Pills ──────────────────────────── */
.bbc-shop__categories {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.bbc-shop__cat-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px;
	border: 1.5px solid #2f2f2f;
	border-radius: 4px;
	background: transparent;
	color: #BFBFBF;
	cursor: pointer;
	transition: all 0.25s ease;
	white-space: nowrap;

	font-family: "Inter Display";
	font-size: 16px;
	font-weight: 500;
	line-height: 1.25;
}

.bbc-shop__cat-btn:hover {
	color: #ffffff;
	border-color: #e2b9676c;
}

.bbc-shop__cat-btn--active {
	color: #000000;
	border-color: transparent;
	background: linear-gradient(135deg, #E2B967 0%, #CDA75A 100%);
	box-shadow: 0 4px 20px 0 rgba(212, 175, 55, 0.28), 0 1px 0 0 rgba(255, 255, 255, 0.18) inset;
}

.bbc-shop__cat-btn--active:hover {
	color: #000000;
}

/* ── Sort Dropdown ──────────────────────────────────── */
.bbc-shop__sort {
	position: relative;
	margin-left: auto;
}

.bbc-shop__sort-wrap {
	position: relative;
}

.bbc-shop__sort-toggle {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 10px 20px;
	background: transparent;
	cursor: pointer;
	transition: all 0.25s ease;
	white-space: nowrap;

	border-radius: 4px;
	border: 1.5px solid #2F2F2F;
	color: #BFBFBF;

	/* Button */
	font-family: "Inter Display";
	font-size: 16px;
	font-weight: 500;
	line-height: 1.25;
}

.bbc-shop__sort-toggle:hover {
	border-color: rgba(226, 185, 103, 0.5);
	color: #ffffff;
}

.bbc-shop__sort-arrow {
	transition: transform 0.25s ease;
	flex-shrink: 0;
}

.bbc-shop__sort-wrap--open .bbc-shop__sort-arrow {
	transform: rotate(180deg);
}

.bbc-shop__sort-dropdown {
	display: none;
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	min-width: 180px;
	padding: 6px 0;
	margin: 0;
	list-style: none;
	background: #1a1a1a;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 10px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
	z-index: 100;
	overflow: hidden;
}

.bbc-shop__sort-wrap--open .bbc-shop__sort-dropdown {
	display: block;
	animation: bbcShopDropIn 0.2s ease;
	list-style: none;
	padding: 0;
}

@keyframes bbcShopDropIn {
	from {
		opacity: 0;
		transform: translateY(-6px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.bbc-shop__sort-option {
	padding: 10px 18px;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.7);
	cursor: pointer;
	transition: all 0.15s ease;
}

.bbc-shop__sort-option:hover {
	background: rgba(226, 185, 103, 0.1);
	color: #e2b967;
}

.bbc-shop__sort-option--active {
	color: #e2b967;
	font-weight: 600;
}

/* ── Product Grid ───────────────────────────────────── */
.bbc-shop__grid-container {
	max-width: var(--container-width);
	margin: 0 auto;
}

.bbc-shop__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	column-gap: 16px;
	row-gap: 40px;
}

.bbc-shop__content {
	min-height: 200px;
	padding-top: clamp(1.5rem, 0.6505rem + 3.6246vw, 5rem);
	display: flex;
	flex-direction: column;
	gap: clamp(1.5rem, 0.6505rem + 3.6246vw, 5rem);
}

/* ── Product Card ───────────────────────────────────── */
.bbc-shop__card {
	position: relative;
	display: flex;
	gap: 16px;
	flex-direction: column;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
}

.bbc-shop__card-link {
	text-decoration: none;
	color: inherit;
	display: block;
}

/* ── Badge ──────────────────────────────────────────── */
.bbc-shop__badge {
	position: absolute;
	top: 12px;
	right: 12px;
	padding: 4px 10px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.03em;
	z-index: 2;
	line-height: 1.4;
	pointer-events: none;
}

.bbc-shop__badge--hot {
	background: rgba(220, 50, 40, 0.15);
	color: #e8443a;
}

.bbc-shop__badge--bestselling {
	background: rgba(226, 185, 103, 0.15);
	color: #e2b967;
}

.bbc-shop__badge--new {
	background: rgba(76, 175, 80, 0.15);
	color: #66bb6a;
}

.bbc-shop__badge--limited {
	background: rgba(156, 39, 176, 0.15);
	color: #ba68c8;
}

/* ── Sparkle Star ───────────────────────────────────── */
.bbc-shop__sparkle {
	position: absolute;
	top: 14%;
	right: 18%;
	z-index: 3;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.4s ease 0.1s, transform 0.4s ease 0.1s;
	filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.8));
}

.bbc-shop__card:hover .bbc-shop__sparkle {
	opacity: 1;
	animation: bbcSparkle 5s linear 0.4s infinite;
}

@keyframes bbcSparkle {

	0% {
		transform: rotate(0);
	}

	100% {
		transform: rotate(360deg);
	}
}

/* ── Card Image ─────────────────────────────────────── */
.bbc-shop__card-image-wrap {
	position: relative;
	border-radius: 10px;
	border: 1px solid #2F2F2F;
	background: #070605;
	overflow: hidden;
	transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

.bbc-shop__card:hover .bbc-shop__card-image-wrap {
	border-color: rgba(226, 185, 103, 0.35);
	box-shadow:
		0 0 15px rgba(212, 175, 55, 0.12),
		0 0 40px rgba(212, 175, 55, 0.06);
}

.bbc-shop__card-image {
	position: relative;
	width: 100%;
	aspect-ratio: 316 / 356;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	overflow: hidden;
}

.bbc-shop__card-image img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	transition: transform 0.45s ease, filter 0.45s ease;
}

.bbc-shop__card:hover .bbc-shop__card-image img {
	transform: scale(1.06);
	filter: drop-shadow(0 2px 30px rgba(255, 255, 255, 0.40));
}

/* ── Add to Cart Button ─────────────────────────────── */
.bbc-shop__add-to-cart {
	position: absolute;
	bottom: 8px;
	left: 0;
	right: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 16px;
	background: transparent;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border: none;
	cursor: pointer;
	z-index: 4;
	transform: translateY(100%);
	opacity: 0;
	transition: transform 0.35s ease, opacity 0.35s ease;
}

.bbc-shop__card:hover .bbc-shop__add-to-cart {
	transform: translateY(0);
	opacity: 1;
}

.bbc-shop__add-to-cart-text {
	color: #E2E2E2;
	font-family: "Inter Display", sans-serif;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.04em;
	line-height: 1;
}

.bbc-shop__cart-icon {
	color: #E2B967;
	flex-shrink: 0;
	transition: transform 0.2s ease;
}

.bbc-shop__add-to-cart:hover .bbc-shop__cart-icon {
	transform: scale(1.15);
}

.bbc-shop__add-to-cart:hover .bbc-shop__add-to-cart-text {
	color: #E2B967;
}

/* Add to Cart loading state */
.bbc-shop__add-to-cart--loading {
	pointer-events: none;
}

.bbc-shop__add-to-cart--loading .bbc-shop__add-to-cart-text,
.bbc-shop__add-to-cart--loading .bbc-shop__cart-icon {
	opacity: 0;
}

.bbc-shop__add-to-cart--loading::after {
	content: '';
	position: absolute;
	width: 18px;
	height: 18px;
	border: 2px solid rgba(226, 185, 103, 0.2);
	border-top-color: #E2B967;
	border-radius: 50%;
	animation: bbcShopSpin 0.6s linear infinite;
}

/* Add to Cart success state */
.bbc-shop__add-to-cart--added .bbc-shop__add-to-cart-text {
	color: #66bb6a;
}

.bbc-shop__add-to-cart--added .bbc-shop__cart-icon {
	color: #66bb6a;
}

/* ── Card Info ──────────────────────────────────────── */
.bbc-shop__card-info {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.bbc-shop__card-title {
	display: flex;
	align-items: baseline;
	gap: 8px;
	flex-wrap: wrap;
	margin: 0;
}

.bbc-shop__card-title a {
	text-decoration: none;
	color: #BFBFBF;
	transition: color 0.2s ease;

	/* H4 */
	font-family: Mirella !important;
	font-size: 24px;
	font-weight: 400;
	line-height: 1;
}

.bbc-shop__card-title a:hover {
	color: #E2B967;
}

.bbc-shop__card-weight {
	color: #E2B967;

	/* Number Text */
	font-family: "JetBrains Mono";
	font-size: 14px;
	font-weight: 400;
	line-height: 1.25;
	text-transform: uppercase;
}

.bbc-shop__card-price {
	color: #7C7C7C;

	/* Peragraph Text */
	font-family: "Inter Display";
	font-size: 16px;
	font-weight: 400;
	line-height: 1.4;
}

/* Override WooCommerce price HTML styles within our cards */
.bbc-shop__card-price del {
	opacity: 0.5;
}

.bbc-shop__card-price ins {
	text-decoration: none;
	font-weight: 600;
}

.bbc-shop__card-price .woocommerce-Price-amount {
	color: #7C7C7C;
}

/* ── Pagination ─────────────────────────────────────── */
.bbc-shop__pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
}

.bbc-shop__page-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 8px 12px;
	border: 1px solid #2F2F2F;
	border-radius: 4px;
	background: transparent;
	color: #BFBFBF;
	cursor: pointer;
	transition: all 0.2s ease;
	white-space: nowrap;

	/* Button */
	font-family: "Inter Display";
	font-size: 16px;
	font-weight: 500;
	line-height: 1.25;
	height: 40px;
}

.bbc-shop__page-btn:hover:not(.bbc-shop__page-btn--disabled) {
	border-color: rgba(226, 185, 103, 0.4);
	color: #e2b967;
}

.bbc-shop__page-btn--disabled {
	opacity: 0.35;
	cursor: default;
	pointer-events: none;
}

.bbc-shop__page-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 12px;
	border: none;
	border-radius: 4px;
	background: #0C0C0C;
	cursor: pointer;
	transition: background 0.2s ease;

	color: #BFBFBF;

	/* Number Text */
	font-family: "JetBrains Mono";
	font-size: 14px;
	font-weight: 700;
	line-height: 1.28;
	height: 40px;
	aspect-ratio: 1;
}

.bbc-shop__page-num:hover {
	background: linear-gradient(135deg, #E2B967 0%, #CDA75A 100%);
	color: #0C0C0C;
}

.bbc-shop__page-num--active {
	background: linear-gradient(135deg, #E2B967 0%, #CDA75A 100%);
	color: #0C0C0C;
	font-weight: 700;
}

.bbc-shop__page-num--active:hover {
	color: #000000;
}

.bbc-shop__page-dots {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 36px;
	color: rgba(255, 255, 255, 0.3);
	font-size: 14px;
	user-select: none;
}

/* ── Empty State ────────────────────────────────────── */
.bbc-shop__empty {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 300px;
	padding: 40px;
}

.bbc-shop__empty p {
	font-size: 15px;
	color: rgba(255, 255, 255, 0.4);
	margin: 0;
}

/* ── Loading Overlay ────────────────────────────────── */
.bbc-shop__loading {
	display: none;
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	z-index: 50;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
}

.bbc-shop__loading--active {
	display: flex;
}

.bbc-shop__spinner {
	width: 36px;
	height: 36px;
	border: 3px solid rgba(255, 255, 255, 0.1);
	border-top-color: #d4a44a;
	border-radius: 50%;
	animation: bbcShopSpin 0.7s linear infinite;
}

@keyframes bbcShopSpin {
	to {
		transform: rotate(360deg);
	}
}

/* ── Transition for AJAX content swap ───────────────── */
.bbc-shop__content--fading {
	opacity: 0.4;
	transition: opacity 0.2s ease;
	pointer-events: none;
}

.bbc-shop__content--visible {
	opacity: 1;
	transition: opacity 0.25s ease;
}

/* ── Card entrance animation removed in favor of global .bbc-animate ── */

/* ── Responsive ─────────────────────────────────────── */

/* Tablets */
@media (max-width: 1024px) {
	.bbc-shop__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* ── Category Cards ─────────────────────────────────── */
.bbc-category-card {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	border-radius: 10px;
}

.bbc-category-card__image-wrap {
	position: relative;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.05);
	background: #070605;
	overflow: hidden;
	transition: all 0.4s ease;
}

.bbc-category-card__image-wrap::before,
.bbc-category-card__image-wrap::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(90deg, rgba(212, 175, 55, 0) 0%, rgba(212, 175, 55, 1) 50%, rgba(212, 175, 55, 0) 100%);
	opacity: 0;
	transition: opacity 0.4s ease;
	z-index: 5;
}

.bbc-category-card__image-wrap::before {
	top: 0;
}

.bbc-category-card__image-wrap::after {
	bottom: 0;
}

.bbc-category-card:hover .bbc-category-card__image-wrap {
	border-color: transparent;
}

.bbc-category-card:hover .bbc-category-card__image-wrap::before,
.bbc-category-card:hover .bbc-category-card__image-wrap::after {
	opacity: 1;
}

.bbc-category-card__image {
	position: relative;
	width: 100%;
	aspect-ratio: 316 / 356;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	overflow: hidden;
	z-index: 1;
}

.bbc-category-card__image img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	transition: transform 0.4s ease, filter 0.4s ease;
}

.bbc-category-card:hover .bbc-category-card__image img {
	transform: scale(1.05);
	filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.3));
}

.bbc-category-card__sparkle {
	position: absolute;
	top: 15%;
	right: 20%;
	z-index: 3;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.4s ease 0.1s, transform 0.4s ease 0.1s;
	filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.8));
}

.bbc-category-card:hover .bbc-category-card__sparkle {
	opacity: 1;
	animation: bbcSparkle 5s linear 0.4s infinite;
}

.bbc-category-card__content {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	text-align: center;
	padding: 40px 20px 24px;
	z-index: 4;
	opacity: 0;
	transform: translateY(10px);
	transition: all 0.4s ease;
	pointer-events: none;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);
}

.bbc-category-card:hover .bbc-category-card__content {
	opacity: 1;
	transform: translateY(0);
}

.bbc-category-card__title {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 16px;
	color: #e2b967;
	font-weight: 500;
}

.bbc-category-card__arrow {
	transition: transform 0.3s ease;
}

.bbc-category-card:hover .bbc-category-card__arrow {
	transform: translateX(4px);
}

/* Small Tablets */
@media (max-width: 768px) {

	.bbc-shop__toolbar {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}

	.bbc-shop__sort {
		margin-left: 0;
	}

	.bbc-shop__grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.bbc-shop__card-title {
		font-size: 13px;
	}

	.bbc-shop__card-image {
		padding: 16px;
	}
}

/* Mobile */
@media (max-width: 480px) {

	.bbc-shop__categories {
		gap: 6px;
	}

	.bbc-shop__categories::-webkit-scrollbar {
		display: none;
	}

	.bbc-shop__cat-btn {
		padding: 6px 14px;
		font-size: 12px;
	}

	.bbc-shop__grid {
		grid-template-columns: 1fr;
	}

	.bbc-shop__card-title {
		font-size: 12px;
	}

	.bbc-shop__card-weight {
		font-size: 10px;
	}

	.bbc-shop__card-image {
		padding: 12px;
	}

	.bbc-shop__pagination {
		gap: 2px;
	}

	.bbc-shop__page-btn {
		padding: 6px 10px;
		font-size: 12px;
	}

	.bbc-shop__page-num {
		width: 32px;
		height: 32px;
		font-size: 12px;
	}

	.bbc-shop__sort-toggle {
		font-size: 12px;
	}
}

/* ── Mobile/Touch Hover States (Always Visible) ─────── */
@media (max-width: 1024px) {
	/* Shop Card Default Hover State */
	.bbc-shop__card .bbc-shop__card-image-wrap {
		border-color: rgba(226, 185, 103, 0.35);
		box-shadow: 0 0 15px rgba(212, 175, 55, 0.12), 0 0 40px rgba(212, 175, 55, 0.06);
	}
	.bbc-shop__card .bbc-shop__card-image img {
		transform: scale(1.06);
		filter: drop-shadow(0 2px 30px rgba(255, 255, 255, 0.40));
	}
	.bbc-shop__card .bbc-shop__sparkle {
		opacity: 1;
		animation: bbcSparkle 5s linear 0.4s infinite;
	}
	.bbc-shop__card .bbc-shop__add-to-cart {
		transform: translateY(0);
		opacity: 1;
	}

	/* Category Card Default Hover State */
	.bbc-category-card .bbc-category-card__image-wrap {
		border-color: transparent;
	}
	.bbc-category-card .bbc-category-card__image-wrap::before,
	.bbc-category-card .bbc-category-card__image-wrap::after {
		opacity: 1;
	}
	.bbc-category-card .bbc-category-card__image img {
		transform: scale(1.05);
		filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.3));
	}
	.bbc-category-card .bbc-category-card__sparkle {
		opacity: 1;
		animation: bbcSparkle 5s linear 0.4s infinite;
	}
	.bbc-category-card .bbc-category-card__content {
		opacity: 1;
		transform: translateY(0);
	}
	.bbc-category-card .bbc-category-card__arrow {
		transform: translateX(4px);
	}
}