/* Black Lab Deals uniform header navigation / mega menu only. */
/* BLD UNIFIED DEAL CARDS START */
.hot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.hot-grid .best-seller-card,
.deal-card-unified {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  color: var(--text-primary);
}

.hot-grid .best-seller-img,
.deal-card-unified .best-seller-img {
  height: 180px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #eee;
}

.hot-grid .best-seller-img img,
.deal-card-unified .best-seller-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 14px;
}

.hot-grid .best-seller-body,
.deal-card-unified .best-seller-body {
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.hot-grid .best-seller-badges,
.deal-card-unified .best-seller-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.hot-grid .best-seller-badge,
.deal-card-unified .best-seller-badge {
  font-size: 11px;
  font-weight: 800;
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--red-light);
  color: var(--red);
}

.hot-grid .best-seller-badge.rank,
.deal-card-unified .best-seller-badge.rank {
  background: var(--accent-light);
  color: var(--accent);
}

.hot-grid .best-seller-title,
.deal-card-unified .best-seller-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hot-grid .best-seller-category,
.deal-card-unified .best-seller-category {
  font-size: 12px;
  color: var(--text-muted);
}

.hot-grid .best-seller-price-row,
.deal-card-unified .best-seller-price-row {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin-top: auto;
}

.hot-grid .best-seller-price,
.deal-card-unified .best-seller-price {
  font-size: 22px;
  font-weight: 900;
  color: var(--red);
}

