/* ============================================
   BRANDS ENTERPRISE STYLES
   Complete enterprise-grade design system
   Version: 3.0
   Updated: December 22, 2025
   ============================================ */

/* =======================================
   1. PAGE HEADER (Dark Gradient Theme)
   ======================================= */
.page-header {
  padding: 1.5rem;
  margin: 0;
  position: relative;
  overflow: visible;
  border-bottom: 0;
}

.container-fluid {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  border-radius: 0.75rem;
  max-width: 1200px;
  padding: 3rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  margin: auto;
}

@media (min-width: 768px) {
  .page-header {
    border-radius: 1.25rem;
  }
}

/* Subtle radial gradient overlays for depth */
.page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}

.page-header h1 {
  font-size: 1.25rem;
  font-weight: 800;
  color: white;
  margin: 0 0 2px 0;
  letter-spacing: -0.02em;
}

@media (min-width: 768px) {
  .page-header h1 {
    font-size: 2rem;
    margin-bottom: 4px;
  }
}

.header-stats-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: end;
}

/* Badge with pulse animation */
.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(163, 255, 212, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid #0ea875;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #a3ffd4;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .header-badge {
    padding: 6px 14px;
    font-size: 0.6875rem;
  }
}

.header-badge .pulse {
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@media (min-width: 768px) {
  .header-badge .pulse {
    width: 8px;
    height: 8px;
  }
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
  }
}

/* Header Icon */
.header-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #0ea875 0%, #10b981 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(14, 168, 117, 0.25);
  flex-shrink: 0;
}

.header-icon i {
  font-size: 1.25rem;
  color: white;
}

@media (min-width: 768px) {
  .header-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.25);
  }
  .header-icon i {
    font-size: 1.75rem;
  }
}

.header-subtitle {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 768px) {
  .header-subtitle {
    font-size: 0.875rem;
    -webkit-line-clamp: none;
  }
}

/* Quick Stats - Hidden on mobile */
.header-quick-stats {
  display: none;
}

@media (min-width: 992px) {
  .header-quick-stats {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 10px 16px;
    align-items: center;
    gap: 12px;
  }
}

.quick-stat {
  text-align: center;
  min-width: 50px;
}

.quick-stat-value {
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  color: white;
}

.quick-stat-label {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.6);
}

.quick-stat-divider {
  width: 1px;
  height: 32px;
  background: rgba(255, 255, 255, 0.15);
}

/* Header Actions */
.header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  margin-top: 1rem;
}

@media (min-width: 992px) {
  .header-actions {
    margin-top: 0;
    gap: 10px;
  }
}

.btn-header-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.9);
  transition: 200ms ease;
  cursor: pointer;
  font-size: 1rem;
}

@media (min-width: 768px) {
  .btn-header-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 1.125rem;
  }
}

.btn-header-icon:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  color: white;
  transform: translateY(-2px);
}

.btn-header-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #0ea875 0%, #10b981 100%);
  border: none;
  border-radius: 10px;
  color: white;
  font-weight: 600;
  font-size: 0.8125rem;
  transition: 200ms ease;
  box-shadow: 0 4px 16px rgba(14, 168, 117, 0.3);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}

@media (min-width: 768px) {
  .btn-header-primary {
    padding: 12px 20px;
    font-size: 0.9375rem;
    border-radius: 12px;
  }
}

.btn-header-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
  color: white;
}

/* =======================================
   2. STATS GRID (KPI Cards)
   ======================================= */
.stats-section {
  padding: 1.5rem 0;
  background: #f9fafb;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
}

@media (min-width: 992px) {
  .stats-grid {
    gap: 2rem;
  }
}

/* Individual stats card */
.stats-card {
  background: white;
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-left: 3px solid;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  min-height: 56px;
}

@media (min-width: 576px) {
  .stats-card {
    padding: 1.25rem 1.5rem;
    min-height: 64px;
  }
}

.stats-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(0, 0, 0, 0.02) 100%
  );
  opacity: 0;
  transition: opacity 250ms;
}

.stats-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.stats-card:hover::before {
  opacity: 1;
}

.stats-card:active {
  transform: scale(0.98);
}

