/* TransDrive - Transmission Components E-commerce Website Styles */

/* Base Styles */
:root {
  --primary: #2b4c7e;
  --primary-light: #3a6fa0;
  --primary-dark: #1e3a5f;
  --accent: #ed8936;
  --accent-light: #f6ad55;
  --accent-dark: #dd6b20;
  --gray-50: #f7fafc;
  --gray-100: #edf2f7;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e0;
  --gray-400: #a0aec0;
  --gray-500: #718096;
  --gray-600: #4a5568;
  --gray-700: #2d3748;
  --gray-800: #1a202c;
  --gray-900: #171923;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--gray-700);
  line-height: 1.6;
}

/* Hero Background */
.hero-bg {
  background: linear-gradient(135deg, #2b4c7e 0%, #3a6fa0 50%, #2b4c7e 100%);
  position: relative;
  overflow: hidden;
}

.hero-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(237, 137, 54, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(237, 137, 54, 0.15) 0%, transparent 50%),
    linear-gradient(90deg, transparent 49.5%, rgba(255,255,255,0.05) 49.5%, rgba(255,255,255,0.05) 50.5%, transparent 50.5%),
    linear-gradient(0deg, transparent 49.5%, rgba(255,255,255,0.03) 49.5%, rgba(255,255,255,0.03) 50.5%, transparent 50.5%);
  background-size: 100% 100%, 100% 100%, 60px 60px, 60px 60px;
  pointer-events: none;
}

/* Industrial Pattern */
.industrial-pattern {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(237, 137, 54, 0.3); }
  50% { box-shadow: 0 0 40px rgba(237, 137, 54, 0.6); }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

.animate-slide-in {
  animation: slideIn 0.5s ease-out forwards;
}

.animate-scale-in {
  animation: scaleIn 0.5s ease-out forwards;
}

/* Staggered Animation Delays */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }

/* Product Card */
.product-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  transform: translateY(0);
}

.product-card.animate-in {
  opacity: 0;
  transform: translateY(20px);
}

.product-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px -12px rgba(26, 54, 93, 0.25);
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

.product-card .product-image {
  transition: transform 0.5s ease;
}

/* Category Card */
.category-card {
  transition: all 0.3s ease;
}

.category-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 20px 40px -10px rgba(237, 137, 54, 0.3);
}

.category-card:hover .category-icon {
  transform: scale(1.1);
}

.category-icon {
  transition: transform 0.3s ease;
}

/* Solution Card */
.solution-card {
  transition: all 0.3s ease;
}

.solution-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px -5px rgba(26, 54, 93, 0.15);
}

.solution-card:hover .solution-icon {
  background-color: var(--accent);
  color: white;
}

.solution-icon {
  transition: all 0.3s ease;
}

/* Certification Badge */
.cert-badge {
  transition: all 0.3s ease;
}

.cert-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 25px -5px rgba(237, 137, 54, 0.4);
}

/* Filter Button */
.filter-btn {
  transition: all 0.2s ease;
  cursor: pointer;
}

.filter-btn:hover {
  background-color: var(--gray-100);
}

.filter-btn.active {
  background-color: var(--primary);
  color: white;
}

/* Form Input */
.form-input {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(237, 137, 54, 0.2);
  outline: none;
}

/* Mobile Menu */
.mobile-menu {
  transition: transform 0.3s ease-in-out;
}

.mobile-menu.hidden {
  transform: translateX(-100%);
}

/* Navbar */
.navbar-fixed {
  transition: all 0.3s ease;
}

/* Default: transparent navbar with white text (for hero pages) */
.navbar-fixed:not(.scrolled) .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
}
.navbar-fixed:not(.scrolled) .nav-link:hover {
  color: #ed8936 !important;
}
.navbar-fixed:not(.scrolled) .nav-icon {
  color: rgba(255, 255, 255, 0.9) !important;
}
.navbar-fixed:not(.scrolled) .nav-icon:hover {
  color: #ed8936 !important;
}
.navbar-fixed:not(.scrolled) .nav-brand {
  color: #ffffff !important;
}
.navbar-fixed:not(.scrolled) .nav-lang {
  color: rgba(255, 255, 255, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}
.navbar-fixed:not(.scrolled) .nav-lang option {
  color: #2d3748;
  background: white;
}

/* Scrolled: white background with dark text */
.navbar-fixed.scrolled {
  background-color: #ffffff !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.navbar-fixed.scrolled .nav-link {
  color: #4a5568 !important;
}
.navbar-fixed.scrolled .nav-link:hover {
  color: #2b4c7e !important;
}
.navbar-fixed.scrolled .nav-icon {
  color: #718096 !important;
}
.navbar-fixed.scrolled .nav-icon:hover {
  color: #2b4c7e !important;
}
.navbar-fixed.scrolled .nav-brand {
  color: #2b4c7e !important;
}
.navbar-fixed.scrolled .nav-lang {
  color: #4a5568 !important;
  border-color: #e2e8f0 !important;
}

/* Blog Card */
.blog-card {
  transition: all 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px -10px rgba(26, 54, 93, 0.15);
}

.blog-card:hover .blog-image {
  transform: scale(1.05);
}

.blog-image {
  transition: transform 0.5s ease;
}

/* Cart Badge */
.cart-badge {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* FAQ Accordion */
.faq-item {
  transition: all 0.3s ease;
}

.faq-item:hover {
  background-color: var(--gray-50);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.faq-answer.open {
  max-height: 500px;
}

.faq-icon {
  transition: transform 0.3s ease;
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
}

/* Price Tag */
.price-tag {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
}

/* Button Styles */
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(26, 54, 93, 0.4);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  transition: all 0.3s ease;
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(237, 137, 54, 0.4);
}

/* Breadcrumb */
.breadcrumb a {
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--accent);
}

/* Tabs */
.tab-btn {
  transition: all 0.3s ease;
}

.tab-btn.active {
  border-bottom: 3px solid var(--accent);
  color: var(--accent);
}

/* Modal */
.modal-overlay {
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  transform: scale(0.9);
  opacity: 0;
  transition: all 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
  opacity: 1;
}

/* Quantity Input */
.quantity-input {
  -moz-appearance: textfield;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1280px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 2rem;
}

@media (min-width: 768px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Stats Counter Animation */
.stat-number {
  opacity: 0;
  transform: translateY(20px);
}

.stat-number.visible {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.6s ease-out;
}

/* Loading Spinner */
.spinner {
  border: 3px solid var(--gray-200);
  border-top-color: var(--accent);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Toast Notification */
.toast {
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.toast.show {
  transform: translateX(0);
}

/* Image Placeholder */
.img-placeholder {
  background: linear-gradient(135deg, var(--gray-200) 0%, var(--gray-300) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Section Dividers */
.section-divider {
  height: 4px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
}

/* Badge Styles */
.badge-featured {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
}

.badge-new {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
}

.badge-sale {
  background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

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

/* Utility Classes */
.text-shadow {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.overlay-gradient {
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
}

/* Print Styles */
@media print {
  .no-print {
    display: none !important;
  }
}