.hot-grid .best-seller-was,
.deal-card-unified .best-seller-was {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.hot-grid .best-seller-btn,
.deal-card-unified .best-seller-btn {
  margin-top: 8px;
  display: block;
  text-align: center;
  text-decoration: none;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 900;
  font-size: 14px;
}

.hot-grid .best-seller-btn:hover,
.deal-card-unified .best-seller-btn:hover {
  background: var(--accent-mid);
  color: #fff;
}
/* BLD UNIFIED DEAL CARDS END */

/* BLD UNIVERSAL MOBILE DEAL CARDS START */
@media (max-width: 760px) {
  .hot-grid,
  .deals-grid,
  .best-seller-grid,
  .search-results-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .hot-card,
  .deal-card,
  .best-seller-card,
  .search-card {
    display: grid !important;
    grid-template-columns: 112px minmax(0, 1fr) !important;
    min-height: 132px !important;
    border-radius: 10px !important;
    overflow: hidden !important;
  }

  .hot-card-img,
  .card-img,
  .deal-card .card-img,
  .best-seller-img,
  .search-img {
    width: 112px !important;
    min-width: 112px !important;
    height: 100% !important;
    min-height: 132px !important;
    border-bottom: 0 !important;
  }

  .hot-card-img img,
  .card-img img,
  .deal-card .card-img img,
  .best-seller-img img,
  .search-img img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain !important;
    padding: 8px !important;
  }

  .hot-card-body,
  .hot-card .card-body,
  .card-body,
  .deal-card .card-body,
  .best-seller-body,
  .search-body {
    min-width: 0 !important;
    padding: 10px 10px 10px 12px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
  }

  .hot-card-title,
  .card-title,
  .deal-card .card-title,
  .best-seller-title,
  .search-title {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    overflow: hidden !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .hot-card-prices,
  .price-block,
  .card-footer,
  .deal-card .card-footer,
  .best-seller-price-row,
  .search-price-row {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
    border-top: 0 !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  .hot-price-now,
  .price-now,
  .best-seller-price,
  .search-price {
    font-size: 18px !important;
    line-height: 1.1 !important;
    color: var(--red, #c94040) !important;
  }

  .hot-price-was,
  .price-was,
  .best-seller-was,
  .search-was {
    font-size: 11px !important;
  }

  .hot-btn,
  .btn-deal,
  .deal-card .btn-deal,
  .best-seller-btn,
  .search-btn {
    min-height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    line-height: 1.1 !important;
    margin-top: auto !important;
    padding: 0 8px !important;
    text-align: center !important;
  }

  .hot-off,
  .discount-badge {
    font-size: 11px !important;
    padding: 3px 7px !important;
    background: #ebfff5 !important;
    border: 1px solid #cdebdc !important;
    color: var(--green, #12744a) !important;
    border-radius: 999px !important;
  }

  .category-pill,
  .stars,
  .card-category,
  .card-desc,
  .deal-card .card-category,
  .deal-card .card-desc,
  .best-seller-category,
  .best-seller-badges,
  .search-meta {
    display: none !important;
  }
}

@media (max-width: 380px) {
  .hot-card,
  .deal-card,
  .best-seller-card,
  .search-card {
    grid-template-columns: 100px minmax(0, 1fr) !important;
  }

  .hot-card-img,
  .card-img,
  .deal-card .card-img,
  .best-seller-img,
  .search-img {
    width: 100px !important;
    min-width: 100px !important;
  }
}
/* BLD UNIVERSAL MOBILE DEAL CARDS END */

   Step 1: shared CSS file only. This does not affect any page until a page links to it. */

.bld-category-wrap .dropdown-menu.bld-mega-menu,
#menu-categories.bld-mega-menu {
  width: min(680px, calc(100vw - 40px)) !important;
  min-width: min(680px, calc(100vw - 40px)) !important;
  max-width: calc(100vw - 40px) !important;
  padding: 18px !important;
  border-radius: 20px !important;
  background: var(--surface, #fff) !important;
  border: 1px solid var(--border, #e8e6e1) !important;
  box-shadow: 0 18px 55px rgba(0,0,0,0.16) !important;
  overflow: visible !important;
  z-index: 700 !important;
}

.bld-category-wrap {
  position: relative;
}

/* Bridge the small space between the Categories button and the menu so hover does not drop. */
.bld-category-wrap::after {
  content: '';
  position: absolute;
  left: -24px;
  right: -24px;
  top: 100%;
  height: 18px;
  background: transparent;
  pointer-events: auto;
}

.bld-category-wrap .dropdown-menu.bld-mega-menu {
  left: 50% !important;
  right: auto !important;
  top: calc(100% + 4px) !important;
  transform: translateX(-50%) translateY(-8px) !important;
}

.bld-category-wrap:hover .dropdown-menu.bld-mega-menu,
.bld-category-wrap:focus-within .dropdown-menu.bld-mega-menu,
.dropdown-menu.bld-mega-menu.show,
#menu-categories.bld-mega-menu.show {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateX(-50%) translateY(0) !important;
}

.bld-mega-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 4px 4px 16px;
  border-bottom: 1px solid var(--border, #e8e6e1);
  margin-bottom: 14px;
}

.bld-mega-title {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  line-height: 1.1;
  color: var(--text-primary, #1a1a18);
}

.bld-mega-subtitle {
  color: var(--text-muted, #9e9e97);
  font-size: 13px;
  margin-top: 4px;
  font-weight: 500;
}

.bld-mega-pill {
  background: var(--accent-light, #e8eef5);
  color: var(--accent, #1a3a5c);
  font-size: 12px;
  font-weight: 800;
  padding: 7px 11px;
  border-radius: 999px;
  white-space: nowrap;
}

.bld-mega-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 14px;
}

.bld-mega-column {
  background: #fbfaf7;
  border: 1px solid var(--border, #e8e6e1);
  border-radius: 16px;
  padding: 12px;
}

.bld-mega-column h3 {
  color: var(--text-primary, #1a1a18);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 8px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 900;
}

.bld-mega-link {
  display: flex !important;
  align-items: center;
  gap: 9px;
  padding: 9px 8px !important;
  border-radius: 12px !important;
  color: var(--text-secondary, #6b6b65) !important;
  text-decoration: none !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  background: transparent !important;
  transition: none;
  white-space: normal;
}

.bld-mega-link:hover {
  background: var(--accent-light, #e8eef5) !important;
  color: var(--accent, #1a3a5c) !important;
}

.bld-mega-icon {
  width: 23px;
  height: 23px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border, #e8e6e1);
  font-size: 13px;
  flex-shrink: 0;
}

.bld-mega-footer {
  margin-top: 14px;
  padding: 12px 14px !important;
  border-radius: 16px !important;
  background: var(--accent, #1a3a5c) !important;
  color: #fff !important;
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
  font-weight: 900 !important;
  font-size: 14px !important;
}

.bld-mega-footer:hover { background: var(--accent-mid, #2a5a8c) !important; }

@media (max-width: 900px) {
  .bld-category-wrap::after { display: none; }

  .bld-category-wrap .dropdown-menu.bld-mega-menu,
  #menu-categories.bld-mega-menu {
    width: min(92vw, 360px) !important;
    min-width: min(92vw, 360px) !important;
    max-height: 78vh;
    overflow-y: auto !important;
    left: auto !important;
    right: 0 !important;
    transform: translateY(-8px) !important;
  }

  .bld-category-wrap:hover .dropdown-menu.bld-mega-menu,
  .bld-category-wrap:focus-within .dropdown-menu.bld-mega-menu,
  .dropdown-menu.bld-mega-menu.show,
  #menu-categories.bld-mega-menu.show {
    transform: translateY(0) !important;
  }

  .bld-mega-grid { grid-template-columns: 1fr; }
  .bld-mega-header { flex-direction: column; gap: 8px; }
}

/* BLD MOBILE DEAL FEED UX START */
@media (max-width: 760px) {
  body {
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .bld-header-main {
    min-height: 70px !important;
    padding: 9px 14px !important;
    gap: 12px !important;
  }

  .bld-brand {
    gap: 10px !important;
  }

  .bld-brand-logo {
    width: 52px !important;
    height: 52px !important;
    border-width: 2px !important;
  }

  .bld-brand-title {
    font-size: 22px !important;
    letter-spacing: 0 !important;
  }

  .bld-brand-rule,
  .bld-brand-tagline {
    display: none !important;
  }

  .bld-header-search-row {
    padding: 8px 12px 9px !important;
  }

  .bld-header-search {
    gap: 8px !important;
  }

  .bld-header-search input,
  .bld-header-search button {
    height: 38px !important;
  }

  .bld-header-search input {
    font-size: 14px !important;
    padding: 0 14px !important;
  }

  .bld-header-search button {
    font-size: 12px !important;
    padding: 0 13px !important;
  }

  .page-shell {
    padding-top: 10px !important;
    padding-bottom: 96px !important;
  }

  .hero {
    margin-bottom: 8px !important;
  }

  .hero h1 {
    font-size: 28px !important;
    line-height: 1.08 !important;
    letter-spacing: 0 !important;
  }

  .hero p {
    display: -webkit-box !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: 14px !important;
    line-height: 1.45 !important;
  }

  .category-intro-section,
  .related-deal-pages {
    display: none !important;
  }

  .stats-bar {
    display: none !important;
  }

  .bld-mobile-deal-nav,
  .mobile-deal-nav {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    z-index: 850 !important;
    display: flex !important;
    gap: 8px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 !important;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom)) !important;
    background: rgba(255,255,255,0.98) !important;
    border-top: 1px solid var(--border, #e8e6e1) !important;
    border-bottom: 0 !important;
    box-shadow: 0 -10px 28px rgba(26,58,92,0.13) !important;
  }

  .bld-mobile-deal-nav::-webkit-scrollbar,
  .mobile-deal-nav::-webkit-scrollbar {
    display: none;
  }

  .bld-mobile-deal-nav a,
  .bld-mobile-deal-nav button,
  .mobile-deal-nav a,
  .mobile-deal-nav button {
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 14px !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
  }

  .section-head {
    gap: 8px !important;
    margin-bottom: 8px !important;
  }

  .section-head h2 {
    font-size: 21px !important;
    line-height: 1.15 !important;
    letter-spacing: 0 !important;
  }

  .deal-count {
    align-self: flex-start !important;
    font-size: 11px !important;
  }

  .hot-strip,
  .deals-grid {
    padding: 10px !important;
    border-radius: 0 !important;
    margin-left: -16px !important;
    margin-right: -16px !important;
    border-left: 0 !important;
    border-right: 0 !important;
  }

  .hot-grid,
  .deals-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .hot-card,
  .deal-card {
    display: grid !important;
    grid-template-columns: 112px minmax(0, 1fr) !important;
    min-height: 132px !important;
    border-radius: 10px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
    transform: none !important;
  }

  .hot-card:hover,
  .deal-card:hover {
    transform: none !important;
  }

  .hot-card-img,
  .card-img,
  .deal-card .card-img {
    width: 112px !important;
    min-width: 112px !important;
    height: 100% !important;
    min-height: 132px !important;
  }

  .hot-card-img img,
  .card-img img,
  .deal-card .card-img img {
    padding: 8px !important;
  }

  .rank-badge,
  .hot-card-badge {
    top: 6px !important;
    font-size: 10px !important;
    padding: 2px 7px !important;
  }

  .rank-badge { left: 6px !important; }
  .hot-card-badge { right: 6px !important; }

  .hot-card-body,
  .card-body,
  .deal-card .card-body {
    min-width: 0 !important;
    padding: 10px 10px 10px 12px !important;
    gap: 5px !important;
  }

  .category-pill,
  .stars,
  .card-category,
  .card-desc,
  .deal-card .card-category,
  .deal-card .card-desc {
    display: none !important;
  }

  .hot-card-title,
  .card-title,
  .deal-card .card-title {
    display: -webkit-box !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2 !important;
    overflow: hidden !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .hot-card-prices,
  .card-footer,
  .deal-card .card-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
    border-top: 0 !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  .hot-price-now,
  .price-now {
    font-size: 18px !important;
    line-height: 1.1 !important;
  }

  .hot-price-was,
  .price-was {
    font-size: 11px !important;
  }

  .hot-off,
  .discount-badge {
    font-size: 11px !important;
    padding: 3px 7px !important;
  }

  .hot-btn,
  .btn-deal,
  .deal-card .btn-deal {
    min-height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    line-height: 1.1 !important;
    margin-top: auto !important;
    padding: 0 8px !important;
  }

  .load-more-btn {
    width: min(100%, 340px) !important;
    min-height: 44px !important;
  }

  .popular-category-nav,
  .browse-pages-section,
  .bld-site-footer,
  footer {
    margin-bottom: 88px !important;
  }
}

@media (max-width: 380px) {
  .hot-card,
  .deal-card {
    grid-template-columns: 100px minmax(0, 1fr) !important;
  }

  .hot-card-img,
  .card-img,
  .deal-card .card-img {
    width: 100px !important;
    min-width: 100px !important;
  }

  .hot-price-now,
  .price-now {
    font-size: 16px !important;
  }
}
/* BLD MOBILE DEAL FEED UX END */

/* BLD MOBILE DEAL-FIRST REFINEMENTS START */
@media (max-width: 760px) {
  .deal-statement-bar {
    display: none !important;
  }

  main.page-shell {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
  }

  main.page-shell > .hero { order: 1 !important; }
  main.page-shell > .loading-bar,
  main.page-shell > .error-msg { order: 2 !important; }
  main.page-shell > .hot-section,
  main.page-shell > #hot-section { order: 3 !important; }
  main.page-shell > .toolbar,
  main.page-shell > #toolbar { order: 4 !important; }
  main.page-shell > .filters-wrap,
  main.page-shell > #filters-wrap { order: 5 !important; }
  main.page-shell > #deals-section { order: 6 !important; }
  main.page-shell > .browse-pages-section,
  main.page-shell > .popular-category-nav { order: 20 !important; }
  main.page-shell > .divider,
  main.page-shell > .stats-bar { display: none !important; }

  .hero {
    padding: 12px 0 10px !important;
  }

  .hero-text h1,
  .hero h1 {
    font-size: 25px !important;
    line-height: 1.05 !important;
    margin-bottom: 0 !important;
  }

  .hero-pill {
    margin-bottom: 8px !important;
    padding: 4px 11px !important;
    font-size: 11px !important;
  }

  .hero-text p,
  .hero p,
  .hero-text p:nth-of-type(2) {
    display: none !important;
  }

  .hot-header {
    margin-bottom: 8px !important;
  }

  .hot-title {
    font-size: 21px !important;
    line-height: 1.1 !important;
  }

  .hot-subtitle {
    display: none !important;
  }

  .browse-pages-section,
  .popular-category-nav {
    padding-top: 14px !important;
    margin-top: 18px !important;
    border-top: 1px solid var(--border, #e8e6e1) !important;
  }

  .browse-pages-title,
  .browse-pages-section h2,
  .popular-category-nav h2 {
    font-size: 21px !important;
    line-height: 1.1 !important;
  }

  .browse-pages-subtitle,
  .browse-pages-section > p,
  .popular-category-nav p,
  .browse-page-card p,
  .popular-category-link small {
    display: none !important;
  }

  .browse-pages-panel,
  .browse-pages-section {
    padding: 14px !important;
    box-shadow: none !important;
  }

  .browse-pages-grid,
  .browse-page-grid,
  .popular-category-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .browse-page-card,
  .popular-category-link {
    min-height: 0 !important;
    padding: 12px 14px !important;
    border-radius: 10px !important;
  }

  .browse-page-label,
  .browse-page-kicker,
  .current-page-label {
    display: none !important;
  }

  .mobile-deal-nav button[data-jump="hot"],
  .mobile-deal-nav button[data-jump="all"],
  .bld-mobile-deal-nav button[data-scroll-target="deals"],
  .bld-mobile-deal-nav button[data-filter-target="hot"] {
    font-size: 0 !important;
  }

  .mobile-deal-nav button[data-jump="hot"]::after,
  .bld-mobile-deal-nav button[data-filter-target="hot"]::after {
    content: "Hot";
    font-size: 12px;
  }

  .mobile-deal-nav button[data-jump="all"]::after,
  .bld-mobile-deal-nav button[data-scroll-target="deals"]::after {
    content: "All";
    font-size: 12px;
  }

  .mobile-deal-nav button[data-cat="All"],
  .mobile-deal-nav a[href*="top-100-amazon-deals-today"] {
    display: none !important;
  }

  .mobile-deal-nav button[data-jump="categories"],
  .bld-mobile-deal-nav button[data-scroll-target="categories"] {
    margin-left: auto !important;
  }

  .bld-header-search-row {
    position: sticky !important;
    top: 0 !important;
    z-index: 320 !important;
  }

  #back-to-top.visible {
    bottom: calc(78px + env(safe-area-inset-bottom)) !important;
  }
}
/* BLD MOBILE DEAL-FIRST REFINEMENTS END */

/* BLD MOBILE DEAL CARD WIDTH FIX START */
@media (max-width: 760px) {
  .hot-grid,
  .deals-grid,
  .best-seller-grid,
  .search-results-grid {
    width: 100% !important;
    align-items: stretch !important;
  }

  .hot-grid > .hot-card,
  .deals-grid > .deal-card,
  .best-seller-grid > .best-seller-card,
  .search-results-grid > .search-card,
  .hot-card,
  .deal-card,
  .best-seller-card,
  .search-card {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    justify-self: stretch !important;
  }

  .hot-card > .hot-card-badge {
    display: none !important;
  }

  .hot-card .hot-off,
  .deal-card .discount-badge {
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
    background: #ebfff5 !important;
    border: 1px solid #cdebdc !important;
    color: var(--green, #12744a) !important;
  }
}
/* BLD MOBILE DEAL CARD WIDTH FIX END */
