/*
Theme Name: The Beam Studio II
Theme URI: https://thebeamstudio.co.uk/
Description: Barebones Blockbase child theme with WooCommerce hooks and block header/footer on Woo templates.
Author: The Beam Studio
Template: blockbase
Version: 1.0.6
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: tbs
License: Unlicense
*/


/* Base font + sane defaults (no downloads) */
:root {
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI",
               Roboto, "Helvetica Neue", Arial, "Noto Sans",
               "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji",
               sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas,
               "Liberation Mono", monospace;
  --header-min: 100px;
  --header-max: 200px;
  --header-scale: 12vh;
  --header-logo-max: clamp(70px, 12vw, 140px);
  --blue-colour: #34495e;
}

html {
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  font-variant-ligatures: contextual common-ligatures;
}

/* Make headings/buttons/inputs match the base font */
body, h1,h2,h3,h4,h5,h6, p, li { margin: 0; }
*, *::before, *::after { box-sizing: border-box; }

p { margin-top: 1em; margin-bottom: 1em; }
button, input, select, textarea {
  font: inherit; /* inherit family, size, weight, line-height */
}

/* Optional: better code font */
code, pre, kbd, samp {
  font-family: var(--font-mono);
  font-size: 0.95em;
}

/* Optional: slightly crisper on WebKit */
@supports (-webkit-font-smoothing: antialiased) {
  html { -webkit-font-smoothing: antialiased; }
}


body {
  min-height: 100%;
}

.site, #page, .wp-site-blocks {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main, .site-main, #primary {
  flex: 1 0 auto;
}

.site-footer, footer[role="contentinfo"] {
  flex-shrink: 0;
}

.wp-site-blocks > .woocommerce.product {
  margin-block-start: 0;
}

.woocommerce div.product {
    margin-top: 0;
}
.woocommerce div.product:nthChild(1) {
  margin-block-start: 0;
}

.wc-block-components-button:not(.is-link).is-style-outline:hover, 
.wc-block-components-button:not(.is-link).outlined:hover {
  background-color: #34495e;
}
h1.wp-block-post-title, h1.wp-block-heading {
  margin: var(--wp--preset--spacing, 1rem) 0;
  text-align: center;
  color: var(--blue-colour);
}

h2.wp-block-heading {
  margin: var(--wp--preset--spacing, 1rem) 0;
  text-align: center;
  color: var(--blue-colour);
}

a {
  color: inherit;
  text-decoration: none;
}
a:hover, a:focus {
  text-decoration: underline;
}
h2.woocommerce-loop-product__title, h2.wc-block-grid__product-title {
  font-size: 80%;
  font-weight: normal;
}
div.wc-block-grid__product-title {
  font-weight: normal;
}
li.wc-block-grid__product {
  text-align: left;
}
.wc-block-components-product-summary {
  font-style: italic;
}
li.wc-block-grid__product .wc-block-grid__product-add-to-cart {
  display: none;
}

.single_add_to_cart_button.button {
  background-color: #34495e;
  color: white;
}
/*************************
 * Header 
 *************************/

/* Layout spacing */
.tbs-header-wrap { 
  min-height: clamp(var(--header-min), var(--header-scale), var(--header-max));
  padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
  margin-top: var(--wp--preset--spacing--20);
}
.tbs-checkout-header-wrap { 
  height: 5vh;
  padding: var(--wp--preset--spacing--10) var(--wp--preset--spacing--20);
  margin-top: var(--wp--preset--spacing--20);
} 

.tbs-header {
  display: flex;
  justify-content: space-between;  /* logo | nav | actions */
  gap: 1rem;
  padding: 0 1rem;
}

/* Center column */
.tbs-header-col.tbs-center { 
  display: flex; 
  justify-content: center; 
  align-items: center; 
}
.tbs-header-col.tbs-center > *{
  margin-left:auto;          /* help for blocks with intrinsic width */
  margin-right:auto;
}

/* Logo: 125px tall, auto width */
.tbs-logo-wrap .wp-block-site-logo img { height:60px; width:auto; }

/* Icon links */
.tbs-header-actions { gap: 16px; }
.tbs-icon-link { display:inline-flex; align-items:center; line-height:1; text-decoration:none; }

/* Visibility helpers */
.tbs-desktop-only { display:block; }
.tbs-mobile-only  { display:none; }

.wp-block-navigation-item__label {
  text-transform: uppercase;
  font-size: 80%;
}
.wp-block-navigation-item__label:hover {
  text-decoration: underline;
}

/* Logo: center the site logo and cap its height inside the header */
.tbs-header-logo{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  max-height: var(--header-logo-max);
}
.tbs-header-logo img{
  display: block;
  height: var(--header-logo-max) !important;
  width: auto !important;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}
