/* Home Page Stylesheet - Sam Jewelry */

/* ==========================================================================
   1. Hero Slider Section
   ========================================================================== */
#hero-slider-section {
  height: calc(100vh - 80px);
  position: relative;
  overflow: hidden;
}

#slider-track {
  display: flex;
  height: 100%;
  will-change: transform;
  touch-action: pan-y;
  position: relative;
  z-index: 5;
}

.hero-slide {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
  display: block;
  overflow: hidden;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

a.hero-slide {
  pointer-events: auto;
  cursor: pointer;
}

.slider-arrow {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  z-index: 30 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  background-color: rgba(0, 0, 0, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
  opacity: 0.9 !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  cursor: pointer !important;
}

#slider-prev {
  left: 24px !important;
}

#slider-next {
  right: 24px !important;
}

.slider-arrow:hover {
  opacity: 1 !important;
  background-color: #CA8471 !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  box-shadow: 0 0 15px rgba(202, 132, 113, 0.5) !important;
  transform: translateY(-50%) scale(1.08) !important;
}

.slider-arrow svg {
  stroke: #ffffff !important;
  width: 24px !important;
  height: 24px !important;
}

#slider-dots {
  position: absolute !important;
  bottom: 24px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 30 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
}

.slider-dot {
  display: inline-block !important;
  width: 10px !important;
  height: 10px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.45) !important;
  border: 2px solid transparent !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  cursor: pointer !important;
  padding: 0 !important;
}

.slider-dot:hover {
  background: rgba(255, 255, 255, 0.8) !important;
  transform: scale(1.2) !important;
}

.slider-dot.active {
  background: #CA8471 !important;
  border-color: #ffffff !important;
  width: 28px !important;
  border-radius: 6px !important;
  box-shadow: 0 0 8px rgba(202, 132, 113, 0.6) !important;
}

/* Mobile only (<= 767px): hero giữ đúng tỉ lệ gốc của banner (12:5) → hiển thị trọn ảnh, không cắt/méo */
@media (max-width: 767px) {
  #hero-slider-section {
    height: 41.6667vw; /* = 100vw * 5 / 12 */
    min-height: 0;
    max-height: none;
  }

  /* Bộ sưu tập: lưới 3 cột (2 hàng với 6 danh mục), gọn và vẫn đủ dùng */
  .section-category {
    padding-top: 2.25rem !important;
    padding-bottom: 0 !important;
  }
  .section-category .reveal-on-scroll {
    margin-bottom: 1.5rem;
  }
  .section-category > div {
    padding-bottom: 2.25rem !important;
  }
  .cat-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 12px !important;
    row-gap: 20px !important;
    max-width: 420px;
    margin: 0 auto;
  }
  .cat-grid .cat-item {
    min-width: 0;
  }
  .cat-grid .cat-wrapper {
    width: 100% !important;
    max-width: 96px;
    height: auto !important;
    aspect-ratio: 1 / 1;
    margin-bottom: 8px !important;
  }
  .cat-grid .cat-img {
    padding: 8px !important;
  }
  .cat-grid .cat-name {
    font-size: 12px !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .cat-grid .cat-count {
    display: none;
  }
  .slider-arrow {
    width: 36px !important;
    height: 36px !important;
  }
  .slider-arrow svg {
    width: 18px !important;
    height: 18px !important;
  }
  #slider-prev {
    left: 10px !important;
  }
  #slider-next {
    right: 10px !important;
  }
  #slider-dots {
    bottom: 12px !important;
    gap: 8px !important;
  }
  .slider-dot.active {
    width: 22px !important;
  }
}

/* Sản phẩm bán chạy — padding trên cho desktop/tablet (trước đây là inline style) */
.section-bestsellers {
  padding-top: 96px !important;
}

/* Mobile (<= 767px): Sản phẩm bán chạy — tiêu đề căn giữa đồng bộ với "Bộ sưu tập",
   lề trên = lề dưới, lề trái/phải tiêu đề khớp với lề thẻ sản phẩm */
@media (max-width: 767px) {
  .section-bestsellers {
    padding-top: 2.25rem !important;
    padding-bottom: 2.25rem !important;
  }
  .section-bestsellers > div > div:first-child {
    justify-content: center;
    text-align: center;
    margin-bottom: 1rem;
  }
  .section-bestsellers > div > div:first-child p {
    margin-bottom: 0.4rem;
  }
  #bs-dots {
    margin-top: 1.25rem;
  }
}

/* Mobile phổ biến (360px – 479px): vừa đúng 2 thẻ trong khung, không bị cắt mép phải
   (JS getVC() tương ứng = 2 thẻ/lần hiển thị) */
@media (min-width: 360px) and (max-width: 479px) {
  #bs-track {
    gap: 0.75rem;
  }
  #bs-track .bs-card {
    width: calc((100% - 0.75rem) / 2) !important;
    padding: 0.7rem;
  }
}

/* Tablet / điện thoại xoay ngang (768px – 1023px): thẻ trước đây rộng cố định 220px nên với khung
   rộng (vd. iPhone Pro Max ngang 932px) JS chỉ trượt 3 thẻ nhưng khung còn chỗ cho thẻ thứ 4 → thẻ bị cắt
   lệch mép phải, lề trái/phải mất cân đối. Chia đều theo chiều rộng khung, khớp với getVC() trong home.js:
   768–899px = 3 thẻ, 900–1023px = 4 thẻ. */
@media (min-width: 768px) and (max-width: 899px) {
  #bs-track .bs-card {
    width: calc((100% - 2.5rem) / 3) !important;
  }
}
@media (min-width: 900px) and (max-width: 1023px) {
  #bs-track .bs-card {
    width: calc((100% - 3.75rem) / 4) !important;
  }
}

/* Tablet / điện thoại xoay ngang (768px – 1023px): lề trên (96px) lớn hơn lề dưới (64px) nên khối
   nhìn lệch → đặt lề trên = lề dưới = 4rem. Desktop (>= 1024px) giữ nguyên 96px. */
@media (min-width: 768px) and (max-width: 1023px) {
  .section-bestsellers {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
  }
}

/* Mobile (<= 767px): Sản phẩm tiêu biểu — lề trên = lề dưới (2.25rem), khoảng cách tiêu đề → lưới gọn,
   khoảng cách giữa thẻ + padding thẻ đồng bộ với khối "Sản phẩm bán chạy" */
@media (max-width: 767px) {
  .section-featured {
    padding-top: 2.25rem !important;
    padding-bottom: 2.25rem !important;
  }
  .section-featured > div > div:first-child {
    margin-bottom: 1.25rem;
  }
  .section-featured > div > div:first-child p {
    margin-bottom: 0.4rem;
  }
  .section-featured .grid {
    gap: 0.75rem;
  }
  .section-featured .grid > article {
    padding: 0.7rem;
  }
  .section-featured > div > div:last-child {
    margin-top: 1.75rem;
  }
}

