/*
Theme Name: Liberty Books
Description: Recreates the look of the site's former Simplicity 1.12.0 theme by WooThemes (Simplicity itself was infected and is discontinued), and shows the books as a read-only catalogue without WooCommerce. Sidebar IDs, menu locations and widget IDs match Simplicity, so existing widgets and menus keep working.
Version: 1.0.0
Requires PHP: 8.1
Text Domain: libertybooks
License: GPL-2.0-or-later
*/

/* Marck Script (menu) and PT Sans (headings), self-hosted; licences in fonts/ */
@font-face {
	font-family: "Marck Script"; font-style: normal; font-weight: 400; font-display: swap;
	src: url("fonts/marck-script-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "Marck Script"; font-style: normal; font-weight: 400; font-display: swap;
	src: url("fonts/marck-script-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "PT Sans"; font-style: normal; font-weight: 400; font-display: swap;
	src: url("fonts/pt-sans-400-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "PT Sans"; font-style: normal; font-weight: 400; font-display: swap;
	src: url("fonts/pt-sans-400-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "PT Sans"; font-style: normal; font-weight: 700; font-display: swap;
	src: url("fonts/pt-sans-700-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "PT Sans"; font-style: normal; font-weight: 700; font-display: swap;
	src: url("fonts/pt-sans-700-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
	--text: #555;
	--title: #293f4c;
	--link: #3585b3;
	--link-hover: #293f4c;
	--nav: #201761;
	--band: #e5ebf0;
	--band-top: #dce4eb;
	--band-bottom: #d4dce2;
	--header: #eff3f7;
	--box: #edf1f4;
	--box-border: #d6dee5;
	--rule: #e6e6e6;
	--night: #0a131b;
	--night-widgets: #0d1720;
	--night-rule: #263848;
	--night-title: #b4cfe5;
	--font: Verdana, Geneva, sans-serif;
	--heading: "PT Sans", Arial, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--night); font: 12px/1.5em var(--font); color: var(--text); }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 .5em; font-family: var(--heading); font-weight: normal; line-height: 1.1em; color: #222; }
h1 { font-size: 2em; } h2 { font-size: 1.8em; } h3 { font-size: 1.6em; }
h4 { font-size: 1.2em; } h5 { font-size: 1em; } h6 { font-size: .8em; }
p { margin: 0 0 1.2em; }
img { max-width: 100%; height: auto; }
hr { border: 0; height: 1px; background: var(--rule); margin: 0 0 20px; }
input, textarea, select {
	font: inherit; padding: 5px; color: #777; border: 1px solid; border-color: #ccc #efefef #efefef #ccc; border-radius: 3px;
}
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
	overflow: hidden; clip-path: inset(50%); border: 0; white-space: nowrap;
}
.skip-link:focus { position: fixed !important; top: 5px; left: 5px; z-index: 1000; width: auto; height: auto; clip-path: none; padding: 8px 12px; background: #fff; }
.col-full { max-width: 960px; margin: 0 auto; }
#wrapper { background: #fff; }

/* ---------- Top bar (optional menu) ---------- */
#top { background: var(--night); }
#top ul.nav { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
#top ul.nav a { display: block; padding: 8px 10px; color: #ddd; }
#top ul.nav a:hover, #top ul.nav .current-menu-item > a { background: #222; text-decoration: none; }

/* ---------- Header ---------- */
#header-container { background: var(--header); border-bottom: 1px solid #d0d8de; position: relative; z-index: 10; }
#header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 20px; padding-top: 30px; padding-bottom: 20px; }
#logo img { display: block; }
#logo .site-name { font: 40px/1 Georgia, serif; color: #222; }

#navigation { margin-left: auto; }
#navigation ul.nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 10px; margin: 0; padding: 0; list-style: none; }
#navigation ul.nav li { position: relative; }
#navigation ul.nav a {
	display: block; padding: 6px 12px; border: 1px solid transparent; border-radius: 4px;
	font: 24px/30px "Marck Script", cursive; color: var(--nav); text-shadow: 0 1px 0 #fff;
}
#navigation ul.nav a:hover,
#navigation ul.nav .current-menu-item > a,
#navigation ul.nav .current-menu-ancestor > a,
#navigation ul.nav .current_page_parent > a {
	text-decoration: none; border-color: rgba(0, 0, 0, .15);
	background: linear-gradient(#fff, #f5f5f5); box-shadow: 0 1px 1px rgba(0, 0, 0, .03);
}
/* Drop-down menus */
#navigation ul.nav ul {
	position: absolute; left: -999em; top: 100%; z-index: 100; width: 200px; margin: 5px 0 0; padding: 4px 0; list-style: none;
	background: #fff; border: 1px solid #e3e3e3; border-radius: 4px; box-shadow: 0 5px 20px rgba(0, 0, 0, .2);
}
#navigation ul.nav li:hover > ul, #navigation ul.nav li:focus-within > ul { left: 0; }
#navigation ul.nav ul a { font-size: 20px; line-height: 24px; border-radius: 3px; }
#navigation ul.nav ul a:hover { background: #f3f3f3; }

/* ---------- Homepage slider ---------- */
#slides { background: var(--band); border-top: 3px solid var(--band-top); border-bottom: 1px solid var(--band-bottom); padding: 30px 0 15px; }
.slides_container { display: grid; }
.slide { grid-area: 1 / 1; }
.slide img { display: block; width: 100%; aspect-ratio: 960 / 323; object-fit: cover; box-shadow: 0 12px 14px -12px rgba(0, 0, 0, .45); }
.is-animated .slide { opacity: 0; transition: opacity 1.2s ease; }
.is-animated .slide.is-current { opacity: 1; }
#slide-box:not(.is-animated) .slide:not(.is-current) { display: none; }
#slides .pagination { display: flex; justify-content: center; gap: 4px; margin: 15px 0 0; padding: 0; list-style: none; }
#slides .pagination[hidden] { display: none; }
#slides .pagination button {
	width: 14px; height: 14px; padding: 0; cursor: pointer; border-radius: 50%;
	border: 1px solid #b3bcc4; background: radial-gradient(circle at 50% 35%, #fff, #d5dce2);
}
#slides .pagination button[aria-current] { background: radial-gradient(circle at 50% 35%, #8a96a0, #5b6670); border-color: #5b6670; }

/* ---------- Page title band ---------- */
#title-container { background: var(--band); border-top: 3px solid var(--band-top); border-bottom: 1px solid var(--band-bottom); padding: 30px 0 31px; }
#title-container h1.title { margin: 0; font: 33px/1.2em var(--heading); color: var(--title); }

/* ---------- Content and sidebar ---------- */
#content { padding: 20px 0; min-height: 300px; }
.home #content { padding: 30px 0; }
#content > .col-full { display: flex; align-items: flex-start; gap: 27px; }
#main { flex: 1 1 633px; min-width: 0; }
#sidebar { flex: 0 0 300px; min-width: 0; }

.post, .page, .product-single { margin: 0 0 2em; }
.post .title, .page .title { font: 22px/1.1em var(--heading); color: var(--title); margin: 0 0 15px; }
.post .title a { color: var(--title); }
.post-meta { margin: 1em 0 1.5em; font: 10px/1.2em var(--font); color: #999; }
.post-meta a { color: #888; }
.post-more { clear: both; margin: 0 0 1em; color: #999; }
.post-more a { color: #888; }
.home .post { border-bottom: 1px dotted #bfc5ca; padding-bottom: 10px; }
.tags a { display: inline-block; margin: 0 0 5px; padding: 3px 12px; border: 1px solid #dce1e5; border-radius: 10px; background: #eee; line-height: 1em; color: #888; }

.entry { margin-bottom: 1.5em; font: 13px/1.5em var(--font); color: var(--text); }
.entry h1, .entry h2, .entry h3, .entry h4, .entry h5, .entry h6 { margin: 0 0 .5em; line-height: 1.5em; }
.entry ul, .entry ol { margin: 0 0 1.5em; padding: 0 0 0 30px; }
.entry blockquote { position: relative; margin: 0 0 1.2em; padding: 10px 20px 10px 50px; color: #444; }
.entry blockquote::before { content: "\201C"; position: absolute; left: 0; top: -4px; font: bold 64px/1 Georgia, serif; color: #ccc; }
.entry img { padding: 2px; border: 1px solid #ddd; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); margin-bottom: 10px; }
.entry img:hover { border-color: #aaa; }
.alignleft { float: left; margin: 0 20px 10px 0; }
.alignright { float: right; margin: 0 0 10px 20px; }
.aligncenter, img.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.entry .wp-caption { max-width: 100%; padding: 1px; text-align: center; background: #f8f8f8; border: 1px solid #ddd; }
.entry .wp-caption img { margin: 0; padding: 4px 0; border: 0; box-shadow: none; }
.entry table { width: 100%; border-collapse: collapse; margin-bottom: 1.2em; }
.entry th, .entry td { padding: 6px 10px 3px; border: 1px solid var(--rule); }
.entry th { background: #eee; }
.pdf-embed { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 1 / 1.414; border: 1px solid #ddd; }

.post-entries, .woo-pagination { display: flex; justify-content: space-between; gap: 10px; padding: 10px 15px; }
.woo-pagination .nav-links { display: flex; gap: 4px; margin: 0 auto; }
.woo-pagination .page-numbers { padding: 3px 7px; border: 1px solid #dedede; border-radius: 4px; background: linear-gradient(#fff, #f5f5f5); color: #666; }
.woo-pagination .page-numbers.current { background: #eee; border-color: #bbb; }

.button, button.button, input[type="submit"], #commentform #submit {
	display: inline-block; padding: 4px 13px; cursor: pointer; border: 1px solid #2a6f96; border-radius: 3px;
	background: linear-gradient(#4a9bc9, #3585b3); color: #fff; font: 12px/18px var(--font); text-shadow: 0 -1px 0 rgba(0, 0, 0, .25);
}
.button:hover, button.button:hover, input[type="submit"]:hover { color: #fff; text-decoration: none; opacity: .85; }

/* ---------- Book catalogue ---------- */
ul.products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 20px; margin: 0 0 2em; padding: 0; list-style: none; }
.product-card { display: flex; flex-direction: column; align-items: center; text-align: center; margin: 0; }
.product-card > a:first-child { display: block; width: 100%; color: #222; }
.product-card > a:first-child:hover { text-decoration: none; }
.product-card .cover { display: block; padding: 6px; border: 1px solid var(--rule); border-radius: 3px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .1); }
.product-card .cover img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; }
.product-card h3 { margin: 10px 0 4px; font: 20px/1.2em var(--heading); color: #222; }
.product-card > a:first-child:hover h3 { color: var(--link); }
.product-card .price { color: var(--link); font-size: 12px; }
.product-card .button { margin-top: 8px; }
.stock.out-of-stock { color: #b0413e; font-weight: bold; }
.product-card .stock { font-size: 11px; }

.product-top { display: flex; gap: 25px; margin-bottom: 2em; }
.product-top .images { flex: 0 0 42%; }
.product-top .images > a img { display: block; padding: 6px; border: 1px solid var(--rule); background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .1); }
.product-top .thumbnails { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.product-top .thumbnails img { display: block; width: 70px; height: 70px; object-fit: cover; border: 1px solid var(--rule); }
.product-top .summary { flex: 1; min-width: 0; }
.product-title { padding-bottom: 10px; border-bottom: 1px solid var(--rule); font: 22px/1.1em var(--heading); color: #555; }
.product-top .price { padding: 8px 0; border-bottom: 1px solid var(--rule); font-weight: bold; color: #333; }
.product-top .summary .entry { font-size: 12px; }
.product-top .downloads { margin: 0 0 1.2em; padding: 0; list-style: none; }
.product_meta { padding-top: 8px; border-top: 1px solid var(--rule); font-size: 11px; color: #777; }
.product_meta > span { display: block; }
.product-description { border: 1px solid var(--box-border); border-radius: 3px; }
.product-description h2 { margin: 0; padding: 14px 25px; background: var(--band); font-size: 22px; color: #222; }
.product-description .entry { margin: 0; padding: 15px; }

/* ---------- Widgets ---------- */
.widget { margin-bottom: 2em; }
.widget h3 { margin: 0 0 .7em; padding: 0 0 10px; font: 22px/1em var(--heading); color: #555; border-bottom: 1px solid var(--rule); }
.widget ul { margin: 0; padding-left: 16px; list-style: none; }
.widget ul li { position: relative; }
.widget ul li::before { content: ""; position: absolute; left: -14px; top: 8px; border: 4px solid transparent; border-left-color: #999; }
.widget ul li a { line-height: 22px; }
.search_main { padding: 10px; background: var(--box); border: 1px solid var(--box-border); border-radius: 4px; }
.searchform { display: flex; align-items: center; background: #fff; border: 1px solid; border-color: #ccc #efefef #efefef #ccc; border-radius: 4px; }
.searchform input.s { flex: 1; min-width: 0; padding: 8px; border: 0; background: none; color: #777; }
.searchform button { display: flex; padding: 6px 10px; border: 0; background: none; color: #aaa; cursor: pointer; }
.searchform button svg { width: 16px; height: 16px; }
.searchform button:hover { color: #555; }
.entry .searchform { max-width: 400px; }

/* ---------- Footer ---------- */
#footer-widgets-container { background: var(--night-widgets); }
#footer-widgets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 20px; padding-top: 10px; padding-bottom: 10px; }
#footer-widgets .block { padding: 20px 10px 0; }
#footer-widgets .widget h3 { color: var(--night-title); border-bottom: 1px dotted var(--night-rule); }
#footer-widgets, #footer-widgets p { color: #fff; }
#footer-widgets .tagcloud a { line-height: 1.2; }
#footer-container { background: var(--night); }
#footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-top: 20px; padding-bottom: 30px; color: #fff; }

/* ---------- Comments ---------- */
#comments { margin-top: 2em; }
.commentlist { margin: 0 0 2em; padding: 0; list-style: none; }
.commentlist li { margin: 0 0 1em; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.commentlist .avatar { float: left; margin: 0 10px 5px 0; }
#commentform p { margin: 0 0 1em; }
#commentform label { display: block; }
#commentform input:not([type="submit"]):not([type="checkbox"]), #commentform textarea { width: 100%; max-width: 450px; }
#commentform textarea { max-width: 100%; }

/* ---------- Narrow screens (Simplicity was fixed at 960px) ---------- */
@media (max-width: 1000px) {
	.col-full { padding-left: 16px; padding-right: 16px; }
	#footer-widgets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
	#content > .col-full { flex-direction: column; align-items: stretch; }
	#sidebar { flex-basis: auto; }
	ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.product-top { flex-direction: column; }
	#navigation { margin-left: 0; }
	#navigation ul.nav { justify-content: flex-start; }
	#title-container h1.title { font-size: 26px; }
}
@media (max-width: 480px) {
	#footer-widgets { grid-template-columns: minmax(0, 1fr); }
	ul.products { grid-template-columns: minmax(0, 1fr); }
	#navigation ul.nav a { font-size: 21px; padding: 4px 8px; }
}
