/*
Theme Name: Salud y respira

WooCommerce styles override
*/

/**
 * archive
 */
.category-header {
  text-align: center;
  margin-top: 0;
  background: linear-gradient(274.51deg, #C7DBEA -5.6%, #212753 110.84%);
  color: white;
  padding: 1rem;
  position: relative;
  margin-bottom: 0;
}

.category-header:before {
  content: url('../saludyrespira/assets/svg/logo-inverted-shop.svg');
  position: absolute;
  top: 0;
  right: 0;
  transform: scaleX(-1);
  opacity: .75;
  max-width: 20%;
  height: 80%;
  aspect-ratio: 13 / 15;
  z-index: 0;
}

.category-title {
  z-index: 1;
  position: relative;
  margin: 0;
}

.orderby {
  border: none;
  background-color: var(--light-green);
  padding: 10px;
  color: white;
  appearance: none;
  -moz-appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 20px;
  width: 310px;
}
html[lang='en'] .orderby,
html[lang='en-US'] .orderby {
  width: 240px;
}
html[lang='es'] .orderby,
html[lang='es-ES'] .orderby {
  width: 280px;
}
html[lang='ca'] .orderby,
html[lang='ca-ES'] .orderby {
  width: 310px;
}
/* Safari bugfix */
.orderby::-ms-expand {
  display: none; /* IE/Edge old */
}

/**
 * Shop tables
 */
table.shop_table_responsive thead {
  display: none;
}

table.shop_table_responsive tbody th {
  display: none;
}

table.shop_table_responsive tr td {
  display: block;
  text-align: right;
  clear: both;
}

table.shop_table_responsive tr td::before {
  content: attr(data-title) ": ";
  float: left;
}

table.shop_table_responsive tr td.product-remove a {
  text-align: left;
}

table.shop_table_responsive tr td.product-remove::before {
  display: none;
}

table.shop_table_responsive tr td.actions::before,
table.shop_table_responsive tr td.download-actions::before {
  display: none;
}

table.shop_table_responsive tr td.download-actions .button {
  display: block;
  text-align: center;
}

@media screen and (min-width: 48em) {

  table.shop_table_responsive thead {
    display: table-header-group;
  }

  table.shop_table_responsive tbody th {
    display: table-cell;
  }

  table.shop_table_responsive tr th,
  table.shop_table_responsive tr td {
    text-align: left;
  }

  table.shop_table_responsive tr td {
    display: table-cell;
  }

  table.shop_table_responsive tr td::before {
    display: none;
  }
}

/**
 * Products
 */
ul.products {
  margin: 0;
  padding: 0;
}

ul.products li.product {
  list-style: none;
  position: relative;
  margin-bottom: 2em;
  padding: 12px;
  display: flex;
  gap: 1rem;
  flex-direction: column;
}

h2.woocommerce-loop-product__title {
  font-size: 1rem;
  margin: 0;
}

ul.products li.product > img {
  display: block;
  aspect-ratio: 190 / 120;
  object-fit: contain;
}

ul.products li.product .button {
  display: block;
}

.upsells.products li.product h2,
.related.products li.product h2 {
  font-size: 14px;
}

/**
 * Single product
 */
.single-product div.product {
  position: relative;
}

.single-product div.product .woocommerce-product-gallery {
  position: relative;
  float: left;
}

.woocommerce-product-gallery.woocommerce-product-gallery--with-images.images .flex-viewport {
  background-color: white;
}

.woocommerce-product-gallery__image {
  aspect-ratio: 4 / 3;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.woocommerce-product-gallery__image img,
.woocommerce-product-gallery__image iframe {
  width: 100%;
  height: 100%;
  object-fit: contain
}

.single-product div.product .woocommerce-product-gallery .woocommerce-product-gallery__trigger {
  position: absolute;
  top: 2em;
  right: 1em;
  display: block;
  z-index: 99;
}

.single-product div.product .woocommerce-product-gallery .flex-control-thumbs {
  margin: 0;
  padding: 0;
}

.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li {
  list-style: none;
  cursor: pointer;
  float: left;
}

.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li img {
  opacity: 0.5;
}

.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li img.flex-active {
  opacity: 1;
}

.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li:hover img {
  opacity: 1;
}

.single-product div.product .woocommerce-product-gallery.woocommerce-product-gallery--columns-2 .flex-control-thumbs li {
  width: 48.1%;
}

.single-product div.product .woocommerce-product-gallery.woocommerce-product-gallery--columns-2 .flex-control-thumbs li:nth-child(2n) {
  margin-right: 0;
}

.single-product div.product .woocommerce-product-gallery.woocommerce-product-gallery--columns-2 .flex-control-thumbs li:nth-child(2n+1) {
  clear: both;
}

.single-product div.product .woocommerce-product-gallery.woocommerce-product-gallery--columns-3 .flex-control-thumbs li {
  width: 30.79667%;
}

.single-product div.product .woocommerce-product-gallery.woocommerce-product-gallery--columns-3 .flex-control-thumbs li:nth-child(3n) {
  margin-right: 0;
}

.single-product div.product .woocommerce-product-gallery.woocommerce-product-gallery--columns-3 .flex-control-thumbs li:nth-child(3n+1) {
  clear: both;
}

.single-product div.product .woocommerce-product-gallery.woocommerce-product-gallery--columns-4 .flex-control-thumbs li {
  width: 22.15%;
}

.single-product div.product .woocommerce-product-gallery.woocommerce-product-gallery--columns-4 .flex-control-thumbs li:nth-child(4n) {
  margin-right: 0;
}

.single-product div.product .woocommerce-product-gallery.woocommerce-product-gallery--columns-4 .flex-control-thumbs li:nth-child(4n+1) {
  clear: both;
}

.single-product div.product .woocommerce-product-gallery.woocommerce-product-gallery--columns-5 .flex-control-thumbs li {
  width: 16.96%;
}

.single-product div.product .woocommerce-product-gallery.woocommerce-product-gallery--columns-5 .flex-control-thumbs li:nth-child(5n) {
  margin-right: 0;
}

.single-product div.product .woocommerce-product-gallery.woocommerce-product-gallery--columns-5 .flex-control-thumbs li:nth-child(5n+1) {
  clear: both;
}

.stock:empty::before {
  display: none;
}

.stock.in-stock {
  color: #0f834d;
}

.stock.out-of-stock {
  color: #e2401c;
}

/**
 * Checkout
 */

.woocommerce-form__label-for-checkbox {
  gap: .5rem;
  margin-top: 2rem;
}
.woocommerce-form__label-for-checkbox [type="checkbox"]{
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.wp-block-woocommerce-checkout.alignwide {
  max-width: 100%;
  margin: 0 auto;
}

.woocommerce-checkout .entry-content>.woocommerce {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.woocommerce-form-coupon-toggle {
  margin-bottom: 1rem;
}

.checkout_coupon.woocommerce-form-coupon {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.checkout_coupon.woocommerce-form-coupon p {
  width: 100%;
  margin: 0;
}

.checkout_coupon.woocommerce-form-coupon p.form-row {
  width: auto;
}

.checkout_coupon.woocommerce-form-coupon p.form-row input {
  height: 100%;
  text-align: center;
}

.order_review_wrapper {
  background: white;
  padding: 1rem;
  border-radius: 10px;
}

.woocommerce-billing-fields__field-wrapper {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  flex-direction: row;
}

.woocommerce-billing-fields__field-wrapper p {
  margin-bottom: 0;
}

form.checkout.woocommerce-checkout {
  margin-bottom: 2rem;
}

.checkout.woocommerce-checkout h3 {
  margin-top: 0;
}

.form-row {
  display: flex;
  flex-direction: column;
}

.woocommerce-form .form-row {
 align-items: flex-start;
}
.woocommerce-form.woocommerce-form-login.login .form-row.form-row-wide {
 align-items: stretch;
}

.woocommerce_before_lost_password_form__title {
  margin-bottom: 4rem;
  text-align: center;
  color: var(--dark-blue);
}

.woocommerce-loop-product__title,
.woocommerce h2 {
  color: var(--dark-blue);
}

.woocommerce-account .woocommerce-form-login__submit {
  margin-top: 1rem;
}

div.col2-set {
  margin-bottom: 4rem;
}

div.col2-set .col-1 {
  margin-bottom: 2rem;
}

div.col2-set p {
  flex-grow: 1;
  width: 100%;
}

div.col2-set p input {
  width: 100%;
}

.select2-container--default .select2-selection--single {
  border: 1px solid #212753;
  border-radius: 10px;
  height: 32px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  color: var(--dark-blue);
}

form.checkout.woocommerce-checkout .woocommerce-additional-fields .woocommerce-input-wrapper textarea {
  width: 100% !important;
}

ul.wc_payment_methods.payment_methods.methods {
  margin: 0;
  padding: 0;
  list-style: none;
}

.shop_table.woocommerce-checkout-review-order-table {
  border-spacing: 0;
}

.shop_table.woocommerce-checkout-review-order-table thead th {
  text-align: left;
  padding-bottom: .5rem;
}

.shop_table.woocommerce-checkout-review-order-table tbody {
  vertical-align: top;
}

.shop_table.woocommerce-checkout-review-order-table td:first-child {
  padding-right: .5rem;
}

.shop_table.woocommerce-checkout-review-order-table tbody td {
  border-bottom: 1px solid #212753;
}

.shop_table.woocommerce-checkout-review-order-table tr {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.woocommerce-shipping-methods {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.woocommerce-shipping-methods li {
  display: flex;
  gap: .5rem;
}

.shop_table.woocommerce-checkout-review-order-table .woocommerce-shipping-methods li {
  flex-direction: row-reverse;
}

ul.woocommerce-error {
  padding: 1rem;
  padding-left: 2rem;
  list-style: none;
}

.woocommerce .woocommerce-error {
  background-color: rgba(var(--atention-call-rgb), .5);
}

ul.woocommerce-error li {
  position: relative;
}

ul.woocommerce-error li::before {
  font-family: "Font Awesome 5 Free";
  content: "\f071";
  font-weight: 600;
  display: inline-block;
  position: absolute;
  top: 0;
  left: -20px;
  color: inherit;
}

@media (max-width: 768px) {

  div.col2-set .form-row-first,
  div.col2-set .form-row-last {
    float: none;
    width: calc(50% - .5rem);
    margin: 0;
  }

  div.col2-set p {
    min-width: calc(50% - .5rem);
    width: auto;
  }

  #billing_address_1_field,
  #billing_address_2_field {
    width: 100%;
  }

  .woocommerce-account.logged-in .entry-content>.woocommerce {
    display: flex;
    gap: 3rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
  }

  .woocommerce-MyAccount-navigation ul {
    width: auto;
  }

}

@media screen and (min-width: 768px) {
  .col2-set .woocommerce-billing-fields__field-wrapper .form-row-first {
    margin-right: 0;
    width: 100%;
  }

  .account_navigation_wrapper {
    display: flex;
    gap: 2rem;
  }
}

@media (min-width: 1024px) {
  form.checkout.woocommerce-checkout {
    margin-bottom: 0;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    position: relative;
    flex-wrap: wrap;
  }

  #customer_details {
    width: calc(60% - 1rem);
  }

  .order_review_wrapper {
    width: calc(40% - 1rem);
    position: sticky;
    top: 1rem;
    margin-bottom: 2rem;
  }

  .admin-bar .order_review_wrapper {
    top: calc(1rem + 32px);
  }

  form.checkout.woocommerce-checkout .woocommerce-NoticeGroup {
    width: 100%;
  }
}

@media screen and (min-width: 768px) {

  .col2-set .form-row-first {
    float: left;
    margin-right: 3.8%;
  }

  .col2-set .form-row-last {
    float: right;
    margin-right: 0;
  }

  .col2-set .form-row-first,
  .col2-set .form-row-last {
    width: 48.1%;
  }
}

/**
 * General WooCommerce components
 */

/**
 * Header cart
 */
.site-header-cart {
  position: relative;
  margin: 0;
  padding: 0;
}

.site-header-cart .cart-contents {
  text-decoration: none;
}

.site-header-cart .widget_shopping_cart {
  display: none;
}

.site-header-cart .product_list_widget {
  margin: 0;
  padding: 0;
}

/**
 * Star rating
 */
.star-rating {
  overflow: hidden;
  position: relative;
  height: 1.618em;
  line-height: 1.618;
  width: 5.3em;
  font-family: star;
  font-weight: 400;
}

.star-rating::before {
  content: "\53\53\53\53\53";
  opacity: 0.25;
  float: left;
  top: 0;
  left: 0;
  position: absolute;
}

.star-rating span {
  overflow: hidden;
  float: left;
  top: 0;
  left: 0;
  position: absolute;
  padding-top: 1.5em;
}

.star-rating span::before {
  content: "\53\53\53\53\53";
  top: 0;
  position: absolute;
  left: 0;
  color: #4169e1;
}

p.stars a {
  position: relative;
  height: 1em;
  width: 1em;
  text-indent: -999em;
  display: inline-block;
  text-decoration: none;
  margin-right: 1px;
  font-weight: 400;
}

p.stars a::before {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 1em;
  height: 1em;
  line-height: 1;
  font-family: star;
  content: "\53";
  color: #404040;
  text-indent: 0;
  opacity: 0.25;
}

p.stars a:hover~a::before {
  content: "\53";
  color: #404040;
  opacity: 0.25;
}

p.stars:hover a::before {
  content: "\53";
  color: #4169e1;
  opacity: 1;
}

p.stars.selected a.active::before {
  content: "\53";
  color: #4169e1;
  opacity: 1;
}

p.stars.selected a.active~a::before {
  content: "\53";
  color: #404040;
  opacity: 0.25;
}

p.stars.selected a:not(.active)::before {
  content: "\53";
  color: #4169e1;
  opacity: 1;
}

/**
 * Tabs
 */
#tabs-buttons {
  list-style: none;
  position: absolute;
  margin: 0;
  padding: 0;
  text-align: left;
  background: #fff;
  z-index: 10;
  width: 100%;
  border-radius: 5px;
  border: 1px solid var(--light-green);
}

div#tabs-buttons-wrapper {
  width: 100%;
}
.woocommerce-tabs ul.tabs li::after {
  content: none;
}

@keyframes expand-wrapper {
  from {
    width: 80%;
    left: 10%;
  }

  to {
    width: 100%;
    left: 0;
  }
}

@keyframes shrink-wrapper {
  from {
    width: 100vw;
    width: 100dvw;
    left: calc(-1 * (100vw - 100%) / 2);
  }

  to {
    width: 100%;
    left: 0;
  }
}


/* Sticky state: full width and fixed position */
#tabs-buttons.is-sticky {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: #fff;
  display: flex;
  justify-content: center;
  animation-name: expand-wrapper;
  animation-duration: 0.3s;
}

.admin-bar #tabs-buttons.is-sticky {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar #tabs-buttons.is-sticky {
    top: 46px;
  }
}