/* Tablet / màn hình hẹp (768px – 1199px): danh mục nằm trên 1 dòng, vòng tròn tự co cho vừa khung */
@media (min-width: 768px) and (max-width: 1199px) {
  .cat-grid {
    display: grid !important;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 16px !important;
    align-items: start;
  }
  .cat-grid .cat-item {
    min-width: 0;
  }
  .cat-grid .cat-wrapper {
    width: 100% !important;
    max-width: 136px;
    height: auto !important;
    aspect-ratio: 1 / 1;
  }
}

/* Mobile (<= 767px): Banner "Và mãi mãi" — dựng lại đúng bố cục PC:
   ảnh giữ NGUYÊN TỈ LỆ gốc (chiều cao tự động theo ảnh, thay ảnh nào cũng đúng),
   chữ nằm trên ảnh, căn trái, lớp phủ sáng từ trái sang phải; cỡ chữ tính theo vw để tỉ lệ giống PC */
@media (max-width: 767px) {
  .eb-frame {
    aspect-ratio: auto !important;
    min-height: 0 !important;
    height: auto !important;
  }
  .eb-bg {
    position: relative !important;
    inset: auto !important;
  }
  .eb-bg img {
    display: block;
    width: 100%;
    height: auto !important;
    min-height: 11.5rem;           /* đủ chỗ cho chữ nếu ảnh quá dẹt */
    object-fit: cover;
    object-position: 72% center;   /* ảnh đúng tỉ lệ thì không bị cắt; nếu bị, ưu tiên phần bên phải */
  }
  .eb-overlay {
    background: linear-gradient(
      to right,
      rgba(255, 255, 255, 0.92) 0%,
      rgba(255, 255, 255, 0.6) 38%,
      rgba(255, 255, 255, 0) 74%
    ) !important;
  }
  .dark .eb-overlay {
    background: linear-gradient(
      to right,
      rgba(12, 8, 7, 0.92) 0%,
      rgba(12, 8, 7, 0.6) 38%,
      rgba(12, 8, 7, 0) 74%
    ) !important;
  }
  /* Chữ: giữ nguyên lớp phủ tuyệt đối trên ảnh (như PC), căn giữa theo chiều dọc */
  .eb-content {
    position: absolute !important;
    inset: 0 !important;
    padding: 0;
  }
  .eb-text {
    max-width: 60% !important;
    margin: 0;
    text-align: left;
  }
  .eb-text > * + * {
    margin-top: clamp(0.5rem, 3vw, 0.85rem) !important;
  }
  .eb-text .space-y-2 > * + * {
    margin-top: 0.1rem !important;
  }
  /* "VÀ Mãi mãi" trên cùng một dòng như PC */
  .eb-text h3 {
    font-size: clamp(1.3rem, 6.4vw, 1.9rem);
    line-height: 1.15;
  }
  .eb-text h3 span {
    display: inline-block !important;
    margin-left: 0 !important;
  }
  .eb-text h3 span + span {
    margin-left: 0.3rem !important;
  }
  .eb-text p {
    font-size: clamp(0.66rem, 3.3vw, 0.95rem);
    letter-spacing: 0.2em;
    line-height: 1.3;
  }
  .eb-text a {
    font-size: clamp(0.56rem, 2.7vw, 0.72rem);
    letter-spacing: 0.16em;
    text-underline-offset: 6px;
  }
}




/* Mobile + Tablet (<= 1199px): khối chính sách/chất liệu tự cao theo nội dung, không bị cắt chữ.
   Hai nhóm xếp chồng trong cùng một ô lưới (vẫn fade luân phiên như cũ). */
@media (max-width: 1199px) {
  .custom-salmon-group-container .custom-salmon-group-wrapper {
    display: grid;
  }
  .custom-salmon-group-wrapper .salmon-group-1,
  .custom-salmon-group-wrapper .salmon-group-2 {
    position: relative;
    grid-area: 1 / 1;
  }
}
.usp-m-head,
.usp-m-sign {
  display: none;
}
@media (max-width: 767px) {
  /* ---- Khối "Trải nghiệm tuyệt vời": nền tràn viền + thẻ trắng ---- */
  .section-usp.footer-gradient {
    padding-top: 2rem;
    padding-bottom: 2.25rem;
  }
  .section-usp .custom-salmon-group-container {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    overflow: visible;
  }
  .section-usp .custom-salmon-group-container .custom-salmon-group-wrapper {
    min-height: 0;
    padding: 0;
    overflow: visible;
  }

  /* Tiêu đề nhỏ + 2 vạch hai bên */
  .usp-m-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    margin: 0 0 1.5rem;
    font-family: inherit;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.92);
    white-space: nowrap;
  }
  .usp-m-head::before,
  .usp-m-head::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.55));
  }
  .usp-m-head::after {
    background: linear-gradient(270deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.55));
  }

  /* Chữ ký thương hiệu cuối panel */
  .usp-m-sign {
    display: block;
    position: relative;
    width: 100%;
    margin-top: 1.75rem;
    text-align: center;
    line-height: 1.1;
  }
  .usp-m-sign__script {
    display: block;
    font-family: "Great Vibes", cursive;
    font-size: 1.9rem;
    color: rgba(255, 255, 255, 0.88);
  }
  .usp-m-sign__tag {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.55rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
  }

  /* Hai nhóm: danh sách thẻ xếp dọc */
  .custom-salmon-group-wrapper .salmon-group-1,
  .custom-salmon-group-wrapper .salmon-group-2 {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-rows: 1fr;
    align-items: stretch !important;
    gap: 0.8rem !important;
    padding: 0;
    text-align: left;
  }

  /* Mỗi mục = 1 thẻ trắng: [icon tròn] | tiêu đề + mô tả | [nút ›] */
  .custom-salmon-group-wrapper .salmon-group-1 > div,
  .custom-salmon-group-wrapper .salmon-group-2 > div {
    position: relative;
    display: grid !important;
    grid-template-columns: 54px minmax(0, 1fr) 34px;
    grid-template-rows: auto auto;
    column-gap: 1rem;
    row-gap: 0 !important;
    align-items: center !important;
    align-content: center;
    justify-content: stretch !important;
    height: auto !important;
    min-height: 6rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(60, 20, 10, 0.2);
    text-align: left;
  }
  .custom-salmon-group-wrapper .salmon-group-1 > div > *,
  .custom-salmon-group-wrapper .salmon-group-2 > div > * {
    margin: 0 !important;
  }
  .custom-salmon-group-wrapper .salmon-group-1 > div > div:first-child,
  .custom-salmon-group-wrapper .salmon-group-2 > div > div:first-child {
    display: contents;
  }

  /* Icon trong vòng tròn hồng nhạt */
  .custom-salmon-group-wrapper .salmon-group-1 > div > div:first-child > div:first-child,
  .custom-salmon-group-wrapper .salmon-group-2 > div > div:first-child > div:first-child {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #FBEDE7;
  }
  .custom-salmon-group-wrapper .salmon-group-1 svg,
  .custom-salmon-group-wrapper .salmon-group-2 svg {
    width: 26px;
    height: 26px;
    color: #B5513C;
  }

  .custom-salmon-group-wrapper .salmon-group-1 h4,
  .custom-salmon-group-wrapper .salmon-group-2 h4 {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    line-height: 1.3;
    color: #3B241D;
    margin-bottom: 0.3rem !important;
  }
  .custom-salmon-group-wrapper .salmon-group-1 p,
  .custom-salmon-group-wrapper .salmon-group-2 p {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
    font-size: 0.8rem;
    letter-spacing: 0;
    line-height: 1.45;
    color: #5E4A43;
  }

  /* Liên kết: nút tròn ›; toàn bộ thẻ đều bấm được */
  .custom-salmon-group-wrapper .salmon-group-1 > div > a,
  .custom-salmon-group-wrapper .salmon-group-2 > div > a {
    grid-column: 3;
    grid-row: 1 / span 2;
    justify-self: end;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #FBEDE7;
    color: #B5513C;
    font-size: 0;
    text-decoration: none !important;
    transition: background 0.25s ease, transform 0.25s ease;
  }
  .custom-salmon-group-wrapper .salmon-group-1 > div > a::before,
  .custom-salmon-group-wrapper .salmon-group-2 > div > a::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 16px;
  }
  .custom-salmon-group-wrapper .salmon-group-1 > div > a::after,
  .custom-salmon-group-wrapper .salmon-group-2 > div > a::after {
    content: "\203A";
    font-size: 1.35rem;
    line-height: 1;
    margin-top: -2px;
    color: inherit;
  }
  .custom-salmon-group-wrapper .salmon-group-1 > div:active,
  .custom-salmon-group-wrapper .salmon-group-2 > div:active {
    transform: scale(0.985);
  }

  /* Dark mode: thẻ tối, chữ sáng (màu chữ đã có sẵn ở phần Dark Mode) */
  .dark .custom-salmon-group-wrapper .salmon-group-1 > div,
  .dark .custom-salmon-group-wrapper .salmon-group-2 > div {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(217, 141, 120, 0.2);
    box-shadow: none;
  }
  .dark .custom-salmon-group-wrapper .salmon-group-1 > div > div:first-child > div:first-child,
  .dark .custom-salmon-group-wrapper .salmon-group-2 > div > div:first-child > div:first-child,
  .dark .custom-salmon-group-wrapper .salmon-group-1 > div > a,
  .dark .custom-salmon-group-wrapper .salmon-group-2 > div > a {
    background: rgba(217, 141, 120, 0.14);
  }
}



