/*
Theme Name: JSBT Nihonto Modern
Theme URI: https://japaneseswordbooksandtsuba.com/
Description: Modernized Nihonto Art theme based on the updated Japanese Swords, Books & Tsuba layout, featuring instant WooCommerce integration, Products You May Like toggle, automatic Recent Updates slider, working search, and direct Cart Drawer inquiries.
Version: 1.0.0
Author: Grey Doffin / JSBT
Text Domain: jsbt-nihonto
*/

:root {
	color-scheme: light;
	--bg: #faf3d2;
	--ink: #1b1a17;
	--muted: #55513f;
	--line: #d9cf9f;
	--accent: #b4441f;
	--rule: #5b1a1a;
	--cardbg: #fcf7de;
	--sold-bg: #fce8e6;
	--sold-ink: #b91c1c;
	--hold-bg: #fef3c7;
	--hold-ink: #92400e;
	box-sizing: border-box;
	padding-top: env(safe-area-inset-top, 0px);
	padding-bottom: env(safe-area-inset-bottom, 0px);
}

html {
	scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 7rem);
	scroll-behavior: smooth;
	overflow-x: clip;
	max-width: 100%;
}

*, *::before, *::after {
	box-sizing: inherit;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 400 1rem/1.7 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
	max-width: 100%;
}

body::before {
	content: "";
	position: fixed;
	inset: 0 0 auto;
	height: env(safe-area-inset-top, 0px);
	z-index: 30;
	background: var(--bg);
}

a {
	color: var(--accent);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
	text-underline-offset: .2em;
}

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	border-radius: 2px;
}

.wrap {
	max-width: 74rem;
	width: 100%;
	margin: 0 auto;
	padding: 0 1.5rem;
}

@media (max-width: 44rem) {
	.wrap {
		padding: 0 1rem;
	}
}

main {
	min-width: 0;
}

/* Header & Navigation */
header.top {
	position: sticky;
	top: env(safe-area-inset-top, 0px);
	z-index: 20;
	padding-top: 0;
	text-align: center;
	background: rgba(250, 243, 210, .92);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--line);
	animation: rise .8s cubic-bezier(.22, 1, .36, 1) backwards;
}

.top .wrap {
	padding-top: 1rem;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 1rem;
	color: var(--ink);
	text-align: center;
	line-height: 1.1;
}

.brand:hover {
	text-decoration: none;
}

.brand .bt {
	display: block;
	border-left: 2px solid var(--rule);
	padding-left: 1rem;
	text-align: center;
}

.brand b {
	display: block;
	font: 500 clamp(1.5rem, 5vw, 2.6rem)/1.1 "Cormorant SC", Georgia, serif;
	letter-spacing: .01em;
	transition: font-size .3s;
}

.brand i {
	display: block;
	font: 600 clamp(.95rem, 2.6vw, 1.2rem)/1.3 "Cormorant SC", Georgia, serif;
	margin-top: .25rem;
	font-style: normal;
	letter-spacing: .03em;
	max-height: 2rem;
	overflow: hidden;
	transition: max-height .3s, opacity .3s, margin .3s;
}

.mark {
	width: 3.75rem;
	height: 3.75rem;
	flex: none;
	object-fit: contain;
	transition: width .3s, height .3s;
}

.top.sc .mark {
	width: 2.4rem;
	height: 2.4rem;
}

.top.sc .brand b {
	font-size: 1.4rem;
}

.top.sc .brand i {
	max-height: 0;
	opacity: 0;
	margin: 0;
}

@media (max-width: 36rem) {
	.mark {
		width: 2.75rem;
		height: 2.75rem;
	}
	.brand {
		gap: .6rem;
	}
	.brand .bt {
		padding-left: .6rem;
	}
}

nav.main-nav {
	display: flex;
	flex-wrap: wrap;
	gap: .25rem .35rem;
	align-items: center;
	margin-top: .9rem;
	font-size: .95rem;
	font-weight: 600;
	text-align: left;
}

