/*
Theme Name: Custom Covers
Theme URI: https://www.customcoversinc.com
Author: Custom Covers Inc
Description: Bold, fast WooCommerce theme for Custom Covers Inc. Brand colors #dd001a and #1f242e. Calculates shipping weight and box size from the options a customer picks (Extra Product Options, migrated X-Cart options, variations), and sharpens resized product images.
Version: 2.1.34
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
WC requires at least: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: customcovers
Tags: e-commerce, woocommerce, custom-logo, custom-menu, two-columns
*/

:root {
	--cc-red: #dd001a;
	--cc-red-dark: #b30015;
	--cc-ink: #1f242e;
	--cc-ink-2: #2c3340;
	--cc-text: #1f242e;
	--cc-muted: #5b6372;
	--cc-line: #e2e5ea;
	--cc-soft: #f4f5f7;
	--cc-white: #fff;
	--cc-radius: 6px;
	--cc-shadow: 0 1px 2px rgba(31, 36, 46, .06), 0 6px 18px rgba(31, 36, 46, .06);
	--cc-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--cc-wrap: 1240px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font: 16px/1.6 var(--cc-font);
	color: var(--cc-text);
	background: var(--cc-white);
	-webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; }
/* Never stretch an image beyond its real pixels (stretching = blur). */
img { image-rendering: auto; }
a { color: var(--cc-red); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover, a:focus { color: var(--cc-red-dark); }
:focus-visible { outline: 3px solid var(--cc-red); outline-offset: 2px; }
h1, h2, h3, h4 { color: var(--cc-ink); line-height: 1.25; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.4rem); }
h2 { font-size: clamp(1.35rem, 1.1rem + .9vw, 1.8rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--cc-line); margin: 2rem 0; }
table { border-collapse: collapse; width: 100%; }
th, td { border-bottom: 1px solid var(--cc-line); padding: .6em .5em; text-align: left; }

.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;
}
.screen-reader-text:focus, .skip-link:focus {
	clip: auto !important; clip-path: none; height: auto; width: auto; margin: 0;
	background: var(--cc-white); color: var(--cc-ink); padding: 12px 18px; z-index: 100000; top: 8px; left: 8px;
	box-shadow: var(--cc-shadow);
}

.container { width: 100%; max-width: var(--cc-wrap); margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 820px; }
.site-main { padding: 32px 0 56px; }

/* ---------- Buttons & forms ---------- */
.button, button, input[type="submit"], input[type="button"] {
	display: inline-flex; align-items: center; justify-content: center; gap: .4em;
	background: var(--cc-red); color: var(--cc-white); border: 0; border-radius: var(--cc-radius);
	padding: .75em 1.4em; font: 600 1rem/1.2 var(--cc-font); cursor: pointer; text-decoration: none;
	transition: background-color .15s ease;
}
.button:hover, button:hover, input[type="submit"]:hover { background: var(--cc-red-dark); color: var(--cc-white); }
.button.alt-dark { background: var(--cc-ink); }
.button.alt-dark:hover { background: var(--cc-ink-2); }

input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="password"],
input[type="search"], input[type="number"], select, textarea {
	width: 100%; max-width: 100%; padding: .65em .8em; font: 1rem/1.4 var(--cc-font); color: var(--cc-text);
	background: var(--cc-white); border: 1px solid #c9ced6; border-radius: var(--cc-radius);
}
input:focus, select:focus, textarea:focus { border-color: var(--cc-red); outline: 0; box-shadow: 0 0 0 3px rgba(221, 0, 26, .15); }
label { font-weight: 600; }

.search-form { display: flex; gap: 8px; max-width: 520px; }

/* ---------- Content ---------- */
.page-header { margin-bottom: 24px; }
.page-title { margin-bottom: .3em; }
.entry-meta { color: var(--cc-muted); font-size: .9rem; }
.entry-content > * + * { margin-top: 0; }
.entry-content img { border-radius: var(--cc-radius); }
.entry-media { margin: 0 0 24px; }
.post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.card { border: 1px solid var(--cc-line); border-radius: var(--cc-radius); overflow: hidden; background: var(--cc-white); box-shadow: var(--cc-shadow); }
.card-media img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card-body { padding: 18px; }
.card .entry-title { font-size: 1.15rem; }
.card .entry-title a { color: var(--cc-ink); text-decoration: none; }
.card .entry-title a:hover { color: var(--cc-red); }
.pagination, .nav-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.page-numbers { padding: 6px 12px; border: 1px solid var(--cc-line); border-radius: var(--cc-radius); text-decoration: none; color: var(--cc-ink); }
.page-numbers.current, .page-numbers:hover { background: var(--cc-red); border-color: var(--cc-red); color: var(--cc-white); }
.notfound { text-align: center; }
.notfound .search-form { margin: 24px auto; }

.alignwide { max-width: calc(var(--cc-wrap) - 40px); }
.alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }
.wp-block-button__link { background: var(--cc-red); color: var(--cc-white); border-radius: var(--cc-radius); }
.wp-block-button__link:hover { background: var(--cc-red-dark); color: var(--cc-white); }
.has-text-align-center { text-align: center; }
.wp-caption, .wp-block-image figcaption { color: var(--cc-muted); font-size: .875rem; }

