/* rivqo.top — SKM-inspired outlet theme. Colors from official SKM online CSS. */

:root {
  --rivqo-red: #E50012;
  --rivqo-red-dark: #B0000E;
  --rivqo-black: #222222;
  --rivqo-footer: #000000;
  --rivqo-muted: rgba(34, 34, 34, 0.7);
  --rivqo-line: #e6e6e6;
  --rivqo-bg: #ffffff;
  --rivqo-soft: #f7f3ef;
  --rivqo-font: "Noto Sans TC", "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;
  --rivqo-bar-h: 4.235801032em;
  --rivqo-container: 1180px;
  --rv-container-max: 1180px;
  --rv-gutter: 20px;
}

html {
  scroll-behavior: smooth;
}

body,
button,
input,
select,
textarea {
  font-family: var(--rivqo-font);
  color: var(--rivqo-black);
  background: var(--rivqo-bg);
}

body {
  letter-spacing: 0.01em;
}

a {
  color: var(--rivqo-red);
}

a:hover,
a:focus {
  color: var(--rivqo-red-dark);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.button:focus-visible,
.rivqo-btn:focus-visible {
  outline: 2px solid var(--rivqo-red);
  outline-offset: 3px;
}

/* -------------------------------------------------
   Shared centered container + full-width content
   Storefront .col-full is already the page gutter.
   Do not nest another .col-full inside it, and do
   not shrink .entry-content to 46rem (that left-shifted
   the homepage and pulled the account form off the title).
   ------------------------------------------------- */
.col-full,
.rv-header__inner {
  max-width: var(--rv-container-max);
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--rv-gutter);
  padding-right: var(--rv-gutter);
  box-sizing: border-box;
}

.rivqo-layout .content-area,
.storefront-full-width-content .content-area,
.rivqo-layout.right-sidebar .content-area,
.rivqo-layout.left-sidebar .content-area {
  width: 100%;
  float: none;
  margin: 0;
}

.rivqo-layout .widget-area,
.storefront-full-width-content .widget-area {
  display: none;
}

.hentry .entry-content,
.page .entry-content {
  max-width: none;
}

/* Titles and body share the same left edge of the container. */
.page .entry-header,
.woocommerce-cart .entry-header,
.woocommerce-checkout .entry-header,
.woocommerce-account .entry-header,
.woocommerce-products-header,
.hentry.type-page .entry-header {
  text-align: left;
  max-width: none;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 1.5rem;
  padding-bottom: 0.35rem;
}

/* No decorative rule under page titles (cart/account/shop unified).
   Notice left border is styled separately and must stay. */
.woocommerce-cart .entry-header,
.woocommerce-checkout .entry-header,
.woocommerce-account .entry-header,
.woocommerce-products-header,
.hentry.type-page .entry-header,
.page .entry-header {
  border-bottom: 0;
}

.page-title,
.entry-title,
.woocommerce-products-header__title,
.woocommerce-account .entry-content > .woocommerce > h2,
.woocommerce-account .woocommerce-MyAccount-content > h2 {
  text-align: left;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

/* Homepage uses the hero heading — hide the default "首頁" title. */
.home.page .hentry > .entry-header,
.home.page .hentry > .entry-header .entry-title {
  display: none;
}

.home.page .site-header,
.home.page.no-wc-breadcrumb .site-header,
.rivqo-layout.no-wc-breadcrumb .site-header {
  margin-bottom: 0;
}

.home.page .site-main > .hentry,
.home.page .hentry {
  margin-bottom: 0;
}

/* Account: form starts on the same left baseline as the page title.
   Keep a readable max-width, but never center the block. */
.woocommerce-account .entry-content .woocommerce,
.woocommerce-account #customer_login,
.woocommerce-account .u-columns,
.woocommerce-account .u-column1,
.woocommerce-account .u-column2,
.woocommerce-account .col-1,
.woocommerce-account .col-2,
.woocommerce-account .woocommerce-form-login,
.woocommerce-account .woocommerce-form-register {
  float: none;
  width: 100%;
  max-width: 28rem;
  margin-left: 0;
  margin-right: auto;
  text-align: left;
}

.woocommerce-account .entry-content .woocommerce {
  max-width: none;
}

/* Top bar */
.rivqo-topbar {
  background: var(--rivqo-black);
  color: #fff;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.rivqo-topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}

.rivqo-topbar__name {
  font-weight: 500;
}

.rivqo-topbar__op {
  opacity: 0.85;
}

/* Header */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--rivqo-line);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  color: var(--rivqo-black);
}

/* Flex the first header row so logo, search and tools share one baseline.
   Clearfix ::before/::after on .col-full must not become flex/grid items. */
.site-header > .col-full {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 1.25rem;
  row-gap: 0.75rem;
}

.site-header > .col-full::before,
.site-header > .col-full::after,
.storefront-primary-navigation::before,
.storefront-primary-navigation::after,
.storefront-primary-navigation > .col-full::before,
.storefront-primary-navigation > .col-full::after {
  content: none !important;
  display: none !important;
}

.site-header .site-branding {
  display: flex;
  align-items: center;
  float: none;
  width: auto;
  margin: 0;
  flex: 0 0 auto;
}

.site-header .site-search {
  float: none;
  width: auto;
  flex: 1 1 16rem;
  margin: 0;
}

