/* ==========================================================================
   WooCommerce skin — themes the store (shop, product, cart, checkout, account)
   to match the RenderMe dark design. Loaded site-wide (harmless when no WC page
   is shown). Uses the theme tokens; the page wrapper is woocommerce.php.
   ========================================================================== */

.woo {
  padding-block: var(--space-16);
}
.woo .container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* Base text/links inside the store. Scoped to the .woo content wrapper (NOT
   body.woocommerce) so the header nav and footer — which also live under
   body.woocommerce on store pages — keep their own muted link/text colours. */
.woo,
.woo p,
.woo li,
.woo td,
.woo th,
.woo label {
  color: var(--color-text);
}
/* Links inherit the normal text colour (white) — the storefront content renders
   inside the .woo wrapper, so a blanket orange here would repaint our own shop
   card titles etc. Keep them on-brand; specific accents are set per component.
   IMPORTANT: scope to .woo (the content wrapper), NOT body.woocommerce — the
   header nav and footer also live under body.woocommerce, and this rule's
   specificity (0,2,1) would otherwise repaint their muted links opaque white. */
.woo a:not(.button) {
  color: inherit;
}

/* Content links (constructor sections + WooCommerce description tabs) inside a
   product page must stay brand magenta — the inherit rule above has the same
   specificity but loads later, so give these a higher-specificity override. */
.woo .rm-section a:not(.btn),
.woo .woocommerce-Tabs-panel a:not(.button),
.woo .woocommerce-product-details__short-description a:not(.button) {
  color: var(--rm-link, var(--color-magenta, #c0298b));
  text-decoration: none;
  transition: opacity var(--duration-fast) var(--ease-standard);
}
.woo .rm-section a:not(.btn):hover,
.woo .woocommerce-Tabs-panel a:not(.button):hover,
.woo .woocommerce-product-details__short-description a:not(.button):hover {
  opacity: 0.78;
}

/* --- Buttons: every WC button becomes our gradient CTA -------------------- */
.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 .wc-block-components-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--gradient-brand-btn);
  color: #fff;
  font-weight: 700;
  font-size: var(--fs-small);
  line-height: 1;
  box-shadow: var(--shadow-brand), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard);
  -webkit-tap-highlight-color: transparent;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(192, 41, 139, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  color: #fff;
}
.woocommerce .button:focus:not(:focus-visible) { outline: none; }
/* Secondary/ghost buttons (e.g. "Update cart", "Continue shopping"). */
.woocommerce a.button.wc-backward,
.woocommerce button[name="update_cart"] {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border-strong);
  box-shadow: none;
  color: var(--color-text);
}

/* --- Shop archive: product grid = the theme's card grid ------------------- */
.woocommerce ul.products,
.woocommerce-page ul.products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-8) var(--space-6);
  margin: 0;
  padding: 0;
}
.woocommerce ul.products::before,
.woocommerce ul.products::after { content: none; }
.woocommerce ul.products li.product {
  width: auto !important;
  margin: 0 !important;
  float: none !important;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--duration-fast) var(--ease-standard);
  text-align: left;
  padding-bottom: var(--space-4);
}
.woocommerce ul.products li.product:hover {
  border-color: var(--color-border-strong);
}
.woocommerce ul.products li.product a img {
  margin: 0 0 var(--space-4);
  border-radius: 0;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  padding: 0 var(--space-4);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
}
.woocommerce ul.products li.product .price {
  padding: 0 var(--space-4);
  margin-top: var(--space-2);
  color: var(--color-text);
  font-weight: 700;
  font-size: 16px;
}
.woocommerce ul.products li.product .price del { color: var(--color-text-faint); font-weight: 400; }
.woocommerce ul.products li.product .price ins { text-decoration: none; }
.woocommerce ul.products li.product .star-rating { margin: var(--space-2) var(--space-4) 0; color: var(--color-orange); }
.woocommerce ul.products li.product .button {
  margin: var(--space-4) var(--space-4) 0;
}
.woocommerce ul.products li.product .onsale {
  background: var(--gradient-brand-btn);
  color: #fff;
  border-radius: var(--radius-pill);
  min-height: auto;
  min-width: auto;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  top: 10px;
  right: 10px;
  margin: 0;
  line-height: 1.4;
}