/* When the sticky class is removed, reverse the animation */
#tabs-buttons:not(.is-sticky) {
  position: absolute;
  top: auto;
  display: flex;
  justify-content: center;
  animation-name: shrink-wrapper;
  animation-duration: 0.2s;
}

ul.tabs.woocommerce-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
  width: 100%;
}

ul.tabs.woocommerce-tabs li {
  display: block;
  margin: 0;
  position: relative;
  flex-grow: 1;
}

ul.tabs.woocommerce-tabs li a {
  padding: 1em 0;
  display: block;
  text-decoration: none;
  color: var(--dark);
  width: fit-content;
  padding: 1rem;
  width: 100%;
  text-align: center;
}

ul.tabs.woocommerce-tabs li a.active,
ul.tabs.woocommerce-tabs li a:hover {
  background: rgb(var(--light-green-rgb), 0.3);
}

.woocommerce-tabs .panel h2:first-of-type {
  margin-bottom: 1em;
}

.woocommerce-tabs .panel {
  margin-bottom: 20px;
  display: block;
}

/**
 * Password strength meter
 */
.woocommerce-password-strength {
  text-align: right;
}

.woocommerce-password-strength.strong {
  color: #0f834d;
}

.woocommerce-password-strength.short {
  color: #e2401c;
}