.nav-toggle {
	display: none;
	align-items: center;
	gap: .35rem;
	padding: .4rem .8rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--cardbg);
	color: var(--ink);
	font: 600 .88rem Inter, sans-serif;
	cursor: pointer;
}

.nav-links,
.nav-links > ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: .25rem .35rem;
	align-items: center;
}

nav.main-nav a,
.nav-links > ul > li > a {
	color: var(--ink);
	padding: .45rem .85rem;
	border-radius: 999px;
	background: none;
	transition: background-color .25s, color .25s;
}

nav.main-nav a:hover,
.nav-links > ul > li > a:hover,
nav.main-nav a.on,
.nav-links > ul > li.current-menu-item > a {
	background: rgba(180, 68, 31, .12);
	color: var(--accent);
	text-decoration: none;
}

@media (max-width: 48rem) {
	.nav-toggle {
		display: inline-flex;
	}
	.nav-links {
		display: none;
		width: 100%;
		order: 4;
		flex-direction: column;
		align-items: stretch;
		padding: .5rem 0 .25rem;
		border-top: 1px dotted var(--line);
		margin-top: .35rem;
	}
	.nav-links.open {
		display: flex;
	}
	.nav-links > ul {
		flex-direction: column;
		align-items: stretch;
		width: 100%;
	}
	.nav-links a,
	.nav-links > ul > li > a {
		display: block;
		padding: .5rem .75rem;
		border-radius: 8px;
	}
	.cats {
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}
	.cats::-webkit-scrollbar {
		display: none;
	}
	.cats .chip,
	.cats strong {
		white-space: nowrap;
		flex: none;
	}
}

nav.main-nav .sp {
	flex: 1;
}

nav.main-nav svg {
	width: 1.1rem;
	height: 1.1rem;
	stroke: currentColor;
	fill: none;
	stroke-width: 2;
	vertical-align: middle;
}

.search-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border: 1px solid transparent;
	border-radius: 999px;
	background: transparent;
	color: var(--ink);
	cursor: pointer;
	transition: background-color .25s, color .25s, border-color .25s;
}

.search-toggle:hover,
.search-toggle[aria-expanded="true"] {
	background: rgba(180, 68, 31, .12);
	color: var(--accent);
	border-color: var(--line);
}

.search-pop {
	display: none;
	padding: .65rem 0 .85rem;
	border-top: 1px dotted var(--line);
	margin-top: .5rem;
}

.search-pop.open {
	display: block;
	animation: rise .25s cubic-bezier(.22, 1, .36, 1) backwards;
}

.search-form {
	display: flex;
	gap: .5rem;
	max-width: 34rem;
	margin: 0 auto;
}

.search-form input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
	padding: .55rem .85rem;
	font: inherit;
	font-size: .92rem;
	color: var(--ink);
	background: var(--cardbg);
	border: 1px solid var(--line);
	border-radius: 999px;
}

.search-form input[type="search"]:focus {
	border-color: var(--accent);
	outline: none;
}

.search-form .btn {
	padding: .5rem 1.15rem;
	border-radius: 999px;
	font-size: .88rem;
}

.cartbtn {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	padding: .4rem .85rem;
	border: 1px solid var(--accent);
	border-radius: 999px;
	background: transparent;
	color: var(--accent);
	font: 600 .9rem Inter, sans-serif;
	cursor: pointer;
	transition: background-color .25s, color .25s, transform .25s;
}

.cartbtn:hover {
	background: var(--accent);
	color: var(--bg);
	transform: translateY(-1px);
}

/* Category Bar */
.cats {
	display: flex;
	flex-wrap: wrap;
	gap: .4rem;
	font-size: .85rem;
	padding: .4rem 0 .75rem;
	border-bottom: 0;
	margin-top: 0;
	max-height: 9rem;
	overflow: visible;
	text-align: left;
	align-items: center;
	transition: max-height .35s, opacity .3s, padding .3s;
}

