/* ==========================================================================
   NHÀ HẠT ÉTOFFE — UI COMPONENTS & DESIGN SYSTEM
   Thư viện component giao diện dùng chung theo Design Guidelines 2026.
   Bao gồm: Button, Chip, Card, Tag, Stock status, và Unified Page Hero.
   Version: 8.5.0
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. NÚT BẤM (BUTTONS)
   -------------------------------------------------------------------------- */
.nhe-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: var(--nhe-r-pill, 999px);
  font-family: var(--nhe-font-body, 'Be Vietnam Pro', sans-serif);
  font-size: var(--nhe-fs-md, 15px);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  border: 1.5px solid transparent;
  outline: none;
  box-sizing: border-box;
}

.nhe-btn:active {
  transform: scale(0.985);
}

/* Primary Button (CTA chính: Cà phê #5A3A28, chữ trắng) */
.nhe-btn--primary {
  background: var(--nhe-accent, #5A3A28);
  color: #FFFFFF !important;
  border-color: var(--nhe-accent, #5A3A28);
  box-shadow: 0 2px 8px rgba(90, 58, 40, 0.18);
}

.nhe-btn--primary:hover {
  background: var(--nhe-accent-hover, #4A3020);
  border-color: var(--nhe-accent-hover, #4A3020);
  color: #FFFFFF !important;
  box-shadow: 0 4px 14px rgba(90, 58, 40, 0.26);
}

/* Secondary Button (Viền nhấn, nền kem mềm) */
.nhe-btn--secondary {
  background: var(--nhe-canvas-raised, #FEFDFB);
  color: var(--nhe-accent, #5A3A28) !important;
  border-color: rgba(90, 58, 40, 0.35);
}

.nhe-btn--secondary:hover {
  background: var(--nhe-accent-soft, #EFE6DD);
  border-color: var(--nhe-accent, #5A3A28);
  color: var(--nhe-accent, #5A3A28) !important;
}

/* Ghost Button (Nút trong suốt cho tác vụ phụ) */
.nhe-btn--ghost {
  background: transparent;
  color: var(--nhe-ink, #4A3B32) !important;
  border-color: var(--nhe-line, rgba(74, 59, 50, 0.12));
}

.nhe-btn--ghost:hover {
  background: var(--nhe-canvas-sunken, #F4F0EA);
  border-color: var(--nhe-line-strong, rgba(74, 59, 50, 0.22));
  color: var(--nhe-ink-strong, #241C17) !important;
}

/* Small Button Modifier */
.nhe-btn--sm {
  min-height: 38px;
  padding: 8px 16px;
  font-size: var(--nhe-fs-sm, 13px);
}

/* Zalo Official Brand Button (Ngoại lệ thương hiệu) */
.nhe-btn--zalo {
  background: var(--nhe-zalo, #0068FF);
  color: #FFFFFF !important;
  border-color: var(--nhe-zalo, #0068FF);
}

.nhe-btn--zalo:hover {
  background: #0056D6;
  border-color: #0056D6;
  color: #FFFFFF !important;
  box-shadow: 0 4px 12px rgba(0, 104, 255, 0.25);
}

/* --------------------------------------------------------------------------
   2. CHIP LỌC (FILTER CHIPS)
   -------------------------------------------------------------------------- */
.nhe-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.nhe-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: var(--nhe-r-pill, 999px);
  background: var(--nhe-canvas-raised, #FEFDFB);
  border: 1px solid var(--nhe-line, rgba(74, 59, 50, 0.12));
  color: var(--nhe-ink, #4A3B32);
  font-family: var(--nhe-font-body, 'Be Vietnam Pro', sans-serif);
  font-size: var(--nhe-fs-sm, 13px);
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  user-select: none;
}

.nhe-chip:hover {
  border-color: var(--nhe-accent, #5A3A28);
  color: var(--nhe-accent, #5A3A28);
}

.nhe-chip.is-selected {
  background: var(--nhe-accent, #5A3A28);
  border-color: var(--nhe-accent, #5A3A28);
  color: #FFFFFF !important;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   3. THẺ SẢN PHẨM & NHÃN (CARD & TAGS)
   -------------------------------------------------------------------------- */
.nhe-card {
  position: relative;
  background: var(--nhe-canvas-raised, #FEFDFB);
  border: 1px solid var(--nhe-line, rgba(74, 59, 50, 0.10));
  border-radius: var(--nhe-r-lg, 16px);
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

.nhe-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(74, 59, 50, 0.08);
  border-color: var(--nhe-line-strong, rgba(74, 59, 50, 0.18));
}

.nhe-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--nhe-r-xs, 4px);
  font-family: var(--nhe-font-body, 'Be Vietnam Pro', sans-serif);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--nhe-canvas-sunken, #F4F0EA);
  color: var(--nhe-ink-muted, #7A6558);
}

.nhe-price {
  font-family: var(--nhe-font-display, Georgia, serif);
  font-size: var(--nhe-fs-xl, 20px);
  font-weight: 600;
  color: var(--nhe-ink-strong, #241C17);
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   4. TRẠNG THÁI TỒN VẢI (STOCK BADGES)
   -------------------------------------------------------------------------- */
.nhe-stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--nhe-r-pill, 999px);
  font-family: var(--nhe-font-body, 'Be Vietnam Pro', sans-serif);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.3;
}

.nhe-stock::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.nhe-stock--in {
  background: var(--nhe-success-bg, #EAF3E6);
  color: var(--nhe-success, #44683B);
}
.nhe-stock--in::before {
  background: var(--nhe-success, #44683B);
}

.nhe-stock--low {
  background: var(--nhe-warning-bg, #FBF2E3);
  color: var(--nhe-warning, #8A5F22);
}
.nhe-stock--low::before {
  background: var(--nhe-warning, #8A5F22);
}

.nhe-stock--out {
  background: var(--nhe-danger-bg, #FBEAE6);
  color: var(--nhe-danger, #A63D2F);
}
.nhe-stock--out::before {
  background: var(--nhe-danger, #A63D2F);
}

/* --------------------------------------------------------------------------
   5. UNIFIED EDITORIAL PAGE HERO SYSTEM
   Shared across Shop, Bảng Màu Vải, Catalogue Hoa Văn & Cẩm Nang
   -------------------------------------------------------------------------- */
.nhe-page-hero-unified {
  position: relative !important;
  overflow: hidden !important;
  padding: clamp(28px, 4.2vw, 48px) clamp(16px, 3vw, 32px) clamp(24px, 3.6vw, 40px) !important;
  background:
    radial-gradient(110% 100% at 50% 0%, rgba(90, 58, 40, 0.10), transparent 72%),
    radial-gradient(60% 80% at 88% 20%, rgba(124, 140, 111, 0.08), transparent 70%),
    linear-gradient(180deg, var(--nhe-canvas, #FAF8F5) 0%, var(--nhe-canvas-sunken, #F3ECE2) 100%) !important;
  border-bottom: 1px solid var(--nhe-line, rgba(74, 59, 50, 0.11)) !important;
  text-align: center !important;
  font-family: var(--nhe-font-body, 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, sans-serif) !important;
}

.nhe-page-hero-unified::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(260px, 60vw);
  height: 2.5px;
  background: linear-gradient(90deg, transparent, var(--nhe-accent, #5A3A28), transparent);
  pointer-events: none;
}

.nhe-page-hero-unified__inner {
  position: relative;
  z-index: 2;
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.nhe-page-hero-unified__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 15px;
  border-radius: var(--nhe-r-pill, 999px);
  background: var(--nhe-accent-soft, #EFE6DD);
  border: 1px solid rgba(90, 58, 40, 0.25);
  color: var(--nhe-accent, #5A3A28) !important;
  font-family: var(--nhe-font-body, 'Be Vietnam Pro', sans-serif) !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  margin: 0 0 12px 0 !important;
  line-height: 1.3 !important;
}

.nhe-page-hero-unified__title {
  font-family: var(--nhe-font-display, Georgia, serif) !important;
  font-size: clamp(26px, 3.6vw, 42px) !important;
  font-weight: 600 !important;
  color: var(--nhe-ink-strong, #241C17) !important;
  line-height: 1.18 !important;
  letter-spacing: -0.02em !important;
  margin: 0 0 12px 0 !important;
}

.nhe-page-hero-unified__lede {
  font-family: var(--nhe-font-body, 'Be Vietnam Pro', sans-serif) !important;
  font-size: clamp(14px, 1.3vw, 16px) !important;
  font-weight: 400 !important;
  color: var(--nhe-ink-muted, #7A6558) !important;
  max-width: 680px !important;
  line-height: 1.62 !important;
  margin: 0 auto 16px auto !important;
}

.nhe-page-hero-unified__pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.nhe-page-hero-unified__pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--nhe-r-pill, 999px);
  background: var(--nhe-canvas-raised, rgba(255, 255, 255, 0.78));
  border: 1px solid var(--nhe-line, rgba(74, 59, 50, 0.12));
  color: var(--nhe-ink, #4A3B32);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
}
