/* ========================================
   BRAND SECTION STYLES
   Hiển thị các brand chính dưới header
   ======================================== */

/* ========================================
   1. BRAND SECTION CONTAINER
   ======================================== */

.tggd-brand-section {
  background-color: var(--tggd-white);
  padding: 30px 0;
  margin: 0;
  border-bottom: 1px solid var(--tggd-border-gray);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tggd-brand-section.sticky {
  position: sticky;
  top: 0;
  z-index: 99;
}

/* ========================================
   2. BRAND SECTION TITLE
   ======================================== */

.tggd-brand-title {
  font-size: var(--tggd-font-size-2xl);
  font-weight: 700;
  color: var(--tggd-dark-gray);
  margin: 0 0 30px 0;
  padding: 0;
  text-align: center;
  letter-spacing: -0.5px;
}

/* ========================================
   3. BRAND CAROUSEL / GRID
   ======================================== */

.tggd-brand-carousel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  align-items: center;
  justify-items: center;
  width: 100%;
}

.tggd-brand-carousel.horizontal-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-behavior: smooth;
}

.tggd-brand-carousel.horizontal-scroll::-webkit-scrollbar {
  height: 6px;
}

.tggd-brand-carousel.horizontal-scroll::-webkit-scrollbar-track {
  background-color: var(--tggd-border-gray);
  border-radius: 10px;
}

.tggd-brand-carousel.horizontal-scroll::-webkit-scrollbar-thumb {
  background-color: var(--tggd-primary);
  border-radius: 10px;
}

.tggd-brand-carousel.horizontal-scroll::-webkit-scrollbar-thumb:hover {
  background-color: var(--tggd-primary-dark);
}

/* ========================================
   4. BRAND ITEM
   ======================================== */

.tggd-brand-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px;
  border-radius: var(--tggd-radius-lg);
  transition: all var(--tggd-transition-normal);
  text-decoration: none;
  min-width: 150px;
  cursor: pointer;
  position: relative;
}

.tggd-brand-item:hover {
  background-color: var(--tggd-light-gray);
  transform: translateY(-5px);
  box-shadow: var(--tggd-shadow-md);
}

.tggd-brand-item:active {
  transform: translateY(-2px);
}

.tggd-brand-item.active {
  background-color: var(--tggd-primary);
  box-shadow: var(--tggd-shadow-lg);
}

.tggd-brand-item.active .tggd-brand-name {
  color: var(--tggd-white);
}

/* ========================================
   5. BRAND LOGO
   ======================================== */

.tggd-brand-logo {
  max-width: 100%;
  height: auto;
  max-height: 100px;
  object-fit: contain;
  margin-bottom: 10px;
  transition: transform var(--tggd-transition-fast);
  filter: brightness(1);
}

.tggd-brand-item:hover .tggd-brand-logo {
  transform: scale(1.1);
  filter: brightness(1.1);
}

.tggd-brand-item.active .tggd-brand-logo {
  filter: brightness(0) invert(1);
}

/* ========================================
   6. BRAND NAME
   ======================================== */

.tggd-brand-name {
  font-size: var(--tggd-font-size-sm);
  font-weight: 600;
  color: var(--tggd-dark-gray);
  text-align: center;
  margin: 0;
  padding: 0;
  transition: color var(--tggd-transition-fast);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.tggd-brand-item:hover .tggd-brand-name {
  color: var(--tggd-primary);
}

/* ========================================
   7. BRAND DESCRIPTION (Optional)
   ======================================== */

.tggd-brand-description {
  font-size: var(--tggd-font-size-xs);
  color: var(--tggd-medium-gray);
  text-align: center;
  margin-top: 5px;
  display: none;
}

.tggd-brand-item:hover .tggd-brand-description {
  display: block;
}

/* ========================================
   8. BRAND BADGE (Optional)
   ======================================== */

.tggd-brand-badge {
  position: absolute;
  top: 0;
  right: 0;
  background-color: var(--tggd-primary);
  color: var(--tggd-white);
  padding: 4px 8px;
  border-radius: var(--tggd-radius-sm);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

/* ========================================
   9. BRAND CAROUSEL NAVIGATION (Optional)
   ======================================== */

.tggd-brand-carousel-nav {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.tggd-brand-carousel-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--tggd-border-gray);
  background-color: var(--tggd-white);
  border-radius: var(--tggd-radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--tggd-transition-fast);
  font-size: 18px;
  color: var(--tggd-dark-gray);
}

.tggd-brand-carousel-btn:hover {
  border-color: var(--tggd-primary);
  color: var(--tggd-primary);
  background-color: var(--tggd-light-gray);
}

.tggd-brand-carousel-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ========================================
   10. RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1024px) {
  .tggd-brand-carousel {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 18px;
  }
  
  .tggd-brand-item {
    min-width: 140px;
    padding: 12px;
  }
  
  .tggd-brand-logo {
    max-height: 90px;
  }
}