.rivqo-header-tools {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 0 0 auto;
  margin-left: auto;
}

.rivqo-header-account {
  color: var(--rivqo-black);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.rivqo-header-account:hover,
.rivqo-header-account:focus {
  color: var(--rivqo-red);
}

.site-header .site-header-cart {
  float: none;
  width: auto;
  margin: 0;
}

.storefront-primary-navigation {
  width: 100%;
  float: none;
  clear: none;
}

.storefront-primary-navigation > .col-full {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: none;
  padding-left: 0;
  padding-right: 0;
  margin: 0;
}

.main-navigation {
  float: none;
  width: auto;
  flex: 1 1 auto;
}

/* Locked logo + badge pair, shared by header and footer. */
.rivqo-logo-lock {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
  width: auto;
  max-width: 100%;
  margin: 0;
}

.rivqo-logo-lock .custom-logo-link {
  display: inline-flex;
  float: none;
  width: auto;
  margin: 0;
  padding: 0;
}

.rivqo-logo-lock .custom-logo,
.rivqo-logo-lock img {
  display: block;
  width: 200px;
  height: auto;
  max-width: calc(100% - 3.5rem);
  max-height: none;
}

.rivqo-outlet-badge {
  display: inline-block;
  flex: 0 0 auto;
  background: var(--rivqo-red);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  padding: 0.35rem 0.5rem;
  border-radius: 2px;
  vertical-align: middle;
  white-space: nowrap;
}

.site-title a,
.site-description {
  color: var(--rivqo-black);
}

.main-navigation ul li a,
.site-header-cart .cart-contents,
.site-search .widget_product_search input[type="search"] {
  color: var(--rivqo-black);
}

.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item > a,
.site-header-cart .cart-contents:hover {
  color: var(--rivqo-red);
}

.site-search .widget_product_search input[type="search"] {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 2px;
}

button,
input[type="button"],
input[type="reset"],
input[type="submit"],
.button,
.widget a.button,
.checkout-button,
.woocommerce-Button,
.added_to_cart {
  background-color: var(--rivqo-red) !important;
  border-color: var(--rivqo-red) !important;
  color: #fff !important;
  border-radius: 2px;
  font-weight: 500;
}

button:hover,
input[type="submit"]:hover,
.button:hover,
.widget a.button:hover,
.checkout-button:hover {
  background-color: var(--rivqo-red-dark) !important;
  border-color: var(--rivqo-red-dark) !important;
  color: #fff !important;
}

button.alt,
.button.alt,
input[type="submit"].alt {
  background-color: var(--rivqo-black) !important;
  border-color: var(--rivqo-black) !important;
  color: #fff !important;
}

button.alt:hover,
.button.alt:hover {
  background-color: #000 !important;
  border-color: #000 !important;
}

/* Hero / homepage — padding is on the hero itself, not only vertical. */
.rivqo-hero {
  background: var(--rivqo-soft);
  padding: 3.5rem 2.5rem 3rem;
  margin: 0 0 2rem;
  border-bottom: 1px solid var(--rivqo-line);
  box-sizing: border-box;
}

.rivqo-hero .col-inner,
.rivqo-hero-inner {
  max-width: 44rem;
}

.rivqo-kicker {
  color: var(--rivqo-red);
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 0.8125rem;
  margin: 0 0 0.75rem;
}

.rivqo-hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.2;
  font-weight: 700;
  color: var(--rivqo-black);
  margin: 0 0 1rem;
}

.rivqo-hero h1 span {
  color: var(--rivqo-red);
}

.rivqo-lead {
  font-size: 1.125rem;
  line-height: 1.7;
  margin: 0 0 1rem;
  white-space: normal;
  text-wrap: wrap;
}

.rivqo-lead .rivqo-lead-phrase {
  display: inline-block;
  white-space: nowrap;
}

@media (max-width: 767px) {
  .rivqo-lead .rivqo-lead-phrase {
    display: block;
    white-space: nowrap;
  }
}

.rivqo-note {
  color: var(--rivqo-muted);
  margin: 0 0 1.75rem;
}

.rivqo-btn {
  display: inline-block;
  background: var(--rivqo-red);
  color: #fff !important;
  padding: 0.75rem 1.4rem;
  border-radius: 2px;
  font-weight: 500;
  text-decoration: none;
}

.rivqo-btn:hover,
.rivqo-btn:focus {
  background: var(--rivqo-red-dark);
  color: #fff !important;
}

.rivqo-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 0 0 3rem;
}

.rivqo-fact {
  background: #fff;
  border: 1px solid var(--rivqo-line);
  padding: 1.25rem 1.1rem;
}

.rivqo-fact h2 {
  font-size: 1rem;
  margin: 0 0 0.4rem;
  color: var(--rivqo-black);
}

.rivqo-fact p {
  margin: 0;
  color: var(--rivqo-muted);
  font-size: 0.9375rem;
}

.rivqo-section {
  margin: 0 0 3rem;
}

.rivqo-section h2 {
  font-size: 1.5rem;
  margin: 0 0 0.35rem;
}

.rivqo-section .rivqo-sub {
  color: var(--rivqo-muted);
  margin: 0 0 1.25rem;
  letter-spacing: 0.08em;
  font-size: 0.8125rem;
}

