/* ========================================
   Medspy Healthcare - Custom Styles
   ======================================== */

/* ========================================
   CSS Variables - Brand Colors
   ======================================== */
:root {
  --color-primary: #0A66C2;
  --color-secondary: #0E2A47;
  --color-accent: #00A6FB;
  --color-background: #F5F7FA;
  --color-white: #FFFFFF;
  --color-gray-light: #F3F4F6;
  --color-gray-medium: #6B7280;
  --color-gray-dark: #374151;
}

/* ========================================
   CSS Reset & Base Styles
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--color-gray-dark);
}

/* ========================================
   Custom Utility Classes
   ======================================== */
.smooth-scroll {
  scroll-behavior: smooth;
}

.no-scroll {
  overflow: hidden;
}

.text-balance {
  text-wrap: balance;
}

/* Custom Focus Styles for Accessibility */
.focus-visible:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Skip to Content Link for Accessibility */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 100;
}

.skip-to-content:focus {
  top: 0;
}

/* ========================================
   Custom Animations
   ======================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Animation Classes */
.animate-fade-in {
  animation: fadeIn 0.6s ease-out;
}

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

.animate-fade-in-down {
  animation: fadeInDown 0.8s ease-out;
}

.animate-slide-in-left {
  animation: slideInLeft 0.8s ease-out;
}

.animate-slide-in-right {
  animation: slideInRight 0.8s ease-out;
}

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

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* ========================================
   Custom Component Styles
   ======================================== */

/* Custom Card Hover Effects */
.card-hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Custom Button Styles */
.btn-primary {
  background-color: var(--color-primary);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
  background-color: var(--color-secondary);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-secondary:hover {
  background-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-primary);
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid var(--color-primary);
  cursor: pointer;
}

.btn-outline:hover {
  background-color: var(--color-primary);
  color: white;
  transform: translateY(-2px);
}

/* Custom Link Styles */
.link-primary {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* Custom Gradient Backgrounds */
.gradient-primary {
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 50%, var(--color-accent) 100%);
}

.gradient-primary-light {
  background: linear-gradient(135deg, rgba(10, 102, 194, 0.1) 0%, rgba(0, 166, 251, 0.1) 100%);
}

/* ========================================
   Custom Scrollbar Styles
   ======================================== */
::-webkit-scrollbar {
  width: 12px;
}

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

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

::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent);
}

/* ========================================
   Print Styles
   ======================================== */
@media print {

  nav,
  footer,
  .no-print {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  a {
    text-decoration: underline;
  }
}

/* ========================================
   Responsive Utilities
   ======================================== */
@media (max-width: 640px) {
  .mobile-hide {
    display: none !important;
  }
}

@media (min-width: 641px) {
  .mobile-only {
    display: none !important;
  }
}

/* ========================================
   Loading States
   ======================================== */
.loading-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s ease-in-out infinite;
}

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

  100% {
    background-position: -200% 0;
  }
}

/* Image Loading with Fade-in */
img.lazy-fade {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

img.lazy-fade.loaded {
  opacity: 1;
}

/* ========================================
   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-width: 0;
}

/* 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;
    scroll-behavior: auto !important;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --color-primary: #0055AA;
    --color-secondary: #000000;
    --color-accent: #0088FF;
  }
}

/* Dark Mode Support (if needed in future) */
@media (prefers-color-scheme: dark) {
  /* Dark mode styles can be added here in future */
}

/* ========================================
   Form Enhancements
   ======================================== */
.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(10, 102, 194, 0.1);
}

.form-input:invalid {
  border-color: #ef4444;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--color-secondary);
}

/* Form Validation Styles */
.form-input.error,
.form-input:invalid:not(:placeholder-shown) {
  border-color: #ef4444;
  background-color: #fef2f2;
}

.form-input.success {
  border-color: #10b981;
  background-color: #f0fdf4;
}

.error-message {
  display: none;
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  animation: fadeInDown 0.3s ease-out;
}

.error-message.show {
  display: block;
}

.success-icon,
.error-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.success-icon {
  color: #10b981;
}

.error-icon {
  color: #ef4444;
}

.success-icon.show,
.error-icon.show {
  opacity: 1;
}

/* ========================================
   Image Optimization
   ======================================== */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

.img-cover {
  object-fit: cover;
}

.img-contain {
  object-fit: contain;
}

/* Category Card Image Container - Consistent Aspect Ratio */
.category-card-image-container {
  position: relative;
  width: 100%;
  height: 12rem;
  /* 192px - h-48 equivalent */
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.category-card-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 1rem;
  transition: transform 0.3s ease;
}

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


