/*
Theme Name: twofishe
Theme URI: https://twofishe.com
Author: Twofishe
Description: Lightweight WooCommerce theme shared by the Twofishe niche sites. The name, accent colour, logos and top bar for each site are set under Twofishe in the dashboard menu.
Version: 0.5.23
Requires at least: 6.4
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: twofishe
*/

/* ---------- fonts (served from the site, no Google) ---------- */
@font-face { font-family: "Sulphur Point"; font-weight: 400; font-display: swap; src: url(assets/fonts/sulphur-point-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Sulphur Point"; font-weight: 700; font-display: swap; src: url(assets/fonts/sulphur-point-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 400; font-display: swap; src: url(assets/fonts/instrument-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 700; font-display: swap; src: url(assets/fonts/instrument-sans-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 600; font-display: swap; src: url(assets/fonts/instrument-sans-latin-600-normal.woff2) format("woff2"); }

/* ---------- the twofishe look ---------- */
:root {
  --tf-accent: #2D7A73; --tf-accent-light: #7CC4BA;
  --tf-navy: #273647; --tf-grey: #858588; --tf-text: #333333; --tf-line: #E6E6E6; --tf-bg: #F4F4F4;
  --tf-head: "Sulphur Point", system-ui, sans-serif; --tf-body: "Instrument Sans", system-ui, sans-serif;
  --tf-max: 1180px; --tf-gutter: 16px; --tf-radius: 8px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--tf-bg); color: var(--tf-text); font: 400 16px/1.6 var(--tf-body); }
img { max-width: 100%; height: auto; }
a { color: var(--tf-accent); }
a:hover { color: var(--tf-navy); }
h1, h2, h3, h4 { font-family: var(--tf-head); font-weight: 700; line-height: 1.2; color: var(--tf-navy); margin: 0 0 .5em; }
h1 { font-size: 48px; } h2 { font-size: 32px; } h3 { font-size: 22px; }
h2, h3, .tf-section-title { text-transform: lowercase; }
/* product names keep their own capitals, wherever they show (basket, checkout, related, mini lists) */
.wc-block-components-product-name, .woocommerce-loop-product__title, .product_title, .wc-block-grid__product-title { text-transform: none; }
@media (max-width: 849px) { h1 { font-size: 36px; } h2 { font-size: 26px; } }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.tf-skip:focus { clip: auto; width: auto; height: auto; z-index: 100; background: #fff; padding: 8px 12px; left: 8px; top: 8px; }
.tf-wrap { max-width: var(--tf-max); margin: 0 auto; padding: 0 var(--tf-gutter); }
small, .tf-grey { color: var(--tf-grey); }
hr { border: 0; border-top: 1px solid var(--tf-line); }
body.tf-locked { overflow: hidden; }

/* buttons: pill, lowercase */
.tf-button, .button, button.button, input[type="submit"], .wp-block-button__link, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button {
  display: inline-block; border: 0; border-radius: 99px; padding: 12px 26px; background: var(--tf-navy); color: #fff !important;
  font: 700 16px/1.2 var(--tf-head); text-transform: lowercase; text-decoration: none; cursor: pointer;
}
.tf-button:hover, .button:hover, .wp-block-button__link:hover, .woocommerce a.button:hover, .woocommerce button.button:hover { background: var(--tf-accent); color: #fff; }
.woocommerce button.button.alt, .woocommerce a.button.alt, .single_add_to_cart_button { background: var(--tf-accent) !important; }
.woocommerce button.button.alt:hover, .single_add_to_cart_button:hover { background: var(--tf-navy) !important; }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--tf-navy) !important; box-shadow: inset 0 0 0 2px var(--tf-navy); }
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--tf-navy); color: #fff !important; }
input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="search"], input[type="tel"], input[type="number"], select, textarea {
  font: inherit; border: 1px solid var(--tf-line); border-radius: 6px; padding: 10px 12px; background: #fff; color: var(--tf-text); max-width: 100%;
}

