body.codex-pdp-enhanced {
	--codex-pdp-border: rgba(127, 127, 127, .28);
	--codex-pdp-border: color-mix(in srgb, currentColor 18%, transparent);
	--codex-pdp-muted: currentColor;
	--codex-pdp-muted: color-mix(in srgb, currentColor 68%, transparent);
	--codex-pdp-sticky-offset: 24px;
}

body.admin-bar.codex-pdp-enhanced {
	--codex-pdp-sticky-offset: 56px;
}

/* --- Accordions / Disclosures --- */
.codex-pdp-enhanced .codex-pdp-accordions {
	width: 100%;
	margin: clamp(36px, 6vw, 76px) 0 20px;
	border-top: 1px solid var(--codex-pdp-border);
	font-family: inherit;
}

.codex-pdp-enhanced .codex-pdp-accordions > h2 {
	margin: 0;
	padding: 28px 0 20px;
	font: inherit;
	font-size: clamp(24px, 3vw, 36px);
	font-weight: 600;
	line-height: 1.2;
}

.codex-pdp-enhanced .codex-pdp-disclosure {
	margin: 0;
	border-top: 1px solid var(--codex-pdp-border);
}

.codex-pdp-enhanced .codex-pdp-disclosure:last-child {
	border-bottom: 1px solid var(--codex-pdp-border);
}

.codex-pdp-enhanced .codex-pdp-disclosure > summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 60px;
	padding: 16px 2px;
	cursor: pointer;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.35;
	list-style: none;
}

.codex-pdp-enhanced .codex-pdp-disclosure > summary::-webkit-details-marker {
	display: none;
}

.codex-pdp-enhanced .codex-pdp-disclosure > summary::after {
	content: "+";
	flex: 0 0 auto;
	font-size: 24px;
	font-weight: 400;
	line-height: 1;
}

.codex-pdp-enhanced .codex-pdp-disclosure[open] > summary::after {
	content: "−";
}

.codex-pdp-enhanced .codex-pdp-disclosure > summary:focus-visible,
.codex-pdp-enhanced .codex-pdp-policy-links a:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}

.codex-pdp-enhanced .codex-pdp-disclosure__content {
	max-width: 920px;
	padding: 0 2px 26px;
	color: var(--codex-pdp-muted);
	font-size: 15px;
	line-height: 1.7;
}

.codex-pdp-enhanced .codex-pdp-disclosure__content > :first-child {
	margin-top: 0;
}

.codex-pdp-enhanced .codex-pdp-disclosure__content > :last-child {
	margin-bottom: 0;
}

.codex-pdp-enhanced .codex-pdp-policy-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 12px;
}

.codex-pdp-enhanced .codex-pdp-policy-links a {
	color: inherit;
	font-weight: 600;
}

.codex-pdp-enhanced .codex-pdp-disclosure .shop_attributes {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
}

.codex-pdp-enhanced .codex-pdp-disclosure .shop_attributes th,
.codex-pdp-enhanced .codex-pdp-disclosure .shop_attributes td {
	padding: 12px 10px;
	border-bottom: 1px solid var(--codex-pdp-border);
	background: transparent;
	font: inherit;
	font-style: normal;
	text-align: left;
}

.codex-pdp-enhanced .codex-pdp-disclosure .shop_attributes th {
	width: min(36%, 260px);
	color: inherit;
	font-weight: 600;
}

/* --- Visual Swatches System --- */
.codex-swatches-wrapper {
	margin: 0 0 20px;
	width: 100%;
}

.codex-hidden-select {
	display: none !important;
}

/* Hide duplicate native WooCommerce variations table label */
.woocommerce div.product form.cart .variations td.label,
.woocommerce div.product form.cart .variations th.label,
.woocommerce div.product form.cart table.variations label {
	display: none !important;
}

/* Clean up raw WooCommerce internal taxonomy metadata dump */
.woocommerce div.product .product_meta {
	display: none !important;
}

/* Authentic DTC Solid Black Add-to-Cart Button & Disabled State */
.woocommerce div.product form.cart .button.single_add_to_cart_button {
	background: #000000 !important;
	color: #ffffff !important;
	border: 2px solid #000000 !important;
	border-radius: 999px !important;
	padding: 16px 32px !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.06em !important;
	transition: all 0.2s ease !important;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12) !important;
}

