/**
 * West Elm Shop — Matching westelm.com layout
 * Based on real screenshot: promo bar 3-col, horizontal category scroll,
 * filter bar, 3-column product grid, left-aligned text, wishlist hearts.
 */

:root {
	--we-black: #1a1a1a;
	--we-dark: #333;
	--we-text: #444;
	--we-gray: #6b6b6b;
	--we-gray-lt: #999;
	--we-border: #e0e0e0;
	--we-border-lt: #eee;
	--we-bg: #f7f5f3;
	--we-white: #fff;
	--we-sale: #c41230;
	--we-gold: #8b7355;
	--we-font: "Lexend Deca", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	--we-ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ============================================================
   Base
   ============================================================ */

body.westelm-shop-page {
	background-color: var(--we-white);
}

.westelm-shop {
	font-family: var(--we-font);
	color: var(--we-black);
}


/* ============================================================
   Promo Bar — 3 columns with dividers (like WE screenshot)
   ============================================================ */

.we-promo-bar {
	background-color: var(--we-bg);
	border-bottom: 1px solid var(--we-border);
	padding: 0 !important;
}

.we-promo-bar__inner {
	display: flex;
	max-width: 1400px;
	margin: 0 auto;
}

.we-promo-bar__col {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 14px 20px;
	text-decoration: none;
	border-right: 1px solid var(--we-border);
	transition: background-color 0.2s ease;
}

.we-promo-bar__col:last-child {
	border-right: none;
}

.we-promo-bar__col:hover {
	background-color: #ede9e3;
}

.we-promo-bar__headline {
	font-size: 13px;
	font-weight: 500;
	color: var(--we-black);
	line-height: 1.3;
}

.we-promo-bar__link {
	font-size: 11px;
	font-weight: 400;
	color: var(--we-gray);
	letter-spacing: 0.5px;
	margin-top: 2px;
}


/* ============================================================
   Page Header — breadcrumb + title + count
   ============================================================ */

.we-page-header {
	padding-top: 28px !important;
	padding-bottom: 8px !important;
}

.we-page-header__inner {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	max-width: 1400px;
	margin: 0 auto;
}

.we-page-header__breadcrumb {
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--we-gray);
	display: block;
	margin-bottom: 4px;
}

.we-page-header__title {
	font-size: 28px;
	font-weight: 300;
	color: var(--we-black);
	margin: 0;
	line-height: 1.2;
}

.we-page-header__count {
	font-size: 13px;
	color: var(--we-gray);
}


/* ============================================================
   Category Horizontal Scroll — landscape cards + text below
   ============================================================ */

.we-cat-scroll {
	padding-top: 20px !important;
	padding-bottom: 32px !important;
	border-bottom: 1px solid var(--we-border);
}

.we-cat-scroll__wrapper {
	position: relative;
	max-width: 1400px;
	margin: 0 auto;
}

.we-cat-scroll__track {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	padding-bottom: 4px;
}

.we-cat-scroll__track::-webkit-scrollbar {
	display: none;
}

.we-cat-scroll__item {
	flex: 0 0 auto;
	width: 200px;
	text-decoration: none;
	display: block;
}

.we-cat-scroll__img {
	width: 200px;
	height: 140px;
	overflow: hidden;
	background-color: var(--we-bg);
}

.we-cat-scroll__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.5s var(--we-ease);
}

.we-cat-scroll__item:hover .we-cat-scroll__img img {
	transform: scale(1.05);
}

.we-cat-scroll__name {
	display: block;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--we-black);
	margin-top: 10px;
	padding-bottom: 6px;
	border-bottom: 2px solid transparent;
	transition: border-color 0.2s ease;
}

.we-cat-scroll__item:hover .we-cat-scroll__name {
	border-bottom-color: var(--we-black);
}

.we-cat-scroll__name--sale {
	color: var(--we-sale);
}

.we-cat-scroll__item:hover .we-cat-scroll__name--sale {
	border-bottom-color: var(--we-sale);
}

/* Scroll arrow */
.we-cat-scroll__arrow {
	position: absolute;
	right: -4px;
	top: 50%;
	transform: translateY(-60%);
	width: 40px;
	height: 40px;
	background: rgba(255,255,255,0.9);
	border: 1px solid var(--we-border);
	border-radius: 50%;
	font-size: 24px;
	line-height: 1;
	color: var(--we-black);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
	transition: all 0.2s ease;
	z-index: 2;
}

.we-cat-scroll__arrow:hover {
	background: var(--we-white);
	box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}


/* ============================================================
   Products Section
   ============================================================ */

.we-products-section {
	padding-top: 0 !important;
	max-width: 1440px !important;
	margin: 0 auto;
}

.we-products-section__title {
	font-size: 24px;
	font-weight: 300;
	color: var(--we-black);
	margin: 32px 0 20px;
	padding: 0;
	line-height: 1.3;
}


