/*
 * Tata Garden – Shop Archive  v2.0
 * File: assets/css/shop.css
 */

/* ============================================================
   TOKEN NỘI BỘ
============================================================ */
:root {
  --tg-shop-sidebar-w: 260px;
  --tg-hero-r:         20px;
  --tg-card-r:         16px;
  --tg-ease:           cubic-bezier(.22,.68,0,1.2);
}

/* ============================================================
   PAGE BACKGROUND — trắng sạch, thoáng
============================================================ */
.tg-shop {
  background: var(--white);
  min-height: 100vh;
}

.tg-shop .tg-container {
  max-width: var(--tg-max-w);
  margin-inline: auto;
  padding-inline: 32px;
  width: 100%;
}

/* ============================================================
   BREADCRUMB — đẹp, căn trái, gọn
============================================================ */
.woocommerce-breadcrumb,
nav.woocommerce-breadcrumb {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  padding: 20px 32px 0 !important;
  max-width: var(--tg-max-w) !important;
  margin-inline: auto !important;
  font-size: 12px !important;
  color: var(--muted) !important;
  font-family: var(--tg-font-main) !important;
  background: none !important;
  text-align: left !important;
  justify-content: flex-start !important;
}
.woocommerce-breadcrumb a {
  color: var(--muted) !important;
  text-decoration: none !important;
  transition: color .2s !important;
}
.woocommerce-breadcrumb a:hover { color: var(--tg-main) !important; }
.woocommerce-breadcrumb .separator { opacity: .4 !important; }


/* ============================================================
   1. HERO BANNER
============================================================ */
.tg-shop-hero { padding: 20px 0 0; }

.tg-shop-hero__inner {
  position: relative;
  background:
    radial-gradient(ellipse at 70% -20%, rgba(90,170,42,.22), transparent 55%),
    linear-gradient(140deg, #1a7060 0%, #146653 50%, #0d4a3b 100%);
  border-radius: var(--tg-hero-r);
  padding: 56px 64px;
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 48px;
  align-items: center;
  overflow: visible;
  min-height: 300px;
}

/* subtle leaf-vein texture overlay */
.tg-shop-hero__inner::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--tg-hero-r);
  background-image: radial-gradient(circle, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  overflow: hidden;
}

.tg-shop-hero__content { position: relative; z-index: 2; }
.tg-shop-hero .tg-eyebrow {
  color: var(--tg-gold);
  margin-bottom: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.tg-shop-hero__title {
  font-family: var(--tg-font-main);
  font-size: clamp(28px, 3.2vw, 46px);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin: 0 0 14px;
}
.tg-shop-hero__desc {
  font-size: 14px;
  color: rgba(255,255,255,.58);
  line-height: 1.75;
  max-width: 420px;
  margin: 0 0 30px;
}

/* chips dark */
.tg-shop-chips { flex-wrap: wrap; display: flex; gap: 8px; }
.tg-shop-chips .tg-chip {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.72);
  font-size: 12px;
  padding: 6px 16px;
  border-radius: 100px;
  text-decoration: none;
  transition: all .2s ease;
  line-height: 1.4;
}
.tg-shop-chips .tg-chip:hover {
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.3);
  color: #fff;
}
.tg-shop-chips .tg-chip--active {
  background: var(--tg-accent);
  border-color: var(--tg-accent);
  color: #fff;
  font-weight: 600;
}

/* float images */
.tg-shop-hero__floats {
  position: relative; z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
  height: 100%;
  margin-bottom: -72px;
}
.tg-shop-hero__float { flex-shrink: 0; filter: drop-shadow(0 20px 48px rgba(0,0,0,.45)); }
.tg-shop-hero__float img { display: block; border-radius: 14px; object-fit: cover; border: 3px solid rgba(255,255,255,.1); }
.tg-shop-hero__float--1 { transform: rotate(-6deg) translateY(12px); }
.tg-shop-hero__float--1 img { width: 140px; height: 180px; }
.tg-shop-hero__float--2 { transform: rotate(1deg) translateY(-16px); z-index: 2; }
.tg-shop-hero__float--2 img { width: 160px; height: 210px; }
.tg-shop-hero__float--3 { transform: rotate(5deg) translateY(8px); }
.tg-shop-hero__float--3 img { width: 130px; height: 170px; }


/* ============================================================
   2. SHOP BODY — sidebar PHẢI + grid TRÁI
============================================================ */
.tg-shop-body {
  display: grid;
  grid-template-columns: 1fr var(--tg-shop-sidebar-w);
  gap: 40px;
  padding-top: 96px;
  align-items: start;
}

