/* SINH TỰ ĐỘNG bởi lanora/scope-css.py từ "giao_dien_hoan_chinh/css/product.css" — đừng sửa tay, sửa file gốc rồi chạy lại. */
/* =========================================================
   SẢN PHẨM CHI TIẾT – Figma 306:1920
   ========================================================= */

/* ---------- Khối trên: ảnh + thông tin ---------- */
:where(.lanora) .product-top {
  display: flex;
  justify-content: space-between;
  gap: 80px;
  padding: 104px 80px 59px; /* 104 = 72 header + 32; 836 - 777 = 59 */
  background: var(--white);
}

/* Gallery (Figma 306:2593) */
:where(.lanora) .gallery {
  flex: none;
  width: 572px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
:where(.lanora) .gallery__main {
  position: relative;
  width: 572px;
  height: 572px;
  border-radius: 12px;
  overflow: hidden;
}
:where(.lanora) .gallery__main > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.25s;
}
:where(.lanora) .gallery__zoom {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: flex;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background 0.2s;
}
:where(.lanora) .gallery__zoom:hover {
  background: rgba(255, 255, 255, 0.35);
}
:where(.lanora) .gallery__zoom img {
  width: 24px;
  height: 24px;
}
:where(.lanora) .gallery__nav {
  position: absolute;
  top: 50%;
  left: 12px;
  right: 12px;
  height: 44px;
  transform: translateY(-50%);
  pointer-events: none;
}
:where(.lanora) .gallery__nav .btn-circle {
  position: absolute;
  top: 0;
  pointer-events: auto;
}
:where(.lanora) .gallery__nav .btn-circle--prev {
  left: 0;
}
:where(.lanora) .gallery__nav .btn-circle--next {
  right: 0;
}
:where(.lanora) .gallery__thumbs {
  display: flex;
  gap: 12px;
  width: 100%;
}
:where(.lanora) .gallery__thumb {
  position: relative;
  flex: none;
  width: 85px;
  height: 85px;
  border-radius: 8px;
  overflow: hidden;
}
:where(.lanora) .gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
:where(.lanora) .gallery__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.4);
  transition: background 0.2s;
}
:where(.lanora) .gallery__thumb:hover::after {
  background: rgba(0, 0, 0, 0.2);
}
:where(.lanora) .gallery__thumb.is-active::after {
  background: none;
  border: 1.5px solid var(--primary-02);
}

/* Lightbox phóng to ảnh */
:where(.lanora) .lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(37, 34, 40, 0.85);
  cursor: zoom-out;
}
:where(.lanora) .lightbox.is-open {
  display: flex;
}
:where(.lanora) .lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
}