/* ============================================================
   Filter Bar — horizontal pills
   ============================================================ */

.we-filter-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 0 16px;
	border-bottom: 1px solid var(--we-border);
	margin-bottom: 28px;
}

.we-filter-bar__left {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.we-filter-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	font-size: 13px;
	font-weight: 400;
	font-family: var(--we-font);
	color: var(--we-black);
	background: var(--we-white);
	border: 1px solid var(--we-border);
	border-radius: 20px;
	cursor: pointer;
	transition: all 0.15s ease;
	white-space: nowrap;
}

.we-filter-btn:hover {
	border-color: var(--we-black);
}

.we-filter-btn svg {
	width: 10px;
	height: 6px;
	flex-shrink: 0;
}

.we-filter-btn--icon {
	gap: 8px;
}

.we-filter-btn--icon svg {
	width: 16px;
	height: 16px;
}

.we-filter-bar__right {
	display: flex;
	align-items: center;
	gap: 8px;
}

.we-filter-bar__sort-label {
	font-size: 13px;
	color: var(--we-gray);
}


/* ============================================================
   Product Grid — 3 columns, WE-style cards
   ============================================================ */

.we-product-grid .wc-block-product-template,
.we-product-grid .wp-block-woocommerce-product-template {
	display: grid !important;
	grid-template-columns: repeat(3, 1fr) !important;
	gap: 24px 16px !important;
}

/* Product Card */
.we-product-card {
	position: relative;
}

.we-product-card .wc-block-components-product-image,
.we-product-card .wp-block-woocommerce-product-image {
	overflow: hidden;
	background-color: #f0edea;
	position: relative;
}

.we-product-card .wc-block-components-product-image img,
.we-product-card .wp-block-woocommerce-product-image img,
.we-product-card .wc-block-components-product-image a img {
	width: 100%;
	height: auto;
	display: block;
	transition: transform 0.5s var(--we-ease);
}

.we-product-card:hover .wc-block-components-product-image img,
.we-product-card:hover .wp-block-woocommerce-product-image img,
.we-product-card:hover .wc-block-components-product-image a img {
	transform: scale(1.03);
}

/* Wishlist heart icon (CSS-only) */
.we-product-card .wc-block-components-product-image::after,
.we-product-card .wp-block-woocommerce-product-image::after {
	content: '\2661';
	position: absolute;
	top: 12px;
	right: 12px;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	color: var(--we-gray);
	background: rgba(255,255,255,0.85);
	border-radius: 50%;
	opacity: 0;
	transition: opacity 0.25s ease;
	z-index: 2;
	pointer-events: none;
}

.we-product-card:hover .wc-block-components-product-image::after,
.we-product-card:hover .wp-block-woocommerce-product-image::after {
	opacity: 1;
}

/* Product text — left-aligned (like WE) */
.we-product-grid .wp-block-post-terms {
	text-align: left;
}

.we-product-grid .wp-block-post-terms a {
	color: var(--we-black) !important;
	text-decoration: none !important;
	font-size: 11px !important;
	font-weight: 600 !important;
	letter-spacing: 1px;
	text-transform: uppercase;
}

.we-product-grid .wp-block-post-title {
	text-align: left;
}

.we-product-grid .wp-block-post-title a {
	color: var(--we-dark) !important;
	text-decoration: none !important;
	font-size: 14px !important;
	font-weight: 400 !important;
	line-height: 1.5 !important;
}

.we-product-grid .wp-block-post-title a:hover {
	text-decoration: underline !important;
}

/* Price — left aligned */
.we-product-grid .wc-block-components-product-price,
.we-product-grid .wp-block-woocommerce-product-price {
	text-align: left;
	font-size: 14px !important;
	color: var(--we-dark);
	font-weight: 400;
}

.we-product-grid .wc-block-components-product-price del {
	color: var(--we-gray-lt) !important;
	font-weight: 300;
	margin-right: 6px;
}

.we-product-grid .wc-block-components-product-price ins {
	color: var(--we-sale) !important;
	font-weight: 500;
	text-decoration: none;
}

/* Sale badge */
.we-product-grid .wc-block-components-product-sale-badge,
.westelm-shop .onsale {
	position: absolute !important;
	top: auto !important;
	bottom: 0 !important;
	left: 0 !important;
	right: auto !important;
	background-color: var(--we-white) !important;
	color: var(--we-sale) !important;
	border: none !important;
	border-radius: 0 !important;
	font-size: 11px !important;
	font-weight: 600 !important;
	letter-spacing: 1px !important;
	text-transform: uppercase !important;
	padding: 4px 0 !important;
	margin: 0 !important;
	z-index: 3;
}

