/*
Theme Name: HORA
Description: Minimal theme for HORA Studio — ceramics shop (WooCommerce), workshops, journal and about page.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: hora
*/

/* ------------------------------------------------------------------
   BRAND FONT
   When the font files arrive (.woff2 preferred), put them in
   assets/fonts/ and uncomment the block below. Everything on the
   site uses var(--font), so this is the only place to change.
------------------------------------------------------------------ */
/*
@font-face {
  font-family: 'Hora';
  src: url('assets/fonts/hora-regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
*/

:root {
  --font: 'Hora', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --bg: #f7f6f3;
  --surface: #ffffff;
  --tone: #ebe8e2;
  --ink: #161616;
  --ink-soft: #4a4843;
  --muted: #85827b;
  --line: #e2dfd8;
  --header-h: 64px;
  --gutter: 32px;
  --max: 1320px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
}
body.locked { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; font-weight: 400; }
[hidden] { display: none !important; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.label { font-size: 11px; text-transform: uppercase; letter-spacing: .16em; }
.muted { color: var(--muted); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Empty image slot, used wherever a photo will go later */
.ph { background: var(--tone); }

/* ---------------- Header ---------------- */
.header {
  position: sticky; top: 0; z-index: 30;
  height: var(--header-h);
  background: rgba(247, 246, 243, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.admin-bar .header { top: 32px; }
.header .wrap {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.logo img { height: 18px; width: auto; }
.nav ul { display: flex; gap: 40px; list-style: none; margin: 0; padding: 0; }
.nav a { color: var(--muted); transition: color .2s; }
.nav a:hover, .nav .current-menu-item > a, .nav .current_page_item > a, .nav .current-menu-ancestor > a { color: var(--ink); }

.tools { display: flex; align-items: center; justify-content: flex-end; gap: 18px; }
.icon-btn { position: relative; display: grid; place-items: center; width: 28px; height: 28px; }
.icon-btn svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.4; fill: none; }
.badge {
  position: absolute; top: -3px; right: -5px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px;
  background: var(--ink); color: var(--bg);
  font-size: 10px; line-height: 16px; text-align: center;
}
.badge:empty { display: none; }
.lang { display: flex; gap: 6px; padding-left: 18px; border-left: 1px solid var(--line); }
.lang a { color: var(--muted); }
.lang a.active, .lang a:hover { color: var(--ink); }
.menu-btn { display: none; }

.mobile-menu {
  position: fixed; z-index: 25;
  top: var(--header-h); left: 0; right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 12px var(--gutter) 28px;
  transform: translateY(-8px); opacity: 0; visibility: hidden;
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
}
.admin-bar .mobile-menu { top: calc(var(--header-h) + 46px); }
.mobile-menu.open { transform: none; opacity: 1; visibility: visible; }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; }
.mobile-menu a { display: block; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 13px; }

/* Portrait phones (and narrow screens): icons + hamburger only.
   Landscape keeps the full text menu. */
@media (max-width: 760px), (orientation: portrait) and (max-width: 900px) {
  .nav { display: none; }
  .menu-btn { display: grid; }
  .header .wrap { grid-template-columns: auto 1fr; }
}
@media (max-width: 782px) { .admin-bar .header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .header { top: 0; } }

/* ---------------- Page shell ---------------- */
.site-main { min-height: calc(100vh - var(--header-h) - 120px); padding: 56px 0 120px; }

.page-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 16px 40px;
  padding-bottom: 20px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--line);
}
.page-title { font-size: clamp(26px, 3.2vw, 40px); letter-spacing: -0.02em; line-height: 1.1; }
.page-intro { max-width: 520px; color: var(--muted); }
.page-intro p + p { margin-top: .8em; }

.empty { padding: 96px 0; text-align: center; color: var(--muted); }

.btn, a.button,
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce #respond input#submit, .woocommerce a.button.alt, .woocommerce button.button.alt {
  display: inline-flex; align-items: center; justify-content: center;
  height: 46px; padding: 0 28px;
  border: 1px solid var(--ink); border-radius: 0;
  background: transparent; color: var(--ink);
  font: inherit; font-size: 11px; font-weight: 400; text-transform: uppercase; letter-spacing: .16em;
  transition: background .2s, color .2s;
}
.btn:hover, a.button:hover,
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover {
  background: var(--ink); color: var(--bg);
}
.btn-solid,
.woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce a.checkout-button,
.woocommerce #payment #place_order {
  background: var(--ink); color: var(--bg); border-color: var(--ink);
}
.btn-solid:hover,
.woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover { background: #333; border-color: #333; color: var(--bg); }
.woocommerce a.button.loading, .woocommerce button.button.loading { opacity: .5; }
.woocommerce a.button.loading::after, .woocommerce button.button.loading::after { display: none; }
.woocommerce a.added_to_cart { display: none; }

/* ---------------- Shop ---------------- */
.filters { display: flex; gap: 24px; overflow-x: auto; scrollbar-width: none; margin-bottom: 40px; list-style: none; padding: 0; }
.filters::-webkit-scrollbar { display: none; }
.filters a { display: block; white-space: nowrap; color: var(--muted); padding-bottom: 4px; border-bottom: 1px solid transparent; font-size: 13px; }
.filters a:hover { color: var(--ink); }
.filters a.active { color: var(--ink); border-color: var(--ink); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px 32px; list-style: none; margin: 0; padding: 0; }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 44px 20px; } }
@media (max-width: 560px) {
  .grid { gap: 36px 14px; }
  .card-row { flex-direction: column; gap: 4px; }
  .card-price { font-size: 13px; }
}

