@charset "utf-8";

/* Expander shell */
.best-sellers-wrap { margin: 24px 0 64px; }
.bse-title { margin-top: 48px; 0 8px; font-size: clamp(3rem, -0.138rem + 4.2817vw, 5rem); }
/* Center the toggle & keep viewport full width */
.bse {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;   /* centers the button */
}
.bse-viewport { width: 100%; }

/* Animated viewport */
.bse-viewport {
  overflow: hidden;
  transition: max-height .35s ease;
  will-change: max-height;
  position: relative;
  padding-top: 10px;
}

/* Subtle gradient hint when collapsed */
.bse[bse-collapsed="true"] .bse-viewport::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 72px;                  /* height of the fade */
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
}

/* Toggle */
.bse-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 16px auto 0;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,.05);
  cursor: pointer;
  font: inherit;
}
.bse-toggle:hover { transform: translateY(-1px); }

.bse-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Rotate the chevron when expanded */
.bse-caret {
  transition: transform .2s ease;
}
.bse[bse-collapsed="false"] .bse-caret {
  transform: rotate(180deg);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .bse-viewport { transition: none; }
}

.flex-container {
      display: flex;
      flex-wrap: wrap;
      gap: 20px;
      margin-bottom: 64px;
      margin-top: 12px;
      /*justify-content: center;*/
    }

    .flex-item {
      flex: 1 0 calc(25% - 80px); /* 80px = 4 x the gap (20px)) */
      background: white;
      padding: 20px;
      border: 1px solid #ddd;
      border-radius: 8px;
      box-shadow: 0 2px 5px rgba(0,0,0,0.05);
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      min-height: 400px; /* adjust as needed */
      
    }
    .flex-item a {
        text-decoration: none;
    }
    .flex-item a .row-text {
        text-decoration: none;
        color: #000;
    }

    /* Uniform, responsive media box — no cropping */
.row-image {
  /* One consistent height that scales with viewport */
  height: clamp(160px, 20vw, 240px);
  width: 100%;
  display: flex;
  align-items: center;    /* center vertically */
  justify-content: center;/* center horizontally */
  overflow: hidden;       /* hide any overflow just in case */
  background: #fff;
  margin-bottom: 10px;
}

/* IMPORTANT: let the image fit INSIDE the box without cropping */
.img-contain {
  max-width: 100%;
  max-height: 100%;
  width: auto;            /* don't force full width */
  height: auto;           /* don't force full height */
  object-fit: contain;    /* keep aspect ratio, letterbox if needed */
  object-position: center;
  display: block;
}

/* Optional: tweak media height by breakpoint */
@media (max-width: 1024px) { .row-image { height: clamp(150px, 26vw, 220px); } }
@media (max-width: 900px)  { .row-image { height: clamp(140px, 34vw, 210px); } }
@media (max-width: 800px)  { .row-image { height: clamp(130px, 48vw, 200px); } }

/* Strong override in case a global rule sets images to width/height 100% */
.row-image img {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
}
    
    .row-image h2 {
        font-size: 200%;
        text-align: center;
        line-height: normal;
    }
    a .row-image h2 {
        color: #000;
    }

    .row-text {
      flex-grow: 1;
      margin-top: 24px;
      margin-bottom: 10px;
      text-align: center;
    }
    
    a .buy-it-now {
        color: #000;
    }

    .row-button {
      text-align: center;
      margin: 24px auto;
    }
    
    @media (min-width: 1024px) {
        .flex-item {
            max-width: 50%; /* stop it spanning the whole width */
        }
    }

    /* Tablet: 3 columns */
    @media (max-width: 1024px) {
      .flex-item {
        flex: 1 0 calc(33.333% - 20px);
      }
    }

    /* Mobile: 2 columns */
    @media (max-width: 900px) {
      .flex-item {
        flex: 1 0 calc(50% - 20px);
      }
    }

    /* Very small devices */
    @media (max-width: 800px) {
      .flex-item {
        flex: 1 0 100%;
      }
    }

.product-brand {
    color: #000;
    text-align: center;
    /* clamp to 2 lines with ellipsis */
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;

  /* make the box always the height of 2 lines */
  height: calc(1 * 1em * 1.25);   /* fallback for older browsers */
  height: calc(1 * 1lh);          /* modern: exactly 2 line-heights */
}
    
.product-title {
  /* your existing bits */
  font-size: 130%;
  color: #000;
  text-align: center;

  /* line + spacing */
  line-height: 1.25;
  margin: 0 0 10px;

  /* clamp to 2 lines with ellipsis */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;

  /* make the box always the height of 2 lines */
  height: calc(2 * 1em * 1.25);   /* fallback for older browsers */
  height: calc(2 * 1lh);          /* modern: exactly 2 line-heights */
}

/* If the title is a link, keep styling consistent */
.product-title a {
  color: inherit;
  text-decoration: none;
}

/* Optional: on very small screens, make titles single-line */
@media (max-width: 420px) {
  .product-title {
    -webkit-line-clamp: 1;
    height: calc(1 * 1em * 1.25);
    height: 1lh;
  }
}
    .buy-it-now {
        text-align: center;
    }
    
    
.purchased {
    display: block;
    font-size: 80%;
    color: #999;
}