/* ============================================================
   CUSTOMNEW - Bộ lọc loại sản phẩm
   ============================================================ */

/* Ô tìm kiếm luôn nằm phía trên danh sách loại sản phẩm */
.fgrp-type .type-filter-search {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin: 0 0 10px;
  padding: 4px;
  border: 1px solid #d9dde2;
  border-radius: 5px;
  background: #fff;
  box-sizing: border-box;
}

.fgrp-type .type-filter-search:focus-within {
  border-color: #20242a;
  box-shadow: 0 0 0 1px #20242a;
}

.fgrp-type .type-filter-search input {
  min-width: 0;
  flex: 1 1 auto;
  height: 32px;
  padding: 0 8px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #3c424a;
  font: inherit;
  font-size: 13px;
}

.fgrp-type .type-filter-search input::placeholder {
  color: #8b929a;
}

.fgrp-type .type-filter-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: #20242a;
  color: #fff;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}

.fgrp-type .type-filter-search button:hover {
  background: #3c424a;
}

.fgrp-type .type-filter-search button:active {
  transform: scale(.96);
}

.fgrp-type .type-filter-search button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

/* Giới hạn chiều cao, chỉ cuộn phần danh sách checkbox */
.fgrp-type .fgrp-items {
  max-height: 280px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: #b8bec6 transparent;
}

.fgrp-type .fgrp-items::-webkit-scrollbar {
  width: 5px;
}

.fgrp-type .fgrp-items::-webkit-scrollbar-track {
  background: transparent;
}

.fgrp-type .fgrp-items::-webkit-scrollbar-thumb {
  border-radius: 5px;
  background: #b8bec6;
}

.fgrp-type .fgrp-items .filter-opt[hidden] {
  display: none;
}

.fgrp-type .type-filter-empty {
  margin: 8px 0 2px;
  color: #8b929a;
  font-size: 12px;
}

@media (max-width: 999px) {
  .fgrp-type .fgrp-items {
    max-height: 240px;
  }
}

/* ============================================================
   PRODUCT - Variant của mục "Mua kèm" đồng bộ với cart
   ============================================================ */
#pdpXsellBox .xitem .nm {
  gap: 0;
}

#pdpXsellBox .xsell-variant-picker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

#pdpXsellBox .xsell-option-select {
  min-width: 72px;
  max-width: 180px;
  height: 30px;
  padding: 0 26px 0 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-tag);
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  line-height: 30px;
  cursor: pointer;
  outline: 0;
}

#pdpXsellBox .xsell-option-select:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}

#pdpXsellBox .xsell-option-select:disabled {
  cursor: wait;
  opacity: .65;
}

/* ============================================================
   HOMEPAGE - Ảnh Combo Mix & Match và Công nghệ vải theo tỷ lệ 1:2
   ============================================================ */
.hrv-cf-mix_sec_enable .look-grid .look img,
.hrv-cf-fab_sec_enable .fab img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 2;
  object-fit: cover;
}

/* PRODUCT CARDS - Hiển thị tên màu khi rê chuột vào chấm màu */
@media (hover: hover) and (pointer: fine) {
  .dots .dot[title] {
    position: relative;
  }

  .dots .dot[title]::after {
    content: attr(title);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 7px);
    z-index: 20;
    max-width: 150px;
    padding: 4px 8px;
    border-radius: 4px;
    background: var(--ink);
    color: #fff;
    font-size: 11px;
    font-style: normal;
    font-weight: 500;
    line-height: 1.25;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 3px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
  }

  .dots .dot[title]::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: calc(100% + 2px);
    z-index: 20;
    border: 4px solid transparent;
    border-top-color: var(--ink);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%);
    transition: opacity .15s ease, visibility .15s ease;
  }

  .dots .dot[title]:hover::after,
  .dots .dot[title]:hover::before,
  .dots .dot[title]:focus-visible::after,
  .dots .dot[title]:focus-visible::before {
    opacity: 1;
    visibility: visible;
  }

  .dots .dot[title]:hover::after,
  .dots .dot[title]:focus-visible::after {
    transform: translate(-50%, 0);
  }
}

