/* ==========================================================================
   Nice Ebooks — base: tokens, reset, typography, layout, components,
   header, footer, product cards. Loaded on every page.
   ========================================================================== */

:root {
	--ink: #14213d;
	--ink-2: #22335a;
	--ink-soft: #3a4a6b;
	--paper: #fbf8f3;
	--paper-2: #f4efe6;
	--surface: #ffffff;
	--line: #e7e0d4;
	--line-strong: #d6cdbd;
	--text: #1b1f2a;
	--muted: #5d6474;
	--accent: #f08a3e;
	--accent-hover: #e2762a;
	--accent-soft: #fdeedf;
	--accent-ink: #a8501a;
	--brand-grad: linear-gradient(100deg, #f7613e 0%, #e2457a 55%, #c8327e 100%);
	--sunrise-grad: linear-gradient(135deg, #ffb547 0%, #f7613e 50%, #c8327e 100%);
	--save: #23805d;
	--save-bg: #e3f3ea;
	--warn-bg: #fff6e0;
	--danger: #b42318;
	--danger-bg: #fdecea;
	--star: #f2a623;
	--sale: #e5283c;
	--sale-2: #ff5a3c;

	--font-sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--font-display: var(--font-sans);

	--step--1: clamp(0.8rem, 0.78rem + 0.1vw, 0.875rem);
	--step-0: clamp(0.95rem, 0.92rem + 0.15vw, 1.0625rem);
	--step-1: clamp(1.1rem, 1.04rem + 0.3vw, 1.3rem);
	--step-2: clamp(1.3rem, 1.18rem + 0.6vw, 1.7rem);
	--step-3: clamp(1.6rem, 1.38rem + 1.1vw, 2.35rem);
	--step-4: clamp(2rem, 1.6rem + 2vw, 3.4rem);

	--space-1: 0.25rem;
	--space-2: 0.5rem;
	--space-3: 0.75rem;
	--space-4: 1rem;
	--space-5: 1.5rem;
	--space-6: 2rem;
	--space-7: 3rem;
	--space-8: clamp(3rem, 2rem + 4vw, 5.5rem);

	--radius-sm: 8px;
	--radius: 14px;
	--radius-lg: 22px;
	--shadow-sm: 0 1px 2px rgba(20, 33, 61, 0.06), 0 1px 3px rgba(20, 33, 61, 0.05);
	--shadow: 0 6px 18px -6px rgba(20, 33, 61, 0.16), 0 2px 6px rgba(20, 33, 61, 0.05);
	--shadow-lg: 0 24px 48px -16px rgba(20, 33, 61, 0.28);
	--cover-shadow: 0 1px 1px rgba(0, 0, 0, 0.08), 0 8px 16px -6px rgba(20, 33, 61, 0.35);

	--container: 1240px;
	--gutter: clamp(1rem, 0.6rem + 1.6vw, 2rem);
	--header-h: 68px;
	--ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Reset ------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
	margin: 0;
	font-family: var(--font-sans);
	font-size: var(--step-0);
	line-height: 1.6;
	color: var(--text);
	background: var(--paper);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
input, button, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-ink); }
p, ul, ol, dl, figure, blockquote { margin: 0 0 var(--space-4); }
:where(ul[class], ol[class]) { list-style: none; padding: 0; margin: 0; }
table { border-collapse: collapse; width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--space-6) 0; }
[hidden] { display: none !important; }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-display);
	font-weight: 700;
	line-height: 1.15;
	color: var(--ink);
	margin: 0 0 var(--space-3);
	letter-spacing: -0.025em;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
