/*
Theme Name: Castle Barber
Theme URI: https://castlebarbersupply.com
Author: Castle Barber Supply
Description: Storefront for Castle Barber Supply.
Version: 1.0.0
Text Domain: castlebarber
*/

:root {
  --ink: #161616;
  --muted: #5f5b56;
  --line: #e6e1d8;
  --paper: #f6f4ef;
  --card: #fffcf8;
  --sale: #8d2b2b;
  --sans: "Outfit", "Segoe UI", sans-serif;
  --display: "Syne", "Outfit", sans-serif;
  --wrap: 1120px;
  --pad: clamp(1.1rem, 4vw, 2rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.5;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -0.04em; line-height: 0.95; font-weight: 700; margin: 0; }
p { margin: 0; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: #fff;
  padding: 0.5rem 0.8rem;
  z-index: 20;
}
.skip:focus { top: 1rem; }

.cb-wrap { width: min(var(--wrap), calc(100% - var(--pad) * 2)); margin-inline: auto; }
.cb-kicker {
  margin: 0 0 0.8rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.cb-announce {
  background: var(--ink);
  color: #f6f4ef;
  text-align: center;
  font-size: 0.86rem;
  padding: 0.55rem 1rem;
}
.cb-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(246, 244, 239, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.cb-header__bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4.4rem;
}
.cb-logo { text-decoration: none; display: grid; line-height: 1; }
.cb-logo__mark { font-family: var(--display); font-weight: 800; font-size: 1.35rem; letter-spacing: -0.05em; }
.cb-logo__sub { font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-top: 0.2rem; }
.cb-nav { display: flex; gap: 1.15rem; margin-left: auto; align-items: center; }
.cb-nav a { text-decoration: none; font-weight: 500; font-size: 0.98rem; }
.cb-nav a:hover { text-decoration: underline; text-underline-offset: 0.25em; }
.cb-cart {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
}
.cb-cart-count {
  min-width: 1.3rem;
  height: 1.3rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  display: inline-grid;
  place-items: center;
  font-size: 0.75rem;
}
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.cb-burger {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  cursor: pointer;
}

.cb-hero { padding: clamp(2rem, 6vw, 4.5rem) 0 1rem; }
.cb-hero__grid { display: grid; gap: 2rem; align-items: center; }
.cb-hero h1 { font-size: clamp(3.1rem, 8vw, 6.4rem); max-width: 9ch; }
.cb-hero h1 em { font-style: italic; font-weight: 650; }
.cb-lead { margin-top: 1.1rem; max-width: 36ch; color: var(--muted); font-size: 1.15rem; }
.cb-hero__actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.5rem; }
.cb-hero__figure {
  background: linear-gradient(180deg, #fff 0%, #efeae3 100%);
  border-radius: 1.4rem;
  padding: clamp(1rem, 3vw, 2rem);
}
.cb-hero__figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }

.cb-btn, .button, button.button, a.button, input[type="submit"], .checkout-button,
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt,
.single_add_to_cart_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--ink) !important;
  background-color: var(--ink) !important;
  color: #fff !important;
  text-decoration: none;
  border: 1px solid var(--ink) !important;
  border-radius: 999px;
  padding: 0.85rem 1.2rem;
  font-family: var(--sans);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}
