/* ========================================
   PRODUCT TABS IMPROVEMENTS
   ======================================== */

/* ===== ENHANCED TAB STYLING ===== */

.products-tabs {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
  padding: 0 20px;
}

.tab-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  min-width: 140px;
  justify-content: center;
}

.tab-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
  transition: left 0.5s ease;
}

.tab-button:hover::before {
  left: 100%;
}

.tab-button:hover {
  border-color: #3b82f6;
  color: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.15);
}

.tab-button.active {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border-color: #3b82f6;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25);
}

.tab-button.active::before {
  display: none;
}

.tab-icon {
  font-size: 20px;
  transition: transform 0.3s ease;
}

.tab-button:hover .tab-icon,
.tab-button.active .tab-icon {
  transform: scale(1.1);
}

.tab-text {
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ===== TAB CONTENT ANIMATIONS ===== */

.products-category {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
}

.products-category.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* ===== PRODUCT CARD CATEGORY STYLING ===== */

/* All product cards now use the same blue accent color */
.product-card {
  border-left: 4px solid #3b82f6; /* Blue accent for all categories */
  transition: all 0.3s ease;
}

.product-card:hover {
  border-left-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

/* Remove individual category colors - all cards now use the same blue */

/* ===== RESPONSIVE TAB IMPROVEMENTS ===== */

@media (max-width: 1024px) {
  .products-tabs {
    gap: 12px;
    margin-bottom: 32px;
  }
  
  .tab-button {
    padding: 10px 16px;
    font-size: 14px;
    min-width: 120px;
  }
  
  .tab-icon {
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  .products-tabs {
    gap: 8px;
    margin-bottom: 24px;
    padding: 0 16px;
    justify-content: center;
  }
  
  .tab-button {
    padding: 8px 12px;
    font-size: 13px;
    min-width: 100px;
    border-radius: 8px;
  }
  
  .tab-icon {
    font-size: 16px;
  }
  
  .tab-text {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .products-tabs {
    gap: 6px;
    margin-bottom: 20px;
    padding: 0 12px;
  }
  
  .tab-button {
    padding: 6px 10px;
    font-size: 12px;
    min-width: 80px;
    border-radius: 6px;
  }
  
  .tab-icon {
    font-size: 14px;
  }
  
  .tab-text {
    font-size: 11px;
  }
}

/* ===== TAB INDICATOR ANIMATION ===== */

.tab-button.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 3px;
  background: linear-gradient(90deg, #60a5fa, #3b82f6, #2563eb);
  border-radius: 2px;
  animation: tabIndicator 0.3s ease;
}

@keyframes tabIndicator {
  from {
    width: 0;
    opacity: 0;
  }
  to {
    width: 80%;
    opacity: 1;
  }
}

/* ===== TAB HOVER EFFECTS ===== */

.tab-button:not(.active):hover {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

/* ===== TAB FOCUS STATES ===== */

.tab-button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 12px;
}

/* ===== TAB LOADING STATE ===== */

.tab-button.loading {
  pointer-events: none;
  opacity: 0.7;
}

.tab-button.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: tabLoading 1s linear infinite;
}

@keyframes tabLoading {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* ===== TAB ACCESSIBILITY ===== */

.tab-button[aria-selected="true"] {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border-color: #3b82f6;
  color: #ffffff;
}

.tab-button[aria-selected="true"]::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 3px;
  background: linear-gradient(90deg, #60a5fa, #3b82f6, #2563eb);
  border-radius: 2px;
}

/* ===== TAB KEYBOARD NAVIGATION ===== */

.tab-button:focus {
  z-index: 10;
}

/* ===== TAB ANIMATION PERFORMANCE ===== */

@media (prefers-reduced-motion: reduce) {
  .tab-button,
  .products-category {
    transition: none;
  }
  
  .tab-button::before {
    display: none;
  }
  
  .tab-button.active::after {
    animation: none;
  }
  
  .tab-button.loading::after {
    animation: none;
  }
}

/* ===== TAB TOUCH OPTIMIZATIONS ===== */

@media (hover: none) and (pointer: coarse) {
  .tab-button:hover {
    transform: none;
    box-shadow: none;
  }
  
  .tab-button:active {
    transform: scale(0.98);
  }
  
  .tab-button.active:active {
    transform: scale(0.98) translateY(-2px);
  }
}

/* ===== TAB PRINT STYLES ===== */

@media print {
  .products-tabs {
    display: none;
  }
  
  .products-category {
    display: block !important;
    opacity: 1 !important;
    transform: none !important;
    page-break-inside: avoid;
  }
}