/* FOOTER - Cân đối khu vực đăng ký nhận tin */
.foot .foot-grid > div:last-child {
  min-width: 0;
}

.foot .foot-grid > div:last-child > h4,
.foot .foot-grid > div:last-child > p,
.foot .foot-grid > div:last-child .foot-msg-feedback {
  text-align: center;
}

.foot .foot-grid > div:last-child > p {
  max-width: 440px;
  margin: 0 auto 10px;
}

.foot-newsletter-wrap,
.foot-customer-form {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.foot-form-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}

.foot-form-row input {
  min-width: 0;
  flex: 1 1 auto;
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #3a3e45;
  border-radius: var(--r-btn);
  background: #1d2026;
  color: #fff;
  outline: 0;
}

.foot-form-row input:focus {
  border-color: var(--brass);
  box-shadow: 0 0 0 1px var(--brass);
}

.foot-form-row input::placeholder {
  color: #9aa0a6;
}

.foot-form-row button {
  flex: 0 0 100px;
  height: 42px;
  padding: 0 12px;
  border-radius: var(--r-btn);
  white-space: nowrap;
}

.foot-form-row.email-row {
  margin-top: 8px;
}

.foot-form-row.email-row input {
  flex-basis: 100%;
}

.foot .pay-row {
  justify-content: center;
}

@media (max-width: 420px) {
  .foot-form-row {
    gap: 6px;
  }

  .foot-form-row button {
    flex-basis: 92px;
    padding: 0 8px;
  }
}

/* CONTENT PAGES - Typography và line-height đồng đều */
.page-wrap {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 8px 0 48px;
}

.page-head {
  margin-bottom: 22px;
}

.page-head .h-page {
  margin: 0 0 8px;
  line-height: 1.18;
}

.page-meta {
  color: var(--slate);
  font-size: 13px;
  line-height: 1.6;
}

.page-content {
  color: #343a42;
  font-size: 15px;
  line-height: 1.78;
  overflow-wrap: anywhere;
}

.page-content > *:first-child {
  margin-top: 0;
}

.page-content > *:last-child {
  margin-bottom: 0;
}

.page-content p {
  margin: 0 0 16px;
  line-height: 1.78;
}

.page-content h2,
.page-content h3,
.page-content h4 {
  color: var(--ink);
  line-height: 1.3;
}

.page-content h2 {
  margin: 30px 0 12px;
  font-size: 22px;
}

.page-content h3 {
  margin: 24px 0 10px;
  font-size: 18px;
}

.page-content h4 {
  margin: 20px 0 8px;
  font-size: 16px;
}

.page-content ul,
.page-content ol {
  margin: 0 0 18px;
  padding-left: 24px;
}

.page-content li {
  margin: 0 0 8px;
  line-height: 1.72;
}

.page-content ul li {
  list-style: disc;
}

.page-content ol li {
  list-style: decimal;
}

.page-content a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.page-content img {
  height: auto;
  margin: 20px auto;
  border-radius: var(--r-card);
}

.page-content table {
  width: 100%;
  margin: 20px 0;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.55;
}

.page-content th,
.page-content td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}

.page-content th {
  background: var(--mist);
  color: var(--ink);
  font-weight: 700;
}

.page-support-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 34px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--mist);
}

.page-support-title {
  margin-bottom: 5px;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.35;
}

.page-support-desc {
  margin: 0;
  color: var(--slate);
  line-height: 1.65;
}

.page-support-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  flex-wrap: wrap;
}

.page-support-phone {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

/* FAQ page */
.faq-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 8px 0 48px;
}

.faq-title {
  line-height: 1.18;
}

.faq-desc,
.faq-a-body,
.faq-contact-desc {
  line-height: 1.75;
}

.faq-a-body {
  font-size: 14px;
}

