/* ===========
   Honor & Oak Woodcraft
   Rustic + Americana theme
   =========== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f6f1e8; /* warm parchment */
  color: #221811;      /* deep brown */
  line-height: 1.6;
}

/* Global links inherit color by default */
a {
  color: inherit;
  text-decoration: none;
}

a:visited {
  color: inherit;
}

/* Make sure the brand link in the header is NEVER purple/underlined */
.site-header .brand,
.site-header .brand:link,
.site-header .brand:visited,
.site-header .brand:hover,
.site-header .brand:active {
  color: #f6f1e8;        /* same as header text */
  text-decoration: none; /* kill underline */
}

.wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

/* --- Top bar & nav --- */

.site-header {
  background: #26150f; /* dark walnut */
  color: #f6f1e8;
  border-bottom: 4px solid #7f2a22; /* deep red accent */
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  max-width: 1100px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand img {
  height: 60px;
  width: auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-text .title {
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.brand-text .subtitle {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  opacity: 0.85;
}

/* Flag-style accent under the header */
.flag-strip {
  background: linear-gradient(
      to right,
      #7f2a22 0%,
      #7f2a22 33%,
      #f6f1e8 33%,
      #f6f1e8 66%,
      #1a2740 66%,
      #1a2740 100%
  );
  height: 6px;
}

/* --- Navigation --- */

.nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
}

.nav a {
  color: #f6f1e8;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  position: relative;
  padding-bottom: 0.2rem;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: #c39a4a; /* brass/gold */
  transition: width 0.2s ease;
}

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

/* --- Hero section (home) --- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 2.5rem;
  padding: 2.5rem 0 2rem;
  align-items: center;
}

.hero-text h1 {
  font-size: 2.3rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.hero-text p.lead {
  font-size: 1.05rem;
  margin-bottom: 1.2rem;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.4rem;
}

.badge {
  border-radius: 999px;
  border: 1px solid #c39a4a;
  padding: 0.35rem 0.8rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: #fdf9f2;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease,
    transform 0.1s ease;
}

.btn-primary {
  background: #7f2a22;
  color: #f6f1e8;
  border-color: #7f2a22;
}

.btn-primary:hover {
  background: #a0352b;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: #26150f;
  border-color: #c39a4a;
}

.btn-outline:hover {
  background: #c39a4a;
  color: #26150f;
}

.hero-panel {
  background: #26150f;
  color: #f6f1e8;
  border-radius: 12px;
  padding: 1.5rem 1.3rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  border: 1px solid #3a2419;
}

.hero-panel h2 {
  font-size: 1rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.hero-panel ul {
  list-style: none;
  font-size: 0.86rem;
}

.hero-panel li + li {
  margin-top: 0.4rem;
}

/* --- Sections --- */

.section {
  padding: 2rem 0 0;
}

.section-header {
  margin-bottom: 1rem;
}

.section-header h2 {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.9rem;
  color: #7f2a22;
}

.section-header h3 {
  font-size: 1.4rem;
  margin-top: 0.35rem;
}

/* --- Cards (projects, highlights) --- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.card {
  background: #fffdf7;
  border-radius: 12px;
  border: 1px solid #e1d1b9;
  padding: 1rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
}

.card h4 {
  margin-bottom: 0.4rem;
}

.card p {
  font-size: 0.9rem;
}

/* --- About layout --- */

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 2rem;
  padding-top: 2rem;
}

.about-highlight {
  background: #26150f;
  color: #f6f1e8;
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid #3a2419;
}

.about-highlight h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 0.5rem;
}

.about-list {
  list-style: none;
  font-size: 0.9rem;
}

.about-list li + li {
  margin-top: 0.4rem;
}

/* --- Projects grid --- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  padding-top: 1.5rem;
}

.project-card {
  background: #fffdf7;
  border-radius: 12px;
  border: 1px solid #e1d1b9;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.project-card-image {
  background: #d1b28a;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #4b3221;
}

.project-card-body {
  padding: 1rem;
}

.project-card-body h4 {
  margin-bottom: 0.3rem;
}

/* --- Contact form --- */

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 2rem;
  padding-top: 2rem;
}

form .field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 0.3rem;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border-radius: 8px;
  border: 1px solid #ccbda6;
  font-size: 0.9rem;
  background: #fffdf7;
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

/* --- Sidebar panel on contact page --- */