/* ==========================================================================
   2. Categories Hover Styles (Box-shadow ring + glow — no gap artifacts)
   ========================================================================== */

/* Default resting state */
.cat-wrapper {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Light mode hover: ring mờ, nhẹ — tinh tế trên nền sáng */
.cat-item:hover .cat-wrapper {
  transform: translateY(-5px);
  box-shadow:
    0 0 0 1.5px rgba(217, 141, 120, 0.55),
    0 0 14px 3px rgba(217, 141, 120, 0.18),
    0 10px 28px rgba(0, 0, 0, 0.10);
}

/* Dark mode hover: ring sắc nét + glow mạnh */
.dark .cat-item:hover .cat-wrapper {
  transform: translateY(-5px);
  box-shadow:
    0 0 0 2px #CA8471,
    0 0 22px 8px rgba(217, 141, 120, 0.45),
    0 0 50px 12px rgba(217, 141, 120, 0.18);
}

.cat-item:hover .cat-img {
  transform: scale(1.1);
}

.cat-item:hover .cat-name {
  color: #CA8471;
}


/* ==========================================================================
   3. Policies & Brand Values Group Animations (Salmon Section)
   ========================================================================== */
.custom-salmon-group-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  padding: 2rem 0;
}

.custom-salmon-group-wrapper {
  position: relative;
  width: 100%;
  min-height: 520px; /* High min-height for stacked elements on mobile */
  overflow: hidden;
}

@media (min-width: 768px) {
  .custom-salmon-group-wrapper {
    min-height: 170px; /* Prevent clipping of text and buttons on desktop */
  }
}

.salmon-group-1,
.salmon-group-2 {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  width: 100%;
  transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.salmon-group-1 {
  animation: luxuryGroup1Fade 14s infinite;
}

.salmon-group-2 {
  animation: luxuryGroup2Fade 14s infinite;
}

@keyframes luxuryGroup1Fade {
  /* Group 1 active and visible */
  0%, 44% {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    filter: blur(0);
  }
  /* Group 1 fades and exits moving UP */
  50% {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-30px);
    pointer-events: none;
    filter: blur(4px);
  }
  /* Group 1 invisible jump to bottom, ready to slide up */
  51%, 94% {
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px);
    pointer-events: none;
    filter: blur(4px);
  }
  /* Group 1 enters moving UP from below */
  100% {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    filter: blur(0);
  }
}

@keyframes luxuryGroup2Fade {
  /* Group 2 inactive at bottom, waiting to enter */
  0%, 44% {
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px);
    pointer-events: none;
    filter: blur(4px);
  }
  /* Group 2 enters moving UP from below, then active and visible */
  50%, 94% {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    filter: blur(0);
  }
  /* Group 2 exits moving UP */
  100% {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-30px);
    pointer-events: none;
    filter: blur(4px);
  }
}

/* ==========================================================================
   4. Newsletter Luxury Section & Spacing
   ========================================================================== */
.newsletter-section-luxury {
  /* Default: Light mode colors */
  --nl-bg-color: #FAF8F6; /* bg-bg-light */
  --nl-glow-color: rgba(202, 132, 113, 0.22); /* Center gradient block */
  --nl-text-primary: #1A1513; /* text-text-light-primary */
  --nl-text-secondary: rgba(26, 21, 19, 0.7); /* text-text-light-secondary */
  --nl-text-muted: rgba(26, 21, 19, 0.45);
  --nl-divider-color: rgba(26, 21, 19, 0.08);
  --nl-input-border: rgba(26, 21, 19, 0.2);
  --nl-input-placeholder: rgba(26, 21, 19, 0.35);

  background-color: var(--nl-bg-color);
  color: var(--nl-text-primary);
  position: relative;
  overflow: hidden;
  padding: 5rem 0; /* py-20 */
  border-bottom: 3.5rem solid #FAF8F6; /* Dải phân cách light mode trước footer */
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Dark mode override */
.dark .newsletter-section-luxury {
  --nl-bg-color: #0C0807; /* Đồng nhất với section-magazine dark:bg-[#0C0807] */
  --nl-glow-color: rgba(217, 141, 120, 0.12);
  --nl-text-primary: #F4ECE8;
  --nl-text-secondary: rgba(244, 236, 232, 0.68);
  --nl-text-muted: rgba(244, 236, 232, 0.4);
  --nl-divider-color: transparent;
  --nl-input-border: rgba(244, 236, 232, 0.18);
  --nl-input-placeholder: rgba(244, 236, 232, 0.32);

  background: #0C0807 !important;
  background-color: #0C0807 !important;
  border-top: none !important;
  border-bottom: 3.5rem solid #0C0807 !important; /* Dải phân cách #0C0807 giữa newsletter và footer */
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* Mobile (<= 767px): bỏ dải trắng 3.5rem (border-bottom) giữa khối Liên hệ & Hỗ trợ và footer,
   footer nối liền ngay sau khối; padding trên = dưới (2.25rem) đồng bộ các khối khác.
   Đặt SAU rule dark ở trên để thắng cùng độ ưu tiên (!important). */
@media (max-width: 767px) {
  .newsletter-section-luxury,
  .dark .newsletter-section-luxury {
    border-bottom: 0 !important;
    padding-top: 2.25rem;
    padding-bottom: 2.25rem;
  }
}

/* Tablet / điện thoại xoay ngang (768px – 1023px): cũng bỏ dải trắng 3.5rem trước footer
   (trước đây chỉ bỏ ở mobile dọc nên xoay ngang vẫn lộ 1 dải trắng giữa newsletter và footer).
   Desktop (>= 1024px) giữ nguyên. */
@media (min-width: 768px) and (max-width: 1023px) {
  .newsletter-section-luxury,
  .dark .newsletter-section-luxury {
    border-bottom: 0 !important;
  }
}

/* Background Glow */
.newsletter-glow-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background-color: var(--nl-glow-color);
  border-radius: 9999px;
  filter: blur(120px);
  pointer-events: none;
  transition: background-color 0.4s ease;
}

/* Layout Wrapper - Aligned exactly with max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 */
.newsletter-layout-wrapper {
  max-width: 1280px; /* matches max-w-7xl */
  margin: 0 auto;
  padding: 0 1rem; /* px-4 */
  position: relative;
  z-index: 10;
}

@media (min-width: 640px) {
  .newsletter-layout-wrapper {
    padding: 0 1.5rem; /* sm:px-6 */
  }
}

@media (min-width: 1024px) {
  .newsletter-layout-wrapper {
    padding: 0 2rem; /* lg:px-8 */
  }
}

/* Responsive Grid Container */
.newsletter-grid-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.5rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .newsletter-grid-container {
    grid-template-columns: 1fr 1fr; /* 2-column split */
    gap: 5rem;
  }
}

