.leyra-shop-main {
  box-sizing: border-box;
  padding-left: 16px !important;
  padding-right: 16px !important;
}

.leyra-shop-toolbar {
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.leyra-shop-toolbar .leyra-product-search {
  flex: 1 1 280px;
  max-width: 420px;
}

.leyra-shop-toolbar .wp-block-search__inside-wrapper {
  border: 1px solid rgba(0, 0, 0, 0.62);
  border-radius: 999px;
  overflow: hidden;
}

.leyra-shop-toolbar .wp-block-search__button,
.leyra-shop-toolbar .wp-block-search__input {
  min-height: 44px;
}

.leyra-shop-toolbar .wp-block-search__input {
  appearance: none;
  background: transparent !important;
  border: 0;
  color: var(--wp--preset--color--contrast, #111);
  font: inherit;
  padding-left: 0.75rem;
}

.leyra-shop-toolbar .wp-block-search__input::placeholder {
  color: rgba(0, 0, 0, 0.56);
  opacity: 1;
}

.leyra-shop-toolbar .wp-block-search__input:focus {
  background: transparent !important;
  outline: 0;
}

.leyra-shop-toolbar .wp-block-search__input:-webkit-autofill,
.leyra-shop-toolbar .wp-block-search__input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--wp--preset--color--contrast, #111);
  box-shadow: 0 0 0 1000px var(--wp--preset--color--base, #fff) inset;
}

.leyra-shop-toolbar
  .wp-block-search__input::-webkit-search-cancel-button,
.leyra-shop-toolbar
  .wp-block-search__input::-webkit-search-decoration {
  appearance: none;
}

.leyra-shop-toolbar .wp-block-search__inside-wrapper:focus-within {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.leyra-shop-toolbar .wp-block-search__button {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--wp--preset--color--contrast, #111);
}

.leyra-shop-toolbar .woocommerce-ordering {
  margin: 0;
}

.leyra-shop-toolbar .orderby {
  appearance: none;
  background-color: var(--wp--preset--color--base, #fff);
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-repeat: no-repeat;
  background-size: 6px 6px, 6px 6px;
  border: 1px solid rgba(0, 0, 0, 0.62);
  border-radius: 4px;
  box-sizing: border-box;
  color: var(--wp--preset--color--contrast, #111);
  cursor: pointer;
  font: inherit;
  min-height: 44px;
  padding: 0.55rem 2.4rem 0.55rem 0.75rem;
}

.leyra-shop-toolbar .orderby:focus {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.leyra-product-filters {
  margin-bottom: 1.5rem;
}

.leyra-product-filters .wc-block-product-filters__open-overlay {
  border-radius: 999px;
}

.leyra-search-active-filter {
  margin: 0;
}

.leyra-search-active-filter__remove {
  align-items: center;
  color: inherit;
  display: inline-flex;
  font-size: 1.25rem;
  line-height: 1;
  text-decoration: none;
}

.leyra-oem-number {
  display: block;
}

.leyra-oem-number__value {
  font-weight: 600;
}

@media (min-width: 782px) {
  .leyra-shop-layout {
    align-items: start;
    column-gap: 2.5rem;
    display: grid !important;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  }

  .leyra-shop-layout > :not(.leyra-product-filters) {
    grid-column: 2;
    min-width: 0;
  }

  .leyra-shop-layout .leyra-product-filters {
    align-self: start;
    background: var(--wp--preset--color--base, #fff);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    box-sizing: border-box;
    grid-column: 1;
    grid-row: 1 / span 3;
    margin-bottom: 0;
    max-width: 320px;
    overflow: hidden;
    padding: 1.25rem;
    position: sticky;
    top: calc(var(--wp-admin--admin-bar--height, 0px) + 1rem);
    width: 100%;
  }

  .leyra-shop-layout .wc-block-product-filters__overlay-content {
    gap: 1.25rem;
  }

  .leyra-shop-layout .leyra-filter-title {
    margin: 0;
  }

  .leyra-shop-layout .leyra-filter-group-title {
    margin: 0 0 0.75rem;
  }

  .leyra-shop-layout .wp-block-woocommerce-product-filter-taxonomy,
  .leyra-shop-layout .wp-block-woocommerce-product-filter-price,
  .leyra-shop-layout .wp-block-woocommerce-product-filter-status {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 1rem;
  }

  .leyra-shop-layout .wp-block-woocommerce-product-template,
  .leyra-shop-layout .wc-block-product-template,
  .leyra-shop-layout .products,
  .leyra-shop-layout .wp-block-query-pagination,
  .leyra-shop-layout .wp-block-woocommerce-product-collection-no-results {
    grid-column: 2 !important;
    min-width: 0;
  }

  .leyra-shop-layout .wp-block-woocommerce-product-template,
  .leyra-shop-layout .wc-block-product-template,
  .leyra-shop-layout .products {
    width: 100%;
  }

  .leyra-shop-layout .wp-block-woocommerce-product-filter-active {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .leyra-shop-layout
    .wp-block-woocommerce-product-filter-clear-button
    :where(.wp-block-buttons) {
    margin-top: 0;
  }

  .leyra-shop-layout
    .wp-block-woocommerce-product-filter-clear-button
    .wp-block-button__link {
    padding: 0.65rem 1rem;
    white-space: normal;
  }

  .leyra-shop-layout .wc-block-product-filter-removable-chips__items {
    display: flex;
    max-width: 100%;
  }

  .leyra-shop-layout .wc-block-product-filter-removable-chips__item {
    max-width: 100%;
  }

  .leyra-shop-layout .wc-block-product-filter-removable-chips__label {
    overflow-wrap: anywhere;
  }

  .leyra-shop-layout .wp-block-woocommerce-product-filter-price,
  .leyra-shop-layout .wp-block-woocommerce-product-filter-price-slider,
  .leyra-shop-layout .wc-block-product-filter-price-slider,
  .leyra-shop-layout .wc-block-product-filter-price-slider__content {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    width: 100%;
  }

  .leyra-shop-layout .wc-block-product-filter-price-slider__content {
    column-gap: 1rem;
    row-gap: 0.85rem;
    grid-template-areas:
      "price-slider price-slider"
      "left-input right-input";
    grid-template-columns: minmax(0, 123px) minmax(0, 123px);
    justify-content: space-between;
  }

  .leyra-shop-layout .wc-block-product-filter-price-slider__left,
  .leyra-shop-layout .wc-block-product-filter-price-slider__right {
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
  }

  .leyra-shop-layout .wc-block-product-filter-price-slider__left {
    grid-area: left-input !important;
  }

  .leyra-shop-layout .wc-block-product-filter-price-slider__right {
    grid-area: right-input !important;
  }

  .leyra-shop-layout .wc-block-product-filter-price-slider__range {
    --range-color: currentColor;
    box-sizing: border-box;
    height: 24px;
    margin: 0 12px;
    overflow: visible;
    width: calc(100% - 24px);
  }

  .leyra-shop-layout .wc-block-product-filter-price-slider__range::before {
    height: 4px;
    top: 10px;
  }

  .leyra-shop-layout .wc-block-product-filter-price-slider__range .range-bar {
    height: 4px;
    top: 10px;
  }

  .leyra-shop-layout
    .wc-block-product-filter-price-slider__range
    input[type="range"] {
    top: 10px;
  }

  .leyra-shop-layout
    .wc-block-product-filter-price-slider__content
    .text
    input[type="text"],
  .leyra-shop-layout
    .wp-block-woocommerce-product-filter-price-slider
    .text
    input[type="text"] {
    box-sizing: border-box;
    font-size: 0.95rem;
    min-height: 38px;
    min-width: 0;
    padding: 0.35rem 0.45rem;
    width: 100% !important;
  }

  .leyra-shop-layout .wc-block-product-filter-checkbox-list__items {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 700px) {
  .leyra-shop-main {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  .leyra-shop-main .wp-block-query-title {
    font-size: 2.15rem;
    line-height: 1.12;
    margin-bottom: 1.25rem;
    overflow-wrap: anywhere;
    text-wrap: balance;
  }

  .leyra-shop-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 2rem;
    margin-top: 0.5rem;
  }

  .leyra-shop-toolbar .leyra-product-search,
  .leyra-shop-toolbar .woocommerce-ordering {
    max-width: none;
    flex: none;
    width: 100%;
  }

  .leyra-shop-toolbar .wp-block-search__inside-wrapper {
    border-radius: 999px;
    min-height: 56px;
    width: 100%;
  }

  .leyra-shop-toolbar .wp-block-search__input {
    font-size: 1rem;
    min-height: 56px;
    padding-left: 0.9rem;
  }

  .leyra-shop-toolbar .wp-block-search__button {
    flex: 0 0 56px;
    min-height: 56px;
    padding: 0;
    width: 56px;
  }

  .leyra-shop-toolbar .orderby {
    border-radius: 6px;
    font-size: 1rem;
    min-height: 52px;
    padding: 0.85rem 2.75rem 0.85rem 0.9rem;
    width: 100%;
  }

  .leyra-shop-layout {
    margin-top: 0 !important;
  }

  .leyra-product-filters {
    margin-bottom: 2.5rem;
    width: 100%;
  }

  .leyra-product-filters .wc-block-product-filters__open-overlay {
    border: 1px solid currentColor;
    border-radius: 999px;
    justify-content: center;
    min-height: 56px;
    padding: 0.75rem 1rem;
    width: 100%;
  }

  .leyra-product-filters .wc-block-product-filters__overlay-dialog {
    gap: 1rem;
  }

  .leyra-product-filters .wc-block-product-filters__overlay-header {
    padding: 1.25rem 20px 0;
  }

  .leyra-product-filters .wc-block-product-filters__overlay-content {
    gap: 1.25rem;
    padding-bottom: 6rem;
    padding-left: 20px;
    padding-right: 20px;
  }

  .leyra-product-filters .leyra-filter-title {
    margin: 0 0 1.25rem;
  }

  .leyra-product-filters .wc-block-product-filters__close-overlay {
    align-items: center;
    gap: 0.5rem;
  }

  .leyra-product-filters .wp-block-woocommerce-product-filter-active {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .leyra-product-filters .wc-block-product-filter-removable-chips__items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    max-width: 100%;
  }

  .leyra-product-filters .wc-block-product-filter-removable-chips__item {
    align-items: center;
    display: inline-flex;
    max-width: 100%;
    min-height: 40px;
    width: fit-content;
  }

  .leyra-product-filters .wc-block-product-filter-removable-chips__label {
    overflow-wrap: anywhere;
  }

  .leyra-product-filters .leyra-search-active-filter {
    margin: 0;
  }

  .leyra-product-filters
    .wp-block-woocommerce-product-filter-clear-button
    .wp-block-button__link {
    padding: 0.7rem 1.25rem;
  }

  .leyra-product-filters .wp-block-woocommerce-product-filter-taxonomy,
  .leyra-product-filters .wp-block-woocommerce-product-filter-price,
  .leyra-product-filters .wp-block-woocommerce-product-filter-status {
    margin-top: 0;
    padding-top: 1rem;
  }

  .leyra-product-filters .leyra-filter-group-title {
    margin: 0 0 0.75rem;
  }

  .leyra-product-filters .wc-block-product-filter-checkbox-list__items {
    box-sizing: border-box;
    max-width: 100%;
    padding: 0.8rem 1rem;
  }

  .leyra-product-filters .wc-block-product-filters__overlay-footer {
    padding: 1rem 20px max(1rem, env(safe-area-inset-bottom));
  }

  .leyra-product-filters .wc-block-product-filters__apply {
    min-height: 56px;
  }

  .leyra-shop-layout .wp-block-woocommerce-product-template,
  .leyra-shop-layout .wc-block-product-template,
  .leyra-shop-layout .products {
    column-gap: 1rem;
    row-gap: 2.25rem;
    width: 100%;
  }

  .leyra-shop-layout .wc-block-components-product-image,
  .leyra-shop-layout .wc-block-components-product-image img,
  .leyra-shop-layout .wp-block-woocommerce-product-image,
  .leyra-shop-layout .wp-block-woocommerce-product-image img,
  .leyra-shop-layout .wc-block-grid__product-image,
  .leyra-shop-layout .wc-block-grid__product-image img {
    aspect-ratio: 1;
    object-fit: cover;
    width: 100%;
  }

  .leyra-shop-layout .wp-block-post-title {
    font-size: 1.1rem !important;
    line-height: 1.25;
    margin-top: 0.85rem;
    text-wrap: balance;
  }
}

@media (max-width: 380px) {
  .leyra-shop-main {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .leyra-shop-main .wp-block-query-title {
    font-size: 1.9rem;
  }

  .leyra-shop-layout .wp-block-post-title {
    font-size: 1rem !important;
  }
}
