/* ===========================================================================
   Beadsbytrina — theme styles.
   Only functional rules and styles for markup without a source equivalent.
   app.css carries every source utility and component class.
   =========================================================================== */

:root {
  --theme-header-height: 84px;
  --theme-drawer-width: 28rem;
}

[hidden] {
  display: none !important;
}

/* Empty cart: the badge span stays in the markup with no count, so hide the teal circle. */
.theme-cart-count:empty {
  display: none !important;
}

/* Header logo follows the Customizer "Logo height (px)" control. */
.site-header .site-logo-img {
  height: var(--logo-height, 72px) !important;
  width: auto !important;
  max-width: none;
}

/*
 * Selected chips keep hover:text-accent from their idle state. That utility
 * wins on hover and paints accent text on an accent fill. Hold the selected
 * colors for category filters, price filters, color chips, and attribute pills.
 */
.chip.bg-accent:hover,
.chip[aria-pressed="true"]:hover {
  color: hsl(var(--accent-foreground));
  background-color: hsl(var(--accent));
  border-color: hsl(var(--accent));
}

/* ---------------------------------------------------------------------------
   Scroll reveal — mirrors the source Reveal component (fade + rise).
   --------------------------------------------------------------------------- */
.reveal-item {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.reveal-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

body.is-customizer .reveal-item,
body.is-customizer .theme-product-card-wrap {
  opacity: 1 !important;
  transform: none !important;
}

.no-js .reveal-item {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal-item,
  .theme-product-card-wrap {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

.theme-product-card-wrap {
  display: flex;
  min-width: 0;
}

.theme-product-card-wrap > .theme-product-card {
  width: 100%;
  height: 100%;
}

.theme-product-card-wrap[hidden] {
  display: none !important;
}

/* ---------------------------------------------------------------------------
   Header states.
   --------------------------------------------------------------------------- */
.site-header {
  will-change: background-color, padding;
}

/* ---------------------------------------------------------------------------
   Hero media.
   --------------------------------------------------------------------------- */
.theme-hero-video {
  object-fit: cover;
}

/* ---------------------------------------------------------------------------
   Cart drawer.
   --------------------------------------------------------------------------- */
#theme-cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 90;
  height: 100%;
  width: 100%;
  max-width: var(--theme-drawer-width);
  display: flex;
  flex-direction: column;
  background-color: hsl(var(--card));
  border-left: 1px solid hsl(var(--border));
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.25, 0.4, 0.25, 1);
  overflow: hidden;
}

body.cart-open #theme-cart-drawer {
  transform: translateX(0);
}

#theme-cart-drawer.is-updating > * {
  opacity: 0.6;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

#theme-cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background-color: hsl(var(--background) / 0.8);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

body.cart-open #theme-cart-overlay {
  opacity: 1;
  pointer-events: auto;
}

#theme-cart-drawer .theme-drawer-total p,
#theme-cart-drawer .theme-drawer-subtotal p,
#theme-cart-drawer .theme-drawer-shipping p {
  margin: 0;
}

/* ---------------------------------------------------------------------------
   Toast notifications (source: sonner, bottom-right).
   --------------------------------------------------------------------------- */
.theme-toasts {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: min(22rem, calc(100vw - 2.5rem));
  pointer-events: none;
}

.theme-toast {
  border: 1px solid hsl(var(--border));
  border-radius: 0.9rem;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  padding: 0.9rem 1.15rem;
  font-size: 0.875rem;
  line-height: 1.4;
  box-shadow: 0 10px 30px -8px hsl(var(--foreground) / 0.25);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.theme-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 640px) {
  .theme-toasts {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    max-width: none;
  }
}

/* ---------------------------------------------------------------------------
   Add to cart: disabled and loading states.
   --------------------------------------------------------------------------- */
.single_add_to_cart_button.button:disabled,
.single_add_to_cart_button.button.disabled,
.add_to_cart_button.button:disabled,
.add_to_cart_button.button.disabled {
  cursor: not-allowed !important;
  opacity: 0.4 !important;
  pointer-events: none !important;
}

.single_add_to_cart_button.button:disabled:hover,
.single_add_to_cart_button.button.disabled:hover,
.add_to_cart_button.button:disabled:hover,
.add_to_cart_button.button.disabled:hover {
  opacity: 0.4 !important;
}

