/* ----------------------------------------------------------------
   Top Announcement Bar
   Shown above .site-header on shop / brand / category / product pages.
   .site-header is position:fixed; top:0; z-index:999; height:70px
   (see base.css). This bar sits on top of it and pushes it down.
---------------------------------------------------------------- */

#cg-top-bar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	width: 100%;
	height: 30px;
	background: #000000;
	color: #ffffff;
	z-index: 1000; /* above .site-header (999) */
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 40px;
	box-sizing: border-box;
	font-size: 13px;
	line-height: 1.3;
	text-align: center;
	transform: translateY(0);
}

#cg-top-bar-inner {
	max-width: 100%;
	overflow: hidden;
}

#cg-top-bar-message {
	display: inline-block;
	opacity: 1;
}

#cg-top-bar-message.cg-fading {
	opacity: 0;
	transition: opacity 0.35s ease;
}

#cg-top-bar-close {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	color: #ffffff;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	padding: 4px 8px;
}

#cg-top-bar-close:hover {
	opacity: 0.7;
}

/* Smoothly animate the header's top offset (base.css only transitions
   background on .site-header, so we extend it here). */
.site-header {
	transition: background 0.3s ease-in-out, top 0.3s ease-in-out;
}

/* Push the fixed header down while the bar is visible. */
body.has-cg-top-bar .site-header {
	top: 30px;
}

/* Reserve space so page content doesn't sit under the header (70px + 30px). */
body.has-cg-top-bar main {
	margin-top: 100px;
}

/* Scrolled state: bar slides up out of view, header reclaims top:0. */
body.cg-top-bar-hidden #cg-top-bar {
	transform: translateY(-100%);
}

body.has-cg-top-bar.cg-top-bar-hidden .site-header {
	top: 0;
}

@media (max-width: 600px) {
	#cg-top-bar {
		font-size: 12px;
		padding: 0 32px;
	}
}
