/* ============================================================
   WORDPRESS ADJUSTMENTS — styles for WP/Woo-generated markup
   ============================================================ */

/* real images inside layout shells that were placeholders in the mockups.
   Hero-slide posters are governed by home.css (object-fit: contain, no crop) so
   they are intentionally excluded here. */
.story__img img,
.ostory-hero__img img,
.weave__circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero__slide {
  overflow: hidden;
}
.weave__circle {
  overflow: hidden;
}

/* WooCommerce's generic img{height:auto} out-specifies .hdr__logo */
.hdr .hdr__logo,
.woocommerce-page .hdr__logo {
  height: 3.5rem !important;
  width: auto !important;
}
@media (max-width: 900px) {
  .hdr .hdr__logo,
  .woocommerce-page .hdr__logo {
    height: 2.625rem !important;
  }
}

/* accessibility helper used by core/plugins */
.screen-reader-text {
  clip: rect(0.0625rem, 0.0625rem, 0.0625rem, 0.0625rem);
  clip-path: inset(50%);
  position: absolute !important;
  width: 0.0625rem;
  height: 0.0625rem;
  overflow: hidden;
  word-wrap: normal !important;
}

/* admin bar offset for the sticky topbar */
.admin-bar .topbar {
  top: 2rem;
}
@media (max-width: 782px) {
  .admin-bar .topbar {
    top: 2.875rem;
  }
}

/* Woo default buttons → Warm Heritage maroon */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce #respond input#submit.alt,
.woocommerce button[type="submit"],
.wc-block-components-button {
  background: #7a2e2e;
  color: #faf4e9;
  border: 1px solid #7a2e2e;
  border-radius: 0;
  font-family: "Jost", sans-serif;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8125rem;
  padding: 0.75rem 1.625rem;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover,
.woocommerce button[type="submit"]:hover,
.wc-block-components-button:hover {
  background: #6e2b2b;
  color: #faf4e9;
}
.woocommerce .quantity .qty {
  border: 1px solid #d9b98a;
  background: #faf4e9;
  color: #332a20;
  padding: 0.625rem 0.375rem;
  font-family: "DM Mono", monospace;
}

/* after an AJAX add on the product page, WooCommerce's default "View cart"
   link (.added_to_cart) replaces the add button, in the theme's button design */
.cart-form .single_add_to_cart_button.is-added {
  display: none;
}
.woocommerce .cart-form a.added_to_cart {
  display: block;
  flex: 1;
  width: 100%;
  padding: 1.0625rem 1.875rem;
  background: var(--maroon-deep);
  color: var(--cream);
  font-family: "Jost", sans-serif;
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
}
.woocommerce .cart-form a.added_to_cart:hover {
  background: var(--maroon);
  color: var(--cream);
}
.woocommerce .single_add_to_cart_button.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* keep the maroon "Add to cart" and green "Buy it now" distinct from the
   generic Woo submit-button override above */
.woocommerce button.single_add_to_cart_button,
.woocommerce .single_add_to_cart_button {
  background: var(--maroon);
  border-color: var(--maroon);
  color: var(--cream);
}
.woocommerce button.buy-now-button,
.woocommerce .buy-now-button {
  background: var(--green);
  border-color: var(--green);
  color: var(--gold-pale);
}
.woocommerce button.buy-now-button:hover,
.woocommerce .buy-now-button:hover {
  background: color-mix(in srgb, var(--green) 86%, #000);
  color: var(--gold-pale);
}

/* WooCommerce notices in brand colors.
   Woo emits the action link (.woocommerce-Button) as the first child of the
   notice and relies on its bundled stylesheet to float it right; the theme
   drops that stylesheet, so lay the notice out as flex to keep the button and
   message text from overlapping and to let the box grow to its content. */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.125rem;
  background: #f3ead6;
  border-left: 0.1875rem solid #7a2e2e;
  color: #332a20;
  padding: 0.875rem 1.125rem;
  margin: 1.125rem auto;
  max-width: 75rem;
  list-style: none;
  font-family: "Jost", sans-serif;
}
/* message text is a bare text node between elements — let it take the row */
.woocommerce-message > .button,
.woocommerce-info > .button,
.woocommerce-error > .button {
  order: 2;
  margin-left: auto;
  flex: 0 0 auto;
}
@media (max-width: 600px) {
  .woocommerce-message > .button,
  .woocommerce-info > .button,
  .woocommerce-error > .button {
    margin-left: 0;
    width: 100%;
    text-align: center;
  }
}

/* Show/hide password toggle. WooCommerce injects this empty <button> next to
   password fields and paints its eye icon from its own stylesheet, which the
   theme drops — leaving a bare little box stacked under the field. Restore the
   eye icon and tuck it inside the field's right edge. The icon is a CSS mask so
   it inherits a theme colour and can highlight when the password is shown. */
.woocommerce .password-input {
  position: relative;
  display: block;
}
.woocommerce .password-input .input-text {
  padding-right: 2.875rem;
}
.woocommerce .show-password-input,
.woocommerce .hide-password-input {
  position: absolute;
  top: 50%;
  right: 0.875rem;
  transform: translateY(-50%);
  width: 1.375rem;
  height: 1.375rem;
  margin: 0;
  padding: 0;
  border: 0;
  cursor: pointer;
  background-color: var(--ink-faint);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000' fill-rule='evenodd'%3E%3Cpath d='M12 5C7 5 3 9.5 2.2 11.5a1 1 0 0 0 0 1C3 14.5 7 19 12 19s9-4.5 9.8-6.5a1 1 0 0 0 0-1C21 9.5 17 5 12 5zm0 3a4 4 0 1 1 0 8 4 4 0 0 1 0-8zm0 2a2 2 0 1 0 0 4 2 2 0 0 0 0-4z'/%3E%3C/svg%3E") center / 1.375rem 1.375rem no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000' fill-rule='evenodd'%3E%3Cpath d='M12 5C7 5 3 9.5 2.2 11.5a1 1 0 0 0 0 1C3 14.5 7 19 12 19s9-4.5 9.8-6.5a1 1 0 0 0 0-1C21 9.5 17 5 12 5zm0 3a4 4 0 1 1 0 8 4 4 0 0 1 0-8zm0 2a2 2 0 1 0 0 4 2 2 0 0 0 0-4z'/%3E%3C/svg%3E") center / 1.375rem 1.375rem no-repeat;
}
.woocommerce .show-password-input:hover,
.woocommerce .hide-password-input,
.woocommerce .show-password-input.display-password {
  background-color: var(--maroon); /* highlighted while the password is visible */
}

