/* Header */
.site-header {
	background: var(--arynaz-surface);
	box-shadow: var(--arynaz-shadow-sm);
	position: sticky;
	top: 0;
	z-index: 100;
}

/* Announcement Bar */
.announcement-bar {
	background-color: var(--arynaz-walnut);
	color: #fff;
	font-size: 13px;
	padding: 8px 0;
}

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

.announcement-text-wrapper {
	display: inline-flex;
	align-items: center;
	min-height: 20px;
}

.announcement-text {
	border-left: 2px solid #fff;
	padding-left: 4px;
	animation: blinkCursor 0.7s infinite;
	white-space: nowrap;
}

@keyframes blinkCursor {
	0%, 100% { border-color: transparent; }
	50% { border-color: #fff; }
}

.announcement-content .phone {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 500;
	color: #fff;
	text-decoration: none;
	transition: color 0.3s;
}

.announcement-content .phone:hover {
	color: var(--arynaz-sand);
}

/* Main Header */
.main-header {
	padding: 20px 0;
	border-bottom: 1px solid var(--arynaz-border);
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
}

.logo a {
	display: block;
}

.logo h2 {
	margin: 0;
	color: var(--arynaz-walnut);
	font-size: 28px;
	font-weight: 800;
}

.search-bar {
	flex: 1;
	max-width: 500px;
}

.search-form {
	display: flex;
	position: relative;
}

.search-field {
	width: 100%;
	padding: 12px 16px 12px 48px;
	border: 1px solid var(--arynaz-border);
	border-radius: var(--arynaz-radius-pill);
	background: var(--arynaz-bg);
	font-family: inherit;
	font-size: 14px;
	outline: none;
	transition: border-color 0.3s;
}

.search-field:focus {
	border-color: var(--arynaz-sand);
}

.search-submit {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	color: var(--arynaz-text-muted);
	cursor: pointer;
	padding: 0;
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 16px;
}

.account-link, .wishlist-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--arynaz-bg);
	color: var(--arynaz-text-main);
	position: relative;
}

.account-link:hover, .wishlist-link:hover {
	background: var(--arynaz-sand);
	color: #fff;
}

.wishlist-link .badge {
	position: absolute;
	top: -4px;
	right: -4px;
	background: var(--arynaz-rose);
	color: #fff;
	font-size: 11px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
}

.cart-pill {
	display: flex;
	align-items: center;
	gap: 12px;
	background: var(--arynaz-bg);
	padding: 8px 16px 8px 8px;
	border-radius: var(--arynaz-radius-pill);
	transition: background 0.3s;
}

.cart-pill:hover {
	background: #eee8e0;
}

.cart-icon {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	background: var(--arynaz-surface);
	border-radius: 50%;
	color: var(--arynaz-walnut);
}

.cart-counter {
	position: absolute;
	top: -4px;
	right: -4px;
	background: var(--arynaz-walnut);
	color: #fff;
	font-size: 11px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
}

.cart-total {
	font-weight: 600;
	font-size: 14px;
}

/* Navigation */
.main-nav {
	padding: 0;
}

.main-nav .container {
	position: relative; /* For mega menu absolute positioning */
}

.primary-menu {
	display: flex;
	align-items: center;
	gap: 32px;
}

.primary-menu > li {
	position: static; /* So mega menu can span container width */
}

/* Fallback for regular dropdowns if any */
.primary-menu li:not(.has-mega-menu) {
	position: relative;
}

.primary-menu a {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 16px 0;
	font-weight: 500;
	font-size: 15px;
	color: var(--arynaz-text-main);
}

.primary-menu a:hover {
	color: var(--arynaz-walnut);
}

/* Mega Menu */
.mega-menu {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: var(--arynaz-surface);
	border: 1px solid var(--arynaz-border);
	border-radius: 0 0 var(--arynaz-radius-lg) var(--arynaz-radius-lg);
	box-shadow: var(--arynaz-shadow-md);
	padding: 32px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: all 0.3s ease;
	z-index: 100;
}

.has-mega-menu:hover .mega-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.mega-menu-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}

.mega-column h4 {
	font-size: 16px;
	margin-bottom: 16px;
	color: var(--arynaz-walnut);
	border-bottom: 1px solid var(--arynaz-border);
	padding-bottom: 8px;
}

.mega-column ul li {
	margin-bottom: 12px;
}

.mega-column ul a {
	color: var(--arynaz-text-muted);
	font-size: 14px;
	padding: 0 !important;
}

.mega-column ul a:hover {
	color: var(--arynaz-walnut);
	padding-right: 8px !important;
}

/* Footer */
.site-footer {
	background: var(--arynaz-surface);
	margin-top: var(--arynaz-space-12);
	border-top: 1px solid var(--arynaz-border);
}

