/* Frontend Custom Styles for LanNaVet Wholesale */

/* Custom Color Variables */
:root {
  --bs-font-sans-serif: 'Kanit', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --primary-color: #3A6BB0;
  --primary-light: #dbeafe;
  --secondary-color: #059669;
  --accent-color: #f59e0b;
  --text-dark: #1f2937;
  --text-muted: #6b7280;
  --border-color: #e5e7eb;
}

/* Base Styles */
body {
  font-family: 'Kanit', var(--bs-font-sans-serif) !important;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-dark);
}

/* Header Styles */
.header-area {
  background: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.top-header {
  background: var(--primary-color);
  color: white;
  padding: 8px 0;
  font-size: 0.85rem;
}

.top-header a {
  color: white;
  text-decoration: none;
}
input::placeholder, textarea::placeholder {
      color: #bfc3c9 !important;
      opacity: 1 !important;
    }

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

.main-header {
  padding: 15px 0;
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo-container img {
  width: 75px;
  height: auto;
}

.brand-text {
  margin-left: 15px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Navigation Styles */
.navbar-nav .nav-link {
  font-weight: 500;
  color: var(--text-dark);
  padding: 10px 15px;
  transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
  color: var(--primary-color);
}

.btn-primary-custom {
  background: var(--primary-color);
  color: white;
  border: 1px solid var(--primary-color);
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
}
.btn-primary-custom:hover {
  background: var(--primary-color);
  color: white;
  border: 1px solid var(--primary-color);
}

.btn-secondary-custom {
  background: var(--secondary-color);
  color: white;
  border: 1px solid var(--secondary-color);
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
}
.btn-secondary-custom:hover {
  background: var(--secondary-color);
  color: white;
  border: 1px solid var(--secondary-color);
}
.btn-outline-secondary{
    color: var(--bs-btn-hover-color);
    background-color: var(--bs-btn-hover-bg);
    border-color: var(--bs-btn-hover-border-color)
}
/* Mobile Menu Styles */
.logo-container-mobile img {
  height: 40px;
}

.mobile-menu-toggle {
  display: none;
}

.mobile-nav {
  display: none;
}

.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 9998;
}

.mobile-overlay.active {
  display: block;
}

.twitter-typeahead .tt-menu {
    width: max-content;
  }

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  z-index: 1000;
  padding: 8px 0 12px 0;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.bottom-nav-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 15px;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #6b7280;
  padding: 6px 8px;
  border-radius: 12px;
  transition: all 0.3s ease;
  min-width: 55px;
  position: relative;
  flex: 1;
}

.bottom-nav-item i {
  font-size: 1.2rem;
  margin-bottom: 3px;
  transition: all 0.3s ease;
}

.bottom-nav-item span {
  font-size: 0.65rem;
  font-weight: 500;
  line-height: 1;
  text-align: center;
}

.bottom-nav-item:hover {
  color: var(--primary-color);
  text-decoration: none;
}

.bottom-nav-item.active {
  color: var(--primary-color);
  background: rgba(58, 107, 176, 0.1);
}

.bottom-nav-item.active i {
  transform: scale(1.1);
  color: var(--primary-color);
}

/* Add bottom padding to main content when bottom nav is present */
@media (max-width: 991.98px) {
  body.has-bottom-nav main {
    padding-bottom: 85px;
  }
  
  body.has-bottom-nav .footer {
    margin-bottom: 70px;
  }
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--primary-light) 0%, rgba(37,99,235,0.1) 100%);
  padding: 60px 0;
}

.hero-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.hero-content p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 30px;
}

/* Login Box */
.login-box {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  padding: 30px;
  margin-top: 20px;
}

.login-box-header {
  text-align: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--primary-color);
}

.login-box-header h3 {
  color: var(--primary-color);
  font-weight: 600;
  margin: 0;
}

