/**
 * Header Styles
 * 
 * @package UnDetalle
 * @since 1.0.0
 */

/* ============================================
   SITE HEADER
   ============================================ */
.site-header {
	background-color: var(--color-primary);
	color: var(--color-white);
	padding: 1rem 0;
	position: sticky;
	top: 0;
	z-index: 1000;
	transition: all var(--transition-normal);
	box-shadow: var(--shadow-md);
}

.header-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 var(--spacing-md);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--spacing-lg);
}

/* ============================================
   HEADER LEFT - LOGO
   ============================================ */
.header-left {
	flex-shrink: 0;
}

.site-logo {
	max-height: 60px;
	width: auto;
	display: block;
}

.site-logo-text {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--color-white);
	text-decoration: none;
	font-family: var(--font-secondary);
}

/* ============================================
   HEADER CENTER - NAVIGATION
   ============================================ */
.header-center {
	flex: 1;
	display: flex;
	justify-content: center;
}

.primary-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	gap: var(--spacing-lg);
}

.primary-menu li {
	margin: 0;
}

.primary-menu a {
	color: var(--color-white);
	text-decoration: none;
	font-weight: 600;
	text-transform: uppercase;
	font-size: 0.9rem;
	letter-spacing: 0.5px;
	padding: 0.5rem 0;
	position: relative;
	transition: opacity var(--transition-fast);
}

.primary-menu a:hover,
.primary-menu a:focus {
	opacity: 0.8;
}

.primary-menu a::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 0;
	height: 2px;
	background-color: var(--color-white);
	transition: width var(--transition-normal);
}

.primary-menu a:hover::after,
.primary-menu a:focus::after {
	width: 100%;
}

.primary-menu .current-menu-item a::after {
	width: 100%;
}

/* ============================================
   HEADER RIGHT - ICONS
   ============================================ */
.header-right {
	display: flex;
	align-items: center;
	gap: var(--spacing-md);
	flex-shrink: 0;
}

.header-icon {
	background: none;
	border: none;
	color: var(--color-white);
	cursor: pointer;
	padding: 0.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	transition: opacity var(--transition-fast);
	border-radius: var(--radius-sm);
}

.header-icon:hover,
.header-icon:focus {
	opacity: 0.8;
	background-color: rgba(255, 255, 255, 0.1);
}

.header-icon svg {
	width: 24px;
	height: 24px;
}

.cart-count {
	position: absolute;
	top: 0;
	right: 0;
	background-color: var(--color-white);
	color: var(--color-primary);
	border-radius: var(--radius-full);
	min-width: 18px;
	height: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.7rem;
	font-weight: 700;
	padding: 0 4px;
}

/* ============================================
   FULLSCREEN SEARCH
   ============================================ */
.fullscreen-search {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(22, 24, 25, 0.98);
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: all var(--transition-normal);
}

.fullscreen-search.active {
	opacity: 1;
	visibility: visible;
}

.search-close {
	position: absolute;
	top: var(--spacing-lg);
	right: var(--spacing-lg);
	background: none;
	border: none;
	color: var(--color-white);
	cursor: pointer;
	padding: 0.5rem;
	transition: opacity var(--transition-fast);
}

.search-close:hover {
	opacity: 0.7;
}

.search-container {
	width: 100%;
	max-width: 800px;
	padding: 0 var(--spacing-lg);
}

.search-container form {
	position: relative;
}

.search-container input[type="search"] {
	width: 100%;
	padding: 1.5rem 4rem 1.5rem 2rem;
	border: none;
	border-bottom: 3px solid var(--color-primary);
	background: transparent;
	color: var(--color-white);
	font-size: 2rem;
	font-weight: 300;
	outline: none;
}

.search-container input[type="search"]::placeholder {
	color: rgba(255, 255, 255, 0.5);
}

.search-container button[type="submit"] {
	position: absolute;
	right: 1rem;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	color: var(--color-primary);
	cursor: pointer;
	padding: 0.5rem;
}

.search-results {
	margin-top: var(--spacing-xl);
	max-height: 60vh;
	overflow-y: auto;
}

.search-result-item {
	display: flex;
	gap: var(--spacing-md);
	padding: var(--spacing-md);
	background-color: rgba(255, 255, 255, 0.05);
	border-radius: var(--radius-md);
	margin-bottom: var(--spacing-md);
	transition: background-color var(--transition-fast);
}

.search-result-item:hover {
	background-color: rgba(255, 255, 255, 0.1);
}

.search-result-image {
	width: 80px;
	height: 80px;
	object-fit: cover;
	border-radius: var(--radius-sm);
	flex-shrink: 0;
}

.search-result-content {
	flex: 1;
	color: var(--color-white);
}

.search-result-title {
	font-size: 1.2rem;
	margin-bottom: 0.5rem;
	color: var(--color-white);
}

.search-result-price {
	color: var(--color-primary);
	font-weight: 700;
	font-size: 1.1rem;
}