@media (max-width: 768px) {
  .tggd-brand-section {
    padding: 20px 0;
  }
  
  .tggd-brand-title {
    font-size: var(--tggd-font-size-xl);
    margin-bottom: 20px;
  }
  
  .tggd-brand-carousel {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
  }
  
  .tggd-brand-item {
    min-width: 120px;
    padding: 10px;
  }
  
  .tggd-brand-logo {
    max-height: 80px;
    margin-bottom: 8px;
  }
  
  .tggd-brand-name {
    font-size: var(--tggd-font-size-xs);
  }
}

@media (max-width: 480px) {
  .tggd-brand-section {
    padding: 15px 0;
    border-bottom: none;
    margin-bottom: 10px;
  }
  
  .tggd-brand-title {
    font-size: var(--tggd-font-size-lg);
    margin-bottom: 15px;
  }
  
  .tggd-brand-carousel {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
  }
  
  .tggd-brand-carousel.horizontal-scroll {
    gap: 10px;
  }
  
  .tggd-brand-item {
    min-width: 100px;
    padding: 8px;
  }
  
  .tggd-brand-logo {
    max-height: 60px;
    margin-bottom: 5px;
  }
  
  .tggd-brand-name {
    font-size: 10px;
  }
  
  .tggd-brand-carousel-nav {
    margin-top: 15px;
    gap: 8px;
  }
  
  .tggd-brand-carousel-btn {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
}

/* ========================================
   11. DARK MODE (Optional)
   ======================================== */

.dark .tggd-brand-section {
  background-color: var(--tggd-dark-bg);
  border-bottom-color: var(--tggd-dark-border);
}

.dark .tggd-brand-title {
  color: var(--tggd-light-text);
}

.dark .tggd-brand-item:hover {
  background-color: var(--tggd-dark-hover);
}

.dark .tggd-brand-name {
  color: var(--tggd-light-text);
}

.dark .tggd-brand-carousel-btn {
  background-color: var(--tggd-dark-input);
  border-color: var(--tggd-dark-border);
  color: var(--tggd-light-text);
}

.dark .tggd-brand-carousel-btn:hover {
  background-color: var(--tggd-dark-hover);
  border-color: var(--tggd-primary);
}

/* ========================================
   12. ANIMATIONS
   ======================================== */

@keyframes brandSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tggd-brand-item {
  animation: brandSlideIn 0.5s ease-out;
}

.tggd-brand-item:nth-child(1) { animation-delay: 0.1s; }
.tggd-brand-item:nth-child(2) { animation-delay: 0.2s; }
.tggd-brand-item:nth-child(3) { animation-delay: 0.3s; }
.tggd-brand-item:nth-child(4) { animation-delay: 0.4s; }
.tggd-brand-item:nth-child(5) { animation-delay: 0.5s; }
.tggd-brand-item:nth-child(6) { animation-delay: 0.6s; }
.tggd-brand-item:nth-child(7) { animation-delay: 0.7s; }
.tggd-brand-item:nth-child(8) { animation-delay: 0.8s; }

/* ========================================
   13. UTILITY CLASSES
   ======================================== */

.tggd-brand-section.no-border {
  border-bottom: none;
}

.tggd-brand-section.sticky-top {
  position: sticky;
  top: 0;
  z-index: 100;
}

.tggd-brand-carousel.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

.tggd-brand-carousel.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