.top.sc .cats {
	max-height: 0;
	opacity: 0;
	padding: 0;
	overflow: hidden;
}

.cats strong {
	font-size: .68rem;
	text-transform: uppercase;
	letter-spacing: .07em;
	color: var(--muted);
	margin-right: .25rem;
	font-weight: 600;
}

.chip {
	display: inline-block;
	font: 500 .78rem/1.2 Inter, system-ui, sans-serif;
	padding: .28rem .75rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	color: var(--ink);
	cursor: pointer;
	background: transparent;
	transition: background-color .25s, color .25s, border-color .25s;
}

.chip:hover,
.dd.open .chip {
	background: rgba(180, 68, 31, .1);
	border-color: var(--accent);
	color: var(--accent);
	text-decoration: none;
}

.dd {
	position: relative;
}

.cv {
	display: inline-block;
	margin-left: .25rem;
	border: 3.5px solid transparent;
	border-top-color: currentColor;
	border-bottom: 0;
	vertical-align: middle;
	transition: transform .2s;
}

.dd.open .cv {
	transform: rotate(180deg);
}

.ddm {
	position: absolute;
	top: calc(100% + .35rem);
	left: 0;
	min-width: 10.5rem;
	padding: .35rem;
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: 10px;
	box-shadow: 0 14px 28px -14px rgba(30, 20, 5, .4);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: opacity .2s, transform .25s, visibility 0s linear .25s;
	z-index: 25;
}

.dd:hover .ddm,
.dd:focus-within .ddm,
.dd.open .ddm {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition-delay: 0s;
}

.ddm a {
	display: block;
	padding: .45rem .75rem;
	border-radius: 6px;
	background: none;
	color: var(--ink);
	font-size: .85rem;
	white-space: nowrap;
}

.ddm a:hover {
	background: rgba(180, 68, 31, .1);
	color: var(--accent);
	text-decoration: none;
}

/* Main 2-Column Layout */
.layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 3rem;
	padding: 2.5rem 0 4rem;
}

@media (min-width: 60rem) {
	.layout {
		grid-template-columns: minmax(0, 1fr) 20rem;
	}
}

section {
	padding: 2rem 0;
}

section:first-child {
	padding-top: 0;
}

h1, h2 {
	font-weight: 600;
	line-height: 1.25;
	margin: 0 0 1.25rem;
	letter-spacing: -.01em;
}

h2.c, h1.c {
	text-align: center;
	font-size: 1.5rem;
}

h2.c:after, h1.c:after {
	content: "";
	display: block;
	width: 3rem;
	margin: .6rem auto 0;
	border-bottom: 1px dotted var(--ink);
}

h2.l, h1.l {
	font-size: 1.4rem;
	padding-bottom: .6rem;
	border-bottom: 1px dotted var(--line);
}

p {
	margin: 0 0 1rem;
	max-width: 70ch;
}

.rule {
	border: 0;
	border-top: 1px dotted var(--ink);
	margin: 1rem 0 2rem;
}

.subtle {
	color: var(--muted);
	font-size: .9rem;
}

/* Browse My Store Category Tiles */
.tiles {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
}

@media (max-width: 32rem) {
	.tiles {
		grid-template-columns: 1fr;
	}
}

.tile {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: .95rem 1.1rem;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: var(--cardbg);
	color: var(--ink);
	transition: border-color .3s, transform .4s cubic-bezier(.22, 1, .36, 1), box-shadow .4s;
}

a.tile:hover {
	border-color: var(--accent);
	transform: translateY(-2px);
	box-shadow: 0 12px 22px -16px rgba(70, 45, 10, .5);
	text-decoration: none;
}

.tile.wide {
	padding: .95rem 1.1rem;
}

