/* ==========================================================================
 * Add-to-Cart bottom bar (Anveshan-style) — occ-atc-bar
 * Colors settings se aate hain: --occ-atc-bg (bar) / --occ-atc-btn (button).
 * Desktop size = Anveshan jaisa (~325 x 60px pill); mobile usse bhi chhota.
 * ========================================================================== */

.occ-atc-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 24px;
	width: -moz-fit-content;
	width: fit-content;
	min-width: 300px;
	max-width: calc( 100% - 28px );
	margin: 0 auto;
	z-index: 9999;
	font-family: inherit;
	/* hidden state: neeche khisak kar, click-through */
	transform: translateY( 160% );
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: transform .32s cubic-bezier( .2, .9, .25, 1 ), opacity .2s ease, bottom .25s ease, visibility 0s linear .32s;
	-webkit-tap-highlight-color: transparent;
}

.occ-atc-bar.is-visible {
	transform: translateY( 0 );
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transition: transform .32s cubic-bezier( .2, .9, .25, 1 ), opacity .2s ease, bottom .25s ease, visibility 0s;
}

.occ-atc-bar__inner {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 58px;
	padding: 8px 10px 8px 10px;
	border-radius: 999px;
	background: var( --occ-atc-bg, #14532d );
	color: #fff;
	box-shadow: 0 8px 22px rgba( 0, 0, 0, .25 ), 0 2px 5px rgba( 0, 0, 0, .15 );
	cursor: pointer;
	user-select: none;
	-webkit-user-select: none;
	outline: none;
}

.occ-atc-bar__inner:focus-visible {
	box-shadow: 0 0 0 3px rgba( 255, 255, 255, .85 ), 0 8px 22px rgba( 0, 0, 0, .25 );
}

/* Overlapping product thumbnails */
.occ-atc-bar__thumbs {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
}

.occ-atc-bar__thumb {
	display: block;
	width: 40px;
	height: 40px;
	margin-left: -14px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid #fff;
	overflow: hidden;
	box-shadow: 0 1px 4px rgba( 0, 0, 0, .25 );
}

.occ-atc-bar__thumb:first-child {
	margin-left: 0;
}

.occ-atc-bar__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	margin: 0;
	border-radius: 0;
}

.occ-atc-bar__info {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-width: 0;
	line-height: 1.2;
	margin-right: 6px;
}

.occ-atc-bar__count {
	font-size: 12px;
	font-weight: 500;
	opacity: .9;
}

.occ-atc-bar__total {
	font-size: 16px;
	font-weight: 700;
	letter-spacing: .1px;
	white-space: nowrap;
}

.occ-atc-bar__total .woocommerce-Price-amount,
.occ-atc-bar__total .woocommerce-Price-currencySymbol,
.occ-atc-bar__total bdi {
	color: inherit;
	font-size: inherit;
	font-weight: inherit;
}

/* Button: [cart icon →] */
.occ-atc-bar__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	flex: 0 0 auto;
	height: 38px;
	padding: 0 14px;
	border-radius: 999px;
	background: var( --occ-atc-btn, #ffc94d );
	color: #1d1d1b;
	transition: transform .15s ease, filter .15s ease;
}

.occ-atc-bar__inner:hover .occ-atc-bar__btn {
	filter: brightness( 1.04 );
}

.occ-atc-bar__inner:active .occ-atc-bar__btn {
	transform: scale( .94 );
}

.occ-atc-bar__btn svg {
	display: block;
	flex: 0 0 auto;
}

.occ-atc-bar__ico-cart { width: 20px; height: 20px; }
.occ-atc-bar__ico-arrow { width: 13px; height: 13px; }

/* Naya item add hone par chhota "pop" */
.occ-atc-bar.is-bump .occ-atc-bar__thumbs {
	animation: occAtcPop .45s cubic-bezier( .2, .9, .3, 1.4 );
}

.occ-atc-bar.is-bump .occ-atc-bar__count,
.occ-atc-bar.is-bump .occ-atc-bar__total {
	animation: occAtcTick .4s ease;
}

@keyframes occAtcPop {
	0%   { transform: scale( .75 ); }
	60%  { transform: scale( 1.12 ); }
	100% { transform: scale( 1 ); }
}

@keyframes occAtcTick {
	0%   { transform: translateY( 6px ); opacity: .3; }
	100% { transform: translateY( 0 ); opacity: 1; }
}

/* JS jis drawer/overlay ko pehchanta hai uspar ye class lagata hai (add-to-cart ke dauran). */
.occ-atc-hide {
	transition: none !important;
	animation: none !important;
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

/* Add-to-cart ke dauran theme ka drawer + overlay flash na kare (JS body class lagata hai). */
body.occ-atc-suppress #cart-sidebar,
body.occ-atc-suppress .ns-cart-popup,
body.occ-atc-suppress .nasa-static-sidebar,
body.occ-atc-suppress .black-window {
	transition: none !important;
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

/* ---- Mobile: Anveshan se bhi chhota ---- */
@media ( max-width: 768px ) {
	.occ-atc-bar {
		bottom: 8px;
		min-width: 200px;
		max-width: calc( 100% - 24px );
	}
	.occ-atc-bar__inner {
		min-height: 44px;
		gap: 8px;
		padding: 5px 6px 5px 8px;
		box-shadow: 0 5px 14px rgba( 0, 0, 0, .24 ), 0 1px 3px rgba( 0, 0, 0, .14 );
	}
	.occ-atc-bar__thumb { width: 30px; height: 30px; margin-left: -11px; border-width: 1.5px; }
	.occ-atc-bar__info { margin-right: 2px; }
	.occ-atc-bar__count { font-size: 10px; }
	.occ-atc-bar__total { font-size: 14px; }
	.occ-atc-bar__btn { height: 32px; padding: 0 11px; gap: 4px; }
	.occ-atc-bar__ico-cart { width: 17px; height: 17px; }
	.occ-atc-bar__ico-arrow { width: 12px; height: 12px; }
}

/* "Mobile only" mode: desktop par bar poora band. */
@media ( min-width: 769px ) {
	.occ-atc-bar--mobile-only {
		display: none !important;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.occ-atc-bar,
	.occ-atc-bar.is-visible { transition: opacity .15s ease, visibility 0s; transform: none; }
	.occ-atc-bar.is-bump .occ-atc-bar__thumbs,
	.occ-atc-bar.is-bump .occ-atc-bar__count,
	.occ-atc-bar.is-bump .occ-atc-bar__total { animation: none; }
}


/* ==========================================================================
 * Desktop: Add to cart button ke andar text beech mein
 * ========================================================================== */
@media ( min-width: 769px ) {
	.occ-atc-center {
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		text-align: center !important;
		line-height: 1.2 !important;
	}
}
