/**
 * Giao diện archive sản phẩm có bật ACF.
 * Dùng chung cho product_cat và trang kết quả tìm kiếm sản phẩm.
 */

.sgd-product-category-ui {
  --sgd-category-accent: #bd1254;
  --sgd-category-accent-dark: #991044;
  --sgd-category-text: #17141a;
  --sgd-category-muted: #6f6570;
  --sgd-category-border: #f0d4df;
  --sgd-category-soft: #fff4f8;
}

.sgd-product-category-ui .shop-page-title {
  display: none;
}

.sgd-shop-archive-ui .custom-page-title {
  display: none;
}

.sgd-product-category-ui .category-page-row {
  padding-top: 24px;
}

.sgd-product-category-ui .shop-container {
  width: 100%;
}

.sgd-category-intro {
  margin-bottom: 28px;
}

.sgd-category-hero {
  position: relative;
  display: grid;
  min-height: 220px;
  padding: 34px 38px;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, .75fr);
  align-items: center;
  gap: 32px;
  overflow: hidden;
  border: 1px solid #f1d5e0;
  border-radius: 18px;
  background:
    radial-gradient(circle at 87% 15%, rgb(255 255 255 / 78%) 0 7%, transparent 7.2%),
    radial-gradient(circle at 8% 110%, rgb(255 255 255 / 72%) 0 20%, transparent 20.2%),
    linear-gradient(115deg, #fff9fb 0%, #fff0f6 50%, #ffd2e3 100%);
  box-shadow: 0 14px 36px rgb(117 31 65 / 10%);
}

.sgd-category-hero::before,
.sgd-category-hero::after {
  position: absolute;
  border: 1px solid rgb(189 18 84 / 12%);
  border-radius: 50%;
  content: '';
  pointer-events: none;
}

.sgd-category-hero::before {
  width: 260px;
  height: 260px;
  top: -145px;
  right: -40px;
}

.sgd-category-hero::after {
  width: 170px;
  height: 170px;
  right: 16%;
  bottom: -132px;
}

.sgd-category-hero__content,
.sgd-category-hero__visual {
  position: relative;
  z-index: 1;
}

