/* BME Premium Extras v1.3 */

/* —— Larger, more readable product grids —— */
.bme-premium__grid {
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1.15rem;
}

.bme-pcard__img {
	height: 175px;
}

.bme-pcard__title {
	font-size: 0.95rem;
	line-height: 1.4;
	min-height: 2.7em;
}

.bme-pcard__price {
	font-size: 1.05rem;
}

.bme-pcard__btn {
	padding: 0.65rem;
	font-size: 0.88rem;
}

body.bme-premium-active.woocommerce ul.products {
	grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	gap: 1.15rem !important;
}

body.bme-premium-active.woocommerce ul.products li.product .woocommerce-loop-product__link img {
	height: 132px;
}

body.bme-premium-active.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-size: 0.85rem !important;
	line-height: 1.25 !important;
	min-height: 0;
}

body.bme-premium-active.woocommerce ul.products li.product .price {
	font-size: 1.05rem !important;
}

/* —— Category tiles —— */
.bme-premium__cat-tiles {
	padding: 0.5rem 0 1.5rem;
}

.bme-premium__cat-tiles-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
}

.bme-cat-tile {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.35rem;
	padding: 1.25rem 1.15rem;
	border-radius: var(--bme-p-radius);
	background: linear-gradient(145deg, #fff 0%, #f8fafc 100%);
	border: 1px solid var(--bme-p-border);
	box-shadow: var(--bme-p-shadow);
	text-decoration: none !important;
	color: var(--bme-p-text);
	transition: transform 0.2s ease, border-color 0.2s ease;
}

.bme-cat-tile:hover {
	transform: translateY(-2px);
	border-color: var(--bme-p-orange);
}

.bme-cat-tile__icon {
	font-size: 1.75rem;
	line-height: 1;
}

.bme-cat-tile__name {
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--bme-p-blue-dark);
}

.bme-cat-tile__count {
	font-size: 0.82rem;
	color: var(--bme-p-muted);
}

/* —— Free shipping bar —— */
.bme-ship-bar {
	background: #fff;
	border: 1px solid var(--bme-p-border);
	border-radius: var(--bme-p-radius);
	padding: 1rem 1.15rem;
	margin-bottom: 1.25rem;
	box-shadow: var(--bme-p-shadow);
}

.bme-ship-bar__text {
	margin: 0 0 0.65rem;
	font-weight: 600;
	font-size: 0.92rem;
	color: var(--bme-p-blue-dark);
}

.bme-ship-bar__track {
	height: 8px;
	background: #e2e8f0;
	border-radius: 999px;
	overflow: hidden;
}

.bme-ship-bar__fill {
	display: block;
	height: 100%;
	background: linear-gradient(90deg, var(--bme-p-orange), var(--bme-p-orange-dark));
	border-radius: 999px;
	transition: width 0.4s ease;
}

/* —— Cart / checkout —— */
.bme-cart-wrap,
.bme-checkout-wrap {
	padding-bottom: 2rem;
}

body.bme-premium-active.woocommerce-cart .woocommerce-cart-form,
body.bme-premium-active.woocommerce-cart .cart-collaterals,
body.bme-premium-active.woocommerce-checkout form.checkout {
	background: var(--bme-p-card);
	border: 1px solid var(--bme-p-border);
	border-radius: var(--bme-p-radius);
	padding: 1.25rem;
	box-shadow: var(--bme-p-shadow);
}

body.bme-premium-active.woocommerce-cart table.shop_table th,
body.bme-premium-active.woocommerce-cart table.shop_table td {
	font-size: 0.92rem;
}

body.bme-premium-active.woocommerce-cart .cart-collaterals {
	margin-top: 1rem;
}

body.bme-premium-active.woocommerce-checkout .col2-set {
	gap: 1rem;
}

.bme-trust-inline {
	text-align: center;
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--bme-p-muted);
	margin-bottom: 1rem;
	padding: 0.65rem 1rem;
	background: #fff7ed;
	border: 1px solid rgba(242, 101, 34, 0.2);
	border-radius: 8px;
}

/* —— Single product trust —— */
.bme-product-trust {
	list-style: none;
	margin: 1rem 0 0;
	padding: 0;
	display: grid;
	gap: 0.35rem;
}