/* ── Sidebar (bên phải) ── */
.tg-shop-sidebar {
  min-width: 0;
  grid-column: 2;
  grid-row: 1;
}
.tg-shop-grid-wrap {
  grid-column: 1;
  grid-row: 1;
}

.tg-shop-sidebar__sticky {
  position: sticky;
  top: calc(var(--tg-header-h, 80px) + var(--tg-topbar-h, 0px) + 24px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tg-sidebar-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 11px 16px;
  border-radius: 10px;
  border: 1.5px solid rgba(20,102,83,.18);
  background: #fff;
  font-family: var(--tg-font-main);
  font-size: 13px;
  font-weight: 600;
  color: var(--tg-main);
  cursor: pointer;
  transition: all .2s ease;
}
.tg-sidebar-toggle:hover {
  background: rgba(20,102,83,.05);
  border-color: var(--tg-main);
}

.tg-sidebar-inner { display: flex; flex-direction: column; gap: 16px; }

/* widget chung */
.tg-sidebar-widget {
  background: #fff;
  border: 1.5px solid rgba(20,102,83,.1);
  border-radius: 16px;
  padding: 20px 20px 22px;
  box-shadow: 0 2px 12px rgba(13,74,59,.05);
  transition: box-shadow .2s ease;
}
.tg-sidebar-widget:hover {
  box-shadow: 0 4px 20px rgba(13,74,59,.09);
}
.tg-sidebar-widget__title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--tg-main);
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(20,102,83,.1);
  display: flex;
  align-items: center;
  gap: 8px;
}
.tg-sidebar-widget__title svg {
  width: 14px; height: 14px;
  flex-shrink: 0;
  opacity: .8;
}

/* category list với icon */
.tg-sidebar-cat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.tg-sidebar-cat-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13px;
  color: #3d524a;
  text-decoration: none;
  transition: all .18s ease;
  line-height: 1.35;
  border-left: 0px solid transparent;
}
.tg-sidebar-cat-list a .tg-cat-icon {
  width: 28px; height: 28px;
  background: rgba(20,102,83,.07);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all .18s ease;
}
.tg-sidebar-cat-list a .tg-cat-icon svg {
  width: 14px; height: 14px;
  stroke: var(--tg-main);
}
.tg-sidebar-cat-list a:hover { background: rgba(20,102,83,.06); color: var(--tg-main); }
.tg-sidebar-cat-list a:hover .tg-cat-icon { background: rgba(20,102,83,.14); }
.tg-sidebar-cat-list a.is-active {
  background: rgba(20,102,83,.1);
  color: var(--tg-main);
  font-weight: 700;
  border-left-color: var(--tg-main);
}
.tg-sidebar-cat-list a.is-active .tg-cat-icon { background: rgba(20,102,83,.18); }
.tg-cat-name { flex: 1; }
.tg-cat-count {
  font-size: 13px;
  color: var(--tg-main);
  background: rgba(20,102,83,.1);
  padding: 2px 8px;
  border-radius: 100px;
  flex-shrink: 0;
  font-weight: 600;
  margin-left: auto;
}

/* Tags */
.tg-sidebar-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tg-sidebar-tags .tg-tag {
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 100px;
  border: 1.5px solid rgba(20,102,83,.18);
  color: var(--tg-main);
  text-decoration: none;
  transition: all .18s ease;
  background: rgba(20,102,83,.04);
}
.tg-sidebar-tags .tg-tag:hover {
  background: var(--tg-main);
  color: #fff;
  border-color: var(--tg-main);
  transform: translateY(-1px);
}