.woocommerce div.product form.cart .button.single_add_to_cart_button:hover:not(:disabled) {
	background: #1f2937 !important;
	border-color: #1f2937 !important;
	transform: translateY(-1px) !important;
}

.woocommerce div.product form.cart .button.single_add_to_cart_button:disabled,
.woocommerce div.product form.cart .button.single_add_to_cart_button.disabled {
	background: #f3f4f6 !important;
	color: #9ca3af !important;
	border-color: #e5e7eb !important;
	cursor: not-allowed !important;
	box-shadow: none !important;
	transform: none !important;
}


.codex-swatches-header {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin-bottom: 10px;
	font-size: 14px;
	line-height: 1.4;
}

.codex-swatch-label-name {
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: #333;
}

.codex-swatch-selected-text {
	font-weight: 500;
	color: #111;
}

.codex-swatches-list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

/* Color Swatches (Round Chips) */
.codex-swatches-list--colors .codex-swatch {
	position: relative;
	width: 40px;
	height: 40px;
	padding: 3px;
	border-radius: 50%;
	border: 2px solid transparent;
	background: transparent;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: border-color .18s ease, transform .18s ease;
	outline: none;
}

.codex-swatches-list--colors .codex-swatch:hover:not(.is-disabled) {
	border-color: #999;
}

.codex-swatches-list--colors .codex-swatch.is-selected {
	border-color: #111;
	transform: scale(1.05);
}

.codex-swatch__chip {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	display: block;
	border: 1px solid rgba(0, 0, 0, .14);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

/* Pill Swatches (Sizes, Capacities, Styles) */
.codex-swatches-list--pills .codex-swatch {
	min-width: 52px;
	height: 42px;
	padding: 0 16px;
	border: 1.5px solid #d1d5db;
	border-radius: 6px;
	background: #fff;
	color: #111;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	transition: all .15s ease;
	outline: none;
}

.codex-swatches-list--pills .codex-swatch:hover:not(.is-disabled) {
	border-color: #111;
}

.codex-swatches-list--pills .codex-swatch.is-selected {
	border-color: #111;
	background: #111;
	color: #fff;
}

/* Pack Option Cards (Packs, Bundles) */
.codex-swatches-list--packs {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 12px;
}

.codex-swatches-list--packs .codex-swatch {
	padding: 14px 18px;
	border: 1.5px solid #d1d5db;
	border-radius: 8px;
	background: #fff;
	color: #111;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	text-align: left;
	transition: all .15s ease;
	outline: none;
}

.codex-swatches-list--packs .codex-swatch:hover:not(.is-disabled) {
	border-color: #111;
}

.codex-swatches-list--packs .codex-swatch.is-selected {
	border-color: #111;
	background: #fbfbfb;
	box-shadow: 0 0 0 1px #111;
}

/* Disabled Swatch State */
.codex-swatch.is-disabled {
	opacity: .32;
	cursor: not-allowed;
	pointer-events: none;
	position: relative;
}

.codex-swatches-list--pills .codex-swatch.is-disabled {
	text-decoration: line-through;
	border-style: dashed;
}

.codex-swatch-pulse {
	animation: codexSwatchPulse .6s ease-in-out;
}

@keyframes codexSwatchPulse {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.04); box-shadow: 0 0 10px rgba(0,0,0,.15); }
}

/* Availability Status */
.codex-pdp-enhanced .codex-variation-availability {
	min-height: 24px;
	margin: 6px 0 16px;
	font-size: 14px;
}

.codex-pdp-enhanced .codex-variation-availability .stock {
	margin: 0;
	font-weight: 500;
}

.codex-pdp-enhanced .single_add_to_cart_button.disabled,
.codex-pdp-enhanced .single_add_to_cart_button:disabled {
	cursor: not-allowed;
	opacity: .5;
}

/* --- Mobile Sticky Buy Bar --- */
.codex-sticky-bar {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 9999;
	background: #fff;
	border-top: 1px solid rgba(0, 0, 0, .1);
	box-shadow: 0 -4px 18px rgba(0, 0, 0, .08);
	padding: 12px 20px;
	transform: translateY(115%);
	transition: transform .28s cubic-bezier(.16, 1, .3, 1);
}

