
.bbx-breeds-scope *{ box-sizing:border-box; }

/* Notices */
.bbx-breeds-scope .bbx-breed-notice{
  padding:12px 14px;
  border-radius:14px;
  margin:12px 0;
  border: none;
  background: rgba(0,0,0,.03);
}
.bbx-breeds-scope .bbx-breed-notice--success{ background: rgba(0, 128, 0, .08); }
.bbx-breeds-scope .bbx-breed-notice--warn{ background: rgba(255, 165, 0, .10); }

/* Cards grid */
.bbx-breeds-scope .bbx-breeds-grid{
  display:grid;
  gap:24px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  justify-items:center;
}
@media (max-width: 1200px){ .bbx-breeds-grid{ grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px){ .bbx-breeds-grid{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px){ .bbx-breeds-grid{ grid-template-columns: 1fr; } }

/* Clickable wrapper rounded + clipped */
.bbx-breeds-scope .bbx-breed-card{
  text-decoration:none !important;
  width:100%;
  max-width:460px;
  display:block;
  border-radius:35px;
  overflow:hidden;
  background:transparent;
  transition: transform .3s ease;
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
}
.bbx-breeds-scope .bbx-breed-card__inner{
  aspect-ratio: 2 / 3;
  border-radius:35px;
  overflow:hidden;
  border:1px solid #000;
  background:#fff;
  display:flex;
  flex-direction:column;
  transition: box-shadow .3s ease;
}
.bbx-breeds-scope .bbx-breed-card__media{ flex:0 0 65%; overflow:hidden; }
.bbx-breeds-scope .bbx-breed-card__image{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position: top center;
  transition: transform .4s ease;
  display:block;
}
.bbx-breeds-scope .bbx-breed-card__footer{
  flex:0 0 35%;
  background:#F0B74C;
  color:#000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  text-align:center;
}
.bbx-breeds-scope .bbx-breed-card__title{
  font-family:'Open Sans', Arial, sans-serif;
  font-size: clamp(22px, 2.5vw, 34px);
  font-weight:400;
  letter-spacing:2px;
  line-height: 1.2;
}
.bbx-breeds-scope .bbx-breed-card:hover{ transform: translateY(-8px); }
.bbx-breeds-scope .bbx-breed-card:hover .bbx-breed-card__inner{ box-shadow: 0 20px 40px rgba(0,0,0,.15); }
.bbx-breeds-scope .bbx-breed-card:hover .bbx-breed-card__image{ transform: scale(1.08); }

/* Generic buttons */
.bbx-breeds-scope .bbx-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 14px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.18);
  background:#fff;
  cursor:pointer;
  text-decoration:none;
}
.bbx-breeds-scope .bbx-btn--secondary{ background: rgba(0,0,0,.04); }
.bbx-breeds-scope .bbx-btn--danger{ background: rgba(180,0,0,.08); border-color: rgba(180,0,0,.25); }
.bbx-breeds-scope .bbx-btn--small{ padding:8px 10px; border-radius:10px; font-size: 13px; }

/* Forms */
.bbx-breeds-scope .bbx-breed-form-wrap{ max-width: 640px; }
.bbx-breeds-scope .bbx-breed-form{
  border:1px solid rgba(0,0,0,.12);
  border-radius:18px;
  padding:16px;
  background:#fff;
}
.bbx-breeds-scope .bbx-breed-form--manager{ margin: 0; }
.bbx-breeds-scope .bbx-field{ margin: 0 0 14px 0; }
.bbx-breeds-scope .bbx-field label{ display:block; font-weight:600; margin:0 0 6px 0; }
.bbx-breeds-scope .bbx-field input[type="text"], .bbx-field input[type="file"]{ width:100%; max-width:100%; }
.bbx-breeds-scope .bbx-field--row{ display:flex; gap:12px; flex-wrap:wrap; }
.bbx-breeds-scope .bbx-current-image{ margin-top:10px; }
.bbx-breeds-scope .bbx-current-image img{ max-width:240px; height:auto; border-radius:12px; display:block; border:1px solid rgba(0,0,0,.12); }
.bbx-breeds-scope .bbx-current-image__label{ font-size:13px; opacity:.8; margin:0 0 6px 0; }