.th {
	flex: none;
	display: block;
	width: 5rem;
	height: 5rem;
	border: 1px solid var(--line);
	border-radius: 8px;
	overflow: hidden;
	background: var(--bg);
}

.tile.wide .th {
	width: 5rem;
	height: 5rem;
}

.th img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s cubic-bezier(.22, 1, .36, 1);
}

a.tile:hover .th img,
.tile.wide:hover .th img {
	transform: scale(1.08);
}

.tl {
	font-size: .95rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
	line-height: 1.25;
	color: var(--ink);
}

a.tl:hover {
	color: var(--accent);
	text-decoration: none;
}

.tile.wide .tl {
	font-size: .95rem;
}

.subs {
	display: flex;
	flex-wrap: wrap;
	gap: .4rem;
	margin-top: .5rem;
}

/* Product Cards */
.card {
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--cardbg);
	padding: .75rem;
	position: relative;
	transition: border-color .3s, transform .45s cubic-bezier(.22, 1, .36, 1), box-shadow .45s;
}

.card:hover {
	transform: translateY(-4px);
	box-shadow: 0 14px 26px -16px rgba(70, 45, 10, .45);
	border-color: var(--accent);
}

.card .img {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	border: 1px solid var(--line);
	border-radius: 4px;
	overflow: hidden;
	margin-bottom: .6rem;
	background: var(--bg);
}

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

.card p {
	margin: 0;
	font-size: .9rem;
}

.card > p:not(.sub) {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.card > p > a {
	color: var(--ink);
	font-weight: 500;
}

.card > p > a:hover {
	color: var(--accent);
}

.card .sub {
	color: var(--muted);
	font-weight: 600;
}

.badge {
	position: absolute;
	top: 6px;
	left: 6px;
	padding: 2px 7px;
	border-radius: 4px;
	font-size: .68rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	z-index: 2;
}

.badge-sold {
	background: var(--sold-bg);
	color: var(--sold-ink);
	border: 1px solid rgba(185, 28, 28, .25);
}

.badge-hold {
	background: var(--hold-bg);
	color: var(--hold-ink);
	border: 1px solid rgba(146, 64, 14, .25);
}

.add {
	margin-top: .55rem;
	width: 100%;
	padding: .4rem .45rem;
	border: 1px solid var(--accent);
	border-radius: 6px;
	background: transparent;
	color: var(--accent);
	font: 600 .72rem/1.25 Inter, sans-serif;
	cursor: pointer;
	transition: background-color .25s, color .25s;
}

.add:hover,
.add.on {
	background: var(--accent);
	color: var(--bg);
}

/* Recently Added Items Slider */
.sub3 {
	font-size: 1.05rem;
	font-weight: 600;
	margin: 2.25rem 0 1rem;
}

.slider {
	min-width: 0;
}

.track {
	position: relative;
	display: flex;
	align-items: stretch;
	gap: 1rem;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
}

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

.track .card {
	flex: 0 0 calc((100% - (var(--cols, 1) - 1) * 1rem) / var(--cols, 1));
	width: calc((100% - (var(--cols, 1) - 1) * 1rem) / var(--cols, 1));
	min-width: 0;
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
}

.track .card .img {
	width: 100%;
	aspect-ratio: 1 / 1;
	flex-shrink: 0;
}

.track .card > p:not(.sub) {
	white-space: normal;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	line-height: 1.35;
	min-height: 2.7em;
	margin-bottom: .25rem;
}

@media (max-width: 44rem) {
	#recentslider .track {
		--cols: 2 !important;
	}
}

.track .add {
	margin-top: auto;
	padding-top: .45rem;
	padding-bottom: .45rem;
	min-height: 2.3rem;
}

.cbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: .9rem;
}

.dots {
	display: flex;
	gap: .45rem;
}

.dots button {
	width: .5rem;
	height: .5rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--line);
	cursor: pointer;
	transition: background .3s, transform .3s;
}

.dots button.on {
	background: var(--accent);
	transform: scale(1.35);
}