.cb-buy__note { color: var(--muted); margin: 0 0 1rem; max-width: 36ch; }
.cb-desc h1, .cb-desc h2, .cb-desc h3, .cb-prose__body h1, .cb-prose__body h2, .cb-prose__body h3 {
  font-family: var(--sans);
  font-size: 1.15rem;
  letter-spacing: 0;
  line-height: 1.35;
  margin: 1.1rem 0 0.35rem;
}
a.cb-btn.cb-btn--ghost {
  background: transparent !important;
  background-color: transparent !important;
  color: var(--ink) !important;
}
.cb-btn:hover, .button:hover, button.button:hover { background: #2c2c2c !important; color: #fff !important; }
a.cb-btn.cb-btn--ghost:hover {
  background: var(--ink) !important;
  background-color: var(--ink) !important;
  color: #fff !important;
}

.cb-trust {
  display: grid;
  gap: 0.8rem;
  padding: 1.2rem 0 0.4rem;
  border-top: 1px solid var(--line);
  margin-top: 2rem;
}
.cb-trust div { display: grid; gap: 0.15rem; }
.cb-trust strong { font-size: 0.95rem; }
.cb-trust span { color: var(--muted); font-size: 0.9rem; }

.cb-section { padding: clamp(2.2rem, 6vw, 4.5rem) 0; }
.cb-section h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1.2rem; }
.cb-split { display: grid; gap: 0.8rem; }
.cb-panel {
  display: grid;
  background: #fff;
  border-radius: 1.3rem;
  overflow: hidden;
  text-decoration: none;
  border: 1px solid var(--line);
  min-height: 16rem;
}
.cb-panel img { width: 100%; height: 100%; object-fit: contain; background: #f3f0ea; aspect-ratio: 4 / 3; }
.cb-panel__copy { padding: 1.4rem; display: flex; flex-direction: column; justify-content: flex-end; gap: 0.45rem; }
.cb-panel__copy strong { font-family: var(--display); font-size: clamp(1.8rem, 3vw, 2.6rem); letter-spacing: -0.04em; }
.cb-panel__copy span { color: var(--muted); }
.cb-panel:hover { border-color: #cfc8bc; }

.cb-grid, ul.products {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}
.woocommerce ul.products::before,
.woocommerce ul.products::after,
ul.products::before,
ul.products::after {
  content: none !important;
  display: none !important;
}
ul.products li.product, .cb-card {
  width: auto !important;
  margin: 0 !important;
  float: none !important;
  clear: none !important;
}
.cb-card__link {
  display: grid;
  gap: 0.75rem;
  text-decoration: none;
  height: 100%;
}
.cb-card__media {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  overflow: hidden;
}
.cb-card__media img { width: 100%; aspect-ratio: 1 / 0.82; object-fit: contain; background: #f7f5f1; }
.cb-card__kicker { display: block; color: var(--muted); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; }
.cb-card__name { display: block; font-family: var(--display); font-size: 1.35rem; letter-spacing: -0.04em; margin-top: 0.15rem; }
.cb-card__price { display: flex; gap: 0.45rem; align-items: baseline; margin-top: 0.25rem; font-weight: 600; }
.cb-card__price del, .price del { color: var(--muted); font-weight: 500; }
.cb-card__price ins, .price ins { text-decoration: none; color: var(--sale); }

.cb-promises { display: grid; gap: 1rem; }
.cb-promises article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  padding: 1.2rem;
}
.cb-promises h3 { font-size: 1.45rem; margin-bottom: 0.4rem; }
.cb-promises p { color: var(--muted); }

.cb-main { padding: clamp(1.5rem, 4vw, 3rem) 0 4rem; }
.cb-prose h1, .woocommerce-products-header__title, .product_title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  margin-bottom: 0.8rem;
}
.cb-prose__body, .cb-desc { max-width: 68ch; }
.cb-prose__body p, .cb-desc p { margin: 0 0 0.9rem; }
.cb-desc {
  margin-top: 2.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}
.cb-desc p { color: var(--muted); font-size: 1rem; }
.cb-prose__body h2, .cb-desc h2 {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.35;
  margin: 1.15rem 0 0.3rem;
}
.woocommerce-result-count { color: var(--muted); margin: 0 0 0.8rem; }
.woocommerce-ordering { margin: 0 0 1.2rem; max-width: 16rem; }
.cb-prose__body a { text-underline-offset: 0.18em; }

.cb-product {
  display: grid;
  gap: 1.4rem;
}
.cb-gallery__main {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
}
.cb-gallery__thumbs { display: flex; gap: 0.5rem; margin-top: 0.55rem; }
.cb-gallery__thumbs button {
  width: 4.6rem;
  padding: 0;
  border-radius: 0.7rem;
  border: 1px solid var(--line);
  background: #fff;
  overflow: hidden;
}
.cb-gallery__thumbs img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.cb-buy .price { font-size: 1.45rem; font-weight: 650; margin: 0.6rem 0 1rem; display: flex; gap: 0.55rem; align-items: baseline; }
.cb-colors { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.3rem 0 1rem; }
.cb-colors a {
  width: 3.3rem;
  border-radius: 0.6rem;
  overflow: hidden;
  border: 1px solid var(--line);
  text-decoration: none;
}
.cb-colors a[aria-current="true"] { outline: 2px solid var(--ink); outline-offset: 2px; }
.cb-colors img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #f7f5f1; }
form.cart { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 0.4rem; }
.quantity .qty {
  width: 4.6rem;
  height: 2.9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  text-align: center;
}
.woocommerce-breadcrumb { color: var(--muted); font-size: 0.86rem; margin: 0 0 1rem; }
.woocommerce-breadcrumb a { color: inherit; }
.cb-desc { margin-top: 2.2rem; }
.related.products, .upsells.products { margin-top: 3rem; }
.related.products > h2, .upsells.products > h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 1rem; }

