/* 曜龍茶業商品頁 v0.4.8 — TAB 綠色選取線、無滑鼠黑框、原生白底商品資訊。 */
/* ponytail: The native html.route-product-product class is present in the
   server page. Style its existing product markup on first paint, then use JS
   only to move GW controls and mirror options without changing their values. */

/* The blocking head script adds this before the product body is parsed. Hide
   only the reordering column, never the whole page, until JS is ready. */
html.route-product-product.gi-yaolong-v048-boot #content .product-info > .product-right {
  visibility: hidden !important;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) {
  --gi-tea-deep: #435543;
  --gi-tea-green: #718f73;
  --gi-tea-ink: #303931;
  --gi-tea-muted: #6e756d;
  --gi-tea-border: #e3e8e0;
  --gi-tea-light: #f7f9f5;
  box-sizing: border-box;
  display: grid !important;
  grid-template-columns: minmax(0, 55.9fr) minmax(0, 44.1fr) !important;
  gap: 36px !important;
  align-items: start !important;
  width: 100% !important;
  max-width: 1200px !important;
  min-width: 0;
  margin: 0 auto !important;
  padding: 0 12px !important;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) > .product-left,
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) > .product-right {
  box-sizing: border-box;
  min-width: 0 !important;
  width: 100% !important;
  max-width: none !important;
  flex: none !important;
  float: none !important;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) > .product-right {
  padding: 0 !important;
  margin: 0 !important;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .product-left > .product-image {
  width: 100% !important;
  min-width: 0;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .product-image .main-image,
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .product-image .swiper-container,
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .product-image .swiper-wrapper {
  min-width: 0;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .product-image .main-image img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Product headline and introduction remain the native product fields. */
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) #product.product-details {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0 !important;
  width: 100% !important;
  min-width: 0;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) #product > .title.page-title {
  display: block !important;
  width: 100%;
  margin: 0 0 18px !important;
  padding: 0 !important;
  background: transparent !important;
  color: var(--gi-tea-ink) !important;
  font-size: clamp(25px, 2.2vw, 32px) !important;
  font-weight: 500 !important;
  line-height: 1.45 !important;
  letter-spacing: .02em;
  overflow-wrap: anywhere;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) #product > .description {
  margin: 0 0 17px !important;
  padding: 0 !important;
  color: #444c43;
  font-size: 14px !important;
  line-height: 1.85 !important;
  overflow-wrap: anywhere;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) #product > .description p { margin: 0; }
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) #product > .description.gi-yaolong-summary-empty { display: none !important; }

/* ponytail: Journal3 shows its duplicate rating summary on narrow screens;
   keep reviews accessible in the existing 顧客評價 TAB instead. */
html.route-product-product #content .product-info #product.product-details > .rating.rating-page {
  display: none !important;
}