/* Manager layout */
.bbx-breeds-scope .bbx-breeds-manager{ width:100%; }
.bbx-breeds-scope .bbx-breeds-manager__columns{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:18px;
}
@media (max-width: 980px){
  .bbx-breeds-manager__columns{ grid-template-columns: 1fr; }
}

.bbx-breeds-scope .bbx-breeds-manager__left,
.bbx-breeds-scope .bbx-breeds-manager__right{
  border:1px solid rgba(0,0,0,.12);
  border-radius:18px;
  padding:16px;
  background:#fff;
}

.bbx-breeds-scope .bbx-breeds-manager__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:10px;
}
.bbx-breeds-scope .bbx-breeds-manager__title{ font-size:18px; font-weight:800; }
.bbx-breeds-scope .bbx-breeds-manager__panel-title{ font-size:18px; font-weight:800; margin-bottom:10px; }
.bbx-breeds-scope .bbx-breeds-manager__help{ font-size:13px; opacity:.85; margin: 6px 0 12px 0; }

/* Sortable list */
.bbx-breeds-scope .bbx-breeds-sortable{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.bbx-breeds-scope .bbx-breed-row{
  border:1px solid rgba(0,0,0,.12);
  border-radius:14px;
  padding:10px;
  display:grid;
  grid-template-columns: 24px 52px 1fr auto;
  gap:10px;
  align-items:center;
  background:#fff;
}
.bbx-breeds-scope .bbx-breed-row[draggable="true"]{ cursor:grab; }
.bbx-breeds-scope .bbx-breed-row.dragging{ opacity:.55; }
.bbx-breeds-scope .bbx-breed-row__drag{ font-size:18px; line-height:1; opacity:.6; user-select:none; }
.bbx-breeds-scope .bbx-breed-row__thumb img{
  width:52px; height:52px; border-radius:12px; object-fit:cover; object-position: top center;
  border:1px solid rgba(0,0,0,.12);
  display:block;
}
.bbx-breeds-scope .bbx-breed-row__name{ font-weight:700; }
.bbx-breeds-scope .bbx-breed-row__actions{ display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.bbx-breeds-scope .bbx-breeds-manager__status{ margin-top:10px; font-size:13px; opacity:.9; }

:root{
  /* NOTE: Set these to exactly match your Litters plugin alternating backgrounds if different. */
  --bbx-studs-row-bg-odd: #c8e6f0;
  --bbx-studs-row-bg-even: #b7d9e6;
}

.bbx-studs-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.bbx-studs-card{
  display:block;
  text-decoration:none;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 14px;
  overflow:hidden;
  background:#fff;
  transition: transform .12s ease, box-shadow .12s ease;
}

.bbx-studs-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.bbx-studs-card-media{
  aspect-ratio: 4 / 3;
  overflow:hidden;
}

.bbx-studs-card-media img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}

.bbx-studs-card-body{
  padding: 14px 14px 16px;
}

.bbx-studs-card-title{
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  color: inherit;
}

.bbx-studs-card-subtitle{
  margin-top: 6px;
  font-size: 14px;
  opacity: .78;
  color: inherit;
}

@media (max-width: 1024px){
  .bbx-studs-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px){
  .bbx-studs-grid{ grid-template-columns: 1fr; }
}

/* Single Stud layout */
.bbx-stud-single-wrap{
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 16px;
}

.bbx-stud-single-header{
  margin-bottom: 18px;
}

.bbx-stud-single-header h1{
  margin: 0 0 8px 0;
}

.bbx-stud-dogs{
  display:flex;
  flex-direction:column;
  gap: 16px;
}

.bbx-stud-dog{
  display:grid;
  grid-template-columns: 360px 1fr;
  gap: 18px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.10);
}

.bbx-stud-dog:nth-child(odd){ background: var(--bbx-studs-row-bg-odd); }
.bbx-stud-dog:nth-child(even){ background: var(--bbx-studs-row-bg-even); }

.bbx-stud-dog-media{
  position: relative;
}

.bbx-stud-dog-media img{
  width: 100%;
  height: auto;
  border-radius: 14px;
  display:block;
  object-fit: cover;
}

.bbx-proven-badge{
  position:absolute;
  top: 10px;
  right: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 12px;
  line-height: 1;
  color: #fff;
  background: rgba(0,0,0,0.72);
  text-transform: uppercase;
}