.ajax_add_to_cart.theme-btn-loading {
  opacity: 0.6 !important;
  pointer-events: none !important;
  cursor: wait !important;
}

.single-product .single_add_to_cart_button.loading::after,
.ajax_add_to_cart.loading::after {
  display: none !important;
}

/* Hide WooCommerce's injected "View cart" link. */
.woocommerce-page a.added_to_cart.wc-forward,
.single-product a.added_to_cart.wc-forward,
body a.added_to_cart.wc-forward {
  display: none !important;
}

/* ---------------------------------------------------------------------------
   Single product layout.
   --------------------------------------------------------------------------- */
.single-product .theme-product-layout {
  min-width: 0;
}

.single-product .theme-product-gallery,
.single-product .theme-product-info {
  min-width: 0;
  max-width: 100%;
}

.single-product .theme-product-thumbnails {
  flex-wrap: wrap;
  max-width: 100%;
}

.single-product .theme-add-to-cart-area {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.single-product .woocommerce-product-details__short-description,
.single-product .woocommerce-variation-description,
.single-product .posted_in {
  overflow-wrap: break-word;
  word-break: break-word;
}

.theme-product-main-image img {
  display: block;
  width: 100%;
}

/* Quantity input: hide native spinners for the pill stepper. */
.theme-qty-input {
  -moz-appearance: textfield;
  appearance: textfield;
  border: 0;
}

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

/* ---------------------------------------------------------------------------
   Variable product attribute selects (hidden behind the pills).
   --------------------------------------------------------------------------- */
.theme-attr-select-hidden {
  display: none !important;
}

.single-product .variations.shop_attributes tbody,
.single-product .variations tbody tr,
.single-product .variations tbody td {
  display: block;
  width: 100%;
}

.single-product .variations tbody td.label {
  padding-bottom: 0.25rem;
}

.single-product .variations tbody td.value {
  padding-top: 0;
}

.single-product .variations {
  width: 100%;
  margin-top: 1.5rem;
}

.single-product .variations td.label label {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}

.single-product .reset_variations {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}

.single-product .reset_variations:hover {
  color: hsl(var(--accent));
}

.single-product .single_variation_wrap {
  margin-top: 1rem;
}

.single-product .woocommerce-variation-price {
  font-size: 1.125rem;
  color: hsl(var(--accent));
}

/* ---------------------------------------------------------------------------
   Product cards: price markup from WooCommerce.
   --------------------------------------------------------------------------- */
.theme-product-card .theme-price p,
.theme-product-info .theme-price p {
  margin: 0;
  display: inline;
}

.theme-product-card .theme-price del,
.theme-product-info .theme-price del {
  opacity: 0.6;
  margin-right: 0.4rem;
}

.theme-product-card .theme-price ins,
.theme-product-info .theme-price ins {
  text-decoration: none;
  font-weight: 600;
}

/* ---------------------------------------------------------------------------
   WooCommerce notices (styled, never globally hidden).
   --------------------------------------------------------------------------- */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  list-style: none;
  border: 1px solid hsl(var(--border));
  border-left-width: 3px;
  border-radius: 1rem;
  background-color: hsl(var(--card));
  padding: 1rem 1.25rem;
  margin: 0 0 1.5rem;
  font-size: 0.875rem;
  color: hsl(var(--foreground));
}

.woocommerce-message {
  border-left-color: hsl(var(--accent));
}

.woocommerce-info {
  border-left-color: hsl(var(--border));
}

.woocommerce-error {
  border-left-color: hsl(var(--destructive));
  color: hsl(var(--foreground));
}

.woocommerce-error li {
  margin-left: 1rem;
}

.single-product .woocommerce-message,
.single-product .woocommerce-info {
  display: none;
}

#theme-cart-drawer .woocommerce-message {
  display: none;
}

/* ---------------------------------------------------------------------------
   Shop pagination.
   --------------------------------------------------------------------------- */
.woocommerce-pagination ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0 0.75rem;
  border: 1px solid hsl(var(--border));
  border-radius: 999px;
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  transition: border-color 0.3s ease, color 0.3s ease;
}

.woocommerce-pagination ul li a:hover,
.woocommerce-pagination ul li span.current {
  border-color: hsl(var(--accent));
  color: hsl(var(--accent));
}

/* ---------------------------------------------------------------------------
   Thank you page.
   --------------------------------------------------------------------------- */