.woocommerce-result-count, .woocommerce-ordering { margin: 0 0 1rem; }
.woocommerce-ordering { float: none; }
.woocommerce-ordering select, .woocommerce form .input-text, .woocommerce form select, .woocommerce form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 0.8rem;
  padding: 0.75rem 0.8rem;
}
.woocommerce form .form-row { width: 100% !important; float: none !important; margin: 0 0 0.8rem; }
.woocommerce-checkout .col2-set, .woocommerce-account .col2-set { display: grid; gap: 1rem; }
.woocommerce table.shop_table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1rem;
  overflow: hidden;
}
.woocommerce table.shop_table th, .woocommerce table.shop_table td {
  padding: 0.8rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.woocommerce-message, .woocommerce-info, .woocommerce-error {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink);
  padding: 0.9rem 1rem;
  margin: 0 0 1rem;
  list-style: none;
}
.woocommerce-error { border-left-color: var(--sale); }
#coupon_code { border-radius: 999px; border: 1px solid var(--line); padding: 0.7rem 0.9rem; }

.cb-footer { border-top: 1px solid var(--line); padding: 1.6rem 0 2rem; color: var(--muted); }
.cb-footer__bar { display: flex; flex-wrap: wrap; gap: 0.8rem 1.3rem; justify-content: space-between; align-items: center; }
.cb-footer nav { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.cb-footer a { color: var(--ink); text-decoration: none; }
.cb-footer a:hover { text-decoration: underline; }

@media (min-width: 720px) {
  .cb-main .woocommerce-result-count,
  .cb-main .woocommerce-ordering { display: inline-block; vertical-align: middle; margin: 0 1rem 1.2rem 0; }
  .cb-hero__grid { grid-template-columns: 1.05fr 0.95fr; }
  .cb-trust { grid-template-columns: repeat(3, 1fr); }
  .cb-split { grid-template-columns: 1fr 1fr; }
  .cb-panel { grid-template-columns: 1.1fr 0.9fr; }
  .cb-grid, ul.products { grid-template-columns: 1fr 1fr; }
  .cb-promises { grid-template-columns: repeat(3, 1fr); }
  .cb-product { grid-template-columns: 1.15fr 0.85fr; align-items: start; }
  .woocommerce-checkout .col2-set { grid-template-columns: 1.2fr 0.8fr; align-items: start; }
}
@media (min-width: 980px) {
  .cb-grid, ul.products { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 760px) {
  .cb-burger { display: inline-flex; }
  .cb-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #f6f4ef;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 0.6rem var(--pad) 1rem;
    margin: 0;
  }
  .cb-nav a { padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
  .nav-toggle:checked ~ .cb-nav { display: flex; }
  .cb-header { position: sticky; }
  .cb-header__bar { position: relative; }
  .woocommerce table.shop_table thead { display: none; }
  .woocommerce table.shop_table, .woocommerce table.shop_table tbody, .woocommerce table.shop_table tr, .woocommerce table.shop_table td {
    display: block;
    width: 100%;
  }
  .woocommerce table.shop_table tr { border-bottom: 1px solid var(--line); padding: 0.4rem 0; }
  .woocommerce table.shop_table td { border: 0; text-align: right; }
  .woocommerce table.shop_table td::before {
    content: attr(data-title);
    float: left;
    font-weight: 600;
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.cb-hero__figure--scene img { object-fit: cover; }
.cb-station { display: grid; gap: 0.9rem; }
.cb-station a { display: grid; gap: 0.4rem; text-decoration: none; }
.cb-station img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 1.15rem; }
.cb-station strong { font-family: var(--display); font-size: 1.4rem; letter-spacing: -0.04em; }
.cb-station span { color: var(--muted); }
@media (min-width: 720px) {
  .cb-station { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
}
