/* Woocommerce button */
.wc-block-components-button:not(.is-link) {
  font-family: 'Comic Crazy', cursive;
  color: white;
  border: 3px solid var(--color-brand-purple);
  background-color: var(--color-brand-green);
}

.wp-block-woocommerce-checkout-order-summary-block {
  border-radius: 0 !important;
  background-color: rgba(139, 92, 246, 0.1);
  border: 4px solid var(--color-brand-purple) !important;
}

@media (min-width: 768px) {
    .wp-block-woocommerce-checkout-order-summary-block,
    .wc-block-components-sidebar {
      position: sticky;
      top: 100px !important;
    }
    .wp-block-woocommerce-checkout-order-summary-block {
      z-index: 10;
    }

}

.wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control-accordion-option--checked-option-highlighted, 
.wc-block-components-radio-control--highlight-checked label.wc-block-components-radio-control__option--checked-option-highlighted {
  background-color: rgba(139, 92, 246, 0.1);
  border-color: var(--color-brand-purple);
}

.wc-block-components-checkout-return-to-cart-button {
  border-bottom: 2px solid transparent;
  transition: border-bottom 0.3s ease;
}

.wc-block-components-checkout-return-to-cart-button:hover {
  border-bottom: 2px solid #000;
}

.wizardskeep-subcategory-filters {
  margin: 0 !important;
  margin-bottom: 60px !important;
}


/* WooCommerce Accessible Sorting Dropdown Styling */

/* Hide the default select dropdown */
.woocommerce-ordering select.orderby {
    display: none !important;
}

/* Custom dropdown styling */
.custom-sorting-dropdown {
    position: relative;
    display: inline-block;
    text-align: left;
}

.custom-sorting-button {
    display: flex;
    align-items: center;
    height: 44px;
    gap: 8px;
    padding-left: 12px;
    padding-right: 8px;
    font-family: var(--font-primary);
    font-size: 0.875rem;
    line-height: 1;
    color: white;
    background-color: var(--color-brand-green);
    border: 3px solid var(--color-brand-purple);
    cursor: pointer;
}

.custom-sorting-button:focus {
    outline: 2px solid var(--color-brand-purple);
    outline-offset: 2px;
}

.custom-sorting-button svg {
    margin-left: 8px;
    height: 24px;
    width: 24px;
    color: white;
}

.custom-sorting-dropdown-content {
    position: absolute;
    right: 0;
    z-index: 60;
    display: none;
    width: 224px;
    margin-top: 8px;
    background-color: white;
    border: 3px solid var(--color-brand-purple);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.custom-sorting-dropdown-content.show {
    display: block;
}

.sorting-option {
    padding: 8px 16px;
    font-family: var(--font-primary);
    font-size: 0.875rem;
    color: black;
    cursor: pointer;
}

.sorting-option:hover, .sorting-option:focus {
    background-color: #f3f4f6;
    color: #1f2937;
}

.sorting-option[aria-selected="true"] {
    font-weight: bold;
    background-color: rgba(59, 7, 100, 0.05);
}

.woocommerce .woocommerce-result-count {
  margin: 1em 0;
}

/* Screen reader only class */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Adjustments for mobile */
@media (max-width: 768px) {
    .woocommerce-ordering {
        width: 100%;
        margin-bottom: 1.5rem;
    }
    
    .custom-sorting-dropdown {
        width: 100%;
    }
    
    .custom-sorting-button {
        width: 100%;
        justify-content: space-between;
    }
    
    .custom-sorting-dropdown-content {
        width: 100%;
    }
}


/* Product Listing styling */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: 'CCMIWE', sans-serif;
  font-size: clamp(1.125rem, 0.446rem + 2.717vw, 1.75rem);
  color: var(--color-brand-purple);
  font-weight: 700;
  line-height: 1;
}

.woocommerce ul.products li.product .price {
  font-size: 1rem;
  color: black;
}

.woocommerce ul.products li.product .button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    height: 44px;
    margin-top: 1.25rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    color: white;
    background-color: var(--color-brand-green);
    font-size: 1rem;
    border: 3px solid var(--color-brand-purple);
    transition-property: all;
    transition-duration: 300ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.woocommerce ul.products li.product .button:hover {
    background-color: var(--color-brand-purple);
}

@media (min-width: 768px) {
  .woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: clamp(1rem, 0.5rem + 1.042vw, 1.5rem);
  }
}

/* Product page */
.woocommerce div.product div.images.woocommerce-product-gallery {
  margin-bottom: 60px;
}

@media (min-width: 1024px) {
  .woocommerce div.product div.images.woocommerce-product-gallery {
    margin-bottom: 90px;
  }
}

@media (min-width: 1536px) {
  .woocommerce div.product div.images.woocommerce-product-gallery {
    margin-bottom: 120px;
  }
}

.product .entry-header {
  margin-bottom: 45px;
}

.product .entry-header h1.entry-title {
  font-family: 'CCMIWE', sans-serif;
  font-weight: bold;
  font-size: clamp(1.75rem, 0.958rem + 3.169vw, 4rem);
  color: var(--color-brand-purple);
}

@media (min-width: 1024px) {
  .product .entry-headere {
    margin-bottom: 75px;
  }
}

@media (min-width: 1536px) {
  .product .entry-header {
    margin-bottom: 90px;
  }
}

.woocommerce div.product div.summary {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 60px;
}