/* Result count + sort dropdown row. */
.woocommerce .woocommerce-result-count { color: var(--color-text-muted); }
.woocommerce .woocommerce-ordering select,
.woocommerce select,
.woocommerce .select2-container .select2-selection {
  background: var(--color-bg-elevated);
  color: var(--color-text);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  height: auto;
}

/* Pagination. */
.woocommerce nav.woocommerce-pagination ul { border: 0; gap: 6px; display: flex; justify-content: center; }
.woocommerce nav.woocommerce-pagination ul li { border: 0; }
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  padding: 8px 14px;
}
.woocommerce nav.woocommerce-pagination ul li span.current {
  background: var(--gradient-brand-btn);
  border-color: transparent;
  color: #fff;
}

/* --- Single product ------------------------------------------------------ */
.woocommerce div.product { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 60px); align-items: start; }
.woocommerce div.product .woocommerce-product-gallery { float: none; width: auto; margin: 0; }
.woocommerce div.product .woocommerce-product-gallery__image img { border-radius: var(--radius-md); }
.woocommerce div.product .summary { float: none; width: auto; margin: 0; }
.woocommerce div.product .product_title {
  font-family: var(--font-heading);
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.15;
  color: var(--color-text);
}
.woocommerce div.product p.price,
.woocommerce div.product span.price {
  color: var(--color-text);
  font-size: 24px;
  font-weight: 700;
}
.woocommerce div.product .woocommerce-product-rating { margin-bottom: var(--space-3); }
.woocommerce .star-rating span::before,
.woocommerce div.product .star-rating span::before { color: var(--color-orange); }
.woocommerce div.product form.cart { margin: var(--space-6) 0; display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: center; }
.woocommerce div.product form.cart .quantity input.qty {
  background: var(--color-bg-elevated);
  color: var(--color-text);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  height: 44px;
  width: 72px;
  padding: 0 10px;
}
.woocommerce div.product .single_add_to_cart_button { height: 44px; }
.woocommerce div.product .woocommerce-tabs { grid-column: 1 / -1; margin-top: var(--space-10); }
.woocommerce div.product .woocommerce-tabs ul.tabs { border: 0; padding: 0; display: flex; gap: var(--space-4); flex-wrap: wrap; }
.woocommerce div.product .woocommerce-tabs ul.tabs::before { border-color: var(--color-border); }
.woocommerce div.product .woocommerce-tabs ul.tabs li {
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 0;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::after { content: none; }
.woocommerce div.product .woocommerce-tabs ul.tabs li a { color: var(--color-text-muted); padding: 8px 16px; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active { background: var(--color-bg-elevated); border-color: var(--color-border-strong); }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: var(--color-text); }
.woocommerce div.product .related.products { grid-column: 1 / -1; margin-top: var(--space-12); }
.woocommerce div.product .related.products > h2 { font-family: var(--font-heading); font-size: 26px; margin-bottom: var(--space-6); }

@media (max-width: 900px) {
  .woocommerce div.product { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
  .woocommerce ul.products,
  .woocommerce-page ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .woocommerce ul.products,
  .woocommerce-page ul.products { grid-template-columns: 1fr; }
}

/* --- Cart & checkout ----------------------------------------------------- */
.woocommerce table.shop_table {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  border-collapse: separate;
}
.woocommerce table.shop_table th,
.woocommerce table.shop_table td { border-top: 1px solid var(--color-border); color: var(--color-text); }
.woocommerce table.shop_table thead th { color: var(--color-text-muted); }

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce #order_review input,
.woocommerce-checkout input[type="text"],
.woocommerce-checkout input[type="email"],
.woocommerce-checkout input[type="tel"],
.woocommerce-checkout textarea,
.woocommerce .select2-container--default .select2-selection--single {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  padding: 10px 12px;
}
.woocommerce form .form-row label,
.woocommerce-checkout label { color: var(--color-text-muted); }

.woocommerce-checkout #payment,
.woocommerce .cart_totals,
.woocommerce-order-received .woocommerce-order,
.woocommerce ul.order_details {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.woocommerce-checkout #payment { padding: var(--space-4); }
.woocommerce-checkout #payment ul.payment_methods { border-color: var(--color-border); }
.woocommerce-checkout #payment ul.payment_methods li {
  padding: 12px 4px;
  border-bottom: 1px solid var(--color-border);
}
.woocommerce-checkout #payment ul.payment_methods li:last-child { border-bottom: 0; }
.woocommerce-checkout #payment ul.payment_methods li img { max-height: 28px; margin-left: 8px; vertical-align: middle; }
.woocommerce-checkout #payment div.payment_box { background: var(--color-bg); color: var(--color-text-muted); border-radius: var(--radius-sm); }
.woocommerce-checkout #payment div.payment_box::before { border-bottom-color: var(--color-bg); }
.woocommerce-checkout #place_order {
  width: 100%;
  height: 52px;
  font-size: 15px;
  margin-top: var(--space-4);
}
/* Order summary heading + coupon toggle on brand. */
.woocommerce-checkout h3#order_review_heading,
.woocommerce form.checkout h3 { font-family: var(--font-heading); color: var(--color-text); }
.woocommerce-form-coupon-toggle .woocommerce-info { border-top-color: var(--color-purple); }

/* ==========================================================================
   WooCommerce BLOCKS — the new React Cart & Checkout blocks (different class
   names than the classic templates above). Themed to the same dark design so
   the store looks consistent whichever checkout the store uses.
   ========================================================================== */
.wc-block-checkout,
.wc-block-cart,
.wp-block-woocommerce-checkout,
.wp-block-woocommerce-cart {
  color: var(--color-text);
}
.wc-block-components-checkout-step__title,
.wc-block-components-title,
.wc-block-cart__totals-title,
.wc-block-components-checkout-step__heading {
  font-family: var(--font-heading);
  color: var(--color-text);
}
.wc-block-components-checkout-step__description,
.wc-block-components-checkout-step__heading-content {
  color: var(--color-text-muted);
}
/* Inputs / selects */
.wc-block-components-text-input input,
.wc-block-components-text-input textarea,
.wc-block-components-select .wc-block-components-select__container,
.wc-block-components-address-form input,
.wc-block-components-quantity-selector input {
  background: var(--color-bg-elevated) !important;
  border: 1px solid var(--color-border-strong) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--color-text) !important;
}
.wc-block-components-text-input label,
.wc-block-components-checkout-step label,
.wc-block-components-select label {
  color: var(--color-text-muted) !important;
}
.wc-block-components-text-input.is-active label,
.wc-block-components-text-input input:focus + label {
  color: var(--color-text) !important;
}
/* Order-summary panel */
.wc-block-components-sidebar,
.wc-block-components-order-summary,
.wc-block-checkout__sidebar {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.wc-block-components-totals-item,
.wc-block-components-order-summary-item {
  color: var(--color-text);
}
.wc-block-components-totals-footer-item {
  color: var(--color-text);
  font-weight: 700;
}
/* Radios / payment method tiles + accents */
.wc-block-components-radio-control__option,
.wc-block-checkout__payment-method .wc-block-components-radio-control__option {
  border-color: var(--color-border) !important;
}
.wc-block-components-checkbox__input,
.wc-block-components-radio-control__input {
  accent-color: var(--color-magenta);
}
/* Place order / proceed buttons = our gradient */
.wc-block-components-checkout-place-order-button,
.wc-block-cart__submit-button,
.wc-block-components-button.contained {
  background: var(--gradient-brand-btn) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow-brand), inset 0 1px 0 rgba(255, 255, 255, 0.16) !important;
  height: 52px;
  font-weight: 700;
}
.wc-block-checkout__actions_row { justify-content: stretch; }
/* Links */
.wc-block-checkout a,
.wc-block-cart a {
  color: var(--color-orange);
}
/* Empty-cart / notices in blocks */
.wc-block-components-notice-banner {
  background: var(--color-bg-elevated) !important;
  color: var(--color-text) !important;
  border-radius: var(--radius-sm);
}

