/* ================================================================
   Suhaku — Shop redesign v3  (mobile-first)
   Tokens from main.css :root:
     --primary   #3783A2   (not used in v3 — buttons are black/white)
     --text-dark #3D2314   headings
     --grey      #4D4B4C   muted body
   ================================================================ */

/* ── Token bridge ────────────────────────────────────────────── */
:root {
	--sp2-text:        var(--text-dark, #3D2314);
	--sp2-muted:       var(--grey, #4D4B4C);
	--sp2-muted-lt:    #9e9b96;
	--sp2-img-bg:      #ECE7DA;
	--sp2-page-bg:     #F8F7F2;
	--sp2-border-md:   rgba(0,0,0,0.14);
	--sp2-radius-pill: 999px;
}

/* ── Page background gradient ───────────────────────────────── */
body.woocommerce:not(.home)::before,
body.woocommerce-page:not(.home)::before {
	content: '';
	display: block;
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(180deg, #D9F5FF 60.1%, #E9F8FE 100%);
	z-index: -1;
}

body.woocommerce *,
body.woocommerce-page * {
	/* Prevent any inherited gradient bleeds */
}

/* Kill every WooCommerce wrapper background so body::before gradient shows through */
.woocommerce,
.woocommerce-page,
.woocommerce-page #primary,
.woocommerce-page #main,
.woocommerce-page .site-content,
.woocommerce-page .entry-content,
.woocommerce .woocommerce,
#woocommerce-container,
.site-content,
#page {
	background: transparent !important;
	background-image: none !important;
}

/* Bubbles background — visible on shop pages */
.woocommerce-shop .bg-bubbles-inner,
.woocommerce-page .bg-bubbles-inner {
	display: block !important;
}

/* Suppress default WC breadcrumb wrapper padding */
.woocommerce-page .woocommerce {
	padding: 0;
}

/* ================================================================
   ANNOUNCEMENT BAR
   ================================================================ */
.sh-announce {
	background: #000;
	color: #fff;
	text-align: center;
	font-family: 'Avenir Next', sans-serif;
	font-size: 11px;
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 0.18em;
	padding: 8px 16px;
	line-height: 1;
}

/* ================================================================
   MOBILE SHOP HEADER
   ================================================================ */

/* Override #burgerNav absolute positioning inside sh-header */
.sh-header .sh-burger-wrap {
	position: static;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	cursor: pointer;
	flex-shrink: 0;
}

.sh-header #burgerNav {
	position: static !important;
	top: auto !important;
	left: auto !important;
	width: 20px;
	height: 16px;
	z-index: auto;
}

.sh-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--sp2-page-bg);
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 20px;
	height: 56px;
	border-bottom: 0.5px solid rgba(0,0,0,0.08);
}

.sh-wordmark {
	font-family: 'Impana', sans-serif;
	font-size: 16px;
	font-weight: 400;
	letter-spacing: 0.22em;
	color: var(--sp2-text);
	text-decoration: none;
	text-transform: uppercase;
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
}

.sh-wordmark:hover {
	opacity: 0.8;
}