/* white cards on light grey */
.tf-card { background: #fff; border-radius: var(--tf-radius); padding: 32px 36px; margin: 24px auto; max-width: var(--tf-max); }
@media (max-width: 700px) { .tf-card { padding: 22px 18px; margin: 14px auto; } }
.tf-page { padding-top: 24px; padding-bottom: 40px; }
.tf-page__title { text-transform: lowercase; }
.tf-content > :first-child { margin-top: 0; }
.tf-content p a:not(.button), .tf-content li:not([class]) > a:not(.button) { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- header ---------- */
.tf-header { position: sticky; top: 0; z-index: 50; background: #fff; }
.admin-bar .tf-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .tf-header { top: 0; position: relative; } }
.tf-topbar { background: var(--tf-accent); color: #fff; font: 700 15px/1.3 var(--tf-head); text-align: center; }
.tf-topbar__lines { margin: 0; display: grid; padding: 7px 0; }
.tf-topbar__line { grid-area: 1 / 1; opacity: 0; transition: opacity .6s ease; }
.tf-topbar__line.is-on { opacity: 1; }
.tf-topbar a { color: #fff; }
.tf-header__main { border-bottom: 1px solid var(--tf-line); }
.tf-header__row { display: flex; align-items: center; gap: 24px; min-height: 70px; }
.tf-logo { display: block; flex: 0 0 auto; line-height: 0; }
.tf-logo img { width: 220px; max-height: 56px; object-fit: contain; object-position: left center; }
.tf-wordmark { font: 700 26px/1 var(--tf-head); color: var(--tf-navy); text-decoration: none; }
.tf-wordmark span { color: var(--tf-accent); }
.tf-nav { flex: 1 1 auto; }
.tf-header__tools { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.tf-search-toggle, .tf-burger { background: none; border: 0; padding: 6px; color: var(--tf-navy); cursor: pointer; line-height: 0; }
.tf-basket { position: relative; color: var(--tf-navy); line-height: 0; padding: 6px; }
.tf-basket__count { position: absolute; top: -2px; right: -6px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--tf-accent); color: #fff; font: 700 11px/18px var(--tf-body); text-align: center; padding: 0 4px; }
.tf-basket__count.is-empty { display: none; }
.tf-search { border-top: 1px solid var(--tf-line); padding: 12px 0; }
.tf-search .tf-wrap { display: flex; gap: 10px; }
.tf-search input[type="search"] { flex: 1 1 auto; }

/* computer menu */
.tf-menu { list-style: none; margin: 0; padding: 0; }
.tf-nav .tf-menu { display: flex; flex-wrap: nowrap; gap: 4px 22px; }
.tf-nav .tf-menu > li { position: relative; }
.tf-nav .tf-menu > li > a { display: block; padding: 24px 0; font: 700 17px/1 var(--tf-head); color: var(--tf-navy); text-decoration: none; text-transform: lowercase; white-space: nowrap; }
.tf-nav .tf-menu > li > a:hover, .tf-nav .tf-menu > li.current-menu-item > a, .tf-nav .tf-menu > li.current-menu-ancestor > a { color: var(--tf-accent); }
.tf-nav .menu-item-has-children > a::after { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 0 3px 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.tf-nav .sub-menu { list-style: none; margin: 0; padding: 10px 0; position: absolute; left: -15px; top: 100%; min-width: 230px; background: #fff; border-radius: var(--tf-radius); box-shadow: 0 8px 30px rgba(39,54,71,.15); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s; }
.tf-nav .menu-item-has-children:hover > .sub-menu, .tf-nav .menu-item-has-children.is-open > .sub-menu, .tf-nav .menu-item-has-children:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.tf-nav .sub-menu a { display: block; padding: 8px 20px; font: 400 15px/1.3 var(--tf-body); color: var(--tf-text); text-decoration: none; text-transform: lowercase; }
.tf-nav .sub-menu a:hover { background: var(--tf-bg); color: var(--tf-accent); }
@media (min-width: 850px) and (max-width: 1100px) { .tf-nav .tf-menu > li > a { font-size: 16px; } .tf-nav .tf-menu { gap: 4px 16px; } .tf-logo img { width: 180px; } }
.tf-burger { display: none; }
.tf-burger span { display: block; width: 22px; height: 2px; background: currentColor; margin: 5px 0; border-radius: 2px; }
@media (max-width: 849px) {
  .tf-nav { display: none; }
  .tf-burger { display: block; }
  .tf-header__row { gap: 10px; min-height: 60px; }
  .tf-logo { margin: 0 auto; }
  .tf-logo img { width: 170px; max-height: 46px; object-position: center; }
  .tf-header__tools { margin-left: 0; gap: 6px; }
  .tf-topbar { font-size: 13px; }
}

/* phone menu panel */
.tf-panel { position: fixed; inset: 0; z-index: 100; background: rgba(39,54,71,0); transition: background .25s; }
.tf-panel.is-open { background: rgba(39,54,71,.45); }
.tf-panel__inner { position: absolute; top: 0; bottom: 0; left: 0; width: min(320px, 86vw); background: #fff; padding: 56px 22px 30px; overflow-y: auto; transform: translateX(-100%); transition: transform .25s ease; }
.tf-panel.is-open .tf-panel__inner { transform: none; }
.tf-panel__close { position: absolute; top: 10px; right: 12px; background: none; border: 0; font-size: 32px; line-height: 1; color: var(--tf-navy); cursor: pointer; padding: 4px 8px; }
.tf-panel__search input { width: 100%; margin-bottom: 14px; }
.tf-panel .tf-menu > li { border-bottom: 1px solid var(--tf-line); }
.tf-panel .tf-menu a { display: block; padding: 13px 0; font: 700 16px/1.2 var(--tf-head); color: var(--tf-navy); text-decoration: none; text-transform: lowercase; }
.tf-panel .menu-item-has-children > a::after { content: "+"; float: right; font-weight: 400; }
.tf-panel .menu-item-has-children.is-open > a::after { content: "\2212"; }
.tf-panel .sub-menu { list-style: none; margin: 0 0 10px; padding: 0 0 0 12px; display: none; }
.tf-panel .is-open > .sub-menu { display: block; }
.tf-panel .sub-menu a { font: 400 15px/1.3 var(--tf-body); padding: 9px 0; }

/* ---------- footer ---------- */
.tf-footer { background: var(--tf-navy); color: rgba(255,255,255,.85); margin-top: 40px; font-size: 15px; }
.tf-footer a { color: #fff; text-decoration: none; }
.tf-footer a:hover { color: var(--tf-accent-light); }
.tf-footer__brand { flex: 1 1 260px; max-width: 360px; }
.tf-footer__logo img { width: 180px; }
.tf-footer__logo .tf-wordmark { color: #fff; }
.tf-footer__logo .tf-wordmark span { color: var(--tf-accent-light); }
.tf-footer__group { flex: 1 1 100%; font: 700 14px/1.4 var(--tf-head); text-transform: lowercase; }
.tf-footer__group .tf-group__here { color: var(--tf-accent-light); }
.tf-footer__small { border-top: 1px solid rgba(255,255,255,.12); padding: 14px 0; font-size: 12px; line-height: 1.5; color: rgba(255,255,255,.7); }

/* ---------- home page ---------- */
.tf-page--wide { padding-top: 0; }
.tf-page--wide > .tf-page__title { margin-top: 24px; }
.tf-page--wide > .tf-content > .tf-card:first-child { margin-top: 24px; }
.tf-kicker { font: 700 14px/1.2 var(--tf-head); color: var(--tf-accent); text-transform: lowercase; letter-spacing: .02em; margin-bottom: 8px; }
.tf-lead { font-size: 18px; color: #555; }
.tf-hero .wp-block-columns { gap: 36px; margin: 0; }
.tf-hero__img img { border-radius: 6px; display: block; width: 100%; }
.tf-section-title { display: flex; align-items: baseline; gap: 14px; font-size: 26px; }
.tf-more { font: 400 15px/1 var(--tf-body); text-transform: none; color: var(--tf-accent); }
.wp-block-buttons { gap: 10px; }

/* shop by range tiles: plain flex, no grid tricks, so iPhone Safari matches */
.tf-ranges { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.tf-ranges li { flex: 0 0 calc((100% - 3 * 14px) / 4); min-width: 0; }
.tf-ranges a { display: block; height: 100%; background: #fff; border: 1px solid var(--tf-line); border-radius: var(--tf-radius); overflow: hidden; text-decoration: none; color: var(--tf-navy); transition: border-color .15s; }
.tf-ranges a:hover { border-color: var(--tf-accent); }
.tf-ranges__img { display: block; aspect-ratio: 1; background: #fff; }
.tf-ranges__img img { width: 100%; height: 100%; object-fit: contain; padding: 8px; display: block; }
.tf-ranges__text { display: block; padding: 8px 12px 14px; text-align: center; }
.tf-ranges__name { display: block; font: 700 16px/1.3 var(--tf-head); }
.tf-ranges__count { display: block; font-size: 13px; color: var(--tf-accent); }
@media (max-width: 1000px) { .tf-ranges li { flex-basis: calc((100% - 2 * 14px) / 3); } }
.tf-section-title.tf-brands-title { margin-top: 44px; }
@media (max-width: 549px) {
  .tf-ranges { gap: 8px; }
  .tf-ranges li { flex-basis: 100%; }
  .tf-ranges a { display: flex; align-items: center; }
  .tf-ranges__img { flex: 0 0 72px; width: 72px; }
  .tf-ranges__img img { padding: 6px; }
  .tf-ranges__text { padding: 6px 14px; text-align: left; }
}

/* numbered steps */
.tf-steps { display: flex; gap: 36px; position: relative; margin-top: 10px; }
.tf-step { position: relative; flex: 1 1 0; min-width: 0; }
.tf-steps::before { content: ""; position: absolute; top: 28px; left: 28px; right: calc((100% - 72px) / 3 - 28px); border-top: 2px dashed var(--tf-accent-light); opacity: .6; }
.tf-num { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: var(--tf-accent); color: #fff; font: 700 24px/1 var(--tf-head); margin-bottom: 16px; box-shadow: 0 0 0 8px #fff; position: relative; }
.tf-step h3 { font-size: 22px; margin: 0 0 6px; }
.tf-step p { color: #555; margin: 0; }
@media (max-width: 700px) { .tf-steps { flex-direction: column; gap: 24px; } .tf-steps::before { display: none; } }

/* ---------- shop, range and product grids ---------- */
.tf-crumbs { font-size: 14px; color: var(--tf-grey); margin: 0 0 14px; text-transform: lowercase; }
.tf-crumbs a { color: var(--tf-grey); text-decoration: none; }
.tf-crumbs a:hover { color: var(--tf-accent); }
.tf-crumb-sep { margin: 0 8px; opacity: .6; }
.woocommerce-products-header__title, .tf-shop h1.page-title { text-transform: lowercase; margin-bottom: 8px; }
.term-description { color: #555; max-width: 760px; }
.woocommerce-result-count { color: var(--tf-grey); font-size: 14px; margin: 0 0 14px; }
.woocommerce ul.products, ul.products { list-style: none; margin: 0 0 30px; padding: 0; display: flex; flex-wrap: wrap; gap: 20px; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none; }
.woocommerce ul.products li.product, ul.products li.product { float: none; width: auto; margin: 0; flex: 0 0 calc((100% - 3 * 20px) / 4); min-width: 0; background: #fff; border-radius: var(--tf-radius); overflow: hidden; padding: 0 0 16px; text-align: left; }
/* WooCommerce's phone sheet sets 48% widths; the flex-basis rules below decide instead */
.woocommerce ul.products[class*=columns-] li.product { width: auto; float: none; margin: 0; clear: none; }
ul.products.columns-3 li.product { flex-basis: calc((100% - 2 * 20px) / 3); }
ul.products.columns-6 li.product { flex-basis: calc((100% - 5 * 20px) / 6); }
ul.products li.product a img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; margin: 0 0 10px; display: block; }
.woocommerce ul.products li.product .woocommerce-loop-product__title, .woocommerce ul.products li.product .woocommerce-loop-category__title { font: 400 15px/1.35 var(--tf-body); color: var(--tf-text); padding: 0 14px; margin: 0 0 6px; }
.woocommerce ul.products li.product .price { display: block; padding: 0 14px; font: 700 16px/1.2 var(--tf-head); color: var(--tf-navy); }
ul.products li.product .price del { color: var(--tf-grey); font-weight: 400; }
.woocommerce ul.products li.product .button { margin: 10px 14px 0; padding: 9px 18px; font-size: 14px; }
ul.products li.product a { text-decoration: none; }
ul.products li.product .onsale { position: absolute; margin: 10px; background: var(--tf-accent); color: #fff; border-radius: 99px; padding: 3px 10px; font: 700 12px/1.4 var(--tf-head); min-height: 0; min-width: 0; line-height: 1.4; }
ul.products li.product { position: relative; }
@media (max-width: 849px) {
  .woocommerce ul.products li.product, ul.products li.product, ul.products.columns-3 li.product { flex-basis: calc((100% - 2 * 20px) / 3); }
}
@media (max-width: 549px) {
  .woocommerce ul.products, ul.products { gap: 12px; }
  .woocommerce ul.products li.product, ul.products li.product, ul.products.columns-3 li.product, ul.products.columns-6 li.product { flex-basis: calc((100% - 12px) / 2); }
  .woocommerce ul.products li.product .button { display: none; }
}

/* shop page: range tiles above the products (Woo "show categories & products") */
.tf-shop ul.products li.product-category { padding-bottom: 10px; }
.tf-shop ul.products li.product-category .woocommerce-loop-category__title { font: 700 15px/1.3 var(--tf-head); text-transform: lowercase; color: var(--tf-navy); }
.tf-shop ul.products li.product-category mark.count { background: none; color: var(--tf-accent); font-weight: 400; font-size: 13px; }
@media (min-width: 850px) {
  body.post-type-archive-product ul.products li.product-category { flex-basis: calc((100% - 5 * 20px) / 6); }
}
@media (max-width: 549px) {
  /* phones: range tiles become text buttons in a row, so products start near the top */
  body.post-type-archive-product ul.products li.product-category { flex: 0 1 auto !important; width: auto !important; padding: 0; background: none; order: -2; }
  body.post-type-archive-product ul.products::before { content: ""; display: block; flex-basis: 100%; height: 0; order: -1; }
  body.post-type-archive-product ul.products li.product-category a img, body.post-type-archive-product ul.products li.product-category mark.count { display: none !important; }
  .post-type-archive-product ul.products li.product-category .woocommerce-loop-category__title { margin: 0; padding: 7px 12px; background: #fff; border: 1px solid var(--tf-line); border-radius: 99px; font-size: 13px; white-space: nowrap; }
  .post-type-archive-product ul.products li.product-category + li.product:not(.product-category) { margin-top: 6px; }
}
.woocommerce-pagination ul { list-style: none; display: flex; gap: 6px; padding: 0; justify-content: center; border: 0 !important; }
.woocommerce-pagination li { border: 0 !important; }
.woocommerce-pagination a, .woocommerce-pagination span { display: block; min-width: 38px; padding: 8px 10px; text-align: center; background: #fff; border-radius: 99px; text-decoration: none; color: var(--tf-navy); }
.woocommerce-pagination span.current { background: var(--tf-navy); color: #fff; }

/* ---------- product page ---------- */
.single-product .tf-shop { padding-top: 15px; }
.single-product div.product { display: flex; flex-wrap: wrap; gap: 36px; background: #fff; border-radius: var(--tf-radius); padding: 30px; position: relative; }
.single-product div.product .woocommerce-product-gallery { flex: 1 1 calc(55% - 18px); min-width: 0; float: none !important; width: auto !important; margin: 0 !important; position: relative; }
.single-product div.product .summary { flex: 1 1 calc(45% - 18px); min-width: 0; float: none !important; width: auto !important; margin: 0 !important; }
.single-product div.product .woocommerce-tabs, .single-product div.product .related, .single-product div.product .upsells { flex: 1 1 100%; min-width: 0; }
.single-product h1.product_title { font-size: 34px; line-height: 1.2; text-transform: none; }
.single-product .summary .price { font: 700 24px/1.2 var(--tf-head); color: var(--tf-navy); margin: 0 0 18px; }
.single-product .summary form.cart { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 14px; }
.single-product .summary form.cart .quantity input { width: 70px; text-align: center; padding: 11px 6px; }
.single-product .stock, .woocommerce div.product .stock { color: var(--tf-accent); font-weight: 700; }
.single-product .stock.out-of-stock, .woocommerce div.product .stock.out-of-stock { color: #9A5B12; }
.woocommerce-product-gallery__image img { border-radius: 6px; }
.woocommerce-product-gallery .flex-control-thumbs { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.woocommerce-product-gallery .flex-control-thumbs li { width: 72px; cursor: pointer; }
.woocommerce-product-gallery .flex-control-thumbs img { opacity: .6; border-radius: 4px; }
.woocommerce-product-gallery .flex-control-thumbs img.flex-active, .woocommerce-product-gallery .flex-control-thumbs img:hover { opacity: 1; }
.woocommerce-product-gallery__trigger { position: absolute; top: 10px; right: 10px; z-index: 5; }
.woocommerce-tabs ul.tabs { list-style: none; display: flex; gap: 22px; padding: 0; margin: 0 0 16px; border-bottom: 1px solid var(--tf-line); }
.woocommerce-tabs ul.tabs li a { display: block; padding: 10px 0; font: 700 16px/1 var(--tf-head); text-transform: lowercase; color: var(--tf-grey); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.woocommerce-tabs ul.tabs li.active a { color: var(--tf-navy); border-bottom-color: var(--tf-accent); }
.woocommerce-tabs .panel h2:first-child { display: none; }
.related > h2, .upsells > h2 { font-size: 24px; }
@media (max-width: 849px) {
  .single-product div.product { padding: 16px; gap: 20px; }
  .single-product div.product .woocommerce-product-gallery, .single-product div.product .summary { flex-basis: 100%; }
  .single-product h1.product_title { font-size: 26px; }
}

/* ---------- basket, checkout, account, notices ---------- */
.woocommerce-cart .tf-content, .woocommerce-checkout .tf-content { background: #fff; border-radius: var(--tf-radius); padding: 28px; }
@media (max-width: 700px) { .woocommerce-cart .tf-content, .woocommerce-checkout .tf-content { padding: 16px; } }
.woocommerce-message, .woocommerce-info, .woocommerce-error, .wc-block-components-notice-banner { border-radius: var(--tf-radius); }
.woocommerce-message, .woocommerce-info { border-top-color: var(--tf-accent) !important; }
.woocommerce-message::before, .woocommerce-info::before { color: var(--tf-accent) !important; }
.woocommerce-order { background: #fff; border-radius: var(--tf-radius); padding: 28px; }

/* product names stay as typed (WooCommerce prints them as h2 in grids) */
ul.products li.product h2, ul.products li.product h3, .single-product h1.product_title { text-transform: none; }
.tf-content .tf-ranges li > a:not(.button), .tf-content ul.products li > a:not(.button) { text-decoration: none; }
.tf-hero { padding-top: 36px; padding-bottom: 36px; }
.tf-hero h1 { margin-bottom: 14px; }
/* WooCommerce's own colours and sizes for prices and tabs, brought into line */
.woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--tf-navy); font: 700 24px/1.2 var(--tf-head); }
.woocommerce ul.products li.product .price { color: var(--tf-navy); font: 700 16px/1.2 var(--tf-head); margin: 0; }
.woocommerce div.product .woocommerce-tabs ul.tabs { padding: 0; }
.woocommerce div.product .woocommerce-tabs ul.tabs::before, .woocommerce div.product .woocommerce-tabs ul.tabs li::before, .woocommerce div.product .woocommerce-tabs ul.tabs li::after { display: none; }
.woocommerce div.product .woocommerce-tabs ul.tabs li { background: none; border: 0; border-radius: 0; margin: 0; padding: 0; }
.woocommerce div.product .woocommerce-tabs ul.tabs li a { padding: 10px 0; }

/* product page photos: white space between the main photo and the small ones under it (David, 20 Nov) */
.woocommerce div.product div.images .flex-control-thumbs, .woocommerce-product-gallery .flex-control-thumbs { margin-top: 14px; gap: 10px; }
.woocommerce div.product div.images .flex-control-thumbs li { width: 110px; margin: 0; float: none; }
.woocommerce-product-gallery .flex-control-thumbs img { border-radius: 6px; }

/* ======================================================================
   0.2.0: features matched to the Flatsome site (David, 20 Nov)
   ====================================================================== */

/* header: "login" link, "basket / £total", mini-basket drop-down (computers) */
.tf-account { font: 700 16px/1 var(--tf-head); color: var(--tf-navy); text-decoration: none; text-transform: lowercase; padding: 6px 0; }
.tf-account:hover { color: var(--tf-accent); }
.tf-basket { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.tf-basket__label { font: 700 16px/1 var(--tf-head); text-transform: lowercase; white-space: nowrap; }
.tf-basket__icon { position: relative; line-height: 0; }
.tf-basket:hover { color: var(--tf-accent); }
.tf-minicart { position: relative; }
.tf-minicart__drop { position: absolute; right: -10px; top: 100%; width: 320px; padding-top: 12px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s; z-index: 60; }
.tf-minicart:hover .tf-minicart__drop, .tf-minicart:focus-within .tf-minicart__drop { opacity: 1; visibility: visible; transform: none; }
.tf-minicart__drop .widget_shopping_cart_content { background: #fff; border-radius: var(--tf-radius); box-shadow: 0 8px 30px rgba(39,54,71,.15); padding: 16px 18px; font-size: 14px; max-height: 70vh; overflow-y: auto; }
.tf-minicart__drop ul.cart_list { list-style: none; margin: 0; padding: 0; }
.tf-minicart__drop ul.cart_list li { position: relative; display: block; padding: 10px 26px 10px 0; border-bottom: 1px solid var(--tf-line); min-height: 64px; }
.tf-minicart__drop ul.cart_list li a:not(.remove) { display: block; color: var(--tf-text); text-decoration: none; font-weight: 400; line-height: 1.3; }
.tf-minicart__drop ul.cart_list li img { float: left; width: 50px; height: 50px; object-fit: contain; margin: 0 12px 0 0; border-radius: 4px; }
.tf-minicart__drop ul.cart_list li .quantity { display: block; color: var(--tf-grey); margin-top: 4px; }
.tf-minicart__drop a.remove { position: absolute; right: 0; top: 10px; color: var(--tf-grey) !important; text-decoration: none; font-size: 18px; line-height: 1; }
.tf-minicart__drop a.remove:hover { background: none; color: #9A5B12 !important; }
.tf-minicart__drop .woocommerce-mini-cart__total { display: flex; justify-content: space-between; margin: 12px 0; font-weight: 700; }
.tf-minicart__drop .woocommerce-mini-cart__buttons { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.tf-minicart__drop .woocommerce-mini-cart__buttons .button { display: block; text-align: center; margin: 0; }
/* as on Flatsome: "view basket" in the accent colour, "checkout" in navy */
.tf-minicart__drop .woocommerce-mini-cart__buttons .button { background: var(--tf-accent); color: #fff; }
.tf-minicart__drop .woocommerce-mini-cart__buttons .button.checkout { background: var(--tf-navy); color: #fff; }
.tf-minicart__drop .woocommerce-mini-cart__buttons .button:hover { opacity: .9; }
.tf-minicart__drop .woocommerce-mini-cart__empty-message { margin: 0; color: var(--tf-grey); }
@media (max-width: 849px) {
  .tf-header__tools .tf-account, .tf-basket__label, .tf-minicart__drop { display: none; }
}

/* footer copyright line */
.tf-footer__small .tf-wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 20px; }

/* range pages: breadcrumb, result count and sort on one line, as on Flatsome */
.tf-shop .tf-crumbs { text-transform: none; }
.tf-shop .woocommerce-result-count { float: none; display: inline-block; margin: 0 14px 14px 0; }
.tf-shop .woocommerce-ordering { float: right; margin: -6px 0 14px; }
.tf-shop .woocommerce-ordering select { padding: 8px 34px 8px 12px; border: 1px solid var(--tf-line); border-radius: 99px; background-color: #fff; font: 400 14px/1.2 var(--tf-body); color: var(--tf-text); }
.tf-shop ul.products { clear: both; }
@media (max-width: 549px) { .tf-shop .woocommerce-result-count { font-size: 13px; margin-top: 4px; } .tf-shop .woocommerce-ordering select { font-size: 13px; padding: 6px 28px 6px 10px; max-width: 165px; } }

/* product cards: centred text, range name above the name, second photo on hover, no button */
.woocommerce ul.products li.product, ul.products li.product { text-align: center; }
.tf-card-range { margin: 0 0 3px; padding: 0 14px; font-size: 12px; color: var(--tf-grey); }
ul.products li.product > a { position: relative; display: block; }
ul.products li.product .tf-back-image { position: absolute; top: 0; left: 0; opacity: 0; transition: opacity .3s; }
@media (hover: hover) and (min-width: 550px) { ul.products li.product:hover .tf-back-image { opacity: 1; } }
@media (hover: none), (max-width: 549px) { ul.products li.product .tf-back-image { display: none; } }

/* product page: − / + quantity buttons, previous / next arrows, SKU and range line */
.tf-qty { display: inline-flex; align-items: stretch; border: 1px solid var(--tf-line); border-radius: 99px; overflow: hidden; background: #fff; }
.single-product .summary form.cart .tf-qty input.qty { width: 46px; border: 0; border-radius: 0; padding: 11px 0; -moz-appearance: textfield; }
.tf-qty input.qty::-webkit-inner-spin-button, .tf-qty input.qty::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.tf-qty__btn { width: 38px; border: 0; background: none; font: 400 20px/1 var(--tf-body); color: var(--tf-navy); cursor: pointer; }
.tf-qty__btn:hover { background: var(--tf-bg); color: var(--tf-accent); }
.single-product div.product .summary { position: relative; }
.tf-prevnext { float: right; display: flex; gap: 6px; margin: 4px 0 0 12px; }
.tf-prevnext a { display: block; width: 32px; height: 32px; border: 1px solid var(--tf-line); border-radius: 50%; text-align: center; font: 400 22px/28px var(--tf-body); color: var(--tf-grey); text-decoration: none; }
.tf-prevnext a:hover { border-color: var(--tf-accent); color: var(--tf-accent); }
.single-product .product_meta { font-size: 13px; color: var(--tf-grey); border-top: 1px solid var(--tf-line); padding-top: 12px; margin: 16px 0; }
.single-product .product_meta > span { display: block; margin-bottom: 3px; }
.single-product .product_meta a { color: var(--tf-text); }

/* pages built in Flatsome: [row] / [col] layout codes (see inc/flatsome-compat.php) */
.tf-fs-row { display: flex; flex-wrap: wrap; margin: 0 -15px; }
.tf-fs-row.is-middle { align-items: center; }
.tf-fs-col { padding: 0 15px; width: 100%; min-width: 0; }
.tf-fs-col > :first-child { margin-top: 0; }
@media (min-width: 850px) { .tf-fs-col { width: calc(var(--span, 12) * 100% / 12); } }
@media (max-width: 849px) { .tf-fs-col p[style*="text-align: right"] { text-align: left !important; } }
.tf-content a.button { display: inline-block; text-decoration: none; }
.tf-content a.button.primary { background: var(--tf-accent); color: #fff; }

.tf-panel__account { margin: 18px 0 0; }
.tf-panel__account .tf-account { font-size: 16px; }

/* tables in pages (the Delivery charges table) */
.tf-content table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: 15px; }
.tf-content th, .tf-content td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--tf-line); vertical-align: top; }
.tf-content th { font-weight: 700; color: var(--tf-navy); border-bottom-width: 2px; }
@media (max-width: 549px) { .tf-content table { font-size: 13px; } }

/* ======================================================================
   0.3.0: David's look changes (20 Nov evening), matched to the live site
   ====================================================================== */

/* top bar: smaller, on the left, lined up with the logo */
.tf-topbar { font: 700 12px/1.4 var(--tf-head); text-align: left; letter-spacing: .01em; }
.tf-topbar__lines { padding: 8px 0; }
@media (max-width: 849px) { .tf-topbar { font-size: 12px; } }

/* menu words: softer grey as on live, same size at every width */
.tf-nav .tf-menu > li > a { font-size: 16px; color: rgba(74,74,74,.85); letter-spacing: .02em; }
.tf-account, .tf-basket, .tf-search-toggle { color: rgba(74,74,74,.85); }
.tf-basket__label, .tf-account { font-size: 16px; letter-spacing: .02em; }

/* drop-down menus: accent border, as on live */
.tf-nav .sub-menu { border: 2px solid var(--tf-accent); border-radius: 8px; padding: 12px 0; }
.tf-nav .sub-menu a { color: rgba(74,74,74,.85); }

/* home: "shop by range" sits on the page background, tiles stay white */
.tf-card:has(.tf-ranges) { background: transparent; padding: 6px 0 0; }
.tf-ranges__img img { padding: 0; }

/* section headings with a "see them all" link: title left, link right */
.tf-section-title:has(.tf-more) { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.tf-more { font: 400 15px/1.2 var(--tf-body); text-transform: lowercase; color: var(--tf-accent); }
.tf-content .tf-more, .tf-more { text-decoration: none; }
.tf-more::after { content: " \203A"; }

/* product cards: white photo, words on the page background (as live) */
.woocommerce ul.products li.product, ul.products li.product { background: transparent; border-radius: 0; overflow: visible; }
ul.products li.product a img { border-radius: var(--tf-radius); }
.tf-card ul.products li.product a img { background: #fff; }
.tf-shop ul.products li.product-category a img { background: #fff; }

/* five across (picked for you) */
ul.products.columns-5 li.product { flex-basis: calc((100% - 4 * 20px) / 5); }
@media (max-width: 1000px) { ul.products.columns-5 li.product { flex-basis: calc((100% - 2 * 20px) / 3); } }
@media (max-width: 549px) { .woocommerce ul.products.columns-5 li.product, ul.products.columns-5 li.product { flex-basis: calc((100% - 12px) / 2); } }

/* ======================================================================
   0.4.0: second round (David, 20 Nov 19:30), matched to the live site
   ====================================================================== */

/* 15px between the header and the first panel, as on live */
.tf-page--wide > .tf-content > .tf-card:first-child { margin-top: 15px; }

/* drop-down menus: only one open at a time; hovering another heading hides a clicked-open one */
.tf-nav .tf-menu:hover > li:not(:hover) > .sub-menu { opacity: 0; visibility: hidden; }

/* header basket as on live: "basket / £0.00", a thin divider, and the count in an accent box */
.tf-header__tools .tf-account { padding-right: 16px; border-right: 1px solid var(--tf-line); }
.tf-basket { gap: 12px; }
.tf-basket__box { display: inline-block; min-width: 34px; height: 34px; padding: 0 6px; border: 2px solid var(--tf-accent); color: var(--tf-accent); font: 700 16px/30px var(--tf-body); text-align: center; position: relative; }
.tf-basket__box::after { content: ""; position: absolute; left: 50%; bottom: 100%; width: 14px; height: 8px; margin: 0 0 0 -7px; border: 2px solid var(--tf-accent); border-bottom: 0; border-radius: 7px 7px 0 0; transition: height .15s, margin .15s; }
.tf-basket:hover .tf-basket__box { background: var(--tf-accent); color: #fff; }
.tf-basket:hover .tf-basket__box::after { height: 10px; }
.tf-basket__box.is-empty { opacity: 1; }
@media (max-width: 849px) { .tf-basket__box { min-width: 30px; height: 30px; line-height: 26px; font-size: 14px; } }

/* drop-down basket: site-colour border, as on live */
.tf-minicart__drop .widget_shopping_cart_content { border: 2px solid var(--tf-accent); border-radius: 8px; padding: 20px; box-shadow: 1px 1px 15px rgba(0,0,0,.15); }

/* section headings as on live: 22px, a light line across the panel with a darker line under the words */
.tf-section-title { display: block; font-size: 22px; line-height: 1.6; margin: 0 0 35px; padding: 0; border-bottom: 2px solid #ececec; }
.tf-section-title:has(.tf-more) { display: flex; justify-content: space-between; align-items: flex-end; }
.tf-title-under { display: inline-block; padding-bottom: 7px; margin-bottom: -2px; border-bottom: 2px solid rgba(0,0,0,.1); }
.tf-more { font: 700 17px/1.6 var(--tf-head); text-transform: lowercase; color: var(--tf-navy); padding-bottom: 7px; }
.tf-more::after { content: " \203A"; font-weight: 400; }
.tf-more:hover { color: var(--tf-accent); }

/* picked for you: white panel as on live */
.tf-card:has(ul.products) { padding: 26px 26px 10px; }
@media (max-width: 700px) { .tf-card:has(ul.products) { padding: 18px 14px 6px; } }
ul.products li.product .tf-card-range { margin-top: 2px; }

/* footer as on live: logo (and group line) on top, links in a row in small capitals, then the company and copyright line */
.tf-footer__top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 20px 40px; padding-top: 34px; padding-bottom: 22px; }
.tf-footer__brand { flex: 0 1 420px; max-width: 420px; }
.tf-footer__brand p { margin: 12px 0 0; font-size: 14px; }
.tf-footer__group { flex: 0 1 auto; margin-top: 6px; }
.tf-footer__links { padding-bottom: 16px; }
.tf-footer__links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.tf-footer__links a { font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: rgba(255,255,255,.8); }
.tf-footer__links a:hover { color: #fff; }

/* footer laid out as on live (David, 20 Nov 19:38): logo on top; darker band with links and copyright on the left,
   the group line above the company line on the right */
.tf-footer__top { display: block; padding-top: 26px; padding-bottom: 22px; }
.tf-footer__bottom { background: #1e2a38; color: rgba(255,255,255,.8); font-size: 12px; line-height: 1.5; padding: 14px 0 16px; }
.tf-footer__bottom-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 14px 40px; }
.tf-footer__links { padding: 0 0 8px; margin: 0 0 8px; border-bottom: 1px solid rgba(255,255,255,.12); display: inline-block; }
.tf-footer__links ul { gap: 4px 14px; }
.tf-footer__copy, .tf-footer__trading { margin: 0; }
.tf-footer__copy a { font-weight: 700; }
.tf-footer__right { max-width: 420px; }
.tf-footer__group { margin: 0 0 6px; font-size: 13px; }
.tf-footer__bottom a { color: rgba(255,255,255,.9); }
@media (max-width: 849px) {
  .tf-footer__top, .tf-footer__bottom-row { text-align: center; justify-content: center; }
  .tf-footer__left, .tf-footer__right { flex: 1 1 100%; max-width: none; }
  .tf-footer__links ul { justify-content: center; }
}

/* drop-down menus as on live (David, 20 Nov 20:09): the box overlaps the bottom of the header, has a small notch
   pointing up at its heading, roomier items with a fine line between them, and lighter arrows on the headings */
.tf-nav .sub-menu { top: calc(100% - 12px); left: -22px; min-width: 250px; padding: 12px 22px; box-shadow: 1px 1px 15px rgba(0,0,0,.15); z-index: 70; }
.tf-nav .sub-menu::before { content: ""; position: absolute; top: -8px; left: 34px; width: 12px; height: 12px; background: #fff; border: solid var(--tf-accent); border-width: 2px 0 0 2px; transform: rotate(45deg); }
.tf-nav .sub-menu li + li { border-top: 1px solid #ececec; }
.tf-nav .sub-menu a { padding: 12px 0; font-size: 15px; }
.tf-nav .sub-menu a:hover { background: none; color: var(--tf-accent); }
.tf-nav .menu-item-has-children > a::after { width: 5px; height: 5px; border-width: 0 1.5px 1.5px 0; margin: 0 0 4px 6px; opacity: .8; }

/* WooCommerce block product grids (e.g. "New in store" on the empty basket) look like the theme's own product cards */
.wc-block-grid__products { display: flex; flex-wrap: wrap; gap: 20px; margin: 0 0 20px !important; padding: 0; list-style: none; }
.wc-block-grid__product { flex: 0 0 calc((100% - 4 * 20px) / 5) !important; max-width: none !important; margin: 0 !important; padding: 0 !important; border: 0 !important; text-align: center; }
.wc-block-grid__product-link { text-decoration: none !important; display: block; }
.wc-block-grid__product-image { margin: 0 0 10px !important; }
.wc-block-grid__product-image img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: var(--tf-radius); }
.wc-block-grid__product-title { font: 400 15px/1.35 var(--tf-body) !important; color: var(--tf-text) !important; margin: 0 0 6px !important; text-decoration: none; }
.wc-block-grid__product-price { font: 700 16px/1.2 var(--tf-head) !important; color: var(--tf-navy) !important; }
.wc-block-grid__product-add-to-cart { display: none !important; }
.wc-block-cart__empty-cart__title, .wp-block-woocommerce-empty-cart-block h2 { text-transform: lowercase; font-size: 22px; }
@media (max-width: 1000px) { .wc-block-grid__product { flex-basis: calc((100% - 2 * 20px) / 3) !important; } }
@media (max-width: 549px) { .wc-block-grid__products { gap: 12px; } .wc-block-grid__product { flex-basis: calc((100% - 12px) / 2) !important; } }

/* Home: smaller gap between the last panel and the footer (about 40px, was about 104px). */
.tf-page--wide { padding-bottom: 0; }
.tf-page--wide > .tf-content > .tf-card:last-child { margin-bottom: 0; }

/* Signed in: "my account" drop-down of the account pages, styled like the menu drop-downs. */
.tf-acct { position: relative; display: flex; align-items: center; align-self: stretch; }
.tf-acct__drop { list-style: none; margin: 0; position: absolute; top: calc(100% - 3px); left: -22px; min-width: 230px; padding: 12px 22px; background: #fff; border: 2px solid var(--tf-accent); border-radius: 8px; box-shadow: 1px 1px 15px rgba(0,0,0,.15); z-index: 70; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s; }
.tf-acct__drop::before { content: ""; position: absolute; top: -8px; left: 34px; width: 12px; height: 12px; background: #fff; border: solid var(--tf-accent); border-width: 2px 0 0 2px; transform: rotate(45deg); }
.tf-acct__drop li + li { border-top: 1px solid #ececec; }
.tf-acct__drop a { display: block; padding: 11px 0; font: 400 15px/1.3 var(--tf-body); color: rgba(74,74,74,.85); text-decoration: none; text-transform: lowercase; white-space: nowrap; }
.tf-acct__drop a:hover { color: var(--tf-accent); }
.tf-acct:hover .tf-acct__drop, .tf-acct:focus-within .tf-acct__drop { opacity: 1; visibility: visible; transform: none; }
.tf-header__tools .tf-acct .tf-account { align-self: center; }
@media (max-width: 849px) { .tf-acct__drop { display: none; } }

/* My account page: side menu with picture and name, page content beside it, tiles on the dashboard. */
.tf-page__sub { margin: -14px 0 24px; font: 400 13px/1.4 var(--tf-body); color: var(--tf-grey); text-transform: uppercase; letter-spacing: .05em; }
.woocommerce-account .tf-content > .woocommerce { display: flow-root; margin-bottom: 30px; }
.tf-acct-user { float: left; clear: left; width: 270px; display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.tf-acct-user img { border-radius: 50%; width: 70px; height: 70px; }
.tf-acct-user span { font: 400 16px/1.3 var(--tf-head); color: var(--tf-text); }
.woocommerce-account .woocommerce-MyAccount-navigation { float: left; clear: left; width: 270px; }
.woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 0; }
.woocommerce-MyAccount-navigation li + li { border-top: 1px solid #ececec; }
.woocommerce-MyAccount-navigation a { display: block; padding: 12px 0; font: 400 13px/1.3 var(--tf-head); letter-spacing: .04em; text-transform: uppercase; color: rgba(74,74,74,.85); text-decoration: none; }
.woocommerce-MyAccount-navigation a:hover { color: var(--tf-accent); }
.woocommerce-MyAccount-navigation li.is-active a { color: var(--tf-navy); font-weight: 700; box-shadow: inset -3px 0 0 var(--tf-accent); }
.woocommerce-account .woocommerce-MyAccount-content { width: auto; float: none; display: flow-root; margin-left: 300px; padding-left: 30px; border-left: 1px solid #ececec; min-width: 0; }
.woocommerce-MyAccount-content a { color: var(--tf-accent); }
.tf-acct-tiles { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tf-content .woocommerce-MyAccount-content .tf-acct-tiles li > a { display: block; padding: 20px 10px; text-align: center; border: 1px solid #ddd; border-radius: 6px; background: #fff; font: 400 18px/1.3 var(--tf-head); color: var(--tf-navy) !important; text-decoration: none; transition: border-color .15s, color .15s; }
.tf-content .woocommerce-MyAccount-content .tf-acct-tiles li > a:hover { border-color: var(--tf-accent); color: var(--tf-accent) !important; }
@media (max-width: 849px) {
  .tf-acct-user, .woocommerce-account .woocommerce-MyAccount-navigation { float: none; width: auto; }
  .woocommerce-account .woocommerce-MyAccount-navigation { margin-bottom: 24px; }
  .woocommerce-account .woocommerce-MyAccount-content { margin-left: 0; padding-left: 0; border-left: 0; }
  .tf-acct-tiles { grid-template-columns: repeat(2, 1fr); }
}

/* Product names and prices as on the live site, everywhere products are listed:
   name in the body font, navy; price just under it in the body font, bold, near black. */
.woocommerce ul.products li.product .woocommerce-loop-product__title, .wc-block-grid__product-title { font: 400 15px/1.35 var(--tf-body) !important; color: var(--tf-navy) !important; margin: 0 0 2px !important; }
.woocommerce ul.products li.product .price, .wc-block-grid__product-price { font: 700 15px/1.3 var(--tf-body) !important; color: #111 !important; }
.woocommerce div.product p.price, .woocommerce div.product span.price, .single-product .summary .price { font: 700 24px/1.2 var(--tf-body); color: #111; }

/* Gap above the footer: 40px on every page, measured from the last words or picture (David, 21 Nov). */
.tf-footer { margin-top: 0; }
.tf-page, .tf-page--wide { padding-bottom: 40px; }
.tf-page > .tf-card:last-child, .tf-page > .tf-content > :last-child, .tf-page > .tf-content > .woocommerce > :last-child,
.tf-page > .tf-content > .tf-card:last-child, .tf-page > .tf-content > .wp-block-woocommerce-cart, .tf-page > .tf-content > .wp-block-woocommerce-checkout,
.tf-shop > .woocommerce-pagination, .tf-shop > :last-child, .tf-entry > .tf-content > :last-child { margin-bottom: 0 !important; }
.tf-shop ul.products { margin-bottom: 0; }
.tf-shop ul.products li.product { padding-bottom: 0; }
.tf-shop .woocommerce-pagination, .tf-shop .woocommerce-pagination ul { margin-bottom: 0 !important; padding-bottom: 0; }
.tf-shop .woocommerce-pagination { display: flex; justify-content: center; margin-top: 30px; }
.woocommerce-MyAccount-navigation li:last-child a { padding-bottom: 0; }

/* Shop and range pages: smaller heading so the products sit higher (David, 21 Nov). */
.woocommerce-products-header__title, .tf-shop h1.page-title { font-size: 26px; margin: 4px 0 10px; }
@media (max-width: 849px) { .woocommerce-products-header__title, .tf-shop h1.page-title { font-size: 22px; } }

/* Drop-down lists (e.g. "Default sorting"): our own small arrow, set in from the right edge. */
select { -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; background-size: 12px 8px; padding-right: 42px !important; }
@media (max-width: 549px) { .tf-shop .woocommerce-ordering select { background-position: right 12px center; padding-right: 32px !important; } }

/* Product page on the grey background, as on the live site: no white panel, picture on white,
   description tabs in the right-hand column, related products below a dividing line. */
.single-product div.product { background: transparent; padding: 0; border-radius: 0; }
.single-product div.product .woocommerce-product-gallery__image, .single-product div.product .flex-viewport { background: #fff; }
.single-product div.product .summary .woocommerce-tabs { margin-top: 24px; }
.single-product div.product .summary .woocommerce-tabs ul.tabs li a { font: 400 13px/1 var(--tf-head); text-transform: uppercase; letter-spacing: .04em; }
.single-product div.product .summary .woocommerce-tabs .panel { margin: 0; }
.single-product div.product .related, .single-product div.product .upsells { border-top: 1px solid var(--tf-line); margin-top: 20px; padding-top: 30px; }
.single-product .related > h2, .single-product .upsells > h2 { font-size: 22px; margin-bottom: 24px; }
@media (max-width: 849px) { .single-product div.product { padding: 0; } }

/* Product page tabs: no white behind the open tab; open tab in bold with a slightly heavier line. */
.woocommerce div.product .woocommerce-tabs ul.tabs li, .woocommerce div.product .woocommerce-tabs ul.tabs li.active { background: transparent !important; border: 0 !important; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { font-weight: 700 !important; -webkit-text-stroke: .4px currentColor; color: var(--tf-navy); border-bottom: 3px solid var(--tf-accent); margin-bottom: -1px; }

/* Footer logo band: the same space above and below the logo (David, 21 Nov). */
.tf-footer__logo { display: inline-block; vertical-align: top; line-height: 0; }
.tf-footer__logo img { display: block; }
.tf-footer__top { padding-top: 26px !important; padding-bottom: 26px !important; }

/* Home: "picked for you" on the grey background, like "shop by range" (David, 21 Nov). */
.home .tf-card:has(ul.products), .tf-page--wide .tf-card:has(ul.products) { background: transparent; padding: 6px 0 0; }
.tf-page--wide .tf-card:has(ul.products) ul.products { margin-bottom: 0; }
.tf-page--wide .tf-card:has(ul.products) ul.products li.product { padding-bottom: 0; }

/* Product cards on the grey background: hovering the picture or the words turns the whole card white,
   so the words sit on white too (David, 21 Nov). Everywhere products are listed, for consistency. */
ul.products li.product { background: transparent; border-radius: var(--tf-radius) !important; overflow: hidden; transition: background-color .15s; }
.tf-page ul.products li.product, .tf-page--wide .tf-card:has(ul.products) ul.products li.product { padding-bottom: 14px !important; }
@media (hover: hover) { ul.products li.product:hover { background: #fff; } }
/* keep 40px to the footer: the 14px under the words is taken back below the last row */
.tf-shop ul.products, .tf-page--wide .tf-card:has(ul.products) ul.products, .single-product .related ul.products, .single-product .upsells ul.products { margin-bottom: -14px !important; }


/* "Show password" eye inside password boxes (account details, login, checkout). WooCommerce keeps these rules in
   its layout sheet, which this theme does not load, so without them the buttons showed as empty pills below the box. */
.woocommerce form .password-input, .woocommerce-page form .password-input { display: flex; flex-direction: column; justify-content: center; position: relative; }
.woocommerce form .password-input input[type="password"], .woocommerce form .password-input input[type="text"] { padding-right: 2.75rem; }
.woocommerce form .password-input input::-ms-reveal { display: none; }
.woocommerce form .show-password-input, .woocommerce-page form .show-password-input { position: absolute; right: .8em; top: 50%; transform: translateY(-50%); margin: 0; padding: 0; min-height: 0; width: 22px; height: 22px; background: transparent !important; border: 0 !important; border-radius: 0; box-shadow: none; cursor: pointer; }
.woocommerce form .show-password-input::before { content: ""; display: block; width: 22px; height: 22px; background-repeat: no-repeat; background-size: cover; background-image: url('data:image/svg+xml,<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M17.3 3.3C16.9 2.9 16.2 2.9 15.7 3.3L13.3 5.7C12.2437 5.3079 11.1267 5.1048 10 5.1C6.2 5.2 2.8 7.2 1 10.5C1.2 10.9 1.5 11.3 1.8 11.7C2.6 12.8 3.6 13.7 4.7 14.4L3 16.1C2.6 16.5 2.5 17.2 3 17.7C3.4 18.1 4.1 18.2 4.6 17.7L17.3 4.9C17.7 4.4 17.7 3.7 17.3 3.3ZM6.7 12.3L5.4 13.6C4.2 12.9 3.1 11.9 2.3 10.7C3.5 9 5.1 7.8 7 7.2C5.7 8.6 5.6 10.8 6.7 12.3ZM10.1 9C9.6 8.5 9.7 7.7 10.2 7.2C10.7 6.8 11.4 6.8 11.9 7.2L10.1 9ZM18.3 9.5C17.8 8.8 17.2 8.1 16.5 7.6L15.5 8.6C16.3 9.2 17 9.9 17.6 10.8C15.9 13.4 13 15 9.9 15H9.1L8.1 16C8.8 15.9 9.4 16 10 16C13.3 16 16.4 14.4 18.3 11.7C18.6 11.3 18.8 10.9 19.1 10.5C18.8 10.2 18.6 9.8 18.3 9.5ZM14 10L10 14C12.2 14 14 12.2 14 10Z" fill="%23666666"/></svg>'); }
.woocommerce form .show-password-input.display-password::before { background-image: url('data:image/svg+xml,<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M18.3 9.49999C15 4.89999 8.50002 3.79999 3.90002 7.19999C2.70002 8.09999 1.70002 9.29999 0.900024 10.6C1.10002 11 1.40002 11.4 1.70002 11.8C5.00002 16.4 11.3 17.4 15.9 14.2C16.8 13.5 17.6 12.8 18.3 11.8C18.6 11.4 18.8 11 19.1 10.6C18.8 10.2 18.6 9.79999 18.3 9.49999ZM10.1 7.19999C10.6 6.69999 11.4 6.69999 11.9 7.19999C12.4 7.69999 12.4 8.49999 11.9 8.99999C11.4 9.49999 10.6 9.49999 10.1 8.99999C9.60003 8.49999 9.60003 7.69999 10.1 7.19999ZM10 14.9C6.90002 14.9 4.00002 13.3 2.30002 10.7C3.50002 8.99999 5.10002 7.79999 7.00002 7.19999C6.30002 7.99999 6.00002 8.89999 6.00002 9.89999C6.00002 12.1 7.70002 14 10 14C12.2 14 14.1 12.3 14.1 9.99999V9.89999C14.1 8.89999 13.7 7.89999 13 7.19999C14.9 7.79999 16.5 8.99999 17.7 10.7C16 13.3 13.1 14.9 10 14.9Z" fill="%23666666"/></svg>'); }
.woocommerce-EditAccountForm fieldset { border: 1px solid var(--tf-line); border-radius: 8px; padding: 6px 18px 12px; margin: 20px 0; }
.woocommerce-EditAccountForm legend { padding: 0 6px; font-weight: 700; color: var(--tf-navy); }
.woocommerce form .form-row label { line-height: 1.4; margin-bottom: 4px; }

/* iPhone / iPad Safari: drop the native button look on the show-password eye. */
button.show-password-input, .password-input button.show-password-input { -webkit-appearance: none !important; appearance: none !important; position: absolute; right: .8em; top: 50%; transform: translateY(-50%); margin: 0; padding: 0 !important; min-height: 0; min-width: 0; width: 22px !important; height: 22px; background: transparent !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; font-size: 0; line-height: 0; color: transparent; }
.password-input { position: relative; display: flex; flex-direction: column; justify-content: center; }
button.show-password-input::before { content: ""; display: block; width: 22px; height: 22px; }

/* Related products: one full row on tablets (3) and two full rows on phones (4), not a part-empty row. */
@media (max-width: 1000px) { .single-product .related ul.products li.product:nth-child(n+4) { display: none; } }
@media (max-width: 549px) { .single-product .related ul.products li.product:nth-child(4) { display: block; } }

/* iPhone rotation: nothing may stick out sideways (the product photo zoom layer did), or Safari keeps the old width when the phone is turned. */
/* Clip the page body area only, not html/body: clipping the whole page stopped iPads re-fitting after turning from landscape to portrait (21 Nov). */
.tf-main, .tf-footer, .tf-topbar { overflow-x: clip; }
.woocommerce-product-gallery, .woocommerce-product-gallery__image { overflow: hidden; }

/* Product page: price and "In stock" a touch lighter (semi-bold instead of bold), David 21 Nov. */
.woocommerce div.product p.price, .woocommerce div.product span.price, .single-product .summary .price { font-weight: 600 !important; }
.single-product .stock, .woocommerce div.product .stock { font-weight: 600; }

/* Header moves up with the page while scrolling down, back down while scrolling up (theme.js sets the transform). */
.tf-header { will-change: transform; }
.tf-header.is-stuck { animation: tf-header-drop .9s ease; } /* slides to the inline transform set by theme.js (green bar hidden) */
@keyframes tf-header-drop { from { transform: translateY(-100%); } }

/* Phones: the hero picture sits at the top of the panel, above the words (David, 21 Nov). */
@media (max-width: 781px) { .tf-hero .wp-block-columns { gap: 22px; } .tf-hero .wp-block-column:has(img) { order: -1; } }

/* Home page cards (range tiles and "picked for you"), David 22 Nov: many photos are not on white, so the words sit on
   the page background with no border until hover; on hover the card turns white with the accent border. Photos have
   all four corners rounded until hover, then the bottom two go square so the photo joins the white card below. */
.home .tf-ranges a { background: transparent; border-color: transparent; transition: background-color .15s, border-color .15s; }
.home .tf-ranges__img { border-radius: var(--tf-radius); overflow: hidden; transition: border-radius .15s; }
.home ul.products li.product { border: 1px solid transparent; transition: background-color .15s, border-color .15s; }
.home ul.products li.product a img { transition: border-radius .15s; }
@media (hover: hover) {
  .home .tf-ranges a:hover { background: #fff; border-color: var(--tf-accent); }
  .home ul.products li.product:hover { background: #fff; border-color: var(--tf-accent); }
}
@media (hover: hover) and (min-width: 550px) {
  .home .tf-ranges a:hover .tf-ranges__img, .home ul.products li.product:hover a img { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
}
/* phones: range tiles are a row with the photo on the left, so its right-hand corners go square instead */
@media (hover: hover) and (max-width: 549px) {
  .home .tf-ranges a:hover .tf-ranges__img { border-top-right-radius: 0; border-bottom-right-radius: 0; }
}

/* Product photos slide instead of magnifying (0.5.20): arrows either side of the main photo, hidden at the first/last photo.
   Phones and iPads swipe; computers drag with the mouse or click the arrows. */
.woocommerce-product-gallery .flex-viewport { cursor: grab; touch-action: pan-y; }
.woocommerce-product-gallery.tf-dragging .flex-viewport { cursor: grabbing; }
.woocommerce-product-gallery .flex-viewport img { -webkit-user-drag: none; user-select: none; }
.woocommerce-product-gallery .flex-direction-nav { list-style: none; margin: 0; padding: 0; }
.woocommerce-product-gallery .flex-direction-nav a { position: absolute; z-index: 4; top: calc(var(--tf-photo-mid, 200px) - 20px); width: 40px; height: 40px; margin: 0; border-radius: 50%; background: rgba(255, 255, 255, .85); box-shadow: 0 1px 4px rgba(0, 0, 0, .18); font-size: 0; color: transparent; text-decoration: none; transition: opacity .15s; }
.woocommerce-product-gallery .flex-direction-nav a::before { content: ""; position: absolute; top: 50%; left: 50%; width: 10px; height: 10px; border: solid var(--tf-navy); border-width: 0 2px 2px 0; }
.woocommerce-product-gallery .flex-direction-nav .flex-prev { left: 10px; }
.woocommerce-product-gallery .flex-direction-nav .flex-next { right: 10px; }
.woocommerce-product-gallery .flex-direction-nav .flex-prev::before { transform: translate(-30%, -50%) rotate(135deg); }
.woocommerce-product-gallery .flex-direction-nav .flex-next::before { transform: translate(-70%, -50%) rotate(-45deg); }
.woocommerce-product-gallery .flex-direction-nav a:hover { background: #fff; }
.woocommerce-product-gallery .flex-direction-nav a.flex-disabled { opacity: 0 !important; pointer-events: none; }
@media (hover: hover) {
  .woocommerce-product-gallery .flex-direction-nav a { opacity: 0; }
  .woocommerce-product-gallery:hover .flex-direction-nav a, .woocommerce-product-gallery .flex-direction-nav a:focus-visible { opacity: 1; }
}
@media (max-width: 549px) { .woocommerce-product-gallery .flex-direction-nav a { width: 34px; height: 34px; top: calc(var(--tf-photo-mid, 150px) - 17px); } }