@media (max-width: 699px) {
  .page-wrap,
  .faq-wrap {
    padding-bottom: 36px;
  }

  .page-content {
    font-size: 14px;
    line-height: 1.72;
  }

  .page-content p,
  .page-content li {
    line-height: 1.72;
  }

  .page-support-card {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .page-support-actions {
    width: 100%;
  }
}

/* 404 PAGE - Gọn, rõ và cân đối */
.notfound-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 34px 0 64px;
  text-align: center;
}

.notfound-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 18px;
}

.notfound-num {
  color: var(--ink);
  font-size: clamp(64px, 12vw, 118px);
  font-weight: 800;
  letter-spacing: -.09em;
  line-height: .9;
}

.notfound-icon-wrap {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  background: var(--cream);
  color: var(--brass);
}

.notfound-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--mist);
  color: var(--slate);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.notfound-title {
  margin: 16px auto 10px;
  color: var(--ink);
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.2;
}

.notfound-desc {
  max-width: 600px;
  margin: 0 auto;
  color: var(--slate);
  font-size: 14px;
  line-height: 1.75;
}

.notfound-search {
  max-width: 620px;
  margin: 24px auto 0;
}

.notfound-search .search-page-form {
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--r-btn);
  background: #fff;
  box-shadow: 0 8px 24px rgba(22, 24, 28, .07);
}

.notfound-search input {
  min-width: 0;
  flex: 1 1 auto;
  height: 42px;
  padding: 0 12px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
}

.notfound-search input::placeholder {
  color: #8b929a;
}

.notfound-search input:focus {
  box-shadow: 0 0 0 1px var(--brass) inset;
  border-radius: var(--r-tag);
}

.notfound-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
  min-width: 112px;
  height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--r-tag);
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}

.notfound-search button:hover {
  background: var(--brass);
  transform: translateY(-1px);
}

.notfound-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.notfound-actions .btn,
.notfound-btn-sec {
  min-height: 42px;
  padding: 0 16px;
  border-radius: var(--r-btn);
  font-size: 13px;
  font-weight: 700;
}

.notfound-btn-sec {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  transition: border-color .15s ease, background .15s ease;
}

.notfound-btn-sec:hover {
  border-color: var(--ink);
  background: var(--mist);
}

.notfound-links-box {
  margin-top: 30px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: #fafafa;
}

.notfound-links-label {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.notfound-chips {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.notfound-chip {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--slate);
  font-size: 12px;
  line-height: 1.25;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}

.notfound-chip:hover {
  border-color: var(--brass);
  background: var(--cream);
  color: var(--ink);
}

/* MIX & MATCH COLLECTION - Nút bỏ sản phẩm khỏi bộ */
.mi {
  position: relative;
}

.mi .mi-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  align-self: center;
  padding: 0 0 2px;
  border: 1px solid var(--line);
  border-radius: var(--r-tag);
  background: #fff;
  color: var(--slate);
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}

.mi .mi-remove:hover:not(:disabled),
.mi .mi-remove:focus-visible {
  border-color: var(--red);
  background: #fff5f4;
  color: var(--red);
  outline: 0;
}

.mi .mi-remove:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.mi.is-excluded {
  opacity: .5;
  filter: grayscale(.35);
}

.mi.is-excluded .body,
.mi.is-excluded > img {
  pointer-events: none;
}

@media (max-width: 520px) {
  .notfound-wrap {
    padding: 24px 0 46px;
  }

  .notfound-visual {
    gap: 10px;
  }

  .notfound-icon-wrap {
    width: 48px;
    height: 48px;
  }

  .notfound-icon-wrap svg {
    width: 28px;
    height: 28px;
  }

  .notfound-desc {
    font-size: 13px;
  }

  .notfound-search .search-page-form {
    flex-direction: column;
    padding: 8px;
  }

  .notfound-search input,
  .notfound-search button {
    width: 100%;
  }

  .notfound-actions > * {
    width: 100%;
  }
}