/* Features */
.footer-features {
	padding: 40px 0;
	border-bottom: 1px solid var(--arynaz-border);
}

.features-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}

.feature-item {
	display: flex;
	align-items: center;
	gap: 16px;
}

.feature-icon {
	width: 56px;
	height: 56px;
	border-radius: var(--arynaz-radius-md);
	background: var(--arynaz-bg);
	color: var(--arynaz-walnut);
	display: flex;
	align-items: center;
	justify-content: center;
}

.feature-text h3 {
	margin: 0 0 4px 0;
	font-size: 15px;
	font-weight: 600;
}

.feature-text p {
	margin: 0;
	font-size: 13px;
	color: var(--arynaz-text-muted);
}

/* Footer Main */
.footer-main {
	padding: 60px 0;
}

.footer-grid {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1.5fr;
	gap: 40px;
}

.footer-widget h3 {
	font-size: 18px;
	margin-bottom: 24px;
	color: var(--arynaz-text-main);
	position: relative;
	padding-bottom: 12px;
}

.footer-widget h3::after {
	content: '';
	position: absolute;
	right: 0;
	bottom: 0;
	width: 40px;
	height: 2px;
	background: var(--arynaz-sand);
}

.widget-about p {
	color: var(--arynaz-text-muted);
	font-size: 14px;
	margin-bottom: 24px;
}

.social-links {
	display: flex;
	gap: 12px;
}

.social-links a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--arynaz-bg);
	color: var(--arynaz-text-main);
}

.social-links a:hover {
	background: var(--arynaz-sand);
	color: #fff;
}

.widget-links ul li {
	margin-bottom: 12px;
}

.widget-links ul a {
	color: var(--arynaz-text-muted);
	font-size: 14px;
}

.widget-links ul a:hover {
	color: var(--arynaz-walnut);
	padding-right: 8px;
}

.widget-contact ul li {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 16px;
	color: var(--arynaz-text-muted);
	font-size: 14px;
}

.widget-contact ul li svg {
	color: var(--arynaz-sand);
	flex-shrink: 0;
	margin-top: 2px;
}

/* Footer Bottom */
.footer-bottom {
	background: var(--arynaz-bg);
	padding: 20px 0;
}

.footer-bottom .container {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.copyright p {
	margin: 0;
	font-size: 13px;
	color: var(--arynaz-text-muted);
}

.enamad-placeholder {
	background: var(--arynaz-surface);
	padding: 8px 16px;
	border-radius: var(--arynaz-radius-sm);
	border: 1px dashed var(--arynaz-border);
	font-size: 12px;
	color: var(--arynaz-text-muted);
}

/* Responsive */
@media (max-width: 992px) {
	.features-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.footer-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.announcement-content {
		flex-direction: column;
		gap: 4px;
		text-align: center;
	}
	
	.header-inner {
		flex-wrap: wrap;
	}
	
	.search-bar {
		order: 3;
		max-width: 100%;
		margin-top: 16px;
	}
	
	.main-nav {
		display: none; /* Hide for mobile, implement mobile menu later if needed */
	}
	
	.features-grid {
		grid-template-columns: 1fr;
	}
	
	.footer-grid {
		grid-template-columns: 1fr;
	}
	
	.footer-bottom .container {
		flex-direction: column;
		gap: 16px;
		text-align: center;
	}
}

/* Cart Drawer */
.cart-drawer-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 1040;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
}
.cart-drawer {
	position: fixed;
	top: 0;
	left: 0; /* Change to right: 0 for LTR, but it's RTL so left is fine or right: 0? Let's use right: 0 for RTL because it usually opens from the side. Wait, if it's RTL, usually we want it to open from left or right? Let's use left: 0 so it slides from left. */
	left: -400px;
	width: 100%;
	max-width: 380px;
	height: 100vh;
	background: var(--arynaz-surface);
	z-index: 1050;
	box-shadow: 2px 0 10px rgba(0,0,0,0.1);
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
}
body.cart-drawer-open {
	overflow: hidden;
}
body.cart-drawer-open .cart-drawer-overlay {
	opacity: 1;
	visibility: visible;
}
body.cart-drawer-open .cart-drawer {
	left: 0;
}

.cart-drawer-header {
	padding: 20px;
	border-bottom: 1px solid var(--arynaz-border);
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: var(--arynaz-bg);
}
.cart-drawer-header h3 {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: var(--arynaz-walnut);
}
.cart-drawer-close {
	background: none;
	border: none;
	font-size: 28px;
	line-height: 1;
	color: var(--arynaz-text-muted);
	cursor: pointer;
	padding: 0;
}
.cart-drawer-close:hover {
	color: var(--arynaz-rose);
}
.cart-drawer-body {
	flex: 1;
	overflow-y: auto;
	padding: 20px;
}