.contact-panel {
  background: #26150f;
  color: #f6f1e8;
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid #3a2419;
  font-size: 0.9rem;
}

.contact-panel h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 0.7rem;
}

.contact-panel ul {
  list-style: none;
}

.contact-panel li + li {
  margin-top: 0.4rem;
}

/* --- Footer --- */

.site-footer {
  border-top: 1px solid #ddcdb4;
  margin-top: 3rem;
  padding-top: 1.2rem;
  font-size: 0.8rem;
  color: #7a6650;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* --- Small screens --- */

@media (max-width: 768px) {
  .site-header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .hero,
  .about-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    order: -1;
  }
}

/* Top logo sizing */
.top-logo img {
  width: 350px;        /* <-- try this size */
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.project-card {
  background: #f6f1e8;
  border: 1px solid #e2d8c7;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.project-card img {
  width: 100%;
  height: auto;
  display: block;
}

.project-card-body {
  padding: 1rem;
}

.project-card-body h3 {
  margin-bottom: 0.4rem;
  font-size: 1.25rem;
  color: #221811;
}

.project-card-body p {
  margin: 0;
  line-height: 1.5;
  color: #4b3c2f;
}
.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr);
  gap: 2rem;
  align-items: flex-start;
}

.about-main p {
  margin-bottom: 1rem;
}