.arr {
	display: flex;
	gap: .5rem;
}

.arr button {
	width: 2.1rem;
	height: 2.1rem;
	border-radius: 50%;
	border: 1px solid var(--line);
	background: var(--cardbg);
	color: var(--ink);
	font-size: 1.1rem;
	line-height: 1;
	cursor: pointer;
	transition: border-color .2s, transform .25s;
}

.arr button:hover {
	border-color: var(--accent);
	transform: scale(1.08);
}

/* Events List */
.evl {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 1rem;
}

.evl li {
	display: grid;
	grid-template-columns: 4.5rem 1fr;
	gap: 1rem;
	padding-bottom: 1rem;
	border-bottom: 1px dotted var(--line);
	animation: rise .6s cubic-bezier(.22, 1, .36, 1) backwards;
}

.dt {
	text-align: center;
	line-height: 1.15;
}

.dt b {
	display: block;
	font-size: 1.35rem;
	font-weight: 600;
}

.dt span {
	font-size: .75rem;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--accent);
	font-weight: 600;
}

.evl p {
	margin: 0;
}

.evl .en {
	font-size: 1rem;
	white-space: pre-line;
	font-weight: 500;
}

.evl .lk {
	display: inline-block;
	margin-top: .35rem;
	font-size: .9rem;
	font-weight: 500;
}

/* Sidebar: Products You May Like & Newsletter */
.side {
	min-width: 0;
}

@media (min-width: 60rem) {
	.side {
		position: sticky;
		top: 6.5rem;
		align-self: start;
	}
}

.side h2 {
	font-size: 1.1rem;
}

.plist {
	display: grid;
	grid-template-columns: 1fr;
	gap: .75rem;
	max-width: 14.5rem;
}

.plist .card {
	display: flex;
	flex-direction: column;
	padding: .55rem;
	min-width: 0;
}

.plist .card.is-hidden {
	display: none;
}

.plist .img {
	width: 100%;
	aspect-ratio: 4 / 3;
	flex-shrink: 0;
	margin-bottom: .45rem;
}

.plist .card > p:not(.sub) {
	white-space: normal;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: .84rem;
	line-height: 1.3;
	min-height: 2.6em;
	margin-bottom: .15rem;
}

.plist .card .sub {
	font-size: .82rem;
}

.plist .add {
	width: 100%;
	margin-top: .45rem;
	padding: .38rem .5rem;
	font-size: .72rem;
}

.plist-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	max-width: 14.5rem;
	margin-top: .7rem;
}

.single-short-desc {
	margin-bottom: 1rem;
	padding-bottom: .75rem;
	border-bottom: 1px dotted var(--line);
}

.nlbox {
	margin-top: 1.25rem;
	padding-top: 1rem;
	border-top: 1px dotted var(--ink);
}

.nlbox h2 {
	border: 0;
	padding: 0;
	font-size: .95rem;
	margin: 0 0 .25rem;
}

.nlbox p {
	font-size: .85rem;
	line-height: 1.5;
	margin: 0 0 .6rem;
}

.news {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	gap: .4rem;
	margin-top: 0;
}

.news input[type="email"] {
	flex: 1 1 auto;
	width: auto;
	min-width: 0;
	padding: .5rem .65rem;
	font: inherit;
	font-size: .85rem;
	color: var(--ink);
	background: var(--cardbg);
	border: 1px solid var(--line);
	border-radius: 6px;
}

.news input[type="email"]:focus {
	border-color: var(--accent);
	outline: none;
}

.btn {
	padding: .7rem 1.4rem;
	border-radius: 6px;
	border: 1px solid var(--accent);
	background: var(--accent);
	color: var(--bg);
	font: 600 1rem Inter, sans-serif;
	cursor: pointer;
	transition: opacity .2s, transform .25s;
}

.btn:hover {
	opacity: .92;
	transform: translateY(-1px);
}