h4 { font-size: var(--step-0); }

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

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute !important; word-wrap: normal !important;
}
.skip-link:focus {
	clip: auto; clip-path: none; height: auto; width: auto; margin: 0;
	position: fixed !important; top: 0.5rem; left: 0.5rem; z-index: 1000;
	padding: 0.75rem 1rem; background: var(--ink); color: #fff; border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* Layout ------------------------------------------------------------------ */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: 820px; }
.site-main { padding-block: var(--space-5) var(--space-8); min-height: 50vh; }
.home.site-main { padding-top: 0; }
.section { padding-block: var(--space-8) 0; }
.section-head { margin-bottom: var(--space-5); max-width: 720px; }
.section-head h2 { margin-bottom: var(--space-2); }
.section-head--row { display: flex; align-items: end; justify-content: space-between; gap: var(--space-4); max-width: none; flex-wrap: wrap; }
.section-lede { color: var(--muted); margin: 0; max-width: 60ch; }
.eyebrow {
	font-size: var(--step--1); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
	color: var(--accent-ink); margin: 0 0 var(--space-2);
}
.eyebrow--pill {
	display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.8rem; border-radius: 99px;
	background: var(--accent-soft); letter-spacing: 0.02em; text-transform: none;
}
.eyebrow--pill .icon { width: 16px; height: 16px; }
.link-arrow { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.link-arrow .icon { width: 18px; height: 18px; transition: transform 0.2s var(--ease); }
.link-arrow:hover .icon { transform: translateX(3px); }

/* Buttons ----------------------------------------------------------------- */
.button, input[type="submit"]:not(.button), .wp-element-button, .wp-block-button__link {
	--btn-bg: var(--ink);
	--btn-fg: #fff;
	--btn-bd: var(--ink);
	display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
	min-height: 44px; padding: 0.6rem 1.15rem;
	font-weight: 600; font-size: 0.95rem; line-height: 1.2; text-decoration: none; text-align: center;
	color: var(--btn-fg); background: var(--btn-bg); border: 1.5px solid var(--btn-bd); border-radius: 999px;
	cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s var(--ease), box-shadow 0.15s;
	white-space: nowrap;
}
.button:hover, input[type="submit"]:hover { --btn-bg: var(--ink-2); --btn-bd: var(--ink-2); color: var(--btn-fg); transform: translateY(-1px); }
.button:active { transform: none; }
.button .icon { width: 18px; height: 18px; flex: none; }
.button--accent, .button.alt, .checkout-button, #place_order { --btn-bg: var(--accent); --btn-bd: var(--accent); --btn-fg: var(--ink); }
.button--accent:hover, .button.alt:hover, .checkout-button:hover, #place_order:hover { --btn-bg: var(--accent-hover); --btn-bd: var(--accent-hover); --btn-fg: var(--ink); box-shadow: 0 8px 20px -8px rgba(240, 138, 62, 0.7); }
.button--dark { --btn-bg: var(--ink); --btn-bd: var(--ink); }
.button--ghost { --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: var(--line-strong); }
.button--ghost:hover { --btn-bg: var(--surface); --btn-fg: var(--ink); --btn-bd: var(--ink); }
.button--ghost-light { --btn-bg: transparent; --btn-fg: #fff; --btn-bd: rgba(255, 255, 255, 0.4); }
.button--ghost-light:hover { --btn-bg: rgba(255, 255, 255, 0.1); --btn-fg: #fff; --btn-bd: #fff; }
.button--sm { min-height: 38px; padding: 0.45rem 0.9rem; font-size: 0.875rem; }
.button--lg { min-height: 52px; padding: 0.8rem 1.6rem; font-size: 1rem; }
.button--block { width: 100%; }
.button.loading { opacity: 0.7; pointer-events: none; }
.button.loading::after { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: ne-spin 0.7s linear infinite; }
.button.added { display: none; }
.added_to_cart { display: inline-flex; align-items: center; min-height: 38px; padding: 0.45rem 0.9rem; font-size: 0.875rem; font-weight: 600; border-radius: 999px; background: var(--save-bg); color: var(--save); text-decoration: none; white-space: nowrap; }
.button:disabled, .button.disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
@keyframes ne-spin { to { transform: rotate(360deg); } }

.icon-btn {
	position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
	border: 0; border-radius: 50%; background: transparent; color: var(--ink); text-decoration: none;
	transition: background 0.15s;
}
.icon-btn:hover { background: var(--paper-2); color: var(--ink); }
.icon-btn .icon { width: 22px; height: 22px; }

/* Forms ------------------------------------------------------------------- */
label { display: block; font-weight: 500; font-size: 0.9rem; margin-bottom: 0.35rem; color: var(--ink); }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="tel"],
input[type="number"], input[type="url"], select, textarea, .input-text {
	width: 100%; min-height: 48px; padding: 0.7rem 0.9rem;
	background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
	transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(240, 138, 62, 0.35); }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; accent-color: var(--ink); vertical-align: -3px; margin: 0 0.4rem 0 0; }
.required { color: var(--danger); text-decoration: none; border: 0; }
.optional { color: var(--muted); font-weight: 400; }

.search-form { position: relative; display: flex; align-items: center; gap: 0.5rem; }
.search-form > .icon { position: absolute; left: 0.9rem; width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.search-form .search-field { padding-left: 2.75rem; border-radius: 999px; }
.search-form .button { flex: none; }

/* Header ------------------------------------------------------------------ */
.announcement { background: var(--ink); color: #fff; font-size: var(--step--1); }
.announcement .container { display: flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 38px; text-align: center; }
.announcement .icon { width: 16px; height: 16px; color: var(--accent); flex: none; }
.announcement a { color: #fff; }

.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(251, 248, 243, 0.92); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
	border-bottom: 1px solid transparent; transition: border-color 0.2s, box-shadow 0.2s;
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }
.site-header.is-stuck { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; gap: var(--space-3); min-height: var(--header-h); }
.site-branding { margin: 0; font-size: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { flex: none; width: 40px; height: 40px; transition: transform 0.3s var(--ease); }
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.04); }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; letter-spacing: -0.035em; white-space: nowrap; line-height: 1; }
.brand-name-1 { color: var(--ink); }
.brand-name-2 { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.custom-logo { max-height: 44px; width: auto; }

.primary-nav { display: none; margin-left: var(--space-5); }
.nav-menu { display: flex; gap: var(--space-1); }
.nav-menu > li { position: relative; }
.nav-menu a { display: block; padding: 0.55rem 0.8rem; border-radius: 999px; text-decoration: none; font-weight: 500; font-size: 0.95rem; color: var(--ink); }
.nav-menu a:hover, .nav-menu .current-menu-item > a, .nav-menu .current-menu-ancestor > a { background: var(--paper-2); }
.nav-menu .sub-menu {
	position: absolute; top: 100%; left: 0; min-width: 220px; padding: 0.5rem; list-style: none; margin: 0;
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}
.nav-menu li:hover > .sub-menu, .nav-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.nav-menu .sub-menu a { border-radius: var(--radius-sm); }

.header-actions { display: flex; align-items: center; gap: 0.15rem; margin-left: auto; }
.cart-count {
	position: absolute; top: 4px; right: 2px; min-width: 19px; height: 19px; padding: 0 5px;
	display: grid; place-items: center; font-size: 0.7rem; font-weight: 700; line-height: 1;
	color: var(--ink); background: var(--accent); border-radius: 99px; border: 2px solid var(--paper);
}
.cart-count[data-count="0"] { display: none; }
.cart-link.is-bumped .cart-count { animation: ne-bump 0.45s var(--ease); }
@keyframes ne-bump { 40% { transform: scale(1.35); } }

@media (max-width: 959px) {
	.header-inner { gap: 0.25rem; }
	.site-header .site-branding { margin-right: auto; }
	.brand-name { font-size: 1.15rem; }
}
@media (max-width: 400px) { .brand-name { font-size: 1.1rem; } .brand-mark { width: 34px; height: 34px; } }
@media (max-width: 330px) { .brand-name { display: none; } }
@media (min-width: 960px) {
	.menu-toggle { display: none; }
	.primary-nav { display: block; }
}

/* Dialogs: drawers & search ---------------------------------------------- */
dialog { padding: 0; border: 0; color: inherit; max-width: none; max-height: none; }
dialog::backdrop { background: rgba(20, 33, 61, 0.45); backdrop-filter: blur(2px); }
body.has-dialog { overflow: hidden; }

.drawer {
	position: fixed; inset: 0 auto 0 0; width: min(400px, 92vw); height: 100dvh; margin: 0;
	display: flex; flex-direction: column; background: var(--paper);
}
.drawer:not([open]) { display: none; }
.drawer--right { inset: 0 0 0 auto; margin-left: auto; }
.drawer[open] { animation: ne-slide-in-left 0.28s var(--ease); }
.drawer--right[open] { animation-name: ne-slide-in-right; }
@keyframes ne-slide-in-left { from { transform: translateX(-100%); } }
@keyframes ne-slide-in-right { from { transform: translateX(100%); } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem 0.75rem 0.75rem var(--space-5); border-bottom: 1px solid var(--line); }
.drawer-title { font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); margin: 0; color: var(--ink); }
.drawer-body { padding: var(--space-5); overflow-y: auto; flex: 1; }
.drawer-body .search-form { margin-bottom: var(--space-5); }
.drawer-body .search-form .button { display: none; }
.mobile-nav { list-style: none; padding: 0; margin: 0 0 var(--space-5); }
.mobile-nav a { display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem 0.25rem; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 500; font-size: 1.05rem; }
.mobile-nav .sub-menu { list-style: none; padding-left: 1rem; margin: 0; }
.mobile-nav .sub-menu a { font-size: 0.95rem; color: var(--muted); }
.mobile-nav--secondary a { font-size: 0.95rem; }
.mobile-nav .icon { width: 20px; height: 20px; color: var(--muted); }

.search-panel { position: fixed; inset: 0 0 auto 0; width: 100%; margin: 0; padding: var(--space-5) 0 var(--space-6); background: var(--paper); box-shadow: var(--shadow-lg); }
.search-panel[open] { animation: ne-drop 0.25s var(--ease); }
@keyframes ne-drop { from { transform: translateY(-20px); opacity: 0; } }
.search-panel-inner { display: flex; gap: 0.5rem; align-items: center; }
.search-panel .search-form { flex: 1; }
.search-panel .search-field { min-height: 56px; font-size: 1.1rem; }
.search-suggest { margin-top: var(--space-4); }

/* Mini cart (drawer) ------------------------------------------------------ */
#cart-drawer .widget_shopping_cart_content { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.mini-cart { flex: 1; overflow-y: auto; padding: var(--space-3) var(--space-5); }
.mini-cart li { display: grid; grid-template-columns: 56px 1fr auto; gap: var(--space-3); align-items: start; padding: var(--space-3) 0; border-bottom: 1px solid var(--line); }
.mini-cart-cover { width: 56px; }
.mini-cart-title { display: block; font-weight: 600; text-decoration: none; line-height: 1.3; margin-bottom: 0.2rem; }
.mini-cart .quantity { font-weight: 600; color: var(--ink); font-size: 0.95rem; }
.mini-cart dl.variation { font-size: 0.8rem; color: var(--muted); margin: 0 0 0.2rem; display: flex; gap: 0.25rem; }
.mini-cart dl.variation dt, .mini-cart dl.variation dd, .mini-cart dl.variation p { margin: 0; }
.mini-cart .remove { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--muted); }
.mini-cart .remove:hover { background: var(--danger-bg); color: var(--danger); }
.mini-cart .remove .icon { width: 16px; height: 16px; }
.mini-cart-foot { padding: var(--space-5); border-top: 1px solid var(--line); background: var(--surface); }
.woocommerce-mini-cart__total { display: flex; justify-content: space-between; font-size: 1.05rem; margin-bottom: var(--space-4); }
.woocommerce-mini-cart__buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin: 0; }
.woocommerce-mini-cart__buttons .button:not(.checkout) { --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: var(--line-strong); }
.woocommerce-mini-cart__buttons .checkout { --btn-bg: var(--accent); --btn-bd: var(--accent); --btn-fg: var(--ink); }
.mini-cart-empty { padding: var(--space-7) var(--space-5); text-align: center; color: var(--muted); }

