.alphabet-container {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  padding: 20px 0 20px;
  overflow: hidden;
}

@media (min-width: 769px) {
  .alphabet-container {
    top: 0;
    padding: 0px 0 50px;
  }
}

.brand-letter-section {
  scroll-margin-top: 70px;
}

.alphabet-container .alphabet-list {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0 10px;
  overflow-x: auto;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.alphabet-container .alphabet-list::-webkit-scrollbar {
  display: none;
}

.alphabet-container .alphabet-list.dragging {
  cursor: grabbing;
  user-select: none;
}

.alphabet-container .letter {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 4px 5px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #333;
  flex-shrink: 0;
  position: relative;
}

.alphabet-container .letter::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background-color: #000;
  transition: width 0.2s ease;
}

.alphabet-container .letter:hover {
  color: #000;
}

.alphabet-container .letter:hover::after {
  width: 100%;
}

.alphabet-container .letter.active {
  font-weight: 700;
  color: #000;
  border-bottom: 2px solid #000;
  padding: 2px 6px;
  margin: 0 2px;
}

.alphabet-container .letter.active::after {
  display: none;
}

.alphabet-container .letter.InActive {
  color: #ccc;
  cursor: default;
}

.alphabet-container .letter.all-letter,
.alphabet-container .letter.numeric-letter {
  font-weight: 400;
}

/* Brand letter section */
.brand-letter-section {
  margin-bottom: 40px;
}

.brand-letter-heading {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.brand-letter-heading .letter-text {
  font-size: 32px;
  font-weight: 300;
  color: #333;
  line-height: 1;
}

.brand-letter-heading .letter-line {
  flex: 1;
  height: 1px;
  background-color: #ddd;
}

/* Brand grid */
.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 30px 20px;
}

.brand-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand-card a {
  display: block;
  width: 100%;
  text-decoration: none;
  color: inherit;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  overflow: hidden;
}

.brand-card a:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-3px);
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 140px;
  padding: 20px;
  background: #fff;
}

.brand-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.brand-name {
  padding: 12px 5px 0;
  text-align: center;
  font-size: 14px;
  color: #333;
  background: transparent;
  font-weight: 400;
}

@media (max-width: 768px) {
  .brand-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 12px;
  }
  .brand-logo {
    height: 100px;
    padding: 15px;
  }
  .brand-name {
    padding: 8px 5px 0;
    font-size: 12px;
  }
  .brand-letter-heading .letter-text {
    font-size: 24px;
  }
  .html-brand-category-page .master-column-wrapper {
    padding: 0 15px !important;
  }
}

.brand-top {
  max-width: var(--wp--style--global--content-size);
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: left !important;
}

.brand-top .breadcrumb {
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
}

.brand-top .breadcrumb a {
  text-decoration: none !important;
}