/* Price filter */
.tg-sidebar-widget .price_slider_wrapper { margin: 0; }
.tg-sidebar-widget .price_slider_amount {
  margin-top: 16px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.tg-sidebar-widget .price_slider_amount button {
  background: var(--tg-main); color: #fff; border: none;
  padding: 8px 18px; border-radius: 100px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: all .18s ease;
  font-family: var(--tg-font-main);
}
.tg-sidebar-widget .price_slider_amount button:hover { background: var(--g-dark); transform: translateY(-1px); }
.tg-sidebar-widget .price_slider_amount .price_label { font-size: 12px; color: var(--tg-muted); }
.tg-sidebar-widget .ui-slider-horizontal {
  height: 5px; background: rgba(28,38,33,.1); border-radius: 100px; border: none; margin: 14px 0;
}
.tg-sidebar-widget .ui-slider-range { background: var(--tg-main); border-radius: 100px; }
.tg-sidebar-widget .ui-slider-handle {
  width: 18px; height: 18px; background: var(--tg-main);
  border: 2.5px solid #fff; border-radius: 50%; top: -7px;
  box-shadow: 0 2px 8px rgba(13,74,59,.35); cursor: grab;
}

/* ── Sidebar Contact Banner ── */
.tg-sidebar-contact-banner {
  background:
    radial-gradient(ellipse at 20% 80%, rgba(90,170,42,.25), transparent 60%),
    linear-gradient(145deg, #1a7060, #0d4a3b);
  border-radius: 16px;
  padding: 22px 20px;
  position: relative;
  overflow: hidden;
}
.tg-sidebar-contact-banner::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 18px 18px;
  pointer-events: none;
}
.tg-sidebar-contact-banner__leaf {
  position: absolute; top: -10px; right: -10px;
  width: 80px; height: 80px;
  opacity: .12;
}
.tg-sidebar-contact-banner__label {
  font-size: 10px; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--tg-gold);
  margin: 0 0 8px; position: relative; z-index: 2;
}
.tg-sidebar-contact-banner__title {
  font-family: var(--tg-font-main);
  font-size: 16px; font-weight: 800; color: #fff;
  line-height: 1.3; margin: 0 0 8px;
  position: relative; z-index: 2;
}
.tg-sidebar-contact-banner__desc {
  font-size: 12px; color: rgba(255,255,255,.6);
  line-height: 1.6; margin: 0 0 16px;
  position: relative; z-index: 2;
}
.tg-sidebar-contact-banner__btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 18px; border-radius: 100px;
  background: var(--tg-accent); color: #fff;
  font-family: var(--tg-font-main); font-size: 12px; font-weight: 700;
  text-decoration: none; border: none; cursor: pointer;
  transition: all .2s ease; position: relative; z-index: 2;
}
.tg-sidebar-contact-banner__btn:hover {
  background: #4d9424;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(90,170,42,.35);
  color: #fff;
}
.tg-sidebar-contact-banner__btn svg {
  width: 13px; height: 13px; transition: transform .2s ease;
}
.tg-sidebar-contact-banner__btn:hover svg { transform: translateX(3px); }


/* ============================================================
   TOOLBAR — count đẹp + sort dropdown cải tiến
============================================================ */
.tg-shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

/* Result count — badge style */
.tg-shop-count-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tg-shop-count,
.tg-shop-count p,
.tg-shop-count .woocommerce-result-count {
  font-size: 13px !important;
  color: var(--muted) !important;
  margin: 0 !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  display: inline !important;
}
.tg-result-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(20,102,83,.07);
  border: 1.5px solid rgba(20,102,83,.14);
  border-radius: 100px;
  padding: 6px 14px 6px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--tg-main);
  font-family: var(--tg-font-main);
}
.tg-result-badge svg { width: 13px; height: 13px; flex-shrink: 0; }
.tg-result-badge__num {
  font-size: 14px; font-weight: 800; color: var(--tg-main);
}
.tg-result-badge__label { color: var(--muted); font-weight: 500; }

/* Sort dropdown — redesigned */
.tg-shop-sort { position: relative; }
.tg-shop-sort select,
.tg-shop-sort .woocommerce-ordering select {
  padding: 9px 40px 9px 14px !important;
  border-radius: 10px !important;
  border: 1.5px solid rgba(20,102,83,.18) !important;
  font-family: var(--tg-font-main) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--tg-charcoal) !important;
  background-color: #fff !important;
  cursor: pointer !important;
  outline: none !important;
  transition: all .2s ease !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%23146653' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  min-width: 220px !important;
  box-shadow: 0 1px 6px rgba(20,102,83,.07) !important;
}
.tg-shop-sort select:focus,
.tg-shop-sort .woocommerce-ordering select:focus {
  border-color: var(--tg-main) !important;
  box-shadow: 0 0 0 3px rgba(20,102,83,.1) !important;
}
.tg-shop-sort select:hover,
.tg-shop-sort .woocommerce-ordering select:hover {
  border-color: var(--tg-main) !important;
}
.woocommerce-ordering { margin: 0 !important; }


