/* ============================================================
   woodenspoons.ca — Custom Styles
   Bootstrap 5 override + page-specific components
   ============================================================ */

/* ---- Root tokens ----------------------------------------- */
:root {
  --green:        #2e7d52;
  --green-dark:   #236140;
  --green-light:  #d8ede3;
  --beige:        #f0ede8;
  --dark-band:    #2c2c2c;
  --body-color:   #333333;
  --muted-color:  #6c757d;
  --border-color: #e0ddd8;
  --radius:       4px;
  --font-sans:    'Inter', system-ui, -apple-system, sans-serif;
}

/* ---- Base ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font-sans);
  color: var(--body-color);
  background-color: #fff;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); }

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

/* ---- Bootstrap overrides ---------------------------------- */
.btn-primary {
  background-color: var(--green);
  border-color: var(--green);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 600;
  box-shadow: none !important;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--green-dark);
  border-color: var(--green-dark);
  color: #fff;
}

.btn-outline-primary {
  border-color: var(--green);
  color: var(--green);
  border-radius: var(--radius);
  font-weight: 600;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: var(--green);
  border-color: var(--green);
  color: #fff;
}

.btn-outline-dark {
  border-radius: var(--radius);
  font-weight: 500;
  font-size: .875rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 .2rem rgba(46,125,82,.15);
}

/* Badge wood types */
.badge-maple   { background-color: #e8d8c4; color: #6b4c2a; }
.badge-walnut  { background-color: #c9b69a; color: #3d2b1f; }
.badge-cherry  { background-color: #e8c4c4; color: #6b2a2a; }

/* ---- Navbar ----------------------------------------------- */
.site-nav {
  border-bottom: 1px solid var(--border-color);
  padding-top: .75rem;
  padding-bottom: .75rem;
}

.site-nav .navbar-brand {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--body-color);
  letter-spacing: -.5px;
}
.site-nav .navbar-brand:hover { color: var(--green); }

.site-nav .nav-link {
  font-size: .9rem;
  font-weight: 500;
  color: #444;
  padding-left: .85rem !important;
  padding-right: .85rem !important;
}
.site-nav .nav-link:hover { color: var(--green); }
.site-nav .nav-link.active { color: var(--green); }

.cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-size: 1.2rem;
  color: var(--body-color);
}
.cart-link:hover { color: var(--green); }

.cart-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--green);
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ---- Hero -------------------------------------------------- */
.hero-section {
  background-color: var(--beige);
  padding: 5rem 0 4rem;
}

.hero-eyebrow {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--green);
  text-transform: uppercase;
  margin-bottom: .75rem;
}

.hero-section h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.03em;
  color: #1a1a1a;
  margin-bottom: 1.25rem;
}

.hero-section .lead {
  font-size: 1rem;
  color: var(--muted-color);
  line-height: 1.65;
  margin-bottom: 2rem;
}

/* Hero product thumbnails */
.hero-thumbs {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  padding-left: 1.5rem;
}

@media (max-width: 991.98px) {
  .hero-thumbs {
    flex-direction: row;
    flex-wrap: wrap;
    padding-left: 0;
    margin-top: 2.5rem;
  }
  .hero-thumb-card {
    flex: 1 1 calc(50% - .3rem);
  }
}

.hero-thumb-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .5rem;
  transition: box-shadow .2s;
}
.hero-thumb-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,.08); }

.hero-thumb-card img {
  width: 60px;
  height: 50px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}

.hero-thumb-card span {
  font-size: .82rem;
  font-weight: 500;
  color: #555;
}

/* ---- Trust bar -------------------------------------------- */
.trust-bar {
  background-color: var(--green-light);
  padding: .85rem 0;
}

.trust-bar-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  align-items: center;
  gap: .5rem;
}

.trust-item {
  font-size: .8rem;
  font-weight: 700;
  color: var(--green);
  text-align: center;
  padding: .25rem .5rem;
  white-space: nowrap;
}

/* ---- Who We Sell To --------------------------------------- */
.section-eyebrow {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--muted-color);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.sells-to-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.sells-to-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.5rem;
  padding: 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  align-items: start;
  transition: border-color .2s;
}

.sells-to-row:hover { border-color: var(--border-color); }

.sells-to-row.active {
  border: 1px solid var(--border-color);
  background: #fff;
  box-shadow: 0 1px 6px rgba(0,0,0,.05);
}