.bme-product-trust li {
	font-size: 0.88rem;
	color: var(--bme-p-muted);
	padding-left: 1.1rem;
	position: relative;
}

.bme-product-trust li::before {
	content: "✓";
	position: absolute;
	left: 0;
	color: var(--bme-p-orange);
	font-weight: 700;
}

body.bme-premium-active.single-product .related.products {
	max-width: min(1280px, calc(100% - 2rem));
	margin: 0 auto 2rem;
}

body.bme-premium-active.single-product .related.products > h2 {
	font-size: 1.25rem;
	color: var(--bme-p-blue-dark);
}

/* —— WhatsApp FAB (hidden on mobile, nav has chat) —— */
.bme-wa-float {
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	z-index: 240;
	width: 52px;
	height: 52px;
	border-radius: 999px;
	background: #25d366;
	color: #fff !important;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 0.72rem;
	text-decoration: none !important;
	box-shadow: 0 10px 28px rgba(37, 211, 102, 0.45);
}

.bme-wa-float:hover {
	transform: scale(1.05);
}

/* —— Mobile bottom nav —— */
.bme-mobile-nav {
	display: none;
}

@media (max-width: 768px) {
	body.bme-has-mobile-nav {
		padding-bottom: 72px;
	}

	.bme-mobile-nav {
		display: grid;
		grid-template-columns: repeat(5, 1fr);
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 230;
		background: #fff;
		border-top: 1px solid var(--bme-p-border);
		box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
		padding: 0.35rem 0 calc(0.35rem + env(safe-area-inset-bottom));
	}

	.bme-mobile-nav__item {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 0.15rem;
		font-size: 0.62rem;
		font-weight: 600;
		color: var(--bme-p-muted);
		text-decoration: none !important;
		padding: 0.25rem;
		position: relative;
	}

	.bme-mobile-nav__item span:first-child {
		font-size: 1.1rem;
		line-height: 1;
	}

	.bme-mobile-nav__item.is-active,
	.bme-mobile-nav__item--wa {
		color: var(--bme-p-orange-dark);
	}

	.bme-mobile-nav__badge {
		position: absolute;
		top: 0;
		right: 0.35rem;
		min-width: 1rem;
		height: 1rem;
		border-radius: 999px;
		background: var(--bme-p-orange);
		color: #fff;
		font-size: 0.58rem;
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}

	.bme-wa-float {
		display: none;
	}

	.bme-premium__grid,
	body.bme-premium-active.woocommerce ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}

	.bme-premium__cat-tiles-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 1100px) and (min-width: 769px) {
	.bme-premium__grid,
	body.bme-premium-active.woocommerce ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	}
}

/* —— v1.4: Mega menu —— */
.bme-nav-mega {
	position: relative;
}

.bme-nav-mega__trigger {
	background: none;
	border: none;
	font: inherit;
	font-weight: 600;
	font-size: 0.92rem;
	color: var(--bme-p-text);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0;
}

.bme-nav-mega__trigger:hover,
.bme-nav-mega__trigger[aria-expanded="true"] {
	color: var(--bme-p-orange);
}

.bme-mega-panel {
	position: fixed;
	left: 0;
	right: 0;
	top: 0;
	z-index: 215;
	padding-top: 148px;
	background: rgba(15, 39, 68, 0.35);
	backdrop-filter: blur(2px);
}

.bme-mega-panel__inner {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
	background: #fff;
	border: 1px solid var(--bme-p-border);
	border-radius: var(--bme-p-radius);
	box-shadow: var(--bme-p-shadow);
	padding: 1.25rem;
	margin: 0 auto 1rem;
	width: min(1280px, calc(100% - 2rem));
}

.bme-mega-col__head {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	text-decoration: none !important;
	font-weight: 700;
	color: var(--bme-p-blue-dark);
	margin-bottom: 0.65rem;
}

.bme-mega-col ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.bme-mega-col li a {
	display: block;
	padding: 0.3rem 0;
	font-size: 0.88rem;
	color: var(--bme-p-text);
	text-decoration: none;
}

.bme-mega-col li a:hover {
	color: var(--bme-p-orange);
}

.bme-mega-col__all {
	font-weight: 600;
	color: var(--bme-p-orange) !important;
}

