/* ===============================================================
   JESMEE — bổ sung cho ảnh thật và luồng đặt hàng qua Zalo.
   Dùng lại token trong colors_and_type.css.
   =============================================================== */

.jm-photo {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  background: var(--jm-surface);
}

/* Product card: ảnh thứ hai hiện khi rê chuột */
.jm-pcard__img > .jm-glyph { position: absolute; inset: 0; }
.jm-pcard__hover {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity var(--jm-duration) var(--jm-ease);
}
@media (hover: hover) {
  .jm-pcard:hover .jm-pcard__hover { opacity: 1; }
}
.jm-pcard__list,
.jm-pdp__list {
  margin-left: 8px;
  color: var(--jm-muted);
  font-weight: var(--jm-weight-regular);
  font-size: 0.85em;
}

.jm-cart-line__img,
.jm-checkout__line-img { overflow: visible; }
.jm-cart-line__img .jm-photo,
.jm-checkout__line-img .jm-photo { aspect-ratio: 1; }

/* Hero / editorial: ảnh thật giữ chiều cao như khung thiết kế */
.jm-editorial-img.jm-photo { height: 100%; }
.jm-hero__art .jm-editorial-img.jm-photo { height: 600px; }
.jm-editorial__art .jm-editorial-img.jm-photo,
.jm-about__hero-art .jm-editorial-img.jm-photo,
.jm-rail-card__art .jm-editorial-img.jm-photo { height: 100%; min-height: 360px; }

/* Liên hệ — chỉ còn cột thông tin */
.jm-contact__side--solo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--jm-space-lg);
}
.jm-contact__side--solo .jm-btn { margin-top: 12px; }

/* Đặt hàng thành công */
.jm-success__order {
  font-family: var(--jm-font-sans);
  font-size: var(--jm-size-small);
  line-height: 1.6;
  max-width: 520px;
  margin: 0 auto;
  display: block;
  resize: vertical;
  text-align: left;
  background: var(--jm-surface);
}
.jm-success__actions {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 12px; margin-top: 20px;
}

/* Icon Lucide vẽ bên trong thẻ <i> */
i.jm-icon { display: inline-flex; align-items: center; justify-content: center; flex: none; }
i.jm-icon > svg { width: 100%; height: 100%; stroke-width: 1.5; }

.jm-pdp__shopee { margin-top: 10px; width: 100%; }

