﻿/* Section 四 — home / PLP / PDP / cart polish (theme only; Phase9 untouched). */

/* --- Unified product cards --- */
.tg-card,
.woocommerce ul.products li.product.tg-card--loop {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid var(--tg-border, #e5e7eb);
  border-radius: var(--tg-radius, 12px);
  overflow: hidden;
}
.tg-card__media,
.woocommerce ul.products li.product .tg-card__media {
  display: block;
  aspect-ratio: 1 / 1;
  background: var(--tg-gray, #f5f7fa);
  overflow: hidden;
  position: relative;
}
.tg-card__media img,
.woocommerce ul.products li.product .tg-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  margin: 0 !important;
}
.tg-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.35rem;
  padding: 0.85rem 0.95rem 1rem;
}
.tg-card__footer {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.35rem;
}
.tg-card__footer .tg-btn,
.tg-card__footer .button,
.tg-card__footer a.button {
  flex: 1 1 auto;
  text-align: center;
  justify-content: center;
}

/* Categories: desktop 4 / mobile 2 (already in main; reinforce) */
@media (max-width: 768px) {
  #categories .tg-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* --- Hero (full-width brand banner): edge-to-edge, max 1920 centered, no Mua ngay bar --- */
.tg-hero--photo {
  --tg-hero-ratio: 3 / 1; /* desktop art 2172x724 */
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: var(--tg-color-brand);
  overflow: visible;
  isolation: isolate;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
}
.tg-hero--photo > .tg-hero__carousel.tg-carousel,
.tg-hero--photo > .tg-hero__carousel.tg-carousel--hero-fw {
  width: 100%;
  max-width: 1920px;
  margin-inline: auto;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: var(--tg-hero-ratio);
  border-radius: 0;
  overflow: hidden;
  background: var(--tg-color-brand);
  border: 0;
  box-shadow: none;
}
.tg-hero--photo .tg-carousel__picture {
  display: block;
  width: 100%;
  height: 100%;
}
.tg-hero--photo .tg-carousel__img {
  object-fit: cover; /* t201: full-bleed at desktop; contain left letterbox gutters */
  object-position: center center;
  width: 100%;
  height: 100%;
  background: var(--tg-color-brand);
}
@media (max-width: 767px) {
  .tg-hero--photo .tg-carousel__img {
    object-fit: contain; /* keep mobile art uncropped */
  }
}
/* Ensure hero frame ignores shared .tg-banner-frame height clamp */
.tg-hero--photo > .tg-hero__carousel.tg-banner-frame,
.tg-hero--photo > .tg-banner-frame.tg-carousel {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  border-radius: 0 !important;
  background: var(--tg-color-brand) !important;
  max-width: none !important;
  width: 100% !important;
}
.tg-hero--photo .tg-carousel__btn {
  width: 48px; height: 48px;
  font-size: 28px;
  color: var(--tg-color-brand);
  box-shadow: var(--tg-shadow);
  opacity: 1;
}
.tg-hero--photo .tg-carousel__btn--prev { left: clamp(12px, 2vw, 28px); }
.tg-hero--photo .tg-carousel__btn--next { right: clamp(12px, 2vw, 28px); }
.tg-hero--photo .tg-carousel__dots {
  left: 50%; right: auto; bottom: 16px;
  transform: translateX(-50%);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(4px);
}
.tg-hero--photo .tg-carousel__dot { background: rgba(24, 55, 95, 0.25); }
.tg-hero--photo .tg-carousel__dot.is-active { background: var(--tg-color-button); }

/* Independent spacing: Banner / Promo / Categories (promo may be absent). */
.tg-hero--photo + .tg-promo-strip {
  width: 100%;
  max-width: none;
  margin: 8px 0 0;
  border-radius: 0;
}
.tg-hero--photo + .tg-promo-strip .tg-promo-strip__inner {
  width: min(100% - 2rem, var(--tg-max));
  margin-inline: auto;
}
.tg-promo-strip + #categories.tg-section {
  padding-top: 32px;
}
.tg-hero--photo + #categories.tg-section {
  padding-top: 36px;
}
#categories.tg-section .tg-section__head {
  margin-bottom: 22px;
}

/* Remove Phase-5 mobile title + Mua ngay bar (image click is the CTA). */
.tg-hero__mobile-overlay,
.tg-hero__mobile-title,
.tg-hero__mobile-cta { display: none !important; }

@media (max-width: 1199px) {
  .tg-hero--photo {
    --tg-hero-ratio: 1200 / 900; /* tablet 4:3 */
  }
  .tg-hero--photo .tg-carousel__btn {
    width: 40px; height: 40px; font-size: 24px;
  }
}
@media (max-width: 767px) {
  .tg-hero--photo {
    --tg-hero-ratio: 750 / 1000; /* mobile 3:4 */
    padding-top: 0;
  }
  .tg-hero--photo > .tg-hero__carousel.tg-carousel {
    border-radius: 0;
  }
  .tg-hero--photo .tg-carousel__btn {
    width: 34px; height: 34px; font-size: 20px;
  }
  .tg-hero--photo .tg-carousel__btn--prev { left: 8px; }
  .tg-hero--photo .tg-carousel__btn--next { right: 8px; }
  .tg-hero--photo .tg-carousel__dots {
    bottom: 12px;
    padding: 4px 8px;
  }
  .tg-hero--photo + .tg-promo-strip { margin-top: 8px; }
  .tg-promo-strip + #categories.tg-section { padding-top: 28px; }
  .tg-hero--photo + #categories.tg-section { padding-top: 32px; }
  #categories.tg-section .tg-section__head { margin-bottom: 20px; }
}

/* t224 (1.18.8): PC-only hero Scheme C — aspect-ratio 3/1 (2172x724 art),
   soft max-height 640px. Under 1920px the frame is width/3 and the image fills
   100% with no crop. Above 1920px height caps at 640; side gutters use the
   existing blurred --tg-hero-bg fill. Mobile/tablet (<=1024) unchanged. */