/* Thông tin (Figma 306:2611) */
:where(.lanora) .product-info {
  position: relative;
  flex: none;
  width: 628px;
  height: 673px;
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
:where(.lanora) .product-info__top,
:where(.lanora) .product-info__bottom {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
:where(.lanora) .product-info__head {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
:where(.lanora) .product-info__name {
  color: var(--primary-01);
  white-space: nowrap;
}
:where(.lanora) .product-info__desc {
  color: var(--text-secondary);
}
:where(.lanora) .product-info__line {
  display: block;
  width: 100%;
  height: 1px;
  margin-bottom: -1px;
}
:where(.lanora) .product-info__options {
  display: flex;
  align-items: flex-start;
  gap: 56px;
}
:where(.lanora) .option {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
:where(.lanora) .option__label {
  font-weight: 500;
  font-size: 13px;
  line-height: 18px;
  white-space: nowrap;
  color: var(--text-tertiary);
}
:where(.lanora) .product-info__icons {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  gap: 12px;
}
:where(.lanora) .icon-btn {
  display: flex;
  padding: 13px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: var(--white);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: border-color 0.2s, background 0.2s;
}
:where(.lanora) .icon-btn img {
  width: 20px;
  height: 20px;
}
:where(.lanora) .icon-btn:hover {
  border-color: var(--primary-02);
}
:where(.lanora) .icon-btn .heart-btn__on {
  display: none;
}
:where(.lanora) .icon-btn.is-active .heart-btn__off {
  display: none;
}
:where(.lanora) .icon-btn.is-active .heart-btn__on {
  display: block;
}

/* Số lượng (Figma Product-Amount 320:4370) */
:where(.lanora) .qty {
  display: inline-flex;
  align-items: center;
  --stroke: var(--border-subtle);
  border-radius: 8px;
  overflow: hidden;
}
:where(.lanora) .qty button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  padding: 12px 8px;
}
:where(.lanora) .qty button span {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}
:where(.lanora) .qty button[disabled] span {
  opacity: 0.2;
}
:where(.lanora) .qty button[disabled] {
  cursor: default;
}
:where(.lanora) .qty output {
  width: 42px; /* 18 + padding 12x2 */
  padding: 10px 12px;
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
  text-align: center;
}

/* Tag kích thước (Figma Product-Type-Tag 370:4153) */
:where(.lanora) .size-tags {
  display: flex;
  align-items: center;
  gap: 8px;
}
:where(.lanora) .size-tag {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px 15px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-primary);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
:where(.lanora) .size-tag:hover {
  border-color: var(--primary-02);
}
:where(.lanora) .size-tag__check {
  position: absolute;
  right: -1px;
  bottom: -1px;
  display: none;
  width: 24px;
  height: 22px;
}
:where(.lanora) .size-tag.is-active {
  border-color: var(--primary-02);
  background: var(--primary-04);
  color: var(--primary-02);
}
:where(.lanora) .size-tag.is-active .size-tag__check {
  display: block;
}

/* Giá + nút */
:where(.lanora) .product-info__price {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  font-weight: 600;
  white-space: nowrap;
}
:where(.lanora) .product-info__price .price {
  font-size: 24px;
  line-height: 32px;
}
:where(.lanora) .product-info__price s {
  font-size: 18px;
  line-height: 26px;
  color: var(--text-tertiary);
  text-decoration-skip-ink: none;
}
:where(.lanora) .product-info__actions {
  display: flex;
  gap: 12px;
}
:where(.lanora) .product-info__actions .btn {
  flex: 1 0 0;
  min-width: 1px;
}
:where(.lanora) .commitments {
  display: flex;
  align-items: center;
  gap: 16px;
}
:where(.lanora) .commitment {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  color: #1b1b1b;
}
:where(.lanora) .commitment + .commitment {
  padding-left: 0;
}
:where(.lanora) .commitment--border {
  border-right: 1px solid var(--border-default);
}
:where(.lanora) .commitment img {
  flex: none;
  width: 32px;
  height: 32px;
}

/* ---------- Thanh mục lục (Figma TOC 306:3179) ---------- */
:where(.lanora) .toc {
  position: sticky;
  top: 72px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
  padding: 0 80px;
  border-bottom: 1px solid var(--border-default);
  background: var(--white);
}
:where(.lanora) .toc__tab {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  padding: 20px 32px;
  border-bottom: 2px solid transparent;
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  white-space: nowrap;
  color: var(--text-primary);
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
:where(.lanora) .toc__tab:hover {
  color: var(--primary-02);
}
:where(.lanora) .toc__tab.is-active {
  border-bottom-color: var(--primary-02);
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), rgba(145, 55, 145, 0.1));
  color: var(--primary-02);
}

/* ---------- Nội dung chi tiết (Figma Info-Full 306:3191) ---------- */
:where(.lanora) .info-full {
  padding: 56px 189px 80px;
  border-radius: 0 0 12px 12px;
  background: linear-gradient(to bottom, rgba(144, 106, 64, 0.05), rgba(255, 255, 255, 0.05));
}
:where(.lanora) .info-panel {
  display: flex;
  flex-direction: column;
  gap: 48px;
}
:where(.lanora) .info-panel[hidden] {
  display: none;
}
:where(.lanora) .info-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
:where(.lanora) .info-block__title {
  color: var(--text-primary);
}
:where(.lanora) .info-block__text {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--text-secondary);
}
:where(.lanora) .info-block__media {
  width: 1062px;
  height: 600px;
  border-radius: 12px;
  object-fit: cover;
}
:where(.lanora) .spec {
  border-radius: 4px;
  overflow: hidden;
}
:where(.lanora) .spec__row {
  display: flex;
  box-shadow: inset 0 -1px 0 var(--border-default); /* Figma: viền dưới nằm trong, hàng cao đúng 64px */
}
:where(.lanora) .spec__row dt {
  width: 217px;
  padding: 20px 0;
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
}
:where(.lanora) .spec__row dd {
  flex: 1 0 0;
  margin: 0;
  padding: 20px 0;
  color: var(--text-secondary);
}
:where(.lanora) .store-contact {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
:where(.lanora) .store-contact__item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
:where(.lanora) .store-contact__item > img {
  flex: none;
  width: 24px;
  height: 24px;
}
:where(.lanora) .store-contact__item strong {
  display: block;
  font-weight: 500;
  font-size: 18px;
  line-height: 26px;
}
:where(.lanora) .store-contact__sub {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-secondary);
}
:where(.lanora) .store-contact__map {
  display: flex;
  width: fit-content;
  align-items: center;
  margin-top: 8px;
  font-size: 14px;
  line-height: 20px;
}
:where(.lanora) .store-contact__map img {
  width: 20px;
  height: 20px;
}
:where(.lanora) .store-contact__map:hover {
  color: var(--primary-01);
}
:where(.lanora) .care-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-left: 20px;
  list-style: disc;
  color: var(--text-secondary);
}