/* Tìm kiếm */
.jm-search {
  position: fixed; z-index: 60; left: 50%; transform: translateX(-50%);
  top: calc(env(safe-area-inset-top, 0px) + 24px);
  width: min(720px, calc(100% - 32px)); max-height: calc(100vh - 48px);
  background: var(--jm-white); border-radius: var(--jm-radius-lg);
  box-shadow: var(--jm-shadow-modal); display: flex; flex-direction: column; overflow: hidden;
}
.jm-search__bar { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--jm-border); }
.jm-search__input { flex: 1; border: 0; outline: none; font: inherit; font-size: 1rem; background: transparent; color: var(--jm-text); min-width: 0; }
.jm-search__body { padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.jm-search__suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.jm-search__chip { font: inherit; font-size: 13px; padding: 6px 12px; border: 1px solid var(--jm-border); border-radius: var(--jm-radius-pill); background: transparent; color: var(--jm-text); cursor: pointer; }
.jm-search__chip:hover { border-color: var(--jm-cam-dat); color: var(--jm-cam-dat); }
.jm-search__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.jm-search__item { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; text-decoration: none; color: inherit; padding: 6px; border-radius: var(--jm-radius-sm); }
.jm-search__item:hover { background: var(--jm-surface); text-decoration: none; color: inherit; }
.jm-search__thumb { width: 64px; height: 64px; overflow: hidden; background: var(--jm-surface); border-radius: var(--jm-radius-sm); }
.jm-version { opacity: .6; }
@media (max-width: 600px) { .jm-search__grid { grid-template-columns: 1fr; } }

/* Logo chính thức (PNG nền trong) */
.jm-logo { height: 46px; width: auto; display: block; }
@media (max-width: 600px) { .jm-logo { height: 36px; } }

/* ----- Bộ sưu tập --------------------------------------------- */
.jm-rail--4 { grid-template-columns: repeat(4, 1fr); }
.jm-rail-card__art .jm-photo { aspect-ratio: 4 / 5; height: auto; }

.jm-colgrid {
  display: grid; gap: var(--jm-space-lg);
  grid-template-columns: repeat(2, 1fr);
}
.jm-colgrid--sm { grid-template-columns: repeat(3, 1fr); gap: 20px; }
.jm-colcard { display: flex; flex-direction: column; gap: 16px; text-decoration: none; color: inherit; }
.jm-colcard:hover { text-decoration: none; color: inherit; }
.jm-colcard__art { aspect-ratio: 4 / 3; overflow: hidden; background: var(--jm-surface); border-radius: var(--jm-radius-sm); }
.jm-colgrid--sm .jm-colcard__art { aspect-ratio: 4 / 5; }
.jm-colcard__art .jm-photo,
.jm-colcard__art .jm-editorial-img { transition: transform 600ms var(--jm-ease); }
.jm-colcard:hover .jm-colcard__art .jm-photo { transform: scale(1.03); }
.jm-colcard__body { display: flex; flex-direction: column; gap: 6px; }
.jm-colcard__name {
  font-family: var(--jm-font-display); font-weight: 400;
  font-size: clamp(1.5rem, 2.6vw, 2.25rem); line-height: 1.1; margin: 4px 0 0;
}
.jm-colgrid--sm .jm-colcard__name { font-size: 1.375rem; }

.jm-colhero {
  display: grid; grid-template-columns: 1.15fr 1fr;
  min-height: 560px; background: var(--jm-surface);
}
.jm-colhero__art { overflow: hidden; }
.jm-colhero__art .jm-photo, .jm-colhero__art .jm-editorial-img { height: 100%; min-height: 420px; }
.jm-colhero__copy {
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  gap: 18px; padding: var(--jm-space-xl) max(32px, 6vw);
}
.jm-colhero__name {
  font-family: var(--jm-font-display); font-weight: 400;
  font-size: var(--jm-size-display); line-height: 1.05; margin: 0;
}
.jm-colhero__tagline { font-size: 1.25rem; font-weight: 300; margin: 0; }
.jm-colhero__story { color: var(--jm-muted); max-width: 46ch; margin: 0 0 8px; }

.jm-colsoon {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 14px; max-width: 560px;
}

.jm-lookbook {
  display: grid; gap: 12px;
  grid-template-columns: repeat(3, 1fr);
}
.jm-lookbook__item { aspect-ratio: 4 / 5; overflow: hidden; background: var(--jm-surface); }
.jm-lookbook__item:nth-child(5n + 1) { grid-row: span 2; aspect-ratio: auto; }

/* Bán chạy: số thứ hạng */
.jm-ranked { position: relative; }
.jm-ranked__n {
  position: absolute; z-index: 2; top: 10px; right: 12px;
  font-family: var(--jm-font-display); font-size: 1.5rem; line-height: 1;
  color: var(--jm-white); text-shadow: 0 1px 8px rgba(28, 20, 18, 0.35);
  pointer-events: none;
}
.jm-mobile-drawer__sub { padding-left: 16px !important; font-size: 0.875rem; color: var(--jm-muted); }

@media (max-width: 960px) {
  .jm-rail--4 { grid-template-columns: repeat(2, 1fr); }
  .jm-colhero { grid-template-columns: 1fr; min-height: 0; }
  .jm-colhero__art .jm-photo { max-height: 70vh; }
  .jm-colgrid--sm { grid-template-columns: repeat(2, 1fr); }
  .jm-lookbook { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .jm-colgrid { grid-template-columns: 1fr; }
  .jm-colhero__copy { padding: 32px 16px 40px; }
}

@media (max-width: 960px) {
  .jm-hero__art .jm-editorial-img.jm-photo { height: 460px; }
}
@media (max-width: 600px) {
  .jm-hero__art .jm-editorial-img.jm-photo { height: 360px; }
}

/* Thông báo nhỏ khi bấm "Nhắn Zalo đặt hàng" (chế độ tắt giỏ hàng) */
.jm-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 9999;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: calc(100% - 32px); padding: 12px 18px;
  background: var(--jm-text, #1C1412); color: #fff; font-family: var(--jm-font-sans); font-size: 14px; line-height: 1.4;
  border-radius: 999px; box-shadow: 0 6px 24px rgba(0,0,0,.18);
  transition: opacity .25s ease, transform .25s ease;
}
.jm-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ----- Biến thể màu + phân loại (trang sản phẩm, thẻ sản phẩm) ----- */
.jm-pdp__cta--stack { flex-direction: column; }
.jm-pdp__cta--stack .jm-pdp__shopee { margin-top: 0; }
.jm-pdp__facts { margin: 20px 0 0; display: grid; gap: 6px; }
.jm-pdp__facts:empty { display: none; }
.jm-pdp__facts > div { display: flex; gap: 8px; font-size: 14px; }
.jm-pdp__facts dt { color: var(--jm-muted); min-width: 72px; }
.jm-pdp__facts dd { margin: 0; color: var(--jm-text); }
.jm-pdp__field-label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.jm-pdp__missing { color: var(--jm-cam-dat); }
.jm-pdp__size.is-missing .jm-size-chip { border-color: var(--jm-cam-dat); }
.jm-color-chip { display: inline-flex; align-items: center; gap: 8px; }
.jm-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(28, 20, 18, .18); flex: none; }
.jm-pcard__swatches { display: inline-flex; gap: 5px; align-items: center; }
.jm-pcard__swatches .jm-swatch { width: 11px; height: 11px; }
.jm-pdp__img-note { margin: 8px 0 0; color: var(--jm-muted); }
/* Thẻ sản phẩm trên điện thoại: cột co được (minmax 0) + dòng giá/chất liệu được xuống dòng -> không tràn ngang */
.jm-grid > *, .jm-grid--shop > * { min-width: 0; }
.jm-pcard__meta { flex-wrap: wrap; }
/* ----- Hướng dẫn chọn size nhẫn (components/RingSizeGuide.jsx) ----- */
.jm-pdp__guide-link { margin-top: 12px; display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; font-size: 13px; color: var(--jm-cam-dat); text-decoration: underline; text-underline-offset: 3px; }
.jm-sg-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(28, 20, 18, .45); display: flex; align-items: center; justify-content: center; padding: 24px; }
.jm-sg { position: relative; width: 100%; max-width: 560px; max-height: calc(100vh - 48px); overflow-y: auto; background: var(--jm-white);
  padding: 28px 24px 32px; border-radius: 6px; line-height: 1.6; color: var(--jm-text); }