.bbx-stud-dog-details h2{
  margin: 0 0 10px 0;
  font-size: 22px;
}

.bbx-stud-meta{
  display:grid;
  grid-template-columns: 180px 1fr;
  gap: 8px 14px;
  margin-bottom: 10px;
}

.bbx-stud-meta .k{ font-weight: 700; opacity: .85; }
.bbx-stud-meta .v{ opacity: .92; }

.bbx-stud-description{
  margin-top: 10px;
}

@media (max-width: 900px){
  .bbx-stud-dog{ grid-template-columns: 1fr; }
}


/* Manager */
.bbx-stud-manager-actions{
  display:flex;
  justify-content:flex-end;
  margin-bottom: 14px;
}
.bbx-stud-manager-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration:none;
  border: 1px solid rgba(0,0,0,0.18);
  font-weight: 700;
}
.bbx-stud-manager-card-actions{
  display:flex;
  gap: 12px;
  margin-top: 10px;
  align-items:center;
  flex-wrap: wrap;
}
.bbx-stud-manager-link{
  text-decoration:none;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid rgba(0,0,0,0.16);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.02);
}
.bbx-stud-manager-delete{ margin: 0; display:inline; }
.bbx-stud-manager-link.bbx-danger{
  border-color: rgba(179,45,46,0.35);
}


/* Frontend manager form */
.bbx-sm-notice{
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 12px;
  margin-bottom: 12px;
}

.bbx-stud-manager-form{
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 16px;
  padding: 16px;
  background: #fff;
}

.bbx-sm-section{ margin-bottom: 18px; }
.bbx-sm-section h3{ margin: 0 0 12px 0; }

.bbx-sm-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.bbx-sm-grid-2{
  grid-template-columns: 1fr 1fr;
}
.bbx-sm-field{
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 14px;
  padding: 12px;
  background: rgba(0,0,0,0.01);
}
.bbx-sm-full{ grid-column: 1 / -1; }

.bbx-sm-media{ display:flex; gap:10px; margin-top: 8px; }
.bbx-sm-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration:none;
  border: 1px solid rgba(0,0,0,0.18);
  font-weight: 700;
  background: rgba(0,0,0,0.02);
  cursor: pointer;
}
.bbx-sm-add{ margin-top: 10px; }
.bbx-sm-save{ margin-right: 10px; }

.bbx-sm-preview img{
  max-width: 240px;
  height:auto;
  margin-top: 10px;
  border-radius: 14px;
  display:block;
}

.bbx-sm-rows{ display:flex; flex-direction:column; gap: 14px; }
.bbx-sm-row{
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 16px;
  padding: 12px;
  background: rgba(0,0,0,0.02);
}
.bbx-sm-row-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom: 10px;
}

.bbx-sm-link{
  font-weight: 700;
  text-decoration:none;
  border: 1px solid rgba(0,0,0,0.16);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.02);
}

.bbx-sm-checkbox{ display:flex; align-items:center; gap:8px; }

.bbx-sm-actions{
  display:flex;
  gap: 10px;
  align-items:center;
  flex-wrap: wrap;
}

@media (max-width: 900px){
  .bbx-sm-grid-2{ grid-template-columns: 1fr; }
}


/* Manager sortable status + dragging */
.bbx-sm-status{
  min-height: 18px;
  margin-bottom: 10px;
  font-weight: 700;
}
.bbx-stud-row.dragging{
  opacity: 0.55;
}


/* Remove border around each Stud Dog section */
.bbx-stud-dog{ border:none !important; box-shadow:none !important; }



/* Full-width like Litters: outer spans edge-to-edge, inner content stays centered */
.bbx-stud-single-outer{ width:100%; }
.bbx-stud-single-wrap{ max-width:1100px; margin:0 auto; padding: 0 18px; }

/* Title styling to match Litters */
.bbx-stud-single-header{ text-align:center; padding: 34px 0 18px; }
.bbx-stud-title{
  text-align:center;
  font-family: "Amatic SC", Sans-serif;
  font-size: 60px;
  font-weight: 400;
  line-height: 60px;
  margin: 0;
}