.sgd-category-eyebrow {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 7px 11px;
  align-items: center;
  gap: 7px;
  border: 1px solid rgb(189 18 84 / 18%);
  border-radius: 999px;
  background: rgb(255 255 255 / 64%);
  color: var(--sgd-category-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
}

.sgd-category-hero h1 {
  margin: 0 0 14px;
  color: var(--sgd-category-text);
  font-size: clamp(31px, 3vw, 46px);
  line-height: 1.12;
  letter-spacing: -.035em;
}

.sgd-category-hero h1 span {
  color: var(--sgd-category-accent);
}

.sgd-category-hero__description {
  max-width: 700px;
  color: #4f4650;
  font-size: 14px;
  line-height: 1.7;
}

.sgd-category-hero__description p:last-child {
  margin-bottom: 0;
}

.sgd-category-hero__visual {
  display: flex;
  min-height: 150px;
  align-items: center;
  justify-content: center;
}

.sgd-category-hero__visual > img {
  width: 100%;
  max-height: 190px;
  object-fit: contain;
}

.sgd-category-visual-card {
  position: relative;
  width: min(100%, 260px);
  height: 140px;
  padding: 24px;
  border: 8px solid #3a1630;
  border-bottom-width: 14px;
  border-radius: 12px 12px 7px 7px;
  background: linear-gradient(145deg, #d70f5c, #ff5b98);
  box-shadow: 0 20px 25px rgb(91 14 48 / 24%);
  transform: perspective(600px) rotateY(-8deg) rotateX(3deg);
}

.sgd-category-visual-card::after {
  position: absolute;
  width: calc(100% + 62px);
  height: 12px;
  right: -31px;
  bottom: -24px;
  border-radius: 3px 3px 12px 12px;
  background: linear-gradient(90deg, #6f4661, #c58aa6 48%, #6f4661);
  content: '';
}

.sgd-category-visual-card > .sgd-inline-icon {
  display: block;
  margin-bottom: 15px;
  color: #fff;
  font-size: 52px;
  text-align: center;
}

.sgd-category-visual-card > span {
  display: inline-block;
  width: 27%;
  height: 8px;
  margin: 0 2%;
  border-radius: 99px;
  background: rgb(255 255 255 / 58%);
}

.sgd-category-float {
  position: absolute;
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 60%);
  border-radius: 12px;
  background: linear-gradient(145deg, #e20f61, #ff72aa);
  box-shadow: 0 9px 22px rgb(132 15 61 / 21%);
  color: #fff;
  font-size: 18px;
}

.sgd-category-float--one {
  top: 1px;
  left: 1%;
  transform: rotate(-8deg);
}

.sgd-category-float--two {
  top: 25%;
  right: -3px;
  transform: rotate(7deg);
}

.sgd-category-float--three {
  right: 8%;
  bottom: -2px;
  transform: rotate(-4deg);
}

.sgd-category-benefits {
  display: grid;
  margin-top: 22px;
  padding: 12px 6px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--sgd-category-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgb(117 31 65 / 7%);
}

.sgd-category-benefit {
  display: flex;
  min-height: 62px;
  padding: 9px 18px;
  align-items: center;
  gap: 13px;
}

.sgd-category-benefit + .sgd-category-benefit {
  border-left: 1px solid var(--sgd-category-border);
}

.sgd-category-benefit > .sgd-inline-icon {
  width: 34px;
  flex: 0 0 34px;
  color: var(--sgd-category-accent);
  font-size: 28px;
  text-align: center;
}

.sgd-category-benefit strong,
.sgd-category-benefit span {
  display: block;
}

.sgd-category-benefit strong {
  margin-bottom: 3px;
  color: var(--sgd-category-accent);
  font-size: 14px;
  line-height: 1.25;
}

.sgd-category-benefit span {
  color: var(--sgd-category-muted);
  font-size: 11px;
  line-height: 1.35;
}

.sgd-category-notice {
  display: flex;
  margin-top: 22px;
  padding: 15px 20px;
  align-items: center;
  gap: 16px;
  border: 1px solid #f1dae3;
  border-radius: 14px;
  background: linear-gradient(90deg, #fff4f8, #fff);
  box-shadow: 0 7px 22px rgb(117 31 65 / 6%);
}

.sgd-category-notice__icon {
  display: grid;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  place-items: center;
  border-radius: 12px;
  background: #ffe3ed;
  color: var(--sgd-category-accent);
  font-size: 27px;
}

.sgd-category-notice h2 {
  margin: 0 0 4px;
  color: var(--sgd-category-text);
  font-size: 18px;
  line-height: 1.3;
}

.sgd-category-notice p {
  margin: 0;
  color: #544b55;
  font-size: 13px;
  line-height: 1.55;
}

.sgd-category-search {
  display: flex;
  margin-top: 22px;
  align-items: stretch;
  gap: 0;
}

.sgd-category-search__field {
  position: relative;
  flex: 1 1 auto;
}

.sgd-category-search__field > .sgd-inline-icon {
  position: absolute;
  top: 50%;
  left: 18px;
  color: #8a7c87;
  font-size: 14px;
  transform: translateY(-50%);
}

.sgd-category-search input[type='search'] {
  width: 100%;
  height: 50px;
  margin: 0;
  padding: 0 18px 0 46px;
  border: 1px solid var(--sgd-category-accent);
  border-right: 0;
  border-radius: 11px 0 0 11px;
  background: #fff;
  box-shadow: none;
  color: #312a30;
  font-size: 14px;
}

.sgd-category-search input[type='search']:focus {
  box-shadow: inset 0 0 0 1px var(--sgd-category-accent);
}

.sgd-category-search button {
  display: inline-flex;
  min-width: 128px;
  height: 50px;
  margin: 0;
  padding: 0 20px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 0 11px 11px 0;
  background: var(--sgd-category-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-transform: none;
}

.sgd-category-search button:hover {
  background: var(--sgd-category-accent-dark);
}

.sgd-category-navigation {
  display: grid;
  margin: 20px 0 10px;
  padding: 14px 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--sgd-category-accent);
  border-radius: 16px;
  background: linear-gradient(90deg, #fff, #fff5f8, #fff);
  box-shadow: 0 9px 25px rgb(104 26 57 / 8%);
}

.sgd-category-navigation a {
  display: flex;
  min-height: 66px;
  padding: 7px 10px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex-direction: column;
  color: #30272d;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.sgd-category-navigation a + a {
  border-left: 1px solid #ecd9e1;
}

.sgd-category-navigation .sgd-inline-icon {
  color: var(--sgd-category-accent);
  font-size: 23px;
}

.sgd-category-navigation a:hover,
.sgd-category-navigation a.is-current {
  color: var(--sgd-category-accent);
}

@media (max-width: 849px) {
  .sgd-category-hero {
    padding: 28px;
    grid-template-columns: minmax(0, 1.3fr) minmax(210px, .7fr);
  }

  .sgd-category-benefits {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sgd-category-benefit:nth-child(3) {
    border-top: 1px solid var(--sgd-category-border);
    border-left: 0;
  }

  .sgd-category-benefit:nth-child(4) {
    border-top: 1px solid var(--sgd-category-border);
  }

  .sgd-category-navigation {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sgd-category-navigation a:nth-child(4) {
    border-top: 1px solid #ecd9e1;
    border-left: 0;
  }

  .sgd-category-navigation a:nth-child(n+5) {
    border-top: 1px solid #ecd9e1;
  }
}

@media (max-width: 549px) {
  .sgd-product-category-ui .category-page-row {
    padding-top: 14px;
  }

  .sgd-category-intro {
    margin-bottom: 18px;
  }

  .sgd-category-hero {
    display: block;
    min-height: 0;
    padding: 24px 20px;
    border-radius: 14px;
  }

  .sgd-category-hero h1 {
    font-size: 30px;
  }

  .sgd-category-hero__visual {
    min-height: 130px;
    margin-top: 22px;
  }

  .sgd-category-visual-card {
    width: 220px;
    height: 118px;
  }

  .sgd-category-benefits {
    margin-top: 16px;
  }

  .sgd-category-benefit {
    padding: 10px 9px;
    gap: 8px;
  }

  .sgd-category-benefit > .sgd-inline-icon {
    width: 27px;
    flex-basis: 27px;
    font-size: 22px;
  }

  .sgd-category-benefit strong {
    font-size: 12px;
  }

  .sgd-category-benefit span {
    font-size: 10px;
  }

  .sgd-category-notice {
    margin-top: 16px;
    padding: 13px;
    align-items: flex-start;
  }

  .sgd-category-notice__icon {
    width: 45px;
    height: 45px;
    flex-basis: 45px;
    font-size: 21px;
  }

  .sgd-category-notice h2 {
    font-size: 15px;
  }

  .sgd-category-search {
    margin-top: 16px;
  }

  .sgd-category-search input[type='search'],
  .sgd-category-search button {
    height: 46px;
  }

  .sgd-category-search button {
    min-width: 48px;
    padding: 0 15px;
  }

  .sgd-category-search button span {
    display: none;
  }

  .sgd-category-navigation {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sgd-category-navigation a:nth-child(3),
  .sgd-category-navigation a:nth-child(5) {
    border-top: 1px solid #ecd9e1;
    border-left: 0;
  }

  .sgd-category-navigation a:nth-child(4) {
    border-left: 1px solid #ecd9e1;
  }
}

/* Trang Cửa hàng: thanh chọn ngành nghề dùng chung dữ liệu product_cat. */
.sgd-shop-industries {
  margin: 0 0 30px;
}

.sgd-shop-industries__heading {
  margin-bottom: 14px;
  text-align: center;
}

.sgd-shop-industries__heading > span {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--sgd-category-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
}

.sgd-shop-industries__heading h2 {
  margin: 0 0 5px;
  color: var(--sgd-category-text);
  font-size: 24px;
}

.sgd-shop-industries__heading p {
  margin: 0;
  color: var(--sgd-category-muted);
  font-size: 13px;
}

.sgd-category-navigation--industries {
  margin: 0;
  padding: 10px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  border-color: var(--sgd-category-border);
}

.sgd-category-navigation--industries a,
.sgd-category-navigation--industries a + a {
  min-height: 82px;
  padding: 10px 8px;
  border: 1px solid #f0dce4;
  border-radius: 11px;
  background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease, color .18s ease;
}

.sgd-category-navigation--industries a:hover {
  border-color: var(--sgd-category-accent);
  box-shadow: 0 8px 18px rgb(117 31 65 / 9%);
}

.sgd-category-navigation--industries .sgd-inline-icon {
  font-size: 25px;
}

@media (max-width: 849px) {
  .sgd-category-navigation--industries {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 549px) {
  .sgd-shop-industries {
    margin-bottom: 22px;
  }

  .sgd-shop-industries__heading h2 {
    font-size: 20px;
  }

  .sgd-shop-industries__heading p {
    padding: 0 10px;
    font-size: 12px;
  }

  .sgd-category-navigation--industries {
    display: grid;
    padding: 9px;
    grid-template-columns: none;
    grid-auto-columns: minmax(138px, 42vw);
    grid-auto-flow: column;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }

  .sgd-category-navigation--industries a,
  .sgd-category-navigation--industries a + a {
    min-height: 78px;
    border: 1px solid #f0dce4;
    scroll-snap-align: start;
  }
}