/* Columns */
.newsletter-column-left {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  text-align: center;
}

@media (min-width: 1024px) {
  .newsletter-column-left {
    /* Light mode: subtle warm divider */
    border-right: 1px solid var(--nl-divider-color);
    padding-right: 4rem;
    position: relative;
  }

  /* Dark mode: replace hard border with soft gradient line */
  .dark .newsletter-column-left {
    border-right: none;
  }
  .dark .newsletter-column-left::after {
    content: '';
    position: absolute;
    right: 0;
    top: 8%;
    height: 84%;
    width: 1px;
    background: linear-gradient(
      to bottom,
      transparent 0%,
      rgba(217, 141, 120, 0.18) 25%,
      rgba(217, 141, 120, 0.28) 50%,
      rgba(217, 141, 120, 0.18) 75%,
      transparent 100%
    );
  }
}

.newsletter-column-right {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  text-align: center;
}

/* Title block */
.newsletter-title-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.hotline-section-subtitle {
  display: block;
  font-size: 10px;
  letter-spacing: 0.4em;
  color: #CA8471; /* primary golden accent */
  text-transform: uppercase;
  font-weight: 700;
}

.hotline-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  letter-spacing: 0.05em;
  color: var(--nl-text-primary);
  font-weight: 500;
  margin: 0;
  line-height: 1.2;
  transition: color 0.4s ease;
}

@media (min-width: 768px) {
  .hotline-section-title {
    font-size: 2.25rem;
  }
}

/* Hotlines Sub-grid */
.newsletter-hotlines-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-top: 0.5rem;
}

@media (min-width: 640px) {
  .newsletter-hotlines-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}

/* Hotline items luxury styling */
.hotline-item-luxury {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hotline-item-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--nl-text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  transition: color 0.4s ease;
}

.hotline-item-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.875rem;
  margin: 0.5rem 0;
}

.hotline-icon-circle {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  background-color: #CA8471;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(202, 132, 113, 0.25);
}

.hotline-icon-svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.hotline-item-luxury:hover .hotline-icon-circle {
  transform: scale(1.08);
  background-color: #A66251;
}

.hotline-number-link {
  font-size: 1.625rem;
  font-family: 'Playfair Display', serif;
  color: var(--nl-text-primary);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: color 0.3s ease;
  line-height: 1;
}

.hotline-number-link:hover {
  color: #CA8471;
}

.hotline-item-subtext {
  display: block;
  font-size: 11px;
  color: var(--nl-text-muted);
  font-weight: 300;
  transition: color 0.4s ease;
}

/* Left Column Newsletter labels/desc */
.newsletter-left-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.4em;
  color: #CA8471;
  text-transform: uppercase;
  font-weight: 700;
}

.newsletter-left-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  letter-spacing: 0.05em;
  color: var(--nl-text-primary);
  font-weight: 500;
  margin: 0;
  line-height: 1.2;
  transition: color 0.4s ease;
}

@media (min-width: 768px) {
  .newsletter-left-title {
    font-size: 2.25rem;
  }
}

.newsletter-left-desc {
  font-size: 13px;
  color: var(--nl-text-secondary);
  line-height: 1.6;
  letter-spacing: 0.03em;
  max-width: 30rem;
  margin: 0;
  transition: color 0.4s ease;
}

.newsletter-highlight-text {
  color: #CA8471;
  font-weight: 600;
}

#newsletter-home-form {
  width: 100%;
  max-width: 30rem;
}

/* Newsletter Input Form styling */
.newsletter-input-container {
  display: flex;
  border-bottom: 1px solid var(--nl-input-border);
  padding: 0.625rem 0;
  transition: border-color 0.3s ease;
  position: relative;
  max-width: 100%;
  width: 100%;
  margin: 0.25rem auto 0 auto;
}

.newsletter-input-container:focus-within {
  border-color: #CA8471;
}

.newsletter-input-field {
  background: transparent;
  font-size: 0.875rem; /* increased from 0.75rem (1 size up) */
  width: 100%;
  border: none;
  outline: none;
  text-align: left;
  color: var(--nl-text-primary);
  letter-spacing: 0.05em;
  padding-right: 2.5rem;
  transition: color 0.4s ease;
}

.newsletter-input-field::placeholder {
  color: var(--nl-input-placeholder);
}