/* Dog rows: full-width background stripes */
.bbx-stud-dog-row{ padding: 22px 0; }
.bbx-stud-single-outer .bbx-stud-dog-row:nth-child(odd){ background: var(--bbx-studs-row-bg-odd); }
.bbx-stud-single-outer .bbx-stud-dog-row:nth-child(even){ background: var(--bbx-studs-row-bg-even); }

/* Make the dog card align with wrap width */
.bbx-stud-dog-row .bbx-stud-dog{ max-width:1100px; margin:0 auto; padding: 0 18px; }

/* Remove borders around each stud dog (image + details container) */
.bbx-stud-dog{ border:none !important; box-shadow:none !important; background: transparent !important; }



/* Force full-bleed rows even inside constrained theme containers */
.bbx-stud-dog-row{
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}



/* Full-bleed title header + background same as first (odd) section */
.bbx-stud-single-header{
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: var(--bbx-studs-row-bg-odd);
}

/* Double the stud name size */
.bbx-stud-dog-name{ font-size: 56px; line-height: 1; }
@media (max-width: 820px){
  .bbx-stud-dog-name{ font-size: 44px; }
}

/* Description row styling inside details */
.bbx-stud-desc-row .v{ display:block; }



/* Remove margin from header */
.bbx-stud-single-header{ margin:0 !important; }

/* Increase padding top/bottom of each stud row */
.bbx-stud-dog-row{ padding:50px 0 !important; }

/* Double stud name size again */
.bbx-stud-dog-name{ font-size: 90px !important; line-height: 1; }
@media (max-width: 820px){
  .bbx-stud-dog-name{ font-size: 64px !important; }
}

/* Larger PROVEN overlay */
.bbx-proven-badge{
  font-size: 32px !important;
  padding: 18px 28px !important;
  background: #F0B74C !important;
  color:#000 !important;
}



/* Prevent full-bleed rows from causing horizontal shift */
.bbx-stud-single-outer{ overflow-x:hidden; }

/* Ensure section padding separates rows (no flex gap interference) */
.bbx-stud-dogs{ gap:0 !important; }
.bbx-stud-dog-row{ display:block; padding:50px 0 !important; margin:0 !important; }

/* Stud name size (template uses h2) */
.bbx-stud-dog-details h2{ font-size: 110px !important; line-height: 1; margin: 0 0 12px 0; }
@media (max-width: 820px){
  .bbx-stud-dog-details h2{ font-size: 72px !important; }
}

/* PROVEN overlay at 70% opacity with required color */
.bbx-proven-badge{
  background: rgba(240,183,76,0.7) !important;
}


.bbx-stud-single-header{ margin-left:0 !important; margin-right:0 !important; }



/* --- Full-bleed backgrounds WITHOUT shifting content --- */
.bbx-stud-dog-row,
.bbx-stud-single-header{
  position: relative !important;
  width: auto !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.bbx-stud-dog-row::before,
.bbx-stud-single-header::before{
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  z-index: -1;
}

.bbx-stud-dog-row:nth-child(odd)::before{ background: var(--bbx-studs-row-bg-odd); }
.bbx-stud-dog-row:nth-child(even)::before{ background: var(--bbx-studs-row-bg-even); }
.bbx-stud-single-header::before{ background: var(--bbx-studs-row-bg-odd); }

/* If older full-bleed rule exists, neutralize it */
.bbx-stud-dog-row{ left: auto !important; }

/* --- Sizing tweaks requested --- */
/* Reduce stud name by 50% */
.bbx-stud-dog-details h2{ font-size: 55px !important; }
@media (max-width: 820px){
  .bbx-stud-dog-details h2{ font-size: 36px !important; }
}

/* Reduce PROVEN overlay by 25% */
.bbx-proven-badge{
  font-size: 24px !important;
  padding: 14px 21px !important;
}

/* Bold Description label */
.bbx-stud-desc-row .k{ font-weight: 800 !important; }


/* ===== Puppy-profile style panel for Stud details (public page) ===== */
.bbx-stud-panel{
  border-radius:18px;
  border:1px solid rgba(0,0,0,.08);
  background:#fff;
  padding:18px;
}
.bbx-stud-name{
  margin:0 0 12px;
  font-size:34px;
  line-height:1.15;
}
.bbx-stud-meta-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:8px;
}
@media (max-width:520px){
  .bbx-stud-meta-grid{grid-template-columns:1fr}
  .bbx-stud-name{font-size:28px}
}
.bbx-meta-item{
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(0,0,0,.08);
  background:rgba(0,0,0,.02);
}
.bbx-meta-label{
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.04em;
  opacity:.7;
}
.bbx-meta-value{
  margin-top:4px;
  font-size:16px;
  font-weight:600;
  line-height:1.45;
}
.bbx-stud-description{margin-top:16px}
.bbx-stud-desc-title{
  font-size:18px;
  margin:0 0 10px;
  font-weight:800;
}
.bbx-stud-desc-content p{margin:0 0 10px}
.bbx-stud-desc-content p:last-child{margin-bottom:0}
.bbx-stud-desc-content ul,
.bbx-stud-desc-content ol{margin:8px 0 8px 18px}