.codex-sticky-bar.is-visible {
	transform: translateY(0);
}

.codex-sticky-bar__container {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.codex-sticky-bar__product {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.codex-sticky-bar__image {
	width: 48px;
	height: 48px;
	object-fit: contain;
	border-radius: 6px;
	flex-shrink: 0;
	background: #f7f7f7;
}

.codex-sticky-bar__meta {
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
}

.codex-sticky-bar__title {
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: #111;
}

.codex-sticky-bar__price {
	font-size: 15px;
	font-weight: 700;
	color: #111;
}

.codex-sticky-bar__button {
	min-height: 44px;
	padding: 0 28px;
	border-radius: 24px;
	font-weight: 700;
	white-space: nowrap;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: .05em;
	background: #111 !important;
	color: #fff !important;
	border: 0 !important;
	cursor: pointer;
}

/* --- Product Cards: Secondary Image Hover & Ribbon Badges --- */
.woocommerce ul.products li.product {
	position: relative;
}

.woocommerce ul.products li.product a.woocommerce-LoopProduct-link {
	position: relative;
	display: block;
	overflow: hidden;
}

.woocommerce ul.products li.product .codex-card-hover-image {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity .25s ease-in-out;
	pointer-events: none;
	z-index: 2;
}

.woocommerce ul.products li.product:hover .codex-card-hover-image {
	opacity: 1;
}

.codex-ribbon-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 4;
	padding: 4px 8px;
	border-radius: 3px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	line-height: 1;
}

.codex-ribbon-badge--sale {
	background: #cb0027;
	color: #fff;
}

.codex-ribbon-badge--featured {
	background: #111;
	color: #fff;
}

/* --- Responsive PDP Grid Layout --- */
@media (min-width: 992px) {
	.codex-pdp-enhanced .woocommerce div.product.codex-pdp-layout {
		display: grid;
		grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr);
		align-items: start;
		gap: 0 clamp(36px, 5vw, 82px);
	}

	.codex-pdp-enhanced .woocommerce div.product.codex-pdp-layout::before,
	.codex-pdp-enhanced .woocommerce div.product.codex-pdp-layout::after {
		display: none;
	}

	.codex-pdp-enhanced .woocommerce div.product.codex-pdp-layout > .woocommerce-product-gallery,
	.codex-pdp-enhanced .woocommerce div.product.codex-pdp-layout > .images {
		grid-column: 1;
		width: 100%;
		margin: 0;
		float: none;
	}

	.codex-pdp-enhanced .woocommerce div.product.codex-pdp-layout > .summary {
		position: static;
		grid-column: 2;
		align-self: start;
		width: 100%;
		margin: 0;
		float: none;
	}

	.codex-pdp-enhanced .woocommerce div.product.codex-pdp-layout > .codex-pdp-accordions,
	.codex-pdp-enhanced .woocommerce div.product.codex-pdp-layout > .woocommerce-tabs,
	.codex-pdp-enhanced .woocommerce div.product.codex-pdp-layout > .related,
	.codex-pdp-enhanced .woocommerce div.product.codex-pdp-layout > .upsells {
		grid-column: 1 / -1;
	}
}

@media (max-width: 991px) {
	.codex-pdp-enhanced .woocommerce div.product.codex-pdp-layout,
	.codex-pdp-enhanced .woocommerce div.product.codex-pdp-layout > .woocommerce-product-gallery,
	.codex-pdp-enhanced .woocommerce div.product.codex-pdp-layout > .images,
	.codex-pdp-enhanced .woocommerce div.product.codex-pdp-layout > .summary {
		display: block;
		width: 100%;
		margin-right: 0;
		margin-left: 0;
		float: none;
	}

	.codex-pdp-enhanced .codex-pdp-accordions {
		margin-top: 38px;
	}
}

