/*
Theme Name: Cedar Hem Lookbook
Description: An editorial clothing storefront built on Twenty Twenty-One.
Template: twentytwentyone
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cedar-hem
*/

:root {
	--cedar-paper: #faf8f2;
	--cedar-ink: #29251f;
	--cedar-rule: #cec8ba;
	--cedar-serif: Baskervville, Georgia, serif;
	--cedar-gutter: clamp(1.1rem, 4.8vw, 5rem);
	--global--color-background: var(--cedar-paper);
	--global--color-primary: var(--cedar-ink);
	--heading--font-family: var(--cedar-serif);
	--heading--font-weight: 400;
}
body.store-cedarhem { background-color: var(--cedar-paper); color: var(--cedar-ink); }
#masthead.cedar-masthead {
	max-width: none; width: 100%; margin: 0; padding: 0 var(--cedar-gutter); min-height: clamp(5rem, 7vw, 7.2rem);
	display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 1.4rem;
	background: var(--cedar-paper); border-bottom: 1px solid var(--cedar-rule);
}
#masthead.cedar-masthead::before, #masthead.cedar-masthead::after { content: none; }
.cedar-masthead .cedar-brand { text-align: center; }
.cedar-brand .site-branding, .cedar-brand .site-logo { width: auto; margin: 0; text-align: center; }
.cedar-brand .wordmark, .cedar-brand .site-title {
	margin: 0; padding: 0; font: 400 clamp(2.5rem, 4.2vw, 5.1rem)/1 var(--cedar-serif);
	letter-spacing: -.075em; text-transform: none; color: var(--cedar-ink);
}
.cedar-brand .site-title a { text-decoration: none; }
.cedar-brand .site-logo img, .cedar-brand .custom-logo-link img { display: block; margin: auto; width: auto; max-height: 3.4rem; }
.cedar-brand .site-description { margin: .25rem 0 0; font: .78rem/1.2 var(--ui); }
.cedar-collections .menu-list { display: flex; align-items: center; gap: clamp(.85rem, 2.2vw, 2.4rem); font: 500 .86rem/1.3 var(--ui); }
.cedar-tools { justify-self: end; gap: 1.2rem; }
.cedar-search summary { width: auto; gap: .4rem; font-size: .85rem; }
.cedar-tools .bag-link { font-size: .85rem; }
.cedar-search .woocommerce-product-search {
	position: absolute; z-index: 2; top: 100%; right: var(--cedar-gutter); width: min(22rem, calc(100% - 2 * var(--cedar-gutter)));
	display: flex; gap: .4rem; padding: .8rem; background: var(--cedar-paper); border: 1px solid var(--cedar-rule);
}
.cedar-search input.search-field { margin: 0; min-width: 0; width: 100%; border: 1px solid var(--cedar-rule); padding: .5rem; font: .95rem/1.4 var(--ui); }
.cedar-search button { padding: .45rem .75rem; font: .9rem/1.2 var(--ui); }

/* Homepage photography and WooCommerce shelves share a single catalogue width. */
.home .site-main {
	--cedar-home-width: min(calc(100% - 40px), 1140px);
	--cedar-grid-gap: 10px;
	padding: 0;
}
.home .site-main > :is(.hero, .cedar-mosaic, .cedar-shelf) {
	width: var(--cedar-home-width);
	max-width: none;
	margin-inline: auto;
}
.home .site-main > .hero {
	display: grid;
	grid-template: minmax(0, 1fr) / minmax(0, 1fr);
	isolation: isolate;
	min-height: 0;
	aspect-ratio: 2025/776;
	margin-block: 0;
	background: #594c3d;
}
.home .hero-photo, .home .hero-copy { grid-area: 1 / 1; }
.home .hero-photo { aspect-ratio: auto; min-height: 0; }
.home .hero .hero-frame img { object-position: center top; }
.home .hero .hero-frame-men img, .home .hero .hero-frame-women img { object-position: center 12%; }
.home .hero .hero-frame-layers img { object-position: center; }
.home .hero-photo::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgb(21 17 13 / .76), rgb(21 17 13 / .38) 34%, transparent 73%);
	pointer-events: none;
}
.home .hero-copy {
	align-self: end;
	justify-self: start;
	z-index: 1;
	width: min(50%, 35rem);
	padding: clamp(1.4rem, 3.2vw, 3rem);
	color: #fff;
	pointer-events: none;
}
.home .hero h1 { margin: 0; max-width: 13ch; color: inherit; font: 400 clamp(2.7rem, 5vw, 4.8rem)/.97 var(--cedar-serif); letter-spacing: -.055em; }
.home .hero .hero-intro { margin: .7rem 0 1.05rem; max-width: 38ch; font: .93rem/1.45 var(--ui); color: inherit; }
.home .hero .hero-cta {
	min-height: 2.65rem; padding: .6rem 1.1rem; gap: 1.1rem;
	background: var(--cedar-paper); color: var(--cedar-ink); pointer-events: auto;
	font: 600 .83rem/1.3 var(--ui); text-decoration: none;
}
.home .hero .hero-cta:hover { background: white; }
.home .hero .hero-picker { right: .75rem; bottom: .65rem; padding: 0 .25rem; gap: 0; background: rgb(25 20 17 / .68); box-shadow: none; }
.home .hero .hero-picker button {
	display: grid; place-items: center; min-height: 2.5rem; width: 2.1rem; padding: 0;
	font-size: 0; background: transparent; color: white;
}
.home .hero .hero-picker button::after { content: ""; width: .45rem; height: .45rem; border-radius: 50%; border: 1px solid currentColor; }
.home .hero .hero-picker button[aria-pressed=true]::after, .home .hero .hero-picker button:hover::after { background: currentColor; }
.home .hero .hero-picker button:focus-visible { outline-color: white; }