/* Layout: Fee + Birthday inline; Restrictions + Description full width */
.bbx-stud-meta-row{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.bbx-meta-item-full{
  width: 100%;
}

.bbx-meta-desc .bbx-meta-value{
  font-weight: 400;
}

.bbx-meta-desc .bbx-stud-desc-content p{ margin: 0 0 10px; }
.bbx-meta-desc .bbx-stud-desc-content p:last-child{ margin-bottom: 0; }
.bbx-meta-desc .bbx-stud-desc-content ul,
.bbx-meta-desc .bbx-stud-desc-content ol{ margin: 8px 0 8px 18px; }

@media (max-width:520px){
  .bbx-stud-meta-row{ grid-template-columns: 1fr; }
}


/* ===== Fix layout: Fee+Birthday inline; Restrictions full-width below; Description stays inside panel ===== */
.bbx-stud-meta-grid{
  display: block !important;
  margin-top: 8px !important;
}
.bbx-meta-item-full{
  display: block !important;
  width: 100% !important;
  margin-top: 10px !important;
}


/* ===== Fixed, consistent row height (Option C) ===== */
:root{
  --bbx-stud-row-height-desktop: 520px;
  --bbx-stud-row-image-height-mobile: 320px;
}

.bbx-stud-dog{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
  min-height: var(--bbx-stud-row-height-desktop);
}

.bbx-stud-dog-media,
.bbx-stud-dog-details{
  height: 100%;
}

.bbx-stud-dog-media img{
  width: 100%;
  height: 100% !important;      /* fill to match details height */
  object-fit: cover;
}

/* Ensure the details panel stretches full height */
.bbx-stud-dog-details .bbx-stud-panel{
  height: 100%;
  display: flex;
  flex-direction: column;
}
/* Let description take remaining space when present */
.bbx-stud-dog-details .bbx-meta-desc{
  margin-top: auto;
}

/* Responsive: stack on mobile, keep consistent image height */
@media (max-width: 900px){
  .bbx-stud-dog{
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 16px;
  }
  .bbx-stud-dog-media img{
    height: var(--bbx-stud-row-image-height-mobile) !important;
  }
  .bbx-stud-dog-details .bbx-stud-panel{
    height: auto;
  }
  .bbx-stud-dog-details .bbx-meta-desc{
    margin-top: 16px;
  }
}

@media (max-width: 560px){
  :root{ --bbx-stud-row-image-height-mobile: 260px; }
}


/* Right column background override */
.bbx-stud-panel{ background:#F8F3E7 !important; }


/* ===== Center Stud Breed cards when fewer than 3 ===== */
/* Default: center grid items */
.bbx-studs-grid{
  justify-content: center;
}

/* If 3+ cards, return to normal alignment (modern browsers) */
.bbx-studs-grid:has(.bbx-stud-card:nth-child(3)){
  justify-content: flex-start;
}

/* Keep cards from stretching too wide when centered */
.bbx-stud-card{
  max-width: 420px;
}


/* ===== Center Stud Breed cards when fewer than 3 (count-based, shortcode) ===== */
.bbx-studs-grid--count-1,
.bbx-studs-grid--count-2{
  justify-content: center !important;
}


/* ===== Center [bbx_studs] cards when fewer than 3 ===== */
.bbx-studs-grid--count-1{
  grid-template-columns: repeat(1, minmax(0, 420px)) !important;
  justify-content: center !important;
}
.bbx-studs-grid--count-2{
  grid-template-columns: repeat(2, minmax(0, 420px)) !important;
  justify-content: center !important;
}
@media (max-width: 900px){
  .bbx-studs-grid--count-2{
    grid-template-columns: 1fr !important;
  }
}


/* ===== [bbx_studs] Centering overrides (reliable) ===== */
.bbx-studs-grid--count-1{
  grid-template-columns: repeat(1, minmax(0, 420px)) !important;
  justify-content: center !important;
}
.bbx-studs-grid--count-2{
  grid-template-columns: repeat(2, minmax(0, 420px)) !important;
  justify-content: center !important;
}

@media (max-width: 700px){
  .bbx-studs-grid--count-2{
    grid-template-columns: repeat(1, minmax(0, 420px)) !important;
  }
}

/* ===== [bbx_studs] Robust centering: switch studs grid to flex so last row centers naturally ===== */
.bbx-breeds-grid.bbx-studs-grid{
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 24px !important;
}

.bbx-breeds-grid.bbx-studs-grid .bbx-breed-card.bbx-stud-card{
  width: 100%;
  max-width: 460px;
  flex: 0 1 calc(25% - 24px);
}

/* 3 columns */
@media (max-width: 1200px){
  .bbx-breeds-grid.bbx-studs-grid .bbx-breed-card.bbx-stud-card{
    flex-basis: calc(33.333% - 24px);
  }
}

/* 2 columns */
@media (max-width: 900px){
  .bbx-breeds-grid.bbx-studs-grid .bbx-breed-card.bbx-stud-card{
    flex-basis: calc(50% - 24px);
  }
}

/* 1 column */
@media (max-width: 560px){
  .bbx-breeds-grid.bbx-studs-grid .bbx-breed-card.bbx-stud-card{
    flex-basis: 100%;
    max-width: 520px;
  }
}


/* ===== Bigger Stud cards (Option A): 3 per row on desktop; title unchanged ===== */
.bbx-breeds-grid.bbx-studs-grid .bbx-breed-card.bbx-stud-card{
  flex: 0 1 calc(33.333% - 24px) !important;
  max-width: 600px;
}

/* Tablet: 2 per row */
@media (max-width: 900px){
  .bbx-breeds-grid.bbx-studs-grid .bbx-breed-card.bbx-stud-card{
    flex-basis: calc(50% - 24px) !important;
  }
}

/* Mobile: 1 per row */
@media (max-width: 560px){
  .bbx-breeds-grid.bbx-studs-grid .bbx-breed-card.bbx-stud-card{
    flex-basis: 100% !important;
    max-width: 680px;
  }
}

/* Stud Dog Gallery */
.bbx-stud-gallery{ width:100%; margin-top:18px; }
.bbx-stud-gallery-grid{ display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:12px; }
.bbx-stud-gallery-item{ display:block; border-radius:14px; overflow:hidden; background:#fff; box-shadow:0 2px 8px rgba(0,0,0,.08); }
.bbx-stud-gallery-item img{ width:100%; height:100%; aspect-ratio: 1 / 1; object-fit:cover; display:block; }
.bbx-stud-gallery-pagination{ display:flex; align-items:center; justify-content:center; gap:12px; margin-top:14px; }
.bbx-stud-gallery-pagination button{ padding:8px 14px; border-radius:10px; border:1px solid rgba(0,0,0,.15); background:#fff; cursor:pointer; }
.bbx-stud-gallery-pagination button:disabled{ opacity:.5; cursor:not-allowed; }

@media (max-width: 900px){
  .bbx-stud-gallery-grid{ grid-template-columns:repeat(2, minmax(0,1fr)); }
}
@media (max-width: 520px){
  .bbx-stud-gallery-grid{ grid-template-columns:repeat(2, minmax(0,1fr)); gap:10px; }
}

/* Puppies gallery container */
.bbx-stud-gallery-wrap{
  width:100%;
  margin-top:18px;
  padding:22px;
  border-radius:22px;
  background:#F8F3E7;
}
.bbx-stud-gallery-label{
  font-size:22px;
  font-weight:700;
  text-align:left;
  margin:0 0 14px 0;
}
@media (max-width: 520px){
  .bbx-stud-gallery-wrap{ padding:16px; border-radius:18px; }
  .bbx-stud-gallery-label{ font-size:20px; }
}
