/*
 * Greysole Publisher frontend.
 *
 * Boundary:
 * - Greysole owns the editorial/feed composition and tagged-product arrangement.
 * - WoodMart/WooCommerce own the product card visuals.
 */

.gs-experience,
.gs-product-posts {
	--gs-ink: var(--wd-title-color, #17181a);
	--gs-text: var(--wd-text-color, #555b61);
	--gs-line: rgba(24, 25, 27, .13);
	--gs-soft: rgba(24, 25, 27, .055);
	--gs-radius: 18px;
}

.gs-editorial {
	box-sizing: border-box;
	width: min(100%, 1200px);
	margin-inline: auto;
}

.gs-post {
	box-sizing: border-box;
	width: min(100%, 1200px);
	margin-inline: auto;
	padding: clamp(34px, 5vw, 68px) 16px;
	color: var(--gs-text);
}

.gs-post--single {
	padding-top: clamp(20px, 3vw, 40px);
}

.gs-post--feed,
.gs-post--product {
	border-top: 1px solid var(--gs-line);
}

.gs-post-layout {
	display: grid;
	grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
	gap: clamp(28px, 4vw, 58px);
	align-items: start;
}

.gs-post-layout--no-products {
	grid-template-columns: minmax(0, 820px);
	justify-content: center;
}

.gs-post-editorial,
.gs-post-shop {
	min-width: 0;
}

.gs-post-header {
	margin-bottom: 16px;
}

.gs-post-date {
	display: block;
	margin-top: 13px;
	color: var(--gs-text);
	font-size: 10px;
	font-weight: 650;
	letter-spacing: .08em;
	opacity: .62;
	text-transform: uppercase;
}

.gs-post-header h1,
.gs-post-header h2 {
	max-width: 760px;
	margin: 6px 0 0;
	color: var(--gs-ink);
	font-family: inherit;
	font-size: clamp(28px, 4vw, 48px);
	font-weight: 620;
	letter-spacing: -.035em;
	line-height: 1.05;
}

.gs-post--feed .gs-post-header h2,
.gs-post--product .gs-post-header h2 {
	font-size: clamp(25px, 3.3vw, 38px);
}

.gs-post-header h2 a {
	color: inherit;
	text-decoration: none;
}

.gs-post-header h2 a:hover {
	opacity: .72;
}

.gs-chips {
	display: flex;
	gap: 7px;
	padding: 2px 1px;
	overflow-x: auto;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.gs-chips::-webkit-scrollbar {
	display: none;
}

.gs-chips a {
	flex: none;
	padding: 7px 11px;
	background: var(--gs-soft);
	border: 1px solid transparent;
	border-radius: 999px;
	color: var(--gs-ink);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .045em;
	line-height: 1;
	text-decoration: none;
	text-transform: uppercase;
}

.gs-chips a:hover {
	border-color: var(--gs-line);
}

.gs-gallery {
	position: relative;
	width: 100%;
	overflow: hidden;
	background: var(--gs-soft);
	border-radius: var(--gs-radius);
}

.gs-gallery-track {
	display: flex;
	width: 100%;
	aspect-ratio: 4 / 5;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.gs-gallery-track::-webkit-scrollbar {
	display: none;
}

.gs-gallery-slide {
	flex: 0 0 100%;
	width: 100%;
	height: 100%;
	margin: 0;
	scroll-snap-align: start;
	scroll-snap-stop: always;
}

.gs-gallery-slide img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
}

.gs-gallery-utility {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	min-height: 54px;
	margin-top: 0;
	padding: 8px 10px;
	background: #f6f6f6;
	border-top: 1px solid rgba(24, 25, 27, .08);
}

.gs-gallery-pagination {
	display: flex;
	align-items: center;
	gap: 7px;
	min-width: 0;
}

/* Deliberately stronger than theme-level button rules. */
.greysole-style-post .gs-gallery-arrow,
.gs-product-posts .gs-gallery-arrow {
	position: static !important;
	display: inline-grid !important;
	place-items: center !important;
	width: 38px !important;
	height: 38px !important;
	min-width: 38px !important;
	min-height: 38px !important;
	padding: 0 !important;
	margin: 0 !important;
	transform: none !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	background: #fff !important;
	border: 1px solid #d5d5d5 !important;
	border-radius: 50% !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .06) !important;
	color: #17181a !important;
	cursor: pointer;
	line-height: 1 !important;
	opacity: 1 !important;
}

.greysole-style-post .gs-gallery-arrow:hover,
.gs-product-posts .gs-gallery-arrow:hover {
	background: #17181a !important;
	border-color: #17181a !important;
	color: #fff !important;
}

.gs-gallery-arrow > span {
	display: grid;
	place-items: center;
	width: 18px;
	height: 18px;
}

.gs-gallery-arrow svg {
	display: block;
	width: 100%;
	height: 100%;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.gs-gallery-status {
	position: static;
	min-width: 42px;
	padding: 0 3px;
	background: transparent;
	border-radius: 0;
	color: #555b61;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .02em;
	line-height: 1;
	text-align: center;
	pointer-events: none;
	backdrop-filter: none;
}

.gs-post-description {
	max-width: 680px;
	margin-top: 10px;
	color: var(--gs-text);
	font-size: clamp(14px, 1.4vw, 16px);
	line-height: 1.55;
}

.gs-post-description > :first-child { margin-top: 0; }
.gs-post-description > :last-child { margin-bottom: 0; }

.gs-gallery-link {
	display: block;
	width: 100%;
	height: 100%;
	color: inherit;
	text-decoration: none;
}

.gs-post-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 7px;
	margin: 0;
	padding: 0;
}

/* Keep Save/Share readable even when WoodMart applies global button styles. */
.greysole-style-post .gs-post-action,
.gs-product-posts .gs-post-action {
	display: inline-grid !important;
	place-items: center !important;
	width: 38px !important;
	height: 38px !important;
	min-width: 38px !important;
	min-height: 38px !important;
	padding: 0 !important;
	margin: 0 !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	background: #fff !important;
	border: 1px solid #d5d5d5 !important;
	border-radius: 50% !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .06) !important;
	color: #17181a !important;
	cursor: pointer;
	font: inherit;
	line-height: 1 !important;
	opacity: 1 !important;
}

.greysole-style-post .gs-post-action:hover,
.gs-product-posts .gs-post-action:hover {
	background: #17181a !important;
	border-color: #17181a !important;
	color: #fff !important;
}

.greysole-style-post .gs-post-action:disabled,
.gs-product-posts .gs-post-action:disabled {
	cursor: wait;
	opacity: .55 !important;
}

.greysole-style-post .gs-post-action.is-saved,
.gs-product-posts .gs-post-action.is-saved {
	background: #17181a !important;
	border-color: #17181a !important;
	color: #fff !important;
}

.gs-action-icon {
	display: grid;
	place-items: center;
	width: 19px;
	height: 19px;
}

.gs-action-icon svg {
	display: block;
	width: 100%;
	height: 100%;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.gs-save-post.is-saved .gs-action-icon svg {
	fill: currentColor;
}

.gs-post-shop {
	padding-top: 2px;
}

.gs-post-shop-heading {
	margin-bottom: 14px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--gs-line);
}

.gs-post-shop-heading p {
	margin: 0 0 4px;
	color: var(--gs-text);
	font-size: 10px;
	font-weight: 750;
	letter-spacing: .14em;
	opacity: .68;
}

.gs-post-shop-heading h3 {
	margin: 0;
	color: var(--gs-ink);
	font-family: inherit;
	font-size: clamp(20px, 2vw, 27px);
	font-weight: 620;
	letter-spacing: -.025em;
	line-height: 1.12;
}

/*
 * Tagged-product arrangement only.
 * No image/title/price/button/card visual rules belong here.
 */
.gs-tagged-product-layout {
	box-sizing: border-box;
	width: 100%;
}

.gs-tagged-product-layout .products {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	gap: clamp(10px, 1.5vw, 18px) !important;
	width: 100% !important;
	margin: 0 !important;
}

.gs-tagged-product-layout .products > * {
	box-sizing: border-box;
	width: 100% !important;
	max-width: none !important;
	min-width: 0 !important;
	margin: 0 !important;
	flex: none !important;
}

.gs-products-toggle {
	display: none;
}

.gs-feed-heading,
.gs-product-posts-heading {
	margin-top: clamp(20px, 4vw, 52px);
	padding: clamp(28px, 4vw, 44px) 16px 18px;
	border-top: 4px solid var(--gs-ink);
}

.gs-eyebrow {
	margin: 0 0 4px;
	color: var(--gs-text);
	font-size: 10px;
	font-weight: 750;
	letter-spacing: .14em;
	opacity: .68;
}

.gs-feed-heading h2,
.gs-product-posts-heading h2 {
	margin: 0;
	color: var(--gs-ink);
	font-family: inherit;
	font-size: clamp(27px, 4vw, 40px);
	font-weight: 620;
	letter-spacing: -.025em;
	line-height: 1.12;
}


/* Single-post discovery navigation. */
.gs-feed-heading {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
}

.gs-discovery-search-toggle {
	display: inline-grid !important;
	place-items: center !important;
	width: 40px !important;
	height: 40px !important;
	min-width: 40px !important;
	padding: 0 !important;
	margin: 0 !important;
	background: transparent !important;
	border: 1px solid var(--gs-line) !important;
	border-radius: 50% !important;
	box-shadow: none !important;
	color: var(--gs-ink) !important;
	cursor: pointer;
}

.gs-discovery-search-toggle:hover,
.gs-discovery-search-toggle[aria-expanded="true"] {
	background: var(--gs-ink) !important;
	border-color: var(--gs-ink) !important;
	color: #fff !important;
}

.gs-discovery-search-toggle svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
}