.rivqo-empty {
  background: var(--rivqo-soft);
  border: 0;
  padding: 2.5rem 1.5rem;
  text-align: left;
}

.rivqo-empty h2,
.woocommerce-info.rivqo-empty h2 {
  margin: 0 0 0.5rem;
  color: var(--rivqo-black);
}

.rivqo-empty p {
  margin: 0;
  color: var(--rivqo-muted);
}

/* Product cards (for when catalog is filled) */
ul.products li.product {
  text-align: left;
  border: 1px solid transparent;
  padding-bottom: 1rem;
}

ul.products li.product .woocommerce-loop-product__title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--rivqo-black);
}

ul.products li.product .price,
.single-product .price {
  color: var(--rivqo-red);
  font-weight: 500;
}

ul.products li.product .price del,
.single-product .price del {
  color: var(--rivqo-black);
  opacity: 0.7;
  font-size: 0.85em;
  font-weight: 400;
}

.onsale {
  background: var(--rivqo-red);
  color: #fff;
  border-color: var(--rivqo-red);
}

/* Footer — one grid inside the same .col-full as the copyright.
   Parent .col-full clearfix pseudos would become extra grid/flex items. */
.site-footer {
  background: var(--rivqo-footer);
  color: #fff;
  padding-top: 2.5rem;
}

.site-footer > .col-full {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.site-footer > .col-full::before,
.site-footer > .col-full::after,
.rivqo-footer-grid::before,
.rivqo-footer-grid::after,
.site-footer .footer-widgets::before,
.site-footer .footer-widgets::after {
  content: none !important;
  display: none !important;
}

.site-footer h1,
.site-footer h2,
.site-footer h3,
.site-footer .widget-title {
  color: #fff;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.site-footer a:not(.button):not(.components-button) {
  color: #ffffff !important;
}

.site-footer a:not(.button):not(.components-button):hover,
.site-footer a:not(.button):not(.components-button):focus,
.site-footer a:not(.button):not(.components-button):focus-visible {
  color: #ffffff !important;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* Handheld bar stays on a white background — do not inherit footer white links. */
.site-footer .storefront-handheld-footer-bar a:not(.button):not(.components-button) {
  color: #222222 !important;
  text-decoration: none;
}

.site-footer .storefront-handheld-footer-bar a:not(.button):not(.components-button):hover,
.site-footer .storefront-handheld-footer-bar a:not(.button):not(.components-button):focus {
  color: #B0000E !important;
  text-decoration: underline;
}

.rivqo-footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 2rem;
  width: 100%;
  padding-bottom: 2rem;
  margin: 0;
}

.rivqo-footer-logo-wrap {
  background: #fff;
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.85rem;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
}

.rivqo-footer-name {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  letter-spacing: 0.02em;
}

.rivqo-footer-op,
.rivqo-footer-brand p,
.rivqo-footer-info li {
  color: #f2f2f2;
  font-size: 0.9375rem;
  line-height: 1.7;
}

.rivqo-footer-op {
  margin: 0;
  font-weight: 500;
}

.rivqo-footer-nav ul,
.rivqo-footer-info ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rivqo-footer-nav li {
  margin: 0 0 0.4rem;
}

.rivqo-credit {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 1rem;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.8125rem;
}

.site-info {
  width: 100%;
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  text-align: left;
  box-sizing: border-box;
}

/* Handheld footer bar */
.storefront-handheld-footer-bar,
.storefront-handheld-footer-bar ul li > a {
  background: #fff;
  color: var(--rivqo-black);
  border-top: 1px solid var(--rivqo-line);
}

.storefront-handheld-footer-bar ul li.cart .count {
  background: var(--rivqo-red);
  color: #fff;
  border-color: #fff;
}

/* Cart / checkout / account consistency */
.woocommerce-Price-amount {
  font-weight: 500;
}

.site-header-cart .cart-contents .amount {
  color: var(--rivqo-red);
}

/* Logo already identifies the store; keep the text title for screen readers only. */
.site-header .site-branding .site-title,
.site-header .site-branding .site-description {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* WooCommerce notices: red / black / white, icon + copy as one left-aligned group. */
.woocommerce-info,
.woocommerce-message,
.woocommerce-error,
.woocommerce-noreviews,
.rivqo-empty,
.rivqo-empty.woocommerce-info,
.woocommerce .woocommerce-info,
.woocommerce .woocommerce-message,
.woocommerce .woocommerce-error,
#content .woocommerce-info,
#content .woocommerce-message,
#content .woocommerce-error,
.site-main .woocommerce-info,
.site-main .woocommerce-message,
.site-main .woocommerce-error {
  background: #f7f3ef !important;
  color: #222222 !important;
  border: 0 !important;
  border-left: 4px solid #E50012 !important;
  border-radius: 0;
  box-shadow: none !important;
  text-shadow: none !important;
  text-align: left;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.25rem 1.25rem 1.25rem 1.15rem;
}

.woocommerce-message,
.woocommerce .woocommerce-message,
#content .woocommerce-message {
  background: #ffffff !important;
  border-left-color: #E50012 !important;
}

.woocommerce-error,
.woocommerce .woocommerce-error,
#content .woocommerce-error,
.woocommerce-error li {
  background: #fff6f6 !important;
  color: #222222 !important;
  border-left-color: #B0000E !important;
}

.woocommerce-info a,
.woocommerce-message a,
.woocommerce-error a,
.woocommerce-info a:hover,
.woocommerce-message a:hover,
.woocommerce-error a:hover {
  color: #B0000E !important;
}

.woocommerce-info::before,
.woocommerce-message::before,
.woocommerce-error::before,
.woocommerce .woocommerce-info::before,
.woocommerce .woocommerce-message::before,
.woocommerce .woocommerce-error::before,
#content .woocommerce-info::before,
#content .woocommerce-message::before,
#content .woocommerce-error::before {
  position: static !important;
  float: none !important;
  top: auto !important;
  left: auto !important;
  margin: 0.15em 0 0;
  padding: 0;
  flex: 0 0 auto;
  display: inline-block !important;
  color: #E50012 !important;
}