/* ---------- Widgets ---------- */
.widget { margin-bottom: 28px; }
.widget-title { font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; border-bottom: 2px solid var(--cc-red); padding-bottom: 8px; margin-bottom: 12px; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 5px 0; }
.widget li a { color: var(--cc-ink); text-decoration: none; }
.widget li a:hover { color: var(--cc-red); }
.widget .children { padding-left: 14px; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Estimate Request form */
.cce{max-width:860px}
.cce fieldset{border:1px solid #e3e5e8;border-radius:6px;padding:18px 20px 6px;margin:0 0 22px}
.cce legend{font-weight:700;color:#1f242e;padding:0 6px}
.cce-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 20px}
.cce-wide{grid-column:1/-1}
.cce-field{margin:0 0 14px}
.cce-field label{display:block;font-weight:600;margin-bottom:4px;color:#1f242e}
.cce .req{color:#dd001a;margin-left:2px}
.cce input[type=text],.cce input[type=email],.cce input[type=tel],.cce select,.cce textarea{width:100%;padding:10px 12px;border:1px solid #c9ccd1;border-radius:4px;font:inherit;background:#fff;box-sizing:border-box}
.cce input:focus,.cce select:focus,.cce textarea:focus{outline:2px solid #dd001a;outline-offset:1px;border-color:#dd001a}
.cce [aria-invalid=true]{border-color:#dd001a;background:#fff5f6}
.cce-topics{display:grid;grid-template-columns:1fr 1fr;gap:8px 20px;margin-bottom:12px}
.cce-check{display:flex;gap:8px;align-items:center;cursor:pointer}
.cce-help{display:block;font-size:.88em;color:#5b6270;margin-top:4px}
.cce-submit{background:#dd001a;color:#fff;border:0;padding:14px 28px;font-size:1.05em;font-weight:700;border-radius:4px;cursor:pointer}
.cce-submit:hover{background:#b30015}
.cce-submit[disabled]{opacity:.6;cursor:wait}
.cce-notice{padding:14px 18px;border-radius:6px;margin:0 0 20px}
.cce-ok{background:#ecf8ee;border:1px solid #6cc07a}
.cce-err{background:#fff5f6;border:1px solid #dd001a}
.cce-err ul{margin:6px 0 0 18px}
.cce-hp{position:absolute!important;left:-9999px;width:1px;height:1px;overflow:hidden}
/* Estimate sent: thank-you panel */
.cce-thanks{max-width:680px;margin:10px auto 30px;padding:36px 32px 28px;text-align:center;background:#fff;border:1px solid #e3e5e8;border-top:6px solid #1a8f3c;border-radius:12px;box-shadow:0 24px 50px -30px rgba(20,24,33,.45);outline:none}
.cce-thanks__icon{display:inline-flex;align-items:center;justify-content:center;width:68px;height:68px;border-radius:50%;background:#1a8f3c;color:#fff;margin-bottom:14px}
.cce-thanks__title{margin:0 0 10px;font-size:2rem;color:#1f242e}
.cce-thanks p{margin:0 0 10px;line-height:1.55;color:#3d4452}
.cce-thanks__lead{font-size:1.1rem}
.cce-thanks a[href^="tel:"]{color:#dd001a;font-weight:700;white-space:nowrap}
.cce-thanks__actions{margin-top:20px!important;display:flex;flex-wrap:wrap;gap:12px;justify-content:center}
.cce-thanks__actions .button{background:#dd001a;color:#fff;border:0;padding:12px 22px;border-radius:6px;font-weight:700;text-decoration:none}
.cce-thanks__actions .button.cce-thanks__alt{background:#fff;color:#1f242e;border:2px solid #1f242e}
.cce-thanks__again{font-size:.9rem;margin-top:14px!important}
.cce-thanks__again a{color:#5b6270}
@media (max-width:640px){.cce-grid,.cce-topics{grid-template-columns:1fr}}

/* Sloped covers lead-time popup */
.cct-lt{position:fixed;inset:0;z-index:100000;background:rgba(31,36,46,.72);display:flex;align-items:center;justify-content:center;padding:16px}
.cct-lt[hidden]{display:none}
html.cct-lt-open{overflow:hidden}
.cct-lt-box{background:#fff;max-width:520px;width:100%;border-radius:8px;border-top:6px solid #dd001a;padding:26px 28px 20px;box-shadow:0 20px 50px rgba(0,0,0,.35);color:#1f242e}
.cct-lt-box h2{margin:0 0 12px;font-size:1.4em;color:#1f242e}
.cct-lt-box p{margin:0 0 14px;line-height:1.5}
.cct-lt-check{display:flex;gap:10px;align-items:flex-start;background:#f6f7f8;border:1px solid #e3e5e8;border-radius:6px;padding:12px 14px;margin:0 0 16px;cursor:pointer;font-weight:600}
.cct-lt-check input{width:20px;height:20px;margin-top:2px;flex:none;accent-color:#dd001a}
.cct-lt-actions{display:flex;flex-wrap:wrap;gap:12px 18px;align-items:center;margin-bottom:10px}
.cct-lt-ok{background:#dd001a!important;color:#fff!important;border:0;padding:12px 22px;font-weight:700;border-radius:4px;cursor:pointer}
.cct-lt-ok[disabled]{opacity:.45;cursor:not-allowed}
.cct-lt-back{color:#1f242e;text-decoration:underline}
.cct-lt-call{font-size:.9em;color:#5b6270;margin:0!important}