body.theme-thankyou-page {
  overflow-x: hidden;
}

body.theme-thankyou-page .woocommerce-order h2,
body.theme-thankyou-page .woocommerce-order-details__title,
body.theme-thankyou-page .woocommerce-column__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  padding: 0 0 1rem 0;
  margin: 0;
  color: hsl(var(--foreground));
}

body.theme-thankyou-page .woocommerce-order > p {
  color: hsl(var(--muted-foreground));
  font-size: 0.9375rem;
}

body.theme-thankyou-page .woocommerce-thankyou-order-received {
  border: 1px solid hsl(var(--border));
  border-left: 3px solid hsl(var(--accent));
  border-radius: 1rem;
  background-color: hsl(var(--card));
  padding: 1rem 1.25rem;
  color: hsl(var(--foreground));
  font-size: 0.9375rem;
}

body.theme-thankyou-page .woocommerce-order-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  list-style: none;
  margin: 2rem 0;
  padding: 0;
}

body.theme-thankyou-page .woocommerce-order-overview li {
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  background-color: hsl(var(--card));
  padding: 1rem 1.25rem;
  margin: 0;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: hsl(var(--foreground));
}

body.theme-thankyou-page .woocommerce-order-overview li strong {
  display: block;
  margin-top: 0.35rem;
  font-weight: 600;
}

body.theme-thankyou-page .woocommerce-order-details,
body.theme-thankyou-page .woocommerce-customer-details {
  margin-top: 2.5rem;
}

body.theme-thankyou-page .woocommerce-order-details table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.875rem;
}

body.theme-thankyou-page .woocommerce-order-details table th,
body.theme-thankyou-page .woocommerce-order-details table td {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid hsl(var(--border));
  text-align: left;
  vertical-align: top;
  overflow-wrap: break-word;
}

body.theme-thankyou-page .woocommerce-order-details tfoot th {
  text-align: left;
}

body.theme-thankyou-page .woocommerce-order-details tfoot td {
  text-align: right;
}

body.theme-thankyou-page .woocommerce-customer-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

body.theme-thankyou-page .woocommerce-customer-details address {
  max-width: 480px;
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  background-color: hsl(var(--card));
  padding: 1.25rem;
  font-style: normal;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  overflow-wrap: break-word;
}

/* ---------------------------------------------------------------------------
   Page content shell for inner pages.
   --------------------------------------------------------------------------- */
.site-header.is-solid + main,
body.theme-no-hero .theme-page-content {
  /* inner pages keep their own top padding in the template */
}

/* ---------------------------------------------------------------------------
   Block cart / checkout: width + alignment parity with the site container.
   The page title and the block share one container (page.php).
   --------------------------------------------------------------------------- */
body.theme-checkout-page .theme-entry-content,
body.woocommerce-cart .theme-entry-content,
body.woocommerce-account .theme-entry-content,
body.theme-thankyou-page .theme-entry-content {
  max-width: 100%;
  min-width: 0;
}

body.theme-checkout-page .wc-block-checkout,
body.woocommerce-cart .wc-block-cart,
body.woocommerce-account .woocommerce {
  min-width: 0;
  width: 100%;
}

body.theme-checkout-page .wc-block-checkout__main,
body.theme-checkout-page .wc-block-checkout__sidebar {
  min-width: 0;
  width: 100%;
  max-width: none;
}

body.theme-checkout-page .wc-block-components-text-input input,
body.theme-checkout-page .wc-block-components-select select,
body.theme-checkout-page .wc-blocks-components-select__select,
body.theme-checkout-page .wc-block-components-textarea textarea,
body.woocommerce-checkout .form-row .input-text,
body.woocommerce-checkout .form-row select {
  width: 100% !important;
  max-width: none !important;
}

/* Checkout: one grid owner only. */
body.theme-checkout-page .wc-block-checkout {
  display: block;
}

@media (min-width: 768px) {
  body.theme-checkout-page .wc-block-components-sidebar-layout.wc-block-checkout.is-large {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--checkout-gap, 2rem);
    align-items: start;
  }
}

body.theme-checkout-page .wc-block-checkout__sidebar {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 1.5rem;
  padding: 1.5rem;
}

body.theme-checkout-page .wc-block-components-notice-banner {
  grid-column: 1 / -1;
  border-radius: 1rem;
  border-color: hsl(var(--border));
  background-color: hsl(var(--card));
  color: hsl(var(--foreground));
  font-size: 0.875rem;
}

