:root {
  --bt-border-radius: 20px;
  --bt-border-radius-lg: 32px;
  --navbar-height: 60px;
}

/* Hide on Mobile (up to 480px) */
@media (max-width: 768px) {
  .bt-sm-hidden {
    display: none !important;
  }
}

/* Hide on Tablet (481px to 768px) */
@media (min-width: 769px) and (max-width: 1023px) {
  .bt-md-hidden {
    display: none !important;
  }
}

/* Hide on Desktop (769px and above) */
@media (min-width: 1024px) {
  .bt-lg-hidden {
    display: none !important;
  }
}

html {
  scroll-behavior: smooth;
}

.wp-site-blocks main,
.wp-site-blocks > div,
.wp-site-blocks > footer {
  margin-block-start: 0 !important;
}
button,
input {
  font-family: inherit !important;
  border-radius: var(--bt-border-radius);
  corner-shape: squircle;
}

/* Navbar */

header.wp-block-template-part {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 100;
}

.bt-full-height {
  height: calc(100svh - var(--navbar-height));
}
.bt-min-full-height {
  min-height: calc(100svh - var(--navbar-height));
}
.is-position-sticky {
  top: var(--navbar-height);
}

img {
  corner-shape: squircle;
}

/* --- Search Block --- */
.bt-nav-search {
  display: flex;
  align-items: center;
  position: relative;
}

/* make search icon visually consistent with others */
.bt-nav-search .wp-block-search__button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0px;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
}

/* match icon size and position */
.bt-nav-search .search-icon {
  width: 30px;
  height: 30px;
  display: block;
}

/* hidden input appears below icon when expanded */
.bt-nav-search .wp-block-search__input {
  position: absolute;
  left: 0;
  top: 40px;
  width: 280px;
  padding: 8px 12px;
  background-color: var(--wp--preset--color--shade);
  border-radius: 6px;
  corner-shape: squircle;
  /* border: 2px solid var(--wp--preset--color--black); */
  border: none;
  color: var(--wp--preset--color--black);
  box-sizing: border-box;
  z-index: 10;
}

/* --- WooCommerce Account & Cart Icons --- */
.wp-block-woocommerce-customer-account a,
.wc-block-mini-cart__button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}

/* make all icons visually consistent */
.wp-block-woocommerce-customer-account svg,
.wc-block-mini-cart__icon {
  width: 24px;
  height: 24px;
  display: block;
  color: var(--wp--preset--color--gold);
}

/* styles */

.bt-Shadow-2 {
  box-shadow: 0px 0px 24px -16px var(--wp--preset--color--black);
  -webkit-box-shadow: 0px 0px 24px -16px var(--wp--preset--color--black);
  -moz-box-shadow: 0px 0px 24px -16px var(--wp--preset--color--black);
}

.bt-Shadow-1 {
  box-shadow: 0px 0px 20px -16px var(--wp--preset--color--black);
  -webkit-box-shadow: 0px 0px 20px -16px var(--wp--preset--color--black);
  -moz-box-shadow: 0px 0px 20px -16px var(--wp--preset--color--black);
}

.bt-squircle {
  border-radius: var(--bt-border-radius);
  corner-shape: squircle;
  overflow: hidden;
}
.bt-squircle-lg {
  border-radius: var(--bt-border-radius-lg);
  corner-shape: squircle;
  overflow: hidden;
}

/* wordpress */
/* navigation */
.wp-block-navigation__submenu-container {
  overflow: hidden !important;
  border-radius: var(--bt-border-radius);
  corner-shape: squircle;
}
/* Mobile navigation */
.wp-block-navigation__responsive-container.has-modal-open
  .wp-block-navigation__responsive-dialog {
  padding: 2rem !important;
  direction: ltr;
  font-size: var(--wp--preset--font-size--large);
}
.wp-block-navigation__responsive-container-close {
  right: 2rem;
  top: 2rem;
  left: auto;
}

/* woo */

/* Make quantity selector match Add to Cart button height */
.wc-block-components-quantity-selector {
  height: 100%;
  background-color: var(--wp--preset--color--white) !important;
  border-radius: var(--bt-border-radius);
  corner-shape: squircle;
}

.wp-block-group.is-layout-flex {
  align-items: stretch;
  /*gap: 8px;*/
}
input {
  font-family: inherit !important;
}
.input-text.qty {
  font-size: var(--wp--preset--font-size--base) !important;
}
.wc-block-components-quantity-selector__button {
  font-size: inherit !important;
}
.wc-block-components-quantity-selector:after {
  border-radius: var(--bt-border-radius) !important;
  border-color: var(--wp--preset--color--green);
  opacity: 1 !important;
  corner-shape: squircle;
}
.wc-block-components-button {
  border-radius: var(--bt-border-radius) !important;
  corner-shape: squircle;
}