.btn:active {
	transform: none;
}

.btn-outline {
	background: transparent;
	color: var(--accent);
}

.btn-outline:hover {
	background: rgba(180, 68, 31, .1);
}

.nlbox .btn {
	width: auto;
	padding: .5rem .9rem;
	font-size: .85rem;
	white-space: nowrap;
}

.hp {
	position: absolute;
	left: -9999px;
	height: 0;
	overflow: hidden;
}

#ok {
	color: var(--muted);
	margin: .75rem 0 0;
	font-size: .85rem;
}

#ok:empty {
	display: none;
}

/* Footer */
footer.foot {
	border-top: 1px solid var(--line);
	margin-top: 1rem;
}

.fgrid {
	display: grid;
	gap: 2rem;
	grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
	padding: 2.5rem 0;
}

.foot h3 {
	font-size: .75rem;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--muted);
	margin: 0 0 .75rem;
}

.foot ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: .4rem;
	font-size: .95rem;
}

.foot address {
	font-style: normal;
	line-height: 1.7;
}

.fb {
	font: 500 1.35rem/1.2 "Cormorant SC", Georgia, serif;
	margin: 0 0 .5rem;
}

.fcopy {
	border-top: 1px dotted var(--line);
	padding: 1rem 0 2rem;
	margin: 0;
	font-size: .85rem;
	color: var(--muted);
	max-width: none;
}

/* Cart / Items of Interest Slide-Over Drawer */
.ov {
	position: fixed;
	inset: 0;
	z-index: 40;
	background: rgba(30, 20, 5, .45);
	opacity: 0;
	pointer-events: none;
	transition: opacity .35s;
}

.drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 50;
	width: min(26rem, 100%);
	height: 100dvh;
	background: var(--bg);
	border-left: 1px solid var(--line);
	box-shadow: -20px 0 40px -24px rgba(30, 20, 5, .5);
	display: flex;
	flex-direction: column;
	padding-top: env(safe-area-inset-top, 0px);
	padding-bottom: env(safe-area-inset-bottom, 0px);
	transform: translateX(105%);
	visibility: hidden;
	transition: transform .45s cubic-bezier(.22, 1, .36, 1), visibility 0s linear .45s;
}

.dopen .ov {
	opacity: 1;
	pointer-events: auto;
}

.dopen .drawer {
	transform: none;
	visibility: visible;
	transition-delay: 0s;
}

.dopen {
	overflow: hidden;
}

.dh {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .5rem;
	padding: .85rem 1.15rem;
	border-bottom: 1px solid var(--line);
	flex: none;
}

.drawer-back {
	display: none;
	align-items: center;
	gap: .25rem;
	padding: .35rem .7rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--cardbg);
	color: var(--accent);
	font: 600 .85rem Inter, sans-serif;
	cursor: pointer;
}

@media (max-width: 44rem) {
	.drawer-back {
		display: inline-flex;
	}
}

.dh h2 {
	margin: 0;
	font-size: 1.15rem;
}

.x {
	width: 2.15rem;
	height: 2.15rem;
	border-radius: 50%;
	border: 1px solid var(--line);
	background: var(--cardbg);
	color: var(--ink);
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
	transition: border-color .2s, transform .25s;
}

.x:hover {
	border-color: var(--accent);
	transform: rotate(90deg);
}

.dbody {
	padding: .9rem 1.15rem;
	overflow-y: auto;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.dl-wrap {
	overflow-y: visible;
	margin-bottom: .35rem;
}

.dl {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0;
}

.dl li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .75rem;
	padding: .65rem 0;
	border-bottom: 1px dotted var(--line);
	background: transparent;
	animation: rise .4s cubic-bezier(.22, 1, .36, 1) backwards;
}

.dl .dl-thumb {
	width: 3.75rem;
	height: 3.75rem;
	flex: none;
	border-radius: 4px;
	overflow: hidden;
	border: 1px solid var(--line);
	background: var(--cardbg);
}