@media (max-width: 600px) {
	.codex-pdp-enhanced .codex-pdp-accordions > h2 {
		padding-top: 22px;
		font-size: 24px;
	}

	.codex-pdp-enhanced .codex-pdp-disclosure > summary {
		min-height: 56px;
		font-size: 16px;
	}

	.codex-pdp-enhanced .codex-pdp-disclosure .shop_attributes th,
	.codex-pdp-enhanced .codex-pdp-disclosure .shop_attributes td {
		display: block;
		width: 100%;
	}

	.codex-pdp-enhanced .codex-pdp-disclosure .shop_attributes th {
		padding-bottom: 2px;
		border-bottom: 0;
	}

	.codex-sticky-bar__title {
		max-width: 140px;
	}
}

/* ==========================================================================
   DTC Slide-out Cart Drawer Styles
   ========================================================================== */

.codex-cart-drawer {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 999999;
	visibility: hidden;
	pointer-events: none;
	transition: visibility 0.35s ease;
}

.codex-cart-drawer.is-open {
	visibility: visible;
	pointer-events: auto;
}

.codex-cart-drawer__backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.55);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	opacity: 0;
	transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.codex-cart-drawer.is-open .codex-cart-drawer__backdrop {
	opacity: 1;
}

.codex-cart-drawer__panel {
	position: absolute;
	top: 0;
	right: 0;
	width: 100%;
	max-width: 440px;
	height: 100%;
	background: #ffffff;
	color: #111827;
	box-shadow: -8px 0 28px rgba(0, 0, 0, 0.18);
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	box-sizing: border-box;
}

.codex-cart-drawer.is-open .codex-cart-drawer__panel {
	transform: translateX(0);
}

/* Header */
.codex-cart-drawer__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px;
	border-bottom: 1px solid #f0f0f0;
	flex-shrink: 0;
}

.codex-cart-drawer__title-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
}

.codex-cart-drawer__title {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: #111827;
}

.codex-cart-drawer__count-badge {
	font-size: 16px;
	font-weight: 600;
	color: #6b7280;
}

.codex-cart-drawer__close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: none;
	background: transparent;
	border-radius: 50%;
	color: #4b5563;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
	padding: 0;
}

.codex-cart-drawer__close:hover {
	background: #f3f4f6;
	color: #111827;
}

/* Free Shipping Banner */
.codex-cart-drawer__shipping {
	background: #fafafa;
	border-bottom: 1px solid #f0f0f0;
	padding: 14px 24px;
	flex-shrink: 0;
}

.codex-shipping-text {
	margin: 0 0 8px 0;
	font-size: 13.5px;
	color: #374151;
	line-height: 1.4;
	text-align: center;
}

.codex-shipping-unlocked {
	color: #059669;
	font-weight: 600;
}

.codex-shipping-progress {
	width: 100%;
	height: 6px;
	background: #e5e7eb;
	border-radius: 999px;
	overflow: hidden;
}

.codex-shipping-progress-fill {
	height: 100%;
	background: #111827;
	border-radius: 999px;
	transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s;
}

.codex-shipping-progress-fill.is-complete {
	background: #10b981;
}

/* Body / Items */
.codex-cart-drawer__body {
	flex: 1 1 auto;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 16px 24px;
	-webkit-overflow-scrolling: touch;
}

.codex-drawer-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 100%;
	min-height: 240px;
	text-align: center;
	color: #6b7280;
}

.codex-drawer-empty__icon {
	color: #9ca3af;
	margin-bottom: 16px;
}

.codex-drawer-empty__title {
	font-size: 16px;
	margin: 0 0 20px;
	color: #374151;
}

.codex-drawer-empty__btn {
	background: #111827 !important;
	color: #ffffff !important;
	border: none !important;
	padding: 12px 24px !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	border-radius: 999px !important;
	cursor: pointer;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	transition: background 0.2s, transform 0.2s;
}

.codex-drawer-empty__btn:hover {
	background: #000000 !important;
	transform: translateY(-1px);
}