.sh-bag {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: inherit;
	flex-shrink: 0;
	width: 26px;
	height: 30px;
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.sh-bag:hover {
	opacity: 0.7;
}

.sh-bag__badge {
	position: absolute;
	top: -4px;
	right: -4px;
	width: 16px;
	height: 16px;
	background: #000;
	color: #fff;
	font-family: 'Avenir Next', sans-serif;
	font-size: 9px;
	font-weight: 600;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.sh-bag__badge--empty {
	display: none;
}

/* Nav drawer on mobile — replicates header.nav slide-in for sh-header context */
.mobilenavheader-wrap .nav {
	position: fixed;
	left: 100%;
	z-index: 10;
	height: calc(100dvh + 70px);
	width: 100%;
	top: 0;
	background-color: var(--sp2-page-bg);
	transition: all 300ms;
}

.mobilenavheader-wrap .nav.navActive {
	overflow-y: scroll;
	height: calc(100dvh + 90px);
	left: 0%;
	transition: all 300ms;
	padding-bottom: 90px;
	background: var(--sp2-page-bg);
}

.mobilenavheader-wrap .nav.navActive::before {
	content: '';
	height: 73px;
	width: 100%;
	position: fixed;
	background-color: var(--sp2-page-bg);
	display: block;
	z-index: 45;
	top: 0;
	left: 0;
}

/* ================================================================
   HERO BLOCK
   ================================================================ */
.sh-hero {
	text-align: center;
	padding: 44px 0 36px;
}

.sh-hero__eyebrow {
	display: none;
}

.sh-hero__heading {
	font-family: 'Impana', sans-serif;
	font-size: 42px;
	font-weight: 600;
	color: var(--sp2-text);
	letter-spacing: 0.03em;
	line-height: 1.15;
	margin: 0 0 12px;
}

.sh-hero__tagline {
	font-family: 'Avenir Next', sans-serif;
	font-size: 14px;
	font-weight: 400;
	color: var(--sp2-muted-lt);
	margin: 0;
	line-height: 1.5;
}

/* WC content wrapper */
.woocommerce-page .woocommerce::before,
.woocommerce-page .woocommerce::after {
	content: none !important;
	display: none !important;
}

/* ================================================================
   FILTER CHIPS
   ================================================================ */
.sh-page {
	padding-bottom: 64px;
}

.sh-chips-wrap {
	margin-bottom: 20px;
	display: flex;
	justify-content: center;
}

.sp2-chips {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	flex-wrap: wrap;
	overflow-x: visible;
	padding-bottom: 2px;
}

.sp2-chip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	height: 32px;
	padding: 0 14px;
	font-family: 'Avenir Next', sans-serif;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: var(--sp2-text);
	background: #fff;
	border: 0.5px solid var(--sp2-border-md);
	border-radius: var(--sp2-radius-pill);
	cursor: pointer;
	white-space: nowrap;
	flex-shrink: 0;
	transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.sp2-chip__count {
	font-size: 10px;
	opacity: 0.6;
}

.sp2-chip.is-active {
	background: var(--primary);
	color: #fff;
	border-color: var(--primary);
}

.sp2-chip.is-active .sp2-chip__count {
	opacity: 0.7;
}

.sp2-chip:hover:not(.is-active) {
	background: var(--primary);
	color: #fff;
	border-color: var(--primary);
}

/* ================================================================
   PRODUCT GRID — Mobile-first: 2 columns
   ================================================================ */
.woocommerce ul.products,
.woocommerce-page ul.products {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	list-style: none !important;
	padding: 0 !important;
	margin: 0 !important;
	float: none !important;
	clear: both;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after,
.woocommerce-page ul.products::before,
.woocommerce-page ul.products::after {
	content: none !important;
	display: none !important;
}

/* Kill WC's float-based width overrides; stretch to full row height */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
	float: none !important;
	width: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	clear: none !important;
	display: flex !important;
	flex-direction: column !important;
}

/* ================================================================
   CARD — borderless
   ================================================================ */
.sp2-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 0.5px solid rgba(0,0,0,0.07);
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 2px 12px rgba(0,0,0,0.05);
	cursor: pointer;
	flex: 1;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.woocommerce ul.products li.product:hover .sp2-card {
	transform: translateY(-2px);
	box-shadow: 0 6px 24px rgba(0,0,0,0.09);
}

/* ================================================================
   IMAGE ZONE — warm beige, 4:5 ratio
   ================================================================ */
.sp2-img-zone {
	position: relative;
	background: var(--sp2-img-bg);
	aspect-ratio: 1;
	overflow: hidden;
	flex-shrink: 0;
	border-radius: 4px;
}

/* WC thumbnail */
.sp2-img-zone img {
	position: absolute;
	top: 50%;
	left: 50%;
	height: 90%;
	max-width: none !important;
	object-fit: contain !important;
	transform: translate(-50%, -50%);
	transition: transform 0.35s ease;
	border-radius: 6px;
}

.woocommerce ul.products li.product:hover .sp2-img-zone img {
	transform: translate(-50%, -50%) scale(1.04);
}

.woocommerce ul.products li.product:hover .sp2-img-zone img {
	transform: translate(-50%, -50%) scale(1.04);
}

/* Full-zone link overlay */
.sp2-img-overlay {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: block;
}

/* ================================================================
   BADGES
   ================================================================ */
.sp2-badge,
.woocommerce ul.products li.product .onsale {
	position: absolute !important;
	top: 8px !important;
	left: 8px !important;
	z-index: 4;
	font-family: 'Avenir Next', sans-serif !important;
	font-size: 9px !important;
	font-weight: 600 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.12em !important;
	padding: 4px 8px !important;
	border-radius: 3px !important;
	line-height: 1 !important;
	background: var(--sp2-img-bg) !important;
	color: var(--sp2-text) !important;
	min-height: 0 !important;
	min-width: 0 !important;
}

.sp2-badge--new {
	background: var(--sp2-img-bg);
	color: var(--sp2-text);
}

/* ================================================================
   ADD TO CART — pinned to card bottom
   ================================================================ */
.sp2-atc-wrap {
	padding: 0 14px 14px;
	margin-top: auto;
}

/* "ADD TO CART" pill — simple products */
.sp2-atc-btn {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 100% !important;
	height: 38px;
	background: #000 !important;
	color: #fff !important;
	border: none !important;
	border-radius: 0 !important;
	padding: 0 16px !important;
	font-family: 'Avenir Next', sans-serif !important;
	font-size: 11px !important;
	font-weight: 600 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.12em !important;
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.15s ease, opacity 0.15s ease !important;
}

.sp2-atc-btn:hover {
	opacity: 0.85 !important;
	color: #fff !important;
}

.sp2-atc-btn.loading {
	opacity: 0.6 !important;
	pointer-events: none;
}

/* Hide WC's injected spinner inside the button */
.sp2-atc-btn .wc-block-components-spinner,
.sp2-atc-btn::after {
	display: none !important;
	content: none !important;
}

.sp2-atc-btn.added {
	background: var(--primary) !important;
}

.sp2-atc-btn.added::after,
.sp2-atc-btn.added::before {
	display: none !important;
	content: none !important;
}

/* Hide the second button WC injects after AJAX add-to-cart */
.sp2-atc-wrap .sp2-atc-btn ~ .sp2-atc-btn,
.sp2-atc-wrap a + a {
	display: none !important;
}

/* "OPTIONS" pill — variable / grouped products */
.sp2-atc-pill {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 100% !important;
	height: 38px;
	padding: 0 16px !important;
	font-family: 'Avenir Next', sans-serif !important;
	font-size: 11px !important;
	font-weight: 600 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.12em !important;
	color: var(--sp2-text) !important;
	background: transparent !important;
	border: 0.5px solid rgba(0,0,0,0.25) !important;
	border-radius: 0 !important;
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.12s ease !important;
}

.sp2-atc-pill:hover {
	background: rgba(0,0,0,0.05) !important;
	color: var(--sp2-text) !important;
	opacity: 1;
}

/* ================================================================
   INFO ZONE
   ================================================================ */
.sp2-info {
	padding: 12px 14px 14px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.sp2-cat-label {
	display: block;
	font-family: 'Avenir Next', sans-serif;
	font-size: 9px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.18em;
	color: #444 !important;
	margin-bottom: 4px;
	line-height: 1;
	padding: 10px 0 5px;
}

.sp2-name-link {
	text-decoration: none;
	display: block;
}

.sp2-name-link:hover {
	opacity: 1;
}

/* Product title — serif */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-family: 'Impana', sans-serif !important;
	font-size: 14px !important;
	font-weight: 400 !important;
	color: var(--sp2-text) !important;
	line-height: 1.3 !important;
	letter-spacing: 0.02em !important;
	text-transform: none !important;
	display: -webkit-box !important;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 0;
	margin: 0 !important;
	padding: 0 !important;
}

/* Optional italic subtitle */
.sp2-subtitle {
	font-family: 'Avenir Next', sans-serif;
	font-style: italic;
	font-size: 11px;
	color: var(--sp2-muted-lt);
	margin: 3px 0 0;
	line-height: 1.4;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Star rating */
.woocommerce ul.products li.product .star-rating {
	display: none;
}

/* ── Price ─────────────────────────────────────────────────── */
.woocommerce ul.products li.product .price {
	font-family: 'Avenir Next', sans-serif !important;
	font-size: 13px !important;
	font-weight: 400 !important;
	color: var(--sp2-muted) !important;
	display: block;
	margin: 5px 0 0 !important;
}

.woocommerce ul.products li.product .price .amount {
	font-size: 13px !important;
	font-weight: 400 !important;
	color: var(--sp2-muted) !important;
}

.woocommerce ul.products li.product .price del {
	color: var(--sp2-muted-lt) !important;
	font-size: 11px !important;
	margin-right: 3px;
}

.woocommerce ul.products li.product .price del .amount {
	color: var(--sp2-muted-lt) !important;
	font-size: 11px !important;
}

.woocommerce ul.products li.product .price ins {
	text-decoration: none !important;
}

/* Suppress card footer — layout handled by sp2-info flex now */
.sp2-card-footer {
	display: none !important;
}

/* Hide WC "View cart" link that appears after AJAX add-to-cart */
.woocommerce ul.products li.product .added_to_cart {
	display: none !important;
}


/* ================================================================
   VIEW ALL LINK
   ================================================================ */
.sh-view-all {
	margin-top: 32px;
	text-align: center;
}

.sh-view-all__rule {
	height: 0.5px;
	background: rgba(0,0,0,0.12);
	margin-bottom: 20px;
}

.sh-view-all__link {
	font-family: 'Avenir Next', sans-serif;
	font-size: 12px;
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 0.18em;
	color: var(--sp2-text);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.sh-view-all__link:hover {
	opacity: 0.6;
}

/* ================================================================
   PAGINATION (keep functional, hide visually if VIEW ALL used)
   ================================================================ */
.woocommerce nav.woocommerce-pagination {
	display: none;
}

/* ================================================================
   WC NOTICES
   ================================================================ */
.woocommerce .woocommerce-info,
.woocommerce .woocommerce-message {
	border-left-color: #000;
	background: rgba(0,0,0,0.04);
	font-family: 'Avenir Next', sans-serif;
	border-radius: 0;
	font-size: 13px;
}

/* ================================================================
   HIDDEN ITEMS (JS filter)
   ================================================================ */
.sp2-hidden,
.woocommerce ul.products li.product.sp2-hidden,
.woocommerce-page ul.products li.product.sp2-hidden {
	display: none !important;
}

/* ================================================================
   STICKY CART BAR — mobile only
   ================================================================ */
.sh-cart-bar {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 200;
	background: #000;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 20px;
	transition: transform 0.25s ease;
}

.sh-cart-bar--hidden {
	transform: translateY(100%);
}

.sh-cart-bar__left {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: 'Avenir Next', sans-serif;
	font-size: 13px;
	font-weight: 400;
	color: #fff;
}

.sh-cart-bar__cta {
	font-family: 'Avenir Next', sans-serif;
	font-size: 12px;
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: #fff;
	text-decoration: none;
}

.sh-cart-bar__cta:hover {
	opacity: 0.75;
	color: #fff;
}

/* ================================================================
   TOAST — top-center, slides down on add-to-cart
   ================================================================ */
.sh-toast {
	transform: translate(-50%, -200px);
	position: fixed;
	top: 20px;
	left: 50%;
	z-index: 999999;
	display: flex;
	align-items: center;
	gap: 12px;
	background: #fff;
	color: var(--sp2-text);
	padding: 10px 10px 10px 10px;
	border-radius: 5px;
	box-shadow: 0 4px 32px rgba(0,0,0,0.13);
	font-family: 'Avenir Next', sans-serif;
	font-size: 13px;
	min-width: 400px;
	max-width: 96%;
	transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.sh-toast--visible {
	transform: translateX(-50%) translateY(0);
}

.sh-toast__img {
	width: 48px;
	height: 48px;
	object-fit: contain;
	border-radius: 8px;
	background: var(--sp2-img-bg);
	flex-shrink: 0;
}

.sh-toast__body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
	min-width: 0;
}

.sh-toast__label {
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--sp2-muted-lt);
}

.sh-toast__name {
	font-size: 13px;
	font-weight: 500;
	color: var(--sp2-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sh-toast__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 36px;
	padding: 0 16px;
	background: #000;
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	text-decoration: none;
	border-radius: 999px;
	flex-shrink: 0;
	transition: opacity 0.15s ease;
}

.sh-toast__cta:hover {
	opacity: 0.8;
	color: #fff;
}

.sh-toast__close {
	background: none;
	border: none;
	color: var(--sp2-muted-lt);
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px 0 0;
	flex-shrink: 0;
}

.sh-toast__close:hover {
	color: var(--sp2-text);
}

/* ================================================================
   PAGE HEADER — suppress old sp2 heading on shop
   ================================================================ */
.sp2-page-header {
	display: none;
}

/* ================================================================
   RESPONSIVE — ≥ 768px: 3 columns
   ================================================================ */
@media (min-width: 768px) {
	.sh-page {
		padding-bottom: 80px;
	}

	.woocommerce ul.products,
	.woocommerce-page ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
		gap: 14px;
	}

	.sh-hero__heading {
		font-size: 56px;
	}

	.sh-hero {
		padding: 60px 0 20px;
	}

	.woocommerce ul.products li.product .woocommerce-loop-product__title {
		font-size: 20px !important;
		line-height: 1.2 !important;
		color: #000 !important;
	}

	.sh-cart-bar {
		display: none !important;
	}
}

/* ================================================================
   RESPONSIVE — ≥ 1200px: desktop header visible, sh-header hidden
   ================================================================ */
@media (min-width: 1200px) {
	.woocommerce ul.products,
	.woocommerce-page ul.products {
		grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	}

	.sh-chips-wrap {
		margin-bottom: 24px;
	}

	.sp2-chips {
		flex-wrap: wrap;
		overflow-x: visible;
	}
}

/* ================================================================
   SINGLE PRODUCT — ATC button animation
   ================================================================ */
.suhaku-single-atc {
	position: relative;
	transition: background 0.2s ease, opacity 0.2s ease, border-color 0.2s ease !important;
}

.suhaku-single-atc.sp-atc-loading {
	opacity: 0.6 !important;
	pointer-events: none;
	cursor: default;
}

.suhaku-single-atc.sp-atc-added {
	background: var(--primary, #3783a2) !important;
	color: #fff !important;
	border-color: var(--primary, #3783a2) !important;
}

/* Suppress WC's default add-to-cart notices everywhere — custom toast handles these */
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-error,
.woocommerce-notices-wrapper .woocommerce-info {
	display: none !important;
}

/* Suppress WC's "Added to cart" text injected next to button */
.added_to_cart {
	display: none !important;
}

/* ================================================================
   WC NOTICES — cart / checkout / account (inline page notices)
   These are notices inside .woocommerce, not the notices-wrapper.
   ================================================================ */
.woocommerce .woocommerce-message,
.woocommerce .woocommerce-error,
.woocommerce .woocommerce-info {
	font-family: 'Avenir Next', sans-serif;
	font-size: 13px;
	border-radius: 8px;
	border: none;
	padding: 12px 18px;
	margin-bottom: 20px;
}

.woocommerce .woocommerce-message {
	background: #f0f4f0;
	color: #1a1a1a;
	border-left: 3px solid #3a7a4e;
}

.woocommerce .woocommerce-error {
	background: #fdf0f0;
	color: #1a1a1a;
	border-left: 3px solid #b94444;
}

.woocommerce .woocommerce-info {
	background: #f0f4fa;
	color: #1a1a1a;
	border-left: 3px solid #3a5a8a;
}

.woocommerce .woocommerce-message::before,
.woocommerce .woocommerce-info::before {
	display: none;
}

.woocommerce .woocommerce-message a.button,
.woocommerce .woocommerce-error a.button,
.woocommerce .woocommerce-info a.button {
	font-family: 'Avenir Next', sans-serif;
	font-size: 11px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	background: #1a1a1a;
	color: #fff;
	border-radius: 999px;
	padding: 8px 16px;
	border: none;
	text-decoration: none;
}

#sh-toast .post-edit-link,
#sh-toast .edit-post-link { display: none !important; }