.woocommerce-error::before,
.woocommerce .woocommerce-error::before {
  color: #B0000E !important;
}

.woocommerce-info::after,
.woocommerce-message::after,
.woocommerce-error::after,
.woocommerce .woocommerce-info::after,
.woocommerce .woocommerce-message::after,
.woocommerce .woocommerce-error::after {
  content: none !important;
  display: none !important;
}

.rivqo-notice-body {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  text-wrap: pretty;
}

.rivqo-empty h2,
.woocommerce-info.rivqo-empty h2,
.woocommerce-info h2,
.rivqo-notice-body h2 {
  color: #222222;
  margin: 0 0 0.5rem;
  text-align: left;
}

.rivqo-empty p,
.woocommerce-info.rivqo-empty p,
.rivqo-notice-body p {
  color: #222222;
  margin: 0;
  text-align: left;
  text-wrap: pretty;
  overflow-wrap: break-word;
}

/* Empty cart (WooCommerce cart block): avoid a single leftover 品, no nowrap overflow. */
.wc-block-cart__empty-cart__title,
.wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__title,
.wp-block-woocommerce-empty-cart-block h2.wp-block-heading {
  font-size: clamp(1.0625rem, 4.2vw, 1.5rem);
  line-height: 1.45;
  max-width: 100%;
  padding: 0 0.25rem;
  text-wrap: pretty;
  overflow-wrap: break-word;
  white-space: normal;
}