.tbs-checkout-header-logo {
    border-bottom: 1px solid var(--blue-colour);
}

.wp-block-site-logo {
  height: auto;
  max-height: var(--header-logo-max);
  width: auto;
}
.tbs-center:has(.wp-block-site-logo) {
  display: flex;
}
.tbs-right {
  display: flex;
  justify-content: flex-end;
}
header .tbs-classic-menu__list li {
  font-size: --var(--wp--preset--font-size--large, 1.25rem);
}
.wc-block-mini-cart__button .wc-block-mini-cart__icon, .tbs-account-icon, .search-toggle__icon {
    height: max(1.5em, 1.8vw);
    margin: 0;
    width: max(1.5em, 1.8vw);
}


/* Simple horizontal nav */
.site-nav ul{
  display: flex;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a{ text-decoration: none; }

/* Optional: wrap nav on small screens */
@media (max-width: 700px){
  .header-inner{
    flex-wrap: wrap;
    row-gap: .5rem;
  }
  .site-nav{ order: 3; width: 100%; }
  .site-nav ul{ justify-content: center; flex-wrap: wrap; }
  .header-actions{ order: 2; }
}

/* Optional: prevent layout shift if the logo image loads late */
.site-logo img{
  aspect-ratio: auto; /* or set a known ratio, e.g., 4/1 */
}


/*************************
 * Footer
 *************************/
/* Vertical menus, no bullets */
.tbs-footer-menu .wp-block-navigation__container {
  list-style: none;
  margin: 0;
  padding: 0;
  gap: unset;
}
.tbs-footer-menu .wp-block-navigation-item { margin: 0 0 .5rem 0; }

/* Spacing + centering */
.tbs-footer { padding: var(--wp--preset--spacing--40) 0; }
.tbs-footer-copy { gap: .5rem; text-align: center; }
.tbs-footer-copy .wp-block-site-title { margin: 0; }



@media (max-width: 782px) {
  /* Stack columns but keep a usable top bar */
  .tbs-desktop-only { display:none; }
  .tbs-mobile-only  { display:block; }
  .tbs-header-grid .wp-block-column { flex-basis:100% !important; }
  .tbs-header-col.tbs-center { justify-content:flex-start; } /* logo left on mobile */
  .tbs-header-actions { display:none; } /* hide icons on mobile; remove if you want them visible */
}

/* ——— Misc ——— */
.product-breadcrumbs{text-align:center;color:#000}

/* Site Header */
.site-header {
  margin: 0;
  padding: 0;
}

/* Category Header - remove empty space */
.wp-block-query-title {
  margin: 0;
  padding: 0;
}

/* Header Search */
.tbs-search-wrap{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}
.tbs-search__toggle{background:transparent;border:0;padding:.25rem;cursor:pointer;line-height:1;display:inline-flex;align-items:center}
.tbs-search__panel{flex:1 1 360px}
.tbs-search-wrap:not(.is-open) .tbs-search__panel{display:none}
.tbs-search__panel .wp-block-search__inside-wrapper{width:100%}

@media (max-width:782px){
  .tbs-search__panel{flex-basis:100%} /* wraps onto a new line when narrow */
}

.tbs-custom-input-wrapper input {
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: .25rem .5rem !important;
}
.tbs-custom-input-wrapper input:focus {
  outline-offset: 0 !important;
}
.tbs-custom-input-wrapper input:active {
  outline: none !important;
}
.input-text.qty.text {
  border-radius: 10px;
  padding: .25rem .5rem !important;
}
.input-text.qty.text:focus {
  outline-offset: 0 !important;
}
.input-text.qty.text:active {
  outline: none !important;
}

form.cart {
    border: 1px solid #888;
    border-radius: 10px;
    padding: 1rem 1rem;
    background: #eee;
}
form.cart input {
  background: white;
}
abbr[title] {
  text-decoration: none !important;
  border-bottom: none;
}
.checkout-button.button.wc-forward.wp-element-button,
.wc-block-components-button.wc-block-cart__submit-button {
  background: var(--blue-colour);
  color: white;
}
.wp-block-add-to-cart-form.wc-block-add-to-cart-form.wc-block-add-to-cart-form--input.wp-block-woocommerce-add-to-cart-form > table > tbody > tr > th  {
  width: 30%;
}
.wp-block-add-to-cart-form.wc-block-add-to-cart-form.wc-block-add-to-cart-form--input.wp-block-woocommerce-add-to-cart-form > table > tbody > tr > th  {
  width: 70%;
}
table.variations {
  width: 100%;

}
table.variations th {
  width: 30%;
}
table.variations td {
  width: 70%;
}
.tbs-ident {
	margin-left: 1em;
}

figure.wp-block-embed.is-type-video.wp-embed-aspect-16-9 {
  max-width: 50vw;
}
/* todo - add mobile adjustments... */