/* ============================================================
   PRODUCT GRID + CARDS
============================================================ */
.tg-product-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.tg-product-card {
  background: #fff;
  border-radius: var(--tg-card-r);
  border: 1.5px solid rgba(20,102,83,.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all .28s var(--tg-ease);
  position: relative;
}
.tg-product-card:hover {
  box-shadow: 0 12px 40px rgba(13,74,59,.14);
  transform: translateY(-6px);
  border-color: rgba(20,102,83,.2);
}

/* Quick-view overlay on hover */
.tg-product-card__img-wrap {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1/1;
  background: #f5f3ee;
}
.tg-product-card__img-wrap img {
  object-fit: cover;
  padding: 0;
}
.tg-product-card:hover .tg-product-card__img-wrap img { transform: scale(1.07); }

/* hover overlay */
.tg-product-card__img-wrap::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(13,61,46,.0);
  transition: background .3s ease;
  pointer-events: none;
}
.tg-product-card:hover .tg-product-card__img-wrap::after {
  background: rgba(13,61,46,.04);
}

.tg-product-card__no-img {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: rgba(28,38,33,.15);
}

/* Badge */
.tg-product-badge {
  position: absolute; top: 10px; left: 10px;
  padding: 4px 10px; border-radius: 100px;
  font-size: 10px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; z-index: 2;
}
.tg-product-badge--sale { background: #e53935; color: #fff; }

/* Body */
.tg-product-card__body {
  padding: 16px 16px 18px;
  display: flex; flex-direction: column; flex: 1; gap: 8px;
}
.tg-product-card__title {
  font-size: 13px; font-weight: 600;
  color: var(--tg-charcoal); line-height: 1.5;
  text-decoration: none;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  transition: color .18s ease;
}
.tg-product-card__title:hover { color: var(--tg-main); }

.tg-product-card__price {
  font-size: 15px; font-weight: 800; color: var(--tg-main);
  margin-top: auto;
}
.tg-product-card__price del { font-size: 11px; color: var(--tg-muted); font-weight: 400; margin-right: 4px; }
.tg-product-card__price ins { text-decoration: none; }

/* Actions — 2 nút độc lập + chi tiết outline */
.tg-product-card__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(20,102,83,.08);
}

.tg-product-card__btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* Nút "Thêm vào giỏ" — xanh đậm */
.tg-product-card__actions .button,
.tg-product-card__actions .add_to_cart_button,
.tg-product-card__actions .single_add_to_cart_button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 9px 10px !important;
  border-radius: 10px !important;
  background: var(--tg-main) !important;
  color: #fff !important;
  font-family: var(--tg-font-main) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  border: none !important;
  cursor: pointer !important;
  transition: all .2s ease !important;
  white-space: nowrap !important;
  width: 100% !important;
  box-shadow: none !important;
  text-shadow: none !important;
  line-height: 1.3 !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}
.tg-product-card__actions .button::before,
.tg-product-card__actions .add_to_cart_button::before {
  content: '';
  display: inline-block;
  width: 13px; height: 13px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2L3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z'%3E%3C/path%3E%3Cline x1='3' y1='6' x2='21' y2='6'%3E%3C/line%3E%3Cpath d='M16 10a4 4 0 0 1-8 0'%3E%3C/path%3E%3C/svg%3E") no-repeat center/contain;
  flex-shrink: 0;
}
.tg-product-card__actions .button:hover,
.tg-product-card__actions .add_to_cart_button:hover {
  background: var(--g-dark) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 14px rgba(13,74,59,.3) !important;
}
.tg-product-card__actions .button:active,
.tg-product-card__actions .add_to_cart_button:active {
  transform: translateY(0) !important;
  box-shadow: none !important;
}

/* Nút "MUA NGAY" — xanh lá nhạt, outline style */
.tg-product-card__actions .wsb-button,
.tg-product-card__actions [class*="wsb-button"],
.tg-product-card__actions [class*="buy-now"],
.tg-product-card__actions [name*="buy-now"],
.tg-product-card__actions [name*="wsb"] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 9px 10px !important;
  border-radius: 10px !important;
  background: transparent !important;
  color: var(--tg-main) !important;
  border: 1.5px solid var(--tg-main) !important;
  font-family: var(--tg-font-main) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: all .2s ease !important;
  white-space: nowrap !important;
  width: 100% !important;
  box-shadow: none !important;
  text-shadow: none !important;
  line-height: 1.3 !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}
.tg-product-card__actions .wsb-button:hover,
.tg-product-card__actions [class*="buy-now"]:hover {
  background: var(--tg-main) !important;
  color: #fff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 14px rgba(13,74,59,.25) !important;
}

/* Nút "Chi tiết" — full width, ghost */
.tg-product-card__detail {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  padding: 8px 12px !important;
  border-radius: 10px !important;
  border: 1.5px solid rgba(20,102,83,.18) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  color: var(--tg-main) !important;
  text-decoration: none !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background: transparent !important;
  transition: all .18s ease !important;
}
.tg-product-card__detail:hover {
  background: rgba(20,102,83,.07) !important;
  border-color: var(--tg-main) !important;
  color: var(--tg-main) !important;
}

