/* Announcement bar */
.ttt-announcement-bar {
	background: var(--color-text);
	color: #fff;
	font-family: var(--font-ui);
	font-size: 0.8rem;
	text-align: center;
	padding: 8px 0;
}
.ttt-announcement-bar .ttt-container { position: relative; height: 1.2em; }
.ttt-announcement { position: absolute; inset: 0; }

/* Header */
.ttt-header {
	position: sticky;
	top: 0;
	z-index: 40;
	background: #fff;
	border-bottom: 1px solid var(--color-border);
}
.ttt-header.is-scrolled { box-shadow: var(--shadow-sm); }

.ttt-header__row {
	display: flex;
	align-items: center;
	gap: 24px;
	padding: 14px 24px;
}

.ttt-logo { display: flex; align-items: center; gap: 10px; flex: none; }
.ttt-logo__badge {
	width: 44px; height: 44px;
	border-radius: 50%;
	background: var(--color-pink-pale);
	color: var(--color-primary);
	display: flex; align-items: center; justify-content: center;
}
.ttt-logo--footer .ttt-logo__badge { background: rgba(255,107,122,0.15); }
.ttt-logo__text { display: flex; flex-direction: column; line-height: 1.15; }
.ttt-logo__text strong { font-family: var(--font-display); font-size: 1.05rem; }
.ttt-logo__text small { color: var(--color-text-muted); font-size: 0.7rem; }

.ttt-search { display: flex; align-items: center; background: var(--color-neutral-bg-alt); border-radius: var(--radius-full); padding: 4px 6px 4px 18px; }
.ttt-search input { flex: 1; background: none; border: none; outline: none; padding: 8px 0; }
.ttt-search button { width: 34px; height: 34px; border-radius: 50%; background: var(--color-primary); color: #fff; display: flex; align-items: center; justify-content: center; }
.ttt-search--desktop { flex: 1; max-width: 380px; margin: 0 auto; }
.ttt-search--mobile { display: none; margin: 0 24px 12px; }
.ttt-search--inline { max-width: 480px; }

.ttt-nav { display: flex; align-items: center; gap: 4px; font-family: var(--font-ui); }
.ttt-nav__item { position: relative; }
.ttt-nav__link {
	display: inline-block;
	padding: 10px 14px;
	font-weight: 600;
	font-size: 0.92rem;
	color: var(--color-text);
	border-radius: var(--radius-md);
}
.ttt-nav__link:hover { color: var(--color-primary); }
.ttt-nav__link--success { color: var(--color-success-dark); }
.ttt-nav__link--sale { color: var(--color-primary); }
.ttt-mega-trigger { background: none; border: none; }

.ttt-has-mega .ttt-mega-menu {
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translate(-50%, 8px);
	background: #fff;
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lg);
	padding: 28px;
	display: none;
	gap: 32px;
	min-width: 560px;
	z-index: 50;
}
.ttt-has-mega:hover .ttt-mega-menu,
.ttt-has-mega.is-open .ttt-mega-menu { display: flex; }
.ttt-mega-menu__columns { display: flex; gap: 40px; flex: 1; }
.ttt-mega-menu__column h4 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-muted); margin-bottom: 12px; }
.ttt-mega-menu__column ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ttt-mega-menu__column a:hover { color: var(--color-primary); }
.ttt-mega-menu__featured { width: 180px; flex: none; border-radius: var(--radius-md); overflow: hidden; position: relative; display: block; }
.ttt-mega-menu__featured img { width: 100%; height: 140px; object-fit: cover; }
.ttt-mega-menu__featured-label { position: absolute; top: 8px; left: 8px; background: var(--color-primary); color: #fff; font-size: 0.65rem; padding: 3px 8px; border-radius: var(--radius-full); }
.ttt-mega-menu__featured-name { display: block; padding: 8px 4px; font-size: 0.85rem; font-weight: 600; }

.ttt-header__icons { display: flex; align-items: center; gap: 6px; flex: none; }
.ttt-icon-btn { position: relative; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--color-text); }
.ttt-icon-btn:hover { background: var(--color-neutral-bg-alt); }
.ttt-cart-count {
	position: absolute; top: 0; right: 0;
	min-width: 18px; height: 18px; padding: 0 4px;
	background: var(--color-primary); color: #fff;
	border-radius: var(--radius-full);
	font-size: 0.65rem; font-weight: 700;
	display: flex; align-items: center; justify-content: center;
}
.ttt-drawer-toggle { display: none; }