.about-photo {
  width: 360px;
  max-width: 100%;
  display: block;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

@media (max-width: 768px) {
  .about-layout {
    grid-template-columns: 1fr;
  }
}

/* --- ERPNext-backed Available Pieces storefront --- */
.shop-page { padding-bottom: 1rem; }
.shop-hero {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 2rem;
  align-items: center;
  padding: 2.5rem 0 1.25rem;
}
.shop-hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: .045em;
  margin: .35rem 0 .8rem;
}
.shop-hero .lead { max-width: 720px; font-size: 1.05rem; color: #4b3c2f; }
.eyebrow {
  display: block;
  color: #7f2a22;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .17em;
  text-transform: uppercase;
}
.shop-note {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: 1.2rem 1.25rem;
  border: 1px solid #c39a4a;
  border-radius: 12px;
  background: #fffdf7;
  box-shadow: 0 8px 22px rgba(38, 21, 15, .08);
}
.shop-note strong { text-transform: uppercase; letter-spacing: .1em; }
.shop-note small { margin-top: .45rem; color: #6e5a48; }
.shop-heading-row { display: flex; justify-content: space-between; align-items: end; gap: 1rem; }
.cart-button {
  border: 1px solid #7f2a22;
  color: #f6f1e8;
  background: #7f2a22;
  border-radius: 999px;
  padding: .65rem 1rem;
  font: inherit;
  font-size: .8rem;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}
.cart-button span {
  display: inline-grid;
  place-items: center;
  min-width: 1.5rem;
  height: 1.5rem;
  margin-left: .35rem;
  padding: 0 .3rem;
  border-radius: 999px;
  background: #f6f1e8;
  color: #26150f;
}
.store-status {
  margin: .5rem 0 1.2rem;
  padding: .75rem 1rem;
  border-left: 3px solid #c39a4a;
  background: rgba(255,253,247,.65);
  color: #5f4b3b;
  font-size: .9rem;
}
.store-status.is-error { border-left-color: #7f2a22; }
.store-status[hidden] { display: none; }
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
}
.shop-product {
  overflow: hidden;
  border: 1px solid #dfcfb6;
  border-radius: 14px;
  background: #fffdf7;
  box-shadow: 0 5px 18px rgba(38,21,15,.07);
}
.shop-product-image-wrap { position: relative; aspect-ratio: 4 / 3; background: #e8dcc8; overflow: hidden; }
.shop-product img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stock-pill {
  position: absolute;
  top: .75rem;
  right: .75rem;
  padding: .3rem .55rem;
  border-radius: 999px;
  background: rgba(38,21,15,.9);
  color: #fffdf7;
  font-size: .72rem;
  font-weight: 750;
}
.shop-product-body { padding: 1rem; }
.shop-product-title-row { display: flex; align-items: start; justify-content: space-between; gap: .75rem; }
.shop-product h3 { font-size: 1.15rem; line-height: 1.2; }
.shop-price { color: #7f2a22; font-weight: 850; white-space: nowrap; }
.shop-product p { margin: .6rem 0 1rem; color: #5a4738; font-size: .9rem; }
.shop-product-actions { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.shop-item-code { font-size: .7rem; color: #8a755e; letter-spacing: .06em; }
.shop-info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.text-link { color: #7f2a22; text-decoration: underline; text-decoration-color: #c39a4a; text-underline-offset: 3px; }
.btn-full { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

.cart-panel {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  width: min(430px, 92vw);
  height: 100dvh;
  padding: 1.25rem;
  background: #fffdf7;
  border-left: 1px solid #d9c7aa;
  box-shadow: -12px 0 40px rgba(0,0,0,.18);
  transform: translateX(105%);
  transition: transform .22s ease;
  display: flex;
  flex-direction: column;
}
.cart-panel.is-open { transform: translateX(0); }
.cart-panel-header, .checkout-header { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.cart-panel-header h2, .checkout-header h2 { text-transform: uppercase; letter-spacing: .06em; }
.icon-button { border: 0; background: transparent; font-size: 1.8rem; line-height: 1; cursor: pointer; color: #26150f; }
.cart-items { flex: 1; overflow-y: auto; padding: 1rem 0; }
.cart-empty { color: #76614e; padding: 2rem 0; text-align: center; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: .5rem 1rem; padding: .85rem 0; border-bottom: 1px solid #eadfcd; }
.cart-line small { color: #806b55; }
.cart-line button { border: 0; background: transparent; color: #7f2a22; cursor: pointer; font: inherit; font-size: .8rem; text-decoration: underline; }
.cart-summary { border-top: 2px solid #26150f; padding-top: 1rem; }
.cart-summary > div { display: flex; justify-content: space-between; font-size: 1.05rem; margin-bottom: .3rem; }
.cart-summary p { font-size: .76rem; color: #7a6650; margin-bottom: .9rem; }
.cart-backdrop { position: fixed; z-index: 40; inset: 0; background: rgba(22,13,9,.48); }

.checkout-dialog { width: min(680px, 94vw); border: 1px solid #cdbb9e; border-radius: 14px; padding: 0; background: #fffdf7; color: #221811; box-shadow: 0 22px 70px rgba(0,0,0,.3); }
.checkout-dialog::backdrop { background: rgba(22,13,9,.55); }
.checkout-dialog form { padding: 1.3rem; }
.checkout-copy { margin: 1rem 0; color: #66513f; }
.checkout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
.checkout-grid label, .checkout-note { display: flex; flex-direction: column; gap: .25rem; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.checkout-grid input, .checkout-note textarea { width: 100%; padding: .7rem .75rem; border-radius: 8px; border: 1px solid #cdbb9e; background: white; font: inherit; color: #221811; text-transform: none; letter-spacing: normal; }
.checkout-note { margin-top: .85rem; }
.checkout-actions { display: flex; justify-content: flex-end; gap: .65rem; margin-top: 1rem; }
.checkout-message { min-height: 1.2rem; margin-top: .75rem; color: #7f2a22; font-size: .85rem; }
.checkout-message.is-success { color: #2f6239; }

@media (max-width: 768px) {
  .shop-hero, .shop-info-grid { grid-template-columns: 1fr; }
  .shop-heading-row { align-items: center; }
  .checkout-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Generic ERPNext product variants
   ============================================================ */
.variant-selectors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: .65rem;
  margin: .2rem 0 1rem;
}
.variant-field { display: grid; gap: .3rem; font-size: .76rem; font-weight: 700; color: #5a4738; }
.variant-field span { text-transform: uppercase; letter-spacing: .06em; }
.variant-field select {
  width: 100%;
  min-height: 40px;
  padding: .45rem .65rem;
  border: 1px solid #d7b879;
  border-radius: 8px;
  background: #fffdf8;
  color: #251a14;
  font: inherit;
  font-weight: 600;
}
.variant-field select:focus { outline: 2px solid rgba(146,43,33,.15); border-color: #922b21; }
.shop-product-variant .shop-item-code { max-width: 62%; overflow-wrap: anywhere; }

/* Honor & Oak umbrella-site additions */
.nav { flex-wrap: wrap; }
.eyebrow { display: inline-block; margin-bottom: .55rem; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: #6f4f36; }
@media (max-width: 900px) {
  .site-header-inner { align-items: flex-start; }
  .nav { width: 100%; }
}