/* —— Mini cart drawer —— */
.bme-premium__cart {
	cursor: pointer;
	font: inherit;
}

.bme-premium__cart-link {
	display: none;
}

.bme-mini-cart {
	position: fixed;
	inset: 0;
	z-index: 250;
}

.bme-mini-cart__overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.45);
	border: none;
	cursor: pointer;
}

.bme-mini-cart__panel {
	position: absolute;
	top: 0;
	right: 0;
	width: min(420px, 100%);
	height: 100%;
	background: #fff;
	display: flex;
	flex-direction: column;
	box-shadow: -12px 0 40px rgba(15, 23, 42, 0.15);
}

body.bme-lang-ar .bme-mini-cart__panel {
	right: auto;
	left: 0;
	box-shadow: 12px 0 40px rgba(15, 23, 42, 0.15);
}

.bme-mini-cart__head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1rem 1.15rem;
	border-bottom: 1px solid var(--bme-p-border);
}

.bme-mini-cart__head h2 {
	margin: 0;
	font-size: 1.1rem;
}

.bme-mini-cart__close {
	border: none;
	background: #f1f5f9;
	width: 36px;
	height: 36px;
	border-radius: 8px;
	font-size: 1.35rem;
	cursor: pointer;
	line-height: 1;
}

.bme-mini-cart__body {
	flex: 1;
	overflow-y: auto;
	padding: 1rem 1.15rem;
}

.bme-mini-cart__foot {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.65rem;
	padding: 1rem 1.15rem;
	border-top: 1px solid var(--bme-p-border);
}

.bme-mini-cart .woocommerce-mini-cart__total {
	font-weight: 700;
	font-size: 1rem;
}

.bme-mini-cart .woocommerce-mini-cart-item a {
	font-weight: 600;
}

.bme-mobile-nav__cart-btn {
	display: block;
	width: 100%;
	text-align: left;
	border: none;
	background: #fff7ed;
	color: var(--bme-p-orange-dark);
	font-weight: 700;
	padding: 0.65rem 0;
	cursor: pointer;
}

/* —— Loop badges —— */
.bme-loop-badges {
	position: absolute;
	top: 0.5rem;
	left: 0.5rem;
	z-index: 2;
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
}

body.bme-premium-active.woocommerce ul.products li.product {
	position: relative;
}

.bme-loop-badge {
	font-size: 0.68rem;
	font-weight: 700;
	padding: 0.2rem 0.45rem;
	border-radius: 4px;
	color: #fff;
}

.bme-loop-badge--sale {
	background: var(--bme-p-orange);
}

.bme-loop-badge--hot {
	background: var(--bme-p-blue-dark);
}

.bme-pcard__badge--hot {
	background: var(--bme-p-blue-dark);
}

/* —— Why BME —— */
.bme-premium__why {
	padding: 0.5rem 0 1.5rem;
}

.bme-premium__why-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1rem;
}

.bme-why-card {
	background: var(--bme-p-card);
	border: 1px solid var(--bme-p-border);
	border-radius: var(--bme-p-radius);
	padding: 1.15rem;
	box-shadow: var(--bme-p-shadow);
}

.bme-why-card__icon {
	font-size: 1.5rem;
	display: block;
	margin-bottom: 0.5rem;
}

.bme-why-card h3 {
	margin: 0 0 0.35rem;
	font-size: 0.95rem;
	color: var(--bme-p-blue-dark);
}

.bme-why-card p {
	margin: 0;
	font-size: 0.82rem;
	color: var(--bme-p-muted);
	line-height: 1.45;
}

/* —— Account pages —— */
body.bme-premium-active.woocommerce-account .woocommerce-MyAccount-navigation {
	background: var(--bme-p-card);
	border: 1px solid var(--bme-p-border);
	border-radius: var(--bme-p-radius);
	padding: 0.75rem;
}

body.bme-premium-active.woocommerce-account .woocommerce-MyAccount-content {
	background: var(--bme-p-card);
	border: 1px solid var(--bme-p-border);
	border-radius: var(--bme-p-radius);
	padding: 1.25rem;
}