/* Hide default add-to-cart button in grid (WE doesn't show it) */
.we-product-grid .wc-block-components-product-button,
.we-product-grid .wp-block-woocommerce-product-button,
.we-product-card .wp-block-button {
	display: none !important;
}


/* ============================================================
   Pagination
   ============================================================ */

.we-pagination {
	margin-top: 48px !important;
	padding-top: 24px;
	border-top: 1px solid var(--we-border);
}

.we-pagination .page-numbers,
.we-pagination a,
.we-pagination span {
	font-size: 14px;
	font-weight: 400;
	color: var(--we-dark);
	padding: 8px 14px;
	text-decoration: none;
}

.we-pagination .page-numbers.current,
.we-pagination span[aria-current] {
	font-weight: 600;
	border-bottom: 2px solid var(--we-black);
}

.we-pagination a:hover {
	color: var(--we-black);
}


/* ============================================================
   Navigation Overrides — ALL CAPS, underline active, mega menu
   ============================================================ */

/* Make primary nav uppercase like WE */
.primary-menu .wp-block-navigation-item > .wp-block-navigation-item__content {
	text-transform: uppercase !important;
	font-size: 12px !important;
	font-weight: 500 !important;
	letter-spacing: 1.5px !important;
	position: relative;
	padding-bottom: 4px;
}

/* Underline on hover */
.primary-menu .wp-block-navigation-item > .wp-block-navigation-item__content::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 0;
	height: 2px;
	background-color: var(--we-black);
	transition: width 0.25s var(--we-ease);
}

.primary-menu .wp-block-navigation-item:hover > .wp-block-navigation-item__content::after {
	width: 100%;
}

/* Sale link red */
.westelm-nav-sale > a,
.westelm-nav-sale > .wp-block-navigation-item__content {
	color: var(--we-sale) !important;
}

.primary-menu .westelm-nav-sale > .wp-block-navigation-item__content::after {
	background-color: var(--we-sale);
}


/* ---- Mega Menu: Furniture (3-col: Room | Style | Image) ---- */
/* Position/size/visibility fully controlled by JS (inline styles).   */
/* CSS here handles only visual styling: colors, fonts, padding, etc. */

/* Hide the WP toggle button for mega menu on desktop */
.westelm-nav-furniture.has-mega-menu > .wp-block-navigation-submenu__toggle {
	display: none !important;
}


/* ---- Column shared styles ---- */
.westelm-nav-furniture .mega-col {
	padding: 32px 40px;
}

/* Vertical divider between col 1 and col 2 */
.westelm-nav-furniture .mega-col--room {
	border-right: 1px solid var(--we-border);
}

/* Column headings: "Shop by Room" / "Shop by Style" */
.westelm-nav-furniture .mega-col > .wp-block-navigation-item__content {
	font-size: 17px !important;
	font-weight: 500 !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
	color: var(--we-black) !important;
	display: block !important;
	margin-bottom: 20px !important;
	padding: 0 !important;
	pointer-events: none;
	cursor: default;
}

/* Remove underline animation from column headings */
.westelm-nav-furniture .mega-col > .wp-block-navigation-item__content::after {
	display: none !important;
}

/* Hide toggle button on mega-col submenu items */
.westelm-nav-furniture .mega-col > .wp-block-navigation-submenu__toggle {
	display: none !important;
}


/* ---- Nested submenu containers (link lists) — force always visible ---- */
.westelm-nav-furniture .mega-col > .wp-block-navigation__submenu-container {
	display: flex !important;
	flex-direction: column !important;
	position: relative !important;
	left: auto !important;
	top: auto !important;
	width: auto !important;
	min-width: 0 !important;
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	padding: 0 !important;
	opacity: 1 !important;
	visibility: visible !important;
	height: auto !important;
	overflow: visible !important;
	pointer-events: auto !important;
	transform: none !important;
	gap: 0 !important;
}

/* Individual link items */
.westelm-nav-furniture .mega-col .wp-block-navigation__submenu-container .wp-block-navigation-link,
.westelm-nav-furniture .mega-col .wp-block-navigation__submenu-container .wp-block-navigation-item {
	width: auto !important;
}

.westelm-nav-furniture .mega-col .wp-block-navigation__submenu-container a {
	font-size: 15px !important;
	font-weight: 400 !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	color: var(--we-gray) !important;
	padding: 7px 0 !important;
	line-height: 1.4 !important;
	transition: color 0.15s ease;
	text-decoration: none !important;
}

.westelm-nav-furniture .mega-col .wp-block-navigation__submenu-container a:hover {
	color: var(--we-black) !important;
}


/* ---- Image card (column 3) ---- */
.westelm-nav-furniture .mega-image-card {
	position: relative !important;
	padding: 0 !important;
	min-height: 380px;
	background: url('/wp-content/uploads/2024/11/p-11.jpg') center / cover no-repeat;
	display: flex !important;
	align-items: flex-end !important;
}

