/* ═══════════════════════════════════════════════
   Banner Gallery – Frontend (image-first tiles,
   accordion categories, lightbox)
   ═══════════════════════════════════════════════ */

/* ── Product page code badge ── */
.bgt-code-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(110deg, #d545a0, #7355cf, #237bdf);
  color: #fff;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 12px;
  box-shadow: 0 10px 18px rgba(113, 91, 204, 0.2);
}

/* ── Accordion categories ── */
.bgt-cat-accordion {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 20px 0;
}

.bgt-acc-item {
  border: 1px solid #cdeafb;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(242, 251, 255, 0.9));
  box-shadow: 0 10px 26px rgba(64, 133, 176, 0.08);
  overflow: hidden;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.bgt-acc-item:hover {
  border-color: #86d5f1;
  box-shadow: 0 16px 34px rgba(64, 133, 176, 0.14);
}

.bgt-acc-item[open] {
  border-color: #6fcdee;
}

.bgt-acc-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  user-select: none;
}

.bgt-acc-summary::-webkit-details-marker {
  display: none;
}

.bgt-acc-title {
  font-size: 17px;
  font-weight: 800;
  color: #12365f;
  position: relative;
  padding-right: 16px;
}

.bgt-acc-title::before {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(180deg, #d545a0, #7355cf, #237bdf);
}

.bgt-acc-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bgt-acc-count {
  background: #eefaff;
  border: 1px solid #c9e9f9;
  color: #1774b5;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
}

.bgt-acc-chevron {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e6f7ff, #ebddff);
  color: #5d57ca;
  font-size: 14px;
  transition: transform 250ms ease;
}

.bgt-acc-item[open] .bgt-acc-chevron {
  transform: rotate(180deg);
}

.bgt-acc-body {
  padding: 4px 22px 20px;
  animation: bgtAccOpen 240ms ease;
}

@keyframes bgtAccOpen {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.bgt-acc-all {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  color: #2078cc;
  text-decoration: none;
  margin-bottom: 12px;
}

.bgt-acc-all:hover {
  color: #12365f;
}

.bgt-acc-children {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bgt-chip,
a.bgt-chip,
button.bgt-chip,
.bgt-gallery-wrap .bgt-chip {
  display: inline-block;
  background: #f6fbff !important;
  background-color: #f6fbff !important;
  background-image: none !important;
  border: 1px solid #dbeefa !important;
  color: #54718f !important;
  border-radius: 999px !important;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none !important;
  text-transform: none !important;
  box-shadow: none;
  transition: all 160ms ease;
}

.bgt-chip:hover,
a.bgt-chip:hover,
button.bgt-chip:hover,
.bgt-gallery-wrap .bgt-chip:hover {
  background: #e5f8ff !important;
  background-color: #e5f8ff !important;
  border-color: #86d5f1 !important;
  color: #237bdf !important;
  transform: translateY(-1px);
}

/* ── Design tiles: image-first, full image visible ── */
.bgt-designs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
  margin: 20px 0;
}

.bgt-design-tile {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bgt-tile-imgwrap {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background:
    repeating-conic-gradient(#f1f7fb 0% 25%, #ffffff 0% 50%) 50% / 22px 22px;
  border: 1px solid #dcecf8;
  box-shadow: 0 8px 22px rgba(64, 133, 176, 0.08);
  transition: box-shadow 200ms ease, border-color 200ms ease;
}

.bgt-tile-imgwrap:hover {
  border-color: #86d5f1;
  box-shadow: 0 14px 30px rgba(64, 133, 176, 0.15);
}

.bgt-tile-img {
  display: block;
  width: 100%;
  height: auto;          /* keep natural aspect ratio – full image visible */
  max-height: 340px;
  object-fit: contain;   /* never crop landscape banners */
  cursor: zoom-in;
}

.bgt-tile-code {
  position: absolute;
  top: 8px;
  right: 8px;
  background: linear-gradient(110deg, #ff3d8b, #e0348d);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(224, 52, 141, 0.45);
  pointer-events: none;
}

.bgt-tile-btn,
a.bgt-tile-btn,
.bgt-designs-grid .bgt-tile-btn {
  display: block;
  text-align: center;
  padding: 11px 14px;
  border-radius: 12px !important;
  background: linear-gradient(120deg, #1daabd, #237bdf) !important;
  background-color: #1e90be !important;
  border: none !important;
  color: #fff !important;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none !important;
  text-transform: none !important;
  box-shadow: 0 8px 18px rgba(30, 144, 190, 0.22);
  transition: filter 160ms ease, transform 160ms ease;
}

.bgt-tile-btn:hover,
a.bgt-tile-btn:hover {
  background: linear-gradient(120deg, #18929f, #1b6ec9) !important;
  color: #fff !important;
  filter: brightness(1.07);
  transform: translateY(-1px);
}

/* ── Lightbox ── */
.bgt-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(9, 22, 39, 0.92);
  padding: 30px;
  cursor: zoom-out;
}

.bgt-lightbox.bgt-lightbox-open {
  display: flex;
}

.bgt-lightbox-img {
  max-width: 94vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  cursor: default;
}

.bgt-lightbox-close {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  transition: background 160ms ease;
}

.bgt-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.bgt-lightbox-code {
  position: absolute;
  top: 24px;
  right: 24px;
  background: linear-gradient(110deg, #ff3d8b, #e0348d);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  padding: 6px 16px;
  border-radius: 10px;
}

/* ── Interactive gallery (bgt_gallery shortcode) ── */
.bgt-gallery-wrap {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.bgt-acc-allrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  border: 1px solid #cdeafb;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(242, 251, 255, 0.9));
  box-shadow: 0 10px 26px rgba(64, 133, 176, 0.08);
  padding: 18px 22px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.bgt-acc-allrow:hover {
  border-color: #86d5f1;
}

.bgt-acc-allrow .bgt-acc-title {
  padding-right: 16px;
}

/* Active filter states */
.bgt-filter {
  cursor: pointer;
  font-family: inherit;
}

button.bgt-chip {
  border: 1px solid #dbeefa;
  background: #f6fbff;
}

.bgt-chip.bgt-filter-active,
a.bgt-chip.bgt-filter-active,
button.bgt-chip.bgt-filter-active,
.bgt-gallery-wrap .bgt-chip.bgt-filter-active {
  background: linear-gradient(110deg, #ff3d8b, #e0348d) !important;
  background-color: #e0348d !important;
  border-color: #e0348d !important;
  color: #fff !important;
  box-shadow: 0 6px 14px rgba(224, 52, 141, 0.3);
}

.bgt-acc-allrow.bgt-filter-active {
  border-color: #3db6dd;
  background: linear-gradient(120deg, #eafaff, #ffffff);
  box-shadow: 0 14px 30px rgba(50, 150, 200, 0.16);
}

.bgt-acc-allrow.bgt-filter-active .bgt-acc-title {
  color: #12365f;
}

.bgt-acc-summary .bgt-acc-title.bgt-filter-active {
  background: none !important;
  box-shadow: none;
  color: #e0348d !important;
}

/* Gallery header */
.bgt-gallery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bgt-gallery-title {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
  color: #12365f;
}

.bgt-gallery-title span {
  background: linear-gradient(110deg, #d545a0, #7355cf, #237bdf);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bgt-clear-filter {
  border: 1px solid #dbeefa;
  background: #fff;
  color: #54718f;
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 160ms ease;
}

.bgt-clear-filter:hover {
  border-color: #86d5f1;
  color: #237bdf;
}

/* Loading state */
.bgt-designs-grid.bgt-loading {
  opacity: 0.45;
  pointer-events: none;
  filter: saturate(0.6);
  transition: opacity 200ms ease;
}

.bgt-empty-note {
  grid-column: 1 / -1;
  text-align: center;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  padding: 30px;
  color: #64748b;
}

/* ═══ Wizard (novice-friendly guided flow) ═══ */

/* ── Theme-proof reset (WoodMart / other themes style all <button> tags) ── */
.bgt-gallery-wrap button.bgt-catbtn,
.bgt-gallery-wrap button.bgt-chip,
.bgt-gallery-wrap button.bgt-acc-allrow,
.bgt-gallery-wrap button.bgt-clear-filter,
.bgt-cat-accordion button.bgt-chip,
.bgt-cat-accordion button.bgt-acc-allrow {
  -webkit-appearance: none !important;
  appearance: none !important;
  background-image: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  text-shadow: none !important;
  line-height: 1.6 !important;
  min-height: 0 !important;
  height: auto !important;
  width: auto;
  margin: 0 !important;
  outline: none !important;
}

.bgt-gallery-wrap button.bgt-catbtn:focus,
.bgt-gallery-wrap button.bgt-chip:focus {
  outline: none !important;
  box-shadow: none;
}

.bgt-wizard {
  gap: 30px;
}

.bgt-step-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.bgt-step-num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: linear-gradient(135deg, #237bdf, #1daabd);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(30, 144, 190, 0.3);
  flex-shrink: 0;
}

.bgt-step-text {
  font-size: 19px;
  font-weight: 900;
  color: #12365f;
}

/* Step 1: compact category buttons */
.bgt-catgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
}

.bgt-gallery-wrap .bgt-catbtn,
button.bgt-catbtn {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  border: 2px solid #d7ecfa !important;
  border-radius: 14px !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #12365f !important;
  padding: 12px 8px !important;
  cursor: pointer;
  font-family: inherit;
  box-shadow: none;
  transition: all 180ms ease;
}

.bgt-gallery-wrap .bgt-catbtn:hover,
button.bgt-catbtn:hover {
  border-color: #86d5f1 !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #12365f !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(64, 133, 176, 0.12);
}

.bgt-catbtn-icon {
  font-size: 24px;
  line-height: 1;
}

.bgt-catbtn .bgt-catbtn-name {
  font-size: 13px;
  font-weight: 900;
  color: #12365f !important;
  line-height: 1.5;
  text-align: center;
}

.bgt-catbtn .bgt-catbtn-count {
  background: #eefaff !important;
  color: #1774b5 !important;
  border-radius: 999px;
  padding: 1px 9px;
  font-size: 10px;
  font-weight: 700;
}

.bgt-catbtn .bgt-catbtn-check {
  display: none;
  background: #1daabd !important;
  color: #fff !important;
  border-radius: 999px;
  padding: 1px 9px;
  font-size: 10px;
  font-weight: 900;
}

.bgt-gallery-wrap .bgt-catbtn.bgt-filter-active,
button.bgt-catbtn.bgt-filter-active {
  border-color: #1daabd !important;
  background: linear-gradient(180deg, #eafaff, #ffffff) !important;
  background-color: #eafaff !important;
  color: #12365f !important;
  box-shadow: 0 12px 26px rgba(29, 170, 189, 0.22);
}

.bgt-catbtn.bgt-filter-active .bgt-catbtn-check {
  display: inline-block;
}

/* Step 2: subcategory chips – larger for easy tapping */
.bgt-subwrap {
  animation: bgtAccOpen 240ms ease;
}

.bgt-subchips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.bgt-subchips .bgt-chip {
  font-size: 14px;
  padding: 10px 20px;
  border-width: 2px;
}

/* Hint bar */
.bgt-hintbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #ffe1a8;
  background: #fff9ec;
  border-radius: 16px;
  padding: 12px 18px;
}

.bgt-hint-text {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #8a5a00;
  line-height: 1.9;
}

.bgt-hint-badge {
  background: #fff;
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 900;
  color: #12365f;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Bigger tile button for novice users */
.bgt-tile-btn {
  padding: 14px;
  font-size: 15px;
}

@media (max-width: 520px) {
  .bgt-catgrid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bgt-step-text {
    font-size: 16px;
  }
}