.woocommerce-password-strength.bad {
  color: #e2401c;
}

.woocommerce-password-strength.good {
  color: #3d9cd2;
}

/**
 * Forms
 */
.form-row.woocommerce-validated input.input-text {
  box-shadow: inset 2px 0 0 #0f834d;
}

.form-row.woocommerce-invalid input.input-text {
  box-shadow: inset 2px 0 0 #e2401c;
}

.checkout-inline-error-message {
  color: var(--atention-call) !important;
}

/* Privacy consent checkbox: show the error on the box itself, not as text underneath. */
#ps_accept_policies_description {
  display: none !important;
}

.form-row.woocommerce-invalid #ps_accept_policies {
  outline: 2px solid var(--atention-call);
  outline-offset: 2px;
  accent-color: var(--atention-call);
}

.required {
  color: #f00;
}

/**
 * Notices
 */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-noreviews,
p.no-comments {
  background-color: #0f834d;
  clear: both;
}

.woocommerce-info,
.woocommerce-noreviews,
p.no-comments {
  background-color: #3d9cd2;
}

.woocommerce-error {
  background-color: #e2401c;
}

.demo_store {
  position: fixed;
  left: 0;
  bottom: 0;
  right: 0;
  margin: 0;
  padding: 1em;
  background-color: #3d9cd2;
  z-index: 9999;
}