.codex-drawer-items {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.codex-drawer-item {
	display: flex;
	gap: 14px;
	padding-bottom: 16px;
	border-bottom: 1px solid #f3f4f6;
	transition: opacity 0.25s;
}

.codex-drawer-item.is-updating {
	opacity: 0.5;
	pointer-events: none;
}

.codex-drawer-item__image {
	flex: 0 0 76px;
	width: 76px;
	height: 76px;
	border-radius: 8px;
	overflow: hidden;
	background: #f9fafb;
	border: 1px solid #f0f0f0;
}

.codex-drawer-item__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.codex-drawer-item__details {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.codex-drawer-item__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
}

.codex-drawer-item__title {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	color: #111827;
}

.codex-drawer-item__title a {
	color: inherit;
	text-decoration: none;
}

.codex-drawer-item__title a:hover {
	text-decoration: underline;
}

.codex-drawer-item__remove {
	border: none;
	background: transparent;
	color: #9ca3af;
	cursor: pointer;
	padding: 2px;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color 0.2s;
}

.codex-drawer-item__remove:hover {
	color: #ef4444;
}

.codex-drawer-item__meta {
	font-size: 12px;
	color: #6b7280;
	margin: 4px 0 8px;
	line-height: 1.4;
}

.codex-drawer-item__meta dl {
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 4px 8px;
}

.codex-drawer-item__meta dt {
	font-weight: 500;
}

.codex-drawer-item__meta dd {
	margin: 0;
}

.codex-drawer-item__bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: auto;
}

.codex-drawer-item__qty {
	display: flex;
	align-items: center;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	overflow: hidden;
	background: #ffffff;
}

.codex-qty-btn {
	width: 28px;
	height: 28px;
	border: none;
	background: #f9fafb;
	color: #374151;
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s;
	padding: 0;
}

.codex-qty-btn:hover {
	background: #f3f4f6;
	color: #111827;
}

.codex-qty-input {
	width: 32px;
	height: 28px;
	border: none;
	text-align: center;
	font-size: 13px;
	font-weight: 600;
	color: #111827;
	padding: 0;
	-moz-appearance: textfield;
}

.codex-qty-input::-webkit-outer-spin-button,
.codex-qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.codex-drawer-item__price {
	font-size: 14px;
	font-weight: 700;
	color: #111827;
}

/* Footer / Checkout */
.codex-cart-drawer__footer {
	border-top: 1px solid #f0f0f0;
	padding: 20px 24px;
	background: #ffffff;
	flex-shrink: 0;
}

.codex-drawer-subtotal {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 6px;
}

.codex-drawer-subtotal__label {
	font-size: 15px;
	font-weight: 600;
	color: #111827;
}

.codex-drawer-subtotal__value {
	font-size: 18px;
	font-weight: 700;
	color: #111827;
}

.codex-drawer-disclaimer {
	margin: 0 0 16px 0;
	font-size: 12px;
	color: #6b7280;
	line-height: 1.35;
}

.codex-drawer-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.codex-drawer-checkout-btn {
	background: #000000 !important;
	color: #ffffff !important;
	border: none !important;
	padding: 16px 20px !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.06em !important;
	border-radius: 999px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 8px !important;
	cursor: pointer;
	text-decoration: none !important;
	transition: background 0.2s, transform 0.2s !important;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
}

.codex-drawer-checkout-btn:hover {
	background: #1f2937 !important;
	transform: translateY(-1px);
}

.codex-btn-arrow {
	transition: transform 0.2s ease;
	font-size: 18px;
	line-height: 1;
}

.codex-drawer-checkout-btn:hover .codex-btn-arrow {
	transform: translateX(4px);
}

.codex-drawer-viewcart-link {
	text-align: center;
	font-size: 13px;
	font-weight: 500;
	color: #4b5563;
	text-decoration: underline;
	transition: color 0.15s;
}

.codex-drawer-viewcart-link:hover {
	color: #111827;
}

.codex-drawer-trust {
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid #f3f4f6;
}

.codex-trust-badges {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	flex-wrap: wrap;
}

.codex-trust-item {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 11.5px;
	font-weight: 500;
	color: #6b7280;
}

/* Button Loading State on PDP */
.single_add_to_cart_button.is-loading,
.codex-sticky-bar__button.is-loading {
	position: relative;
	color: transparent !important;
	pointer-events: none;
}

.single_add_to_cart_button.is-loading::after,
.codex-sticky-bar__button.is-loading::after {
	content: "";
	position: absolute;
	width: 18px;
	height: 18px;
	top: 50%;
	left: 50%;
	margin: -9px 0 0 -9px;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: codex-spin 0.6s linear infinite;
}

@keyframes codex-spin {
	to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
	.codex-cart-drawer__panel {
		max-width: 100vw;
	}
}