/* Breadcrumbs / pagination / chips --------------------------------------- */
.breadcrumbs { font-size: var(--step--1); color: var(--muted); margin-bottom: var(--space-4); }
.breadcrumbs p { margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--ink); text-decoration: underline; }
.breadcrumbs .sep { opacity: 0.5; }

.pagination, .woocommerce-pagination { margin-top: var(--space-7); }
.pagination ul, .woocommerce-pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.35rem; list-style: none; padding: 0; margin: 0; }
.pagination .page-numbers, .woocommerce-pagination .page-numbers li > * {
	display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 0.75rem; border-radius: 999px;
	text-decoration: none; font-weight: 600; border: 1.5px solid var(--line); background: var(--surface);
}
.pagination .current, .woocommerce-pagination .current { background: var(--ink); color: #fff; border-color: var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { display: inline-flex; align-items: center; padding: 0.45rem 0.95rem; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line); text-decoration: none; font-weight: 500; font-size: 0.9rem; transition: border-color 0.15s, background 0.15s; white-space: nowrap; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Badges / stars / price -------------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.2rem 0.55rem; border-radius: 99px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.01em; line-height: 1.4; white-space: nowrap; }
.badge-save { background: var(--save-bg); color: var(--save); }
.badge .woocommerce-Price-amount { font-weight: 700; }

.rating { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.8rem; color: var(--muted); }
.stars {
	--size: 15px;
	display: inline-block; width: calc(var(--size) * 5); height: var(--size);
	background: linear-gradient(90deg, var(--star) calc(var(--rating) / 5 * 100%), #d9d2c5 0);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 2.5 2.9 6 6.6.9-4.8 4.6 1.2 6.5L12 17.4l-5.9 3.1 1.2-6.5L2.5 9.4l6.6-.9z'/%3E%3C/svg%3E") 0 0 / var(--size) var(--size) repeat-x;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 2.5 2.9 6 6.6.9-4.8 4.6 1.2 6.5L12 17.4l-5.9 3.1 1.2-6.5L2.5 9.4l6.6-.9z'/%3E%3C/svg%3E") 0 0 / var(--size) var(--size) repeat-x;
}

.price { color: var(--ink); font-weight: 700; }
.price del { color: var(--muted); font-weight: 400; font-size: 0.85em; margin-right: 0.3rem; opacity: 0.85; }
.price ins { text-decoration: none; }

/* Book covers ------------------------------------------------------------- */
.cover { position: relative; display: block; aspect-ratio: 2 / 3; border-radius: 3px 7px 7px 3px; overflow: hidden; background: var(--paper-2); box-shadow: var(--cover-shadow); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover::after {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background: linear-gradient(90deg, rgba(0, 0, 0, 0.18) 0, rgba(255, 255, 255, 0.18) 3%, rgba(0, 0, 0, 0.05) 6%, transparent 10%);
}

.bundle-stack { position: relative; display: block; aspect-ratio: 1 / 1; }
.bundle-stack .cover {
	position: absolute; top: 12%; left: 50%; width: 52%;
	transform: translateX(calc(-50% + (var(--i) - (var(--n) - 1) / 2) * 22%)) rotate(calc((var(--i) - (var(--n) - 1) / 2) * 7deg));
	transform-origin: 50% 100%;
	z-index: calc(10 - var(--i));
	transition: transform 0.3s var(--ease);
}
.bundle-stack .cover:only-child { width: 62%; top: 6%; transform: translateX(-50%); }
.bundle-stack--mini { width: 96px; flex: none; }
.bundle-stack--lg { max-width: 460px; margin-inline: auto; aspect-ratio: 5 / 4; }

/* Product grid & cards ---------------------------------------------------- */
ul.products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); list-style: none; padding: 0; margin: 0; }
@media (min-width: 640px) { ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 640px) { ul.products { gap: var(--space-4); } }
@media (min-width: 1024px) { ul.products { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-5); } }
ul.products.products--bundles { grid-template-columns: 1fr; }
@media (min-width: 640px) { ul.products.products--bundles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { ul.products.products--bundles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.card {
	position: relative; display: flex; flex-direction: column; min-width: 0;
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
	padding: var(--space-3); box-shadow: var(--shadow-sm);
	transition: box-shadow 0.25s, transform 0.25s var(--ease), border-color 0.25s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: var(--line-strong); }
.card-cover {
	position: relative; display: block; margin-bottom: var(--space-3);
	padding: var(--space-5) 16%; border-radius: calc(var(--radius-lg) - 6px);
	background: radial-gradient(90% 80% at 50% 30%, #fff 0%, var(--paper-2) 100%);
}
.card-cover .cover { transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.card:hover .card-cover .cover { transform: translateY(-4px) rotate(-1deg); box-shadow: var(--shadow-lg); }
.card-body { display: flex; flex-direction: column; flex: 1; gap: 0.2rem; padding: 0 var(--space-1) var(--space-1); }
.card-title { font-family: var(--font-sans); font-size: 1rem; font-weight: 700; line-height: 1.3; margin: 0; letter-spacing: -0.01em; }
.card-title a { text-decoration: none; color: var(--ink); }
.card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--radius-lg); }
.card-author { font-size: 0.85rem; color: var(--muted); margin: 0; }
.card-foot { margin-top: auto; padding-top: var(--space-3); display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.card-foot .price { font-size: 1.05rem; }
.card-foot .button, .card-foot .added_to_cart { position: relative; z-index: 2; }
.card .rating { position: relative; z-index: 2; margin-top: 0.15rem; }
.in-cart .icon { width: 16px; height: 16px; }

.card--bundle { padding: var(--space-4); }
.card--bundle .card-cover { padding: 0; margin: calc(var(--space-4) * -1 + 1px) calc(var(--space-4) * -1 + 1px) var(--space-3); background: linear-gradient(160deg, var(--paper-2), var(--accent-soft)); border-radius: calc(var(--radius-lg) - 1px) calc(var(--radius-lg) - 1px) 0 0; overflow: hidden; }
.card--bundle .bundle-stack { aspect-ratio: 16 / 10; }
.card--bundle .bundle-stack .cover { width: 34%; top: 14%; }
.card--bundle:hover .bundle-stack .cover { transform: translateX(calc(-50% + (var(--i) - (var(--n) - 1) / 2) * 30%)) rotate(calc((var(--i) - (var(--n) - 1) / 2) * 9deg)); }
.card--bundle:hover .card-cover .cover { box-shadow: var(--cover-shadow); }
.card-kicker { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.8rem; font-weight: 600; color: var(--accent-ink); margin: 0; }
.card-kicker .icon { width: 15px; height: 15px; }
.card--bundle .card-title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; }
.card-excerpt { font-size: 0.875rem; color: var(--muted); margin: 0.15rem 0 0; }
.card-saving { font-size: 0.85rem; font-weight: 600; color: var(--save); margin: 0.25rem 0 0; }

@media (max-width: 639px) {
	.card-foot { flex-direction: column; align-items: stretch; }
	.card-foot .button, .card-foot .added_to_cart { width: 100%; }
	.card-title { font-size: 0.95rem; }
	.card-excerpt { display: none; }
}

/* Guarantees (buy box, cart totals) */
.guarantees { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem 1rem; padding: var(--space-4) 0; margin-bottom: var(--space-4); border-block: 1px solid var(--line); }
.guarantees li { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: var(--ink); }
.guarantees .icon { width: 20px; height: 20px; color: var(--accent-ink); flex: none; }


/* Product badges: discount sticker + labels ------------------------------ */
.product-badges { position: absolute; inset: 0; z-index: 12; pointer-events: none; }
.sale-sticker {
	position: absolute; top: 8px; right: 8px;
	display: grid; place-content: center; width: 58px; height: 58px; border-radius: 50%;
	background: radial-gradient(circle at 30% 25%, var(--sale-2), var(--sale) 70%);
	color: #fff; text-align: center; line-height: 1; transform: rotate(12deg);
	box-shadow: 0 6px 14px -4px rgba(229, 40, 60, 0.55), inset 0 0 0 2px rgba(255, 255, 255, 0.25);
}
.sale-sticker::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; border: 1px dashed rgba(255, 255, 255, 0.55); }
.sale-sticker strong { font-size: 1.1rem; font-weight: 800; letter-spacing: -0.03em; }
.sale-sticker span { font-size: 0.6rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; margin-top: 2px; }
.card:hover .sale-sticker { animation: ne-wiggle 0.5s var(--ease); }
@keyframes ne-wiggle { 30% { transform: rotate(4deg) scale(1.06); } 60% { transform: rotate(16deg); } }

.product-labels { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.product-label {
	display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.28rem 0.6rem 0.28rem 0.55rem;
	border-radius: 6px; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.2;
	box-shadow: 0 3px 8px -3px rgba(20, 33, 61, 0.35); white-space: nowrap;
}
.product-label .icon { width: 12px; height: 12px; stroke-width: 2.4; }
.product-label--featured { background: var(--ink); color: #fff; }
.product-label--featured .icon { color: #ffc24b; fill: #ffc24b; }
.product-label--bestseller { background: #ffc24b; color: var(--ink); }
.product-label--bestseller .icon { fill: var(--ink); }
.product-label--new { background: #12a36d; color: #fff; }
.product-label--custom { background: linear-gradient(100deg, #f7613e, #d63b7a); color: #fff; }

.product-badges--card .sale-sticker { top: auto; bottom: 8px; right: 8px; }
.product-badges--card .product-labels { max-width: calc(100% - 20px); }
.product-badges--card .product-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.card--bundle .sale-sticker { width: 64px; height: 64px; bottom: 12px; right: 12px; }
@media (max-width: 639px) {
	.sale-sticker { width: 50px; height: 50px; }
	.sale-sticker strong { font-size: 0.95rem; }
	.sale-sticker span { font-size: 0.55rem; }
	.product-label { font-size: 0.62rem; padding: 0.24rem 0.45rem; }
	.card--bundle .sale-sticker { width: 54px; height: 54px; }
}

/* Formats sprite ---------------------------------------------------------- */
.formats { display: flex; flex-wrap: wrap; gap: var(--space-3); list-style: none; padding: 0; margin: 0; }
.format { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.85rem; color: var(--muted); }
.format-icon {
	width: 28px; height: 28px; flex: none; border-radius: 6px;
	background: url("../images/formats-sprite.png") no-repeat;
	background-size: 600% 100%;
	background-position: calc(var(--i) * 20%) 0;
}
.formats--compact .format-icon { width: 22px; height: 22px; }
.formats--large { gap: var(--space-5); }
.formats--large .format { flex-direction: column; gap: 0.6rem; font-weight: 500; color: var(--ink); }
.formats--large .format-icon { width: 56px; height: 56px; border-radius: 12px; }

/* Notices ------------------------------------------------------------------ */
.woocommerce-notices-wrapper:empty { display: none; }
.woocommerce-message, .woocommerce-info, .woocommerce-error, .wc-block-components-notice-banner {
	display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem;
	padding: 0.9rem 1.1rem; margin: 0 0 var(--space-5); list-style: none;
	border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
	border-left: 4px solid var(--ink); font-size: 0.95rem;
}
.woocommerce-message { border-left-color: var(--save); background: var(--save-bg); border-color: #c7e6d4; }
.woocommerce-error { border-left-color: var(--danger); background: var(--danger-bg); border-color: #f5c6c0; flex-direction: column; align-items: flex-start; }
.woocommerce-error li { margin: 0; }
.woocommerce-info { border-left-color: var(--accent); background: var(--warn-bg); border-color: #f4e2b5; }
.woocommerce-message .button, .woocommerce-info .button { order: 2; min-height: 36px; padding: 0.35rem 0.9rem; font-size: 0.85rem; }
.woocommerce-message a:not(.button), .woocommerce-info a:not(.button), .woocommerce-error a { font-weight: 600; }

/* Empty states ------------------------------------------------------------- */
.empty-state { max-width: 560px; margin: var(--space-6) auto; text-align: center; padding: var(--space-7) var(--space-5); }
.empty-state h1, .empty-state h2 { font-size: var(--step-3); }
.empty-state p { color: var(--muted); }
.empty-state .search-form { max-width: 460px; margin: var(--space-5) auto; }
.empty-state--compact { padding: var(--space-6); background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); margin: var(--space-5) 0; }
.empty-icon { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); margin-bottom: var(--space-4); }
.empty-icon .icon { width: 32px; height: 32px; }
.empty-actions { display: flex; justify-content: center; gap: 0.5rem; flex-wrap: wrap; }
.big-404 { font-family: var(--font-display); font-size: clamp(5rem, 3rem + 10vw, 9rem); line-height: 1; font-weight: 700; color: var(--accent); margin: 0 0 var(--space-3); }

/* Page & post content ----------------------------------------------------- */
.page-header { margin-bottom: var(--space-6); }
.page-title { font-size: var(--step-4); margin: 0; }
.wc-page .page-title { font-size: var(--step-3); }
.page-thumb { margin: 0 0 var(--space-6); border-radius: var(--radius); overflow: hidden; }
.entry-content { font-size: 1.0625rem; }
.entry-content > * { margin-block: 0 1.15em; }
.entry-content > h2 { font-size: var(--step-2); margin-top: 1.8em; }
.entry-content > h3 { font-size: var(--step-1); margin-top: 1.5em; }
.entry-content img { border-radius: var(--radius-sm); }
.entry-content blockquote { border-left: 3px solid var(--accent); padding-left: 1.2rem; font-family: var(--font-display); font-size: 1.2rem; color: var(--ink); }
.entry-content ul:not([class]), .entry-content ol:not([class]) { padding-left: 1.3rem; }
.entry-content table { font-size: 0.95rem; }
.entry-content th, .entry-content td { border-bottom: 1px solid var(--line); padding: 0.6rem; text-align: left; }
.post-meta { color: var(--muted); font-size: var(--step--1); }
.post-meta a { color: inherit; }
.alignwide { max-width: 1100px; }
.alignfull { width: 100vw; margin-left: calc(50% - 50vw); }

.archive-header { margin-bottom: var(--space-6); }
.archive-title { margin-bottom: var(--space-2); }
.archive-description { color: var(--muted); max-width: 70ch; }
.archive-description p:last-child { margin: 0; }
.archive-search { max-width: 560px; margin-top: var(--space-4); }

.content-area { display: grid; gap: var(--space-7); }
@media (min-width: 960px) { .has-sidebar .content-area { grid-template-columns: minmax(0, 1fr) 300px; } }
.post-grid { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.post-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.post-card-thumb img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.post-card-body { padding: var(--space-5); }
.post-card-title { font-size: var(--step-1); }
.post-card-title a { text-decoration: none; }
.post-card-excerpt { color: var(--muted); font-size: 0.95rem; margin: 0; }
.widget { margin-bottom: var(--space-6); }
.widget-title { font-size: var(--step-1); }
.post-navigation { margin-top: var(--space-7); }
.post-navigation .nav-links { display: grid; gap: var(--space-4); grid-template-columns: 1fr 1fr; }
.post-navigation a { display: block; padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; background: var(--surface); font-weight: 600; }
.post-navigation .nav-next { text-align: right; }
.nav-label { display: block; font-size: var(--step--1); color: var(--muted); font-weight: 500; }
.comments-area { margin-top: var(--space-7); }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: var(--space-5); }
.comment-body { padding: var(--space-4) 0; border-bottom: 1px solid var(--line); }
.comment-author .avatar { float: left; margin-right: 0.75rem; border-radius: 50%; }
.comment-metadata { font-size: var(--step--1); }
.comment-metadata a { color: var(--muted); }

/* Footer ------------------------------------------------------------------ */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, 0.78); margin-top: var(--space-8); font-size: 0.95rem; }
.site-footer a { color: rgba(255, 255, 255, 0.85); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; gap: var(--space-6); padding-block: var(--space-8) var(--space-7); grid-template-columns: 1fr; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.3fr; } }
.site-footer .brand-name-1 { color: #fff; }
.site-footer .brand-name-2 { background: linear-gradient(100deg, #ffb547, #ff7a59 60%, #ff6fa8); -webkit-background-clip: text; background-clip: text; }
.footer-tagline { margin: var(--space-4) 0; max-width: 36ch; }
.footer-contact { display: flex; align-items: center; gap: 0.5rem; }
.footer-contact .icon { width: 18px; height: 18px; }
.footer-title { font-family: var(--font-sans); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: #fff; margin-bottom: var(--space-4); font-weight: 600; }
.footer-menu li { margin-bottom: 0.55rem; }
.trust-list li { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem; }
.trust-list .icon { width: 18px; height: 18px; color: var(--accent); flex: none; }
.pay-methods { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: var(--space-4); }
.pay-methods span { padding: 0.2rem 0.55rem; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 6px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em; color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); font-size: var(--step--1); }
.footer-bottom-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-3); padding-block: var(--space-5); }
.footer-bottom p { margin: 0; }
.legal-menu { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.site-footer .widget { margin-bottom: var(--space-4); }
.site-footer .widget-title { color: #fff; font-size: 1rem; }