/* Mobile drawer */
.ttt-drawer { position: fixed; inset: 0; z-index: 100; display: none; }
.ttt-drawer.is-open { display: block; }
.ttt-drawer__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.4); }
.ttt-drawer__panel {
	position: absolute; top: 0; right: 0; bottom: 0;
	width: 84%; max-width: 340px;
	background: #fff;
	padding: 24px;
	overflow-y: auto;
	transform: translateX(100%);
	transition: transform 0.25s ease;
}
.ttt-drawer.is-open .ttt-drawer__panel { transform: none; }
.ttt-drawer__close { font-size: 1.5rem; margin-bottom: 16px; }
.ttt-drawer__nav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ttt-drawer__nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--color-border); font-weight: 600; }
.ttt-drawer__shortcuts { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.ttt-drawer__shortcuts a { font-weight: 600; color: var(--color-primary); }

/* Footer */
.ttt-footer { background: var(--color-footer-bg); color: rgba(255,255,255,0.8); padding-top: 56px; }
.ttt-footer h4 { color: #fff; font-family: var(--font-ui); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 16px; }
.ttt-footer__columns { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1.4fr; gap: 32px; padding-bottom: 40px; }
.ttt-footer__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ttt-footer__col a:hover { color: #fff; }
.ttt-footer__brand p { color: rgba(255,255,255,0.6); font-size: 0.88rem; margin: 14px 0; }
.ttt-social { display: flex; gap: 10px; }
.ttt-social a { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; }
.ttt-social a:hover { background: var(--color-primary); }

.ttt-newsletter-form { display: flex; gap: 8px; margin-top: 6px; }
.ttt-newsletter-form input { flex: 1; padding: 10px 12px; border-radius: var(--radius-md); border: none; }
.ttt-newsletter-form button { background: var(--color-primary); color: #fff; padding: 10px 16px; border-radius: var(--radius-md); font-weight: 600; }
.ttt-newsletter-success { color: var(--color-success-light); font-size: 0.85rem; margin-top: 8px; }

.ttt-footer__bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 18px 0; font-size: 0.8rem; }
.ttt-footer__bottom-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.ttt-payment-badges { display: flex; gap: 10px; }
.ttt-payment-badges span { border: 1px solid rgba(255,255,255,0.2); border-radius: var(--radius-sm); padding: 3px 8px; font-size: 0.72rem; }

/* Chat widget */
.ttt-chat-widget { position: fixed; right: 20px; bottom: 20px; z-index: 60; }
.ttt-chat-widget__toggle {
	width: 58px; height: 58px; border-radius: 50%;
	background: var(--color-primary); color: #fff;
	display: flex; align-items: center; justify-content: center;
	box-shadow: var(--shadow-lg);
	position: relative;
}
.ttt-chat-widget__badge {
	position: absolute; top: -2px; right: -2px;
	width: 20px; height: 20px; border-radius: 50%;
	background: var(--color-error); color: #fff;
	font-size: 0.7rem; display: flex; align-items: center; justify-content: center;
}
.ttt-chat-widget__panel {
	position: absolute; right: 0; bottom: 72px;
	width: 320px; max-height: 440px;
	background: #fff; border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lg);
	flex-direction: column;
	overflow: hidden;
}
/* Author CSS always beats the browser's default [hidden]{display:none} rule,
   so display:flex must be scoped to the visible state or the hidden
   attribute JS toggles becomes a no-op and the panel never actually hides. */
.ttt-chat-widget__panel:not([hidden]) { display: flex; }
.ttt-chat-widget__header { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--color-primary); color: #fff; }
.ttt-chat-widget__avatar { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,0.25); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.ttt-chat-widget__header div { flex: 1; }
.ttt-chat-widget__header small { display: block; opacity: 0.85; font-size: 0.7rem; }
.ttt-chat-widget__close { color: #fff; font-size: 1.2rem; }
.ttt-chat-widget__messages { flex: 1; padding: 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; min-height: 200px; }
.ttt-chat-msg { max-width: 82%; padding: 9px 13px; border-radius: var(--radius-md); font-size: 0.85rem; line-height: 1.4; }
.ttt-chat-msg--bot { background: var(--color-neutral-bg); align-self: flex-start; }
.ttt-chat-msg--user { background: var(--color-primary); color: #fff; align-self: flex-end; }
.ttt-chat-widget__quick-replies { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.ttt-chat-widget__quick-replies button { border: 1px solid var(--color-border); border-radius: var(--radius-full); padding: 5px 11px; font-size: 0.75rem; }
.ttt-chat-widget__input { display: flex; border-top: 1px solid var(--color-border); padding: 8px; gap: 6px; }
.ttt-chat-widget__input input { flex: 1; border: none; outline: none; padding: 8px; }
.ttt-chat-widget__input button { color: var(--color-primary); }

@media (max-width: 1024px) {
	.ttt-nav, .ttt-search--desktop { display: none; }
	.ttt-search--mobile { display: flex; }
	.ttt-drawer-toggle { display: flex; }
	.ttt-footer__columns { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
	.ttt-footer__columns { grid-template-columns: 1fr; }
	.ttt-chat-widget__panel { width: calc(100vw - 40px); }
}