/* ============================================================
   PAGINATION HOVER — fix border mất khi hover
============================================================ */
.tg-shop-pagination {
    margin-top: 48px;
    display: flex;
    justify-content: center;
}

.tg-shop-pagination .woocommerce-pagination ul li {
  position: relative !important;
}

.tg-shop-pagination .woocommerce-pagination ul li a,
.tg-shop-pagination .woocommerce-pagination ul li span,
nav.woocommerce-pagination ul li a,
nav.woocommerce-pagination ul li span {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 40px !important;
  height: 40px !important;
  padding: 0 10px !important;
  margin: 2px !important;
  border-radius: 10px !important;
  border: 1.5px solid rgba(28,38,33,.12) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #3d524a !important;
  text-decoration: none !important;
  background: #fff !important;
  font-family: var(--tg-font-main) !important;
  line-height: 1 !important;
  /* KHÔNG dùng transition trên border để tránh flash */
  transition: color .2s ease, background .2s ease, box-shadow .2s ease !important;
  position: relative !important;
  z-index: 0 !important;
}

.tg-shop-pagination .woocommerce-pagination ul li a:hover,
nav.woocommerce-pagination ul li a:hover {
  border: 1.5px solid var(--tg-main) !important;
  color: var(--tg-main) !important;
  background: rgba(20,102,83,.05) !important;
  box-shadow: 0 4px 10px rgba(20,102,83,.12) !important;
  z-index: 2 !important;
  /* bỏ transform hoàn toàn — đây là nguyên nhân border mất */
  transform: none !important;
}

.tg-shop-pagination .woocommerce-pagination ul li span.current {
  background: var(--tg-main) !important;
  border: 1.5px solid var(--tg-main) !important;
  color: #fff !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 14px rgba(13,74,59,.28) !important;
  z-index: 1 !important;
}

/* Dấu ... */
.tg-shop-pagination .woocommerce-pagination ul li span.page-numbers:not(.current),
nav.woocommerce-pagination ul li span.page-numbers:not(.current) {
  background: transparent !important;
  border-color: transparent !important;
  color: var(--muted) !important;
}

/* Mũi tên prev/next */
.tg-shop-pagination .woocommerce-pagination ul li a.next,
.tg-shop-pagination .woocommerce-pagination ul li a.prev,
nav.woocommerce-pagination ul li a.next,
nav.woocommerce-pagination ul li a.prev {
  font-size: 16px !important;
  font-weight: 400 !important;
  color: var(--tg-main) !important;
  border-color: rgba(20,102,83,.2) !important;
}

/* ============================================================
   ENTERPRISE B2B SECTION
============================================================ */
.tg-enterprise-section {
  margin-top: 72px;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(ellipse at 90% 50%, rgba(90,170,42,.18), transparent 55%),
    linear-gradient(135deg, #0d4a3b 0%, #1a7060 60%, #2a8060 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 280px;
}

.tg-enterprise-section::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

/* decorative leaf shape */
.tg-enterprise-section::after {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0; width: 50%;
  background: rgba(255,255,255,.02);
  clip-path: polygon(12% 0%, 100% 0%, 100% 100%, 0% 100%);
  pointer-events: none;
}

.tg-enterprise__content {
  padding: 48px 56px;
  position: relative; z-index: 2;
  display: flex; flex-direction: column; justify-content: center; gap: 0;
}
.tg-enterprise__eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: .22em;
  text-transform: uppercase; color: var(--tg-gold);
  margin: 0 0 12px;
  display: flex; align-items: center; gap: 8px;
}
.tg-enterprise__eyebrow::before {
  content: '';
  display: block; width: 20px; height: 2px;
  background: var(--tg-gold);
  border-radius: 2px;
}
.tg-enterprise__title {
  font-family: var(--tg-font-main);
  font-size: clamp(22px, 2.4vw, 34px);
  font-weight: 800; color: #fff;
  line-height: 1.15; letter-spacing: -.025em;
  margin: 0 0 14px;
}
.tg-enterprise__desc {
  font-size: 14px; color: rgba(255,255,255,.62);
  line-height: 1.7; margin: 0 0 28px; max-width: 380px;
}
.tg-enterprise__features {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px;
}
.tg-enterprise__feat {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: rgba(255,255,255,.75);
  font-weight: 500;
}
.tg-enterprise__feat svg { width: 14px; height: 14px; stroke: var(--tg-gold); flex-shrink: 0; }
.tg-enterprise__btns { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.tg-enterprise__btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: 100px;
  font-family: var(--tg-font-main); font-size: 13px; font-weight: 700;
  text-decoration: none; border: none; cursor: pointer;
  transition: all .22s ease;
}
.tg-enterprise__btn--primary {
  background: var(--tg-accent); color: #fff;
}
.tg-enterprise__btn--primary:hover {
  background: #4d9424; color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(90,170,42,.4);
}
.tg-enterprise__btn--secondary {
  background: rgba(255,255,255,.1);
  border: 1.5px solid rgba(255,255,255,.2) !important;
  color: #fff;
}
.tg-enterprise__btn--secondary:hover {
  background: rgba(255,255,255,.18); color: #fff;
  transform: translateY(-2px);
}
.tg-enterprise__btn svg { width: 14px; height: 14px; transition: transform .2s ease; }
.tg-enterprise__btn:hover svg { transform: translateX(3px); }

