/* ==========================================================================
   UniScents – store (WooCommerce) additions
   Product page, category pages, cart / checkout frame, header search.
   ========================================================================== */

/* ---------- Header ---------- */

/* Pin the fixed header to both edges (RTL static position can shift it on some layouts). */
body > header {
  left: 0;
  right: 0;
}

/* ---------- Product page ---------- */

.product-option {
  width: 100%;
  appearance: none;
  border: 1px solid var(--color-outline-variant);
  border-radius: 0.5rem;
  background-color: var(--color-surface-container-lowest);
  background-image: linear-gradient(45deg, transparent 50%, var(--color-on-surface-variant) 50%), linear-gradient(135deg, var(--color-on-surface-variant) 50%, transparent 50%);
  background-position: left 1.25rem center, left 0.9rem center;
  background-size: 0.35rem 0.35rem, 0.35rem 0.35rem;
  background-repeat: no-repeat;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 24px;
  color: var(--color-on-surface);
  transition: border-color 150ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.product-option:focus {
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-secondary) 25%, transparent);
  outline: none;
}

.product-qty {
  width: 2.5rem;
  border: 0;
  background: transparent;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}

.product-qty::-webkit-outer-spin-button,
.product-qty::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.product-qty:focus {
  outline: none;
}

.product-form {
  display: contents;
}

.product-content {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 28px;
  color: var(--color-on-surface-variant);
}

.product-content > * + * {
  margin-top: 1rem;
}

.product-content h2,
.product-content h3,
.product-content h4 {
  margin-top: 2rem;
  font-size: 20px;
  line-height: 28px;
  font-weight: 700;
  color: var(--color-primary-container);
}

.product-content h2:first-child,
.product-content h3:first-child {
  margin-top: 0;
}

.product-content ul,
.product-content ol {
  list-style: disc;
  padding-inline-start: 1.25rem;
}

.product-content li + li {
  margin-top: 0.375rem;
}

.product-content b,
.product-content strong {
  font-weight: 600;
  color: var(--color-on-surface);
}

.product-content a {
  color: var(--color-secondary);
  text-decoration: underline;
}

.product-content img {
  height: auto;
  max-width: 100%;
  border-radius: 0.5rem;
}

.product-content table {
  width: 100%;
  border-collapse: collapse;
}

.product-content td,
.product-content th {
  border-bottom: 1px solid var(--color-outline-variant);
  padding: 0.5rem 0.75rem;
  text-align: right;
}

/* WooCommerce notices (e.g. "added to cart", missing option) */

.woocommerce-notices-wrapper,
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
  margin-left: auto;
  margin-right: auto;
  max-width: 1320px;
  padding-left: var(--space-margin-mobile);
  padding-right: var(--space-margin-mobile);
}

.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-radius: 0.5rem;
  background-color: var(--color-surface-container-low);
  padding-top: 1rem;
  padding-bottom: 1rem;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--color-on-surface);
  list-style: none;
}

.woocommerce-error {
  background-color: var(--color-error-container);
  color: var(--color-on-error-container);
}

.woocommerce-message .button {
  border-radius: 0.5rem;
  background-color: var(--color-primary-container);
  padding: 0.5rem 1rem;
  font-weight: 600;
  color: var(--color-surface);
}

@media (min-width: 1024px) {
  .woocommerce-notices-wrapper,
  .woocommerce-message,
  .woocommerce-error,
  .woocommerce-info {
    padding-left: var(--space-margin);
    padding-right: var(--space-margin);
  }
}

/* WooCommerce 11 notices (block style) in the UniScents palette */
body .wc-block-components-notice-banner.wc-block-components-notice-banner {
  margin-left: auto;
  margin-right: auto;
  width: calc(100% - 2 * var(--space-margin-mobile));
  max-width: calc(1320px - 2 * var(--space-margin-mobile));
  outline: none;
  border: 1px solid var(--color-secondary-fixed-dim);
  border-radius: 0.5rem;
  background-color: var(--color-surface-container-low);
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--color-on-surface);
}

body .wc-block-components-notice-banner.is-error.is-error {
  border-color: var(--color-error);
  background-color: var(--color-error-container);
  color: var(--color-on-error-container);
}