/* ==========================================================================
   DTC Live Predictive Search Modal Styles
   ========================================================================== */

.codex-search-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1000000;
	visibility: hidden;
	pointer-events: none;
	transition: visibility 0.3s ease;
}

.codex-search-modal.is-open {
	visibility: visible;
	pointer-events: auto;
}

.codex-search-modal__backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.65);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	opacity: 0;
	transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.codex-search-modal.is-open .codex-search-modal__backdrop {
	opacity: 1;
}

.codex-search-modal__content {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	background: #ffffff;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
	max-height: 85vh;
	overflow-y: auto;
	transform: translateY(-100%);
	transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
	box-sizing: border-box;
}

.codex-search-modal.is-open .codex-search-modal__content {
	transform: translateY(0);
}

.codex-search-modal__inner {
	max-width: 900px;
	margin: 0 auto;
	padding: 32px 24px 40px;
}

.codex-search-modal__header {
	display: flex;
	align-items: center;
	gap: 16px;
	border-bottom: 2px solid #111827;
	padding-bottom: 12px;
}

.codex-search-input-wrap {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	gap: 12px;
}

.codex-search-input-icon {
	color: #6b7280;
	flex-shrink: 0;
}

.codex-search-input {
	flex: 1 1 auto;
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
	background: transparent !important;
	font-size: 22px !important;
	font-weight: 500 !important;
	color: #111827 !important;
	padding: 0 !important;
	font-family: inherit;
}

.codex-search-input::placeholder {
	color: #9ca3af;
}

.codex-search-clear {
	background: #f3f4f6;
	border: none;
	border-radius: 50%;
	width: 26px;
	height: 26px;
	display: none;
	align-items: center;
	justify-content: center;
	color: #6b7280;
	cursor: pointer;
	font-size: 13px;
	transition: background 0.15s, color 0.15s;
}

.codex-search-clear.is-visible {
	display: flex;
}

.codex-search-clear:hover {
	background: #e5e7eb;
	color: #111827;
}

.codex-search-close-btn {
	display: flex;
	align-items: center;
	gap: 6px;
	background: transparent;
	border: none;
	color: #6b7280;
	cursor: pointer;
	padding: 6px 12px;
	border-radius: 6px;
	transition: background 0.15s, color 0.15s;
}

.codex-search-close-btn:hover {
	background: #f3f4f6;
	color: #111827;
}

.codex-search-esc {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.05em;
	padding: 2px 6px;
	background: #f3f4f6;
	border: 1px solid #e5e7eb;
	border-radius: 4px;
	color: #4b5563;
}

/* Trending Searches */
.codex-search-trending {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 20px;
	flex-wrap: wrap;
}

.codex-trending-label {
	font-size: 13px;
	font-weight: 600;
	color: #6b7280;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.codex-trending-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.codex-trending-tag {
	background: #f3f4f6;
	border: 1px solid transparent;
	border-radius: 999px;
	padding: 6px 14px;
	font-size: 13px;
	font-weight: 500;
	color: #374151;
	cursor: pointer;
	transition: all 0.15s ease;
}

.codex-trending-tag:hover {
	background: #111827;
	color: #ffffff;
}

/* Search Results Layout */
.codex-search-results {
	margin-top: 28px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.codex-search-cats-wrap {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	padding-bottom: 16px;
	border-bottom: 1px solid #f3f4f6;
}

.codex-search-cat-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	background: #eff6ff;
	color: #1d4ed8;
	font-size: 13px;
	font-weight: 600;
	border-radius: 999px;
	text-decoration: none;
	transition: background 0.15s;
}

.codex-search-cat-pill:hover {
	background: #dbeafe;
}

.codex-search-products-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 16px;
}

.codex-search-product-card {
	display: flex;
	gap: 12px;
	align-items: center;
	padding: 10px;
	border-radius: 8px;
	background: #ffffff;
	border: 1px solid #f0f0f0;
	text-decoration: none;
	transition: transform 0.18s, box-shadow 0.18s;
}

.codex-search-product-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.codex-search-product-img {
	width: 56px;
	height: 56px;
	border-radius: 6px;
	object-fit: cover;
	background: #f9fafb;
	flex-shrink: 0;
}