/* visual side */
.tg-enterprise__visual {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  padding: 32px 40px;
  gap: 16px;
}
.tg-enterprise__img-stack {
  display: flex; align-items: flex-end; gap: 14px;
}
.tg-enterprise__img-item {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .3s ease;
}
.tg-enterprise__img-item:nth-child(1) { width: 110px; height: 140px; transform: rotate(-4deg) translateY(10px); }
.tg-enterprise__img-item:nth-child(2) { width: 130px; height: 165px; transform: rotate(1deg); z-index: 2; }
.tg-enterprise__img-item:nth-child(3) { width: 100px; height: 130px; transform: rotate(5deg) translateY(14px); }
.tg-enterprise__img-item img { width: 100%; height: 100%; object-fit: cover; }
.tg-enterprise__img-item--placeholder {
  display: flex; align-items: center; justify-content: center;
  background: rgba(90,170,42,.1);
}
.tg-enterprise__img-item--placeholder svg { width: 36px; height: 36px; stroke: rgba(90,170,42,.6); }

/* stats bar */
.tg-enterprise__stats {
  display: flex; flex-direction: column; gap: 12px; margin-left: 16px;
}
.tg-enterprise__stat {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  padding: 12px 16px;
  text-align: center;
  backdrop-filter: blur(10px);
}
.tg-enterprise__stat-num {
  font-size: 22px; font-weight: 800; color: #fff;
  font-family: var(--tg-font-main);
  line-height: 1;
}
.tg-enterprise__stat-label {
  font-size: 10px; color: rgba(255,255,255,.5);
  margin-top: 4px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .1em;
}


/* ============================================================
   RELATED PRODUCTS + RECENTLY VIEWED
============================================================ */
.tg-shop-section { margin-top: 72px; }
.tg-shop-section__header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px; padding-bottom: 16px;
  border-bottom: 2px solid rgba(20,102,83,.1);
}
.tg-shop-section__title {
  font-family: var(--tg-font-main);
  font-size: 19px; font-weight: 800;
  color: var(--tg-charcoal);
  display: flex; align-items: center; gap: 10px;
  letter-spacing: -.02em;
}
.tg-shop-section__title svg { width: 20px; height: 20px; color: var(--tg-main); flex-shrink: 0; }
.tg-shop-section__link {
  font-size: 13px; font-weight: 600; color: var(--tg-main);
  text-decoration: none; transition: all .18s ease;
  display: flex; align-items: center; gap: 4px;
}
.tg-shop-section__link:hover { color: var(--tg-accent); gap: 8px; }

.tg-product-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }

.tg-product-mini {
  background: #fff; border-radius: 14px;
  border: 1.5px solid rgba(20,102,83,.08);
  overflow: hidden; transition: all .28s var(--tg-ease);
  text-decoration: none; color: inherit; display: flex; flex-direction: column;
}
.tg-product-mini:hover {
  box-shadow: 0 8px 24px rgba(13,74,59,.12);
  transform: translateY(-4px);
  border-color: rgba(20,102,83,.2);
}
.tg-product-mini__img {
  aspect-ratio: 1/1; overflow: hidden; background: #f5f3ee;
}
.tg-product-mini__img img {
  width: 100%; height: 100%; object-fit: contain; transition: transform .4s ease;
}
.tg-product-mini:hover .tg-product-mini__img img { transform: scale(1.06); }
.tg-product-mini__body { padding: 10px 12px 14px; }
.tg-product-mini__title {
  font-size: 12px; font-weight: 600; color: var(--tg-charcoal);
  line-height: 1.4; margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tg-product-mini__price { font-size: 13px; font-weight: 800; color: var(--tg-main); }
.tg-product-mini__price del { font-size: 10px; color: var(--tg-muted); font-weight: 400; margin-right: 3px; }
.tg-product-mini__price ins { text-decoration: none; }

.tg-product-mini--viewed::after {
  content: '● Đã xem';
  display: block; font-size: 10px; color: var(--tg-muted); margin-top: 4px;
}


/* ============================================================
   NEWSLETTER
============================================================ */
.tg-shop-nl { margin-top: 72px; margin-bottom: 56px; }
.tg-shop-nl__inner {
  background:
    radial-gradient(ellipse at 12% 65%, rgba(90,170,42,.16), transparent 50%),
    linear-gradient(140deg, #1a7060, #0d4a3b);
  border-radius: var(--tg-hero-r);
  padding: 56px 64px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
}
.tg-shop-nl .tg-eyebrow { color: var(--tg-gold); }
.tg-shop-nl__title {
  font-family: var(--tg-font-main);
  font-size: clamp(20px, 2.2vw, 30px); font-weight: 800; color: #fff;
  line-height: 1.15; margin: 0 0 10px; letter-spacing: -.02em;
}
.tg-shop-nl__desc { font-size: 14px; color: rgba(255,255,255,.56); line-height: 1.75; margin: 0; }
.tg-nl-form { display: flex; flex-direction: column; gap: 10px; }
.tg-nl-input {
  width: 100%;
  background: rgba(255,255,255,.08);
  border: 1.5px solid rgba(255,255,255,.14);
  border-radius: 10px; padding: 12px 16px;
  color: #fff; font-family: var(--tg-font-main); font-size: 13px;
  outline: none; transition: all .2s ease;
}
.tg-nl-input::placeholder { color: rgba(255,255,255,.36); }
.tg-nl-input:focus { border-color: var(--tg-accent); box-shadow: 0 0 0 3px rgba(90,170,42,.15); }
.tg-nl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 100px;
  background: var(--tg-accent); color: #fff;
  font-family: var(--tg-font-main); font-size: 13px; font-weight: 700;
  border: none; cursor: pointer; transition: all .2s ease;
}
.tg-nl-btn:hover { background: #4d9424; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(90,170,42,.35); }
.tg-shop-nl__note { font-size: 11px; color: rgba(255,255,255,.3); margin: 6px 0 0; text-align: center; }


/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 1200px) {
  .tg-product-grid { grid-template-columns: repeat(2, 1fr); }
  .tg-product-row  { grid-template-columns: repeat(4, 1fr); }
  .tg-enterprise-section { grid-template-columns: 1fr; }
  .tg-enterprise__visual { display: none; }
  .tg-enterprise__content { padding: 40px 40px; }
}
@media (max-width: 1024px) {
  .tg-shop-hero__inner { grid-template-columns: 1fr; padding: 44px 44px 72px; }
  .tg-shop-hero__floats { justify-content: center; margin-bottom: -60px; }
  .tg-shop-body { grid-template-columns: 1fr 220px; gap: 28px; }
  .tg-shop-nl__inner { padding: 44px; gap: 40px; }
  .tg-product-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .tg-shop .tg-container { padding-inline: 20px; }
  .tg-shop-body { grid-template-columns: 1fr; padding-top: 80px; }
  .tg-shop-sidebar { grid-column: 1; grid-row: 2; }
  .tg-shop-grid-wrap { grid-column: 1; grid-row: 1; }
  .tg-sidebar-toggle { display: flex; }
  .tg-sidebar-inner { display: none; }
  .tg-sidebar-inner.is-open { display: flex; }
  .tg-product-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .tg-shop-hero__float--3 { display: none; }
  .tg-shop-nl__inner { grid-template-columns: 1fr; padding: 36px 28px; gap: 32px; }
  .tg-product-row { grid-template-columns: repeat(2, 1fr); }
  .woocommerce-breadcrumb { padding: 16px 20px 0 !important; }
}
@media (max-width: 480px) {
  .tg-product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .tg-shop-hero__float--1 { display: none; }
  .tg-shop-hero__inner { padding: 32px 24px 64px; }
  .tg-product-row { grid-template-columns: repeat(2, 1fr); }
  .tg-enterprise__content { padding: 32px 24px; }
}

/* Override WooCommerce default border trên pagination ul  */
.woocommerce nav.woocommerce-pagination ul,
.tg-shop-pagination nav.woocommerce-pagination ul,
nav.woocommerce-pagination ul {
  border: none !important;
  border-right: none !important;
  margin: 0 !important;
  padding: 0 !important;
 } 

/* /* Override border trên từng item */
.woocommerce nav.woocommerce-pagination ul li,
nav.woocommerce-pagination ul li {
  border: none !important;
  border-right: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ============================================================
   PRICE SLIDER — override WooCommerce tím #7f54b3
============================================================ */
.woocommerce .widget_price_filter .ui-slider .ui-slider-range,
.tg-sidebar-widget .widget_price_filter .ui-slider .ui-slider-range,
.tg-sidebar-widget .ui-slider-range,
div.tg-sidebar-widget .ui-slider-horizontal .ui-slider-range {
  background: var(--tg-main) !important;
  background-color: var(--tg-main) !important;
  border-radius: 100px !important;
  height: 100% !important;
  top: 0 !important;
}

.woocommerce .widget_price_filter .ui-slider-horizontal,
.tg-sidebar-widget .ui-slider-horizontal {
  height: 5px !important;
  background: rgba(28,38,33,.1) !important;
  background-color: rgba(28,38,33,.1) !important;
  border: none !important;
  border-radius: 100px !important;
  margin: 14px 0 !important;
}

.woocommerce .widget_price_filter .ui-slider .ui-slider-handle,
.tg-sidebar-widget .ui-slider-handle {
  width: 18px !important;
  height: 18px !important;
  background: var(--tg-main) !important;
  background-color: var(--tg-main) !important;
  border: 2.5px solid #fff !important;
  border-radius: 50% !important;
  top: -7px !important;
  box-shadow: 0 2px 8px rgba(13,74,59,.35) !important;
  cursor: grab !important;
  outline: none !important;
}

.woocommerce .widget_price_filter .ui-slider .ui-slider-handle:focus,
.tg-sidebar-widget .ui-slider-handle:focus {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(20,102,83,.2) !important;
}

/* Ẩn nút "Xem giỏ hàng" sau khi thêm vào giỏ trên archive */
.tg-product-card__btns a.added_to_cart,
.tg-product-card__btns .wc-forward,
.tg-product-card .added_to_cart {
  display: none !important;
}

/* ── Recently viewed — fix alignment ── */
#tg-recently-viewed .tg-product-row {
  align-items: stretch; /* tất cả card cùng chiều cao */
}

#tg-recently-viewed .tg-product-mini {
  align-items: stretch;
}