.westelm-nav-furniture .mega-image-card > .wp-block-navigation-item__content {
	display: block !important;
	width: 100%;
	background: rgba(255, 255, 255, 0.92);
	padding: 18px 24px !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	letter-spacing: 2px !important;
	text-transform: uppercase !important;
	color: var(--we-black) !important;
	text-decoration: none !important;
	transition: background 0.2s ease;
}

.westelm-nav-furniture .mega-image-card > .wp-block-navigation-item__content::after {
	content: ' \2192' !important;
	position: static !important;
	display: inline !important;
	width: auto !important;
	height: auto !important;
	background: none !important;
}

.westelm-nav-furniture .mega-image-card:hover > .wp-block-navigation-item__content {
	background: rgba(255, 255, 255, 1);
}


/* ============================================================
   Responsive — 1024px
   ============================================================ */

@media (max-width: 1024px) {
	.we-promo-bar__headline {
		font-size: 12px;
	}

	.we-promo-bar__link {
		font-size: 10px;
	}

	.we-cat-scroll__item {
		width: 170px;
	}

	.we-cat-scroll__img {
		width: 170px;
		height: 120px;
	}

	/* Mega menu: hide image card on smaller screens */
	.westelm-nav-furniture .mega-image-card {
		display: none !important;
	}
}


/* ============================================================
   Responsive — 768px
   ============================================================ */

@media (max-width: 768px) {
	/* Promo bar: stack or show 1 */
	.we-promo-bar__inner {
		flex-direction: column;
	}

	.we-promo-bar__col {
		border-right: none;
		border-bottom: 1px solid var(--we-border);
		padding: 10px 16px;
	}

	.we-promo-bar__col:last-child {
		border-bottom: none;
	}

	/* Page header */
	.we-page-header__title {
		font-size: 22px;
	}

	/* Category scroll */
	.we-cat-scroll__item {
		width: 150px;
	}

	.we-cat-scroll__img {
		width: 150px;
		height: 105px;
	}

	.we-cat-scroll__name {
		font-size: 11px;
	}

	.we-cat-scroll__arrow {
		display: none;
	}

	/* Filter bar: scroll horizontal */
	.we-filter-bar__left {
		overflow-x: auto;
		flex-wrap: nowrap;
		-webkit-overflow-scrolling: touch;
	}

	/* Product grid: 2 columns */
	.we-product-grid .wc-block-product-template,
	.we-product-grid .wp-block-woocommerce-product-template {
		grid-template-columns: repeat(2, 1fr) !important;
	}

	/* Section title */
	.we-products-section__title {
		font-size: 20px;
	}
}


/* ============================================================
   Responsive — 480px
   ============================================================ */

@media (max-width: 480px) {
	.we-promo-bar__inner {
		display: none; /* Hide on tiny screens or show only first */
	}

	.we-promo-bar__inner {
		display: flex;
	}

	.we-promo-bar__col:nth-child(n+2) {
		display: none;
	}

	.we-promo-bar__col {
		border: none;
	}

	.we-page-header__title {
		font-size: 20px;
	}

	.we-cat-scroll__item {
		width: 130px;
	}

	.we-cat-scroll__img {
		width: 130px;
		height: 90px;
	}

	.we-cat-scroll__name {
		font-size: 10px;
		letter-spacing: 0.5px;
	}

	.we-filter-bar {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}

	.we-filter-bar__right {
		display: none;
	}

	.we-filter-btn {
		font-size: 12px;
		padding: 6px 12px;
	}

	.we-product-grid .wc-block-product-template,
	.we-product-grid .wp-block-woocommerce-product-template {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 16px 10px !important;
	}
}


/* ============================================================
   My Account — Orders table View button fix
   ============================================================ */

.woocommerce-account .woocommerce-orders-table__cell-order-actions .view {
	display: inline-flex !important;
	align-items: center !important;
	gap: 6px !important;
	padding: 8px 18px !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	font-family: var(--we-font) !important;
	color: var(--we-black) !important;
	background: var(--we-white) !important;
	border: 1px solid var(--we-border) !important;
	border-radius: 3px !important;
	text-decoration: none !important;
	line-height: 1 !important;
	cursor: pointer;
	transition: all 0.2s ease;
}

.woocommerce-account .woocommerce-orders-table__cell-order-actions .view::before {
	font-family: bootstrap-icons !important;
	content: "\f341" !important;
	font-size: 14px !important;
	line-height: 1 !important;
	vertical-align: middle !important;
}

.woocommerce-account .woocommerce-orders-table__cell-order-actions .view:hover {
	background: var(--we-black) !important;
	color: var(--we-white) !important;
	border-color: var(--we-black) !important;
}