/* ========================================
   Custom Spacing Utilities
   ======================================== */
.section-spacing {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

@media (min-width: 768px) {
  .section-spacing {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }
}

/* ========================================
   Browser Compatibility
   ======================================== */
/* Fixes for older browsers */
img[loading="lazy"] {
  opacity: 1;
  transition: opacity 0.3s;
}

/* Fallback for CSS Grid */
@supports not (display: grid) {
  .grid {
    display: flex;
    flex-wrap: wrap;
  }
}

/* ========================================
   Advanced Scroll Animations
   ======================================== */

/* IMPORTANT: Animations are OPT-IN to prevent breaking the site
   Use data-animate attribute or *-manual classes to enable
   Regular classes DO NOT hide content by default */

/* Manual animation classes - only these hide content initially */
.fade-in-manual {
  opacity: 0;
}

.fade-in-manual.animate-in,
[data-animate="fade-in"].animate-in {
  animation: fadeIn 0.8s ease-out forwards;
}

/* Slide Up Animation */
.slide-up-manual {
  opacity: 0;
  transform: translateY(30px);
}

.slide-up-manual.animate-in,
[data-animate="slide-up"].animate-in {
  animation: slideUpAnim 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

/* Slide Left Animation */
.slide-left-manual {
  opacity: 0;
  transform: translateX(-30px);
}

.slide-left-manual.animate-in,
[data-animate="slide-left"].animate-in {
  animation: slideLeftAnim 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

/* Slide Right Animation */
.slide-right-manual {
  opacity: 0;
  transform: translateX(30px);
}

.slide-right-manual.animate-in,
[data-animate="slide-right"].animate-in {
  animation: slideRightAnim 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideRightAnim {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Scale In Animation */
.scale-in-manual {
  opacity: 0;
  transform: scale(0.95);
}

.scale-in-manual.animate-in,
[data-animate="scale-in"].animate-in {
  animation: scaleInAnim 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes scaleInAnim {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Text Reveal Animation */
.text-reveal {
  overflow: hidden;
  position: relative;
}

.text-reveal.animate-in {
  animation: textRevealAnim 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

/* ========================================
   Enhanced Card & Button Effects
   ======================================== */

/* Hover Lift Effect */
.hover-lift {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
              0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Ripple Effect */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transform: scale(0);
  animation: rippleAnim 0.6s ease-out;
  pointer-events: none;
}

@keyframes rippleAnim {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Image Zoom on Hover */
.image-zoom {
  overflow: hidden;
}

.image-zoom img {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-zoom:hover img {
  transform: scale(1.1);
}

/* ========================================
   Loading & Skeleton Animations
   ======================================== */

/* Image Loading Animation */
img.loaded {
  animation: imageLoadAnim 0.4s ease-out;
}

@keyframes imageLoadAnim {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Shimmer Loading Effect */
.shimmer {
  background: linear-gradient(
    90deg,
    #f0f0f0 0%,
    #f8f8f8 20%,
    #f0f0f0 40%,
    #f0f0f0 100%
  );
  background-size: 200% 100%;
  animation: shimmerAnim 1.5s ease-in-out infinite;
}

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

/* ========================================
   Stagger Animations for Lists
   ======================================== */

/* Only apply stagger to elements with data-stagger attribute */
[data-stagger] > *,
.stagger-animation > * {
  opacity: 0;
  transform: translateY(20px);
}

[data-stagger].animate-in > *,
.stagger-animation.animate-in > * {
  animation: staggerItemAnim 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

[data-stagger].animate-in > *:nth-child(1),
.stagger-animation.animate-in > *:nth-child(1) { animation-delay: 0.05s; }
[data-stagger].animate-in > *:nth-child(2),
.stagger-animation.animate-in > *:nth-child(2) { animation-delay: 0.1s; }
[data-stagger].animate-in > *:nth-child(3),
.stagger-animation.animate-in > *:nth-child(3) { animation-delay: 0.15s; }
[data-stagger].animate-in > *:nth-child(4),
.stagger-animation.animate-in > *:nth-child(4) { animation-delay: 0.2s; }
[data-stagger].animate-in > *:nth-child(5),
.stagger-animation.animate-in > *:nth-child(5) { animation-delay: 0.25s; }
[data-stagger].animate-in > *:nth-child(6),
.stagger-animation.animate-in > *:nth-child(6) { animation-delay: 0.3s; }
[data-stagger].animate-in > *:nth-child(7),
.stagger-animation.animate-in > *:nth-child(7) { animation-delay: 0.35s; }
[data-stagger].animate-in > *:nth-child(8),
.stagger-animation.animate-in > *:nth-child(8) { animation-delay: 0.4s; }
[data-stagger].animate-in > *:nth-child(9),
.stagger-animation.animate-in > *:nth-child(9) { animation-delay: 0.45s; }
[data-stagger].animate-in > *:nth-child(10),
.stagger-animation.animate-in > *:nth-child(10) { animation-delay: 0.5s; }

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

/* ========================================
   Bounce & Wiggle Animations
   ======================================== */

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.animate-bounce {
  animation: bounce 1s ease infinite;
}

@keyframes wiggle {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-5deg);
  }
  75% {
    transform: rotate(5deg);
  }
}

.animate-wiggle {
  animation: wiggle 0.5s ease-in-out;
}

/* ========================================
   Gradient Animations
   ======================================== */

.gradient-animate {
  background: linear-gradient(
    -45deg,
    #0A66C2,
    #00A6FB,
    #0E2A47,
    #0A66C2
  );
  background-size: 400% 400%;
  animation: gradientAnim 15s ease infinite;
}

@keyframes gradientAnim {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* ========================================
   Fix Horizontal Scroll on Small Screens
   ======================================== */

/* Ensure no horizontal overflow on mobile devices */
@media (max-width: 640px) {
  /* Prevent any element from causing horizontal scroll */
  * {
    max-width: 100%;
  }

  /* Ensure containers respect viewport width */
  .container {
    max-width: 100% !important;
    overflow-x: hidden;
  }

  /* Ensure images respect container width */
  img {
    max-width: 100%;
    height: auto;
  }

  /* Fix potential grid/flex overflow */
  .grid,
  [class*="grid-cols"] {
    overflow-x: hidden;
  }

  /* Ensure text doesn't overflow */
  h1, h2, h3, h4, h5, h6, p, span, div {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  /* Fix buttons and links */
  a, button {
    max-width: 100%;
    word-break: break-word;
  }

  /* Ensure SVGs don't overflow */
  svg {
    max-width: 100%;
    height: auto;
  }
}

/* Extra small screens fix (320px and below) */
@media (max-width: 375px) {
  body {
    overflow-x: hidden !important;
  }

  /* Reduce padding on very small screens */
  .container {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  /* Ensure headings fit */
  h1 {
    font-size: 1.875rem !important; /* 30px */
    line-height: 2.25rem !important;
  }

  h2 {
    font-size: 1.5rem !important; /* 24px */
    line-height: 2rem !important;
  }

  /* Fix navigation on very small screens */
  nav .flex {
    flex-wrap: nowrap;
  }
}

/* ========================================
   Navigation Visibility Fix
   ======================================== */

/* Ensure navigation is always visible and on top */
nav {
  position: sticky;
  top: 0;
  z-index: 9999 !important;
  background-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Ensure navigation content is visible */
nav .container {
  position: relative;
  z-index: 10000;
}

/* Mobile menu visibility */
#mobile-menu {
  position: relative;
  z-index: 10001;
  background-color: #ffffff;
}

/* ========================================
   Enhanced Category Cards
   ======================================== */

.category-card-enhanced {
  position: relative;
  will-change: transform, box-shadow;
  border: 1px solid rgba(229, 231, 235, 0.5);
}

.category-card-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 1rem;
  padding: 2px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.category-card-enhanced:hover::before {
  opacity: 0.3;
}

/* Product count badge pulse animation */
@keyframes badge-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.category-card-enhanced:hover .bg-white\/95 {
  animation: badge-pulse 2s ease-in-out infinite;
}

/* Line clamp utility for description */
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Backdrop blur support */
.backdrop-blur-sm {
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Enhanced pulse animation for category dots */
@keyframes enhanced-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
}

.animate-pulse {
  animation: enhanced-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Smooth gradient transitions */
.category-card-enhanced .bg-gradient-to-r {
  background-size: 200% 100%;
  transition: background-position 0.5s ease;
}

.category-card-enhanced:hover .bg-gradient-to-r {
  background-position: 100% 0;
}

/* Image container enhancements */
.category-card-enhanced .h-64 {
  position: relative;
  isolation: isolate;
}

/* Premium shadow on hover */
.category-card-enhanced:hover {
  box-shadow:
    0 20px 25px -5px rgba(10, 102, 194, 0.15),
    0 10px 10px -5px rgba(10, 102, 194, 0.1),
    0 0 0 1px rgba(10, 102, 194, 0.1);
}

/* CTA section blue background on hover */
.category-card-enhanced .flex.items-center.justify-between.pt-4 {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0.75rem;
  padding: 1rem;
  margin: -0.5rem;
  margin-top: 0.5rem;
}

.category-card-enhanced:hover .flex.items-center.justify-between.pt-4 {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  padding: 1rem;
  box-shadow: 0 8px 16px -4px rgba(10, 102, 194, 0.3);
  border-top: none !important;
  border-top-color: transparent !important;
}

/* Make text white on blue background with smooth transition */
.category-card-enhanced .flex.items-center.justify-between.pt-4 span {
  transition: color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-card-enhanced:hover .flex.items-center.justify-between.pt-4 span {
  color: white !important;
}

/* Adjust arrow button on hover to complement blue background */
.category-card-enhanced .flex.items-center.justify-between.pt-4 .rounded-full {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-card-enhanced:hover .flex.items-center.justify-between.pt-4 .rounded-full {
  background-color: rgba(255, 255, 255, 0.2) !important;
  transform: translateX(4px);
}

/* Responsive adjustments for cards */
@media (max-width: 768px) {
  .category-card-enhanced .h-64 {
    height: 14rem; /* Slightly smaller on mobile */
  }

  .category-card-enhanced .p-6 {
    padding: 1.25rem;
  }

  .category-card-enhanced h2 {
    font-size: 1.5rem;
  }
}

/* ========================================
   Product Detail Page Enhancements
   ======================================== */

/* Product Image Container with Zoom Effect */
.product-image-container {
  position: relative;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-image-zoom {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

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

/* Premium Badge Animation */
.product-image-container .absolute.top-4.right-4 > div {
  animation: badge-float 3s ease-in-out infinite;
}

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

/* Enhanced Specifications Table */
.specifications-table tbody tr {
  transition: all 0.3s ease;
  border-bottom: 1px solid #e5e7eb;
}

.specifications-table tbody tr:nth-child(even) {
  background-color: #f9fafb;
}

.specifications-table tbody tr:hover {
  background-color: #eff6ff;
  transform: translateX(4px);
  box-shadow: -4px 0 0 0 var(--color-primary);
}

.specifications-table tbody tr td:first-child {
  font-weight: 600;
  color: var(--color-secondary);
  padding: 1rem 1.5rem;
  width: 35%;
}

.specifications-table tbody tr td:last-child {
  color: var(--color-gray-dark);
  padding: 1rem 1.5rem;
}

/* Add icon spacing for specification categories */
.specifications-table tbody tr td:first-child::before {
  content: '▸';
  color: var(--color-primary);
  font-weight: bold;
  margin-right: 0.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.specifications-table tbody tr:hover td:first-child::before {
  opacity: 1;
}

/* Benefits Card Enhancement */
#product-benefits > div {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}

#product-benefits > div:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px -5px rgba(10, 102, 194, 0.15);
  border-color: rgba(10, 102, 194, 0.2);
}

/* Applications List Enhancement */
#product-applications ul li {
  position: relative;
  padding-left: 1.5rem;
  transition: color 0.3s ease;
}

#product-applications ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-radius: 50%;
  transition: transform 0.3s ease;
}

#product-applications ul li:hover::before {
  transform: scale(1.5);
}

#product-applications ul li:hover {
  color: var(--color-primary);
}

/* Product Overview Section Enhancement */
#product-overview p {
  transition: transform 0.3s ease;
}

#product-overview:hover p {
  transform: translateX(4px);
}

/* Trust Badges in Product Info */
.flex.items-center.space-x-4 > div {
  transition: all 0.3s ease;
}

.flex.items-center.space-x-4 > div:hover {
  transform: scale(1.05);
}

/* Section Icon Pulse Animation */
.flex.items-center.mb-6 .rounded-full {
  animation: icon-pulse 3s ease-in-out infinite;
}

@keyframes icon-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(10, 102, 194, 0.3);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(10, 102, 194, 0);
  }
}

/* Enhanced Section Transitions */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-animate].animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger animation for consecutive sections */
[data-animate]:nth-of-type(1) { transition-delay: 0.1s; }
[data-animate]:nth-of-type(2) { transition-delay: 0.2s; }
[data-animate]:nth-of-type(3) { transition-delay: 0.3s; }
[data-animate]:nth-of-type(4) { transition-delay: 0.4s; }
[data-animate]:nth-of-type(5) { transition-delay: 0.5s; }

/* Responsive Product Page Adjustments */
@media (max-width: 768px) {
  .product-image-container {
    margin-bottom: 2rem;
  }

  .specifications-table tbody tr td {
    display: block;
    width: 100% !important;
    padding: 0.75rem 1rem;
  }

  .specifications-table tbody tr td:first-child {
    padding-bottom: 0.25rem;
    border-bottom: none;
  }

  .specifications-table tbody tr td:last-child {
    padding-top: 0.25rem;
    color: var(--color-gray-medium);
  }

  .specifications-table tbody tr:hover {
    transform: translateX(0);
  }

  #product-benefits {
    grid-template-columns: 1fr;
  }
}

/* Smooth Scrolling Enhancements */
html.product-page {
  scroll-padding-top: 100px;
}

/* Focus States for Product CTAs */
a[href="request-quote.html"]:focus,
a[href="contact.html"]:focus {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

/* Loading State for Product Image */
.product-image-container.loading-skeleton {
  animation: pulse-skeleton 1.5s ease-in-out infinite;
}

@keyframes pulse-skeleton {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Accessibility: Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .category-card-enhanced,
  .category-card-enhanced * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ========================================
   Enhanced Product Cards
   ======================================== */

/* Line clamp utility for product descriptions */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Product card hover effects */
.category-card-enhanced:hover .line-clamp-3,
.category-card-enhanced:hover .line-clamp-2 {
  color: #4B5563; /* Slightly darker on hover for better readability */
}

/* Ensure product images maintain aspect ratio */
.category-card-enhanced .h-64 img {
  max-height: 100%;
  width: auto;
  max-width: 100%;
}

/* Premium badge animation on product cards */
@keyframes badge-slide-in {
  from {
    transform: translateX(20px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Product card shimmer effect */
@keyframes shimmer-slide {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

/* Smooth shadow transition for product cards */
.category-card-enhanced {
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced hover shadow with brand colors */
.category-card-enhanced:hover {
  box-shadow:
    0 25px 50px -12px rgba(10, 102, 194, 0.25),
    0 12px 30px -10px rgba(0, 166, 251, 0.2),
    0 0 0 1px rgba(10, 102, 194, 0.1);
  transform: translateY(-8px);
}

/* Request Quote badge pulse on hover */
@keyframes quote-badge-pulse {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-2px) scale(1.02);
  }
}

.category-card-enhanced:hover .bg-gradient-to-r.text-white {
  animation: quote-badge-pulse 2s ease-in-out infinite;
}

/* Arrow icon rotation animation */
.category-card-enhanced:hover .rounded-full svg {
  transform: translateX(2px);
  transition: transform 0.3s ease;
}

/* Responsive adjustments for product cards */
@media (max-width: 768px) {
  .category-card-enhanced {
    transform: translateY(0) !important;
  }

  .category-card-enhanced:hover {
    transform: translateY(-4px) !important;
  }

  .category-card-enhanced .h-64 {
    height: 12rem;
  }
}

/* Mobile optimization for better performance */
@media (max-width: 640px) {
  /* Simplify animations on mobile for better performance */
  .category-card-enhanced .absolute.inset-0 {
    transition-duration: 0.3s !important;
  }

  /* Reduce padding on very small screens */
  .category-card-enhanced .p-6 {
    padding: 1rem;
  }

  /* Adjust text sizes */
  .category-card-enhanced h3 {
    font-size: 1.125rem;
    line-height: 1.5rem;
  }

  .category-card-enhanced .line-clamp-3 {
    -webkit-line-clamp: 2; /* Show fewer lines on mobile */
  }
}

/* Focus state for accessibility */
.category-card-enhanced:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* Remove text decoration from product card links */
a.category-card-enhanced,
a.category-card-enhanced:hover,
a.category-card-enhanced:focus,
a.category-card-enhanced:active {
  text-decoration: none !important;
}

/* Ensure all text inside product card links has no underline */
a.category-card-enhanced h3,
a.category-card-enhanced h2,
a.category-card-enhanced p,
a.category-card-enhanced span,
a.category-card-enhanced div {
  text-decoration: none !important;
}

/* Ensure proper spacing in product grids */
#products-grid .category-card-enhanced {
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  #products-grid .category-card-enhanced {
    margin-bottom: 0;
  }
}