html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
}

.mmc-catalog {
  font-family: 'Lato', sans-serif;
  margin: 0;
  padding: 0;
  background: #fff;
  color: #222;
  text-align: center;
}

/* Hero */
.mmc-hero {
  background: url("https://www.michaelmarkowski.com/wp-content/uploads/sound-on-paper.png") no-repeat center top;
  background-size: auto 400px;
  background-color: #fff;
  height: 330px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 80px 0 40px 0;
  margin: 0;
}

/* Title */
.mmc-page-title {
  margin: 0 0 15px;
  font-family: 'Lato', sans-serif;
  font-size: 64px;
  font-weight: 600;
  letter-spacing: 15px;
  text-transform: uppercase;
  color: #111;
  z-index: 1;
  margin-left: 15px;
}

/* Controls */
.mmc-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 0 auto;
}

.mmc-controls input,
.mmc-controls select {
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 3px;
  font-size: 0.9rem;
  background: #fff;
  box-sizing: border-box;
}

/* Custom arrow for selects */
.mmc-controls select,
.mmc-controls-row select {
  color: #000;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='black' viewBox='0 0 16 16'><path d='M1.5 5.5l6.5 6 6.5-6' stroke='black' stroke-width='2' fill='none' stroke-linecap='round'/></svg>") no-repeat right 12px center;
  background-size: 12px 12px;
  padding-right: 30px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Desktop: 3 product cards */
@media (min-width: 1025px) {
  .mmc-controls {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    max-width: 840px;
    width: 100%;
    margin: 0 auto 20px;
  }

  .mmc-controls input[type="text"] {
    flex: 2;
    min-width: 0;
  }

  .mmc-controls-row {
    display: flex;
    flex: 3;
    gap: 12px;
    width: auto;
  }

  .mmc-controls-row select {
    flex: 1 1 0;
    min-width: 0;
  }
}

/* Products grid */
.mmc-products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  max-width: 1050px;
  margin: 0 auto;
  padding: 0 20px;
}

.mmc-product-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  background: transparent;
}

/* Image wrapper (ensures card size doesn’t change) */
.mmc-image-wrapper {
  position: relative;
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}

/* Product images */
.mmc-product-card img {
  width: 100%;
  height: auto;
  max-width: 320px;
  border-radius: 4px;
  margin-bottom: 0;
  cursor: pointer;
  transition: transform 0.25s ease, opacity 0.6s ease-in;
  opacity: 0;
}

.mmc-product-card img.loaded,
.mmc-image-wrapper .uil-badge.loaded {
  opacity: 1;
}

/* UIL badge overlay */
.uil-badge {
  position: absolute;
  top: 30px;
  right: 60px;
  width: 60px !important;
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.6s ease-in;
  z-index: 2;
  pointer-events: none;
  overflow: hidden; /* keep shine inside badge */
}

/* Light sweep effect */
.uil-badge::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.6) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  animation: sweep 5s infinite;
}

@keyframes sweep {
  0% { left: -75%; }
  5% { left: 125%; }
  100% { left: 125%; }
}

/* Hover scaling */
.mmc-image-wrapper:hover img,
.mmc-image-wrapper:hover .uil-badge {
  transform: scale(1.02);
}

/* Info */
.mmc-product-info {
  position: relative;
  top: -20px;
}

.mmc-product-info h3 {
  margin: 0 0 4px;
  font-size: 1.3em;
  font-weight: 600;
  font-family: 'Playfair Display', serif;
  letter-spacing: 0.2px;
  color: #111;
}

.mmc-product-meta {
  font-size: 0.7em;
  font-weight: 700;
  color: #000;
  font-family: 'Lato', sans-serif;
}

/* Tablet: 2 product columns */
@media (max-width: 1024px) {
  .mmc-hero {
    background-size: auto 250px;
    height: 250px;
    padding: 80px 0 20px 0;
  }

  .mmc-page-title {
    font-size: 44px;
    letter-spacing: 8px;
    margin: 0 0 10px;
    margin-left: 12px;
  }

  .mmc-products {
    grid-template-columns: repeat(2, 1fr);
    max-width: 700px;
    gap: 0;
    margin: 0 auto;
    padding: 0 20px;
  }

  .mmc-controls {
    flex-direction: column;
    max-width: 560px;
    width: 100%;
    margin: 0 auto 20px;
  }

  .mmc-controls input[type="text"] {
    width: 100%;
    margin-bottom: 12px;
  }

  .mmc-controls-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    width: 100%;
  }

  .mmc-controls-row select {
    flex: 1 1 0;
    min-width: 0;
  }
}

.mmc-reset-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;              /* ✅ matches inputs/selects on mobile */
  width: 42px;               /* ✅ square button */
  border: 1px solid #ddd;
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
  transition: background 0.2s ease;
  padding: 0;
  box-sizing: border-box;
}

@media (min-width: 641px) {
  .mmc-reset-btn {
    height: 36px;            /* ✅ matches desktop inputs */
    width: 36px;
  }
}

.mmc-reset-btn .material-icons {
  font-size: 20px;
  line-height: 1;
  color: #000;
}

.mmc-reset-btn:hover {
  background: #f3f3f3;
}

/* Spin animation */
@keyframes spin-clockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.mmc-reset-btn .material-icons.spinning {
  animation: spin-clockwise 0.5s ease forwards;
}


/* Mobile: 1 product column */
@media (max-width: 640px) {
  .mmc-hero {
    background: none;
    height: auto;
    padding: 40px 10px 15px 10px;
  }

  .mmc-page-title {
    font-size: 32px;
    letter-spacing: 5px;
    margin: 0 0 15px;
    margin-left: 8px;
  }

  .mmc-controls {
    width: 100%;
    max-width: 400px;
    gap: 10px;
  }

  .mmc-controls input[type="text"],
  .mmc-controls-row select {
    width: 100%;
    height: 42px;
    font-size: 1rem;
    padding: 10px 12px;
    line-height: 1.2;
    box-sizing: border-box;
  }

  .mmc-controls-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .mmc-products {
    grid-template-columns: 1fr;
    max-width: 100%;
    padding: 0 10px;
    margin: 0 auto;
  }
}

/* ============================
   No results message
   ============================ */
/* Fix horizontal centering of the no results text */
.mmc-products .mmc-no-results {
  grid-column: 1 / -1;     /* span all grid columns */
  justify-self: center;    /* center horizontally */
  margin: 40px 0;
  font-size: 1.5rem;
  color: #555;
  font-family: 'Lato', sans-serif;
  text-align: center;
}

/* ============================
   Spacer element
   ============================ */
.mmc-spacer {
  height: 50px;
}

/* ============================
   Back to Top button
   ============================ */
.mmc-back-to-top {
  display: block;
  margin: 30px auto;
  padding: 10px 20px;
  font-size: 1rem;
  font-family: 'Lato', sans-serif;
  background: #222;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease, opacity 0.3s ease;
}

.mmc-back-to-top:hover {
  background: #444;
}

.mmc-back-to-top.hidden {
  display: none;
}

/* Hide reset button on mobile */
@media (max-width: 640px) {
  .mmc-reset-btn {
    display: none;
  }
}