/* Override WooCommerce's float-based product grid */
.woocommerce ul.products { margin: 0; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none !important; }
.woocommerce ul.products li.product { width: auto !important; float: none !important; margin: 0 !important; padding: 0; }
.related ul.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px 32px; list-style: none; padding: 0; }
@media (max-width: 1000px) { .related ul.products { grid-template-columns: repeat(2, 1fr); gap: 44px 20px; } }
.related > h2 { font-size: 11px; text-transform: uppercase; letter-spacing: .16em; padding-top: 32px; border-top: 1px solid var(--line); }
.related .button { display: none !important; }

.card { display: block; }
.card-media { aspect-ratio: 3 / 4; overflow: hidden; margin-bottom: 14px; }
.card-media img, .woocommerce ul.products li.product .card-media img { width: 100%; height: 100%; margin: 0; object-fit: cover; transition: transform .9s var(--ease); }
.card:hover .card-media img { transform: scale(1.03); }
.card-row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.card-name { font-size: 14px; }
.card-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.card-price { font-size: 14px; white-space: nowrap; }
.woocommerce .price, .woocommerce ul.products li.product .price, .woocommerce div.product p.price { color: inherit; font-size: inherit; margin: 0; }
.price del { color: var(--muted); margin-right: 6px; }
.price ins { text-decoration: none; }
.price-suffix { color: inherit; }

.woocommerce-pagination { margin-top: 64px; }
.woocommerce nav.woocommerce-pagination ul { border: 0; }
.woocommerce nav.woocommerce-pagination ul li { border: 0; }
.woocommerce nav.woocommerce-pagination ul li a, .woocommerce nav.woocommerce-pagination ul li span { padding: 8px 12px; }
.woocommerce nav.woocommerce-pagination ul li span.current { background: none; color: var(--ink); border-bottom: 1px solid var(--ink); }

/* ---------------- Single product ---------------- */
.pd-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.pd-gallery { display: grid; gap: 12px; }
.pd-gallery .main { aspect-ratio: 3 / 4; overflow: hidden; }
.pd-gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.pd-gallery .thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.pd-gallery .thumbs img { aspect-ratio: 3 / 4; object-fit: cover; cursor: pointer; opacity: .7; }
.pd-gallery .thumbs img:hover, .pd-gallery .thumbs img.active { opacity: 1; }

.pd-info { position: sticky; top: calc(var(--header-h) + 40px); display: flex; flex-direction: column; gap: 24px; }
.pd-back { color: var(--muted); }
.pd-back:hover { color: var(--ink); }
.pd-name { font-size: clamp(26px, 2.6vw, 34px); letter-spacing: -0.015em; line-height: 1.15; }
.woocommerce div.product .pd-info p.price { color: var(--muted); margin-top: 8px; font-size: 15px; }
.pd-desc { color: var(--ink-soft); }
.pd-desc p + p { margin-top: .8em; }
.specs { margin: 0; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr; gap: 8px 24px; font-size: 13px; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; }
.pd-info form.cart { display: flex; gap: 12px; margin: 0 !important; }
.pd-info form.cart::before, .pd-info form.cart::after { display: none !important; }
.woocommerce div.product .pd-info form.cart div.quantity { float: none; margin: 0; }
.pd-info form.cart .quantity .qty {
  width: 64px; height: 46px; border: 1px solid var(--line); background: var(--surface); font: inherit; text-align: center;
}
.pd-info form.cart .single_add_to_cart_button { flex: 1; background: var(--ink) !important; color: var(--bg) !important; }
.pd-info .stock { color: var(--muted); font-size: 13px; margin: 0; }
.pd-long { max-width: 720px; margin-top: 96px; padding-top: 32px; border-top: 1px solid var(--line); color: var(--ink-soft); }
.pd-long h2 { color: var(--ink); margin-bottom: 16px; }
.pd-long p + p { margin-top: .8em; }
.related { margin-top: 96px; }
.related h2 { margin-bottom: 32px; }
@media (max-width: 860px) {
  .pd-detail { grid-template-columns: 1fr; gap: 32px; }
  .pd-info { position: static; }
}

