/* =============================================
   CATEGORY PAGE - PREMIUM GLASS DESIGN
   Compressed layout, glassmorphism, animations
   ============================================= */

/* === PAGE LAYOUT === */
.category-page {
  padding: 0 0 60px;
  min-height: 100vh;
}

.category-page .container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 12px;
}

/* === BREADCRUMBS - Minimal === */
.category-page .breadcrumbs {
  padding: 12px 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.category-page .breadcrumbs a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 0.2s;
}

.category-page .breadcrumbs a:hover {
  color: var(--accent-gold, #D4AF37);
}

.category-page .breadcrumbs .separator {
  opacity: 0.3;
  font-size: 10px;
}

.category-page .breadcrumbs .current {
  color: var(--accent-gold, #D4AF37);
  font-weight: 500;
}

/* === PAGE HEADER - Glass Style === */
.category-page .page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.08) 0%, 
    rgba(255, 255, 255, 0.02) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

/* Subtle shimmer effect */
.category-page .page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.03), 
    transparent);
  animation: headerShimmer 8s infinite;
}

@keyframes headerShimmer {
  0%, 100% { left: -100%; }
  50% { left: 100%; }
}

.category-page .page-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-main, #fff);
  margin: 0 0 2px;
  letter-spacing: 0.5px;
}

.category-page .page-header p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

/* === GRID CONTROLS - Pill Style === */
.category-page .grid-controls {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.category-page .grid-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-page .grid-btn:hover {
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.05);
}

.category-page .grid-btn.active {
  background: var(--accent-gold, #D4AF37);
  color: #000;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.category-page .grid-btn svg {
  width: 16px;
  height: 16px;
  pointer-events: none;
}

/* === MINI GRID HELPER === */
.category-page .mini-grid-helper {
  display: none;
  text-align: center;
  padding: 8px 14px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 11px;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 20px;
  margin-bottom: 12px;
  animation: fadeInSlide 0.3s ease;
}

.category-page .mini-grid-helper.visible {
  display: block;
}

@keyframes fadeInSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === BRANDS GRID === */
.brands-grid {
  display: grid;
  gap: 10px;
  animation: gridFadeIn 0.4s ease;
}

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

/* Column variations */
.brands-grid.brands-cols-2 { grid-template-columns: repeat(2, 1fr); }
.brands-grid.brands-cols-3 { grid-template-columns: repeat(3, 1fr); }
.brands-grid.brands-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (min-width: 768px) {
  .brands-grid.brands-cols-2 { grid-template-columns: repeat(3, 1fr); }
  .brands-grid.brands-cols-3 { grid-template-columns: repeat(4, 1fr); }
  .brands-grid.brands-cols-4 { grid-template-columns: repeat(5, 1fr); }
}

@media (min-width: 1024px) {
  .brands-grid.brands-cols-2 { grid-template-columns: repeat(4, 1fr); }
  .brands-grid.brands-cols-3 { grid-template-columns: repeat(5, 1fr); }
  .brands-grid.brands-cols-4 { grid-template-columns: repeat(6, 1fr); }
}

/* === BRAND CARD - Glass Morphism === */
.brand-card-minimal {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 12px 16px;
  background: linear-gradient(165deg, 
    rgba(255, 255, 255, 0.06) 0%, 
    rgba(255, 255, 255, 0.02) 50%,
    rgba(0, 0, 0, 0.1) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  text-decoration: none;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

/* Hover glow effect */
.brand-card-minimal::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 0%, 
    rgba(212, 175, 55, 0.15) 0%, 
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
}

.brand-card-minimal:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.25);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(212, 175, 55, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.brand-card-minimal:hover::before {
  opacity: 1;
}

/* Active/pressed state */
.brand-card-minimal:active {
  transform: translateY(-2px) scale(0.98);
}

/* === BRAND LOGO === */
.brand-logo-container {
  position: relative;
  width: 72px;
  height: 72px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: linear-gradient(145deg, 
    rgba(255, 255, 255, 0.1) 0%, 
    rgba(255, 255, 255, 0.03) 100%);
  padding: 3px;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand-card-minimal:hover .brand-logo-container {
  transform: scale(1.05);
}

.brand-logo-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
}

.brand-initials-fallback {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, 
    rgba(212, 175, 55, 0.2) 0%, 
    rgba(212, 175, 55, 0.05) 100%);
  border-radius: 50%;
  color: var(--accent-gold, #D4AF37);
  font-size: 1.4rem;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
  letter-spacing: 1px;
}

/* === BRAND INFO === */
.brand-card-info {
  text-align: center;
  position: relative;
  z-index: 1;
}

.brand-card-info h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main, #fff);
  margin: 0 0 4px;
  line-height: 1.3;
  transition: color 0.25s ease;
}

.brand-card-minimal:hover .brand-card-info h3 {
  color: var(--accent-gold, #D4AF37);
}

.brand-card-info p {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
  transition: color 0.25s ease;
}

.brand-card-minimal:hover .brand-card-info p {
  color: rgba(255, 255, 255, 0.6);
}

/* === SKELETON LOADING === */
.brand-card-minimal .skeleton {
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0.03) 0%, 
    rgba(255, 255, 255, 0.08) 50%, 
    rgba(255, 255, 255, 0.03) 100%);
  background-size: 200% 100%;
  animation: skeletonPulse 1.5s infinite;
  border-radius: 8px;
}