.gs-discovery-controls {
	padding: 0 16px 20px;
}

.gs-discovery-modes,
.gs-discovery-terms {
	display: flex;
	align-items: center;
	gap: 7px;
	overflow-x: auto;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.gs-discovery-modes::-webkit-scrollbar,
.gs-discovery-terms::-webkit-scrollbar {
	display: none;
}

.gs-discovery-modes {
	padding: 2px 0 10px;
}

.gs-discovery-terms {
	padding: 2px 0;
}

.gs-discovery-mode,
.gs-discovery-term {
	flex: none;
	min-height: 36px;
	margin: 0 !important;
	padding: 8px 13px !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	background: transparent !important;
	border: 1px solid var(--gs-line) !important;
	border-radius: 999px !important;
	box-shadow: none !important;
	color: var(--gs-text) !important;
	cursor: pointer;
	font: inherit;
	font-size: 12px !important;
	font-weight: 650 !important;
	line-height: 1 !important;
	white-space: nowrap;
}

.gs-discovery-mode.is-active,
.gs-discovery-mode:hover {
	background: var(--gs-ink) !important;
	border-color: var(--gs-ink) !important;
	color: #fff !important;
}

.gs-discovery-term {
	min-height: 32px;
	padding: 7px 11px !important;
	background: var(--gs-soft) !important;
	border-color: transparent !important;
	font-size: 11px !important;
}

.gs-discovery-term.is-active,
.gs-discovery-term:hover {
	border-color: var(--gs-line) !important;
	color: var(--gs-ink) !important;
}

.gs-discovery-search {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 8px;
	margin: 2px 0 12px;
}

.gs-discovery-search[hidden] {
	display: none !important;
}

.gs-discovery-search input[type="search"] {
	box-sizing: border-box;
	width: 100%;
	min-height: 44px;
	margin: 0;
	padding: 9px 13px;
	background: transparent;
	border: 1px solid var(--gs-line);
	border-radius: 10px;
	color: var(--gs-ink);
	font: inherit;
	font-size: 14px;
}

.gs-discovery-search button {
	min-height: 44px;
	margin: 0 !important;
	padding: 9px 16px !important;
	background: var(--gs-ink) !important;
	border: 1px solid var(--gs-ink) !important;
	border-radius: 10px !important;
	box-shadow: none !important;
	color: #fff !important;
	font: inherit;
	font-size: 12px !important;
	font-weight: 700 !important;
}

.gs-feed [data-gs-feed-items][aria-busy="true"] {
	opacity: .55;
	transition: opacity .16s ease;
}

.gs-feed-footer {
	padding: 0 16px 0;
}

.gs-load-more {
	display: flex;
	align-items: center;
	justify-content: center;
	width: calc(100% - 32px);
	max-width: 1200px;
	min-height: 54px;
	margin: 16px auto 0;
	padding: 12px 20px;
	background: var(--gs-ink);
	border: 1px solid var(--gs-ink);
	border-radius: 999px;
	color: #fff;
	cursor: pointer;
	font: inherit;
	font-size: 13px;
	font-weight: 700;
}

.gs-load-more:hover { opacity: .86; }
.gs-load-more:disabled { cursor: wait; opacity: .62; }

.gs-feed-message {
	margin: 12px 16px 0;
	color: var(--gs-text);
	font-size: 13px;
	text-align: center;
}

.gs-feed-message[hidden] { display: none; }

@media (max-width: 719px) {
	.gs-post {
		padding: 34px 16px 46px;
	}

	.gs-post-layout,
	.gs-post-layout--no-products {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
	}

	.gs-post-shop {
		padding-top: 0;
	}

	.gs-post-shop-heading {
		margin-bottom: 12px;
	}

	.gs-gallery {
		margin-inline: -16px;
		width: calc(100% + 32px);
		border-radius: 0;
	}



	.gs-tagged-product-layout .products {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 10px !important;
	}

	.gs-tagged-product-layout--expandable:not(.is-expanded) .products > :nth-child(n+5) {
		display: none !important;
	}

	.gs-products-toggle {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 100%;
		min-height: 44px;
		margin-top: 12px;
		padding: 10px 14px;
		background: transparent;
		border: 1px solid var(--gs-line);
		border-radius: 999px;
		color: var(--gs-ink);
		cursor: pointer;
		font: inherit;
		font-size: 12px;
		font-weight: 700;
	}

	.gs-feed-heading,
	.gs-product-posts-heading {
		margin-top: 10px;
		padding-top: 28px;
	}
}


@media (max-width: 719px) {
	.gs-feed-heading {
		align-items: center;
	}

	.gs-discovery-controls {
		padding-right: 16px;
		padding-left: 16px;
	}

	.gs-discovery-modes,
	.gs-discovery-terms {
		margin-right: -16px;
		padding-right: 16px;
	}

	.gs-discovery-search {
		grid-template-columns: minmax(0, 1fr) auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gs-gallery-track {
		scroll-behavior: auto;
	}
}


/* WooCommerce My Account > Saved Styles */
.gs-saved-styles-account {
	--gs-saved-bg: var(--wd-main-bgcolor, #fff);
	--gs-saved-ink: var(--wd-title-color, #17181a);
	--gs-saved-text: var(--wd-text-color, #6a6a6a);
	--gs-saved-line: rgba(24, 25, 27, .10);
	--gs-saved-soft: rgba(24, 25, 27, .035);
	width: 100%;
	color: var(--gs-saved-text);
}

.gs-saved-styles-account .gs-saved-styles-account__header {
	margin: 0 0 18px !important;
	padding: 0 0 14px !important;
	border-bottom: 1px solid var(--gs-saved-line);
}

.gs-saved-styles-account .gs-saved-styles-account__eyebrow {
	margin: 0 0 4px !important;
	color: var(--gs-saved-text);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .13em;
	opacity: .68;
}

.gs-saved-styles-account .gs-saved-styles-account__header h2 {
	margin: 0 !important;
	color: var(--gs-saved-ink);
	font-family: inherit;
	font-size: clamp(26px, 4vw, 36px);
	font-weight: 600;
	line-height: 1.1;
}

.gs-saved-styles-account .gs-saved-styles-account__header > p:last-child {
	margin: 6px 0 0 !important;
	color: var(--gs-saved-text);
	font-size: 14px;
	line-height: 1.4;
}

.gs-saved-styles-account .gs-saved-styles-list {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) !important;
	gap: 10px !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* One saved item: thumbnail | post info | unsave. */
.gs-saved-styles-account .gs-saved-style-row {
	box-sizing: border-box !important;
	display: grid !important;
	grid-template-columns: 82px minmax(0, 1fr) 40px !important;
	grid-template-rows: 1fr !important;
	gap: 14px !important;
	align-items: center !important;
	width: 100% !important;
	min-width: 0 !important;
	margin: 0 !important;
	padding: 10px !important;
	background: var(--gs-saved-soft) !important;
	border: 1px solid var(--gs-saved-line) !important;
	border-radius: 12px !important;
	box-shadow: none !important;
}

.gs-saved-styles-account .gs-saved-style-thumb {
	position: relative;
	display: block !important;
	width: 82px !important;
	height: 96px !important;
	min-width: 82px !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden !important;
	background: var(--gs-saved-bg);
	border-radius: 9px !important;
	text-decoration: none !important;
}

.gs-saved-styles-account .gs-saved-style-thumb img {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	object-fit: cover !important;
}

.gs-saved-styles-account .gs-saved-style-thumb__empty {
	display: block;
	width: 100%;
	height: 100%;
	background: rgba(24, 25, 27, .055);
}

.gs-saved-styles-account .gs-saved-style-details {
	display: flex !important;
	flex-direction: column !important;
	align-items: flex-start !important;
	justify-content: center !important;
	min-width: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
}

.gs-saved-styles-account .gs-saved-style-title {
	display: -webkit-box !important;
	max-width: 100%;
	margin: 0 !important;
	overflow: hidden;
	color: var(--gs-saved-ink) !important;
	font-family: inherit;
	font-size: 16px !important;
	font-weight: 600 !important;
	line-height: 1.25 !important;
	text-decoration: none !important;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.gs-saved-styles-account .gs-saved-style-title:hover {
	opacity: .68;
}

.gs-saved-styles-account .gs-saved-style-details time {
	display: block !important;
	margin: 7px 0 0 !important;
	color: var(--gs-saved-text) !important;
	font-size: 12px !important;
	font-weight: 400 !important;
	line-height: 1.2 !important;
	opacity: .78;
}

/* Filled bookmark = this item is already saved. */
.gs-saved-styles-account button.gs-saved-style-unsave {
	align-self: center !important;
	justify-self: end !important;
	display: inline-grid !important;
	place-items: center !important;
	width: 36px !important;
	height: 36px !important;
	min-width: 36px !important;
	min-height: 36px !important;
	margin: 0 !important;
	padding: 0 !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	background: var(--gs-saved-bg) !important;
	border: 1px solid var(--gs-saved-line) !important;
	border-radius: 50% !important;
	box-shadow: none !important;
	color: var(--gs-saved-ink) !important;
	cursor: pointer;
}

.gs-saved-styles-account button.gs-saved-style-unsave:hover {
	background: var(--gs-saved-ink) !important;
	border-color: var(--gs-saved-ink) !important;
	color: var(--gs-saved-bg) !important;
}

.gs-saved-styles-account button.gs-saved-style-unsave:disabled {
	cursor: wait;
	opacity: .45 !important;
}

.gs-saved-styles-account button.gs-saved-style-unsave svg {
	display: block !important;
	width: 18px !important;
	height: 18px !important;
	fill: currentColor !important;
	stroke: currentColor !important;
	stroke-width: 1.65 !important;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.gs-saved-styles-account .gs-saved-styles-empty {
	padding: 24px 0;
	color: var(--gs-saved-text);
}

.gs-saved-styles-account .gs-saved-styles-empty p {
	margin: 0;
}

@media (max-width: 480px) {
	.gs-saved-styles-account .gs-saved-style-row {
		grid-template-columns: 72px minmax(0, 1fr) 36px !important;
		gap: 11px !important;
		padding: 9px !important;
		border-radius: 10px !important;
	}

	.gs-saved-styles-account .gs-saved-style-thumb {
		width: 72px !important;
		height: 84px !important;
		min-width: 72px !important;
		border-radius: 8px !important;
	}

	.gs-saved-styles-account .gs-saved-style-title {
		font-size: 15px !important;
	}

	.gs-saved-styles-account .gs-saved-style-details time {
		font-size: 11px !important;
	}
}