/* ---------------- Workshop ---------------- */
.strips { border-top: 1px solid var(--line); }
.strip {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 260px;
  gap: 32px;
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.strip-num { color: var(--muted); padding-top: 6px; }
.strip-title { font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -0.015em; margin: 6px 0 14px; }
.strip-text { max-width: 560px; color: var(--ink-soft); }
.strip-meta { margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 8px 32px; }
.strip-meta dt { color: var(--muted); }
.strip-meta dd { margin: 2px 0 0; font-size: 14px; }
.strip-aside { display: flex; flex-direction: column; gap: 16px; }
.strip-aside .media { aspect-ratio: 4 / 3; overflow: hidden; }
.strip-aside .media img { width: 100%; height: 100%; object-fit: cover; }
.strip-aside .button { width: 100%; }
@media (max-width: 860px) {
  .strip { grid-template-columns: 1fr; gap: 20px; }
  .strip-num { padding: 0; }
}

/* ---------------- Journal ---------------- */
.journal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px 32px; }
.journal-grid .media { aspect-ratio: 4 / 5; overflow: hidden; margin-bottom: 14px; }
.journal-grid .media img { width: 100%; height: 100%; object-fit: cover; }
.journal-grid time { display: block; margin-bottom: 4px; }
@media (max-width: 860px) { .journal-grid { grid-template-columns: 1fr 1fr; gap: 36px 16px; } }
.journal-placeholder { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.journal-placeholder .ph { aspect-ratio: 4 / 5; }
@media (max-width: 860px) { .journal-placeholder { grid-template-columns: 1fr 1fr; gap: 16px; } .journal-placeholder .ph:nth-child(3) { display: none; } }

.entry { max-width: 720px; margin: 0 auto; }
.entry-media { margin-bottom: 40px; }
.entry-content { color: var(--ink-soft); font-size: 16px; }
.entry-content > * + * { margin-top: 1em; }
.entry-content h2, .entry-content h3 { color: var(--ink); margin-top: 1.8em; }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------------- About ---------------- */
.about { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
.about-media { aspect-ratio: 4 / 5; overflow: hidden; }
.about-media img { width: 100%; height: 100%; object-fit: cover; }
.about-content .lead { font-size: clamp(19px, 1.8vw, 24px); line-height: 1.45; letter-spacing: -0.01em; margin-bottom: 24px; color: var(--ink); }
.about-content > p { color: var(--ink-soft); max-width: 560px; }
.about-content > p + p { margin-top: .8em; }
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.contact h3 { color: var(--muted); }
.contact p { margin-top: 8px; }
.contact a:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; gap: 32px; }
  .contact { grid-template-columns: 1fr; gap: 24px; }
}

/* ---------------- Footer ---------------- */
.footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: 12px; }
.footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer nav { display: flex; gap: 24px; }
.footer a:hover { color: var(--ink); }

/* ---------------- Layers: search, cart drawer ---------------- */
.scrim {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(22, 22, 22, .28);
  opacity: 0; visibility: hidden;
  transition: opacity .3s, visibility .3s;
}
.scrim.open { opacity: 1; visibility: visible; }