.jm-sg__close { position: absolute; top: 12px; right: 12px; background: none; border: 0; cursor: pointer; padding: 6px; color: var(--jm-text); }
.jm-sg__title { font-size: 1.35rem; font-weight: 600; letter-spacing: .02em; margin: 0 32px 4px 0; }
.jm-sg__lead { color: var(--jm-muted); margin: 0 0 8px; font-size: .95rem; }
.jm-sg__h { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--jm-cam-dat); margin: 24px 0 10px; }
.jm-sg__way { border: 1px solid var(--jm-border); border-radius: 4px; padding: 16px; }
.jm-sg__steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.jm-sg__step { text-align: center; font-size: .82rem; }
.jm-sg__step svg { width: 100%; height: auto; background: var(--jm-surface, #F2EDE8); border-radius: 4px; }
.jm-sg__step b { display: block; color: var(--jm-cam-dat); font-size: .75rem; letter-spacing: .1em; }
.jm-sg__calc { background: #F5E8E0; border-radius: 4px; padding: 14px; margin-top: 12px; }
.jm-sg__calc label { font-size: .85rem; display: block; margin-bottom: 6px; }
.jm-sg__calc-row { display: flex; gap: 8px; flex-wrap: wrap; }
.jm-sg__calc input, .jm-sg__calc select { padding: 8px; border: 1px solid var(--jm-border); border-radius: 4px; font: inherit; background: var(--jm-white); }
.jm-sg__calc input { width: 110px; }
.jm-sg__out { margin-top: 8px; font-weight: 600; min-height: 1.6em; }
.jm-sg__table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.jm-sg__table th, .jm-sg__table td { border-bottom: 1px solid var(--jm-border); padding: 9px 6px; text-align: center; }
.jm-sg__table th { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--jm-muted); font-weight: 500; }
.jm-sg__table td:first-child { font-weight: 600; }
.jm-sg__table tr.is-pending td { color: var(--jm-muted); }
.jm-sg__tips { padding-left: 18px; margin: 0; }
.jm-sg__tips li { margin: 6px 0; }
.jm-sg__help { margin-top: 20px; font-size: .9rem; color: var(--jm-muted); }
.jm-sg__help a { color: var(--jm-cam-dat); }
@media (max-width: 640px) {
  .jm-sg-overlay { align-items: flex-end; padding: 0; }
  .jm-sg { max-height: 88vh; border-radius: 14px 14px 0 0; padding: 24px 16px 28px; animation: jm-sg-up .25s ease-out; }
  .jm-sg__steps { grid-template-columns: 1fr; }
  .jm-sg__step svg { max-width: 200px; }
}
@keyframes jm-sg-up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
/* ----- Đánh giá khách thật (components/Reviews.jsx, Testimonials.jsx) ----- */
.jm-pcard__sold { font-size: 12px; color: var(--jm-muted); margin-top: 2px; }
.jm-pdp__sold { color: var(--jm-muted); }
.jm-rv-strip { margin-top: 16px; }
.jm-rv-strip__label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--jm-cam-dat); font-weight: 600; margin-bottom: 8px; }
.jm-rv-strip__row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.jm-rv-strip__item { flex: none; width: 76px; height: 76px; padding: 0; border: 1px solid var(--jm-border); background: var(--jm-white); cursor: zoom-in; scroll-snap-align: start; }
.jm-rv-strip__item img, .jm-rv__imgs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jm-rv { margin-top: 64px; padding-top: 48px; border-top: 1px solid var(--jm-border); }
.jm-rv__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.jm-rv__grid > * { min-width: 0; }
.jm-rv__card { background: var(--jm-white); border: 1px solid var(--jm-border); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.jm-rv__stars { color: #C9A24A; letter-spacing: 2px; font-size: 14px; }
.jm-rv__text { margin: 0; font-size: 14px; line-height: 1.6; color: var(--jm-text); overflow-wrap: anywhere; }
.jm-rv__imgs { display: flex; gap: 6px; flex-wrap: wrap; }
.jm-rv__imgs button { width: 64px; height: 64px; padding: 0; border: 0; background: none; cursor: zoom-in; }
.jm-rv__meta { margin-top: auto; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--jm-muted); }
.jm-rv__meta a { color: var(--jm-text); }
.jm-rv__src { margin-left: auto; font-size: 11px; }
.jm-rv-lightbox { position: fixed; inset: 0; z-index: 210; background: rgba(28, 20, 18, .82); display: flex; align-items: center; justify-content: center; padding: 16px; }
.jm-rv-lightbox figure { position: relative; margin: 0; max-width: 720px; width: 100%; max-height: 100%; overflow-y: auto; background: var(--jm-white); }
.jm-rv-lightbox img { width: 100%; max-height: 70vh; object-fit: contain; background: #111; display: block; }
.jm-rv-lightbox figcaption { padding: 16px; display: grid; gap: 8px; }
.jm-rv-lightbox figcaption p { margin: 0; font-size: 14px; line-height: 1.6; }
.jm-rv-lightbox__close { position: absolute; top: 8px; right: 8px; z-index: 1; background: rgba(255, 255, 255, .9); border: 0; border-radius: 50%; width: 36px; height: 36px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
@media (max-width: 640px) { .jm-rv { margin-top: 40px; padding-top: 32px; } .jm-rv__card { padding: 16px; } }