@media (min-width: 769px) and (max-width: 1100px) {
	.bme-premium__cat-tiles-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.bme-premium__why-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 768px) {
	.bme-mega-panel {
		display: none !important;
	}

	.bme-promo-bar__inner {
		font-size: 0.78rem;
		padding: 0.4rem 2rem 0.4rem 0.5rem;
	}

	.bme-promo-bar__cta {
		font-size: 0.78rem;
	}

	.bme-premium__why-grid {
		grid-template-columns: 1fr 1fr;
	}

	.bme-mega-panel__inner {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 480px) {
	.bme-premium__why-grid {
		grid-template-columns: 1fr;
	}
}

/* —— v1.5: Search suggestions —— */
.bme-premium__search-wrap {
	position: relative;
	min-width: 0;
}

.bme-search-suggest {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	z-index: 220;
	background: #fff;
	border: 1px solid var(--bme-p-border);
	border-radius: var(--bme-p-radius);
	box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
	max-height: 360px;
	overflow-y: auto;
}

.bme-search-suggest__empty {
	margin: 0;
	padding: 1rem;
	font-size: 0.88rem;
	color: var(--bme-p-muted);
}

.bme-search-suggest__item {
	display: grid;
	grid-template-columns: 40px 1fr;
	gap: 0.75rem;
	align-items: center;
	padding: 0.65rem 0.85rem;
	text-decoration: none !important;
	color: var(--bme-p-text);
	border-bottom: 1px solid var(--bme-p-border);
}

.bme-search-suggest__item:last-child {
	border-bottom: none;
}

.bme-search-suggest__item:hover {
	background: #fff7ed;
}

.bme-search-suggest__item img {
	width: 40px;
	height: 40px;
	object-fit: contain;
	border-radius: 6px;
	background: #f8fafc;
}

.bme-search-suggest__meta {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	min-width: 0;
}

.bme-search-suggest__meta strong {
	font-size: 0.88rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.bme-search-suggest__meta span {
	font-size: 0.82rem;
	color: var(--bme-p-orange-dark);
	font-weight: 700;
}

/* —— Product specs —— */
.bme-product-specs {
	margin: 1.5rem 0 0;
	padding: 1.15rem;
	background: #f8fafc;
	border: 1px solid var(--bme-p-border);
	border-radius: var(--bme-p-radius);
}

.bme-product-specs h2 {
	margin: 0 0 0.75rem;
	font-size: 1rem;
	color: var(--bme-p-blue-dark);
}

.bme-product-specs table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.88rem;
}

.bme-product-specs th,
.bme-product-specs td {
	padding: 0.5rem 0.65rem;
	border-bottom: 1px solid var(--bme-p-border);
	text-align: start;
}

.bme-product-specs th {
	width: 38%;
	color: var(--bme-p-muted);
	font-weight: 600;
}

/* —— Sticky buy (mobile) —— */
.bme-sticky-buy {
	display: none;
}

@media (max-width: 768px) {
	.bme-sticky-buy:not([hidden]) {
		display: block;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 72px;
		z-index: 225;
		background: #fff;
		border-top: 1px solid var(--bme-p-border);
		box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.1);
		padding: 0.65rem 0;
	}

	body.bme-single-product.bme-has-mobile-nav .bme-sticky-buy:not([hidden]) {
		bottom: 72px;
	}

	.bme-sticky-buy__inner {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 0.75rem;
	}

	.bme-sticky-buy__info {
		min-width: 0;
		flex: 1;
	}

	.bme-sticky-buy__title {
		display: block;
		font-size: 0.82rem;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.bme-sticky-buy__price {
		font-size: 0.95rem;
		font-weight: 700;
		color: var(--bme-p-orange-dark);
	}

	.bme-sticky-buy__btn {
		white-space: nowrap;
		padding: 0.65rem 1rem;
		font-size: 0.82rem;
	}
}

/* —— Reviews —— */
body.bme-single-product #reviews {
	max-width: min(1280px, calc(100% - 2rem));
	margin: 0 auto 2rem;
	background: var(--bme-p-card);
	border: 1px solid var(--bme-p-border);
	border-radius: var(--bme-p-radius);
	padding: 1.25rem;
}

body.bme-single-product #reviews .woocommerce-Reviews-title {
	font-size: 1.15rem;
	color: var(--bme-p-blue-dark);
}

body.bme-single-product .commentlist .comment {
	border-bottom: 1px solid var(--bme-p-border);
	padding: 0.85rem 0;
}