.search {
  position: fixed; z-index: 50; top: 0; left: 0; right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  transform: translateY(-100%);
  transition: transform .35s var(--ease);
}
.search.open { transform: none; }
.search-bar { display: flex; align-items: center; gap: 14px; height: 80px; margin: 0; }
.search-bar > svg { width: 20px; height: 20px; stroke: var(--muted); stroke-width: 1.4; fill: none; flex: none; }
.search-bar input[type=search] {
  flex: 1; min-width: 0;
  border: 0; background: none; outline: none; -webkit-appearance: none;
  font: inherit; font-size: 22px; letter-spacing: -0.01em; color: var(--ink);
}
.search-bar input::placeholder { color: #b5b2ab; }
.search-results { padding-bottom: 24px; max-height: 60vh; overflow-y: auto; }
.result { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.result .thumb { width: 48px; height: 64px; flex: none; overflow: hidden; }
.result .thumb img { width: 100%; height: 100%; object-fit: cover; }
.result-name { flex: 1; }
.result:hover .result-name { text-decoration: underline; text-underline-offset: 3px; }
.search-hint { padding: 12px 0 4px; color: var(--muted); }
.search-all { display: inline-block; margin-top: 12px; color: var(--muted); }
.search-all:hover { color: var(--ink); }

.drawer {
  position: fixed; z-index: 50; top: 0; right: 0; bottom: 0;
  width: min(440px, 100%);
  background: var(--surface);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .4s var(--ease);
}
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; height: var(--header-h); padding: 0 28px; border-bottom: 1px solid var(--line); flex: none; }
.drawer .widget_shopping_cart_content { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.drawer .woocommerce-mini-cart { flex: 1; overflow-y: auto; list-style: none; margin: 0; padding: 8px 28px; }
.drawer .woocommerce-mini-cart-item {
  position: relative;
  display: grid; grid-template-columns: 72px 1fr; gap: 16px;
  padding: 20px 28px 20px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.drawer .mini-thumb { display: block; width: 72px; height: 96px; overflow: hidden; }
.drawer .mini-thumb img { width: 100%; height: 100%; object-fit: cover; }
.drawer .quantity { color: var(--muted); margin-top: 4px; }
.drawer .variation { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.drawer a.remove {
  position: absolute; top: 18px; right: 0;
  color: var(--muted) !important; font-size: 18px; font-weight: 300; line-height: 1;
  width: auto; height: auto; border-radius: 0; background: none !important;
}
.drawer a.remove:hover { color: var(--ink) !important; }
.drawer .woocommerce-mini-cart__total { display: flex; justify-content: space-between; margin: 0; padding: 24px 28px 16px; border-top: 1px solid var(--line); }
.drawer .woocommerce-mini-cart__total strong { font-weight: 400; font-size: 11px; text-transform: uppercase; letter-spacing: .16em; }
.drawer .woocommerce-mini-cart__buttons { display: grid; gap: 10px; margin: 0; padding: 0 28px 28px; }
.drawer .woocommerce-mini-cart__buttons .button { width: 100%; margin: 0 !important; }
.drawer .woocommerce-mini-cart__buttons .checkout { background: var(--ink); color: var(--bg); }
.drawer .woocommerce-mini-cart__empty-message { padding: 96px 28px; text-align: center; color: var(--muted); margin: 0; }
.drawer .blockUI.blockOverlay { background: rgba(255,255,255,.6) !important; }

/* ---------------- WooCommerce pages (cart, checkout, account) ---------------- */
.woocommerce-notices-wrapper:empty { display: none; }
.woocommerce .woocommerce-message, .woocommerce .woocommerce-info, .woocommerce .woocommerce-error,
.woocommerce-page .woocommerce-message, .woocommerce-page .woocommerce-info {
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 0; padding: 16px 20px 16px 52px; margin-bottom: 32px; font-size: 14px;
}
.woocommerce .woocommerce-message::before, .woocommerce .woocommerce-info::before { color: var(--ink); top: 16px; }
.woocommerce .woocommerce-error { border-color: #b3261e; }
.woocommerce .woocommerce-message .button, .woocommerce .woocommerce-info .button { height: auto; padding: 0; border: 0; background: none; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.woocommerce form .form-row label { font-size: 12px; color: var(--muted); }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select,
.woocommerce .select2-container .select2-selection--single, .woocommerce .quantity .qty, .woocommerce .coupon .input-text {
  height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 0; background: var(--surface); font: inherit; color: var(--ink);
}
.woocommerce form .form-row textarea { height: 120px; padding: 12px 14px; }
.woocommerce .select2-container .select2-selection--single .select2-selection__rendered { line-height: 44px; padding: 0; }
.woocommerce .select2-container .select2-selection--single .select2-selection__arrow { height: 44px; }

.woocommerce table.shop_table { border: 0; border-radius: 0; border-collapse: collapse; }
.woocommerce table.shop_table th { font-weight: 400; font-size: 11px; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); }
.woocommerce table.shop_table th, .woocommerce table.shop_table td { border-top: 1px solid var(--line); padding: 16px 12px; }
.woocommerce table.shop_table img { width: 64px; }
.woocommerce table.shop_table td.product-name a { text-decoration: none; }
.woocommerce table.cart td.actions .coupon .input-text { width: 180px; margin-right: 8px; }
.woocommerce a.remove { color: var(--muted) !important; font-weight: 300; }
.woocommerce a.remove:hover { background: none; color: var(--ink) !important; }
.woocommerce .cart-collaterals .cart_totals h2, .woocommerce-checkout h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .16em; margin-bottom: 16px; }
.woocommerce-checkout #payment { background: var(--surface) !important; border-radius: 0 !important; }
.woocommerce-checkout #payment div.payment_box { background: var(--bg) !important; }
.woocommerce-checkout #payment div.payment_box::before { display: none; }
.woocommerce #payment #place_order { width: 100%; height: 52px; }

@media (max-width: 760px) {
  :root { --gutter: 20px; }
  .site-main { padding: 36px 0 88px; }
  .page-head { margin-bottom: 28px; }
  .tools { gap: 12px; }
  .lang { padding-left: 12px; }
}

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