/*
Theme Name: Bzhir Fresh
Theme URI: https://bzhirshop.com
Author: Bzhir Shop
Description: A minimal standalone WooCommerce block theme for BZHIR.
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 7.4
Version: 1.0.17
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bzhir-fresh
Tags: e-commerce, full-site-editing, block-patterns, custom-logo, editor-style
*/

:root {
  --bzhir-bg: #fbfaf4;
  --bzhir-header-bg: #f4f1e8;
  --bzhir-ink: #000;
  --bzhir-muted: #4b4b4b;
  --bzhir-max: 1180px;
  --bzhir-header-link-size: 1.05rem;
  --bzhir-search-closed: 5.9rem;
  --bzhir-search-open: 18rem;
  --bzhir-header-height: 112px;
  --bzhir-header-compact-height: 56px;
  --bzhir-logo-size: 78px;
  --bzhir-logo-compact-size: 40px;
  --bzhir-logo-compact-scale: 0.513;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bzhir-bg);
}

body {
  background: var(--bzhir-bg);
  color: var(--bzhir-ink);
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
  padding-top: var(--bzhir-header-height);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body:not(.wp-admin) > :where(.notice, .error, .updated, .update-nag, [class*="notice"], [class*="error"]):first-child {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

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

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.fresh-header {
  background: var(--bzhir-header-bg);
  border: 0;
  height: var(--bzhir-header-height);
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  transform: translateZ(0);
  z-index: 30;
  transition: height 260ms cubic-bezier(0.22, 1, 0.36, 1), background-color 180ms ease;
  will-change: transform;
  width: 100%;
}

.admin-bar .fresh-header {
  top: var(--wp-admin--admin-bar--height, 32px);
}

.fresh-header-inner {
  height: 100%;
  min-height: 0;
  max-width: var(--bzhir-max);
  position: relative;
}

.fresh-brand {
  align-items: center;
  display: flex;
  min-width: 112px;
  transform-origin: center;
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.fresh-brand .custom-logo-link,
.fresh-brand .wp-block-site-logo {
  display: block;
}

.fresh-brand img {
  display: block;
  height: auto;
  transform: scale(1);
  transform-origin: center;
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
  width: var(--bzhir-logo-size);
}

.fresh-header-actions {
  align-items: center;
  display: flex;
  gap: 1.55rem !important;
  transition: opacity 180ms ease, transform 260ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0ms linear 180ms;
}

body.is-scrolled .fresh-header {
  height: var(--bzhir-header-compact-height);
}

body.is-scrolled .fresh-header-inner {
  justify-content: center !important;
}

body.is-scrolled .fresh-brand {
  justify-content: center;
}

body.is-scrolled .fresh-brand img {
  transform: scale(var(--bzhir-logo-compact-scale));
}

body.is-scrolled .fresh-header-actions {
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transform: translateY(-0.35rem);
  visibility: hidden;
}

.fresh-link,
.fresh-search-toggle,
.fresh-mini-cart .wc-block-mini-cart__button {
  align-items: center;
  appearance: none;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--bzhir-ink);
  cursor: pointer;
  display: inline-flex;
  font-size: var(--bzhir-header-link-size);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
  min-height: 0;
  outline: 0;
  padding: 0 !important;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.fresh-link:hover,
.fresh-link:focus,
.fresh-link:focus-visible,
.fresh-search-toggle:hover,
.fresh-search-toggle:focus,
.fresh-search-toggle:focus-visible,
.fresh-mini-cart .wc-block-mini-cart__button:hover,
.fresh-mini-cart .wc-block-mini-cart__button:focus,
.fresh-mini-cart .wc-block-mini-cart__button:focus-visible {
  color: var(--bzhir-ink);
  outline: 0;
  text-decoration: none;
}

.fresh-mini-cart {
  margin: 0 !important;
}

.fresh-mini-cart .wc-block-mini-cart__button {
  font-size: 0;
}

.fresh-mini-cart .wc-block-mini-cart__button::before {
  content: "WARENKORB";
  font-size: var(--bzhir-header-link-size);
}

.fresh-mini-cart :where(svg, .wc-block-mini-cart__badge, .wc-block-mini-cart__amount, .wc-block-mini-cart__quantity-badge) {
  display: none !important;
}

.fresh-header-search {
  display: inline-flex;
  justify-content: flex-end;
  position: relative;
  width: var(--bzhir-search-closed);
}

.fresh-search-toggle {
  justify-content: flex-end;
  width: 100%;
}

.fresh-header-search-form {
  align-items: stretch;
  background: var(--bzhir-header-bg);
  display: flex;
  height: 2.15rem;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  transition: width 240ms ease, opacity 80ms ease, visibility 0ms linear 240ms;
  visibility: hidden;
  width: var(--bzhir-search-closed);
  z-index: 40;
}

.fresh-header-search.is-open .fresh-search-toggle {
  opacity: 0;
  pointer-events: none;
}

.fresh-header-search.is-open .fresh-header-search-form {
  opacity: 1;
  pointer-events: auto;
  transition: width 260ms ease, opacity 60ms ease, visibility 0ms;
  visibility: visible;
  width: min(var(--bzhir-search-open), calc(100vw - 2rem));
}

.fresh-header-search-form input[type="search"] {
  appearance: none;
  background: var(--bzhir-header-bg);
  border: 1px solid var(--bzhir-ink);
  border-radius: 0;
  border-right: 0;
  caret-color: var(--bzhir-ink);
  color: var(--bzhir-ink);
  flex: 1 1 auto;
  font-size: var(--bzhir-header-link-size);
  height: 2.15rem;
  line-height: 2.15rem;
  min-height: 0;
  min-width: 0;
  padding: 0 0.42rem;
}

.fresh-header-search-form input[type="search"]:focus {
  box-shadow: none;
  outline: 0;
}

.fresh-search-submit {
  align-items: center;
  appearance: none;
  background: var(--bzhir-header-bg);
  border: 1px solid var(--bzhir-ink);
  border-radius: 0;
  color: var(--bzhir-ink);
  cursor: pointer;
  display: flex;
  flex: 0 0 2.15rem;
  font-size: 1.15rem;
  height: 2.15rem;
  justify-content: center;
  line-height: 1;
  margin: 0;
  min-height: 0;
  padding: 0;
  width: 2.15rem;
}

.fresh-home-banner {
  aspect-ratio: 21 / 9;
  background: var(--bzhir-bg);
  margin-top: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: var(--bzhir-max);
  overflow: hidden;
  width: 100%;
}

.fresh-home .fresh-home-banner.alignfull {
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: var(--bzhir-max);
  width: min(100%, var(--bzhir-max));
}

.fresh-home {
  display: block;
}

.fresh-home-banner img,
.fresh-home-banner video {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.fresh-home-products {
  margin: 3.2rem auto 4rem !important;
  max-width: var(--bzhir-max);
}

.fresh-home-products-title {
  font-size: 1.55rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.1;
  margin: 0 0 2rem;
}

.fresh-content {
  padding: 2.6rem 0 4rem;
}

.fresh-shop-heading {
  margin: 0 auto;
  max-width: var(--bzhir-max);
  text-align: center;
}

.fresh-shop-heading h1 {
  font-size: 2rem !important;
  font-weight: 400;
  line-height: 1.1;
  margin: 0;
}

.fresh-shop-heading p {
  color: var(--bzhir-ink);
  font-size: 0.8rem;
  margin: 0.38rem 0 0;
}

.fresh-shop-tools {
  border: 0;
  margin: 2rem auto 0;
  max-width: var(--bzhir-max);
  padding: 0;
}

.fresh-filter {
  align-items: center;
  border-bottom: 1px solid var(--bzhir-ink);
  border-top: 1px solid var(--bzhir-ink);
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem;
  min-height: 2.2rem;
  overflow-x: auto;
  padding: 0.35rem 0;
  white-space: nowrap;
}

.fresh-filter label {
  align-items: center;
  display: inline-flex;
  gap: 0.4rem;
  margin: 0;
}

.fresh-filter span,
.fresh-filter a,
.fresh-filter button,
.fresh-filter input,
.fresh-filter select {
  color: var(--bzhir-ink);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

.fresh-filter select,
.fresh-filter input[type="number"] {
  appearance: none;
  background: var(--bzhir-bg);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  height: 1.2rem;
  min-height: 0;
  outline: 0;
  padding: 0;
}

.fresh-filter select {
  min-width: 8.8rem;
}

.fresh-filter input[type="number"] {
  width: 3.5rem;
}

.fresh-filter input[type="checkbox"] {
  accent-color: var(--bzhir-ink);
  height: 0.8rem;
  margin: 0;
  width: 0.8rem;
}

.fresh-filter button,
.fresh-filter a {
  align-items: center;
  background: transparent;
  border: 0;
  box-shadow: none;
  cursor: pointer;
  display: inline-flex;
  height: 1.2rem;
  min-height: 0;
  padding: 0;
  text-decoration: none;
}

.fresh-filter button:hover,
.fresh-filter button:focus,
.fresh-filter a:hover,
.fresh-filter a:focus {
  background: transparent !important;
  color: var(--bzhir-ink) !important;
  outline: 0;
  text-decoration: none;
}

.fresh-shop-results {
  display: none;
}

.wp-block-woocommerce-product-collection {
  margin-top: 3rem;
}

.wp-block-woocommerce-product-collection .wp-block-woocommerce-product-template,
.wp-block-woocommerce-product-template {
  display: grid !important;
  gap: 2.8rem 1.4rem;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.fresh-card,
.wp-block-woocommerce-product-template > li,
.wc-block-grid__product {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  height: 100%;
  max-width: none !important;
  overflow: visible;
  padding: 0 !important;
  width: 100% !important;
}

.fresh-card .wp-block-woocommerce-product-image,
.wp-block-woocommerce-product-image,
.fresh-card .wp-block-post-featured-image {
  background: transparent;
  margin: 0;
}

.fresh-card img,
.wp-block-woocommerce-product-image img,
.wp-block-post-featured-image img {
  aspect-ratio: 1 / 1.16;
  display: block;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.fresh-card > :where(h2, h3, .wp-block-post-title, .wp-block-post-excerpt, .wp-block-woocommerce-product-price, .wp-block-woocommerce-product-button, .fresh-meta) {
  margin-left: 0;
  margin-right: 0;
}

.fresh-card .wp-block-post-title {
  font-size: 0.86rem;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 0.25rem;
  margin-top: 0.7rem;
}

.fresh-card .wp-block-post-title a {
  color: var(--bzhir-ink);
  text-decoration: none;
}

.fresh-card .wp-block-woocommerce-product-price,
.fresh-meta {
  color: var(--bzhir-ink);
  font-size: 0.78rem;
  font-weight: 400;
  margin-top: 0;
}

.fresh-card .wp-block-woocommerce-product-button {
  display: none;
}

.fresh-entry,
.fresh-empty,
.woocommerce div.product .summary,
.woocommerce-cart .wp-block-woocommerce-cart,
.woocommerce-checkout .wp-block-woocommerce-checkout {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}

.fresh-footer {
  background: var(--bzhir-bg);
  border: 0;
  color: var(--bzhir-muted);
  padding: 2rem 0;
}

.fresh-footer a {
  text-decoration: none;
}

@media (max-width: 760px) {
  :root {
    --bzhir-header-height: 125px;
    --bzhir-logo-size: 82px;
    --bzhir-logo-compact-scale: 0.488;
  }

  body {
    padding-top: var(--bzhir-header-height);
  }

  .fresh-header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.9rem;
    min-height: 0;
    padding-bottom: 1.1rem !important;
    padding-top: 1rem !important;
  }

  .fresh-brand img {
    width: var(--bzhir-logo-size);
  }

  body.is-scrolled .fresh-header-inner {
    align-items: center;
    flex-direction: row;
    gap: 0;
    padding-bottom: 0 !important;
    padding-top: 0 !important;
  }

  .fresh-header-actions {
    display: grid !important;
    gap: 0.85rem 1rem !important;
    grid-template-columns: repeat(2, max-content);
  }

  .fresh-header-search-form {
    width: var(--bzhir-search-closed);
  }

  .fresh-header-search.is-open .fresh-header-search-form {
    width: min(14.5rem, calc(100vw - 2rem));
  }

  .fresh-content {
    padding-top: 2rem;
  }

  .fresh-shop-heading {
    text-align: left;
  }

  .wp-block-woocommerce-product-collection .wp-block-woocommerce-product-template,
  .wp-block-woocommerce-product-template {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