@media screen and (min-width: 48em) {

  /**
	 * Header cart
	 */
  .site-header-cart .widget_shopping_cart {
    position: absolute;
    top: 100%;
    width: 100%;
    z-index: 999999;
    left: -999em;
    display: block;
    box-shadow: 0 3px 3px rgba(0, 0, 0, 0.2);
  }

  .site-header-cart:hover .widget_shopping_cart,
  .site-header-cart.focus .widget_shopping_cart {
    left: 0;
    display: block;
  }
}

/**
 * WooCommerce widgets
 */

/**
 * WooCommerce Price Filter
 */
.widget_price_filter .price_slider {
  margin-bottom: 1.5em;
}

.widget_price_filter .price_slider_amount {
  text-align: right;
  line-height: 2.4;
}

.widget_price_filter .price_slider_amount .button {
  float: left;
}

.widget_price_filter .ui-slider {
  position: relative;
  text-align: left;
}

.widget_price_filter .ui-slider .ui-slider-handle {
  position: absolute;
  z-index: 2;
  width: 1em;
  height: 1em;
  cursor: ew-resize;
  outline: none;
  background: #4169e1;
  box-sizing: border-box;
  margin-top: -0.25em;
  opacity: 1;
}

.widget_price_filter .ui-slider .ui-slider-handle:last-child {
  margin-left: -1em;
}