.sells-to-row + .sells-to-row {
  border-top: 1px solid var(--border-color);
}
.sells-to-row.active + .sells-to-row {
  border-top: 1px solid transparent;
}

.sells-to-label {
  font-weight: 700;
  font-size: 1rem;
  color: #1a1a1a;
}

.sells-to-desc {
  font-size: .9rem;
  color: var(--muted-color);
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 575.98px) {
  .sells-to-row {
    grid-template-columns: 1fr;
    gap: .4rem;
  }
}

/* ---- Why Canadian Hardwood -------------------------------- */
.why-section {
  background-color: var(--beige);
}

.why-section h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -.02em;
}

.stat-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  background: #fff;
}

.stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--green);
  display: block;
  margin-bottom: .35rem;
}

.stat-card .stat-label {
  font-size: .85rem;
  color: var(--muted-color);
}

/* ---- Wholesale CTA band ----------------------------------- */
.wholesale-band {
  background-color: var(--dark-band);
}

.wholesale-band .band-text h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: .5rem;
}

.wholesale-band .band-text p {
  font-size: .9rem;
  color: #aaa;
  margin: 0;
}

.wholesale-band .band-cta {
  background-color: var(--beige);
  display: flex;
  align-items: center;
  justify-content: center;
}

.wholesale-band .band-cta a {
  font-weight: 700;
  font-size: 1rem;
  color: var(--body-color);
}
.wholesale-band .band-cta a:hover { color: var(--green); }

/* ---- Blog rows -------------------------------------------- */
.blog-row {
  display: grid;
  grid-template-columns: 130px 1fr 90px;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-color);
  align-items: center;
}

.blog-row:first-child { border-top: 1px solid var(--border-color); }

.blog-category {
  font-size: .78rem;
  font-weight: 700;
  color: var(--green);
  text-transform: capitalize;
}

.blog-title {
  font-weight: 700;
  font-size: .95rem;
  color: var(--body-color);
  line-height: 1.4;
}
.blog-title:hover { color: var(--green); }

.blog-readtime {
  font-size: .8rem;
  color: var(--muted-color);
  white-space: nowrap;
  text-align: right;
}

@media (max-width: 575.98px) {
  .blog-row { grid-template-columns: 90px 1fr; }
  .blog-readtime { display: none; }
}

/* ---- Product Cards ---------------------------------------- */
.product-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  transition: box-shadow .25s, transform .25s;
}

.product-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,.10);
  transform: translateY(-3px);
}

.product-card .card-img-top {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.product-card .card-body { padding: 1rem 1.1rem 1.25rem; }

.product-card .card-title {
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: .35rem;
  color: var(--body-color);
}

.product-card .product-price {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--body-color);
}

.product-card .product-price-old {
  text-decoration: line-through;
  font-size: .85rem;
  color: var(--muted-color);
  margin-left: .35rem;
}

/* ---- Page header ------------------------------------------ */
.page-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: .4rem;
}

.page-header p {
  color: var(--muted-color);
  margin: 0;
  font-size: .95rem;
}

/* ---- Product detail --------------------------------------- */
.product-gallery-main {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.product-gallery-thumbs {
  display: flex;
  gap: .5rem;
  margin-top: .65rem;
}

.thumb-btn {
  padding: 0;
  background: none;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .2s;
  line-height: 0;
}

.thumb-btn img {
  width: 70px;
  height: 56px;
  object-fit: cover;
  border-radius: calc(var(--radius) - 2px);
  display: block;
}

.thumb-btn:hover,
.thumb-btn.active { border-color: var(--green); }

.product-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: .5rem;
}

.product-price-display {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--body-color);
  margin-bottom: 1rem;
}