/* --- Cart-has-errors panel (checkout/cart-errors.php) -------------------- */
.rm-cart-issue {
  max-width: 640px;
  margin: var(--space-10, 48px) auto;
  padding: var(--space-10, 48px) var(--space-8, 32px);
  text-align: center;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.rm-cart-issue__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-5, 20px);
  color: var(--color-magenta);
}
.rm-cart-issue__icon svg { width: 100%; height: 100%; display: block; }
.rm-cart-issue__title {
  margin: 0 0 var(--space-3, 12px);
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  color: var(--color-text);
}
.rm-cart-issue__text {
  margin: 0 auto var(--space-6, 24px);
  max-width: 46ch;
  color: var(--color-text-muted);
  line-height: 1.6;
}
.rm-cart-issue__notices { text-align: left; margin-bottom: var(--space-6, 24px); }
.rm-cart-issue__notices .woocommerce-error { margin: 0; }
.rm-cart-issue__actions { margin: 0; }
/* Keep the base .btn's own inline-flex centring (overriding it to inline-block
   broke the vertical text centring and caused a ghosted-text glitch); the
   parent's text-align:center centres the inline-flex button. */

/* --- Branded login card (order-received guest login, form-login.php) — made
   to match the My Account login exactly, with a payment-received note on top. */