body .wc-block-components-notice-banner.wc-block-components-notice-banner > svg {
  background-color: var(--color-secondary);
  fill: var(--color-on-secondary);
}

body .wc-block-components-notice-banner .wc-forward.wc-forward {
  font-weight: 600;
  color: var(--color-secondary);
}

/* ---------- Category pages ---------- */

.shop-filter {
  cursor: pointer;
}

.shop-filter__box {
  flex: none;
  height: 1rem;
  width: 1rem;
  border: 1px solid var(--color-outline);
  border-radius: 0.125rem;
  background-color: var(--color-surface-container-lowest);
  transition: background-color 150ms, border-color 150ms;
}

.shop-filter:hover .shop-filter__box {
  border-color: var(--color-secondary);
}

.shop-filter.is-active {
  font-weight: 600;
  color: var(--color-on-surface);
}

.shop-filter.is-active .shop-filter__box {
  border-color: var(--color-secondary);
  background-color: var(--color-secondary);
  box-shadow: inset 0 0 0 2px var(--color-surface-container-lowest);
}

.shop-filter__title:hover {
  color: var(--color-secondary);
}

.product-list__heading a:hover {
  color: var(--color-secondary);
}

.shop-price-old {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--color-outline);
}

.shop-pagination {
  margin-top: 3rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
}

.shop-pagination .page-numbers {
  display: inline-flex;
  min-width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-outline-variant);
  border-radius: 0.5rem;
  padding: 0 0.75rem;
  color: var(--color-on-surface-variant);
  transition: all 150ms;
}

.shop-pagination a.page-numbers:hover {
  border-color: var(--color-secondary);
  color: var(--color-secondary);
}

.shop-pagination .current {
  border-color: var(--color-primary-container);
  background-color: var(--color-primary-container);
  color: var(--color-surface);
}

.shop-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 5rem 1rem;
  text-align: center;
}

.shop-empty__icon {
  font-size: 48px;
  color: var(--color-secondary);
}

.shop-empty__title {
  font-family: var(--font-sans);
  font-size: 28px;
  line-height: 36px;
  font-weight: 600;
  color: var(--color-primary-container);
}

.shop-empty__text {
  font-family: var(--font-sans);
  color: var(--color-on-surface-variant);
}

/* ---------- Cart / checkout / account frame ---------- */

.shop-shell {
  min-height: calc(100vh - 28rem);
  background-color: var(--color-surface);
  padding-top: 7rem;
  font-family: var(--font-sans);
  color: var(--color-on-surface);
}

.shop-shell__inner {
  margin-left: auto;
  margin-right: auto;
  max-width: 1320px;
  padding: 2.5rem var(--space-margin-mobile) 5rem;
}

.shop-shell__eyebrow {
  display: block;
  font-family: var(--font-serif);
  font-size: 13px;
  line-height: 16px;
  letter-spacing: 0.08em;
  font-weight: 500;
  color: var(--color-secondary);
}

.shop-shell__title {
  margin-top: 0.5rem;
  margin-bottom: 2rem;
  font-family: var(--font-sans);
  font-size: 36px;
  line-height: 44px;
  font-weight: 700;
  color: var(--color-primary-container);
}

.shop-shell__content,
.shop-shell__content button,
.shop-shell__content input,
.shop-shell__content select,
.shop-shell__content textarea {
  font-family: var(--font-sans);
}

.shop-shell__content .wc-block-components-button:not(.is-link),
.shop-shell__content .wp-element-button,
.shop-shell__content button.button {
  border-radius: 0.5rem;
  background-color: var(--color-primary-container);
  color: var(--color-surface);
  font-weight: 600;
}

.shop-shell__content .wc-block-components-button:not(.is-link):hover,
.shop-shell__content .wp-element-button:hover {
  background-color: var(--color-secondary);
  color: var(--color-on-secondary);
}

.shop-shell__content a {
  color: var(--color-secondary);
}

@media (min-width: 1024px) {
  .shop-shell__inner {
    padding-left: var(--space-margin);
    padding-right: var(--space-margin);
  }
}