.home .site-main > .cedar-mosaic {
	display: grid; gap: var(--cedar-grid-gap); grid-template-columns: repeat(3, minmax(0, 1fr));
	grid-template-rows: repeat(2, minmax(0, 1fr)); aspect-ratio: 1140/510;
	margin-block: var(--cedar-grid-gap) 0;
}
.cedar-tile { position: relative; display: block; overflow: hidden; color: white; background: #544c42; text-decoration: none; }
.cedar-tile-women { grid-area: 1 / 1 / 3 / 2; }
.cedar-tile-wardrobe { grid-area: 1 / 2; }
.cedar-tile-spotlight { grid-area: 2 / 2; }
.cedar-tile-men { grid-area: 1 / 3 / 3 / 4; }
.cedar-tile img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cedar-tile-men img { object-position: 51% center; }
.cedar-tile::after { content: ""; position: absolute; inset: 25% 0 0; background: linear-gradient(transparent 45%, rgb(23 19 15 / .7)); }
.cedar-tile > span {
	position: absolute; z-index: 1; bottom: clamp(.8rem, 1.5vw, 1.4rem); inset-inline: clamp(.8rem, 1.5vw, 1.4rem);
	display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
	color: white; font: 400 clamp(1.25rem, 2.3vw, 2rem)/1.08 var(--cedar-serif); letter-spacing: -.035em;
}
.cedar-tile-arrow { font: 400 .65em/1 var(--ui); }
.cedar-tile:hover > span { text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; }
.cedar-tile:focus-visible { outline: 3px solid white; outline-offset: -6px; }

.home .site-main > .cedar-shelf { margin-block: clamp(2.8rem, 5.4vw, 5rem); }
.cedar-section-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1.35rem; }
.cedar-section-head h2 { margin: 0; color: var(--cedar-ink); font: 400 clamp(1.8rem, 3.4vw, 3.1rem)/1.05 var(--cedar-serif); letter-spacing: -.05em; }
.cedar-shelf-actions, .cedar-shelf-arrows { display: flex; align-items: center; gap: .3rem; }
.cedar-shelf-actions > a { margin-right: .5rem; white-space: nowrap; color: inherit; text-underline-offset: .26em; font: 500 .85rem/1.4 var(--ui); }
.cedar-shelf-arrows[hidden] { display: none; }
.cedar-shelf .cedar-shelf-arrows button {
	display: grid; place-items: center; width: 2.35rem; height: 2.35rem; padding: 0;
	color: var(--cedar-ink); background: transparent; border: 1px solid var(--cedar-rule); font: 400 1.1rem/1 var(--ui);
}
.cedar-shelf .cedar-shelf-arrows button:disabled { opacity: .35; cursor: default; }
.home #main .cedar-shelf > .woocommerce { width: 100%; max-width: none; margin-inline: 0; }
.cedar-shelf .woocommerce ul.products {
	--cedar-columns: 5;
	--cedar-card-gap: 16px;
	display: grid; grid-auto-flow: column; justify-content: start;
	grid-auto-columns: calc((100% + var(--cedar-card-gap)) / var(--cedar-columns) - var(--cedar-card-gap));
	gap: 1.8rem var(--cedar-card-gap); overflow-x: auto; overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--cedar-rule) transparent;
	margin: 0; max-width: none; padding: 0 0 .5rem; list-style: none;
}
#cedar-wardrobe .woocommerce ul.products { grid-template-rows: auto auto; }
.cedar-shelf .woocommerce ul.products::before, .cedar-shelf .woocommerce ul.products::after { content: none; }
/* WooCommerce assigns column widths with !important. The grid owns these widths. */
.home .cedar-shelf .woocommerce ul.products.columns-5 li.product { float: none; clear: none; width: 100% !important; min-width: 0; margin: 0; padding: 0; scroll-snap-align: start; }
.cedar-shelf .woocommerce ul.products li.product a img { width: 100%; height: auto; aspect-ratio: 3/4; margin: 0 0 .5rem; object-fit: cover; }
.cedar-shelf .woocommerce ul.products li.product .woocommerce-loop-product__title { margin: 0; padding: .1rem 0 .25rem; font: 500 1rem/1.32 var(--ui); letter-spacing: -.015em; }
.cedar-shelf .woocommerce ul.products li.product .price { font: .86rem/1.4 var(--ui); margin: 0; }
.cedar-shelf .woocommerce ul.products li.product .button { display: inline-block; margin: .6rem 0 0; min-height: 2.45rem; padding: .55rem .9rem; font: 600 .8rem/1.35 var(--ui); }
@media (prefers-reduced-motion: no-preference) {
	.cedar-shelf .woocommerce ul.products { scroll-behavior: smooth; }
}
@media (max-width: 991px) {
	.cedar-shelf .woocommerce ul.products { --cedar-columns: 3; }
}
@media (max-width: 720px) {
	.home .site-main > .hero { aspect-ratio: 1.55; min-height: 15.5rem; }
	.home .hero-copy { width: 75%; padding: 1rem 1.1rem 1.3rem; }
	.home .hero h1 { font-size: clamp(2.35rem, 7.35vw, 3.4rem); }
	.home .hero .hero-intro { display: none; }
	.home .hero .hero-cta { margin-top: .7rem; }
	.home .hero .hero-picker { right: .35rem; bottom: .35rem; }
	.home .hero .hero-picker button { width: 1.6rem; min-height: 1.9rem; }
}
@media (max-width: 640px) {
	.home .site-main > .cedar-mosaic { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; aspect-ratio: auto; }
	.cedar-mosaic .cedar-tile { grid-area: auto; aspect-ratio: 350/180; }
	.cedar-mosaic :is(.cedar-tile-men, .cedar-tile-women) { aspect-ratio: 350/260; }
	.cedar-tile img { object-position: center 22%; }
	.cedar-tile > span { bottom: 1rem; inset-inline: 1rem; font-size: 1.65rem; }
	.cedar-section-head { margin-bottom: .9rem; }
	.cedar-shelf-actions { gap: 0; }
	.cedar-shelf-actions > a { margin-right: .25rem; font-size: .8rem; }
	.cedar-shelf .cedar-shelf-arrows button { width: 1.875rem; height: 2.15rem; }
	.cedar-shelf .woocommerce ul.products { --cedar-columns: 2; --cedar-card-gap: 10px; row-gap: 1.4rem; }
	.cedar-shelf .woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: .9rem; }
}
@media (max-width: 375px) {
	.home .hero-copy { width: 100%; padding-bottom: 2.75rem; }
}