/* WooCommerce Mini Cart Overrides for Drawer */
.cart-drawer .widget_shopping_cart_content {
	height: 100%;
	display: flex;
	flex-direction: column;
}
.cart-drawer .woocommerce-mini-cart {
	flex: 1;
	list-style: none;
	padding: 0;
	margin: 0;
}
.cart-drawer .woocommerce-mini-cart__empty-message {
	text-align: center;
	color: var(--arynaz-text-muted);
	margin-top: 40px;
}
.cart-drawer .woocommerce-mini-cart-item {
	display: flex;
	align-items: center;
	padding-bottom: 16px;
	margin-bottom: 16px;
	border-bottom: 1px solid var(--arynaz-border);
	position: relative;
}
.cart-drawer .woocommerce-mini-cart-item img {
	width: 70px;
	height: 70px;
	object-fit: cover;
	border-radius: var(--arynaz-radius-sm);
	margin-left: 16px;
}
.cart-drawer .woocommerce-mini-cart-item a:not(.remove) {
	color: var(--arynaz-text-main);
	font-weight: 600;
	font-size: 14px;
	display: block;
	margin-bottom: 8px;
}
.cart-drawer .woocommerce-mini-cart-item a:hover {
	color: var(--arynaz-walnut);
}
.cart-drawer .woocommerce-mini-cart-item .quantity {
	font-size: 13px;
	color: var(--arynaz-text-muted);
}
.cart-drawer .woocommerce-mini-cart-item .remove {
	position: absolute;
	left: 0;
	top: 0;
	color: var(--arynaz-rose) !important;
	background: var(--arynaz-bg);
	width: 24px;
	height: 24px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	font-size: 18px;
	line-height: 1;
}
.cart-drawer .woocommerce-mini-cart-item .remove:hover {
	background: var(--arynaz-rose);
	color: #fff !important;
}
.cart-drawer .woocommerce-mini-cart__total {
	padding: 20px 0;
	border-top: 2px solid var(--arynaz-bg);
	margin: 0;
	display: flex;
	justify-content: space-between;
	font-weight: 700;
	font-size: 16px;
	color: var(--arynaz-text-main);
}
.cart-drawer .woocommerce-mini-cart__buttons {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0;
}
.cart-drawer .woocommerce-mini-cart__buttons a {
	display: block;
	text-align: center;
	padding: 12px 20px;
	border-radius: var(--arynaz-radius-md);
	font-weight: 600;
	text-decoration: none;
	transition: all 0.3s ease;
}
.cart-drawer .woocommerce-mini-cart__buttons .button:not(.checkout) {
	background: var(--arynaz-bg);
	color: var(--arynaz-text-main);
	border: 1px solid var(--arynaz-border);
}
.cart-drawer .woocommerce-mini-cart__buttons .button:not(.checkout):hover {
	background: var(--arynaz-border);
}
.cart-drawer .woocommerce-mini-cart__buttons .checkout {
	background: var(--arynaz-walnut);
	color: #fff;
}
.cart-drawer .woocommerce-mini-cart__buttons .checkout:hover {
	background: var(--arynaz-sand);
}