.newsletter-submit-btn {
  color: #CA8471;
  background: transparent;
  border: none;
  cursor: pointer;
  padding-left: 0.5rem;
  outline: none;
  position: absolute;
  right: 0;
  bottom: 0.625rem;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.newsletter-submit-btn:hover {
  color: #e3a897;
}

.newsletter-submit-icon {
  width: 1rem;
  height: 1rem;
  transition: transform 0.2s ease;
}

.newsletter-message-text {
  font-size: 10px;
  margin-top: 0.625rem;
  display: none;
  transition: all 0.3s ease;
  text-align: center;
}

/* Custom Validation Tooltip */
.custom-validation-tooltip {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: #ffffff;
  border: 1.5px solid #CA8471;
  border-radius: 8px;
  padding: 8px 16px;
  box-shadow: 0 10px 25px rgba(202, 132, 113, 0.15);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

/* Dark mode support */
.dark .custom-validation-tooltip {
  background: #1E1B1A;
  border-color: #CA8471;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

.custom-validation-tooltip.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Tooltip Arrow */
.custom-validation-tooltip::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent #CA8471 transparent;
}

.custom-validation-tooltip::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: transparent transparent #ffffff transparent;
}

.dark .custom-validation-tooltip::after {
  border-color: transparent transparent #1E1B1A transparent;
}

/* Icon & Content styling */
.tooltip-icon {
  width: 14px;
  height: 14px;
  color: #CA8471;
  flex-shrink: 0;
}

.tooltip-text {
  font-family: 'Quicksand', 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #1A1513;
  letter-spacing: 0.02em;
}

.dark .tooltip-text {
  color: #ffffff;
}

/* ==========================================================================
   LUXURY DARK MODE SPECIFIC STYLES (Espresso & Rose Gold)
   ========================================================================== */

/* 1. Category Circles in Dark Mode */
.dark .cat-bg {
  background: radial-gradient(circle at 50% 35%, #251B17 0%, #150F0D 100%) !important;
  border: 1.5px solid rgba(217, 141, 120, 0.28) !important;
}
.dark .cat-wrapper {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6) !important;
}
.dark .cat-item:hover .cat-bg {
  border-color: #CA8471 !important;
}
.dark .cat-item:hover .cat-wrapper {
  box-shadow: 0 0 25px rgba(217, 141, 120, 0.45) !important;
}
.dark .cat-item:hover .cat-name {
  color: #CA8471 !important;
}
.dark .cat-border-anim > div {
  background: conic-gradient(from 0deg, transparent 70%, #CA8471 100%) !important;
}

/* 2. Alternating Section Backgrounds — phân tách nhẹ, không đường kẻ cứng */
.dark section.section-category {
  background-color: #140E0C !important;
  box-shadow: 0 1px 0 0 rgba(217, 141, 120, 0.07) !important;
}
.dark section.section-bestsellers {
  background-color: #0C0807 !important;
  box-shadow: 0 1px 0 0 rgba(217, 141, 120, 0.07) !important;
}
.dark section.section-featured {
  background-color: #140E0C !important;
  box-shadow: 0 1px 0 0 rgba(217, 141, 120, 0.07) !important;
}
.dark #storefront-engagement-banner {
  background-color: #0C0807 !important;
  box-shadow:
    0 -1px 0 0 rgba(217, 141, 120, 0.06),
    0  1px 0 0 rgba(217, 141, 120, 0.06) !important;
}
.dark section.section-usp {
  background: linear-gradient(100deg, #2A1208 0%, #3D1A0E 35%, #562716 65%, #6B3320 100%) !important;
  box-shadow:
    0 -1px 0 0 rgba(217, 141, 120, 0.15),
    0  1px 0 0 rgba(217, 141, 120, 0.15) !important;
}
.dark section.section-story {
  background-color: #140E0C !important;
  box-shadow:
    0 -1px 0 0 rgba(217, 141, 120, 0.06),
    0  1px 0 0 rgba(217, 141, 120, 0.06) !important;
}
.dark section.section-magazine {
  background-color: #0C0807 !important;
  /* Không có border-bottom — newsletter section bên dưới tự blend */
  box-shadow: 0 -1px 0 0 rgba(217, 141, 120, 0.06) !important;
}

/* 3. Product Cards & Image Containers in Dark Mode
   NOTE: These styles have been moved to theme.css (global) so all pages
   (home, category, search, mother_baby, etc.) are consistent.
   Do NOT add card dark-mode overrides here — use theme.css instead. */

/* 4. Slider Arrows in Dark Mode */
.dark .bs-arrow {
  background-color: #1B1311 !important;
  border-color: #34231E !important;
  color: #CA8471 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
}
.dark .bs-arrow:hover {
  background-color: #221815 !important;
  border-color: #CA8471 !important;
  color: #F4ECE8 !important;
  box-shadow: 0 0 16px rgba(217, 141, 120, 0.35) !important;
}

/* 5. Trust USP Section in Dark Mode */
.dark .custom-salmon-group-container {
  border-bottom-color: rgba(217, 141, 120, 0.15) !important;
}
.dark .custom-salmon-group-container svg {
  color: #CA8471 !important;
}
.dark .custom-salmon-group-container h4 {
  color: #F4ECE8 !important;
}
.dark .custom-salmon-group-container p {
  color: #B3A39C !important;
}
.dark .custom-salmon-group-container a {
  color: #E6A08D !important;
}
.dark .custom-salmon-group-container a:hover {
  color: #F4ECE8 !important;
}

/* 6. Newsletter Section Dark Mode — Refined Styles */

/* Phone icon circles — subtle glow, không bị tối đen cứng */
.dark .hotline-icon-circle {
  background: linear-gradient(135deg, #3A1F18 0%, #2A1612 100%) !important;
  border: 1px solid rgba(217, 141, 120, 0.22) !important;
  box-shadow: 0 4px 14px rgba(217, 141, 120, 0.14) !important;
  color: #E6A08D !important;
}
.dark .hotline-icon-circle:hover {
  background: linear-gradient(135deg, #4A2820 0%, #3A1C14 100%) !important;
  box-shadow: 0 6px 20px rgba(217, 141, 120, 0.25) !important;
}
.dark .hotline-icon-svg {
  fill: #E6A08D !important;
}
.dark .hotline-number-link {
  color: #F4ECE8 !important;
}
.dark .hotline-section-title,
.dark .newsletter-left-title {
  color: #F4ECE8 !important;
}
.dark .hotline-section-subtitle,
.dark .newsletter-left-label {
  color: #CA8471 !important;
  letter-spacing: 0.4em;
}
.dark .hotline-item-label {
  color: rgba(244, 236, 232, 0.55) !important;
}
.dark .hotline-item-subtext,
.dark .newsletter-left-desc {
  color: rgba(244, 236, 232, 0.5) !important;
}
.dark .newsletter-highlight-text {
  color: #E6A08D !important;
}

/* Email input — underline style, không có nền box riêng */
.dark .newsletter-input-container {
  border-bottom-color: rgba(244, 236, 232, 0.18) !important;
}
.dark .newsletter-input-container:focus-within {
  border-bottom-color: #CA8471 !important;
}
.dark .newsletter-input-field {
  background: transparent !important;
  color: #F4ECE8 !important;
}
.dark .newsletter-input-field::placeholder {
  color: rgba(244, 236, 232, 0.35) !important;
}
.dark .newsletter-submit-btn {
  color: #CA8471 !important;
}
.dark .newsletter-submit-btn:hover {
  color: #E6A08D !important;
}

/* ==========================================================================
   7. Brand Story — Khung ảnh có chiều sâu (story-img-*)
   ========================================================================== */

/* Grid 2 cột */
.story-img-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: start;
}

/* Wrapper khung — tạo không gian cho lớp bóng + viền deco */
.story-img-frame {
  position: relative;
  aspect-ratio: 3 / 4;
}

/* Ảnh 2 lệch xuống để tạo nhịp động */
.story-img-frame--offset {
  margin-top: 2.5rem;
}

/* Lớp bóng nền — dịch chuyển ra ngoài tạo chiều sâu 3D */
.story-img-shadow-layer {
  position: absolute;
  inset: 0;
  translate: 8px 10px;
  border-radius: 6px;
  background: linear-gradient(145deg, rgba(202, 132, 113, 0.22), rgba(160, 90, 65, 0.14));
  filter: blur(14px);
  z-index: 0;
  transition: translate 0.45s ease, filter 0.45s ease;
}

.story-img-frame:hover .story-img-shadow-layer {
  translate: 12px 16px;
  filter: blur(20px);
}

/* Viền trang trí vàng — lệch góc dưới-phải */
.story-img-border-deco {
  position: absolute;
  inset: 0;
  translate: 7px 7px;
  border-radius: 6px;
  border: 1.5px solid rgba(202, 132, 113, 0.45);
  z-index: 1;
  transition: translate 0.45s ease, border-color 0.4s ease;
  pointer-events: none;
}

.story-img-frame:hover .story-img-border-deco {
  translate: 10px 10px;
  border-color: rgba(202, 132, 113, 0.75);
}

/* Khung ảnh chính — nằm trên lớp bóng & viền */
.story-img-inner {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  overflow: hidden;
  z-index: 2;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.13),
    0 1px 4px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.45s ease, transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.story-img-frame:hover .story-img-inner {
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.18),
    0 4px 10px rgba(0, 0, 0, 0.10);
  transform: translate(-2px, -3px);
}

/* Ảnh bên trong */
.story-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.75s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.story-img-frame:hover .story-img {
  transform: scale(1.06);
}

/* Overlay shimmer vàng ấm khi hover */
.story-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(202, 132, 113, 0.12) 0%,
    rgba(255, 220, 180, 0.08) 50%,
    rgba(202, 132, 113, 0.10) 100%
  );
  opacity: 0;
  transition: opacity 0.45s ease;
  border-radius: 6px;
  pointer-events: none;
}