/* The genuine GW free-shipping notice is moved above the price, like promotions. */
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) #product > .gw-hct-free-reminder {
  box-sizing: border-box;
  width: 100%;
  margin: 0 0 22px !important;
  padding: 11px 13px !important;
  border: 1px solid var(--gi-tea-border) !important;
  border-left: 3px solid var(--gi-tea-green) !important;
  border-radius: 3px !important;
  background: var(--gi-tea-light) !important;
  box-shadow: none !important;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .gw-hct-free-reminder__message {
  color: var(--gi-tea-deep) !important;
  font-size: 13px !important;
  line-height: 1.5;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .gw-hct-free-reminder__track {
  height: 5px !important;
  margin-top: 9px !important;
  background: #e8eee5 !important;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .gw-hct-free-reminder__bar { background: var(--gi-tea-green) !important; }

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) #product > .product-price-group {
  box-sizing: border-box;
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap;
  gap: 10px 18px;
  width: 100%;
  margin: 0 0 23px !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .product-price-group .price-wrapper {
  min-width: 0;
  max-width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .product-price-group .product-price {
  color: var(--gi-tea-ink) !important;
  font-size: 27px !important;
  line-height: 1.35 !important;
  font-weight: 700 !important;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .product-price-group .product-stats {
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #606e60 !important;
  font-size: 13px !important;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .product-price-group .product-stats ul {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: flex-start;
  gap: 4px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .product-price-group .product-stats li {
  display: inline-flex !important;
  align-items: baseline;
  gap: 4px;
  max-width: 100%;
  overflow-wrap: anywhere;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  line-height: 1.5 !important;
  list-style: none !important;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .product-price-group .product-stats li::before,
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .product-price-group .product-stats li::after {
  content: none !important;
  border: 0 !important;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .product-price-group .product-stats li.product-stock {
  flex-basis: auto !important;
  color: #4b7551 !important;
  font-weight: 600;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .product-price-group .product-stats li.product-stock::before {
  content: '✓' !important;
  color: #4b7551;
  font: 700 14px/1 Arial, sans-serif;
  transform: none !important;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .product-price-group .product-stats .product-stock > b {
  display: none !important;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .product-price-group .product-stats li b {
  font-weight: 500 !important;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) #product > .product-options {
  width: 100%;
  min-width: 0;
  margin: 0 0 19px !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* ponytail: Remove only decorative rules in Journal's option/price sections;
   do not hide required-field errors, labels, or the original select. */
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) #product > .product-price-group::before,
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) #product > .product-price-group::after,
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) #product > .product-options::before,
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) #product > .product-options::after,
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .product-options .form-group::before,
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .product-options .form-group::after {
  border: 0 !important;
  box-shadow: none !important;
  background-image: none !important;
}
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) #product > hr,
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) #product > .product-options hr {
  display: none !important;
}
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .product-options .form-group,
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .product-options .me_option_extras_select {
  margin: 0 0 15px !important;
  padding: 0 !important;
  border: 0 !important;
  background-image: none !important;
  box-shadow: none !important;
}
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .product-options .control-label,
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .buttons-wrapper > .stepper > label {
  color: var(--gi-tea-ink) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
}
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .product-options .control-label {
  display: block;
  margin: 0 0 9px !important;
  padding: 0 !important;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .product-options select.form-control {
  min-width: 0;
  width: 100% !important;
  max-width: 100% !important;
  height: 43px !important;
  padding: 0 12px !important;
  border: 1px solid #cfd7cc !important;
  border-radius: 2px !important;
  background-color: #fff;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .product-options .form-control:focus {
  border-color: var(--gi-tea-green) !important;
  outline: 2px solid #cbdcca;
  outline-offset: 1px;
}

/* A short native option dropdown is mirrored as the reference's pill buttons.
   The original select remains keyboard/screen-reader accessible and owns the form value. */
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .product-options .gi-yaolong-choice-enhanced {
  position: relative;
}
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .gi-yaolong-choice-enhanced > select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 1px !important;
  opacity: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
}
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .gi-yaolong-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 10px;
  margin: 0 0 3px;
}
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) #product .product-options .gi-yaolong-choice {
  box-sizing: border-box;
  min-width: 60px;
  min-height: 43px;
  max-width: 100%;
  padding: 9px 16px !important;
  border: 1px solid #d6dad4 !important;
  border-radius: 4px !important;
  color: var(--gi-tea-ink) !important;
  background: #fff !important;
  background-image: none !important;
  font-family: inherit !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  appearance: none;
  white-space: normal;
  cursor: pointer;
}
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) #product .product-options .gi-yaolong-choice:hover,
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) #product .product-options .gi-yaolong-choice.is-selected {
  border-color: var(--gi-tea-green) !important;
  color: var(--gi-tea-deep) !important;
}
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) #product .product-options .gi-yaolong-choice.is-selected {
  background: #f3f7f1 !important;
}
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .gi-yaolong-choice:disabled { opacity: .5; cursor: not-allowed; }
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .gi-yaolong-choice:focus-visible,
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .gi-yaolong-choice-enhanced > select:focus-visible + .gi-yaolong-choices {
  outline: 2px solid var(--gi-tea-green);
  outline-offset: 2px;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) #product > .button-group-page {
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .button-group-page > .buttons-wrapper {
  box-sizing: border-box;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0 !important;
  min-width: 0;
  width: 100% !important;
}