.woocommerce .wc-content { width: min(100%, 96rem); padding-top: 1rem; }
.woocommerce .wc-content .woocommerce-products-header h1, .woocommerce .wc-content .product_title, .site-main .entry-header .entry-title {
	color: var(--cedar-ink); font: 400 clamp(2.4rem, 5.5vw, 5.9rem)/1.05 var(--cedar-serif); letter-spacing: -.055em;
}
.woocommerce .wc-content .product_title { font-size: clamp(2.15rem, 4vw, 4.5rem); }
.woocommerce .wc-content .woocommerce-products-header { margin-bottom: 2rem; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font: 400 clamp(1.06rem, 1.6vw, 1.65rem)/1.15 var(--cedar-serif); letter-spacing: -.026em; }
.woocommerce ul.products li.product > a img { aspect-ratio: 4/5; }
.woocommerce ul.products li.product .price { font-size: .88rem; }
.woocommerce ul.products li.product .button { font: 500 .78rem/1.35 var(--ui); }
.site-main .entry-header { border-bottom: 1px solid var(--cedar-rule); padding-bottom: 1.25rem; }
.woocommerce-cart .entry-content > .wp-block-woocommerce-cart, .woocommerce-checkout .entry-content > .wp-block-woocommerce-checkout,
.woocommerce-account .entry-content > .woocommerce { width: min(100% - 2 * var(--cedar-gutter), 74rem); max-width: none; margin-inline: auto; }
#colophon.site-footer { max-width: none; padding-block: 2rem; width: 100%; }
#colophon .wordmark { font-weight: 400; }
#colophon a:not(:hover):not(:focus) { text-decoration: none; }
@media (max-width: 720px) {
	#masthead.cedar-masthead { grid-template-columns: minmax(0, 1fr) auto; gap: 0 1rem; padding: .8rem var(--cedar-gutter) 0; }
	.cedar-masthead .cedar-brand { grid-column: 1; grid-row: 1; justify-self: start; }
	.cedar-tools { grid-column: 2; grid-row: 1; }
	.cedar-tools .bag-link > span:not(.bag-count), .cedar-search summary span { display: none; }
	.cedar-collections { grid-column: 1/-1; grid-row: 2; padding: .5rem 0; }
	.cedar-collections .menu-list { gap: 1.3rem; }
	.cedar-collections a { display: inline-block; padding: .28rem 0; }
	#colophon.site-footer { padding-block: 1.5rem; }
}