/* Bỏ pseudo "Đã xem" gây lệch */
.tg-product-mini--viewed::after {
  display: none !important;
}

/* Thay bằng badge nhỏ trên ảnh */
.tg-product-mini--viewed .tg-product-mini__img {
  position: relative;
}
.tg-product-mini--viewed .tg-product-mini__img::after {
  content: '● Đã xem';
  position: absolute;
  bottom: 6px; left: 6px;
  font-size: 9px; font-weight: 700;
  color: rgba(255,255,255,.9);
  background: rgba(20,102,83,.75);
  padding: 2px 7px; border-radius: 100px;
  backdrop-filter: blur(4px);
  letter-spacing: .04em;
}

/* Section header cách lề trái đúng */
#tg-recently-viewed.tg-shop-section {
  margin-top: 56px;
}

#tg-recently-viewed .tg-shop-section__header {
  padding-left: 0 !important;
}

/* Đồng đều chiều cao tất cả card */
#tg-recently-viewed .tg-product-mini {
  height: 100%;
}

/* Wrapper để custom dropdown */
.tg-shop-sort { position: relative; }

.tg-shop-sort select {
  /* Ẩn select gốc nhưng vẫn functional */
  opacity: 0 !important;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  cursor: pointer !important;
  z-index: 2 !important;
}

/* Custom display button */
.tg-sort-display {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 40px 9px 14px;
  border: 1.5px solid rgba(20,102,83,.18);
  border-radius: 10px;
  background: #fff;
  font-family: var(--tg-font-main);
  font-size: 13px;
  font-weight: 500;
  color: var(--tg-charcoal);
  min-width: 220px;
  box-shadow: 0 1px 6px rgba(20,102,83,.07);
  pointer-events: none; /* click xuyên qua lên select */
  position: relative;
}
.tg-sort-display::after {
  content: '';
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  width: 12px; height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23146653' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat center/contain;
  transition: transform .2s ease;
}
.tg-shop-sort:focus-within .tg-sort-display {
  border-color: var(--tg-main);
  box-shadow: 0 0 0 3px rgba(20,102,83,.1);
}
.tg-shop-sort:focus-within .tg-sort-display::after {
  transform: translateY(-50%) rotate(180deg);
}