.dl .dl-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.dl .dl-info {
	min-width: 0;
	flex: 1;
}

.dl .dl-title {
	display: block;
	font-size: .88rem;
	font-weight: 600;
	color: var(--accent);
	line-height: 1.3;
	margin-bottom: .15rem;
}

.dl .dl-price {
	font-size: .86rem;
	font-weight: 600;
	color: var(--accent);
}

.dl button.dl-remove {
	width: 1.75rem;
	height: 1.75rem;
	border-radius: 50%;
	border: 1px solid var(--accent);
	background: transparent;
	color: var(--accent);
	font-size: 1rem;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	flex: none;
	transition: background-color .2s, color .2s;
}

.dl button.dl-remove:hover {
	background: var(--accent);
	color: var(--bg);
}

.drawer-subtotal {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .4rem;
	padding: .75rem 0;
	border-bottom: 1px dotted var(--line);
	font-size: .95rem;
	color: var(--accent);
	font-weight: 600;
}

.drawer-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: .6rem;
	margin: .85rem 0 .5rem;
}

.drawer-actions .btn {
	text-align: center;
	padding: .65rem .75rem;
	font-size: .88rem;
}

.drawer-inq {
	margin-top: .5rem;
	border-top: 1px dotted var(--line);
	padding-top: .6rem;
}

.drawer-inq summary {
	cursor: pointer;
	font-size: .88rem;
	font-weight: 600;
	color: var(--accent);
	list-style: none;
	text-align: center;
	padding: .25rem 0;
}

.drawer-inq summary::-webkit-details-marker {
	display: none;
}

.evform {
	display: grid;
	gap: .75rem;
	margin-top: 1rem;
	max-width: 34rem;
}

.drawer-form {
	gap: .5rem;
	margin-top: .25rem;
	padding-top: .65rem;
	border-top: 1px dotted var(--line);
}

.drawer-form .two {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: .55rem;
}

.drawer-form input,
.drawer-form textarea {
	padding: .45rem .65rem;
	font-size: .85rem;
}

.drawer-form .btn {
	padding: .55rem 1rem;
	font-size: .92rem;
}

.evform input,
.evform select,
.evform textarea {
	width: 100%;
	font: inherit;
	font-size: .9rem;
	padding: .6rem .8rem;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: var(--cardbg);
	color: var(--ink);
}

.evform input:focus,
.evform textarea:focus {
	border-color: var(--accent);
	outline: none;
}

.evform label {
	display: grid;
	gap: .25rem;
	font-size: .85rem;
	color: var(--muted);
}

#inqmsg {
	margin: .25rem 0 0;
	font-weight: 500;
}

#inqmsg.is-success {
	color: #166534;
}

#inqmsg.is-error {
	color: #b91c1c;
}

/* Archive, Search & Single Product Views */
.archive-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: .75rem 1.25rem;
	padding-bottom: .75rem;
	border-bottom: 1px dotted var(--line);
	margin-bottom: 1.25rem;
}

.archive-head h1 {
	margin: 0;
	font-size: 1.55rem;
}

.filter-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .4rem;
}

.filter-bar .chip.on {
	background: var(--accent);
	border-color: var(--accent);
	color: var(--bg);
}

.shop-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
}

@media (max-width: 48rem) {
	.shop-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: .65rem;
	}
	.shop-grid .card {
		padding: .55rem;
		min-width: 0;
	}
}

.shop-grid .card {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.shop-grid .add {
	margin-top: auto;
	padding-top: .45rem;
	padding-bottom: .45rem;
}

.pagination {
	margin-top: 2rem;
	display: flex;
	justify-content: center;
	gap: .4rem;
	flex-wrap: wrap;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.2rem;
	height: 2.2rem;
	padding: 0 .65rem;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: var(--cardbg);
	color: var(--ink);
	font-size: .88rem;
	font-weight: 500;
}

.pagination .page-numbers.current,
.pagination a.page-numbers:hover {
	background: var(--accent);
	border-color: var(--accent);
	color: var(--bg);
	text-decoration: none;
}

/* Single Product */
.breadcrumbs {
	font-size: .85rem;
	color: var(--muted);
	margin-bottom: 1rem;
}

.single-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 2rem;
}

