/* NH Home Builder – New Arrivals */
:root{
  --nh-radius:      4px;
  --nh-ink:         var(--nh-charcoal, #1e3932);
  --nh-ink-sub:     #6c7a74;
  --nh-green:       var(--nh-green, #2EA26F);
  --nh-forest:      #1E3932;
  --nh-bg-light:    var(--nh-offwhite, #FAF7F2);
}

/* ===== Section wrapper ===== */
.nhhb-new-arrivals{
  margin: 32px 0;
  padding: 28px 28px 32px;
  background: linear-gradient(135deg, #f0f7f4 0%, #e8f4ee 50%, #f5f0e8 100%);
  border-radius: 12px;
  border: 1px solid rgba(30, 57, 50, 0.08);
  position: relative;
  overflow: hidden;
}

/* Decorative background accent */
.nhhb-new-arrivals::before{
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(46,162,111,.10) 0%, rgba(46,162,111,0) 70%);
  pointer-events: none;
}

.nhhb-new-arrivals::after{
  content: "";
  position: absolute;
  bottom: -80px;
  left: -40px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(30,57,50,.07) 0%, rgba(30,57,50,0) 70%);
  pointer-events: none;
}

/* ===== Header ===== */
.nhhb-na-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.nhhb-na-title{
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--nh-forest);
  letter-spacing: -.01em;
}

body.dark-mode .nhhb-na-title{
  color: var(--nh-mint, #2EA26F);
}

/* "View All" pill */
.nhhb-na-viewall{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  color: var(--nh-forest);
  border: 1.5px solid var(--nh-forest);
  color: #000;
  text-decoration: none;
  transition: all .18s ease;
  position: relative;
  z-index: 1;
}

.nhhb-na-viewall:hover{
  background: var(--nh-forest);
  border-color: var(--nh-green);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(46,162,111,.25);
}

/* ===== Grid ===== */
.nhhb-na-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  position: relative;
  z-index: 1;
}

/* ===== Card ===== */
.nhhb-na-card{
  background: #fff;
  border: 1px solid rgba(30, 57, 50, 0.10);
  border-radius: var(--nh-radius);
  padding: 12px;
  transition:
    box-shadow .18s ease,
    transform .18s ease,
    border-color .18s ease;
}

.nhhb-na-card:hover{
  box-shadow: 0 8px 24px rgba(30, 57, 50, 0.12);
  transform: translateY(-3px);
  border-color: rgba(46, 162, 111, 0.30);
}

/* ===== Image ===== */
.nhhb-na-media{
  position: relative;
  display: block;
  background: transparent;        /* ← was #f8faf9, now transparent */
  border-radius: var(--nh-radius);
  overflow: hidden;
  height: 200px;
  margin-bottom: 10px;
}

.nhhb-na-img,
.nhhb-na-img img{
  width: 100%;
  height: 100%;
  object-fit: cover;              /* ← was contain, now cover = fills fully */
  object-position: center center;
  display: block;
  transition: transform .25s ease;
}

.nhhb-na-media:hover img{
  transform: scale(1.05);
}

.nhhb-na-hover{ display: none !important; }

/* ===== Product name ===== */
.nhhb-na-name{
  margin: 0 2px 6px;
  font-weight: 600;
  line-height: 1.3;
}

.nhhb-na-name a{
  color: var(--nh-ink);
  text-decoration: none;
  transition: color .2s ease;
}

.nhhb-na-name a:hover{
  color: var(--nh-green);
}

.nhhb-new-arrivals .nhhb-na-card h3.nhhb-na-name{
  font-size: 13px;
  letter-spacing: .01em;
}

/* ===== Price ===== */
.nhhb-na-price{
  margin: 0 2px;
  font-size: 14px;
  color: var(--nh-ink);
  font-weight: 600;
}

.nhhb-na-price del{
  color: var(--nh-ink-sub);
  margin-left: 5px;
  font-weight: 400;
}

/* ===== Empty state ===== */
.nhhb-na-empty{
  color: var(--nh-ink-sub);
  font-style: italic;
  padding: 10px 0;
  grid-column: 1 / -1;
  text-align: center;
}

/* ===== Placeholder ===== */
.nhhb-na-ph{
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(46,162,111,.06), rgba(30,57,50,.04));
  border-radius: var(--nh-radius);
}

