/* ============ VARIABLES - apni brand color yaha badlein ============ */
.cwh-wrapper {
	--cwh-primary: #123a63;
	--cwh-accent: #c9a24b;
	--cwh-btn: #1a56db;        /* website ke actual button blue se match */
	--cwh-btn-hover: #2f6bf0;
	--cwh-bg: #ffffff;
	--cwh-border: #e5e5e5;
	--cwh-text: #222222;
	font-family: inherit;
	position: relative;
	z-index: 100;
}

* { box-sizing: border-box; }

/* ============ TOP BAR ============ */
.cwh-topbar {
	background: var(--cwh-topbar-bg, #123a63);
	color: var(--cwh-topbar-text, #ffffff);
	font-size: 13px;
}
.cwh-topbar-inner {
	max-width: 1280px;
	margin: 0 auto;
	padding: 8px 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}
.cwh-topbar-left { display: flex; gap: 18px; flex-wrap: wrap; row-gap: 6px; }
.cwh-topbar-item {
	color: var(--cwh-topbar-text, #ffffff);
	text-decoration: none;
	opacity: .95;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
}
.cwh-topbar-item .cwh-icon { color: var(--cwh-topbar-text, #ffffff); flex-shrink: 0; }

/* Hover: text ghayab hone ka fix - theme ke global a:hover rules ko
   yahan explicitly override karte hain taaki phone/email hamesha
   visible rahe, chahe theme kuch bhi color/opacity set kare. */
.cwh-topbar-item:hover,
.cwh-topbar-item:hover span,
.cwh-topbar-item:hover .cwh-icon,
.cwh-topbar-item:focus,
.cwh-topbar-item:visited,
.cwh-topbar-item:active {
	color: var(--cwh-topbar-text, #ffffff) !important;
	opacity: 1 !important;
	text-decoration: none !important;
	background: transparent !important;
}
.cwh-topbar-delivery { cursor: default; }

/* Themed box (used for delivery) - sirf icon + aapka text, koi
   default title nahi. Theme ke color se match karta hai. */
.cwh-topbar-box {
	background: rgba(255,255,255,.16);
	border-radius: 20px;
	padding: 5px 16px !important;
}
.cwh-discount-badge {
	background: var(--cwh-badge-bg, #c9a24b);
	color: var(--cwh-badge-text, #1a1a1a);
	padding: 5px 14px;
	border-radius: 3px;
	font-weight: 600;
	font-size: 12px;
	letter-spacing: .3px;
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.cwh-discount-badge b { font-weight: 800; }

/* ============ MAIN HEADER ============ */
.cwh-main-header {
	background: var(--cwh-bg);
	border-bottom: 1px solid var(--cwh-border);
}
.cwh-main-inner {
	max-width: 1280px;
	margin: 0 auto;
	padding: 12px 20px;
	display: flex;
	align-items: center;
	gap: 24px;
}

/* Fixed-size logo: mobile aur desktop dono par same rehta hai,
   account name lamba ho ya chhota, logo kabhi shrink nahi hoga */
.cwh-logo {
	flex: 0 0 auto;
	width: 160px;
	max-width: 160px;
	display: flex;
	align-items: center;
}
.cwh-logo a { display: flex; align-items: center; height: 46px; }
.cwh-logo img {
	height: 46px;
	max-height: 46px;
	width: auto;
	max-width: 160px;
	object-fit: contain;
	display: block;
}
.cwh-logo-text {
	font-size: 21px; font-weight: 700; color: var(--cwh-text);
	text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Mobile hamburger toggle - hidden on desktop */
.cwh-mobile-toggle {
	display: none;
	background: none; border: none; cursor: pointer;
	color: var(--cwh-text);
	flex: 0 0 auto;
	padding: 4px;
}

.cwh-nav-overlay { display: none; }

.cwh-nav { flex: 1 1 auto; min-width: 0; }
.cwh-nav-mobile-header { display: none; }

.cwh-menu {
	display: flex;
	list-style: none;
	margin: 0; padding: 0;
	gap: 26px;
	flex-wrap: wrap;
}
.cwh-menu li a {
	text-decoration: none;
	color: var(--cwh-text);
	font-size: 15px;
	font-weight: 500;
	transition: color .15s;
}
.cwh-menu li a:hover { color: var(--cwh-btn); }
.cwh-menu li.menu-item-has-children { position: relative; }
.cwh-menu .sub-menu {
	display: none;
	position: absolute;
	top: 100%; left: 0;
	background: #fff;
	border: 1px solid var(--cwh-border);
	min-width: 200px;
	list-style: none;
	margin: 0; padding: 8px 0;
	z-index: 50;
	box-shadow: 0 8px 20px rgba(0,0,0,.08);
}
.cwh-menu li:hover > .sub-menu { display: block; }
.cwh-menu .sub-menu li a { display: block; padding: 8px 16px; }

/* ============ RIGHT SIDE (account + cart) - fixed, never shrinks ============ */
.cwh-right {
	display: flex;
	align-items: center;
	gap: 18px;
	flex: 0 0 auto;
}

/* Account */
.cwh-account { position: relative; flex-shrink: 0; }
.cwh-account-btn {
	background: none; border: none; cursor: pointer;
	font-size: 14px; color: var(--cwh-text);
	display: flex; align-items: center; gap: 6px;
	text-decoration: none;
	max-width: 160px;
}
.cwh-account-name {
	max-width: 90px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.cwh-icon { flex-shrink: 0; }
.cwh-account-dropdown {
	display: none;
	position: absolute;
	right: 0; top: calc(100% + 12px);
	background: #fff;
	border: 1px solid var(--cwh-border);
	min-width: 170px;
	box-shadow: 0 10px 30px rgba(0,0,0,.12);
	z-index: 60;
	border-radius: 6px;
	overflow: hidden;
}
.cwh-account-dropdown.cwh-open { display: block; }
.cwh-account-dropdown a {
	display: block;
	padding: 11px 16px;
	text-decoration: none;
	color: var(--cwh-text);
	font-size: 14px;
}
.cwh-account-dropdown a:hover { background: #f5f5f5; color: var(--cwh-btn); }

/* Cart button */
.cwh-cart-btn {
	background: none; border: none; cursor: pointer;
	display: flex; align-items: center; gap: 8px;
	position: relative;
	color: var(--cwh-text);
	padding: 4px;
}
.cwh-cart-count {
	position: absolute;
	top: -8px; left: 14px;
	background: var(--cwh-btn);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	border-radius: 50%;
	width: 18px; height: 18px;
	display: flex; align-items: center; justify-content: center;
}
.cwh-cart-total { font-size: 14px; font-weight: 600; white-space: nowrap; }

/* ============ SIDE CART DRAWER (premium look) ============ */
.cwh-cart-overlay {
	position: fixed; inset: 0;
	background: rgba(0,0,0,.45);
	display: none;
	z-index: 99998;
}
.cwh-cart-overlay.cwh-open { display: block; }

.cwh-side-cart {
	position: fixed;
	top: 0; right: -440px;
	width: 420px; max-width: 92vw;
	height: 100vh;
	background: #fff;
	z-index: 99999;
	box-shadow: -10px 0 40px rgba(0,0,0,.2);
	display: flex;
	flex-direction: column;
	transition: right .32s ease;
}
.cwh-side-cart.cwh-open { right: 0; }

.cwh-side-cart-header {
	display: flex; justify-content: space-between; align-items: center;
	padding: 20px 22px;
	border-bottom: 1px solid var(--cwh-border);
	background: #fafafa;
	flex: 0 0 auto;            /* header kabhi shrink/scroll nahi hoga - hamesha top par visible */
	position: relative;
	z-index: 2;
}
.cwh-side-cart-header h3 { margin: 0; font-size: 19px; font-weight: 700; color: var(--cwh-primary); }

/* Close (X) button - plain black icon, hamesha visible, koi colored
   circle/hover-flip nahi jo isse ghaayab jaisa dikhaye. */
#cwh-cart-close {
	background: transparent !important;
	border: none !important;
	border-radius: 50% !important;
	width: 34px !important;
	height: 34px !important;
	min-width: 34px !important;
	min-height: 34px !important;
	max-width: 34px !important;
	padding: 0 !important;
	flex: 0 0 34px;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	cursor: pointer;
	color: #000000 !important;
	opacity: 1 !important;
	visibility: visible !important;
	transition: background .15s;
}
#cwh-cart-close svg { display: block; pointer-events: none; fill: #000000 !important; }
#cwh-cart-close:hover { background: rgba(0,0,0,.06) !important; color: #000000 !important; }

.cwh-side-cart-body { flex: 1; overflow-y: auto; padding: 4px 22px; }
.cwh-empty-cart { text-align: center; color: #888; margin-top: 40px; font-size: 15px; }

/* Cart item row - simple line-separated list (no oval/boxed capsule) */
.cwh-cart-item {
	display: flex !important;
	align-items: flex-start !important;
	gap: 14px !important;
	padding: 16px 0 !important;
	margin: 0 !important;
	border: none !important;
	border-bottom: 1px solid var(--cwh-border) !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	list-style: none !important;
	position: relative !important;
	transition: background .15s;
}
.cwh-cart-item:hover { background: #fafafa !important; }
.cwh-cart-item:first-child { padding-top: 14px !important; }
.cwh-cart-item:last-child { border-bottom: none !important; margin-bottom: 0 !important; }
.cwh-item-img img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px !important; border: 1px solid var(--cwh-border); display: block; }
.cwh-item-info { flex: 1; min-width: 0; }
.cwh-item-title { margin: 0 0 5px; font-size: 14px; font-weight: 600; line-height: 1.35; color: var(--cwh-text); }
.cwh-item-qty { margin: 0 0 4px; font-size: 12.5px; color: #777; }
.cwh-item-price { margin: 0; font-size: 14px; font-weight: 700; color: var(--cwh-primary); }

/* Clear, obvious "remove item" button - circular with trash icon */
a.cwh-remove-item {
	position: static !important;
	flex-shrink: 0;
	width: 30px !important;
	height: 30px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	background: #f5f5f5 !important;
	color: #888 !important;
	border-radius: 50% !important;
	text-decoration: none !important;
	font-size: 0 !important;
	line-height: 1 !important;
	border: none !important;
	cursor: pointer;
	transition: background .15s, color .15s;
}
a.cwh-remove-item:hover { background: #fdeaea !important; color: #e02b2b !important; }
a.cwh-remove-item svg { pointer-events: none; }

.cwh-side-cart-footer {
	border-top: 1px solid var(--cwh-border);
	padding: 18px 22px 22px;
	background: #fafafa;
	flex: 0 0 auto;
}

/* Coupon card - clearly labeled, boxed, brand-blue accents */
.cwh-coupon-card {
	background: #fff;
	border: 1px solid var(--cwh-border);
	border-radius: 8px;
	padding: 14px;
	margin-bottom: 14px;
}
.cwh-coupon-label {
	display: flex; align-items: center; gap: 7px;
	font-size: 13px; font-weight: 700;
	color: var(--cwh-text);
	margin-bottom: 8px;
}
.cwh-coupon-label svg { color: var(--cwh-btn); }
.cwh-coupon-box { display: flex; gap: 8px; }
.cwh-coupon-box input {
	flex: 1; padding: 10px 12px;
	border: 1px solid var(--cwh-border); border-radius: 5px;
	font-size: 13px;
}
.cwh-coupon-box input:focus {
	outline: none;
	border-color: var(--cwh-btn);
	box-shadow: 0 0 0 3px rgba(26,86,219,.15);
}
.cwh-coupon-box button {
	padding: 10px 18px;
	background: var(--cwh-btn); color: #fff;
	border: none; border-radius: 5px; cursor: pointer;
	font-weight: 600; font-size: 13px;
	white-space: nowrap;
	transition: background .15s;
}
.cwh-coupon-box button:hover { background: var(--cwh-btn-hover); }
.cwh-coupon-msg { font-size: 12.5px; margin-top: 8px; font-weight: 600; }
.cwh-coupon-msg.success { color: #1b7a1b; }
.cwh-coupon-msg.error { color: #c0392b; }

/* Delivery estimate row */
.cwh-delivery-row {
	display: flex; align-items: center; gap: 8px;
	background: #eef4fb;
	color: var(--cwh-primary);
	border-radius: 6px;
	padding: 10px 12px;
	font-size: 12.5px;
	font-weight: 600;
	margin-bottom: 14px;
}
.cwh-delivery-row svg { flex-shrink: 0; }

.cwh-cart-total-row {
	display: flex; justify-content: space-between; align-items: center;
	font-size: 15px; font-weight: 700; color: var(--cwh-text);
	margin: 4px 0 16px;
}
.cwh-total-amount { font-size: 19px; color: var(--cwh-primary); }

/* Checkout button - matches website's brand blue button */
.cwh-checkout-btn {
	display: flex !important; align-items: center; justify-content: center; gap: 8px;
	text-align: center;
	background: var(--cwh-btn) !important;
	color: #ffffff !important;
	padding: 15px;
	border-radius: 8px;
	text-decoration: none;
	font-weight: 700;
	font-size: 15px;
	letter-spacing: .3px;
	border: none;
	box-shadow: 0 6px 16px rgba(26,86,219,.28);
	transition: background .15s, transform .15s;
}
.cwh-checkout-btn:hover { background: var(--cwh-btn-hover) !important; color: #fff !important; transform: translateY(-1px); }
.cwh-checkout-btn svg { fill: #fff !important; }

/* ============ RESPONSIVE / MOBILE MENU ============ */
@media (max-width: 900px) {

	.cwh-mobile-toggle { display: flex; align-items: center; justify-content: center; }

	.cwh-main-inner { gap: 14px; justify-content: space-between; }
	.cwh-logo { width: 130px; max-width: 130px; }
	.cwh-logo a { height: 40px; }
	.cwh-logo img { height: 40px; max-height: 40px; max-width: 130px; }

	/* nav mobile pe position:fixed ho jata hai (slide-in menu ke liye),
	   isliye woh flex flow se bahar nikal jata hai aur beech me khali
	   jagah reh jaati thi. margin-left:auto right group ko hamesha
	   right edge se chipka kar rakhega, gap nahi dikhegi. */
	.cwh-right { margin-left: auto; }

	.cwh-account-name { max-width: 60px; }
	.cwh-cart-total { display: none; } /* mobile pe sirf count icon dikhega, jagah bachane ke liye */

	/* slide-in mobile menu */
	.cwh-nav {
		position: fixed;
		top: 0; left: -300px;
		width: 280px; max-width: 85vw;
		height: 100vh;
		background: #fff;
		z-index: 99999;
		box-shadow: 10px 0 30px rgba(0,0,0,.15);
		transition: left .3s ease;
		overflow-y: auto;
		flex: none;
	}
	.cwh-nav.cwh-open { left: 0; }

	.cwh-nav-mobile-header {
		display: flex; align-items: center; justify-content: space-between;
		padding: 18px 20px;
		border-bottom: 1px solid var(--cwh-border);
		font-weight: 700; font-size: 16px;
	}
	.cwh-nav-mobile-header button { background: none; border: none; cursor: pointer; color: var(--cwh-text); }

	.cwh-menu { flex-direction: column; gap: 0; padding: 10px 0; }
	.cwh-menu li { border-bottom: 1px solid var(--cwh-border); }
	.cwh-menu li a { display: block; padding: 13px 20px; }
	.cwh-menu .sub-menu { position: static; border: none; box-shadow: none; padding-left: 14px; }

	.cwh-nav-overlay {
		display: block;
		position: fixed; inset: 0;
		background: rgba(0,0,0,.45);
		z-index: 99998;
		opacity: 0; pointer-events: none;
		transition: opacity .3s ease;
	}
	.cwh-nav-overlay.cwh-open { opacity: 1; pointer-events: auto; }
}

@media (max-width: 480px) {
	.cwh-topbar-item span,
	.cwh-discount-badge { font-size: 11.5px; }
	.cwh-side-cart { width: 100%; max-width: 100vw; }
}

/* ============ TOP BAR - FULL RESPONSIVE ============ */
@media (max-width: 900px) {
	/* Sabhi top-bar items (phone/email/delivery/discount) ek hi
	   wrap-grid me rakhte hain taaki 2 items ek row me side-by-side
	   dikhein, same font-size ke saath - koi alag row/size na ho. */
	.cwh-topbar-inner {
		flex-direction: row;
		flex-wrap: wrap;
		align-items: stretch;
		align-content: stretch;
		padding: 0;
		gap: 0;
	}
	.cwh-topbar-left {
		display: contents; /* children seedhe .cwh-topbar-inner grid me align honge */
	}
	.cwh-topbar-item,
	.cwh-topbar-right {
		width: 50%;
		box-sizing: border-box;
		margin: 0;
	}
	.cwh-topbar-item {
		display: flex;
		justify-content: center;
		align-items: center;
		gap: 6px;
		padding: 11px 8px;
		font-size: 12.5px;
		line-height: 1.3;
		border-bottom: 1px solid rgba(255,255,255,.14);
		text-align: center;
	}
	.cwh-topbar-item span { font-size: inherit; }
	.cwh-discount-badge {
		width: 100%;
		height: 100%;
		box-sizing: border-box;
		justify-content: center;
		align-items: center;
		border-radius: 0;
		padding: 11px 8px;
		font-size: 12.5px;
		border-bottom: 1px solid rgba(255,255,255,.14);
	}
	/* Agar total items odd hain (jaise sirf 3), to last item apni
	   row me akela full-width le lega taaki ek taraf khali gap na dikhe. */
	.cwh-topbar-item:last-child:nth-child(odd),
	.cwh-topbar-right:last-child {
		width: 100%;
	}
}

@media (max-width: 600px) {
	.cwh-topbar-item,
	.cwh-discount-badge { font-size: 12px; padding: 10px 8px; }
	.cwh-main-inner { padding: 10px 14px; }
	.cwh-cart-btn { gap: 4px; }
	.cwh-account-btn span.cwh-account-name,
	.cwh-account-btn span:not(.cwh-icon):not(.cwh-caret) { max-width: 55px; }
}

@media (max-width: 360px) {
	.cwh-logo { width: 110px; max-width: 110px; }
	.cwh-logo a { height: 34px; }
	.cwh-logo img { height: 34px; max-height: 34px; max-width: 110px; }
	.cwh-account-btn span:last-child { display: none; } /* very small screens: sirf icon dikhega */
}

/* ============ CHECKOUT PAGE: native coupon field styled to match ============ */
.woocommerce-checkout .checkout_coupon .input-text {
	border: 1px solid var(--cwh-border) !important;
	border-radius: 6px !important;
}
.woocommerce-checkout .checkout_coupon .input-text:focus {
	outline: none;
	border-color: var(--cwh-btn) !important;
	box-shadow: 0 0 0 3px rgba(26,86,219,.15);
}
.woocommerce-checkout .checkout_coupon button.button {
	background: var(--cwh-btn) !important;
	color: #fff !important;
	border: none !important;
	border-radius: 6px !important;
}
.woocommerce-checkout .checkout_coupon button.button:hover {
	background: var(--cwh-btn-hover) !important;
}
