/*
Theme Name: HOLY BASE
Description: Quiet, image-first theme for the HOLY BASE store.
Version: 1.0.2
Text Domain: holybase
Requires PHP: 7.4
*/

:root {
  --ink: #111111;
  --paper: #ffffff;
  --stone: #f3f1ee;
  --mute: #8b8b8b;
  --line: #e7e5e2;
  --font: "Helvetica Neue", Helvetica, Arial, "Inter", system-ui, sans-serif;
  --pad: clamp(16px, 2.4vw, 32px);
  --header: 56px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 13px/1.55 var(--font);
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.6; }
button { font: inherit; color: inherit; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }

.screen-reader-text, .hb-visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- type helpers ---------- */
.hb-label {
  margin: 0;
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.hb-title {
  margin: 0 0 28px;
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.hb-link {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}

/* ---------- header ---------- */
.hb-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header);
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.hb-header.is-scrolled { border-bottom-color: var(--line); }
.admin-bar .hb-header { top: 32px; }
.hb-header__inner {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 var(--pad);
}
.hb-logo img { height: 15px; width: auto; }
.hb-nav { display: flex; align-items: center; gap: 22px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }
.hb-nav--right { justify-content: flex-end; }
.hb-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; }
.hb-menu .current-menu-item > a, .hb-menu .current_page_item > a { border-bottom: 1px solid currentColor; }
.hb-lang { display: inline-flex; gap: 4px; }
.hb-lang__item { color: var(--mute); }
.hb-lang__item.is-current { color: var(--ink); }
.hb-lang__sep { color: var(--mute); }
.hb-cart-count::before { content: "("; }
.hb-cart-count::after { content: ")"; }

.hb-burger { display: none; background: none; border: 0; padding: 8px 0; width: 28px; cursor: pointer; }
.hb-burger span:not(.screen-reader-text) { display: block; height: 1px; background: var(--ink); margin: 5px 0; transition: transform .2s; }
.hb-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(3px) rotate(45deg); }
.hb-burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3px) rotate(-45deg); }

.hb-drawer {
  position: fixed; inset: var(--header) 0 0 0; z-index: 40;
  background: var(--paper);
  padding: 32px var(--pad);
  overflow-y: auto;
}
.hb-drawer .hb-menu { flex-direction: column; gap: 14px; margin-bottom: 28px; font-size: 22px; letter-spacing: -0.01em; }
.hb-drawer .hb-lang { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; }
.hb-drawer-open { overflow: hidden; }

/* Hide TranslatePress floating switcher: the switch lives in the header/footer. */
#trp-floater-ls, .trp-floater-ls-names, .trp-language-switcher.trp-floating-switcher, .trp-floating-switcher { display: none !important; }

/* ---------- home ---------- */
.hb-hero__media { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--paper); }
.hb-hero__media--1 { grid-template-columns: 1fr; }
.hb-hero__media:hover { opacity: 1; }
.hb-hero__img {
  width: 100%;
  height: min(calc(100svh - var(--header) - 64px), 62vw);
  min-height: 460px;
  object-fit: cover;
  object-position: center 22%;
  background: var(--stone);
}
.hb-hero__caption {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 18px var(--pad) 0;
}

.hb-section { padding: 88px 0 24px; }
.hb-section__head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 0 var(--pad) 20px;
}

.hb-looks {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px;
  margin-top: 96px;
}
.hb-look { position: relative; display: block; }
.hb-look:hover { opacity: 1; }
.hb-look img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; object-position: center 25%; background: var(--stone); }
.hb-look__name { display: block; padding: 10px var(--pad) 0 12px; font-size: 12px; }
.hb-look:hover .hb-look__name { text-decoration: underline; text-underline-offset: 3px; }