.story-img-frame:hover .story-img-overlay {
  opacity: 1;
}

/* Caption bên trong overlay */
.story-img-caption {
  font-family: 'Playfair Display', serif;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #F4ECE8;
  line-height: 1;
  font-weight: 500;
}

/* Badge số góc trên-trái */
.story-img-badge {
  position: absolute;
  top: -10px;
  left: -10px;
  z-index: 4;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #CA8471;
  color: #fff;
  font-family: 'Playfair Display', serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(202, 132, 113, 0.38);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.story-img-frame:hover .story-img-badge {
  transform: scale(1.12);
  box-shadow: 0 5px 16px rgba(202, 132, 113, 0.55);
}

/* Dark mode */
.dark .story-img-shadow-layer {
  background: linear-gradient(145deg, rgba(217, 141, 120, 0.18), rgba(120, 60, 40, 0.12));
}

.dark .story-img-border-deco {
  border-color: rgba(217, 141, 120, 0.35);
}

.dark .story-img-frame:hover .story-img-border-deco {
  border-color: rgba(217, 141, 120, 0.65);
}

.dark .story-img-inner {
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.5),
    0 1px 6px rgba(0, 0, 0, 0.3);
}

.dark .story-img-frame:hover .story-img-inner {
  box-shadow:
    0 14px 45px rgba(0, 0, 0, 0.6),
    0 4px 12px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(217, 141, 120, 0.15);
}

.dark .story-img-badge {
  background: linear-gradient(135deg, #CA8471, #C07258);
  box-shadow: 0 3px 12px rgba(217, 141, 120, 0.4);
}

/* ==========================================================================
   8. Brand Story — Text tương phản mạnh hơn (ảnh nền sáng)
   ========================================================================== */

/* Heading chính */
.section-story h2 {
  color: #1A1210 !important;
}

/* Label nhỏ "Câu chuyện thương hiệu" */
.section-story p.text-primary {
  color: #CA8471 !important;
  font-weight: 700;
}

/* Body text */
.section-story p.text-sm {
  color: #3D2820 !important;
}

/* Dark mode — giữ màu đã có, không ghi đè */
.dark .section-story h2 {
  color: #F4ECE8 !important;
}
.dark .section-story p.text-primary {
  color: #CA8471 !important;
}
.dark .section-story p.text-sm {
  color: #B3A39C !important;
}

/* Mobile (<= 767px): Câu chuyện thương hiệu — lề trên = lề dưới (2.25rem), chữ căn giữa đồng bộ
   với các tiêu đề khối khác, ảnh cân hai bên (bù phần viền deco lệch 7px) */
@media (max-width: 767px) {
  .section-story {
    padding-top: 2.25rem !important;
    padding-bottom: 2.25rem !important;
  }
  .section-story > div {
    gap: 1.75rem !important;
  }
  .section-story > div > div:first-child {
    text-align: center;
  }
  .section-story > div > div:first-child > * + * {
    margin-top: 1rem !important;
  }
  .section-story > div > div:first-child .w-12 {
    margin-left: auto;
    margin-right: auto;
  }
  .section-story .story-img-grid {
    gap: 1rem;
    padding: 0 8px 10px 0; /* bù viền deco + bóng nhô ra bên phải/dưới → khối ảnh cân hai bên */
  }
  .section-story .story-img-frame--offset {
    margin-top: 1.5rem;
  }
}

/* ==========================================================================
   10. Best Sellers — Đồng bộ label "Được yêu thích nhất" với brand story
   ========================================================================== */
.section-bestsellers p.text-primary {
  color: #CA8471 !important;
  font-weight: 700 !important;
  font-family: 'Quicksand', 'Montserrat', sans-serif !important;
}

.dark .section-bestsellers p.text-primary {
  color: #CA8471 !important;
}

/* ==========================================================================
   9. Brand Story — Ảnh nền: blend mode theo theme
   ========================================================================== */

/* Light mode: multiply 20% */
.story-bg-img {
  mix-blend-mode: multiply;
  opacity: 0.2;
  object-position: center;
}

/* Dark mode: screen 30% */
.dark .story-bg-img {
  mix-blend-mode: screen;
  opacity: 0.3;
}

/* ==========================================================================
   11. Featured & Magazine — Đồng bộ label với brand story & bestsellers
   ========================================================================== */

/* "Bộ sưu tập nổi bật" */
.section-featured p.text-primary {
  color: #CA8471 !important;
  font-weight: 700 !important;
  font-family: 'Quicksand', 'Montserrat', sans-serif !important;
}
.dark .section-featured p.text-primary {
  color: #CA8471 !important;
}

/* "Kiến thức · Cẩm nang" */
.section-magazine p.text-primary {
  color: #CA8471 !important;
  font-weight: 700 !important;
  font-family: 'Quicksand', 'Montserrat', sans-serif !important;
}
.dark .section-magazine p.text-primary {
  color: #CA8471 !important;
}

/* Mobile (<= 767px): Tạp chí / Cẩm nang — lề trên = lề dưới (2.25rem), tiêu đề căn giữa đồng bộ,
   khoảng cách giữa các thẻ bài viết và padding nội dung gọn, đều */
@media (max-width: 767px) {
  .section-magazine {
    padding-top: 2.25rem !important;
    padding-bottom: 2.25rem !important;
  }
  .section-magazine > div > div:first-child {
    justify-content: center;
    text-align: center;
    margin-bottom: 1.25rem;
  }
  .section-magazine > div > div:first-child p {
    margin-bottom: 0.4rem;
  }
  /* Bài nổi bật */
  .section-magazine .md\:grid-cols-2 {
    margin-bottom: 1.5rem;
  }
  .section-magazine .md\:grid-cols-2 > div:last-child {
    padding: 1.25rem 1.25rem 1.5rem !important;
  }
  .section-magazine .md\:grid-cols-2 h3 {
    font-size: 1.05rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
  }
  .section-magazine .md\:grid-cols-2 p.line-clamp-4 {
    margin-bottom: 1.1rem;
  }
  /* Các bài còn lại */
  .section-magazine .md\:grid-cols-3 {
    gap: 1.5rem;
  }
  .section-magazine .md\:grid-cols-3 > div > a:first-child {
    margin-bottom: 0.75rem;
  }
}

/* Tablet / điện thoại xoay ngang (768px – 1023px): bài nổi bật đầu tiên.
   Ô ảnh có aspect-ratio nên trong lưới 2 cột nó không tự giãn hết chiều ngang cột (justify-self mặc định
   thành start) → ảnh tràn đè lên cột chữ. Ép ảnh rộng đúng 1 cột, cao bằng cột chữ (object-cover),
   đồng thời thu gọn padding/cỡ chữ cột nội dung cho vừa khung hẹp. */
@media (min-width: 768px) and (max-width: 1023px) {
  .section-magazine .md\:grid-cols-2 {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .section-magazine .md\:grid-cols-2 > a:first-child {
    width: 100%;
    min-width: 0;
    aspect-ratio: auto;
    min-height: 15rem;
    justify-self: stretch;
    align-self: stretch;
  }
  .section-magazine .md\:grid-cols-2 > div:last-child {
    min-width: 0;
    padding: 1.75rem 1.5rem !important;
  }
  .section-magazine .md\:grid-cols-2 h3 {
    font-size: 1.15rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
  }
  .section-magazine .md\:grid-cols-2 p.line-clamp-4 {
    margin-bottom: 1.1rem;
  }
}

/* ==========================================================================
   12. Luxury Page Load Entrance & Scroll Reveal Animation
   ========================================================================== */

/* ── 12.1. Brand Preloader & Page Curtain ── */
.sam-loader-curtain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 48%, #1D1411 0%, #0C0807 70%, #070404 100%);
  color: #F4ECE8;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.7s ease;
  pointer-events: auto;
}

.sam-loader-curtain.loader-hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-20px) scale(1.02);
  pointer-events: none;
}