@media (min-width: 1024px) {
  .woocommerce div.product div.summary {
    max-width: 600px;
    margin-bottom: 90px;
  }
}

@media (min-width: 1536px) {
  .woocommerce div.product div.summary {
    margin-bottom: 120px;
  }
}

.woocommerce:where(body:not(.woocommerce-uses-block-theme)) div.product p.price, 
.woocommerce:where(body:not(.woocommerce-uses-block-theme)) div.product span.price {
  color: black;
  font-weight: bold;
}

.woocommerce-product-details__short-description p {
  font-size: clamp(1rem, 0.824rem + 0.704vw, 1.5rem);
  font-weight: normal;
  line-height: 1.2;
}

.woocommerce div.product .entry-summary .product_meta {
  display: flex;
  flex-direction: column;
  font-size: clamp(0.875rem, 0.826rem + 0.181vw, 1rem);
}

.woocommerce div.product form.cart {
  display: flex;
  margin: 0;
  align-items: center;
}

.woocommerce div.product form.cart div.quantity {
  display: flex;
  float: none;
  margin: 0;
  margin-right: 0.5em;
  height: 44px;
  border: 3px solid var(--color-brand-purple);
}

.woocommerce div.product form.cart .button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    height: 44px;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    color: white;
    background-color: var(--color-brand-green);
    font-size: 1rem;
    border: 3px solid var(--color-brand-purple);
    transition-property: all;
    transition-duration: 300ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.woocommerce #content div.product .woocommerce-tabs {
  margin-bottom: 60px;
}

@media (min-width: 1024px) {
  .woocommerce #content div.product .woocommerce-tabs {
    margin-bottom: 90px;
  }
}

@media (min-width: 1536px) {
  .woocommerce #content div.product .woocommerce-tabs {
    margin-bottom: 120px;
  }
}

.woocommerce div.product .woocommerce-tabs .panel {
  max-width: 1024px;
}

.woocommerce div.product .woocommerce-tabs .panel h2 {
  margin-bottom: 1rem;
  font-size: clamp(1rem, 0.824rem + 0.704vw, 1.5rem);
  font-weight: bold;
}

.woocommerce div.product .woocommerce-tabs .panel p {
  margin-bottom: 0.5rem;
  font-size: clamp(0.875rem, 0.826rem + 0.181vw, 1rem);
}

.woocommerce div.product .related {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {

  .woocommerce div.product .related {
    gap: 2rem;
  }

}

.woocommerce div.product .related h2 {
  font-family: 'CCMIWE', sans-serif;
  font-weight: bold;
  font-size: clamp(1.25rem, 0.81rem + 1.761vw, 2.5rem);
  color: var(--color-brand-purple);
}


/* Badges */
.woocommerce span.onsale {
  background-color: red;
}

/* My Account */
.woocommerce-account .prose {
  max-width: 100%;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: clamp(1rem, 0.912rem + 0.352vw, 1.25rem);
  list-style: none;
  margin-top: 0;
  margin-bottom: 0;
  padding-inline-start: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation li {
  margin: 0;
  padding-inline-start: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation li > a {
  border-bottom: 2px solid transparent;
  transition-property: all;
  transition-duration: 300ms;
  text-decoration: none;
  color: black;
}

.woocommerce-account .woocommerce-MyAccount-navigation li > a:hover {
  border-color: black;
}

.woocommerce-account .woocommerce-MyAccount-navigation li.is-active > a {
  color: var(--color-brand-purple);
  font-weight: bold;
}

.woocommerce-account .woocommerce-MyAccount-navigation li.is-active > a:hover {
  border-color: transparent;
}

.woocommerce-account .addresses .title .edit {
  float: left;
}

.woocommerce-MyAccount-navigation {
  padding: 2rem;
  background-color: rgba(139, 92, 246, 0.1);
}

@media (min-width: 768px) {
    .woocommerce-account .woocommerce-MyAccount-navigation {
      max-width: 18rem;
      border-right: 4px solid var(--color-brand-purple);
    }
}

@media (max-width: 768px) {
  .woocommerce-account .woocommerce-MyAccount-navigation {
    margin-bottom: 30px;
    padding: 1rem;
    border-bottom: 3px solid var(--color-brand-purple);
  }

}

/* Button */
.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) #respond input#submit, .woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) a.button, .woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) button.button, .woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) input.button, :where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce #respond input#submit, :where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce a.button, :where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce button.button, :where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce input.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    height: 44px;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    color: white;
    background-color: var(--color-brand-green);
    font-size: 1rem;
    border: 3px solid var(--color-brand-purple);
    transition-property: all;
    transition-duration: 300ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}


/* Checkout */
@media (max-width: 731px) {
  .wp-block-woocommerce-checkout-order-summary-block {
    margin-bottom: 36px;
    padding-bottom: 0 !important;
  }
  .wc-block-components-checkout-step__heading {
    margin: 8px 0 !important;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .wc-block-components-form .wc-block-components-checkout-step .wc-block-components-checkout-step__heading {
    padding-left: 0;
    padding-right: 0;
  }
  .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-checkout-order-summary__title {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    margin-top: 0 !important;
    border-top: none !important;
  }
  .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-totals-wrapper:first-of-type {
    padding-left: 1rem;
    padding-right: 1rem;
    border-top: 1px solid hsla(0, 0%, 7%, .11) !important;
  }
  .wc-block-components-totals-wrapper {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}