.form-group label {
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.form-control {
  border-radius: 8px;
  border: 1px solid var(--border-color);
  padding: 12px 15px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(37,99,235,0.25);
}

/* Product Section */
.product-section {
  padding: 60px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 15px;
}

.section-title p {
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* Footer */
.footer {
  background: var(--text-dark);
  color: white;
  padding: 40px 0 20px;
  margin-top: 60px;
}

.footer h5 {
  color: var(--accent-color);
  font-weight: 600;
  margin-bottom: 20px;
}

.footer p, .footer a {
  color: #d1d5db;
  text-decoration: none;
}

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

.footer-bottom {
  border-top: 1px solid #374151;
  margin-top: 30px;
  padding-top: 20px;
  text-align: center;
  color: #9ca3af;
}

/* Utility Classes */
.text-primary-custom {
  color: var(--primary-color) !important;
}

.bg-primary-custom {
  background-color: var(--primary-color) !important;
}

.border-primary-custom {
  border-color: var(--primary-color) !important;
}

/* Responsive Design */
@media (max-width: 991.98px) {
  .mobile-menu-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
  }

  .hamburger {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    width: 25px;
    height: 20px;
    justify-content: space-between;
    margin-left: 15px;
  }

  .hamburger span {
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  .hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
  }

  .desktop-nav {
    display: none !important;
  }

  .mobile-nav {
    display: block;
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    max-width: 320px;
    height: 100vh;
    background: white;
    z-index: 10000;
    transition: left 0.3s ease;
    box-shadow: 2px 0 20px rgba(0,0,0,0.15);
    overflow-y: auto;
  }

  .mobile-nav.active {
    left: 0;
  }

  .mobile-nav-header {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .mobile-nav-header img {
    filter: brightness(0) invert(1);
  }

  .mobile-nav-close {
    cursor: pointer;
    font-size: 28px;
    color: white;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
  }

  .mobile-nav-menu {
    padding: 0;
  }

  .mobile-nav-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .mobile-nav-menu li {
    margin-bottom: 0;
    border-bottom: 1px solid var(--border-color);
  }

  .mobile-nav-menu li:last-child {
    border-bottom: none;
  }

  .mobile-nav-menu a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    padding: 15px 20px;
    display: block;
    transition: all 0.3s ease;
  }

  .mobile-nav-menu a:hover,
  .mobile-nav-menu a.text-primary-custom {
    background: var(--primary-light);
    color: var(--primary-color);
  }

  .mobile-contact-section {
    background: #f8fafc;
    padding: 20px;
    border-top: 1px solid var(--border-color);
  }

  .mobile-contact-section h6 {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 0.9rem;
  }

  .mobile-contact-section p {
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
  }

  .mobile-social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
  }

  .mobile-social-links a {
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: color 0.3s ease;
  }

  .mobile-social-links a:hover {
    color: var(--secondary-color);
  }

  .hero-content h1 {
    font-size: 2rem;
  }
  
  .section-title h2 {
    font-size: 2rem;
  }
  
  .logo-container {
    justify-content: center;
    text-align: center;
  }

  .logo-container img {
    width: 140px;
    height: auto;
  }

  .main-header {
    padding: 10px 0;
  }
}

@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .brand-text {
    display: none;
  }
  
  .top-header {
    padding: 12px 0;
  }
  
  .logo-container-mobile img {
    height: 35px;
  }
  
  .btn-primary-custom {
    font-size: 0.85rem;
    padding: 6px 12px;
  }
}

@media (max-width: 576px) {
  .mobile-menu-toggle {
    padding: 10px 0;
  }

  .logo-container img {
    width: 120px;
  }

  .mobile-nav {
    width: 100%;
    max-width: 280px;
  }

  .hamburger {
    width: 22px;
    height: 18px;
  }
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

.animate-fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* Loading Spinner */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

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

/* Enhanced Button Styles */
.btn-enhanced {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  z-index: 1;
}

.btn-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
  z-index: -1;
}

.btn-enhanced:hover::before {
  left: 100%;
}

/* Card Hover Effects */
.card-hover-effect {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover-effect:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, var(--lannavet-primary), var(--lannavet-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

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

::-webkit-scrollbar-thumb:hover {
  background: #1d4ed8;
}

/* Responsive Typography */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 1.75rem !important;
    line-height: 1.2;
  }
  
  .section-title h2 {
    font-size: 1.75rem !important;
  }
  
  .cta-section h2 {
    font-size: 1.75rem !important;
  }
}

@media (max-width: 576px) {
  .hero-content h1 {
    font-size: 1.5rem !important;
  }
  
  .section-title h2 {
    font-size: 1.5rem !important;
  }
  
  .hero-section {
    padding: 40px 0 !important;
  }
  
  .stats-section {
    padding: 40px 0 !important;
  }
  
  .features-section,
  .categories-section,
  .news-section {
    padding: 60px 0 !important;
  }
  
  .cta-section {
    padding: 60px 0 !important;
  }
}

/* Print Styles */
@media print {
  .header-area,
  .footer,
  .btn,
  .mobile-nav,
  .mobile-overlay {
    display: none !important;
  }
  
  .hero-section,
  .stats-section,
  .features-section,
  .categories-section,
  .news-section,
  .cta-section {
    page-break-inside: avoid;
    padding: 20px 0 !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  h1, h2, h3, h4, h5, h6 {
    color: #000 !important;
  }
}

/* Accessibility Improvements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles for better accessibility */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--lannavet-primary);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .feature-card,
  .category-card,
  .news-card,
  .login-box {
    border: 2px solid #000;
  }
  
  .btn-primary-custom,
  .btn-secondary-custom,
  .btn-cta {
    border: 2px solid #000;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