body.theme-checkout-page .wc-block-components-text-input input,
body.theme-checkout-page .wc-block-components-select select,
body.theme-checkout-page .wc-blocks-components-select__select,
body.theme-checkout-page .wc-block-components-textarea textarea {
  border: 1px solid hsl(var(--border)) !important;
  border-radius: 0.75rem !important;
  background-color: hsl(var(--background)) !important;
  color: hsl(var(--foreground)) !important;
  font-family: var(--font-body);
  font-size: 1rem;
}

body.theme-checkout-page .wc-block-components-text-input input:focus,
body.theme-checkout-page .wc-block-components-select select:focus,
body.theme-checkout-page .wc-blocks-components-select__select:focus,
body.theme-checkout-page .wc-block-components-textarea textarea:focus {
  border-color: hsl(var(--accent)) !important;
  outline: none !important;
  box-shadow: none !important;
}

body.theme-checkout-page .wc-block-components-text-input input::placeholder,
body.theme-checkout-page .wc-block-components-textarea textarea::placeholder {
  color: hsl(var(--muted-foreground));
}

body.theme-checkout-page .wc-block-components-checkout-place-order-button {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
  border: 1px solid hsl(var(--accent));
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  min-height: 3rem;
  height: 3rem;
}

body.theme-checkout-page .wc-block-components-checkout-place-order-button:hover {
  background-color: hsl(var(--primary));
  border-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

body.theme-checkout-page .wc-block-checkout__sidebar .wc-block-components-totals-item,
body.theme-checkout-page .wc-block-cart-items,
body.theme-checkout-page .wc-block-components-order-summary {
  font-family: var(--font-body);
  font-size: 0.875rem;
}

/* Classic checkout fallback inputs. */
body.woocommerce-checkout .form-row .input-text,
body.woocommerce-checkout .form-row select {
  border: 1px solid hsl(var(--border)) !important;
  border-radius: 0.75rem !important;
  background-color: hsl(var(--background)) !important;
  color: hsl(var(--foreground)) !important;
  font-family: var(--font-body);
  font-size: 1rem;
}

body.woocommerce-checkout .form-row .input-text:focus,
body.woocommerce-checkout .form-row select:focus {
  border-color: hsl(var(--accent)) !important;
  outline: none !important;
  box-shadow: none !important;
}

/* ---------------------------------------------------------------------------
   Screen reader text (WordPress/WooCommerce generated markup).
   --------------------------------------------------------------------------- */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: hsl(var(--card));
  border-radius: 3px;
  box-shadow: 0 0 2px 2px hsl(var(--border));
  clip: auto !important;
  clip-path: none;
  color: hsl(var(--foreground));
  display: block;
  font-size: 0.875rem;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* ---------------------------------------------------------------------------
   Page title typography (design heading hierarchy).
   --------------------------------------------------------------------------- */
.page-title {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: hsl(var(--foreground));
}

/* ---------------------------------------------------------------------------
   Cart page (WooCommerce blocks) parity.
   --------------------------------------------------------------------------- */
body.woocommerce-cart .wc-block-cart__main,
body.woocommerce-cart .wc-block-cart__sidebar {
  min-width: 0;
}

body.woocommerce-cart .wc-block-cart__submit-button {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
  border-radius: 999px;
  border: 1px solid hsl(var(--accent));
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
}

/* ---------------------------------------------------------------------------
   Account page.
   --------------------------------------------------------------------------- */
body.woocommerce-account .woocommerce {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  body.woocommerce-account .woocommerce {
    grid-template-columns: 220px 1fr;
    align-items: start;
  }
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
  display: block;
  border-radius: 0.75rem;
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  transition: background-color 0.25s ease, color 0.25s ease;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover,
body.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
  background-color: hsl(var(--secondary));
  color: hsl(var(--foreground));
}

body.woocommerce-account .woocommerce-MyAccount-content .form-row input.input-text {
  border: 1px solid hsl(var(--border)) !important;
  border-radius: 0.75rem !important;
  background-color: hsl(var(--background)) !important;
  padding: 0.75rem 1rem;
}

body.woocommerce-account button.button,
body.woocommerce-account .woocommerce-Button.button {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
  border: 1px solid hsl(var(--accent));
  border-radius: 999px;
  padding: 0.75rem 2rem;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
}