/* .grid-template-columns: repeat(auto-fill, minmax(max(150px, calc(25% - .9375em)), 1fr)); */
.wc-block-product-template__responsive {
  grid-template-columns: repeat(
    auto-fill,
    minmax(max(180px, calc(25% - 0.9375em)), 1fr)
  ) !important;
}

/* image gallery for product */

.woocommerce-product-gallery {
  margin-bottom: 0px !important;
}
.wp-block-woocommerce-product-image-gallery .onsale {
  padding-inline: 10px !important;
  background-color: var(--wp--preset--color--green) !important;
  color: var(--wp--preset--color--gold) !important;
  right: 10px !important;
  top: 10px !important;
  border-radius: var(--bt-border-radius) !important;
  corner-shape: squircle;
}
.wp-block-woocommerce-product-image-gallery ol {
  margin-top: 10px !important;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
  width: 100%;
}
.wp-block-woocommerce-product-image-gallery ol > li {
  width: 100% !important;
}
.wp-block-woocommerce-product-image-gallery ol > li {
  width: 100% !important;
}
.wp-block-woocommerce-product-image-gallery .flex-viewport,
.wp-block-woocommerce-product-image-gallery ol > li > img {
  border-radius: var(--bt-border-radius);
  border: 2px solid var(--wp--preset--color--shade) !important;
  corner-shape: squircle;
  box-sizing: border-box;
}

.wp-block-woocommerce-product-button span:has(.added_to_cart.wc_forward) {
  height: 0 !important;
  display: none !important;
}

.wc-block-product-template.is-flex-container {
  gap: 2rem;
}

.wp-block-woocommerce-product-collection ul {
  margin-block-start: 0 !important;
}

/* Product card */
.bt-product-card {
  overflow: hidden;
  border: 2px solid var(--wp--preset--color--shade);
  border-radius: var(--bt-border-radius-lg);
  corner-shape: squircle;
}
/* Sale badge */
.wc-block-components-product-sale-badge {
  padding-inline: 40px !important;
  padding-block: 4px !important;
  aspect-ratio: 1;
  left: 0 !important;
  top: 0 !important;
  align-content: end !important;
  transform: translateY(-50%) translateX(-50%) rotate(-45deg);
  border-radius: 0 !important;
}

/* Product filters */

.bt-filters-sidebar {
  top: calc(var(--navbar-height) + 8px);
}

.bt-filters-sidebar > div {
  max-height: calc(100vh - 100px); /* stay inside viewport */
  overflow-y: auto; /* enable scrolling if content exceeds max-height */
  scrollbar-width: thin;
  direction: ltr;
  scrollbar-color: var(--wp--preset--color--green) transparent;
}

.bt-filters-sidebar > div > div {
  direction: rtl;
}
@media (max-width: 600px) {
  .wc-block-product-filters__overlay {
    padding-top: var(--navbar-height);
  }
}

.wc-block-product-filter-removable-chips__item {
  border-image: none !important;
  border: 1px solid var(--wp--preset--color--shade) !important;
  border-radius: var(--bt-border-radius) !important;
  corner-shape: squircle;
}

/* Minicart */

.wc-block-cart-items .wc-block-components-product-metadata {
  display: none;
}

.wc-block-cart-item__quantity {
  display: flex;
  gap: 16px;
}

.wc-block-cart-item__total {
  font-weight: 700;
}

/* Checkout */

.wp-block-woocommerce-checkout-order-summary-block
  .wc-block-components-product-metadata__description {
  display: none;
}

/* category list */

ul.wc-block-product-categories-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

li.wc-block-product-categories-list-item a{
  text-decoration-line: none;
}

.bt-select {
  position: relative;
}

.bt-select select {
  font-family: inherit !important;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  font-size: 16px;
  padding: 8px 12px 8px 32px;
  background-color: var(--wp--preset--color--white);
  border: 2px solid var(--wp--preset--color--shade);
  border-radius: 8px;
  corner-shape: squircle;
  color: var(--wp--preset--color--blackbt-);
  cursor: pointer;
  outline: none;
}

.bt-select select:focus {
  background: var(--wp--preset--color--shade);
}

.bt-select::after {
  content: "";
  position: absolute;
  pointer-events: none;
  top: 50%;
  left: 14px;
  transform: translate(0, -50%);
  width: 12px;
  height: 12px;
  background-color: var(--wp--preset--color--black);
  clip-path: polygon(8% 17%, 0% 25%, 50% 84%, 100% 25%, 92% 17%, 50% 65%);
}

.bt-select select option {
  background-color: var(--wp--preset--color--white);
  padding: 8px 12px;
}

.bt-select select option:checked,
.bt-select select option:hover {
  background-color: var(--wp--preset--color--shade);
  color: var(--wp--preset--color--black);
}
.bt-select select option:checked,
.bt-select select option:focus {
  background-color: var(--wp--preset--color--shade);
  color: var(--wp--preset--color--black);
}