/* Mobile */
@media (max-width: 767px) {
  .rivqo-facts,
  .rivqo-footer-grid {
    grid-template-columns: 1fr;
  }

  .rivqo-hero {
    padding: 2.25rem 1.25rem 2rem;
  }

  .rivqo-logo-lock .custom-logo,
  .rivqo-logo-lock img {
    width: 150px;
  }

  .rivqo-topbar__inner {
    font-size: 0.75rem;
  }

  /* Header cart/account live in the handheld bar on small screens. */
  .rivqo-header-tools {
    display: none;
  }

  /* Show the bar on every key page, including cart (markup is output by the child theme). */
  .storefront-handheld-footer-bar,
  .woocommerce-cart .storefront-handheld-footer-bar,
  .woocommerce-checkout .storefront-handheld-footer-bar,
  .woocommerce-account .storefront-handheld-footer-bar,
  .woocommerce-page .storefront-handheld-footer-bar,
  .home .storefront-handheld-footer-bar {
    display: block;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  /* Reserve space at the true end of the document so the last card/footer
     can scroll clear of the fixed bar. Covering the next screen mid-scroll is fine. */
  body,
  body.woocommerce-cart,
  body.woocommerce-checkout,
  body.woocommerce-account,
  body.woocommerce-page,
  body.home {
    padding-bottom: calc(var(--rivqo-bar-h) + 1.5rem + env(safe-area-inset-bottom, 0px));
  }

  .rivqo-empty,
  .rivqo-empty.woocommerce-info,
  .woocommerce-info,
  .woocommerce-message,
  .woocommerce-error {
    padding: 1.1rem 1rem;
  }

  .rivqo-notice-body p,
  .woocommerce-info p,
  .rivqo-empty p {
    font-size: 0.9375rem;
    line-height: 1.65;
  }
}

@media (max-width: 400px) {
  .wc-block-cart__empty-cart__title,
  .wp-block-woocommerce-empty-cart-block h2.wp-block-heading {
    font-size: 1.125rem;
    letter-spacing: 0;
  }
}

@media (min-width: 768px) {
  .storefront-handheld-footer-bar {
    display: none;
  }
}

/* =========================================================
   1.0.3 — standalone .rv-header, handheld bar, shop notice
   Does not change hero / facts / footer-grid / page container.
   ========================================================= */

/* Independent header container: centered ~1180px at a 1280 viewport. */
.rv-header {
  position: relative;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid var(--rivqo-line);
  color: var(--rivqo-black);
  padding: 0.75rem 0 0;
  transform: none;
  filter: none;
  contain: none;
}

.rv-header__inner {
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
  transform: none;
  filter: none;
  contain: none;
}

.rv-header__inner::before,
.rv-header__inner::after,
.rv-header__row::before,
.rv-header__row::after,
.rv-header__logo::before,
.rv-header__logo::after,
.rv-header__search::before,
.rv-header__search::after,
.rv-header__tools::before,
.rv-header__tools::after,
.rv-header__cart::before,
.rv-header__cart::after,
.rv-header__nav::before,
.rv-header__nav::after,
.rv-header .site-search::before,
.rv-header .site-search::after,
.rv-header .site-header-cart::before,
.rv-header .site-header-cart::after,
.rv-header .main-navigation::before,
.rv-header .main-navigation::after,
.rv-header .primary-navigation::before,
.rv-header .primary-navigation::after {
  content: none !important;
  display: none !important;
}

/* Desktop: logo+badge | search minmax(200,1fr) | account/cart nowrap
   Nav is a second row, still inside the same centered inner container. */
.rv-header__row {
  display: grid;
  grid-template-columns: auto minmax(200px, 1fr) auto;
  grid-template-areas:
    "logo search tools"
    "nav nav nav";
  align-items: center;
  column-gap: 1.25rem;
  row-gap: 0.6rem;
  min-width: 0;
}

.rv-header__logo,
.rv-header__search,
.rv-header__tools,
.rv-header__nav,
.rv-header__cart,
.rv-header .site-search,
.rv-header .site-header-cart,
.rv-header .widget,
.rv-header form,
.rv-header ul,
.rv-header li,
.rv-header a {
  min-width: 0;
  box-sizing: border-box;
}

.rv-header__logo { grid-area: logo; }
.rv-header__search { grid-area: search; }
.rv-header__tools { grid-area: tools; }
.rv-header__nav { grid-area: nav; }

.rv-header__logo,
.rv-header__search,
.rv-header__tools,
.rv-header__nav {
  float: none !important;
  width: auto;
  margin: 0;
  padding: 0;
  clear: none;
}

.rv-header__search {
  width: auto;
  min-width: 0;
}

.rv-header .site-search {
  display: block !important;
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
  clear: none !important;
}

.rv-header .site-search .widget,
.rv-header .site-search form {
  margin: 0;
  float: none;
  width: 100%;
}

.rv-header .site-search input[type="search"],
.rv-header .site-search .search-field {
  width: 100%;
  max-width: none;
  margin: 0;
}

.rv-header__tools {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  width: auto !important;
  max-width: none;
}

.rv-header__account {
  flex: 0 0 auto;
  color: var(--rivqo-black);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.rv-header__account:hover,
.rv-header__account:focus {
  color: var(--rivqo-red);
}

.rv-header__cart {
  flex: 0 0 auto;
  width: auto !important;
}

.rv-header .site-header-cart,
.rv-header #site-header-cart,
.rv-header ul.site-header-cart {
  display: flex !important;
  flex-wrap: nowrap;
  align-items: center;
  float: none !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0;
  list-style: none;
  position: relative;
}

.rv-header .site-header-cart > li {
  display: block;
  float: none !important;
  width: auto !important;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Second li is the mini-cart dropdown — take it out of the flex flow. */
.rv-header .site-header-cart > li:nth-child(2) {
  position: absolute;
  right: 0;
  top: 100%;
  width: auto;
  z-index: 20;
}

.rv-header .cart-contents,
.rv-header a.cart-contents {
  display: inline-flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap !important;
  width: auto !important;
  max-width: none !important;
  height: auto !important;
  float: none !important;
  margin: 0;
  padding: 0.25rem 0;
  color: var(--rivqo-black);
  text-indent: 0 !important;
}

.rv-header .cart-contents .amount,
.rv-header .cart-contents .count,
.rv-header .cart-contents span {
  display: inline !important;
  float: none !important;
  width: auto !important;
  white-space: nowrap !important;
}

.rv-header .cart-contents::after {
  float: none !important;
  display: inline-block !important;
  margin-left: 0.35rem;
  vertical-align: middle;
}

/* Locked logo + badge inside the header only (footer lock rules unchanged). */
.rv-header .rivqo-logo-lock {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
  width: auto;
  max-width: 100%;
  margin: 0;
}

.rv-header .custom-logo-link {
  display: inline-flex !important;
  float: none !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0;
}

.rv-header .custom-logo-link img,
.rv-header .custom-logo,
.rv-header .rivqo-logo-lock img {
  display: block;
  width: 200px !important;
  max-width: 200px !important;
  height: auto !important;
  max-height: none !important;
}

/* Nav lives in the same centered 1180px container, not at viewport x=0. */
.rv-header__nav,
.rv-header .main-navigation {
  float: none !important;
  width: 100% !important;
  clear: none !important;
  margin: 0;
  padding: 0 0 0.65rem;
  position: relative;
}

.rv-header .menu-toggle,
.rv-header__toggle {
  display: none;
}

.rv-header .primary-navigation {
  display: block;
  float: none;
  width: 100%;
  margin: 0;
}

.rv-header .primary-navigation ul,
.rv-header .primary-navigation .menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  float: none !important;
  width: auto !important;
}

.rv-header .primary-navigation li {
  float: none !important;
  width: auto !important;
  margin: 0;
  padding: 0;
  display: block;
}

.rv-header .primary-navigation a {
  display: inline-block;
  color: var(--rivqo-black);
  padding: 0.35rem 0;
  text-decoration: none;
  white-space: nowrap;
}

.rv-header .primary-navigation a:hover,
.rv-header .primary-navigation .current-menu-item > a {
  color: var(--rivqo-red);
}

/* Mobile <=767: logo 150 + badge ~50 on the left (20px gutter), 44px hamburger
   on the same row. Search goes to a full-width second row so it cannot
   squeeze the logo. Account/cart move to the handheld bar. */
@media (max-width: 767px) {
  .rv-header {
    padding: 0.4rem 0 0;
  }

  .rv-header__inner {
    padding: 0 20px;
  }

  .rv-header__row {
    grid-template-columns: minmax(0, 1fr) 44px;
    grid-template-areas:
      "logo nav"
      "search search";
    column-gap: 0.5rem;
    row-gap: 0.5rem;
    align-items: center;
  }

  .rv-header__tools {
    display: none !important;
  }

  .rv-header .custom-logo-link img,
  .rv-header .custom-logo,
  .rv-header .rivqo-logo-lock img {
    width: 150px !important;
    max-width: 150px !important;
    height: auto !important;
  }

  .rv-header__nav,
  .rv-header .main-navigation {
    width: 44px !important;
    max-width: 44px;
    justify-self: end;
    padding: 0;
    position: relative;
  }

  .rv-header .menu-toggle,
  .rv-header__toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 44px !important;
    height: 44px !important;
    margin: 0;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0;
    box-shadow: none !important;
    color: var(--rivqo-black) !important;
    cursor: pointer;
    position: relative;
    text-indent: 0 !important;
  }

  .rv-header .menu-toggle::before,
  .rv-header .menu-toggle::after,
  .rv-header .menu-toggle span::before {
    content: none !important;
    display: none !important;
  }

  .rv-header__toggle-bars {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
  }

  .rv-header .primary-navigation {
    display: none;
    background: #fff;
    border: 1px solid var(--rivqo-line);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    z-index: 10002;
    padding: 0.5rem 0;
  }

  /* When open, take the nav out of a containing block so the panel
     is positioned against .rv-header, not the 44px hamburger cell. */
  .rv-header__nav.toggled,
  .rv-header .main-navigation.toggled {
    position: static;
    width: 44px !important;
  }

  .rv-header__nav.toggled .primary-navigation,
  .rv-header .main-navigation.toggled .primary-navigation {
    display: block;
    position: absolute;
    left: 20px;
    right: 20px;
    top: 100%;
    width: auto;
    max-width: none;
    margin: 0;
  }

  .rv-header .primary-navigation ul,
  .rv-header .primary-navigation .menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .rv-header .primary-navigation a {
    display: block;
    padding: 0.75rem 1rem;
    white-space: normal;
  }

  /* Full-width search on the second header row. Hidden if we prefer the
     handheld bar only — keep it available without crowding the logo row. */
  .rv-header__search {
    display: block;
  }

  .rv-header .site-search {
    display: block !important;
    padding: 0 0 0.6rem;
  }
}

/* Shop: hide empty notices wrapper and any leftover pseudo rule. */
.woocommerce-notices-wrapper:empty,
.woocommerce.woocommerce-notices-wrapper:empty,
.woocommerce-notices-wrapper:not(:has(.woocommerce-info, .woocommerce-message, .woocommerce-error, .woocommerce-noreviews, li, p, a, div)) {
  display: none !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: none !important;
  min-height: 0 !important;
  height: 0 !important;
}

.woocommerce-notices-wrapper::before,
.woocommerce-notices-wrapper::after,
.woocommerce.woocommerce-notices-wrapper::before,
.woocommerce.woocommerce-notices-wrapper::after {
  content: none !important;
  display: none !important;
  border: 0 !important;
  background: none !important;
}

/* Handheld bar: body-level fixed element on every page, including shop. */
body > .storefront-handheld-footer-bar,
.storefront-handheld-footer-bar {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  z-index: 100000;
  transform: none !important;
  filter: none !important;
  contain: none !important;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

@media (min-width: 768px) {
  body > .storefront-handheld-footer-bar,
  .storefront-handheld-footer-bar {
    display: none !important;
  }
}

@media (max-width: 767px) {
  body > .storefront-handheld-footer-bar,
  .storefront-handheld-footer-bar,
  .woocommerce-cart .storefront-handheld-footer-bar,
  .woocommerce-checkout .storefront-handheld-footer-bar,
  .woocommerce-account .storefront-handheld-footer-bar,
  .woocommerce-page .storefront-handheld-footer-bar,
  .woocommerce-shop .storefront-handheld-footer-bar,
  .rivqo-shop .storefront-handheld-footer-bar,
  .home .storefront-handheld-footer-bar {
    display: block !important;
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    z-index: 100000;
  }
}

/* =========================================================
   1.0.4 — unique nav IDs, shared container, independent
   mobile bar, no title underlines.
   ========================================================= */

body.rivqo-layout {
  --rv-container-max: 1180px;
  --rv-gutter: 20px;
}

/* One grid for header / nav / main / footer. Override parent .col-full
   (content-box + auto margins wiping gutters, or padding 2.617924em on
   large screens) so left edges match. Hero may keep extra inner padding. */
body.rivqo-layout .col-full,
body.rivqo-layout .rv-header__inner,
body.rivqo-layout .storefront-breadcrumb > .col-full,
body.rivqo-layout .site-footer > .col-full,
body.rivqo-layout .rivqo-topbar .col-full {
  max-width: var(--rv-container-max) !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: var(--rv-gutter) !important;
  padding-right: var(--rv-gutter) !important;
  box-sizing: border-box !important;
}

@media (max-width: 767px) {
  body.rivqo-layout .col-full,
  body.rivqo-layout .rv-header__inner,
  body.rivqo-layout .storefront-breadcrumb > .col-full,
  body.rivqo-layout .site-footer > .col-full,
  body.rivqo-layout .rivqo-topbar .col-full {
    padding-left: var(--rv-gutter) !important;
    padding-right: var(--rv-gutter) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

@media (min-width: 768px) {
  body.rivqo-layout .col-full,
  body.rivqo-layout .rv-header__inner,
  body.rivqo-layout .storefront-breadcrumb > .col-full,
  body.rivqo-layout .site-footer > .col-full,
  body.rivqo-layout .rivqo-topbar .col-full {
    padding-left: var(--rv-gutter) !important;
    padding-right: var(--rv-gutter) !important;
    max-width: var(--rv-container-max) !important;
  }
}

/* Titles: no bottom rule or leftover pseudo line. Do not touch notices. */
body.rivqo-layout .entry-header,
body.rivqo-layout .woocommerce-products-header,
body.rivqo-layout .hentry.type-page .entry-header,
body.rivqo-layout .woocommerce-cart .entry-header,
body.rivqo-layout .woocommerce-account .entry-header,
body.rivqo-layout .woocommerce-checkout .entry-header {
  border-bottom: 0 !important;
}

body.rivqo-layout .entry-header::before,
body.rivqo-layout .entry-header::after,
body.rivqo-layout .woocommerce-products-header::before,
body.rivqo-layout .woocommerce-products-header::after {
  content: none !important;
  display: none !important;
  border: 0 !important;
  background: none !important;
  height: 0 !important;
}

/* Mobile nav: module-owned data-open / .is-open, not parent .toggled. */
.rv-header__toggle {
  display: none;
  appearance: none;
  -webkit-appearance: none;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--rivqo-black) !important;
  cursor: pointer;
}

.rv-header__menu {
  display: block;
  width: 100%;
}

@media (min-width: 768px) {
  .rv-header__toggle {
    display: none !important;
  }

  .rv-header__menu,
  .rv-header__nav[data-open] .rv-header__menu {
    display: block;
    position: static;
    width: 100%;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .rv-header__menu ul,
  #rv-primary-menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    float: none !important;
    width: auto !important;
  }

  .rv-header__menu li {
    float: none !important;
    width: auto !important;
    margin: 0;
    padding: 0;
  }
}

@media (max-width: 767px) {
  .rv-header__toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0 !important;
  }

  .rv-header__toggle-bars {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
  }

  .rv-header__menu {
    display: none;
    background: #fff;
    border: 1px solid var(--rivqo-line);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    z-index: 10002;
    padding: 0.5rem 0;
  }

  .rv-header__nav[data-open="true"] .rv-header__menu,
  .rv-header__nav.is-open .rv-header__menu {
    display: block;
    position: absolute;
    left: var(--rv-gutter);
    right: var(--rv-gutter);
    top: 100%;
    width: auto;
    margin: 0;
  }

  .rv-header__nav[data-open="true"],
  .rv-header__nav.is-open {
    position: static;
    width: 44px !important;
  }

  .rv-header__menu ul,
  #rv-primary-menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .rv-header__menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--rivqo-black);
    text-decoration: none;
  }

  .rv-header__menu a:hover,
  .rv-header__menu .current-menu-item > a {
    color: var(--rivqo-red);
  }
}

/* Never let the parent handheld bar show; it is replaced by .rv-mobile-bar. */
body.rivqo-layout .storefront-handheld-footer-bar {
  display: none !important;
}

/* Independent mobile bar: CSS-only visibility, no parent JS/class. */
.rv-mobile-bar {
  display: none;
  box-sizing: border-box;
}

@media (max-width: 767px) {
  .rv-mobile-bar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    margin: 0;
    z-index: 100000;
    transform: none;
    filter: none;
    contain: none;
    background: #fff;
    border-top: 1px solid var(--rivqo-line);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    min-height: var(--rivqo-bar-h);
  }

  .rv-mobile-bar__item {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    min-height: var(--rivqo-bar-h);
    color: var(--rivqo-black) !important;
    text-decoration: none !important;
    font-size: 0.8125rem;
    font-weight: 500;
    text-align: center;
  }

  .rv-mobile-bar__item:hover,
  .rv-mobile-bar__item:focus {
    color: var(--rivqo-red) !important;
  }

  .rv-mobile-bar__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.15em;
    height: 1.15em;
    padding: 0 0.25em;
    border-radius: 50%;
    background: var(--rivqo-red);
    color: #fff;
    font-size: 0.7rem;
    line-height: 1;
  }

  /* Keep reserved space at the end of the document. */
  body.rivqo-layout,
  body.rivqo-layout.woocommerce-cart,
  body.rivqo-layout.woocommerce-checkout,
  body.rivqo-layout.woocommerce-account,
  body.rivqo-layout.woocommerce-page,
  body.rivqo-layout.woocommerce-shop,
  body.rivqo-layout.home {
    padding-bottom: calc(var(--rivqo-bar-h) + 1.5rem + env(safe-area-inset-bottom, 0px));
  }
}

