/*
Theme Name: MYH Books
Theme URI: https://myhbooks.com
Author: MYH Books
Description: A lightweight WooCommerce theme for printed books, printable pages, and bundles.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 7.4
Text Domain: myh-books
*/

:root {
  --myh-navy: #0b132b;
  --myh-navy-soft: #131d3a;
  --myh-gold: #d4b35f;
  --myh-gold-dark: #a88636;
  --myh-cream: #faf8f4;
  --myh-white: #ffffff;
  --myh-ink: #151929;
  --myh-muted: #6d7180;
  --myh-purple: #7657d6;
  --myh-green: #4b8b69;
  --myh-border: #e9e4dc;
  --myh-shadow: 0 18px 50px rgba(10, 18, 43, 0.1);
  --myh-radius: 18px;
  --myh-serif: Georgia, "Times New Roman", serif;
  --myh-sans: Inter, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--myh-cream);
  color: var(--myh-ink);
  font-family: var(--myh-sans);
  line-height: 1.6;
}
body.admin-bar .site-header { top: 32px; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; }
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px; width: 1px; overflow: hidden;
  position: absolute !important; white-space: nowrap;
}
.screen-reader-text:focus {
  clip: auto !important; clip-path: none;
  height: auto; width: auto; overflow: visible;
  left: 12px; top: 12px; z-index: 100000;
  padding: 12px 16px; background: #fff; color: #000;
}
.myh-container { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.myh-section { padding: 88px 0; }
.myh-section-heading { max-width: 680px; margin: 0 auto 42px; text-align: center; }
.myh-section-heading h2 {
  margin: 0 0 12px; font: 700 clamp(2rem, 4vw, 3rem)/1.1 var(--myh-serif);
}
.myh-section-heading p { margin: 0; color: var(--myh-muted); }

.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(11, 19, 43, 0.97);
  color: #fff; border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(14px);
}
.header-inner {
  min-height: 76px; display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 28px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; width: fit-content; }
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: 9px; color: var(--myh-navy); background: var(--myh-gold);
  font: 700 20px/1 var(--myh-serif);
}
.brand-copy strong { display: block; font: 700 21px/1 var(--myh-serif); }
.brand-copy small { color: var(--myh-gold); font-size: 10px; letter-spacing: .04em; }
.custom-logo { max-height: 48px; width: auto; }
.primary-nav { display: flex; align-items: center; gap: 30px; font-size: 14px; }
.primary-nav a { color: rgba(255,255,255,.86); transition: .2s ease; }
.primary-nav a:hover, .primary-nav a:focus { color: var(--myh-gold); }
.header-tools { justify-self: end; display: flex; align-items: center; gap: 9px; }
.tool-link, .menu-toggle {
  min-width: 38px; height: 38px; display: inline-grid; place-items: center;
  border: 1px solid transparent; border-radius: 50%;
  color: var(--myh-gold); background: transparent; cursor: pointer;
}
.tool-link:hover, .tool-link:focus, .menu-toggle:hover { border-color: rgba(212,179,95,.45); }
.currency-label { font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.cart-link { position: relative; }
.cart-count {
  position: absolute; right: -2px; top: -4px; min-width: 17px; height: 17px;
  display: grid; place-items: center; padding: 0 4px; border-radius: 99px;
  background: var(--myh-gold); color: var(--myh-navy); font-size: 10px; font-weight: 800;
}
.menu-toggle { display: none; font-size: 23px; }

.hero {
  position: relative; min-height: 610px; display: grid; align-items: center;
  overflow: hidden; color: #fff; background: var(--myh-navy);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: url("assets/images/hero-library.svg") center/cover no-repeat;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(7,13,31,.96) 0%, rgba(10,17,40,.78) 48%, rgba(8,14,33,.28) 100%);
}
.hero-inner { position: relative; z-index: 1; padding: 96px 0; }
.hero-copy { max-width: 650px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  color: var(--myh-gold); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
}
.hero h1 { margin: 0 0 22px; font: 700 clamp(3rem, 6vw, 5.6rem)/.98 var(--myh-serif); letter-spacing: -.035em; }
.hero p { max-width: 580px; margin: 0 0 34px; color: rgba(255,255,255,.82); font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.myh-button, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 24px; border: 1px solid var(--myh-gold);
  border-radius: 8px; background: var(--myh-gold); color: var(--myh-navy);
  font-weight: 800; transition: transform .2s ease, background .2s ease;
}
.myh-button:hover, .woocommerce a.button:hover, .woocommerce button.button:hover {
  transform: translateY(-2px); background: #e0c474;
}
.myh-button-outline { background: transparent; color: var(--myh-gold); }

.collection { background: var(--myh-cream); }
.placeholder-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.placeholder-card {
  overflow: hidden; border: 1px solid var(--myh-border); border-radius: var(--myh-radius);
  background: #fff; box-shadow: 0 12px 36px rgba(20,24,40,.06);
}
.placeholder-art {
  position: relative; min-height: 245px; overflow: hidden;
  background: linear-gradient(135deg, #e8d1a8, #996f4a);
}
.placeholder-art::before, .placeholder-art::after {
  content: ""; position: absolute; border-radius: 5px; transform: rotate(-8deg);
  box-shadow: 0 18px 30px rgba(0,0,0,.22);
}
.placeholder-art::before { width: 160px; height: 210px; left: 25%; top: 32px; background: #202d52; }
.placeholder-art::after { width: 145px; height: 196px; left: 37%; top: 54px; background: #d8b15b; }
.placeholder-art.printable { background: linear-gradient(135deg, #e7e2ec, #9477ba); }
.placeholder-art.bundle { background: linear-gradient(135deg, #d9e6dd, #62846f); }
.placeholder-body { padding: 23px; }
.product-kind { margin-bottom: 8px; color: var(--myh-gold-dark); font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.product-kind.digital { color: var(--myh-purple); }
.product-kind.bundle { color: var(--myh-green); }
.placeholder-body h3 { margin: 0 0 5px; font-size: 19px; }
.placeholder-body p { min-height: 48px; margin: 0 0 19px; color: var(--myh-muted); font-size: 14px; }
.card-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.catalog-note {
  display: inline-flex; padding: 8px 10px; border-radius: 99px;
  background: #f4f1eb; color: var(--myh-muted); font-size: 11px; font-weight: 800;
}
.small-button { min-height: 42px; padding-inline: 17px; color: #fff; background: var(--myh-navy); border-color: var(--myh-navy); }

.process { background: var(--myh-navy); color: #fff; }
.process .myh-section-heading p { color: rgba(255,255,255,.62); }
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.process-step { text-align: center; }
.step-icon {
  width: 64px; height: 64px; margin: 0 auto 17px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(255,255,255,.07); color: var(--myh-gold); font-size: 25px;
}
.process-step h3 { margin: 0 0 7px; font-size: 16px; }
.process-step p { margin: 0; color: rgba(255,255,255,.62); font-size: 14px; }

.reviews { background: #fff; }
.review-coming {
  max-width: 680px; margin: auto; padding: 36px; text-align: center;
  border: 1px solid var(--myh-border); border-radius: var(--myh-radius); background: var(--myh-cream);
}
.review-stars { color: var(--myh-gold); letter-spacing: .15em; }
.review-coming h3 { margin: 10px 0 5px; font: 700 24px/1.2 var(--myh-serif); }
.review-coming p { margin: 0; color: var(--myh-muted); }

.faq { background: #f1eee8; }
.faq-list { max-width: 800px; margin: auto; border-top: 1px solid #d9d3c9; }
.faq details { border-bottom: 1px solid #d9d3c9; }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 21px 0; font-weight: 800; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--myh-gold-dark); font-size: 24px; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: -5px 0 22px; color: var(--myh-muted); }

.newsletter { background: var(--myh-cream); }
.newsletter-card {
  padding: 64px 24px; border-radius: var(--myh-radius); text-align: center;
  background: var(--myh-navy); color: #fff;
}
.newsletter-card h2 { margin: 0 0 9px; font: 700 36px/1.15 var(--myh-serif); }
.newsletter-card > p { max-width: 580px; margin: 0 auto 24px; color: rgba(255,255,255,.65); }
.newsletter-form { display: flex; justify-content: center; gap: 12px; max-width: 620px; margin: auto; }
.newsletter-form input {
  flex: 1; min-height: 54px; padding: 0 18px; border: 0; border-radius: 8px; background: #fff;
}
.newsletter-form button[disabled] { opacity: .75; cursor: not-allowed; }
.privacy-copy { max-width: 600px; margin: 14px auto 0; color: rgba(255,255,255,.46); font-size: 12px; }

.site-footer { padding: 62px 0 94px; background: #080f20; color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 48px; }
.footer-brand h2 { margin: 0 0 12px; font: 700 24px/1 var(--myh-serif); }
.footer-brand p { max-width: 280px; margin: 0; color: rgba(255,255,255,.58); }
.footer-column h3 { margin: 0 0 14px; font-size: 14px; }
.footer-column a { display: block; margin: 8px 0; color: rgba(255,255,255,.58); font-size: 14px; }
.footer-column a:hover { color: var(--myh-gold); }
.footer-bottom { margin-top: 42px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.08); color: rgba(255,255,255,.42); font-size: 12px; }

.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 16px max(24px, calc((100vw - 1180px)/2)); background: #0b132b; color: #fff;
  border-top: 1px solid rgba(255,255,255,.12); box-shadow: 0 -12px 32px rgba(0,0,0,.2);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0; color: rgba(255,255,255,.72); font-size: 13px; }
.cookie-actions { display: flex; gap: 9px; flex: 0 0 auto; }
.cookie-actions button {
  min-height: 40px; padding: 0 16px; border: 1px solid rgba(255,255,255,.25);
  border-radius: 7px; background: transparent; color: #fff; cursor: pointer;
}
.cookie-actions .accept { border-color: var(--myh-gold); background: var(--myh-gold); color: var(--myh-navy); font-weight: 800; }

.content-shell { padding: 72px 0 110px; min-height: 55vh; }
.entry-header { max-width: 820px; margin: 0 auto 36px; text-align: center; }
.entry-title { margin: 0; font: 700 clamp(2.5rem,5vw,4.4rem)/1 var(--myh-serif); }
.entry-content { max-width: 850px; margin: auto; }
.entry-content > * { max-width: 100%; }

.woocommerce .products ul, .woocommerce ul.products {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; margin: 0;
}
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none; }
.woocommerce ul.products li.product {
  width: auto !important; margin: 0 !important; padding: 0 0 22px;
  overflow: hidden; border: 1px solid var(--myh-border); border-radius: var(--myh-radius);
  background: #fff; box-shadow: 0 12px 36px rgba(20,24,40,.06);
}
.woocommerce ul.products li.product a img { margin: 0 0 18px; aspect-ratio: 4/3; object-fit: cover; }
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .price,
.woocommerce ul.products li.product .button { margin-left: 20px; margin-right: 20px; }
.woocommerce ul.products li.product .price { color: var(--myh-gold-dark); font-weight: 800; }
.woocommerce div.product { max-width: 1180px; margin: 0 auto; }
.woocommerce-message, .woocommerce-info { border-top-color: var(--myh-gold); }
.woocommerce-message::before, .woocommerce-info::before { color: var(--myh-gold-dark); }

@media (max-width: 980px) {
  .header-inner { grid-template-columns: 1fr auto; }
  .menu-toggle { display: inline-grid; }
  .primary-nav {
    position: absolute; left: 0; right: 0; top: 100%; display: none;
    padding: 18px 24px 24px; background: var(--myh-navy); flex-direction: column; align-items: flex-start;
  }
  .primary-nav.is-open { display: flex; }
  .currency-tool, .account-tool { display: none; }
  .placeholder-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(2, 1fr); row-gap: 42px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .woocommerce .products ul, .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  body.admin-bar .site-header { top: 46px; }
  .myh-container { width: min(100% - 24px, 1180px); }
  .myh-section { padding: 64px 0; }
  .header-inner { min-height: 66px; gap: 10px; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-copy strong { font-size: 18px; }
  .hero { min-height: 620px; }
  .hero::after { background: linear-gradient(180deg, rgba(7,13,31,.58), rgba(7,13,31,.94)); }
  .hero-inner { padding: 72px 0 88px; align-self: end; }
  .hero h1 { font-size: clamp(3rem, 15vw, 4.1rem); }
  .hero p { font-size: 16px; }
  .hero-actions { display: grid; }
  .myh-button { width: 100%; }
  .placeholder-grid, .process-grid, .footer-grid,
  .woocommerce .products ul, .woocommerce ul.products { grid-template-columns: 1fr; }
  .placeholder-art { min-height: 220px; }
  .process-grid { gap: 38px; }
  .newsletter-card { padding: 48px 18px; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form .myh-button { width: 100%; }
  .footer-grid { gap: 28px; }
  .cookie-banner { align-items: stretch; flex-direction: column; gap: 12px; padding: 14px 12px; }
  .cookie-actions button { flex: 1; }
}
