/* Product card — soft radius, corner -N% badge, black titles */
.vn-product-card .box-image,
.product-small .box-image {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.product-small .box-image img,
.product-small .box-image .back-image,
.product-small .box-image .image-none,
.product-small .image-cover,
.product-small .box-image > a,
.product-small .box-image .image-tools {
  border-radius: 12px;
}

/* Soft image frame for grid/slider products */
.product-small.box {
  border-radius: 12px;
}

/* Hide legacy Flatsome circle "Giảm giá!" if it still appears */
.badge-container{
  margin: 0px;
}
.badge-container .badge-circle,
.badge-container .callout.badge:not(.vn-sale-badge),
.product-small .badge-circle .onsale,
span.onsale {
  display: none !important;
}

/* Blue -N% on image (replaces Giảm giá!) */
.badge-container .vn-sale-badge,
.vn-sale-badge--corner,
.vn-sale-badge {
  display: inline-block;
  position: relative;
  top: auto;
  left: auto;
  z-index: 3;
  background: var(--fs-color-primary, var(--primary-color));
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.badge-container.absolute.left.top {
  top: 10px;
  left: 10px;
  z-index: 5;
}

/* No duplicate % beside price */
.price .vn-sale-badge,
.vn-sale-badge--price {
  display: none !important;
}

/* Product title #000 (override Flatsome primary/link orange) */
.product-small .product-title,
.product-small .product-title a,
.product-small .woocommerce-loop-product__title,
.product-small .woocommerce-loop-product__title a,
.woocommerce-loop-product__title,
.woocommerce-loop-product__title a,
.name.product-title,
.name.product-title a {
  color: #000 !important;
  margin: 7px 0px;
  font-size: 1rem;
  font-weight: 600;
}

/* Hide Flatsome loop text color labels (we use custom image swatches) */
.product-small .ux-swatches-in-loop {
  display: none !important;
}

/* —— Thumbnail hover: size chips —— */
.product-small .box-image,
.vn-product-card .box-image {
  position: relative;
}

.vn-quick-add-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8;
  padding: 1rem 0.65rem 0.7rem;
  background: linear-gradient(
    to top,
    rgba(255, 255, 255, 0.97) 55%,
    rgba(255, 255, 255, 0.88) 78%,
    rgba(255, 255, 255, 0)
  );
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  text-align: center;
}

.product-small:hover .vn-quick-add-overlay,
.product-small:focus-within .vn-quick-add-overlay,
.box-image:hover .vn-quick-add-overlay,
.vn-quick-add-overlay:focus-within {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* Touch devices: keep sizes reachable without hover */
@media (hover: none) {
  .vn-quick-add-overlay {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }
}

.vn-quick-add-overlay__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.vn-size-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0;
}

.vn-size-chip {
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.3rem;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  background: #fff;
  color: #111;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.vn-size-chip:hover {
  border-color: #111;
}

.vn-size-chip.is-disabled,
.vn-size-chip:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  text-decoration: line-through;
}

.vn-size-chip.is-loading {
  opacity: 0.6;
}

.vn-quick-add-msg {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  color: #0a7a32;
}

.vn-quick-add-msg.is-error {
  color: #c1121f;
}

/* —— Color swatches above title —— */
.vn-color-swatches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0.45rem 0 0.1rem;
  justify-content: flex-start;
  text-align: left;
}
.badge-container{
  margin: 0px !important;
}
.box-text.text-center .vn-color-swatches {
  justify-content: center;
}

.vn-color-swatch {
  position: relative;
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  padding: 0;
  margin: 0;
  border: 1px solid #ddd;
  border-radius: 50%;
  background: #f3f3f3;
  cursor: pointer;
  overflow: hidden;
  flex: 0 0 30px;
  aspect-ratio: 1 / 1;
  line-height: 0;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.vn-color-swatch img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
}

.vn-color-swatch__fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 10px;
  font-weight: 700;
  color: #333;
}

.vn-color-swatch.is-selected {
  border-color: var(--fs-color-primary, var(--primary-color, #2563eb));
  box-shadow: 0 0 0 1px var(--fs-color-primary, var(--primary-color, #2563eb));
}

.vn-color-swatch:focus-visible {
  outline: 1px solid var(--fs-color-primary, var(--primary-color, #2563eb));
  outline-offset: 2px;
}

.vn-product-card .price,
.product-small .price,
.single-product .related .product-small .price,
.single-product .upsells .product-small .price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  margin: 0;
  font-size: 14px;
  line-height: 1.3;
}

.vn-product-card .price del,
.product-small .price del,
.single-product .related .product-small .price del,
.single-product .upsells .product-small .price del {
  opacity: 1;
  color: var(--vn-muted, #6b6b6b);
  font-size: 13px;
  font-weight: 400;
  text-decoration: line-through;
}

.vn-product-card .price del .amount,
.product-small .price del .amount,
.single-product .related .product-small .price del .amount,
.single-product .upsells .product-small .price del .amount {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

.vn-product-card .price ins,
.product-small .price ins,
.single-product .related .product-small .price ins,
.single-product .upsells .product-small .price ins {
  text-decoration: none;
  font-weight: 700;
  color: var(--vn-fg, #111);
}

.vn-product-card .price > .amount,
.product-small .price > .amount,
.vn-product-card .price ins .amount,
.product-small .price ins .amount,
.single-product .related .product-small .price .amount,
.single-product .related .product-small .price ins .amount,
.single-product .upsells .product-small .price .amount,
.single-product .upsells .product-small .price ins .amount {
  font-size: 14px;
  font-weight: 700;
  color: var(--vn-fg, #111);
  line-height: 1.3;
}

.vn-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  width: 100%;
}

.vn-section-head > p,
.vn-section-head .vn-section-more-wrap {
  margin: 0 !important;
  padding: 0;
  flex: 0 0 auto;
  white-space: nowrap;
}

.vn-section-title {
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.vn-section-more,
.vn-section-head a.vn-section-more,
.vn-section-head p a.vn-section-more {
  display: inline-block !important;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  color: #000 !important;
  text-decoration: none !important;
  border-bottom: 0 !important;
  white-space: nowrap !important;
  flex-shrink: 0;
  line-height: 1.2;
}

.vn-section-more:hover,
.vn-section-more:focus {
  text-decoration: none !important;
  opacity: 0.7;
}

.vn-cat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.85rem;
}

.vn-cat-tile {
  display: block;
  text-align: center;
  text-decoration: none;
  color: #111;
}

.vn-cat-tile img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  background: #f2f2f2;
}

.vn-cat-tile span {
  display: block;
  margin-top: 0.55rem;
  font-weight: 700;
  font-size: 14px;
}

@media only screen and (max-width: 48em) {
  .vn-cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