/* ===== Mobile ===== */
@media (max-width: 980px){
  .nhhb-new-arrivals{
    padding: 22px 20px 26px;
  }
}

/* Mobile: keep 2 columns, make thumbnails square */
@media (max-width: 780px) {
  /* keep two columns but reduce gaps */
  .nhhb-na-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  /* slightly tighter cards */
  .nhhb-na-card {
    padding: 10px;
  }

  /* square thumbnail area (width determined by grid cell) */
  .nhhb-na-media {
    width: 100%;
    aspect-ratio: 1 / 1;       /* square */
    height: auto;              /* let aspect-ratio define height */
    margin-bottom: 8px;
    border-radius: calc(var(--nh-radius) - 2px);
    overflow: hidden;
    background: #fff;          /* keeps a neutral background if images have transparency */
  }

  /* ensure the image fills the square without awkward cropping */
  .nhhb-na-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;         /* fill square while preserving subject */
    object-position: center;
    display: block;
    transition: transform .18s ease;
  }

  /* slightly smaller text to balance the smaller image */
  .nhhb-new-arrivals .nhhb-na-card h3.nhhb-na-name {
    font-size: 13px;
    line-height: 1.25;
  }

  .nhhb-na-price {
    font-size: 13px;
  }

  /* reduce hover motion on touch devices */
  .nhhb-na-card:hover {
    transform: none;
    box-shadow: 0 6px 18px rgba(30,57,50,0.10);
  }
}

/* Extra-tight for very small phones: slightly smaller squares & fonts */
@media (max-width: 440px) {
  .nhhb-na-grid { gap: 8px; }
  .nhhb-na-card { padding: 8px; }
  .nhhb-na-media { aspect-ratio: 1 / 1; margin-bottom: 6px; border-radius: 6px; }
  .nhhb-new-arrivals .nhhb-na-card h3.nhhb-na-name { font-size: 12.5px; }
  .nhhb-na-price { font-size: 12px; }
}

@media (max-width: 350px){
  .nhhb-na-grid{ grid-template-columns: 1fr; }
  .nhhb-na-media{ height: 150px; }
}

/* ===== Dark mode ===== */
body.dark-mode .nhhb-new-arrivals{
  background: linear-gradient(135deg, #1a2e28 0%, #1c2a24 50%, #1f2820 100%);
  border-color: rgba(255,255,255,.08);
}

body.dark-mode .nhhb-new-arrivals::before{
  background: radial-gradient(circle, rgba(46,162,111,.12) 0%, rgba(46,162,111,0) 70%);
}

body.dark-mode .nhhb-new-arrivals::after{
  background: radial-gradient(circle, rgba(0,0,0,.20) 0%, rgba(0,0,0,0) 70%);
}

body.dark-mode .nhhb-na-viewall{
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.16);
  color: #fff;
}

body.dark-mode .nhhb-na-viewall:hover{
  background: var(--nh-green);
  border-color: var(--nh-green);
}

body.dark-mode .nhhb-na-card{
  background: var(--dm-surface, #2a2e2a);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 4px 10px rgba(0,0,0,.25);
}

body.dark-mode .nhhb-na-card:hover{
  border-color: rgba(46,162,111,.30);
  box-shadow: 0 8px 24px rgba(0,0,0,.40);
  transform: translateY(-3px);
}

body.dark-mode .nhhb-na-media{
  background: transparent;        /* ← remove the rgba tint */
}

body.dark-mode .nhhb-na-img img{
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.45));
  transition: transform .25s ease;
}

body.dark-mode .nhhb-na-media:hover img{
  transform: scale(1.05);
}

body.dark-mode .nhhb-na-name a{
  color: #EDECE7;
}

body.dark-mode .nhhb-na-name a:hover{
  color: var(--nh-green);
}

body.dark-mode .nhhb-na-price{
  color: #EDECE7;
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce){
  .nhhb-na-card,
  .nhhb-na-img img,
  .nhhb-na-viewall{
    transition: none;
  }
}