.codex-search-product-info {
	min-width: 0;
}

.codex-search-product-title {
	margin: 0 0 4px;
	font-size: 13.5px;
	font-weight: 600;
	color: #111827;
	line-height: 1.35;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.codex-search-product-price {
	font-size: 13px;
	font-weight: 700;
	color: #111827;
}

.codex-search-viewall-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: #111827;
	color: #ffffff;
	padding: 12px 24px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	align-self: center;
	margin-top: 10px;
	transition: background 0.2s;
}

.codex-search-viewall-btn:hover {
	background: #000000;
}

/* Sticky Header Drop Shadow on Scroll */
.header-scrolled,
.site-header.is-scrolled,
header.is-scrolled {
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
	transition: box-shadow 0.25s ease;
}

@media (max-width: 640px) {
	.codex-search-modal__inner {
		padding: 20px 16px 28px;
	}
	.codex-search-input {
		font-size: 17px !important;
	}
	.codex-search-esc {
		display: none;
	}
	.codex-search-products-grid {
		grid-template-columns: 1fr;
	}
}

/* Ensure mega inner containers are never hidden when the mega menu is open */
[class*="-header__mega"]:not([hidden]) [class*="-header__mega-inner"],
.allbirds-header__mega:not([hidden]) .allbirds-header__mega-inner,
.americangirl-header__mega:not([hidden]) .americangirl-header__mega-inner,
.stanley-header__mega:not([hidden]) .stanley-header__mega-inner,
.reef-header__mega:not([hidden]) .reef-header__mega-inner {
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
}