/* Retain the one native Journal input and its existing spinner click handlers. */
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .buttons-wrapper > .stepper {
  box-sizing: border-box;
  display: grid !important;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  grid-template-rows: 26px 48px;
  gap: 0 !important;
  width: 100% !important;
  height: auto !important;
  max-width: none !important;
  margin: 0 0 22px !important;
  padding: 0 !important;
  border: none !important;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .buttons-wrapper > .stepper > label {
  display: block !important;
  grid-column: 1 / 4;
  grid-row: 1;
  line-height: 22px;
  margin: 0 !important;
  padding: 0 !important;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .buttons-wrapper > .stepper > input#product-quantity {
  box-sizing: border-box;
  display: block !important;
  grid-column: 2;
  grid-row: 2;
  width: 100% !important;
  height: 48px !important;
  min-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 1px solid #d7ded4 !important;
  border-radius: 0 !important;
  text-align: center;
  box-shadow: none !important;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .buttons-wrapper > .stepper > input[type='hidden'] {
  display: none !important;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .buttons-wrapper > .stepper > span { display: contents !important; }

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .buttons-wrapper > .stepper > span > i {
  box-sizing: border-box;
  display: flex !important;
  align-items: center;
  justify-content: center;
  height: 48px !important;
  width: 46px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #d7ded4 !important;
  border-radius: 0 !important;
  background: #fff;
  color: var(--gi-tea-ink);
  font-style: normal !important;
  writing-mode: horizontal-tb !important;
  transform: none !important;
  rotate: none !important;
  cursor: pointer;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .buttons-wrapper > .stepper > span > i.fa-angle-up { grid-column: 3; grid-row: 2; }
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .buttons-wrapper > .stepper > span > i.fa-angle-down { grid-column: 1; grid-row: 2; }
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .buttons-wrapper > .stepper > span > i.fa-angle-up::before,
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .buttons-wrapper > .stepper > span > i.fa-angle-down::before {
  display: block !important;
  font: 400 26px/1 Arial, sans-serif !important;
  font-style: normal !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  transform: none !important;
  rotate: none !important;
}
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .buttons-wrapper > .stepper > span > i.fa-angle-up::before { content: '+' !important; }
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .buttons-wrapper > .stepper > span > i.fa-angle-down::before { content: '−' !important; }

/* GW original product boxes become clean SHOPLINE-like rows, not new widgets. */
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .buttons-wrapper > .gw-addon-deal-box {
  box-sizing: border-box;
  clear: none !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
  margin: 0 0 14px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #f5f6f4 !important;
  box-shadow: none !important;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .gw-addon-title {
  margin: 0 !important;
  padding: 14px 17px !important;
  border-bottom: 0 !important;
  background: #e9ece8 !important;
  color: var(--gi-tea-deep) !important;
  font-size: 14px !important;
  font-weight: 500;
  line-height: 1.5;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .gw-addon-item {
  box-sizing: border-box;
  display: grid !important;
  grid-template-columns: 24px 70px minmax(0, 1fr);
  align-items: start !important;
  gap: 10px 12px !important;
  width: 100%;
  min-width: 0;
  margin: 0 !important;
  padding: 18px 16px !important;
  border: none !important;
  border-bottom: 1px solid #d9ddd8 !important;
  border-radius: 0 !important;
  background: #f5f6f4 !important;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .gw-addon-item:last-child { border-bottom: none !important; }

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .gi-yaolong-addon-check {
  display: block;
  grid-column: 1;
  grid-row: 1;
  width: 19px;
  height: 19px;
  margin: 6px 0 0;
  padding: 0;
  border: 1px solid #a6afa3;
  border-radius: 3px;
  background: #fff;
  color: var(--gi-tea-deep);
  cursor: pointer;
}
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .gi-yaolong-addon-check.is-checked {
  border-color: var(--gi-tea-green);
  background: var(--gi-tea-green);
  color: #fff;
}
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .gi-yaolong-addon-check.is-checked:after {
  content: '✓';
  display: block;
  font: 700 13px/17px Arial, sans-serif;
  text-align: center;
}
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .gi-yaolong-addon-check:focus-visible {
  outline: 2px solid var(--gi-tea-green);
  outline-offset: 2px;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .gw-addon-item img {
  display: block;
  grid-column: 2;
  grid-row: 1;
  width: 70px !important;
  height: 70px !important;
  object-fit: cover;
  border-radius: 2px !important;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .gw-addon-info {
  grid-column: 3;
  grid-row: 1;
  min-width: 0;
}
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .gw-addon-name {
  color: var(--gi-tea-ink) !important;
  font-size: 15px !important;
  line-height: 1.5;
  white-space: normal !important;
  overflow: visible !important;
  overflow-wrap: anywhere;
  text-overflow: clip !important;
}
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .gw-addon-original { display: none !important; }
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .gw-addon-price,
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .gw-addon-price strong {
  color: var(--gi-tea-green) !important;
  font-size: 14px !important;
  line-height: 1.5;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .gw-addon-qty {
  display: grid !important;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  width: min(100%, 210px) !important;
  max-width: 100%;
  margin: 8px 0 !important;
  border: 1px solid #d8dfd6 !important;
  border-radius: 0 !important;
  background: #fff !important;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .gw-addon-qty button {
  width: 36px !important;
  height: 38px !important;
  padding: 0 !important;
  color: var(--gi-tea-ink);
  background: #fff !important;
}
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .gw-addon-qty input {
  width: 100% !important;
  min-width: 0 !important;
  height: 38px !important;
  padding: 0 !important;
  border-left: 1px solid #d8dfd6 !important;
  border-right: 1px solid #d8dfd6 !important;
  border-radius: 0 !important;
  color: var(--gi-tea-ink);
  background: #fff !important;
  text-align: center;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .buttons-wrapper > .wishlist-compare {
  box-sizing: border-box;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 14px 0 0 !important;
  border: none !important;
}
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .wishlist-compare .btn-wishlist {
  margin: 0 !important;
  color: var(--gi-tea-deep) !important;
  font-size: 14px !important;
  background: transparent !important;
  border: 0 !important;
}
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .wishlist-compare .btn-compare { display: none !important; }

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .buttons-wrapper > .cart-group {
  box-sizing: border-box;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch !important;
  gap: 12px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .cart-group #button-cart,
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .cart-group .extra-group .btn-extra {
  box-sizing: border-box;
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 50px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 8px 10px !important;
  border-radius: 2px !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 500;
  text-align: center;
  white-space: normal;
}
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .cart-group #button-cart { background: var(--gi-tea-deep) !important; }
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .cart-group .extra-group { display: block !important; min-width: 0; width: 100% !important; }
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .cart-group .extra-group .btn-extra { background: var(--gi-tea-green) !important; }

:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) #product a:focus-visible,
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) #product button:focus-visible,
:is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) #product [role="button"]:focus-visible {
  outline: 2px solid var(--gi-tea-green) !important;
  outline-offset: 2px;
}

/* Keep Journal3's existing tab handlers and content; center the entire section. */
html.route-product-product #content > .product-blocks {
  box-sizing: border-box;
  display: block !important;
  width: 100% !important;
  max-width: 1200px !important;
  margin: 54px auto 0 !important;
  padding: 0 12px !important;
  overflow: visible !important;
}
html.route-product-product .product-blocks .product_tabs {
  box-sizing: border-box;
  width: 100% !important;
  margin: 0 auto !important;
  overflow: visible !important;
}
html.route-product-product .product-blocks .product_tabs .nav-tabs {
  box-sizing: border-box;
  /* ponytail: Keep Journal3's real TABs sticky; cloned TABs would duplicate
     click handlers and require synchronizing the selected state. */
  position: sticky;
  top: var(--gi-yaolong-tabs-top, 0px);
  z-index: 10015;
  display: flex !important;
  flex-wrap: nowrap;
  gap: 0;
  width: 100% !important;
  max-width: 100%;
  overflow: visible;
  background: #fff !important;
  border-bottom: 1px solid var(--gi-tea-border, #e3e8e0) !important;
}
html.route-product-product .product-blocks .product_tabs .nav-tabs > li {
  float: none !important;
  flex: 1 1 0 !important;
  min-width: 0;
  margin: 0 !important;
  text-align: center;
}
/* Journal3's selected LI uses a red border. Use only the A's green underline. */
html.route-product-product .product-blocks .product_tabs .nav-tabs > li.active {
  border-bottom: 0 !important;
}
html.route-product-product .product-blocks .product_tabs .nav-tabs > li > a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 59px;
  padding: 12px 10px !important;
  border: 0 !important;
  border-bottom: 0 !important;
  border-radius: 0 !important;
  color: #677067 !important;
  background: transparent !important;
  font-size: 17px;
  white-space: normal;
}
html.route-product-product .product-blocks .product_tabs .nav-tabs > li.active > a {
  border-bottom: 3px solid var(--gi-tea-green, #718f73) !important;
}
/* ponytail: Mouse clicks don't need Chrome's black focus ring; keyboard Tab
   still gets a visible ring. No changes to native tab switching. */
html.route-product-product .product-blocks .product_tabs .nav-tabs > li > a:focus:not(:focus-visible) {
  outline: none !important;
}
html.route-product-product .product-blocks .product_tabs .nav-tabs > li > a:focus-visible {
  outline: 2px solid var(--gi-tea-green, #718f73) !important;
  outline-offset: 2px;
}
html.route-product-product .product-blocks .product_tabs .nav-tabs > li.active > a,
html.route-product-product .product-blocks .product_tabs .nav-tabs > li > a:hover {
  color: #435543 !important;
}

html.route-product-product .product-blocks .product_tabs .tab-content {
  box-sizing: border-box;
  width: 100%;
  margin: 31px auto 0 !important;
}
html.route-product-product .product-blocks .product_tabs .tab-content .block-content {
  box-sizing: border-box;
  width: 100% !important;
  max-width: 1060px !important;
  margin: 0 auto !important;
  padding: 0 8px !important;
  font-size: 15px;
  line-height: 1.8;
}

/* One floating purchase bar for desktop and mobile. Both buttons dispatch to
   the *original* Journal/GW controls; no duplicate cart/checkout logic. */
.gi-yaolong-mobile-buy { display: none; }
html.route-product-product .gi-yaolong-mobile-buy button {
  box-sizing: border-box;
  min-width: 0;
  min-height: 48px;
  padding: 9px 5px;
  border: 0;
  border-radius: 2px;
  color: #fff;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}
html.route-product-product .gi-yaolong-mobile-cart { background: #435543; }
html.route-product-product .gi-yaolong-mobile-buy .gi-yaolong-mobile-quick { background: #718f73; }
html.route-product-product .gi-yaolong-mobile-buy button:focus-visible {
  outline: 2px solid #435543;
  outline-offset: 2px;
}

@media (min-width: 768px) {
  /* While the native TAB sticks, dock the *existing* two purchase buttons
     inside the same visual row. No second cart UI or copy of Journal logic. */
  html.route-product-product.gi-yaolong-tabs-docked .product-blocks .product_tabs .nav-tabs {
    padding-right: clamp(292px, 37vw, 490px) !important;
    box-shadow: 0 3px 12px rgba(36, 52, 39, .10);
  }
  html.route-product-product.gi-yaolong-tabs-docked .gi-yaolong-mobile-buy {
    width: clamp(292px, 37vw, 490px) !important;
    min-height: 60px;
    gap: 7px;
    padding: 7px 9px;
    border-radius: 0;
    background: #fff;
    box-shadow: 0 3px 12px rgba(36, 52, 39, .10);
    transform: none;
  }
  html.route-product-product.gi-yaolong-tabs-docked .gi-yaolong-mobile-buy button {
    min-height: 45px;
    font-size: 14px;
  }
  html.route-product-product .gi-yaolong-mobile-buy {
    box-sizing: border-box;
    position: fixed;
    z-index: 10020;
    top: 110px; /* JS follows the live sticky-header bottom on scroll/resize. */
    right: max(12px, calc((100vw - 1200px) / 2 + 12px));
    bottom: auto;
    left: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    width: min(510px, calc(100vw - 24px));
    padding: 12px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 3px 18px rgba(36, 52, 39, .14);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
  }
  html.route-product-product .gi-yaolong-mobile-buy.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }
}

@media (max-width: 900px) {
  :is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 22px !important;
    max-width: 700px !important;
  }
  :is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) #product > .title.page-title { font-size: 27px !important; }
  html.route-product-product #content > .product-blocks {
    max-width: 700px !important;
    margin-top: 50px !important;
  }
}

@media (max-width: 767px) {
  /* ponytail: Native sticky is trapped by Journal's body overflow and the
     27px TAB panel. The same original nav is positioned by JS on mobile. */
  html.route-product-product .product-blocks .product_tabs .nav-tabs {
    position: static;
    top: auto;
  }
  html.route-product-product .product-blocks .product_tabs .nav-tabs.gi-yaolong-nav-fixed {
    box-shadow: 0 4px 13px rgba(36, 52, 39, .12);
    z-index: 10015;
  }
  :is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .product-image.position-left {
    --gi-thumb-width: clamp(58px, 13vw, 90px);
    display: flex !important;
    flex-direction: row !important;
    gap: 11px !important;
    align-items: flex-start !important;
    min-width: 0;
    width: 100% !important;
  }
  :is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .product-image.position-left > .additional-images {
    box-sizing: border-box;
    order: 0 !important;
    flex: 0 0 var(--gi-thumb-width) !important;
    width: var(--gi-thumb-width) !important;
    height: min(76vw, 500px) !important;
    max-height: 500px;
    margin: 0 !important;
    overflow: hidden;
  }
  :is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .product-image.position-left > .main-image {
    box-sizing: border-box;
    order: 1 !important;
    flex: 1 1 0 !important;
    width: calc(100% - var(--gi-thumb-width) - 11px) !important;
    min-width: 0 !important;
    margin: 0 !important;
  }
  :is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .product-image.position-left .swiper-container { max-width: 100%; }

  html.route-product-product.gi-yaolong-sticky-visible body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
  }
  html.route-product-product .gi-yaolong-mobile-buy {
    box-sizing: border-box;
    position: fixed;
    z-index: 10020;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    width: 100%;
    padding: 9px 12px calc(9px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    box-shadow: 0 -2px 13px rgba(0, 0, 0, .1);
    transform: translateY(110%);
    visibility: hidden;
    transition: transform .18s ease, visibility .18s ease;
  }
  html.route-product-product .gi-yaolong-mobile-buy.is-visible {
    transform: none;
    visibility: visible;
  }
}

@media (max-width: 520px) {
  :is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) { gap: 18px !important; padding: 0 10px !important; }
  :is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) #product > .title.page-title { font-size: 24px !important; }
  :is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .product-price-group .product-price { font-size: 25px !important; }
  :is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) #product > .product-price-group {
    align-items: flex-start !important;
    gap: 11px !important;
  }
  :is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .product-price-group .product-stats {
    box-sizing: border-box;
    max-width: 100%;
    padding: 0 !important;
  }
  :is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .gw-addon-item {
    grid-template-columns: 21px 58px minmax(0, 1fr);
    gap: 8px 9px !important;
    align-items: start !important;
    padding: 14px 11px !important;
  }
  :is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .gw-addon-item img { width: 58px !important; height: 58px !important; }
  :is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .gw-addon-title { padding: 12px 13px !important; }
  :is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .gw-addon-qty { width: 100% !important; }
  :is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .gw-addon-name { font-size: 14px !important; }
  :is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .buttons-wrapper > .cart-group { gap: 7px !important; }
  /* ponytail: Journal3 adds 7px top and 67px left on narrow screens;
     the native cart/grid already provides the correct two-column spacing. */
  :is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .cart-group .extra-group {
    margin: 0 !important;
  }
  :is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .cart-group .extra-group .btn-extra:first-child {
    margin-left: 0 !important;
  }
  :is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .cart-group #button-cart,
  :is(.gi-yaolong-layout-v048, html.route-product-product #content .product-info) .cart-group .extra-group .btn-extra { padding: 8px 5px !important; font-size: 13px !important; }
  html.route-product-product #content > .product-blocks { padding: 0 10px !important; }
  html.route-product-product .product-blocks .product_tabs .nav-tabs > li > a {
    padding: 10px 5px !important;
    font-size: 13px !important;
    min-height: 56px;
  }
  html.route-product-product .product-blocks .product_tabs .tab-content .block-content { padding: 0 4px !important; }
}

@media (max-width: 767px) {
  html.route-product-product .product-blocks .product_tabs .nav-tabs > li > a {
    min-height: 46px !important;
    padding: 8px 5px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.route-product-product .gi-yaolong-mobile-buy { transition: none; }
}