.sam-loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px;
  max-width: 420px;
}

/* Logo icon container & animations */
.sam-loader-logo-wrap {
  width: 80px;
  height: 80px;
  margin-bottom: 24px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Pulsing circular jewel aura */
.sam-logo-aura-ring {
  position: absolute;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 1px solid rgba(202, 132, 113, 0.45);
  animation: logoAuraPulse 2.4s cubic-bezier(0.16, 1, 0.3, 1) infinite;
  pointer-events: none;
}

/* Main brand icon: pure floating PNG with no box artifacts */
.sam-loader-logo-img {
  width: 62px;
  height: 62px;
  object-fit: contain;
  display: block;
  padding: 2px;
  transform-origin: center;
  filter: drop-shadow(0 0 16px rgba(202, 132, 113, 0.6)) drop-shadow(0 4px 12px rgba(202, 132, 113, 0.35));
  animation: logoEntrance 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards,
             logoGlowBreathe 3s ease-in-out infinite 0.9s;
}

@keyframes logoEntrance {
  0% {
    opacity: 0;
    transform: scale(0.6) translateY(14px);
    filter: brightness(0.6) drop-shadow(0 0 0 rgba(202, 132, 113, 0));
  }
  65% {
    opacity: 1;
    transform: scale(1.08) translateY(-2px);
    filter: brightness(1.25) drop-shadow(0 0 24px rgba(202, 132, 113, 0.85));
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: brightness(1) drop-shadow(0 0 16px rgba(202, 132, 113, 0.6)) drop-shadow(0 4px 12px rgba(202, 132, 113, 0.35));
  }
}

@keyframes logoGlowBreathe {
  0%, 100% {
    filter: drop-shadow(0 0 14px rgba(202, 132, 113, 0.5)) drop-shadow(0 4px 12px rgba(202, 132, 113, 0.35)) brightness(1);
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 26px rgba(202, 132, 113, 0.9)) drop-shadow(0 0 36px rgba(230, 160, 141, 0.55)) brightness(1.18);
    transform: scale(1.03);
  }
}

@keyframes logoAuraPulse {
  0% {
    transform: scale(0.75);
    opacity: 0.85;
    border-color: rgba(202, 132, 113, 0.6);
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
    border-color: rgba(202, 132, 113, 0);
  }
}

/* Brand Name */
.sam-loader-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.65rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  font-weight: 600;
  background: linear-gradient(135deg, #FFFFFF 0%, #E6A08D 50%, #CA8471 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-right: -0.35em; /* Balance letter-spacing */
  margin-bottom: 8px; /* Elegant direct spacing to tagline */
  opacity: 0;
  transform: translateY(10px);
  animation: titleReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

/* Tagline */
.sam-loader-subtitle {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: rgba(244, 236, 232, 0.85);
  margin-bottom: 18px; /* Spacing down to bottom accent shimmer line */
  opacity: 0;
  transform: translateY(8px);
  animation: subtitleReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.35s forwards;
}

/* Shimmering bottom pulse bar (kept as sole accent line) */
.sam-loader-shimmer {
  width: 72px;
  height: 1.5px;
  background: rgba(202, 132, 113, 0.25);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
  opacity: 0;
  transform: scaleX(0.5);
  animation: shimmerEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.45s forwards;
}

.sam-loader-shimmer::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #CA8471, #F4ECE8, #CA8471, transparent);
  animation: shimmerMove 1.4s infinite ease-in-out 0.6s;
}