/* Live Search Results */
.live-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    margin-top: 10px;
    z-index: 1000;
    overflow: hidden;
    display: none;
    max-height: 400px;
    overflow-y: auto;
}
.live-search-results.active { display: block; }
.search-result-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: var(--arynaz-text-main);
    transition: background 0.2s;
    text-align: right;
}
.search-result-item:hover { background: #fdfdfd; }
.search-result-item:last-child { border-bottom: none; }
.search-result-img { width: 50px; height: 50px; border-radius: 8px; object-fit: cover; }
.search-result-info h4 { margin: 0 0 5px 0; font-size: 14px; }
.search-result-info span { color: var(--arynaz-primary); font-weight: 500; font-size: 13px; }
.search-loading { padding: 20px; text-align: center; color: #999; font-size: 13px; }


/* Sales Popup */
.sales-popup {
    position: fixed;
    bottom: -100px;
    right: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    padding: 12px;
    gap: 15px;
    width: 320px;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    border: 1px solid #f0f0f0;
}
.sales-popup.show {
    bottom: 30px;
    opacity: 1;
    pointer-events: auto;
}
.sales-popup-close {
    position: absolute;
    top: 5px;
    left: 5px;
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 5px;
}
.sales-popup img { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; }
.sales-popup-content { flex: 1; padding-left: 15px; }
.sales-popup-content p { margin: 0 0 5px 0; font-size: 13px; color: var(--arynaz-text-main); line-height: 1.5; }
.sales-popup-content p strong { color: var(--arynaz-primary); }
.sales-popup-content .time { font-size: 11px; color: #999; display: flex; align-items: center; gap: 4px;}

@media (max-width: 480px) {
    .sales-popup { width: calc(100% - 40px); right: 20px; left: 20px; }
}




/* Mobile Sidebar Styles */
.mobile-sidebar {
    position: fixed;
    top: 0;
    right: -320px;
    width: 280px;
    height: 100vh;
    background: #fff;
    z-index: 10001;
    transition: right 0.3s ease;
    box-shadow: -2px 0 15px rgba(0,0,0,0.1);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
body.mobile-menu-open .mobile-sidebar {
    right: 0;
}
body.mobile-menu-open .mobile-menu-overlay {
    opacity: 1;
    visibility: visible;
}
body.mobile-menu-open {
    overflow: hidden;
}
.mobile-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}
.mobile-sidebar-title {
    font-size: 18px;
    font-weight: bold;
}
.close-sidebar {
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
    padding: 0;
}
.mobile-sidebar-content {
    padding: 20px;
}
.mobile-sidebar-search {
    margin-bottom: 25px;
}
.mobile-sidebar-search .search-form {
    display: flex;
    width: 100%;
}
.mobile-sidebar-search .search-field {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 0 8px 8px 0;
    outline: none;
}
.mobile-sidebar-search .search-submit {
    padding: 10px 15px;
    background: var(--arynaz-primary);
    color: #fff;
    border: none;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
}
.mobile-sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
}
.mobile-sidebar-nav ul li {
    border-bottom: 1px solid #f5f5f5;
}
.mobile-sidebar-nav ul li a {
    display: block;
    padding: 12px 0;
    color: #333;
    text-decoration: none;
    font-weight: 500;
}
.mobile-sidebar-nav ul li.has-mega-menu > a::after,
.mobile-sidebar-nav ul li.has-dropdown > a::after {
    display: none; /* Hide dropdown arrows in simple mobile menu for now, or you could implement accordion */
}
.mobile-sidebar-nav .mega-menu, .mobile-sidebar-nav .dropdown-menu {
    display: none !important; /* Hide complex submenus for simplicity in mobile */
}

.mobile-sidebar-account {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}
.mobile-sidebar-account a {
    display: flex;
    align-items: center;
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.hamburger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--arynaz-text);
    padding: 0;
}

@media (max-width: 768px) {
    .hamburger-btn {
        display: block;
    }
    
    .main-header .search-bar, .main-header .wishlist-link, .main-header .account-link, .main-header .cart-total {
        display: none !important;
    }
    
    .cart-pill {
        background: transparent !important;
        padding: 0 !important;
        box-shadow: none !important;
        margin-right: auto; /* Push left */
    }
    
    .header-inner {
        position: relative;
        justify-content: flex-start;
        align-items: center;
        flex-wrap: nowrap;
        width: 100%;
    }
    
    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        margin: 0 !important;
    }
    
    .logo h2 {
        font-size: 18px;
    }
    
    .header-actions {
        margin-right: auto;
        gap: 0;
    }
}


@media (min-width: 769px) {
    .mobile-sidebar, .mobile-menu-overlay, .hamburger-btn {
        display: none !important;
    }
}

/* Standard WP Dropdown Styles to mimic mega menu feel */
.primary-menu .menu-item-has-children {
	position: relative;
}
.primary-menu .menu-item-has-children > a::after {
	content: '';
	display: inline-block;
	margin-right: 6px;
	vertical-align: middle;
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 4px solid currentColor;
}
.primary-menu .sub-menu {
	position: absolute;
	top: 100%;
	right: 0; /* For RTL */
	background: var(--arynaz-surface);
	border: 1px solid var(--arynaz-border);
	border-radius: 0 0 var(--arynaz-radius-md) var(--arynaz-radius-md);
	box-shadow: var(--arynaz-shadow-md);
	padding: 16px 0;
	min-width: 240px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: all 0.3s ease;
	z-index: 100;
	list-style: none;
	margin: 0;
}
.primary-menu .menu-item-has-children:hover > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.primary-menu .sub-menu li {
	margin: 0;
	padding: 0;
}
.primary-menu .sub-menu a {
	display: block;
	padding: 10px 24px;
	color: var(--arynaz-text-main);
	transition: all 0.2s;
	font-weight: 500;
	font-size: 14px;
}
.primary-menu .sub-menu a:hover {
	background: #f9f9f9;
	color: var(--arynaz-walnut);
	padding-right: 32px; /* slight indent */
}
.primary-menu .sub-menu .menu-item-has-children > .sub-menu {
	top: 0;
	right: 100%;
	margin-right: 4px;
}