@media (min-width: 768px) {
  .rv-mobile-bar {
    display: none !important;
  }
}

/* =========================================================
   1.0.5 — SKM-inspired cream geometric decor (original SVG),
   footer logo size unify, tighter mobile footer gap,
   44px password toggle. Does not change 1.0.4 containers.
   ========================================================= */

/* Homepage main: cream field + low-density fold lines.
   Cards stay solid. Not background-attachment:fixed. */
.home .site-content {
  position: relative;
  background-color: #f7f3ef;
  overflow: hidden;
}

.home .site-content::before {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: #f7f3ef;
  background-image: url("../images/rv-geo-decor.svg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center top;
  background-attachment: scroll;
}

.home .site-content > * {
  position: relative;
  z-index: 1;
}

.home .rivqo-hero {
  background-color: transparent;
}

/* Solid card surfaces so typography stays readable on the decor, including 375px. */
.home .rivqo-fact,
.home .rivqo-section .rivqo-empty {
  background-color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .home .site-content::before {
    animation: none !important;
    transition: none !important;
  }
}

/* Footer logo + badge: same mark width as header; tight white plate
   so padding does not visually enlarge the lock. */
.site-footer .rivqo-logo-lock,
.rivqo-footer-logo-wrap.rivqo-logo-lock {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
}

.site-footer .rivqo-logo-lock img,
.rivqo-footer-logo-wrap img {
  width: 200px !important;
  max-width: 200px !important;
  height: auto !important;
}

.rivqo-footer-logo-wrap {
  padding: 0.2rem 0.35rem;
  box-sizing: border-box;
}

@media (max-width: 767px) {
  .site-footer .rivqo-logo-lock img,
  .rivqo-footer-logo-wrap img {
    width: 150px !important;
    max-width: 150px !important;
  }

  /* Shorten the empty black band after copyright; keep room for the
     fixed mobile bar + safe-area (parent footer padding-bottom is 3.706em). */
  body.rivqo-layout .site-footer {
    padding-bottom: 0.75rem;
  }

  body.rivqo-layout .site-info {
    padding-bottom: 0;
    margin-bottom: 0;
  }

  body.rivqo-layout,
  body.rivqo-layout.woocommerce-cart,
  body.rivqo-layout.woocommerce-checkout,
  body.rivqo-layout.woocommerce-account,
  body.rivqo-layout.woocommerce-page,
  body.rivqo-layout.woocommerce-shop,
  body.rivqo-layout.home,
  body.rivqo-layout.page {
    padding-bottom: calc(var(--rivqo-bar-h) + 0.5rem + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* Account password show/hide: 44px touch target, extra input padding so
   the label/value are not squeezed under the control. */
body.rivqo-layout .password-input {
  position: relative;
}

body.rivqo-layout .password-input input[type="password"],
body.rivqo-layout .password-input input[type="text"] {
  padding-right: calc(44px + 0.5rem);
  box-sizing: border-box;
}

body.rivqo-layout .show-password-input {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
  body.rivqo-layout .show-password-input {
    transition: none;
  }
}

/* =========================================================
   1.0.6 — Mobile-only geometric decor visibility + 14px
   footer safe gap. Desktop 1.0.5 background is unchanged.
   ========================================================= */

@media (max-width: 767px) {
  /* Do not use cover on the wide desktop SVG — it cropped side folds
     out of a 375px view. Swap in a 390x800 SVG and size to width. */
  .home .site-content::before {
    background-image: url("../images/rv-geo-decor-mobile.svg?v=1.0.8"), url("../images/rv-geo-decor-mobile.svg?v=1.0.8");
    background-repeat: no-repeat, no-repeat;
    background-size: 100% auto, 100% auto;
    background-position: top center, bottom center;
    background-attachment: scroll, scroll;
    background-color: #f7f3ef;
  }

  /* Paint the same mobile geo on the hero itself so a solid hero fill
     cannot cover the first screen. Padding/layout are not changed. */
  .home .rivqo-hero {
    background-color: #f7f3ef;
    background-image: url("../images/rv-geo-decor-mobile.svg?v=1.0.8");
    background-repeat: no-repeat;
    background-size: 100% auto;
    background-position: top center;
    background-attachment: scroll;
  }

  /* Copyright was almost flush with the fixed bar: add 14px, keep
     safe-area, do not restore the old ~100px black band. */
  body.rivqo-layout,
  body.rivqo-layout.woocommerce-cart,
  body.rivqo-layout.woocommerce-checkout,
  body.rivqo-layout.woocommerce-account,
  body.rivqo-layout.woocommerce-page,
  body.rivqo-layout.woocommerce-shop,
  body.rivqo-layout.home,
  body.rivqo-layout.page {
    padding-bottom: calc(var(--rivqo-bar-h) + 0.5rem + 14px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* =========================================================
   1.0.7 — Lead phrase wrap + lighter, non-stacked mobile geo.
   Desktop decor and layout tokens are unchanged.
   ========================================================= */

@media (max-width: 767px) {
  /* One copy only, anchored to the lower page, so it does not
     reprint over the hero's own background and densify the first screen. */
  .home .site-content::before {
    background-image: url("../images/rv-geo-decor-mobile.svg?v=1.0.8");
    background-repeat: no-repeat;
    background-size: 100% auto;
    background-position: bottom center;
    background-attachment: scroll;
    background-color: #f7f3ef;
  }
}
