/* ========== Base layout ========== */
html, body { height: 100%; margin: 0; overflow-x: hidden; } /* kill stray 1px scroll */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: 64px; /* fixed header offset (mobile) */
}
@media (min-width: 992px) { body { padding-top: 72px; } }
main { flex: 1 0 auto; }
footer { flex-shrink: 0; }
.card { border-radius: .5rem; }
pre#out { font-family: monospace; overflow-x: auto; }

/* ========== Header height vars ========== */
:root { --header-h: 64px; }
@media (min-width: 992px) { :root { --header-h: 72px; } }

/* ========== Hero: full-bleed container (no horizontal overflow) ========== */
.section-hero-bg{
  position: relative;
  width: 100vw;
  left: 50%;
  transform: translateX(-50%);
  margin-top: calc(-1 * var(--header-h));
  padding-top: var(--header-h);
  min-height: 75vh;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
  overflow: hidden;
}

/* ========== Hero: background image (sharp) ========== */
.section-hero-bg::before{
  content: "";
  position: absolute; inset: 0;
  background-image: var(--hero);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -1;
}

/* ========== Hero: subtle dark overlay ========== */
.section-hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.25);
  z-index: 0;
}

/* ========== Hero: content wrapper (full width, a bit higher) ========== */
.section-hero-bg .hero-content{
  position: relative;
  z-index: 3;                 /* ⬅ ensure text sits above everything */
  color: #fff;
  width: 100%;
  padding: 8vh 5vw 4vh;       /* ⬅ add bottom padding so text won’t be covered */
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

/* ========== Hero: readable text panel (frosted box) ========== */
.section-hero-bg .text-bg{
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: .9rem;
  padding: 2rem;
  color: #fff;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto 10vh;          /* ⬅ tiny gap above the overlap */
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
}

@media (max-width: 768px) {
  .section-hero-bg { min-height: 65vh; }
  .section-hero-bg .hero-content { padding: 0 5vw 6vh; }
  .section-hero-bg .text-bg {
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.55);
  }
}

/* ========== Product grid wrapper (overlap onto hero) ========== */
.products-wrap{
  position: relative;
  z-index: 1;                 /* ⬅ below hero/text */
  margin-top: -130px;          /* ⬅ smaller overlap so it doesn’t cover text */
  padding: 3rem 5vw 4rem;
  background: #fff;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
  box-shadow: 0 -10px 25px rgba(0,0,0,.08);
}

/* ========== Responsive grid ========== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
  max-width: 1300px;
  margin: 0 auto;
}

/* ========== X remove images from list in edit create product ========== */
.thumb {
  position: relative;
  border: 1px solid rgba(0,0,0,.1);
  border-radius: .5rem;
  overflow: hidden;
}

.thumb .remove-image {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 500;       /* <-- forces the X above all elements */
  font-size: 16px;
  padding: 0.1rem 0.4rem;
  line-height: 1;
}