.widget_price_filter .ui-slider .ui-slider-handle:hover,
.widget_price_filter .ui-slider .ui-slider-handle.ui-state-active {
  box-shadow: 0 0 0 0.25em rgba(0, 0, 0, 0.1);
}

.widget_price_filter .ui-slider .ui-slider-range {
  position: absolute;
  z-index: 1;
  display: block;
  border: 0;
  background: #4169e1;
}

.widget_price_filter .price_slider_wrapper .ui-widget-content {
  background: rgba(0, 0, 0, 0.1);
}

.widget_price_filter .ui-slider-horizontal {
  height: 0.5em;
}

.widget_price_filter .ui-slider-horizontal .ui-slider-range {
  height: 100%;
}

/*
* My account
*/

.woocommerce-ResetPassword.lost_reset_password .woocommerce-Button.button {
  max-width: fit-content;
  margin-right: auto;
  margin-bottom: 3rem;
}

.woocommerce-MyAccount-navigation {
  margin-bottom: 3rem;
}

.logged-in.woocommerce-account .entry-content>.woocommerce {
  margin-top: 4rem;
}


.woocommerce-orders-table__cell-order-actions > *:not(:last-child) {
	margin-right: 1rem;
}

.woocommerce-orders-table__cell-order-actions .button {
	color: var(--dark-blue);
}

.woocommerce-form__label-for-checkbox--no-flex {
  display: block;
  margin-top: 0;
}

.woocommerce-ResetPassword,
.syr-reset-link-sent .woocommerce,
.woocommerce-account:not(.logged-in) .woocommerce-notices-wrapper {
  width: var(--width-wide);
  max-width: var(--max-width-wide);
  margin-inline: auto;
  margin-top: 2rem;
}

.woocommerce-lost-password .entry-content .woocommerce .woocommerce-message {
  margin-block: 2rem 1rem;
}