/* ============================================
   MINI CART SIDEBAR
   ============================================ */
.mini-cart-sidebar {
	position: fixed;
	top: 0;
	right: 0;
	width: 100%;
	height: 100%;
	z-index: 9998;
	pointer-events: none;
}

.mini-cart-sidebar.active {
	pointer-events: all;
}

.mini-cart-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	opacity: 0;
	transition: opacity var(--transition-normal);
}

.mini-cart-sidebar.active .mini-cart-overlay {
	opacity: 1;
}

.mini-cart-content {
	position: absolute;
	top: 0;
	right: 0;
	width: 100%;
	max-width: 450px;
	height: 100%;
	background-color: var(--color-white);
	transform: translateX(100%);
	transition: transform var(--transition-normal);
	display: flex;
	flex-direction: column;
	box-shadow: var(--shadow-lg);
}

.mini-cart-sidebar.active .mini-cart-content {
	transform: translateX(0);
}

.mini-cart-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: var(--spacing-lg);
	border-bottom: 1px solid #e0e0e0;
}

.mini-cart-header h3 {
	margin: 0;
	font-size: 1.5rem;
	color: var(--color-dark);
}

.mini-cart-close {
	background: none;
	border: none;
	cursor: pointer;
	padding: 0.5rem;
	color: var(--color-dark);
	transition: opacity var(--transition-fast);
}

.mini-cart-close:hover {
	opacity: 0.7;
}

.mini-cart-body {
	flex: 1;
	overflow-y: auto;
	padding: var(--spacing-lg);
}

/* Customize WooCommerce mini cart */
.woocommerce-mini-cart {
	list-style: none;
	padding: 0;
	margin: 0 0 var(--spacing-lg) 0;
}

.woocommerce-mini-cart-item {
	display: flex;
	gap: var(--spacing-md);
	padding: var(--spacing-md) 0;
	border-bottom: 1px solid #e0e0e0;
}

.woocommerce-mini-cart-item img {
	width: 80px;
	height: 80px;
	object-fit: cover;
	border-radius: var(--radius-sm);
	flex-shrink: 0;
}

.woocommerce-mini-cart__buttons {
	display: flex;
	flex-direction: column;
	gap: var(--spacing-sm);
	margin-top: var(--spacing-md);
}

.woocommerce-mini-cart__buttons .button {
	width: 100%;
	padding: 1rem;
	text-align: center;
	border-radius: var(--radius-md);
	font-weight: 600;
	transition: all var(--transition-normal);
}

.woocommerce-mini-cart__buttons .checkout {
	background-color: var(--color-primary);
	color: var(--color-white);
	border: 2px solid var(--color-primary);
}

.woocommerce-mini-cart__buttons .checkout:hover {
	background-color: var(--color-white);
	color: var(--color-primary);
}

/* Cart timeout warning */
.cart-timeout-warning {
	background-color: #fff3cd;
	border: 1px solid #ffc107;
	border-radius: var(--radius-md);
	padding: var(--spacing-md);
	margin-bottom: var(--spacing-md);
	text-align: center;
}

.cart-timeout-warning .time-remaining {
	font-weight: 700;
	font-size: 1.5rem;
	color: #dc3545;
}

/* Free shipping progress */
.free-shipping-progress {
	background-color: #d4edda;
	border: 1px solid #c3e6cb;
	border-radius: var(--radius-md);
	padding: var(--spacing-md);
	margin-bottom: var(--spacing-md);
}

.free-shipping-progress-bar {
	width: 100%;
	height: 8px;
	background-color: #e0e0e0;
	border-radius: var(--radius-full);
	overflow: hidden;
	margin-top: var(--spacing-sm);
}

.free-shipping-progress-fill {
	height: 100%;
	background-color: var(--color-primary);
	transition: width var(--transition-normal);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
	.header-container {
		gap: var(--spacing-md);
	}
	
	.primary-menu {
		gap: var(--spacing-md);
	}
	
	.primary-menu a {
		font-size: 0.85rem;
	}
}

@media (max-width: 768px) {
	.site-header {
		padding: 0.75rem 0;
	}
	
	.header-container {
		gap: var(--spacing-sm);
	}
	
	.site-logo {
		max-height: 40px;
	}
	
	.header-center {
		display: none;
	}
	
	.header-right {
		gap: var(--spacing-sm);
	}
	
	.header-icon {
		padding: 0.25rem;
	}
	
	.header-icon svg {
		width: 20px;
		height: 20px;
	}
	
	.search-container input[type="search"] {
		font-size: 1.5rem;
		padding: 1rem 3rem 1rem 1rem;
	}
	
	.mini-cart-content {
		max-width: 100%;
	}
}

@media (max-width: 480px) {
	.cart-count {
		min-width: 16px;
		height: 16px;
		font-size: 0.65rem;
	}
	
	.search-container input[type="search"] {
		font-size: 1.2rem;
	}
}