/* --- Universal Navigation Dropdown Parity & Compact Styles --- */
@media (min-width: 769px) {
	/* Compact Dropdown Card for 1-column menus */
	.codex-compact-group,
	[class*="-header__group"].codex-compact-group,
	.americangirl-header__group.is-compact-group {
		position: relative !important;
	}

	.codex-compact-dropdown,
	[class*="-header__mega"].codex-compact-dropdown,
	.americangirl-header__group.is-compact-group .americangirl-header__mega,
	.americangirl-header__mega.is-compact-dropdown {
		position: absolute !important;
		left: 0 !important;
		right: auto !important;
		top: 100% !important;
		width: max-content !important;
		min-width: 220px !important;
		max-width: 360px !important;
		height: auto !important;
		min-height: 80px !important;
		max-height: calc(100vh - 120px) !important;
		border-radius: 8px !important;
		box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14) !important;
		border: 1px solid #e5e7eb !important;
		padding: 16px 20px !important;
		background: #ffffff !important;
		z-index: 100 !important;
		overflow: visible !important;
	}

	.codex-compact-dropdown [class*="-header__mega-inner"],
	.americangirl-header__group.is-compact-group .americangirl-header__mega-inner,
	.americangirl-header__mega.is-compact-dropdown .americangirl-header__mega-inner {
		display: block !important;
		width: 100% !important;
		max-width: 100% !important;
		padding: 0 !important;
		margin: 0 !important;
	}

	.codex-compact-dropdown [class*="-header__columns"],
	.americangirl-header__group.is-compact-group .americangirl-header__columns,
	.americangirl-header__mega.is-compact-dropdown .americangirl-header__columns {
		display: block !important;
		grid-template-columns: none !important;
		gap: 0 !important;
		width: 100% !important;
		margin: 0 !important;
		padding: 0 !important;
	}

	.codex-compact-dropdown [class*="-header__column"],
	.americangirl-header__group.is-compact-group .americangirl-header__column,
	.americangirl-header__mega.is-compact-dropdown .americangirl-header__column {
		display: block !important;
		width: 100% !important;
		min-width: 100% !important;
		max-width: 100% !important;
		margin: 0 !important;
		padding: 0 !important;
	}

	.codex-compact-dropdown [class*="-header__column"] h2,
	.americangirl-header__group.is-compact-group .americangirl-header__column h2,
	.americangirl-header__mega.is-compact-dropdown .americangirl-header__column h2 {
		display: block !important;
		color: #111827 !important;
		font: 700 14px/1.3 Inter, sans-serif !important;
		letter-spacing: -0.01em !important;
		margin: 0 0 8px 0 !important;
		padding-bottom: 6px !important;
		border-bottom: 1px solid #f3f4f6 !important;
	}

	.codex-compact-dropdown [class*="-header__column-panel"],
	.americangirl-header__group.is-compact-group .americangirl-header__column-panel,
	.americangirl-header__mega.is-compact-dropdown .americangirl-header__column-panel {
		display: block !important;
		position: static !important;
		width: 100% !important;
		min-height: 0 !important;
		max-height: none !important;
		background: transparent !important;
		padding: 0 !important;
		margin: 0 !important;
		box-shadow: none !important;
		border: 0 !important;
		z-index: auto !important;
	}

	.codex-compact-dropdown [class*="-header__column-panel"] > ul,
	.americangirl-header__group.is-compact-group .americangirl-header__column-panel > ul,
	.americangirl-header__mega.is-compact-dropdown .americangirl-header__column-panel > ul {
		display: block !important;
		list-style: none !important;
		padding: 0 !important;
		margin: 0 !important;
	}

	.codex-compact-dropdown [class*="-header__column-panel"] > ul > li,
	.americangirl-header__group.is-compact-group .americangirl-header__column-panel > ul > li,
	.americangirl-header__mega.is-compact-dropdown .americangirl-header__column-panel > ul > li {
		display: block !important;
		padding: 0 !important;
		margin: 0 !important;
	}

	.codex-compact-dropdown [class*="-header__submenu-link"],
	.americangirl-header__group.is-compact-group .americangirl-header__submenu-link,
	.americangirl-header__mega.is-compact-dropdown .americangirl-header__submenu-link {
		display: flex !important;
		align-items: center !important;
		color: #374151 !important;
		font: 500 13.5px/1.4 Inter, sans-serif !important;
		padding: 6px 0 !important;
		text-decoration: none !important;
		white-space: nowrap !important;
	}

	.codex-compact-dropdown [class*="-header__submenu-link"]:hover,
	.americangirl-header__group.is-compact-group .americangirl-header__submenu-link:hover,
	.americangirl-header__mega.is-compact-dropdown .americangirl-header__submenu-link:hover {
		color: #bc0a4d !important;
	}

	.codex-compact-dropdown [class*="-header__back"],
	.codex-compact-dropdown [class*="-header__mega-heading"],
	.codex-compact-dropdown [class*="-header__column-toggle"],
	.codex-compact-dropdown [class*="-header__column-back"],
	.codex-compact-dropdown [class*="-header__column-panel"] > h3,
	.americangirl-header__group.is-compact-group .americangirl-header__back,
	.americangirl-header__group.is-compact-group .americangirl-header__mega-heading,
	.americangirl-header__group.is-compact-group .americangirl-header__column-toggle,
	.americangirl-header__group.is-compact-group .americangirl-header__column-back,
	.americangirl-header__group.is-compact-group .americangirl-header__column-panel > h3,
	.americangirl-header__mega.is-compact-dropdown .americangirl-header__back,
	.americangirl-header__mega.is-compact-dropdown .americangirl-header__mega-heading,
	.americangirl-header__mega.is-compact-dropdown .americangirl-header__column-toggle,
	.americangirl-header__mega.is-compact-dropdown .americangirl-header__column-back,
	.americangirl-header__mega.is-compact-dropdown .americangirl-header__column-panel > h3 {
		display: none !important;
	}

	/* Balanced Multi-Column Columns */
	.americangirl-header__columns {
		display: flex !important;
		flex-wrap: wrap !important;
		gap: 36px 56px !important;
		align-items: start !important;
		justify-content: flex-start !important;
	}

	.americangirl-header__column {
		flex: 0 0 auto !important;
		min-width: 170px !important;
		max-width: 260px !important;
	}

	/* Ensure navigation backdrop never stays stuck or covers page on desktop */
	.americangirl-header:not(.is-search-open):not(.is-menu-open) .americangirl-header__backdrop,
	[class*="-header"]:not(.is-search-open):not(.is-menu-open) [class*="-header__backdrop"],
	header:not(.is-search-open):not(.is-menu-open) [class*="-header__backdrop"] {
		display: none !important;
		visibility: hidden !important;
		opacity: 0 !important;
		pointer-events: none !important;
	}
}



