/*
Theme Name: EasyAuction Catalog
Theme URI: https://easyauctionapp.com
Author: Denis Gouey
Description: A bookbinder's theme for published auction catalogs — paper, ink, morocco leather and marbled endpapers. Built for EasyAuctionApp card-grid catalog pages.
Version: 1.1.1
Requires at least: 5.9
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: easyauction-catalog
Tags: one-column, custom-logo, custom-menu, blog
*/

/* ---------- Tokens ---------- */
:root {
  --paper: #fcfbf7;      /* cool paper white */
  --card: #ffffff;
  --ink: #221e1a;        /* iron-gall ink */
  --morocco: #6e2b2b;    /* oxblood leather */
  --morocco-dark: #571f1f;
  --gilt: #9a783a;       /* gold tooling */
  --gilt-faint: #e4d9c2;
  --slate: #5b6470;      /* marbled blue-grey, meta text */
  --hairline: #e7e2d6;

  --display: "EB Garamond", Garamond, "Times New Roman", serif;
  --utility: "Libre Franklin", "Franklin Gothic Medium", Arial, sans-serif;

  --w-content: 1160px;
  --w-prose: 70ch;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.125rem;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; }

a { color: var(--morocco); text-decoration-color: var(--gilt); text-underline-offset: 3px; }
a:hover { color: var(--morocco-dark); }

:focus-visible { outline: 2px solid var(--morocco); outline-offset: 2px; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.15;
  color: var(--ink);
  margin: 1.6em 0 0.5em;
}
h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.35rem; }

/* Utility text: nav, labels, estimates, buttons */
.u-label,
.site-nav,
.lot-number, .lot-no, .eaa-lot-number,
.lot-estimate, .eaa-estimate,
.wp-block-button__link,
button, input[type="submit"] {
  font-family: var(--utility);
}

/* ---------- Masthead: app-style banner ---------- */
.site-header {
  padding: 14px 1.25rem 22px;
}
.app-banner { max-width: 960px; margin: 0 auto; }

.app-banner-image {
  position: relative;
  overflow: hidden;
  border-radius: 10px 10px 0 0;
  background: #14142a;
  min-height: 110px;
}
.app-banner-image img { width: 100%; height: auto; display: block; }

.app-banner-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 1rem;
  background: rgba(0, 0, 30, 0.45);
}
.app-banner-title {
  margin: 0;
  font-family: var(--utility);
  font-weight: 800;
  font-size: 1.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}
.app-banner-title a { color: #fff; text-decoration: none; }
.app-banner-tagline {
  margin: 4px 0 0;
  color: #dde;
  font-family: var(--utility);
  font-size: 0.95rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.app-banner-bar {
  background: #fff;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 10px 10px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.pill-group { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.pill,
.app-banner-bar .pill-menu a {
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  color: #444;
  text-decoration: none;
  font-size: 0.85rem;
  font-family: var(--utility);
}
.pill:hover,
.app-banner-bar .pill-menu a:hover {
  border-color: var(--morocco);
  color: var(--morocco);
}
.app-banner-bar ul.pill-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Layout ---------- */
.site-main {
  max-width: var(--w-content);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}
.entry-title { text-align: center; margin-top: 0.4em; }
.entry-meta {
  text-align: center;
  font-family: var(--utility);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 2.2rem;
}
.entry-content > p,
.entry-content > ul,
.entry-content > ol,
.entry-content > blockquote,
.entry-content > h2,
.entry-content > h3 {
  max-width: var(--w-prose);
  margin-left: auto;
  margin-right: auto;
}
.entry-content > .alignwide { max-width: var(--w-content); }
.entry-content > .alignfull { max-width: none; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }

hr, .wp-block-separator {
  border: 0;
  border-top: 1px solid var(--hairline);
  max-width: var(--w-prose);
  margin: 2.5rem auto;
}

/* ---------- Lot card grid ----------
   Targets EasyAuctionApp published markup plus common fallbacks. */
.eaa-grid, .catalog-grid, .lot-grid, .card-grid,
.entry-content .wp-block-columns.is-lot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.6rem;
  margin: 2.2rem 0;
}

.eaa-card, .lot-card, .catalog-card, .card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-top: 3px solid var(--morocco);
  padding: 1.1rem 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  transition: box-shadow 160ms ease, transform 160ms ease;
}
.eaa-card:hover, .lot-card:hover, .catalog-card:hover, .card:hover {
  box-shadow: 0 10px 28px rgba(34, 30, 26, 0.10);
  transform: translateY(-2px);
}

/* Lot images: never crop a book */
.eaa-card img, .lot-card img, .catalog-card img, .card img {
  width: 100%;
  height: 240px;
  object-fit: contain;
  background: var(--paper);
  border: 1px solid var(--hairline);
  margin-bottom: 0.9rem;
}

/* Lot number as a spine label */
.lot-number, .lot-no, .eaa-lot-number {
  align-self: flex-start;
  display: inline-block;
  background: var(--morocco);
  color: var(--paper);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.28em 0.75em;
  margin-bottom: 0.7rem;
  box-shadow: inset 0 0 0 1px var(--gilt);
  outline: 1px solid var(--morocco);
}

.eaa-card h3, .lot-card h3, .catalog-card h3, .card h3,
.eaa-card h2, .lot-card h2, .catalog-card h2, .card h2 {
  margin: 0 0 0.45rem;
  font-size: 1.22rem;
  line-height: 1.25;
}

.eaa-card p, .lot-card p, .catalog-card p, .card p {
  margin: 0 0 0.6rem;
  font-size: 0.98rem;
  line-height: 1.5;
}

.lot-estimate, .eaa-estimate, .estimate {
  margin-top: auto;
  padding-top: 0.7rem;
  border-top: 1px solid var(--hairline);
  font-family: var(--utility);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
}
.lot-estimate strong, .eaa-estimate strong, .estimate strong { color: var(--ink); }

/* ---------- Blog index ---------- */
.post-list { list-style: none; margin: 0; padding: 0; max-width: var(--w-prose); margin-inline: auto; }
.post-list li { padding: 1.6rem 0; border-bottom: 1px solid var(--hairline); }
.post-list h2 { margin: 0 0 0.3rem; font-size: 1.5rem; }
.post-list h2 a { color: var(--ink); text-decoration: none; }
.post-list h2 a:hover { color: var(--morocco); }
.post-list .entry-meta { text-align: left; margin-bottom: 0.4rem; }

/* ---------- Buttons ---------- */
.wp-block-button__link, button, input[type="submit"] {
  background: var(--morocco);
  color: var(--paper);
  border: 1px solid var(--morocco-dark);
  border-radius: 0;
  padding: 0.65em 1.5em;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}
.wp-block-button__link:hover, button:hover, input[type="submit"]:hover {
  background: var(--morocco-dark);
  color: var(--paper);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--hairline);
  margin-top: 3rem;
  padding: 2rem 1.25rem 2.6rem;
  text-align: center;
  font-family: var(--utility);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
}
.site-footer a { color: var(--slate); }

/* ---------- Small screens ---------- */
@media (max-width: 600px) {
  .site-header { padding-top: 1.8rem; }
  .eaa-grid, .catalog-grid, .lot-grid, .card-grid { grid-template-columns: 1fr; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .eaa-card, .lot-card, .catalog-card, .card { transition: none; }
  .eaa-card:hover, .lot-card:hover, .catalog-card:hover, .card:hover { transform: none; }
}
