/*****************************************************************************************************
* Postloops Module: Imagebox CSS
******************************************************************************************************/

/*
Grid Containers
---------------------------------------------------------------------------------------------------- */

/* Containers: Default
--------------------------------------------- */

.bub-loop.imagebox {
  align-items: flex-start;
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
}


/*
Grid Columns
---------------------------------------------------------------------------------------------------- */

/* Columns: cpt-Product
--------------------------------------------- */

/* 4 Columns, 32px apart and rows 30px apart, as the people archive's
   (postloops-smartbox.css; user, 2026-10-21; before, 20px both). */

.archive-bub_product .bub-loop.imagebox {
  margin: -10px -16px;
}

.archive-bub_product .bub-loop.imagebox .entry {
  margin: 10px 16px 1.25rem;
  width: calc(25% - 32px);
}

@media screen and (max-width: 1200px) {

   /* 3 Columns */

  .archive-bub_product .bub-loop.imagebox .entry {
    width: calc(33.32% - 32px);
  }
}

@media screen and (max-width: 800px) {

   /* 2 Columns, on phones too */

  .archive-bub_product .bub-loop.imagebox .entry {
    width: calc(50% - 32px);
  }
}


/* Columns: cpt-Party
--------------------------------------------- */

/* 4 Columns */

.archive-bub_party .bub-loop.imagebox {
  margin: -5px;
}

.archive-bub_party .bub-loop.imagebox .entry {
  margin: 5px;
  width: calc(25% - 10px);
}

@media screen and (max-width: 1200px) {

   /* 3 Columns */

  .archive-bub_party .bub-loop.imagebox .entry {
    width: calc(33.32% - 20px);
  }
}

@media screen and (max-width: 800px) {

   /* 2 Columns */

  .archive-bub_party .bub-loop.imagebox .entry {
    width: calc(50% - 20px);
  }
}

@media screen and (max-width: 500px) {

  /* 1 Column */

  .archive-bub_party .bub-loop.imagebox .entry {
    max-width: 320px;
    position: static !important;
    width: 100%;
  }
}


/* Columns: bub Products Block
--------------------------------------------- */

/* The block goes into layouts of any width, so its columns follow its own
   width, not the viewport's. */

.bub-block-products {
  container-type: inline-size;
}

/* 2 Columns */

.bub-block-products .bub-loop.imagebox {
  margin: -10px;
}

.bub-block-products .bub-loop.imagebox .entry {
  margin: 10px;
  width: calc(50% - 20px);
}

@container (min-width: 400px) {

  /* 3 Columns */

  .bub-block-products .bub-loop.imagebox .entry {
    width: calc(33.333% - 20px);
  }
}

@container (min-width: 800px) {

  /* 4 Columns */

  .bub-block-products .bub-loop.imagebox .entry {
    width: calc(25% - 20px);
  }
}


/*
Grid Elements
---------------------------------------------------------------------------------------------------- */

/* Elements: Default
--------------------------------------------- */

/* Entry / Article: the cover with its caption below it. The shadow sits on the
cover, and nothing clips the item, so the focus ring of the caption link shows. */

.bub-loop.imagebox .entry {
  overflow: visible;
}

.bub-loop.imagebox .entry-header {
  margin: 0;
  position: relative;
}

.bub-loop.imagebox .featimg__image {
  box-shadow: var(--cover-shadow-def); /* setup.css */
  display: block;
}

.bub-block-products .bub-loop.imagebox .featimg__image {
  box-shadow: var(--cover-shadow-sm); /* setup.css */
}

/* On hover, a title's cover lifts a little, its shadow unchanged (user,
   2026-10-19: a deeper shadow looked cheap, the movement stays; a grey
   caption pushes back what should come forward). Titles in the title
   archive carry the post class 'type-product'; those of the bub Products
   block, as on the front page or in a post, do not. The hover sits on the
   entry, which does not move, so the cover cannot flicker at its edges. */

.bub-loop.imagebox .entry.type-product .featimg__image,
.bub-block-products .bub-loop.imagebox .entry .featimg__image {
  transition: transform 200ms;
}

.bub-loop.imagebox .entry.type-product:hover .featimg__image,
.bub-block-products .bub-loop.imagebox .entry:hover .featimg__image {
  transform: translateY(-3px);
}

/* bub-product-archive-item: the parties and the title under the cover, as the
bub Products block shows them (below). */

.bub-loop.imagebox .bub-product-archive-item-info {
  padding: 0.5rem 0 0;
}

/* Entry Title */

.bub-loop.imagebox .bub-product-archive-item-info a {
  display: block;
  text-decoration: none;
}

.bub-loop.imagebox .bub-product-archive-item-info__title {
  color: var(--body-color-def);
  display: block;
  font: var(--basic-font-def);
  font-size: 0.85rem;
  line-height: 1.3;
  margin: 0;
}

.bub-loop.imagebox .bub-product-archive-item-info__title .before-title {
  display: block;
}

.bub-loop.imagebox .bub-product-archive-item-info__title .title {
  display: block;
  font-weight: 600;
}

/* Entry Meta */

.bub-loop.imagebox .entry-meta {
  font-size: 13px;
  margin: 0;
  font-style: italic;
}

.bub-loop.imagebox .entry-meta a {
  border-bottom: none;
  display: block;
  padding: 0 10px 7px;
}

.bub-loop.imagebox .entry-meta a:not(:hover) {
  color: #333;
}


/* Elements: cpt-Party
--------------------------------------------- */

.archive-bub_party .bub-loop.imagebox .entry {
  transition: filter 200ms;
}

.archive-bub_party .bub-loop.imagebox .entry:hover {
  filter: brightness(70%);
}

.archive-bub_party .bub-loop.imagebox .entry-header {
  position: relative;  
}

.archive-bub_party .bub-loop.imagebox .entry-title {
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 15px;
  padding: 7px 10px;
  position: absolute;
    bottom: 0;
  width: 100%;
}


/* Elements: bub Products Block
--------------------------------------------- */

/* The cover, with the parties and the title below it. Without the frame and
   the margin that single views give their own featured image
   (single-common.css), which the covers took in a post's text, such as a
   season preview's titles. */

.bub-block-products .bub-loop.imagebox .featimg {
  margin: 0;
}

.bub-block-products .bub-loop.imagebox .featimg__image {
  border: 0;
  height: auto;
  max-height: none;
  width: 100%;
}

.bub-block-products .bub-loop.imagebox .text-container {
  padding: 8px 0 0;
}

.bub-block-products .bub-loop.imagebox .entry-title {
  font: var(--basic-font-def);
  font-size: 0.85rem;
  line-height: 1.3;
  margin: 0;
}

.bub-block-products .bub-loop.imagebox .entry-title a {
  display: block;
  text-decoration: none;
}

.bub-block-products .bub-loop.imagebox .before-title {
  display: block;
}

.bub-block-products .bub-loop.imagebox .before-title:empty {
  display: none;
}

.bub-block-products .bub-loop.imagebox .title {
  display: block;
  font-weight: 600;
}