@media (min-width: 1025px) {
  .tg-hero--photo {
    --tg-hero-ratio: 3 / 1;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    border-radius: 0;
  }
  .tg-hero--photo > .tg-hero__carousel.tg-carousel.tg-carousel--hero-fw {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    aspect-ratio: 3 / 1;
    height: auto !important;
    min-height: 0 !important;
    max-height: 640px !important;
    border-radius: 0 !important;
    overflow: hidden;
  }
  .tg-hero--photo .tg-carousel__slide {
    overflow: hidden;
    background: var(--tg-color-brand);
  }
  .tg-hero--photo .tg-carousel__slide::before {
    content: "";
    position: absolute;
    inset: -40px;
    z-index: 0;
    background: var(--tg-hero-bg, none) center center / cover no-repeat;
    filter: blur(28px) saturate(1.05);
    transform: scale(1.06);
    pointer-events: none;
  }
  .tg-hero--photo .tg-carousel__link,
  .tg-hero--photo .tg-carousel__picture {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
  }
  .tg-hero--photo .tg-carousel__img {
    position: absolute;
    inset: 0;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    aspect-ratio: auto;
    object-fit: contain;
    object-position: center center;
    transform: none;
    background: transparent;
  }
  .tg-promo-strip + #categories.tg-section,
  .tg-hero--photo + #categories.tg-section {
    padding-top: 30px;
  }
}