@keyframes titleReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes subtitleReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmerEntrance {
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes shimmerMove {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* ── 12.2. Hero Image Load Entrance ── */
.hero-cinema-enter img {
  animation: heroCinema 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes heroCinema {
  from {
    transform: scale(1.05);
    filter: brightness(0.92);
  }
  to {
    transform: scale(1);
    filter: brightness(1);
  }
}

/* Hover Lift on Category & Best Seller Cards smoothly coexisting with reveal */
.cat-item.is-revealed:hover .cat-wrapper {
  transform: translateY(-4px) scale(1.03);
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .sam-loader-curtain {
    transition: opacity 0.2s ease !important;
  }
}

/* ==========================================================================
   Liên hệ & Hỗ trợ + Hội viên — phong cách mới cho MOBILE (<= 767px)
   Thẻ trắng bo góc: [icon trong khung] | nhãn + giờ (pill) / số điện thoại / ghi chú | [nút ›]
   Đặt cuối file để thắng các rule dark mode (!important) ở trên khi cần.
   ========================================================================== */
.hotline-section-desc,
.hotline-card-arrow {
  display: none;
}

@media (max-width: 767px) {
  .newsletter-section-luxury {
    --nl-bg-color: #FBF2ED;
    --nl-glow-color: rgba(202, 132, 113, 0.28);
  }
  .newsletter-grid-container {
    gap: 2rem;
  }

  /* Eyebrow có 2 vạch hai bên */
  .hotline-section-subtitle,
  .newsletter-left-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    letter-spacing: 0.3em;
  }
  .hotline-section-subtitle::before,
  .hotline-section-subtitle::after,
  .newsletter-left-label::before,
  .newsletter-left-label::after {
    content: "";
    width: 28px;
    height: 1px;
    background: #CA8471;
    opacity: 0.6;
  }
  .hotline-section-desc {
    display: block;
    max-width: 19rem;
    margin: 0.4rem auto 0;
    font-size: 0.8rem;
    line-height: 1.55;
    color: var(--nl-text-secondary);
    text-align: center;
  }

  .newsletter-column-left {
    gap: 1.25rem;
  }
  .newsletter-hotlines-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
    padding-top: 0.25rem;
    width: 100%;
  }

  /* Thẻ hotline */
  .hotline-item-luxury {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr) 38px;
    grid-template-rows: auto auto auto;
    column-gap: 1rem;
    align-items: center;
    padding: 0.95rem 1rem;
    border-radius: 20px;
    background: #fff;
    border: 1px solid rgba(202, 132, 113, 0.14);
    box-shadow: 0 8px 22px rgba(160, 90, 70, 0.12);
    text-align: left;
  }
  .hotline-item-content {
    display: contents;
  }

  .hotline-item-label {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem 0.5rem;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: var(--nl-text-primary);
    text-align: left;
  }
  .hotline-item-time {
    padding: 0.12rem 0.55rem;
    border-radius: 999px;
    background: #FBE9E3;
    color: #B5513C;
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
  }
  .hotline-paren {
    display: none;
  }

  /* Icon: vòng tròn terracotta nằm trong khung vuông bo hồng nhạt */
  .hotline-icon-circle {
    grid-column: 1;
    grid-row: 1 / span 3;
    position: relative;
    justify-self: center;
    width: 52px;
    height: 52px;
    box-shadow: none;
  }
  .hotline-icon-circle::before {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 18px;
    background: #FBEEE9;
    z-index: -1;
  }
  .hotline-icon-svg {
    width: 1.3rem;
    height: 1.3rem;
  }

  .hotline-number-link {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    margin: 0.2rem 0 0.1rem;
    font-size: 1.55rem;
    line-height: 1.15;
  }
  .hotline-item-subtext {
    grid-column: 2;
    grid-row: 3;
  }

  /* Nút › */
  .hotline-card-arrow {
    grid-column: 3;
    grid-row: 1 / span 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #FBEDE7;
    color: #B5513C;
    transition: background 0.25s ease, transform 0.25s ease;
  }
  .hotline-card-arrow svg {
    width: 16px;
    height: 16px;
  }
  .hotline-card-arrow:active {
    background: #F6D9CF;
    transform: scale(0.94);
  }

  /* Form hội viên: ô nhập dạng viên thuốc + nút tròn */
  .newsletter-column-right {
    gap: 0.75rem;
  }
  .newsletter-input-container {
    align-items: center;
    padding: 0.4rem 0.4rem 0.4rem 1.1rem;
    border: 1px solid rgba(202, 132, 113, 0.22);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(160, 90, 70, 0.1);
  }
  .newsletter-input-container .newsletter-input-field {
    height: 2.5rem;
    padding-left: 1.9rem;
    padding-right: 3.2rem;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A7A74' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 1.15rem;
  }
  .newsletter-input-container .newsletter-submit-btn {
    right: 0.4rem;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border-radius: 50%;
    background: #CA8471;
    color: #fff;
    box-shadow: 0 4px 12px rgba(202, 132, 113, 0.35);
  }
  .newsletter-input-container .newsletter-submit-btn:hover {
    background: #B8725F;
    color: #fff;
  }
  .newsletter-input-container .newsletter-submit-icon {
    width: 1.1rem;
    height: 1.1rem;
  }

  /* Dark mode */
  .dark .hotline-item-luxury {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(217, 141, 120, 0.2);
    box-shadow: none;
  }
  .dark .hotline-item-time {
    background: rgba(217, 141, 120, 0.16);
    color: #E6A08D;
  }
  .dark .hotline-icon-circle::before {
    background: rgba(217, 141, 120, 0.1);
  }
  .dark .hotline-card-arrow {
    background: rgba(217, 141, 120, 0.14);
    color: #E6A08D;
  }
  .dark .newsletter-input-container {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(217, 141, 120, 0.2);
    box-shadow: none;
  }
  .dark .newsletter-input-container .newsletter-input-field {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B3A39C' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E");
  }
}
/* Nền ảnh cho khối Liên hệ & Hỗ trợ — chỉ MOBILE (<= 767px).
   Ảnh nằm ở lớp ::before riêng để chỉnh độ mờ (opacity) / blend mode độc lập với nội dung.
   Ảnh theo khu vực: static/src/images/backgrounds/contact/
     - Light mode : contact-pastel-light.jpg   (--nl-bg-img-light)
     - Dark mode  : contact-rose-gold-dark.jpg (--nl-bg-img-dark) */
@media (max-width: 767px) {
  .newsletter-section-luxury::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: var(--nl-bg-img-light);
    background-size: cover;
    background-position: right top;
    background-repeat: no-repeat;
    opacity: 0.6; /* giảm độ đậm để ảnh mờ, nhẹ nhàng hơn */
  }
  .dark .newsletter-section-luxury::before {
    background-image: var(--nl-bg-img-dark);
    mix-blend-mode: screen; /* ánh rose-gold nổi nhẹ lên nền espresso */
    opacity: 0.55;
  }
  .newsletter-glow-bg {
    display: none; /* bỏ quầng sáng để thấy rõ ảnh nền */
  }
}
/* Dark mode mobile: giữ mũi tên nút gửi newsletter luôn nhìn rõ trên nền terracotta */
@media (max-width: 767px) {
  .dark .newsletter-input-container .newsletter-submit-btn {
    background: #CA8471 !important;
    color: #fff !important;
  }
}
/* Dark mode mobile: ô nhập email nổi rõ trên nền ảnh rose-gold
   (nền gần đặc + viền sáng + halo tối + blur; placeholder/icon sáng hơn).
   Ghi đè các rule dark cũ đang ép `background: transparent` và viền dưới mờ. */
@media (max-width: 767px) {
  .dark .newsletter-input-container {
    background: rgba(22, 13, 10, 0.9) !important;
    border: 1px solid rgba(230, 160, 141, 0.55) !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5), 0 0 0 4px rgba(15, 8, 6, 0.35) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
  .dark .newsletter-input-container:focus-within {
    border-color: #E6A08D !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(230, 160, 141, 0.22) !important;
  }
  .dark .newsletter-input-container .newsletter-input-field {
    background-color: transparent !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E6C3B7' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: left center !important;
    background-size: 1.15rem !important;
    color: #F8F0EC !important;
    caret-color: #E6A08D;
  }
  .dark .newsletter-input-container .newsletter-input-field::placeholder {
    color: rgba(244, 236, 232, 0.72) !important;
  }
}