.stats-card.active {
  border-left-width: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stats-card.active::after {
  content: "";
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 8px;
  height: 8px;
  background: currentColor;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

/* Icon container */
.stats-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  flex-shrink: 0;
  background: rgba(107, 114, 128, 0.1);
  color: #4b5563;
  transition: all 250ms;
}

@media (min-width: 576px) {
  .stats-icon {
    width: 44px;
    height: 44px;
    font-size: 1.375rem;
  }
}

.stats-card:hover .stats-icon {
  transform: scale(1.1) rotate(5deg);
}

/* Number and label */
.stats-content {
  flex: 1;
  min-width: 0;
}

.stats-number {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  color: #111827;
  font-family: "IBM Plex Mono", "Courier New", monospace;
}

@media (min-width: 576px) {
  .stats-number {
    font-size: 1.375rem;
  }
}

.stats-label {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 500;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

@media (min-width: 576px) {
  .stats-label {
    font-size: 0.85rem;
  }
}

/* Color variants */
.stats-card-primary {
  border-left-color: #3b82f6;
}

.stats-card-primary .stats-icon {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.stats-card-success {
  border-left-color: #22c55e;
}

.stats-card-success .stats-icon {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.stats-card-warning {
  border-left-color: #f59e0b;
}

.stats-card-warning .stats-icon {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.stats-card-info {
  border-left-color: #8b5cf6;
}

.stats-card-info .stats-icon {
  background: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
}

/* =======================================
   3. ENHANCED BRAND CARDS
   ======================================= */
.brand-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.brand-card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
}

.brand-logo-container {
  position: relative;
  width: 100%;
  padding-top: 66.67%; /* 3:2 aspect ratio */
  background: #f9fafb;
  overflow: hidden;
}

.brand-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}

/* Status badges on logo */
.brand-status-badges {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  align-items: flex-end;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.status-badge-claimed {
  background: rgba(34, 197, 94, 0.95);
  color: white;
}

.status-badge-3d {
  background: rgba(59, 130, 246, 0.95);
  color: white;
}

/* Brand info section */
.brand-info {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.brand-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.products-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background: #f3f4f6;
  color: #6b7280;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Category badges */
.brand-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.category-badge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  color: #166534;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.category-badge-overflow {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  color: #4b5563;
  border-color: #d1d5db;
}

.brand-description {
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.5;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Action buttons */
.brand-info .btn-group {
  margin-top: auto;
}

.brand-info .btn {
  font-size: 0.75rem;
  padding: 0.5rem 0.875rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all 200ms;
}

.brand-info .btn-outline-primary {
  border-color: #10b981;
  color: #10b981;
}

.brand-info .btn-outline-primary:hover {
  background: #10b981;
  color: white;
  transform: translateY(-1px);
}

.brand-header-title {
  flex-direction: column;
}

/* =======================================
   4. MOBILE RESPONSIVE (320px+)
   ======================================= */
/* Mobile responsive styles already handled in main header section above */

@media (max-width: 575.98px) {
  .header-icon {
    width: 40px;
    height: 40px;
  }

  .header-icon i {
    font-size: 1.125rem;
  }

  .btn-header-primary i {
    display: none; /* Hide icon on very small screens */
  }
}

/* Stats cards mobile responsive */
@media (max-width: 767.98px) {
  .stats-grid {
    gap: 0.75rem;
    padding: 0;
  }

  .stats-card {
    padding: 0.75rem 1rem;
  }

  .stats-icon {
    width: 36px;
    height: 36px;
    font-size: 1.125rem;
  }

  .stats-number {
    font-size: 1.125rem;
  }

  .stats-label {
    font-size: 0.6875rem;
  }

  .brand-card {
    border-radius: 12px;
  }

  .brand-info {
    padding: 1rem;
  }

  .brand-title {
    font-size: 1rem;
  }

  .container-fluid {
    margin: 0;
    padding: 1.5rem;
  }

  .page-header {
    margin: 0;
    padding: 0.75rem;
  }
  .header-stats-actions {
    gap: 0.75rem;
    align-items: start;
  }

  .align-items-start {
    gap: 0.75rem;
  }

  .align-items-start .col-lg-7 .d-flex {
    flex-direction: column;
  }
}

@media (max-width: 575.98px) {
  .header-icon {
    width: 40px;
    height: 40px;
  }

  .header-icon i {
    font-size: 1.125rem;
  }

  .btn-header-primary i {
    display: none; /* Hide icon on very small screens */
  }
}
