/* AK Chic Closet 1.5.7: compact variation cards and safer quick-add states. */

body:not(.single-product) :where(
  .ak-product-card,
  .woocommerce ul.products li.product,
  .woocommerce-page ul.products li.product,
  .wc-block-product,
  .wc-block-grid__product,
  .wp-block-post.product
) {
  align-content: start !important;
}

body:not(.single-product) .ak-product-card .ak-card-copy,
body:not(.single-product) .ak-product-card .wp-block-group.ak-card-copy {
  gap: 0.42rem !important;
  grid-template-rows: auto auto auto auto !important;
  padding: 0.95rem 0.95rem 0.38rem !important;
}

body:not(.single-product) .ak-product-card .ak-product-badge {
  font-size: 0.52rem !important;
  letter-spacing: 0.18em !important;
  margin: 0 !important;
  padding: 0.28rem 0.46rem !important;
}

body:not(.single-product) :where(
  .ak-product-card h2,
  .ak-product-card h3,
  .ak-product-card .wp-block-heading,
  .woocommerce ul.products li.product .woocommerce-loop-product__title,
  .wc-block-product .wp-block-post-title,
  .wc-block-grid__product-title
) {
  display: -webkit-box !important;
  font-size: clamp(1.02rem, 1.55vw, 1.34rem) !important;
  line-height: 1.12 !important;
  margin: 0 !important;
  min-height: 2.28em !important;
  overflow: hidden !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body:not(.single-product) :where(
  .ak-price,
  .woocommerce ul.products li.product .price,
  .wc-block-components-product-price,
  .wc-block-grid__product-price
) {
  line-height: 1.25 !important;
  margin: 0.06rem 0 0 !important;
}

body:not(.single-product) .ak-card-variation-preview {
  align-items: center !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.28rem !important;
  justify-content: flex-start !important;
  margin: 0.3rem 0.78rem 0 !important;
  min-height: 0 !important;
  padding: 0.26rem !important;
}

body:not(.single-product) .ak-product-card .ak-card-copy .ak-card-variation-preview {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

body:not(.single-product) .ak-card-variation-preview__group {
  display: contents !important;
}

body:not(.single-product) .ak-card-variation-preview__option {
  border-radius: 7px !important;
  flex: 0 1 auto !important;
  font-size: 0.56rem !important;
  line-height: 1 !important;
  min-height: 24px !important;
  min-width: 24px !important;
  padding: 0.22rem 0.36rem !important;
}

body:not(.single-product) .ak-card-variation-preview__group--color .ak-card-variation-preview__option {
  gap: 0.24rem !important;
  max-width: min(100%, 7.8rem) !important;
  padding: 0.18rem 0.38rem 0.18rem 0.18rem !important;
}

body:not(.single-product) .ak-card-variation-preview__swatch {
  flex: 0 0 16px !important;
  height: 16px !important;
  width: 16px !important;
}

body:not(.single-product) .ak-card-variation-preview__name {
  font-size: 0.54rem !important;
  max-width: 8.5ch !important;
}

body:not(.single-product) .ak-card-actions {
  gap: 0.45rem !important;
  padding: 0.46rem 0.95rem 0.95rem !important;
}

body:not(.single-product) :where(
  .ak-card-actions a,
  .ak-card-actions button,
  .ak-card-actions span,
  .woocommerce ul.products li.product .button,
  .woocommerce ul.products li.product .add_to_cart_button,
  .wc-block-components-product-button .wp-block-button__link,
  .wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link
) {
  border-radius: 16px !important;
  gap: 0.42rem !important;
  letter-spacing: 0.11em !important;
  line-height: 1 !important;
  min-height: 42px !important;
  padding: 0.72rem 0.78rem !important;
}
body:not(.single-product) :where(
  .ak-card-add,
  .wc-block-product .ak-card-add,
  .wc-block-grid__product .ak-card-add,
  .wp-block-post.product .ak-card-add,
  .wc-block-components-product-button__button.ak-card-add
) {
  align-items: center !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  font-size: clamp(0.56rem, 0.85vw, 0.66rem) !important;
  gap: 0.36rem !important;
  justify-content: center !important;
  letter-spacing: 0.075em !important;
  line-height: 1 !important;
  min-height: 40px !important;
  overflow-wrap: normal !important;
  padding: 0.62rem 0.66rem !important;
  text-wrap: nowrap !important;
  white-space: nowrap !important;
}


body:not(.single-product) :where(
  .ak-card-add.product_type_simple,
  .ak-card-add.ak-card-add--quick-variable,
  .add_to_cart_button.product_type_simple
):not(.ak-card-add--disabled) {
  align-items: center !important;
  display: inline-flex !important;
  justify-content: center !important;
}

body:not(.single-product) :where(
  .ak-card-add.product_type_simple,
  .ak-card-add.ak-card-add--quick-variable,
  .add_to_cart_button.product_type_simple
):not(.ak-card-add--disabled)::before,
body.single-product .single_add_to_cart_button::before {
  background-color: currentColor !important;
  content: "" !important;
  display: block !important;
  flex: 0 0 15px !important;
  height: 15px !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4h2l2.4 10.2a2 2 0 0 0 2 1.6h7.7a2 2 0 0 0 2-1.6L21 7H6'/%3E%3Ccircle cx='9' cy='20' r='1'/%3E%3Ccircle cx='19' cy='20' r='1'/%3E%3C/svg%3E") center / contain no-repeat !important;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4h2l2.4 10.2a2 2 0 0 0 2 1.6h7.7a2 2 0 0 0 2-1.6L21 7H6'/%3E%3Ccircle cx='9' cy='20' r='1'/%3E%3Ccircle cx='19' cy='20' r='1'/%3E%3C/svg%3E") center / contain no-repeat !important;
  width: 15px !important;
}

body:not(.single-product) .ak-card-add--select-options {
  font-size: 0 !important;
}

body:not(.single-product) .ak-card-add--select-options::before {
  color: currentColor !important;
  content: "Select Options" !important;
  display: block !important;
  font-size: clamp(0.56rem, 0.85vw, 0.66rem) !important;
  font-weight: inherit !important;
  letter-spacing: 0.075em !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}
body:not(.single-product) .ak-card-add--select-options::after {
  background-color: currentColor !important;
  content: "" !important;
  display: block !important;
  flex: 0 0 13px !important;
  height: 13px !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / contain no-repeat !important;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / contain no-repeat !important;
  width: 13px !important;
}

body:not(.single-product) .ak-card-add--disabled {
  align-items: center !important;
  background: rgba(17, 17, 17, 0.18) !important;
  border-color: rgba(17, 17, 17, 0.18) !important;
  box-sizing: border-box !important;
  color: rgba(17, 17, 17, 0.62) !important;
  cursor: not-allowed !important;
  display: inline-flex !important;
  height: 40px !important;
  justify-content: center !important;
  min-height: 40px !important;
  pointer-events: none !important;
}

html.ak-dark body:not(.single-product) .ak-card-add--disabled,
body.ak-dark:not(.single-product) .ak-card-add--disabled {
  background: rgba(255, 243, 242, 0.14) !important;
  border-color: rgba(255, 243, 242, 0.22) !important;
  color: rgba(255, 243, 242, 0.64) !important;
}

body :where(
  .ak-shop-controls__cats .ak-chip,
  .ak-shop-controls .wp-block-button__link,
  .category-buttons a,
  ul.product-categories a,
  ul.wc-block-product-categories-list a
):where(:hover, :focus-visible) {
  background: #111111 !important;
  border-color: rgba(212, 175, 55, 0.72) !important;
  box-shadow: 0 8px 18px rgba(17, 17, 17, 0.16) !important;
  color: #fff3f2 !important;
  outline: none !important;
}

html.ak-dark body :where(
  .ak-shop-controls__cats .ak-chip,
  .ak-shop-controls .wp-block-button__link,
  .category-buttons a,
  ul.product-categories a,
  ul.wc-block-product-categories-list a
):where(:hover, :focus-visible),
body.ak-dark :where(
  .ak-shop-controls__cats .ak-chip,
  .ak-shop-controls .wp-block-button__link,
  .category-buttons a,
  ul.product-categories a,
  ul.wc-block-product-categories-list a
):where(:hover, :focus-visible) {
  background: #fff3f2 !important;
  border-color: rgba(212, 175, 55, 0.78) !important;
  color: #111111 !important;
}

body.single-product form.variations_form table.variations tbody {
  gap: 0.62rem !important;
}

body.single-product form.variations_form table.variations tr {
  gap: 0.34rem !important;
}

body.single-product :is(.variable-items-wrapper, .cfvsw-swatches-container, .tawcvs-swatches, .ak-variation-choices) {
  gap: 0.42rem !important;
}

body.single-product :is(.variable-item, .cfvsw-swatches-option, .swatch, .ak-variation-choice) {
  min-height: 38px !important;
  min-width: 40px !important;
  padding: 0.46rem 0.64rem !important;
}

body.single-product .single_add_to_cart_button {
  align-items: center !important;
  display: inline-flex !important;
  gap: 0.46rem !important;
  justify-content: center !important;
}

@media (max-width: 767px) {
  body:not(.single-product) .ak-product-card .ak-card-copy,
  body:not(.single-product) .ak-product-card .wp-block-group.ak-card-copy {
    gap: 0.32rem !important;
    padding: 0.68rem 0.62rem 0.28rem !important;
  }

  body:not(.single-product) .ak-product-card .ak-product-badge {
    font-size: 0.47rem !important;
    padding: 0.23rem 0.36rem !important;
  }

  body:not(.single-product) .ak-card-variation-preview {
    gap: 0.22rem !important;
    margin: 0.22rem 0.55rem 0 !important;
    padding: 0.22rem !important;
  }

  body:not(.single-product) .ak-product-card .ak-card-copy .ak-card-variation-preview {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body:not(.single-product) .ak-card-variation-preview__option {
    font-size: 0.5rem !important;
    min-height: 22px !important;
    min-width: 22px !important;
    padding: 0.18rem 0.3rem !important;
  }

  body:not(.single-product) .ak-card-variation-preview__swatch {
    flex-basis: 14px !important;
    height: 14px !important;
    width: 14px !important;
  }

  body:not(.single-product) .ak-card-variation-preview__name {
    font-size: 0.48rem !important;
    max-width: 7ch !important;
  }

  body:not(.single-product) .ak-card-actions {
    padding: 0.34rem 0.62rem 0.68rem !important;
  }

  body:not(.single-product) .ak-card-add--select-options::before {
    font-size: clamp(0.48rem, 2vw, 0.58rem) !important;
    letter-spacing: 0.045em !important;
  }
  body:not(.single-product) .ak-card-add--select-options::after {
    flex-basis: 10px !important;
    height: 10px !important;
    width: 10px !important;
  }

  body:not(.single-product) :where(
    .ak-card-add,
    .wc-block-components-product-button__button.ak-card-add,
    .ak-card-actions a,
    .ak-card-actions button,
    .ak-card-actions span,
    .woocommerce ul.products li.product .button,
    .woocommerce ul.products li.product .add_to_cart_button,
    .wc-block-components-product-button .wp-block-button__link,
    .wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link
  ) {
    border-radius: 14px !important;
    font-size: clamp(0.48rem, 2vw, 0.58rem) !important;
    gap: 0.28rem !important;
    height: 36px !important;
    letter-spacing: 0.045em !important;
    min-height: 36px !important;
    overflow-wrap: normal !important;
    padding: 0.55rem 0.34rem !important;
    text-wrap: nowrap !important;
    white-space: nowrap !important;
  }
}