@media (min-width: 46rem) {
	.single-grid {
		grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	}
}

.gallery-main {
	position: relative;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--cardbg);
	overflow: hidden;
	aspect-ratio: 1 / 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

.gallery-main img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	cursor: zoom-in;
}

.gallery-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 50%;
	border: 1px solid var(--line);
	background: rgba(250, 243, 210, .9);
	color: var(--ink);
	font-size: 1.1rem;
	cursor: pointer;
}

.gallery-prev {
	left: .6rem;
}

.gallery-next {
	right: .6rem;
}

.gallery-thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	margin-top: .65rem;
}

.gallery-thumb {
	width: 4rem;
	height: 4rem;
	padding: 0;
	border: 1px solid var(--line);
	border-radius: 6px;
	overflow: hidden;
	background: var(--cardbg);
	cursor: pointer;
}

.gallery-thumb.on {
	border: 2px solid var(--accent);
}

.gallery-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.single-price {
	font-size: 1.35rem;
	font-weight: 700;
	color: var(--accent);
	margin: .5rem 0 1rem;
}

.single-actions {
	display: flex;
	flex-wrap: wrap;
	gap: .75rem;
	margin: 1.25rem 0;
}

.single-desc {
	border-top: 1px dotted var(--line);
	padding-top: 1rem;
	margin-top: 1rem;
}

.lightbox {
	position: fixed;
	inset: 0;
	z-index: 60;
	background: rgba(20, 15, 5, .85);
	display: none;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
}

.lightbox.open {
	display: flex;
}

.lightbox img {
	max-width: 92vw;
	max-height: 88vh;
	border-radius: 6px;
	background: var(--cardbg);
}

.lightbox .x {
	position: absolute;
	top: 1rem;
	right: 1rem;
}

/* Single Product Inquiry Modal */
.inq-modal {
	position: fixed;
	inset: 0;
	z-index: 65;
	background: rgba(30, 20, 5, .55);
	display: none;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
}

.inq-modal.open {
	display: flex;
}

.inq-dialog {
	width: min(30rem, 100%);
	max-height: 92dvh;
	overflow-y: auto;
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: 10px;
	padding: 1.15rem 1.35rem;
	box-shadow: 0 24px 48px -18px rgba(20, 15, 5, .55);
	animation: rise .25s cubic-bezier(.22, 1, .36, 1) backwards;
}

.inq-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: .7rem;
	border-bottom: 1px solid var(--line);
}

.inq-head h2 {
	margin: 0;
	font-size: 1.2rem;
}

/* Inner Page Content */
.page-card {
	border: 1px solid var(--line);
	border-radius: 10px;
	background: var(--cardbg);
	padding: 1.5rem 1.75rem;
}

.page-card img {
	max-width: 100%;
	height: auto;
}

/* Animations & Motion */
@keyframes rise {
	from {
		opacity: 0;
		transform: translateY(16px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.js .rv {
	opacity: 0;
}

.js .rv.in {
	opacity: 1;
	animation: rise .8s cubic-bezier(.22, 1, .36, 1) var(--d, 0s) backwards;
}

@media (prefers-reduced-motion: reduce) {
	* {
		transition: none !important;
	}
	html {
		scroll-behavior: auto;
	}
	header.top,
	.evl li,
	.dl li {
		animation: none !important;
	}
	.js .rv {
		opacity: 1;
	}
	.js .rv.in {
		animation: none;
	}
	.track {
		scroll-behavior: auto;
	}
	.drawer,
	.ov {
		transition: none;
	}
}
