/* ============================================
   HEADER ECOMMERCE - Pixel-perfect replica
   del propousal original
   ============================================ */

/* -------------------------------------------
   Row 1: Shipping Bar
   ------------------------------------------- */
.shipping-bar {
	height: 30px;
	display: grid;
	place-items: center;
	color: white;
	font-size: 10px;
	background: linear-gradient(90deg, #209cff, #da28c4);
}

/* -------------------------------------------
   Row 2: Site Header
   ------------------------------------------- */
.site-header {
	background: white;
	padding: 10px 2.5vw 12px;
	border-bottom: 1px solid var(--wp--preset--color--border, #e8eaf0);
}

.header-top {
	display: flex;
	align-items: center;
	gap: 22px;
	min-height: 44px;
}

/* Site Logo */
.header-logo {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
}

.header-logo .wp-block-site-logo {
	margin: 0;
}

.header-logo .wp-block-site-logo img {
	border-radius: 4px;
	display: block;
}

/* Search bar trigger */
.search {
	margin: 0 auto;
	width: min(450px, 45vw);
	height: 38px;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0 12px;
	background: #f4f5f6;
	border-radius: 22px;
	color: #8992a4;
	border: 0;
	cursor: pointer;
	text-align: left;
}

.search span {
	flex: 1;
	text-align: center;
	color: #8992a4;
	font-size: 13px;
	position: relative;
	left: -19px;
}

.search svg {
	flex-shrink: 0;
}

/* Header actions */
.header-actions {
	display: flex;
	align-items: center;
	gap: 18px;
	color: #454852;
}

.register {
	font-size: 12px;
	cursor: pointer;
}

.register:hover {
	color: var(--wp--preset--color--vibrant-blue, #4477FB);
}

.header-cart-icon {
	display: flex;
	align-items: center;
	color: inherit;
	text-decoration: none;
	transition: color 0.15s ease;
	position: relative;
}

.header-cart-icon:hover {
	color: var(--wp--preset--color--vibrant-blue, #4477FB);
}

/* Cart Badge */
.cart-badge {
	position: absolute;
	top: -6px;
	right: -8px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 9px;
	background: var(--wp--preset--color--crimson-red, #DC2626);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.cart-badge:empty,
.cart-badge[data-count="0"] {
	display: none;
}

.icon-button {
	border: 0;
	background: none;
	color: inherit;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 4px;
}

.mobile-menu {
	display: none;
}

.mobile-search {
	display: none;
}

/* -------------------------------------------
   Row 3: Category Strip
   ------------------------------------------- */
.category-strip {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 10px;
}

.category-nav {
	display: flex;
	justify-content: center;
	gap: 7px;
	flex-wrap: wrap;
	flex: 1;
	min-width: 0;
}

.category-arrow {
	display: none;
	border: 1px solid var(--wp--preset--color--border, #e8eaf0);
	background: #fff;
	color: var(--wp--preset--color--vibrant-blue, #258cff);
	width: 30px;
	height: 30px;
	border-radius: 50%;
	place-items: center;
	cursor: pointer;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
}

.category-arrow:hover {
	background: var(--wp--preset--color--vibrant-blue, #258cff);
	color: #fff;
	border-color: var(--wp--preset--color--vibrant-blue, #258cff);
}

.category-nav a {
	border: 1px solid var(--wp--preset--color--border, #e8eaf0);
	border-radius: 20px;
	padding: 8px 13px;
	font-size: 12px;
	white-space: nowrap;
	text-decoration: none;
	color: var(--wp--preset--color--black-hole, #010101);
	transition: all 0.15s ease;
}

.category-nav a:hover {
	background: var(--wp--preset--color--vibrant-blue, #258cff);
	color: #fff;
	border-color: var(--wp--preset--color--vibrant-blue, #258cff);
}

.category-nav span {
	color: #1668ed;
	margin-right: 7px;
}

.category-nav a:hover span {
	color: #fff;
}

/* -------------------------------------------
   Mobile Sidebar
   ------------------------------------------- */
.sidebar-backdrop {
	position: fixed;
	inset: 0;
	z-index: 20;
	background: rgba(8, 14, 39, 0.45);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s;
}

.sidebar-backdrop.visible {
	opacity: 1;
	pointer-events: auto;
}

.sidebar {
	position: fixed;
	z-index: 21;
	inset: 0 auto 0 0;
	width: min(340px, 88vw);
	padding: 22px 20px;
	background: #fff;
	transform: translateX(-105%);
	transition: transform 0.3s ease;
	box-shadow: 12px 0 35px rgba(16, 25, 54, 0.13);
}

.sidebar.open {
	transform: translateX(0);
}

.sidebar-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.sidebar-kicker {
	color: #8992a4;
	font-size: 12px;
	margin: 30px 0 12px;
}

.sidebar a {
	display: flex;
	justify-content: space-between;
	padding: 16px 0;
	border-bottom: 1px solid var(--wp--preset--color--border, #e8eaf0);
	font-size: 15px;
	text-decoration: none;
	color: var(--wp--preset--color--black-hole, #010101);
	transition: color 0.15s ease;
}

.sidebar a:hover {
	color: var(--wp--preset--color--vibrant-blue, #258cff);
}

.sidebar a span {
	color: var(--wp--preset--color--vibrant-blue, #258cff);
}

/* -------------------------------------------
   Search Modal
   ------------------------------------------- */
.search-modal {
	position: fixed;
	inset: 0;
	z-index: 30;
	background: rgba(8, 14, 39, 0.45);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s;
	display: grid;
	place-items: start center;
	padding: 12vh 16px 0;
}

.search-modal.visible {
	opacity: 1;
	pointer-events: auto;
}

.search-panel {
	width: min(620px, 100%);
	background: #fff;
	border-radius: 18px;
	padding: 20px;
	box-shadow: 0 20px 60px rgba(17, 26, 66, 0.25);
}

.search-panel-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.search-field {
	display: flex;
	gap: 10px;
	align-items: center;
	margin-top: 20px;
	padding: 14px 16px;
	background: #f4f5f6;
	border-radius: 14px;
	color: #697386;
}

.search-field input {
	width: 100%;
	border: 0;
	outline: 0;
	background: transparent;
	color: var(--wp--preset--color--black-hole, #172044);
	font-size: 15px;
}

.search-field input::placeholder {
	color: #8992a4;
}

.search-results {
	margin-top: 12px;
}

.search-results p {
	color: #8992a4;
	font-size: 13px;
}

.search-results a {
	display: flex;
	justify-content: space-between;
	padding: 14px 2px;
	border-bottom: 1px solid var(--wp--preset--color--border, #e8eaf0);
	font-size: 14px;
	text-decoration: none;
	color: var(--wp--preset--color--black-hole, #010101);
	transition: color 0.15s ease;
}

.search-results a:hover {
	color: var(--wp--preset--color--vibrant-blue, #258cff);
}

.search-results b {
	color: var(--wp--preset--color--vibrant-blue, #258cff);
	font-weight: 600;
}

/* -------------------------------------------
   Responsive: Mobile (<=700px)
   ------------------------------------------- */
@media (max-width: 700px) {
	.site-header {
		padding: 8px 14px;
	}

	.mobile-menu {
		display: flex;
	}

	.mobile-search {
		display: flex;
	}

	.header-top {
		gap: 12px;
	}

	.header-top .header-logo {
		margin-right: auto;
	}

	.search {
		display: none;
	}

	.register {
		display: none;
	}

	.header-actions {
		gap: 13px;
	}

	.header-actions svg {
		width: 20px;
		height: 20px;
	}

	/* Category strip: scroll horizontal */
	.category-strip {
		margin-top: 10px;
		gap: 6px;
	}

	.category-arrow {
		display: grid;
	}

	.category-nav {
		justify-content: flex-start;
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
		padding: 2px 4px 5px;
		scroll-snap-type: x proximity;
		-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 10px), transparent);
		mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 10px), transparent);
	}

	.category-nav::-webkit-scrollbar {
		display: none;
	}

	.category-nav a {
		padding: 8px 13px;
		scroll-snap-align: start;
	}

	.category-nav a:nth-child(n+4) {
		display: block;
	}

	/* Shipping bar */
	.shipping-bar {
		font-size: 9px;
		height: 26px;
	}
}