.star-rating { color: #f0a500; font-size: .9rem; }
.star-rating span { color: var(--muted-color); font-size: .85rem; margin-left: .25rem; }

.qty-group {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  width: fit-content;
}

.qty-group button {
  background: #f8f8f8;
  border: none;
  padding: .5rem .9rem;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--body-color);
  transition: background .15s;
}
.qty-group button:hover { background: #ebebeb; }

.qty-group input {
  width: 52px;
  border: none;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  text-align: center;
  font-weight: 600;
  font-size: .95rem;
  padding: .5rem 0;
  outline: none;
}

/* ---- Cart ------------------------------------------------- */
.cart-table img {
  width: 70px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.cart-table th {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted-color);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: .75rem;
}

.cart-table td { vertical-align: middle; }

.cart-product-name { font-weight: 600; font-size: .95rem; }
.cart-product-variant { font-size: .8rem; color: var(--muted-color); }

.cart-remove { color: var(--muted-color); font-size: 1rem; cursor: pointer; }
.cart-remove:hover { color: #c0392b; }

.order-summary-card {
  background: var(--beige);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.order-summary-card h5 {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--border-color);
}

.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: .9rem;
  margin-bottom: .6rem;
  color: var(--body-color);
}

.summary-line.total {
  font-weight: 700;
  font-size: 1rem;
  padding-top: .75rem;
  margin-top: .5rem;
  border-top: 1px solid var(--border-color);
}

/* ---- Checkout --------------------------------------------- */
.checkout-section-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border-color);
}

.checkout-summary-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .75rem;
}

.checkout-summary-item img {
  width: 52px;
  height: 44px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.checkout-summary-item .item-name { font-size: .85rem; font-weight: 600; }
.checkout-summary-item .item-variant { font-size: .75rem; color: var(--muted-color); }
.checkout-summary-item .item-price { margin-left: auto; font-size: .85rem; font-weight: 600; }

/* ---- Contact ---------------------------------------------- */
.contact-info-block {
  background: var(--beige);
  border-radius: var(--radius);
  padding: 2rem;
}

.contact-info-block h5 {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 1.25rem;
}

.contact-info-row {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: 1rem;
  font-size: .9rem;
}

.contact-info-row i {
  color: var(--green);
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: .1rem;
}

.map-placeholder {
  background: #e4e0db;
  border-radius: var(--radius);
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-color);
  font-size: .85rem;
  margin-top: 1.25rem;
  overflow: hidden;
}

.map-placeholder iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: var(--radius);
}

/* ---- Footer ----------------------------------------------- */
.site-footer {
  background-color: #1e1e1e;
  color: #aaa;
  padding: 3rem 0 1.5rem;
}

.footer-brand {
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: .5rem;
}

.footer-tagline {
  font-size: .85rem;
  color: #888;
  margin-bottom: 1.25rem;
}

.footer-social a {
  color: #888;
  font-size: 1.15rem;
  margin-right: .85rem;
  transition: color .2s;
}
.footer-social a:hover { color: #fff; }

.footer-nav { list-style: none; padding: 0; margin: 0; }
.footer-nav li + li { margin-top: .4rem; }
.footer-nav a { font-size: .85rem; color: #888; }
.footer-nav a:hover { color: #fff; }

@media (min-width: 768px) {
  .footer-nav { text-align: right; }
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid #333;
  font-size: .78rem;
  color: #555;
}

/* ---- Utilities -------------------------------------------- */
.section-pad { padding: 5rem 0; }
.section-pad-sm { padding: 3.5rem 0; }

.text-green { color: var(--green) !important; }
.bg-beige { background-color: var(--beige) !important; }

/* Breadcrumb */
.breadcrumb-item a { color: var(--muted-color); font-size: .85rem; }
.breadcrumb-item.active { color: var(--body-color); font-size: .85rem; }
.breadcrumb-item + .breadcrumb-item::before { color: #ccc; }

/* Accordion custom */
.accordion-button:not(.collapsed) {
  background-color: transparent;
  color: var(--green);
  box-shadow: none;
}
.accordion-button:focus { box-shadow: none; }
.accordion-item { border-color: var(--border-color); }

/* Pagination */
.page-link { color: var(--green); border-color: var(--border-color); }
.page-link:hover { color: var(--green-dark); background-color: var(--beige); border-color: var(--border-color); }
.page-item.active .page-link { background-color: var(--green); border-color: var(--green); }

/* Filter pills */
.filter-pill {
  border: 1px solid var(--border-color);
  border-radius: 100px;
  padding: .35rem 1rem;
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  background: #fff;
  color: var(--body-color);
  transition: all .15s;
}
.filter-pill:hover,
.filter-pill.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

/* "Also like" section title */
.section-title-sm {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--border-color);
}

/* Smooth transitions */
a, button, .product-card, .hero-thumb-card, .filter-pill {
  transition-duration: .2s;
  transition-timing-function: ease;
}