@keyframes skeletonPulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* === MINI GRID MODE (Mobile) === */
@media (max-width: 767px) {
  .brands-grid.mini-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px;
  }
  
  @media (min-width: 400px) {
    .brands-grid.mini-grid {
      grid-template-columns: repeat(5, 1fr) !important;
    }
  }
  
  .brands-grid.mini-grid .brand-card-minimal {
    padding: 10px 6px 8px;
    border-radius: 12px;
  }
  
  .brands-grid.mini-grid .brand-logo-container {
    width: 48px;
    height: 48px;
    margin-bottom: 6px;
  }
  
  .brands-grid.mini-grid .brand-initials-fallback {
    font-size: 1rem;
  }
  
  .brands-grid.mini-grid .brand-card-info {
    display: none;
  }
}

/* === QUICK VIEW MODAL - Premium Glass === */
.quick-view-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.quick-view-modal.open {
  opacity: 1;
  visibility: visible;
}

.quick-view-modal.open .quick-view-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.quick-view-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.quick-view-close:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: rotate(90deg);
}

.quick-view-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 320px;
  width: 100%;
  padding: 32px 24px;
  background: linear-gradient(165deg, 
    rgba(255, 255, 255, 0.1) 0%, 
    rgba(255, 255, 255, 0.03) 100%);
  backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  transform: scale(0.9) translateY(20px);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.quick-view-image {
  position: relative;
  width: 120px;
  height: 120px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: linear-gradient(145deg, 
    rgba(212, 175, 55, 0.15) 0%, 
    rgba(212, 175, 55, 0.05) 100%);
  padding: 4px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(212, 175, 55, 0.2);
}

.quick-view-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.quick-view-initials {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, 
    rgba(212, 175, 55, 0.2) 0%, 
    rgba(212, 175, 55, 0.05) 100%);
  border-radius: 50%;
  color: var(--accent-gold, #D4AF37);
  font-size: 2.5rem;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
}

.quick-view-name {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 4px;
  font-family: 'Playfair Display', serif;
}

.quick-view-count {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  margin-bottom: 24px;
}

.quick-view-actions {
  display: flex;
  gap: 12px;
  width: 100%;
}

.quick-view-btn {
  flex: 1;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
}

.quick-view-btn.primary {
  background: linear-gradient(135deg, 
    var(--accent-gold, #D4AF37) 0%, 
    #B8962E 100%);
  color: #000;
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.3);
}

.quick-view-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(212, 175, 55, 0.4);
}

.quick-view-btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.quick-view-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* === MOBILE MINI TOGGLE === */
@media (max-width: 767px) {
  .category-page .grid-controls {
    display: none !important;
  }
  
  .mini-grid-toggle {
    display: flex !important;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
  }
  
  .mini-grid-toggle.active {
    background: var(--accent-gold, #D4AF37);
    color: #000;
    border-color: var(--accent-gold, #D4AF37);
  }
  
  .mini-grid-toggle svg {
    width: 16px;
    height: 16px;
  }
  
  .mini-grid-toggle .mini-icon { display: block; }
  .mini-grid-toggle .normal-icon { display: none; }
  .mini-grid-toggle.active .mini-icon { display: none; }
  .mini-grid-toggle.active .normal-icon { display: block; }
}

@media (min-width: 768px) {
  .mini-grid-toggle {
    display: none !important;
  }
  
  .mini-grid-helper {
    display: none !important;
  }
}

/* === RESPONSIVE ADJUSTMENTS === */
@media (max-width: 767px) {
  .category-page .page-header {
    padding: 14px 16px;
    border-radius: 14px;
  }
  
  .category-page .page-header h1 {
    font-size: 1.25rem;
  }
  
  .brand-card-minimal {
    padding: 16px 10px 14px;
    border-radius: 14px;
  }
  
  .brand-logo-container {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
  }
  
  .brand-card-info h3 {
    font-size: 12px;
  }
  
  .brand-card-info p {
    font-size: 10px;
  }
}

/* === STAGGER ANIMATION FOR CARDS === */
.brands-grid .brand-card-minimal {
  animation: cardFadeIn 0.4s ease backwards;
}

.brands-grid .brand-card-minimal:nth-child(1) { animation-delay: 0.05s; }
.brands-grid .brand-card-minimal:nth-child(2) { animation-delay: 0.1s; }
.brands-grid .brand-card-minimal:nth-child(3) { animation-delay: 0.15s; }
.brands-grid .brand-card-minimal:nth-child(4) { animation-delay: 0.2s; }
.brands-grid .brand-card-minimal:nth-child(5) { animation-delay: 0.25s; }
.brands-grid .brand-card-minimal:nth-child(6) { animation-delay: 0.3s; }
.brands-grid .brand-card-minimal:nth-child(7) { animation-delay: 0.35s; }
.brands-grid .brand-card-minimal:nth-child(8) { animation-delay: 0.4s; }
.brands-grid .brand-card-minimal:nth-child(9) { animation-delay: 0.45s; }
.brands-grid .brand-card-minimal:nth-child(10) { animation-delay: 0.5s; }
.brands-grid .brand-card-minimal:nth-child(n+11) { animation-delay: 0.55s; }

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

/* === SCROLLBAR STYLING === */
.category-page::-webkit-scrollbar {
  width: 6px;
}

.category-page::-webkit-scrollbar-track {
  background: transparent;
}

.category-page::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.category-page::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}