body.bme-single-product .star-rating {
	color: #fbbf24;
}

body.bme-single-product #review_form {
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid var(--bme-p-border);
}

body.bme-single-product #review_form .submit {
	background: var(--bme-p-orange) !important;
	border-radius: 8px !important;
	font-weight: 700 !important;
}

/* —— Single product layout —— */
body.bme-single-product div.product {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2rem;
}

@media (max-width: 768px) {
	body.bme-single-product div.product {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.bme-product-specs {
		grid-column: 1;
	}
}

/* —— v1.6: Promo, compare, flash deals —— */
.bme-promo-bar {
	background: linear-gradient(90deg, var(--bme-p-blue-dark), var(--bme-p-blue));
	color: #fff;
	font-size: 0.85rem;
}

.bme-promo-bar__inner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	flex-wrap: wrap;
	padding: 0.5rem 2.5rem 0.5rem 0;
	position: relative;
}

.bme-promo-bar__inner p {
	margin: 0;
}

.bme-promo-bar__code {
	background: rgba(255, 255, 255, 0.15);
	padding: 0.15rem 0.45rem;
	border-radius: 4px;
	font-weight: 700;
}

.bme-promo-bar__cta {
	color: #fff !important;
	font-weight: 700;
	text-decoration: underline !important;
	white-space: nowrap;
}

.bme-promo-bar__close {
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	border: none;
	background: transparent;
	color: #fff;
	font-size: 1.35rem;
	cursor: pointer;
	line-height: 1;
}

.bme-flash-deals .bme-pcard__badge--sale {
	background: #dc2626;
}

.bme-loop-actions {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
}

.bme-compare-add {
	border: 1px solid var(--bme-p-border);
	background: #fff;
	border-radius: 6px;
	padding: 0.35rem 0.5rem;
	font-size: 0.78rem;
	font-weight: 600;
	cursor: pointer;
	color: var(--bme-p-blue-dark);
}

.bme-compare-add--loop {
	align-self: center;
	margin: 0 0.85rem 0.85rem;
	width: calc(100% - 1.7rem);
}

.bme-compare-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 72px;
	z-index: 228;
	background: var(--bme-p-blue-dark);
	color: #fff;
	padding: 0.55rem 0;
}

.bme-compare-bar__inner {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.bme-compare-bar__clear {
	border: 1px solid rgba(255, 255, 255, 0.35);
	background: transparent;
	color: #fff;
	border-radius: 6px;
	padding: 0.35rem 0.65rem;
	cursor: pointer;
	font-size: 0.82rem;
}

.bme-compare-page {
	padding: 1.5rem 0 3rem;
}

.bme-compare-table-wrap {
	overflow-x: auto;
	background: var(--bme-p-card);
	border: 1px solid var(--bme-p-border);
	border-radius: var(--bme-p-radius);
	padding: 1rem;
}

.bme-compare-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
}

.bme-compare-table th,
.bme-compare-table td {
	padding: 0.75rem;
	border-bottom: 1px solid var(--bme-p-border);
	text-align: center;
	vertical-align: middle;
}

.bme-compare-table thead th {
	background: #f8fafc;
}

body.bme-premium-active.woocommerce-cart .coupon {
	background: #fff7ed;
	border: 1px dashed var(--bme-p-orange);
	border-radius: var(--bme-p-radius);
	padding: 1rem;
	margin-bottom: 1rem;
}

body.bme-premium-active.woocommerce-cart .coupon label {
	font-weight: 700;
	color: var(--bme-p-blue-dark);
}

body.bme-premium-active.woocommerce-cart .coupon .input-text {
	border-radius: 8px;
	border: 1px solid var(--bme-p-border);
	padding: 0.55rem 0.75rem;
}

body.bme-premium-active.woocommerce-cart .coupon .button {
	background: var(--bme-p-orange) !important;
	color: #fff !important;
	border-radius: 8px !important;
	font-weight: 600 !important;
}

@media (min-width: 769px) {
	.bme-compare-bar {
		bottom: 1rem;
		width: min(1280px, calc(100% - 2rem));
		left: 50%;
		transform: translateX(-50%);
		border-radius: var(--bme-p-radius);
	}
}