.hb-manifesto {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 32px;
  padding: 140px var(--pad) 120px;
}
.hb-manifesto__side { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.hb-manifesto__list {
  list-style: none; counter-reset: m; margin: 0; padding: 0;
  font-size: clamp(22px, 2.6vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.hb-manifesto__list li {
  counter-increment: m;
  display: grid; grid-template-columns: 3.2em 1fr; align-items: baseline;
  padding: 14px 0; border-top: 1px solid var(--line);
}
.hb-manifesto__list li:last-child { border-bottom: 1px solid var(--line); }
.hb-manifesto__list li::before {
  content: counter(m, decimal-leading-zero);
  font-size: 11px; letter-spacing: 0.08em; color: var(--mute);
}

/* ---------- product grid ---------- */
.woocommerce ul.products, ul.products {
  list-style: none;
  margin: 0; padding: 0 var(--pad);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 12px;
  row-gap: 48px;
}
ul.products::before, ul.products::after { display: none; }
ul.products li.product { margin: 0; width: auto; float: none; position: relative; }
ul.products li.product a.woocommerce-LoopProduct-link { display: block; position: relative; }
ul.products li.product a:hover { opacity: 1; }
ul.products li.product img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 20%;
  background: var(--stone);
  margin: 0 0 12px;
}
ul.products li.product .hb-hover-img {
  position: absolute; top: 0; left: 0;
  opacity: 0; transition: opacity .35s ease;
}
@media (hover: hover) {
  ul.products li.product a:hover .hb-hover-img { opacity: 1; }
}
ul.products li.product .woocommerce-loop-product__title {
  font-size: 12px; font-weight: 400; margin: 0 0 2px; padding: 0;
  letter-spacing: 0.01em;
}
ul.products li.product .price { display: block; font-size: 12px; color: var(--mute); }
.price del { color: var(--mute); margin-right: 6px; }
.price ins { text-decoration: none; }

/* ---------- shop / category ---------- */
.hb-shop { padding: 40px 0 96px; }
.hb-shop__head { padding: 0 var(--pad) 32px; }
.hb-shop__head .hb-title { margin-bottom: 18px; }
.hb-filter { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }
.hb-filter a { color: var(--mute); }
.hb-filter a.is-current { color: var(--ink); border-bottom: 1px solid currentColor; }
.hb-filter sup { font-size: 8px; }
.woocommerce-products-header { display: none; }
.woocommerce-pagination { padding: 48px var(--pad) 0; }
.woocommerce-pagination ul { list-style: none; display: flex; gap: 12px; padding: 0; margin: 0; }
.woocommerce-info, .woocommerce-message, .woocommerce-error, .woocommerce-notices-wrapper > * {
  margin: 0 var(--pad) 24px; padding: 14px 0; list-style: none;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.woocommerce-message .button, .woocommerce-info .button { float: right; border-bottom: 1px solid currentColor; text-transform: uppercase; font-size: 11px; letter-spacing: .08em; }

/* ---------- single product ---------- */
.single-product .hb-shop { padding-top: 0; }
div.product {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 0 clamp(24px, 4vw, 72px);
  padding: 0 var(--pad) 0 0;
}
.hb-gallery { display: flex; flex-direction: column; gap: 4px; }
.hb-gallery__item { margin: 0; background: var(--stone); }
.hb-gallery__item img { width: 100%; }
.hb-gallery__dots { display: none; }

div.product .summary {
  position: sticky;
  top: calc(var(--header) + 40px);
  align-self: start;
  padding: 40px 0 64px;
  max-width: 440px;
}
div.product .product_title { font-size: 18px; font-weight: 400; letter-spacing: -0.005em; margin: 0 0 6px; line-height: 1.3; }
div.product .summary > .price { font-size: 13px; margin: 0 0 32px; }
div.product form.cart { margin: 0 0 36px; }
div.product form.cart .quantity { display: none; }
table.variations { border: 0; border-collapse: collapse; margin: 0 0 20px; width: 100%; }
table.variations tr { display: block; }
table.variations th, table.variations td { display: block; padding: 0; text-align: left; }
table.variations th.label { font-size: 11px; font-weight: 400; text-transform: uppercase; letter-spacing: .08em; color: var(--mute); margin-bottom: 10px; }
.hb-sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.hb-sizes button {
  min-width: 64px; padding: 10px 14px;
  background: none; border: 1px solid var(--line); cursor: pointer;
  font-size: 12px; letter-spacing: .02em;
}
.hb-sizes button:hover { border-color: var(--ink); }
.hb-sizes button.is-on { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.reset_variations { display: none !important; }
.woocommerce-variation-price { margin: 16px 0 0; }
.woocommerce-variation-availability { font-size: 12px; color: var(--mute); }

.single_add_to_cart_button, .button.alt, .wc-block-components-button:not(.is-link) {
  width: 100%;
  height: 50px;
  background: var(--ink) !important;
  color: var(--paper) !important;
  border: 0; border-radius: 0 !important;
  font-size: 11px !important; text-transform: uppercase; letter-spacing: .12em;
  cursor: pointer;
  margin-top: 20px;
}
.single_add_to_cart_button:hover { opacity: .85; }
.single_add_to_cart_button.disabled { opacity: .35; cursor: not-allowed; }

.hb-desc { font-size: 12px; margin-bottom: 28px; }
.hb-desc ul { list-style: none; margin: 0; padding: 0; }
.hb-desc li { padding: 3px 0; }
.hb-desc li::before { content: "— "; color: var(--mute); }
.hb-desc p { margin: 0 0 10px; }

.hb-acc details { border-top: 1px solid var(--line); }
.hb-acc details:last-child { border-bottom: 1px solid var(--line); }
.hb-acc summary {
  list-style: none; cursor: pointer;
  padding: 14px 0;
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  display: flex; justify-content: space-between;
}
.hb-acc summary::-webkit-details-marker { display: none; }
.hb-acc summary::after { content: "+"; }
.hb-acc details[open] summary::after { content: "−"; }
.hb-acc p { margin: 0 0 16px; font-size: 12px; color: #444; }
.hb-acc a { border-bottom: 1px solid currentColor; }

.related.products { grid-column: 1 / -1; padding: 96px 0 0; margin-right: calc(var(--pad) * -1); }
.related.products > h2 {
  font-size: 11px; font-weight: 400; text-transform: uppercase; letter-spacing: .08em;
  margin: 0; padding: 0 var(--pad) 20px;
}

/* ---------- pages, cart, checkout ---------- */
.hb-page { max-width: 760px; margin: 0 auto; padding: 64px var(--pad) 120px; }
.hb-page--wide { max-width: 1200px; }
.hb-prose { font-size: 15px; line-height: 1.65; }
.hb-prose h2, .hb-prose h3 { font-size: 11px; font-weight: 400; text-transform: uppercase; letter-spacing: .08em; margin: 48px 0 12px; }
.hb-prose p { margin: 0 0 1.1em; }
.hb-prose a { border-bottom: 1px solid currentColor; }
.hb-prose img { margin: 32px 0; }
.hb-article__cover { margin: 0 0 40px; }
.hb-posts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 48px 16px; }
.hb-post-card h2 { font-size: 16px; font-weight: 400; margin: 6px 0 0; }
.hb-post-card img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; margin-bottom: 12px; }

.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout { font-family: var(--font); }
.wc-block-components-text-input input, .wc-block-components-combobox input, input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  border-radius: 0 !important;
}

/* ---------- footer ---------- */
.hb-footer { border-top: 1px solid var(--line); padding: 56px var(--pad) 28px; margin-top: 48px; }
.hb-footer__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.hb-footer ul { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.hb-footer__base { display: flex; justify-content: space-between; margin-top: 72px; font-size: 11px; color: var(--mute); text-transform: uppercase; letter-spacing: .08em; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .woocommerce ul.products, ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  :root { --header: 52px; }
  .hb-burger { display: block; }
  .hb-nav--left, .hb-hide-sm { display: none !important; }
  .hb-logo img { height: 13px; }

  .woocommerce ul.products, ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 8px; row-gap: 32px; }
  .hb-hero__media { grid-template-columns: 1fr; }
  .hb-hero__img:nth-child(2) { display: none; }
  .hb-hero__img { min-height: 0; height: calc(82svh - var(--header)); }
  .hb-looks { grid-template-columns: 1fr 1fr; margin-top: 64px; }
  .hb-look:nth-child(3) { display: none; }
  .hb-manifesto { grid-template-columns: 1fr; padding: 88px var(--pad); }

  div.product { display: block; padding: 0; }
  .hb-gallery {
    flex-direction: row; gap: 0;
    overflow-x: auto; scroll-snap-type: x mandatory;
    scrollbar-width: none; position: relative;
  }
  .hb-gallery::-webkit-scrollbar { display: none; }
  .hb-gallery__item { flex: 0 0 100%; scroll-snap-align: start; }
  .hb-gallery__item img { aspect-ratio: 3 / 4; object-fit: cover; }
  .hb-gallery__dots {
    display: flex; gap: 6px; justify-content: center;
    position: sticky; left: 0; bottom: 14px; width: 100%; margin-left: -100%;
    align-self: flex-end; pointer-events: none;
  }
  .hb-gallery__dots span { width: 5px; height: 5px; border-radius: 50%; background: rgba(17,17,17,.25); }
  .hb-gallery__dots span.is-on { background: var(--ink); }
  div.product .summary { position: static; max-width: none; padding: 24px var(--pad) 48px; }
  .related.products { margin: 0; padding-top: 56px; }

  .hb-footer__grid { grid-template-columns: 1fr 1fr; }
  .hb-posts { grid-template-columns: 1fr; }
}
@media (max-width: 782px) { .admin-bar .hb-header { top: 46px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- base WooCommerce bits (core WooCommerce CSS is switched off) ---------- */
.woocommerce-products-header, .page-title, .term-description { display: none; }
.woocommerce form .form-row { margin: 0 0 14px; padding: 0; }
.woocommerce form .form-row label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select {
  width: 100%; padding: 12px; border: 1px solid var(--line); background: var(--paper); font: inherit;
}
.woocommerce button.button, .woocommerce a.button, .woocommerce input.button {
  display: inline-block; padding: 14px 22px; background: var(--ink); color: var(--paper);
  border: 0; border-radius: 0; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; cursor: pointer;
}
.woocommerce .stock { font-size: 12px; color: var(--mute); margin: 8px 0 0; }
.woocommerce .stock.out-of-stock { color: var(--ink); }
.woocommerce-account .woocommerce-MyAccount-navigation ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0 0 32px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.woocommerce table.shop_table { width: 100%; border-collapse: collapse; font-size: 12px; }
.woocommerce table.shop_table th, .woocommerce table.shop_table td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); }
.blockUI.blockOverlay { background: rgba(255,255,255,.6) !important; }
