/* === Reset === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  overflow-x: hidden;
  font-family: "Varta", sans-serif;
}

/* === WordPress Breakout === */
#mmf-caps,
#mmf-caps .container,
.wp-coder,
.wp-block,
.wp-block-wp-coder {
  width: 100vw !important;
  max-width: 100vw !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: #fff;
}

.placeholder {
  max-width: 100%;
  max-height: 70vh;
  width: auto;
  height: auto;
  object-fit: contain;

  display: block;      /* makes auto margin work */
  margin: 0 auto;      /* centers horizontally */
}

/* === Title === */
#mmf-caps .navbar h1 {
  width: 100%;
  text-align: center !important;
  font-size: 2.5vw;
  font-weight: 800;
  color: #8b0a24;
  margin: 60px auto 60px auto !important;
  letter-spacing: 1px;
  font-family: "Varta" !important;
}

/* === Product Grid === */
#mmf-caps .container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  justify-items: center;
  align-items: start;

  column-gap: 10px;
  row-gap: 40px;

  width: 100vw;
  max-width: 100vw;
  margin: 0 auto;
  padding: 0 40px 60px 40px;
  box-sizing: border-box;
}

/* === Product Box (updated to match t-shirts & accessories) === */
#mmf-caps .box {
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  overflow: hidden;
  text-align: center;

  display: flex;
  flex-direction: column;
  justify-content: space-between;

  transition: transform 0.2s ease, box-shadow 0.2s ease;

  /* MATCH SHIRTS/ACCESSORIES */
  width: 28vw;
  max-width: 28vw;
  min-height: 60vh;
}

#mmf-caps .box:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.2);
}

/* === Image Hover — updated height only (matches shirts) === */
#mmf-caps .img-hover {
  position: relative;
  width: 100%;
  height: 40vh; /* was 420px */
  overflow: hidden;
}

#mmf-caps .img-hover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s ease;
  position: absolute;
  top: 0;
  left: 0;
}

#mmf-caps .img-hover .hover {
  opacity: 0;
}

#mmf-caps .img-hover:hover .default {
  opacity: 0;
}

#mmf-caps .img-hover:hover .hover {
  opacity: 1;
}

/* === Product Text === */
#mmf-caps .box h3 {
  margin: 12px 0 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #000;
}

/* === Button === */
#mmf-caps .box button {
  background-color: #8b0a24;
  color: white;
  border: none;
  border-radius: 25px;
  padding: 12px 28px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s ease, background-color 0.2s ease;
  margin: 20px auto 30px auto;
}

#mmf-caps .box button:hover {
  transform: scale(1.05);
  background-color: #a01030;
}

#mmf-caps .return {
  background-color: #8b0a24;
  color: white;
  border: none;
  border-radius: 2vw;
  padding: 1vh 2vw;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s ease, background-color 0.2s ease;
  margin: 2vh 0 3vh 2vw;
  display: inline-block;
}

#mmf-caps .return:hover {
  transform: scale(1.05);
  background-color: #a01030;
}

/* === Responsive Layout — synced with shirts/accessories === */
@media (max-width: 1200px) {
  #mmf-caps .container {
    grid-template-columns: repeat(2, 1fr);
  }

  #mmf-caps .box {
    width: 40vw;
    max-width: 40vw;
  }

  #mmf-caps .img-hover {
    height: 30vh;
  }
}

@media (max-width: 768px) {
  #mmf-caps .container {
    grid-template-columns: 1fr;
    padding: 0 20px 40px 20px;
  }

  #mmf-caps .box {
    width: 90vw;
    max-width: 90vw;
    min-height: 55vh;
  }

  #mmf-caps .img-hover {
    height: 28vh;
  }
}

/* === Remove unwanted pseudo elements === */
#mmf-caps .container::before {
  content: none !important;
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