/* ---------- Sản phẩm liên quan (Figma 311:3997) ---------- */
:where(.lanora) .related {
  position: relative;
  height: 668px;
}
:where(.lanora) .related::before {
  content: "";
  position: absolute;
  top: 0;
  left: 80px;
  width: 1280px;
  height: 1px;
  background: var(--border-default);
}
:where(.lanora) .related__inner {
  position: absolute;
  top: 50%;
  left: 80px;
  width: 1280px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
}
:where(.lanora) .related__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  width: 100%;
}
:where(.lanora) .related__slider {
  width: 1216px;
}
:where(.lanora) .related__nav {
  position: absolute;
  top: 357px;
  left: 64px;
  width: 1312px;
  height: 44px;
}
:where(.lanora) .related__nav .btn-circle {
  position: absolute;
  top: 0;
}
:where(.lanora) .related__nav .btn-circle--prev {
  left: 0;
}
:where(.lanora) .related__nav .btn-circle--next {
  right: 0;
}

/* =========================================================
   MOBILE – Figma 540:12600 "Sản phẩm chi tiết" (393px)
   Thứ tự mobile khác desktop: dùng grid + display: contents để sắp lại,
   không đổi HTML của desktop.
   ========================================================= */
@media (max-width: 767px) {
  /* ---------- Section 1 (540:12814) ---------- */
  :where(.lanora) .product-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0;
    padding: 80px 16px 24px; /* 64 header + 16 */
  }
  :where(.lanora) .product-info,
  :where(.lanora) .product-info__top,
  :where(.lanora) .product-info__bottom,
  :where(.lanora) .product-info__options {
    display: contents;
  }
  :where(.lanora) .product-top > *,
  :where(.lanora) .product-info__top > *,
  :where(.lanora) .product-info__bottom > *,
  :where(.lanora) .product-info__options > * {
    grid-column: 1 / -1;
    margin-top: 24px;
  }
  :where(.lanora) .product-info__top > .crumbs {
    order: 1;
    gap: 0;
    margin-top: 0;
  }
  :where(.lanora) .gallery {
    order: 2;
    width: auto;
    align-items: stretch;
    margin-top: 16px !important;
  }
  :where(.lanora) .product-info__head {
    order: 3;
    gap: 8px;
  }
  :where(.lanora) .product-info__name {
    font-size: 32px;
    line-height: 42px;
  }
  :where(.lanora) .product-info__desc {
    margin-right: -0.25px; /* Chrome đo chữ rộng hơn Figma: dòng 5 cần 361.05px, dòng 3 phải > 361.5px mới xuống "Eu" */
    font-size: 14px;
    line-height: 20px;
  }
  :where(.lanora) .product-info__icons {
    order: 4;
    position: static;
    justify-self: start;
    gap: 8px;
    margin-top: 16px !important;
  }
  :where(.lanora) .icon-btn {
    padding: 11px;
  }
  :where(.lanora) .product-info__top > .product-info__line {
    order: 5;
  }
  :where(.lanora) .product-info__options > .option:nth-child(2) {
    order: 6; /* CHỌN KÍCH THƯỚC */
  }
  :where(.lanora) .product-info__options > .option:nth-child(1) {
    order: 7; /* CHỌN SỐ LƯỢNG */
    grid-column: 1;
  }
  :where(.lanora) .option {
    gap: 12px;
  }
  :where(.lanora) .product-info__price {
    order: 8;
    grid-column: 2;
    align-self: end;
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 4px;
  }
  :where(.lanora) .product-info__actions {
    order: 9;
    flex-direction: column;
  }
  :where(.lanora) .product-info__actions .btn {
    flex: none;
    width: 100%;
    padding: 13px 20px;
  }
  :where(.lanora) .product-info__bottom > .product-info__line {
    order: 10;
  }
  :where(.lanora) .commitments {
    order: 11;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
  }
  :where(.lanora) .commitment {
    width: 174px !important;
    gap: 8px;
    font-size: 13px;
    line-height: 18px;
  }
  :where(.lanora) .commitment--border {
    border-right: 0;
  }
  :where(.lanora) .commitment br {
    display: inline;
  }

  /* Gallery (540:13851) */
  :where(.lanora) .gallery__main {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
  }
  :where(.lanora) .gallery__zoom {
    display: none;
  }
  :where(.lanora) .gallery__nav {
    top: calc(50% - 1.5px);
    left: 4px;
    right: 8px;
    height: 40px;
  }
  :where(.lanora) .gallery__nav .btn-circle {
    width: 40px;
    height: 40px;
  }
  :where(.lanora) .gallery__thumbs {
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  :where(.lanora) .gallery__thumbs::-webkit-scrollbar {
    display: none;
  }
  :where(.lanora) .gallery__thumb {
    width: 72px;
    height: 72px;
  }

  /* ---------- TOC (526:6908) ---------- */
  :where(.lanora) .toc {
    top: 64px;
    gap: 0;
    height: 52px;
    padding: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  :where(.lanora) .toc::-webkit-scrollbar {
    display: none;
  }
  :where(.lanora) .toc__tab {
    flex: none;
    height: 52px;
    padding: 16px;
    font-size: 14px;
    line-height: 20px;
  }

  /* ---------- Nội dung (526:6849) ---------- */
  :where(.lanora) .info-full {
    padding: 24px 16px 32px;
  }
  :where(.lanora) .info-panel {
    gap: 32px;
  }
  :where(.lanora) .info-block {
    gap: 12px;
  }
  :where(.lanora) .info-panel > .info-block:first-child {
    gap: 24px !important;
  }
  :where(.lanora) .info-block__title {
    font-size: 24px;
    line-height: 31px;
  }
  :where(.lanora) .info-block__text {
    gap: 8px;
  }
  :where(.lanora) .info-block__text,
  :where(.lanora) .info-full .body-16 {
    font-size: 14px;
    line-height: 20px;
  }
  :where(.lanora) .info-block__media {
    width: 100%;
    height: 204px;
  }
  :where(.lanora) .spec__row dt {
    flex: none;
    width: 132px;
    padding: 16px 0;
    font-size: 14px;
    line-height: 20px;
  }
  :where(.lanora) .spec__row dd {
    padding: 16px 0;
    font-size: 14px;
    line-height: 20px;
  }
  :where(.lanora) .store-contact__item {
    width: auto !important;
  }
  :where(.lanora) .store-contact__item + .store-contact__item {
    margin-top: -4px; /* Figma: 2 dòng liên hệ cách nhau 12px */
  }
  :where(.lanora) .store-contact__item strong {
    font-size: 16px;
    line-height: 24px;
  }

  /* ---------- Sản phẩm liên quan (526:6917) ---------- */
  :where(.lanora) .related {
    height: 455px;
  }
  :where(.lanora) .related::before {
    left: 16px;
    width: calc(100% - 32px);
  }
  :where(.lanora) .related__inner {
    top: 32px;
    left: 0;
    width: 100%;
    transform: none;
    gap: 24px;
  }
  :where(.lanora) .related__head {
    display: contents;
  }
  :where(.lanora) .related__head .h4 {
    order: 1;
    align-self: flex-start;
    margin-left: 16px;
    font-size: 24px;
    line-height: 31px;
  }
  :where(.lanora) .related__slider {
    order: 2;
    width: 100%;
    gap: 12px;
    padding: 0 16px;
  }
  :where(.lanora) .related .link-more {
    order: 3;
  }
  :where(.lanora) .related__nav {
    display: none;
  }
}

/* Màn rộng hơn 1440px: thanh TOC và nền nội dung tràn hết chiều ngang */
@media (min-width: 1441px) {
  :where(.lanora) .page > .toc {
    width: auto;
    margin: 0;
    padding: 0 calc(var(--bleed) + 80px);
  }
  :where(.lanora) .page > .info-full {
    width: auto;
    margin: 0;
    padding: 56px calc(var(--bleed) + 189px) 80px;
  }
}