.rm-authcard {
  max-width: 460px;
  margin: var(--space-10, 48px) auto;
  padding: var(--space-8, 32px);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
/* Payment-received check badge — same recipe as the thank-you badge. */
.rm-authcard__badge {
  width: 66px;
  height: 66px;
  margin: 0 auto var(--space-4, 16px);
  border-radius: 50%;
  background: var(--gradient-brand-btn);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-brand), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.rm-authcard__badge svg { width: 30px; height: 30px; }
.rm-authcard__title {
  margin: 0 0 var(--space-2, 8px);
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  color: var(--color-text);
  text-align: center;
}
/* Inputs identical to the cabinet login (account.css). */
.rm-authform .rm-txt,
.rm-authform input[type="text"],
.rm-authform input[type="password"] {
  width: 100%;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  padding: 11px 12px;
  font: inherit;
  font-size: 14px;
}
.rm-authform .rm-txt::placeholder { color: var(--color-text-faint); }
.rm-authform .rm-txt:focus,
.rm-authform input:focus { outline: none; border-color: var(--color-magenta); }
.rm-authcard__sub {
  margin: 0 0 var(--space-5, 20px);
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.6;
}
.rm-authform__row { margin: 0 0 var(--space-4, 16px); }
.rm-authform__row label {
  display: block;
  margin-bottom: 6px;
  color: var(--color-text-muted);
  font-size: 14px;
}
.rm-authform__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4, 16px);
  margin-top: var(--space-5, 20px);
}
.rm-authform__remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-muted);
  font-size: 13px;
}
.rm-authform__submit { flex: none; }
.rm-authform__lost { margin: var(--space-4, 16px) 0 0; text-align: center; }
.rm-authform__lost a { color: var(--color-magenta); text-decoration: none; }
@media (max-width: 480px) {
  .rm-authform__foot { flex-direction: column; align-items: stretch; }
  .rm-authform__submit { width: 100%; }
}

/* An emptied notice (e.g. the order-received "Thank you…" line we blank on the
   guest-login screen) must not leave a bordered empty band. */
.woocommerce-notice:empty,
.woocommerce-message:empty,
.woocommerce-info:empty,
.woocommerce-error:empty { display: none !important; }

/* --- Notices ------------------------------------------------------------- */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-noreviews {
  background: var(--color-bg-elevated);
  border-top: 3px solid var(--color-orange);
  color: var(--color-text);
  border-radius: var(--radius-sm);
}
.woocommerce-message::before,
.woocommerce-info::before { color: var(--color-orange); }
.woocommerce-error { border-top-color: #ff6b6b; }