/* --- Combos: featured 3 + pick highlight --- */
.tg-combos-featured {
  margin-bottom: 1.25rem;
}
.tg-combos-pick {
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .tg-combos-pick {
    grid-template-columns: minmax(0, 1fr);
  }
  .tg-combos-pick .tg-card--pick {
    display: grid;
    grid-template-columns: minmax(180px, 280px) 1fr;
    align-items: stretch;
  }
  .tg-combos-pick .tg-card--pick .tg-card__media {
    aspect-ratio: auto;
    min-height: 100%;
  }
  .tg-combos-pick .tg-card--pick .tg-combo-compose {
    grid-column: 1 / -1;
  }
}
.tg-combos-pick .tg-card--pick {
  border-color: var(--tg-red, #e30613);
  box-shadow: 0 8px 28px rgba(227, 6, 19, 0.08);
}
.tg-combo-compose {
  list-style: none;
  margin: 0;
  padding: 0.45rem 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  background: var(--tg-gray, #f5f7fa);
  border-top: 1px solid var(--tg-border, #e5e7eb);
}
.tg-combo-compose__item {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--tg-border, #e5e7eb);
  background: #fff;
}
.tg-combo-compose__item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.tg-combo-compose__qty {
  position: absolute;
  right: 0;
  bottom: 0;
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(17,24,39,0.75);
  color: #fff;
  padding: 0 3px;
  line-height: 1.2;
}

/* --- Shop chips --- */
.tg-shop-chips {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.tg-shop-chips__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.tg-shop-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--tg-border, #e5e7eb);
  background: #fff;
  color: var(--tg-blue-deep, #17365f);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}
.tg-shop-chip:hover {
  border-color: var(--tg-blue, #1264c5);
  color: var(--tg-blue, #1264c5);
}
.tg-shop-chip.is-active {
  background: var(--tg-blue, #1264c5);
  border-color: var(--tg-blue, #1264c5);
  color: #fff;
}
.tg-shop-chip--series {
  font-weight: 500;
  font-size: 0.82rem;
}

/* t219: All / Singles / Combos — original chip size + line SVG icons; modest tap target */
.tg-shop-chip__ico {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin-right: 6px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tg-shop-chips__row:not(.tg-shop-chips__row--series) .tg-shop-chip {
  min-height: 36px;
}

/* Loop cards use li.product — neutralize WC float leftovers */
.woocommerce ul.products li.product.tg-card--loop {
  padding: 0 0 0;
  text-align: left;
}
.woocommerce ul.products li.product.tg-card--loop .woocommerce-loop-product__title,
.woocommerce ul.products li.product.tg-card--loop .price,
.woocommerce ul.products li.product.tg-card--loop .button {
  margin-left: 0;
  margin-right: 0;
}

/* --- PDP mobile accordion tabs --- */
@media (max-width: 768px) {
  .tg-single .woocommerce-tabs ul.tabs {
    display: none !important;
  }
  .tg-single .woocommerce-tabs {
    border: 0;
  }
  .tg-single .woocommerce-Tabs-panel {
    display: block !important;
    margin: 0 0 0.65rem !important;
    padding: 0 !important;
    border: 1px solid var(--tg-border, #e5e7eb);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
  }
  .tg-single .woocommerce-Tabs-panel > h2:first-child,
  .tg-single .woocommerce-Tabs-panel::before {
    /* JS injects button; hide duplicate panel title when accordion header present */
  }
  .tg-acc-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    background: var(--tg-gray, #f5f7fa);
    border: 0;
    font-weight: 700;
    color: var(--tg-blue-deep, #17365f);
    text-align: left;
    cursor: pointer;
  }
  .tg-acc-toggle::after {
    content: "+";
    font-size: 1.1rem;
    line-height: 1;
  }
  .tg-acc-toggle[aria-expanded="true"]::after {
    content: "−";
  }
  .tg-acc-body {
    padding: 0.75rem 1rem 1rem;
  }
  .tg-acc-body[hidden] {
    display: none !important;
  }
}

/* Sticky buy bar */
.tg-sticky-buy {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  background: #fff;
  border-top: 1px solid var(--tg-border, #e5e7eb);
  box-shadow: 0 -6px 24px rgba(0,0,0,0.08);
  padding: 0.65rem 0.85rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
}
.tg-sticky-buy[hidden] {
  display: none !important;
}
.tg-sticky-buy__inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.tg-sticky-buy__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.tg-sticky-buy__name {
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--tg-blue-deep, #17365f);
}
.tg-sticky-buy__price {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--tg-red, #e30613);
}
.tg-sticky-buy__pick {
  font-size: 0.8rem;
  color: var(--tg-muted, #6b7280);
}
.tg-sticky-buy__btn {
  flex: 0 0 auto;
  white-space: nowrap;
}
@media (min-width: 769px) {
  .tg-sticky-buy {
    display: none !important;
  }
}
body.tg-sticky-buy-on {
  padding-bottom: 4.5rem;
}

/* --- Mobile cart cards --- */
@media (max-width: 768px) {
  .tg-cart-table thead {
    display: none;
  }
  .tg-cart-table,
  .tg-cart-table tbody,
  .tg-cart-table tr.tg-cart-row,
  .tg-cart-table td {
    display: block;
    width: 100%;
  }
  .tg-cart-table tr.tg-cart-row {
    position: relative;
    margin: 0 0 0.85rem;
    padding: 0.85rem;
    border: 1px solid var(--tg-border, #e5e7eb);
    border-radius: 12px;
    background: #fff;
    display: grid;
    grid-template-columns: 72px 1fr;
    grid-template-areas:
      "thumb name"
      "thumb qty"
      "thumb sub"
      "compose compose"
      "price price";
    gap: 0.35rem 0.75rem;
  }
  .tg-cart-table tr.tg-cart-row td.product-remove {
    position: absolute;
    top: 0.35rem;
    right: 0.45rem;
    width: auto;
    padding: 0;
  }
  .tg-cart-table tr.tg-cart-row td.product-thumbnail {
    grid-area: thumb;
    padding: 0;
  }
  .tg-cart-table tr.tg-cart-row td.product-thumbnail img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
  }
  .tg-cart-table tr.tg-cart-row td.product-name {
    grid-area: name;
    padding: 0;
    padding-right: 1.5rem;
  }
  .tg-cart-table tr.tg-cart-row td.product-name::before {
    display: none;
  }
  .tg-cart-table tr.tg-cart-row td.product-quantity {
    grid-area: qty;
    padding: 0;
  }
  .tg-cart-table tr.tg-cart-row td.product-quantity::before {
    display: none;
  }
  .tg-cart-table tr.tg-cart-row td.product-subtotal {
    grid-area: sub;
    padding: 0;
    font-weight: 700;
  }
  .tg-cart-table tr.tg-cart-row td.product-subtotal::before {
    content: none;
  }
  .tg-cart-table tr.tg-cart-row td.product-price {
    grid-area: price;
    padding: 0.25rem 0 0;
    font-size: 0.85rem;
    color: var(--tg-muted, #6b7280);
  }
  .tg-cart-spec {
    font-size: 0.8rem;
    color: var(--tg-muted, #6b7280);
    margin-top: 0.15rem;
  }
  .tg-cart-compose {
    grid-column: 1 / -1;
    margin-top: 0.35rem;
    font-size: 0.85rem;
  }
  .tg-cart-compose summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--tg-blue, #1264c5);
  }
  .tg-cart-compose ul {
    margin: 0.35rem 0 0;
    padding-left: 1rem;
  }
  .tg-cart-table tr.tg-cart-actions,
  .tg-cart-table td.actions {
    display: block;
    width: 100%;
    border: 0;
    padding: 0.5rem 0 0;
  }
  .tg-cart-collaterals .wc-proceed-to-checkout {
    margin-top: 0.75rem;
  }
}


/* Homepage review date / source */
.tg-review__date {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--tg-muted, #6b7280);
}
.tg-review__source {
  font-weight: 500;
  color: var(--tg-muted, #6b7280);
}


/* ========== UI Phase 2 — product / combo / sort / category ========== */

.tg-card__media,
.woocommerce ul.products li.product .tg-card__media {
  background: #F7FAFD;
}
.tg-card__media img,
.woocommerce ul.products li.product .tg-card__media img {
  object-fit: contain !important;
  object-position: center;
  padding: 0.55rem;
  box-sizing: border-box;
}

.tg-card__title,
.woocommerce ul.products li.product.tg-card--loop .woocommerce-loop-product__title {
  font-size: var(--tg-fs-product-title, 0.9375rem);
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
  color: var(--tg-color-brand, #18375F);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}
.tg-card__title a { color: inherit; text-decoration: none; }
.tg-card__eyebrow {
  font-size: var(--tg-fs-meta, 0.8125rem);
  color: var(--tg-color-muted, #7A8798);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.tg-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.tg-card__compose-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: var(--tg-fs-meta, 0.8125rem);
  color: var(--tg-color-muted, #7A8798);
  margin: 0;
  line-height: 1.4;
  min-height: 0;
}

/* Dual equal buttons — mandatory */
.tg-card__footer {
  margin-top: auto;
  display: block;
  padding-top: 0.5rem;
}
.tg-card-actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
  align-items: stretch;
}
.tg-card-actions .tg-btn,
.tg-card-actions a.button,
.tg-card-actions .button {
  width: 100% !important;
  min-width: 0;
  flex: none !important;
  min-height: var(--tg-btn-h-card, 48px);
  height: var(--tg-btn-h-card, 48px);
  padding: 0 0.4rem !important;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--tg-radius-pill, 999px);
  box-sizing: border-box;
  line-height: 1.1;
}
.tg-card-actions .tg-btn--primary,
.tg-card-actions a.tg-btn--primary,
.tg-card-actions a.button.add_to_cart_button,
.tg-card-actions a.add_to_cart_button.ajax_add_to_cart {
  background: #1769D2 !important;
  background-color: #1769D2 !important;
  color: #fff !important;
  border: 1px solid #1769D2 !important;
  box-shadow: none !important;
  opacity: 1 !important;
}
.tg-card-actions .tg-btn--primary:hover,
.tg-card-actions a.tg-btn--primary:hover,
.tg-card-actions a.add_to_cart_button:hover {
  background: #18375F !important;
  background-color: #18375F !important;
  color: #fff !important;
  border-color: #18375F !important;
}
.tg-card-actions .tg-btn--outline,
.tg-card-actions a.tg-btn--outline {
  background: #fff !important;
  background-color: #fff !important;
  color: #1769D2 !important;
  border: 1px solid #1769D2 !important;
}
/* Mobile: do not shrink button type — stack instead (see max-width 767 rules). */
@media (max-width: 420px) {
  .tg-card-actions .tg-btn {
    font-size: 0.8125rem;
  }
}

/* Price */
.tg-card__price,
.tg-card__price .amount,
.tg-card__price .tg-price__amount,
.tg-card__price .tg-price__amount .amount,
.woocommerce ul.products li.product .tg-card__price,
.woocommerce ul.products li.product .tg-card__price .amount,
.woocommerce ul.products li.product .tg-card__price .tg-price__amount,
.woocommerce ul.products li.product .tg-card__price .tg-price__amount .amount,
.woocommerce ul.products li.product .price,
.woocommerce ul.products li.product .price .amount,
.woocommerce ul.products li.product .price ins,
.woocommerce ul.products li.product .price ins .amount {
  font-size: var(--tg-fs-price, 1.25rem);
  font-weight: 700;
  /* Match homepage bestsellers: current price in sale red */
  color: var(--tg-color-sale, #D92D35);
}
.tg-card__price.tg-price--sale,
.tg-card__price.tg-price--sale .amount,
.tg-card__price.tg-price--sale .tg-price__amount,
.tg-card__price.tg-price--sale .tg-price__amount .amount {
  color: var(--tg-color-sale, #D92D35);
}
.tg-card__price del,
.tg-card__price .tg-price__was,
.tg-card__price .tg-price__was .amount {
  font-size: 0.85rem !important;
  font-weight: 500 !important;
  color: var(--tg-color-muted, #7A8798) !important;
  text-decoration: line-through;
}
.tg-card__price ins { text-decoration: none; }

/* Combo badges + thumbs */
.tg-card__badge {
  position: absolute;
  z-index: 2;
  top: 0.55rem;
  left: 0.55rem;
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--tg-color-brand, #18375F);
  color: #fff;
  line-height: 1;
}
.tg-card__badge--save {
  left: auto;
  right: 0.55rem;
  background: #FDE8EA;
  color: var(--tg-color-sale, #D92D35);
}
.tg-card__badge--pick {
  background: var(--tg-color-button, #1769D2);
}
.tg-card__badge--combo + .tg-card__badge--save,
.tg-card__badge--combo + .tg-card__badge--pick {
  /* keep both corners */
}

.tg-combo-compose {
  list-style: none;
  margin: 0;
  padding: 0.4rem 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  background: #F7FAFD;
  border-top: 1px solid var(--tg-color-border, #E3EAF3);
}
.tg-combo-compose__item {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--tg-color-border, #E3EAF3);
  background: #fff;
}
.tg-combo-compose__item img {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  padding: 2px;
  box-sizing: border-box;
  display: block;
}

/* Combo cards: same 1:1 media as products; kill oversized pick media */
.tg-card--combo .tg-card__media,
.tg-combos-featured .tg-card__media,
.woocommerce ul.products li.product.tg-card--combo .tg-card__media {
  aspect-ratio: 1 / 1 !important;
  min-height: 0 !important;
  max-height: none;
}
.tg-combos-featured {
  margin-bottom: 1.25rem;
}
@media (min-width: 1024px) {
  .tg-grid.tg-grid--4.tg-combos-featured,
  .tg-combos-featured.tg-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 1023px) and (min-width: 600px) {
  .tg-grid.tg-grid--4.tg-combos-featured,
  .tg-combos-featured.tg-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 599px) {
  .tg-grid.tg-grid--4.tg-combos-featured,
  .tg-combos-featured.tg-grid--4,
  .tg-product-grid.tg-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Featured COMBO 5 — compact horizontal, not mega red */
.tg-combos-pick {
  display: grid;
  grid-template-columns: 1fr;
}
.tg-combos-pick .tg-card--pick,
.tg-combos-pick .tg-card--featured-pick {
  border-color: #C9DBF2 !important;
  background: #F3F8FD !important;
  box-shadow: var(--tg-shadow-soft, 0 4px 14px rgba(24,55,95,0.06)) !important;
}
@media (min-width: 768px) {
  .tg-combos-pick .tg-card--featured-pick,
  .tg-combos-pick .tg-card--pick.tg-card--featured-pick {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    grid-template-areas:
      "media body"
      "media body";
    align-items: stretch;
    gap: 0;
  }
  .tg-combos-pick .tg-card--featured-pick .tg-card__media {
    grid-area: media;
    width: 320px;
    max-width: 320px;
    aspect-ratio: 1 / 1 !important;
    min-height: 0 !important;
    align-self: center;
    margin: 1rem 0 1rem 1rem;
    border-radius: 14px;
    overflow: hidden;
  }
  .tg-combos-pick .tg-card--featured-pick .tg-combo-compose {
    display: none;
  }
  .tg-combos-pick .tg-card--featured-pick .tg-card__body {
    grid-area: body;
    padding: 1rem 1.15rem;
  }
}
@media (max-width: 767px) {
  /* t198: sole-row COMBO 5 — full-width square media on phone (desktop unchanged) */
  .tg-combos-pick .tg-card--featured-pick .tg-card__media,
  .tg-combos-pick .tg-card--pick.tg-card--featured-pick .tg-card__media {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    padding-bottom: 0 !important;
    aspect-ratio: 1 / 1 !important;
    margin: 0 !important;
    border-radius: 16px 16px 0 0 !important;
    box-shadow: none !important;
  }
  .tg-combos-pick .tg-card--featured-pick .tg-card__media img,
  .tg-combos-pick .tg-card--pick.tg-card--featured-pick .tg-card__media img {
    padding: 0.75rem !important;
  }
}

/* Override older red pick styles */
.tg-combos-pick .tg-card--pick {
  border-color: #C9DBF2;
  box-shadow: none;
}
@media (min-width: 900px) {
  .tg-combos-pick .tg-card--pick:not(.tg-card--featured-pick) {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .tg-combos-pick .tg-card--pick:not(.tg-card--featured-pick) .tg-card__media {
    aspect-ratio: 1 / 1 !important;
    min-height: 0 !important;
    margin: 0.85rem;
    border-radius: 12px;
  }
}

/* Category cards CTA */
.tg-cat-card__cta {
  display: none !important;
}
.tg-cat-card {
  transition: transform .2s ease, box-shadow .2s ease;
}
.tg-cat-card:hover {
  transform: translateY(-3px);
}

/* Taxonomy header */
.tg-tax-header {
  margin: 0 0 1rem;
}
.tg-tax-header__banner {
  border-radius: var(--tg-radius, 14px);
  overflow: hidden;
  background: #F7FAFD;
  margin-bottom: 0.85rem;
  aspect-ratio: 21 / 7;
  max-height: 220px;
}
.tg-tax-header__banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tg-tax-header__count {
  margin: 0;
  color: var(--tg-color-muted, #7A8798);
  font-size: var(--tg-fs-meta, 0.8125rem);
  font-weight: 600;
}

/* Shop toolbar + custom sort */
.tg-shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.75rem 0 1.15rem;
}
.tg-shop-toolbar .woocommerce-result-count {
  margin: 0;
  color: var(--tg-color-muted, #7A8798);
  font-size: var(--tg-fs-meta, 0.8125rem);
}
.tg-shop-toolbar .woocommerce-ordering {
  margin: 0;
  float: none;
}
.woocommerce .woocommerce-ordering select.orderby {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  border: 0 !important;
}
.tg-sort {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: min(100%, 240px);
}
.tg-sort__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  min-height: var(--tg-input-h, 48px);
  padding: 0 0.95rem;
  border: 1px solid var(--tg-color-border, #E3EAF3);
  border-radius: var(--tg-radius-sm, 8px);
  background: #fff;
  color: var(--tg-color-brand, #18375F);
  font-weight: 600;
  font-size: 0.875rem;
  box-shadow: var(--tg-shadow-soft, 0 4px 14px rgba(24,55,95,0.06));
  cursor: pointer;
}
.tg-sort__btn:hover,
.tg-sort.is-open .tg-sort__btn {
  border-color: var(--tg-color-button, #1769D2);
}
.tg-sort__icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  opacity: 0.75;
}
.tg-sort__label {
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tg-sort__chevron {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
  opacity: 0.55;
}
.tg-sort__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 40;
  display: none;
  padding: 0.4rem;
  border: 1px solid var(--tg-color-border, #E3EAF3);
  border-radius: var(--tg-radius-sm, 8px);
  background: #fff;
  box-shadow: var(--tg-shadow, 0 8px 24px rgba(24,55,95,0.08));
}
.tg-sort.is-open .tg-sort__menu { display: block; }
.tg-sort__option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.7rem 0.75rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--tg-color-brand, #18375F);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}
.tg-sort__option:hover,
.tg-sort__option.is-active {
  background: #EEF4FD;
  color: var(--tg-color-button, #1769D2);
  font-weight: 600;
}

/* Loop grid columns reinforce */
@media (min-width: 1024px) {
  .woocommerce ul.products.columns-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.15rem;
  }
  .woocommerce ul.products.columns-4 li.product {
    width: auto !important;
    margin: 0 !important;
    float: none !important;
  }
}
@media (max-width: 1023px) and (min-width: 600px) {
  .woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
  }
  .woocommerce ul.products li.product {
    width: auto !important;
    margin: 0 !important;
    float: none !important;
  }
}
@media (max-width: 599px) {
  .woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }
  .woocommerce ul.products li.product {
    width: auto !important;
    margin: 0 !important;
    float: none !important;
  }
}

.tg-rating {
  margin: 0.1rem 0;
}

/* Force true 1:1 media boxes (WC img height:auto was stretching anchors) */
.tg-card__media,
.woocommerce ul.products li.product .tg-card__media,
.tg-card--combo .tg-card__media,
.woocommerce ul.products li.product.tg-card--combo .tg-card__media {
  position: relative !important;
  display: block !important;
  aspect-ratio: 1 / 1 !important;
  width: 100%;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: hidden !important;
  background: #F7FAFD;
}
.tg-card__media img,
.woocommerce ul.products li.product .tg-card__media img,
.woocommerce ul.products li.product a img,
.tg-card--combo .tg-card__media img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0.55rem !important;
  box-sizing: border-box !important;
  object-fit: contain !important;
  object-position: center !important;
}
/* Featured pick — larger desktop media (t201) */
@media (min-width: 768px) {
  .tg-combos-pick .tg-card--featured-pick .tg-card__media {
    width: 320px !important;
    max-width: 320px !important;
    height: 320px !important;
    aspect-ratio: 1 / 1 !important;
  }
}

/* Square media: padding-bottom lock beats WC whitespace strut in <a> */
.tg-card__media,
.woocommerce ul.products li.product .tg-card__media {
  font-size: 0 !important;
  line-height: 0 !important;
  height: 0 !important;
  padding-bottom: 100% !important;
  aspect-ratio: auto !important;
}
.tg-card__media > *,
.woocommerce ul.products li.product .tg-card__media > * {
  font-size: 0.875rem;
  line-height: 1.2;
}
/* Featured pick: explicit square, not padding-bottom percent of wide card */
@media (min-width: 768px) {
  .tg-combos-pick .tg-card--featured-pick .tg-card__media,
  .tg-combos-pick .tg-card--pick.tg-card--featured-pick .tg-card__media {
    height: 320px !important;
    padding-bottom: 0 !important;
    width: 320px !important;
    max-width: 320px !important;
  }
}
@media (max-width: 767px) {
  /* t198: sole-row COMBO 5 — full-width square media on phone (desktop unchanged) */
  .tg-combos-pick .tg-card--featured-pick .tg-card__media,
  .tg-combos-pick .tg-card--pick.tg-card--featured-pick .tg-card__media {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    padding-bottom: 0 !important;
    aspect-ratio: 1 / 1 !important;
    margin: 0 !important;
    border-radius: 16px 16px 0 0 !important;
    box-shadow: none !important;
  }
  .tg-combos-pick .tg-card--featured-pick .tg-card__media img,
  .tg-combos-pick .tg-card--pick.tg-card--featured-pick .tg-card__media img {
    padding: 0.75rem !important;
  }
}

/* Media link is image-only now — do NOT flex-grow (legacy LoopProduct-link rule) */
.woocommerce ul.products li.product > a.woocommerce-LoopProduct-link.tg-card__media,
.woocommerce ul.products li.product > a.woocommerce-loop-product__link.tg-card__media,
.woocommerce ul.products li.product > a.tg-card__media {
  flex: 0 0 auto !important;
  display: block !important;
  width: 100% !important;
}

.tg-card__title,
.woocommerce ul.products li.product.tg-card--loop .woocommerce-loop-product__title {
  -webkit-line-clamp: 2 !important;
  line-clamp: 2 !important;
  min-height: calc(1.35em * 2) !important;
}


/* Phase 2fix: COMBO 5 featured card — larger media, balanced row */
.tg-combos-pick {
  margin-top: 1.25rem;
}
.tg-combos-pick .tg-card--featured-pick {
  border: 1px solid #C9DBF2 !important;
  background: linear-gradient(90deg, #F3F8FD 0%, #FFFFFF 42%) !important;
  border-radius: 16px !important;
  overflow: hidden;
}
@media (min-width: 768px) {
  .tg-combos-pick .tg-card--featured-pick,
  .tg-combos-pick .tg-card--pick.tg-card--featured-pick {
    display: grid !important;
    grid-template-columns: minmax(300px, 340px) minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 0 !important;
    min-height: 360px;
  }
  .tg-combos-pick .tg-card--featured-pick .tg-card__media,
  .tg-combos-pick .tg-card--pick.tg-card--featured-pick .tg-card__media {
    width: 320px !important;
    max-width: 320px !important;
    height: 320px !important;
    padding-bottom: 0 !important;
    margin: 1.15rem 0 1.15rem 1.15rem !important;
    border-radius: 14px !important;
    background: #fff;
    box-shadow: 0 4px 14px rgba(24,55,95,0.06);
  }
  .tg-combos-pick .tg-card--featured-pick .tg-card__body {
    padding: 1.25rem 1.5rem 1.25rem 1.1rem !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
  }
  .tg-combos-pick .tg-card--featured-pick .tg-card__footer {
    margin-top: 0.75rem !important;
    max-width: 420px;
  }
  .tg-combos-pick .tg-card--featured-pick .tg-card__title {
    font-size: 1.15rem !important;
  }
  .tg-combos-pick .tg-card--featured-pick .tg-card__price,
  .tg-combos-pick .tg-card--featured-pick .tg-price__amount {
    font-size: 1.4rem !important;
  }
}
@media (max-width: 767px) {
  /* t198: enlarge sole-row COMBO 5 media on phone; desktop >=768 untouched */
  .tg-combos-pick .tg-card--featured-pick .tg-card__media,
  .tg-combos-pick .tg-card--pick.tg-card--featured-pick .tg-card__media {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    padding-bottom: 0 !important;
    aspect-ratio: 1 / 1 !important;
    margin: 0 !important;
    border-radius: 16px 16px 0 0 !important;
    box-shadow: none !important;
  }
  .tg-combos-pick .tg-card--featured-pick .tg-card__media img,
  .tg-combos-pick .tg-card--pick.tg-card--featured-pick .tg-card__media img {
    padding: 0.75rem !important;
  }
  .tg-combos-pick .tg-card--featured-pick .tg-card__footer {
    max-width: none;
  }
}

/* Phase4 v3-fix2: clearer sale original-price strikethrough */
.tg-card__price del,
.tg-card__price del .amount,
.tg-card__price .tg-price__was,
.tg-card__price .tg-price__was .amount,
.tg-price__was,
.tg-price__was .amount,
.woocommerce ul.products li.product .price del,
.woocommerce ul.products li.product .price del .amount,
.related.products .price del,
.related.products .price del .amount,
.tg-related .price del,
.tg-related .price del .amount,
#bestsellers .tg-card__price del,
#bestsellers .tg-card__price del .amount,
#combos .tg-card__price del,
#combos .tg-card__price del .amount {
  text-decoration: line-through !important;
  text-decoration-thickness: 2px !important;
  text-decoration-color: currentColor !important;
  text-decoration-skip-ink: none;
  -webkit-text-decoration-line: line-through;
  -webkit-text-decoration-thickness: 2px;
  opacity: 1 !important;
  color: #6B7A8F !important;
  font-weight: 600 !important;
}

/* 1.14.9: ONE centred strike line on the original price.
   The line is drawn by <del> / .tg-price__was only; inner amount spans inherit its size
   (a larger inner .amount drew a second, offset line). */
.tg-card__price del .amount,
.tg-card__price del .woocommerce-Price-amount,
.tg-card__price .tg-price__was .amount,
.tg-price__was .amount,
.price del .amount,
del .woocommerce-Price-amount,
del .woocommerce-Price-currencySymbol,
.tg-price__was .woocommerce-Price-currencySymbol {
  text-decoration: none !important;
  -webkit-text-decoration-line: none;
  font-size: inherit !important;
  line-height: inherit;
}
.price ins,
.tg-price ins,
.tg-card__price ins { text-decoration: none !important; }

/* ========== UI mobile Combo cards — Scheme A (t191) ========== */

.tg-card__combo-label {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 22px;
  padding: 0 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  background: #EEF4FB;
  color: var(--tg-color-brand, #18375F);
  border: 1px solid #D7E4F5;
}

.tg-card__badge--combo {
  /* mobile Scheme A: hide on-image COMBO; desktop restores below */
  display: none !important;
}
@media (min-width: 768px) {
  .tg-card--combo .tg-card__badge--combo,
  .woocommerce ul.products li.product.tg-card--combo .tg-card__badge--combo {
    display: inline-flex !important;
    top: 0.55rem;
    left: 0.55rem;
    right: auto;
    background: var(--tg-color-brand, #18375F);
    color: #fff;
    border: 0;
  }
  .tg-card--combo .tg-card__combo-label,
  .woocommerce ul.products li.product.tg-card--combo .tg-card__combo-label {
    display: none !important;
  }
}

.tg-card__badge--save {
  left: auto;
  right: 0.55rem;
  top: 0.55rem;
  font-size: 0.75rem;
  padding: 0 0.55rem;
  min-height: 22px;
  line-height: 1.2;
}

.tg-card__compose-text,
.tg-card--combo .tg-card__compose-text {
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.tg-card--combo .tg-card__price.tg-price--sale .tg-price__amount,
.tg-card--combo .tg-card__price.tg-price--sale .tg-price__amount .amount,
.woocommerce ul.products li.product.tg-card--combo .tg-card__price.tg-price--sale .tg-price__amount,
.woocommerce ul.products li.product.tg-card--combo .tg-card__price.tg-price--sale .amount {
  color: var(--tg-color-sale, #D92D35);
  font-weight: 800;
}

.tg-card-actions {
  gap: 10px;
}
.tg-card-actions .tg-btn,
.tg-card-actions a.button,
.tg-card-actions .button {
  min-height: 42px;
  height: 42px;
  padding: 0 14px !important;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 22px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 767px) {
  .tg-card--combo .tg-card__body,
  .woocommerce ul.products li.product.tg-card--combo .tg-card__body,
  #combos .tg-card__body,
  .tg-combos-featured .tg-card__body,
  .tg-combos-pick .tg-card__body {
    padding: 0.85rem 0.8rem 1rem;
    gap: 0.4rem;
  }

  .tg-card--combo .tg-card__combo-label,
  .woocommerce ul.products li.product.tg-card--combo .tg-card__combo-label {
    font-size: 0.75rem;
    padding: 0 8px;
    min-height: 20px;
  }

  .tg-card--combo .tg-card__title,
  .woocommerce ul.products li.product.tg-card--combo .tg-card__title,
  .woocommerce ul.products li.product.tg-card--combo .woocommerce-loop-product__title,
  #combos .tg-card__title {
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.3;
    min-height: 0;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .tg-card--combo .tg-card__compose-text,
  #combos .tg-card__compose-text {
    font-size: 0.75rem;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    margin: 0;
  }

  .tg-card--combo .tg-card__price.tg-price--sale .tg-price__amount,
  .tg-card--combo .tg-card__price.tg-price--sale .tg-price__amount .amount,
  .woocommerce ul.products li.product.tg-card--combo .tg-card__price.tg-price--sale .amount,
  #combos .tg-card__price .amount,
  #combos .tg-price__amount,
  #combos .tg-price__amount .amount {
    font-size: 1.125rem;
    font-weight: 800;
  }

  .tg-card--combo .tg-card__price .tg-price__was,
  .tg-card--combo .tg-card__price .tg-price__was .amount,
  #combos .tg-price__was,
  #combos .tg-price__was .amount {
    font-size: 0.75rem !important;
    display: block;
    margin-top: 0.15rem;
  }

  .tg-card--combo .tg-combo-compose,
  .woocommerce ul.products li.product.tg-card--combo .tg-combo-compose {
    padding: 0.3rem 0.65rem;
    gap: 0.25rem;
  }
  .tg-card--combo .tg-combo-compose__item,
  .woocommerce ul.products li.product.tg-card--combo .tg-combo-compose__item {
    width: 28px;
    height: 28px;
    border-radius: 6px;
  }

  .tg-card--combo .tg-card__badge,
  .woocommerce ul.products li.product.tg-card--combo .tg-card__badge {
    font-size: 0.75rem;
    padding: 0 8px;
    top: 0.45rem;
    right: 0.45rem;
    left: auto;
  }

  .tg-card--combo .tg-card__footer,
  .woocommerce ul.products li.product.tg-card--combo .tg-card__footer,
  #combos .tg-card__footer {
    padding-top: 0.55rem;
    padding-bottom: 0.1rem;
  }

  /* All product cards (bestsellers / shop / category / combo): stack ATC+Detail on 2-col mobile */
  .tg-card-actions,
  .woocommerce ul.products li.product .tg-card-actions,
  #combos .tg-card-actions,
  .tg-combos-featured .tg-card-actions,
  .tg-combos-pick .tg-card-actions {
    grid-template-columns: 1fr !important;
    gap: 8px;
  }
  .tg-card-actions .tg-btn,
  .tg-card-actions a.button,
  .tg-card-actions .button,
  .woocommerce ul.products li.product .tg-card-actions .tg-btn,
  #combos .tg-card-actions .tg-btn {
    min-height: 42px;
    height: 42px;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0 14px !important;
    white-space: nowrap;
  }
}

@media (max-width: 375px) {
  .woocommerce ul.products,
  .tg-grid.tg-grid--4.tg-combos-featured,
  .tg-combos-featured.tg-grid--4,
  #combos .tg-grid--4,
  #combos .tg-grid {
    grid-template-columns: 1fr !important;
  }
  .woocommerce ul.products li.product {
    width: 100% !important;
    max-width: none !important;
    flex: 1 1 100% !important;
  }
  /* Single-column cards: side-by-side equal buttons again */
  .tg-card-actions,
  .woocommerce ul.products li.product .tg-card-actions,
  #combos .tg-card-actions {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px;
  }
}

@media (max-width: 360px) {
  .tg-card--combo .tg-card-actions,
  .woocommerce ul.products li.product.tg-card--combo .tg-card-actions,
  #combos .tg-card-actions,
  .tg-card-actions {
    grid-template-columns: 1fr !important;
    gap: 8px;
  }
  .tg-card-actions .tg-btn {
    font-size: 0.875rem !important;
    min-height: 40px;
    height: 40px;
  }
}

@media (min-width: 376px) and (max-width: 599px) {
  .woocommerce ul.products,
  .tg-grid.tg-grid--4.tg-combos-featured,
  .tg-combos-featured.tg-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}


/* ========== t210 Homepage reviews — Scheme C ========== */
/* t214: white elevated card shell (match .tg-brand-card), no blue wash */
/* t215: no outer .tg-home-rv padding — spacing lives in __shell */
.tg-home-rv {
  --tg-home-rv-bg0: #eef5fc;
  --tg-home-rv-bg1: #f8fbff;
  --tg-home-rv-ink: var(--tg-color-brand, #18375F);
  --tg-home-rv-muted: #7a8798;
  --tg-home-rv-blue: var(--tg-color-button, #1769D2);
  position: relative;
  background: transparent;
  overflow: visible;
}
.tg-home-rv .tg-container { position: relative; }
.tg-home-rv__shell {
  background: var(--tg-color-card, #fff);
  border: 1px solid var(--tg-color-border, #E3EAF3);
  border-radius: 16px;
  box-shadow: var(--tg-shadow-soft, 0 4px 14px rgba(24, 55, 95, 0.06));
  padding: clamp(1.25rem, 3vw, 2.5rem);
}
.tg-home-rv__head {
  position: relative;
  text-align: center;
  margin-bottom: 22px;
  padding-top: 4px;
}
.tg-home-rv__more {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--tg-home-rv-blue);
  text-decoration: none;
  white-space: nowrap;
}
.tg-home-rv__more:hover { text-decoration: underline; }
.tg-home-rv__logo {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}
.tg-home-rv__logo .custom-logo-link {
  display: inline-flex;
  line-height: 0;
}
.tg-home-rv__logo .custom-logo,
.tg-home-rv__logo img {
  height: 28px !important;
  width: auto !important;
  max-width: 160px;
  object-fit: contain;
}
.tg-home-rv__logo-text {
  color: var(--tg-color-logo-red, #E30613);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}
.tg-home-rv__logo-text sup { font-size: 0.55em; }
.tg-home-rv__title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 0 8px;
  color: var(--tg-home-rv-ink);
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 800;
  line-height: 1.25;
}
.tg-home-rv__laurel-wrap { display: inline-flex; align-items: center; color: var(--tg-home-rv-blue); opacity: 0.85; flex: 0 0 auto; }
.tg-home-rv__laurel { color: inherit; display: block; width: 26px; height: 42px; }
@media (max-width: 720px) { .tg-home-rv__laurel { width: 20px; height: 32px; } .tg-home-rv__title { gap: 8px; } }
.tg-home-rv__laurel-wrap--right { transform: scaleX(-1); }
.tg-home-rv__sub {
  margin: 0 auto;
  max-width: 640px;
  color: var(--tg-home-rv-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  padding: 0 12px;
}

.tg-home-rv__summary {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px 18px;
  background: #fff;
  border-radius: 999px;
  box-shadow: var(--tg-shadow-soft, 0 4px 14px rgba(24, 55, 95, 0.06));
  border: 1px solid rgba(24, 55, 95, 0.06);
  padding: 12px 22px;
  margin: 0 auto 26px;
  max-width: 720px;
  width: fit-content;
  min-height: 52px;
}
.tg-home-rv__summary-score {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: var(--tg-home-rv-ink);
  font-weight: 800;
}
.tg-home-rv__summary-num { font-size: 1.55rem; letter-spacing: -0.02em; }
.tg-home-rv__summary-den { font-size: 0.95rem; color: var(--tg-home-rv-muted); font-weight: 700; }
.tg-home-rv__stars {
  display: inline-flex;
  gap: 2px;
  color: var(--tg-color-star, #E9A323);
  font-size: 1rem;
  line-height: 1;
  letter-spacing: 0.02em;
}
.tg-home-rv__stars .is-off { color: #d5dde8; }
.tg-home-rv__summary-sep {
  width: 1px;
  height: 22px;
  background: #e3eaf3;
}
.tg-home-rv__summary-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--tg-home-rv-blue);
  font-size: 0.9rem;
  font-weight: 600;
}
.tg-home-rv__user-ico { flex: 0 0 auto; color: var(--tg-home-rv-blue); }

.tg-home-rv__viewport {
  overflow: hidden;
  margin: 0 -4px;
  padding: 4px;
}
.tg-home-rv__track {
  display: flex;
  gap: 16px;
  transition: transform 0.35s ease;
  will-change: transform;
}
.tg-home-rv__card {
  flex: 0 0 calc((100% - 32px) / 3);
  max-width: calc((100% - 32px) / 3);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(24, 55, 95, 0.06);
  box-shadow: var(--tg-shadow-soft, 0 4px 14px rgba(24, 55, 95, 0.06));
  padding: 18px 18px 14px;
  min-height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tg-home-rv__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(24, 55, 95, 0.12);
}
.tg-home-rv__card > .tg-home-rv__stars { margin-bottom: 10px; }
.tg-home-rv__quote {
  margin: 0;
  flex: 1 1 auto;
}
.tg-home-rv__quote p {
  margin: 0;
  color: #1a2332;
  font-size: 0.95rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}
.tg-home-rv__meta {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tg-home-rv__author {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--tg-home-rv-ink);
}
.tg-home-rv__date {
  font-size: 0.78rem;
  color: var(--tg-home-rv-muted);
}
.tg-home-rv__product {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #eef2f7;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  min-height: 48px;
}
.tg-home-rv__product:hover .tg-home-rv__product-name {
  color: var(--tg-home-rv-blue);
}
.tg-home-rv__product-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 8px;
  background: #f3f6fa;
  flex: 0 0 auto;
}
.tg-home-rv__product-text { min-width: 0; flex: 1 1 auto; }
.tg-home-rv__product-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--tg-home-rv-ink);
  line-height: 1.35;
  transition: color 0.15s ease;
}
.tg-home-rv__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}
.tg-home-rv__dots[hidden] { display: none !important; }
.tg-home-rv__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: #c5d3e6;
  cursor: pointer;
}
.tg-home-rv__dot.is-active { background: var(--tg-home-rv-blue); width: 18px; }
.tg-home-rv__empty {
  text-align: center;
  color: var(--tg-home-rv-muted);
  margin: 12px 0 0;
}

@media (max-width: 1024px) {
  .tg-home-rv__card {
    flex-basis: calc((100% - 16px) / 2);
    max-width: calc((100% - 16px) / 2);
  }
}
@media (max-width: 720px) {
  .tg-home-rv__shell { padding: 1.15rem 1rem 1.25rem; border-radius: 14px; }
  .tg-home-rv__more {
    position: static;
    display: inline-block;
    margin-bottom: 10px;
  }
  .tg-home-rv__head { padding-top: 0; }
  .tg-home-rv__summary {
    border-radius: 16px;
    width: 100%;
    max-width: none;
    justify-content: flex-start;
    padding: 14px 16px;
  }
  .tg-home-rv__summary-sep { display: none; }
  .tg-home-rv__viewport {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0;
    padding: 4px 0 8px;
    scroll-snap-type: x mandatory;
  }
  .tg-home-rv__viewport::-webkit-scrollbar { display: none; }
  .tg-home-rv__track {
    transform: none !important;
    width: max-content;
  }
  .tg-home-rv__card {
    flex-basis: min(86vw, 320px);
    max-width: min(86vw, 320px);
    scroll-snap-align: start;
  }
  .tg-home-rv__card:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tg-home-rv__track,
  .tg-home-rv__card { transition: none; }
}
