:root {
  --background: oklch(0.98 0 0);
  --foreground: oklch(0.15 0 0);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.15 0 0);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.15 0 0);
  --primary: oklch(0.4 0.15 240);
  --primary-foreground: oklch(0.98 0 0);
  --secondary: oklch(0.97 0 0);
  --secondary-foreground: oklch(0.15 0 0);
  --muted: oklch(0.97 0 0);
  --muted-foreground: oklch(0.6 0 0);
  --accent: oklch(0.4 0.15 240);
  --accent-foreground: oklch(0.98 0 0);
  --destructive: oklch(0.577 0.245 27.325);
  --destructive-foreground: oklch(0.98 0 0);
  --border: oklch(0.92 0 0);
  --input: oklch(0.92 0 0);
  --ring: oklch(0.4 0.15 240);
  --radius: 0.375rem;
}

* {
  border-color: var(--border);
}

body {
  background-color: var(--background);
  color: var(--foreground);
}

/* Mobile Responsive Enhancements */
@media (max-width: 768px) {
  /* Better spacing for mobile */
  h1 {
    font-size: 2rem !important;
    line-height: 2.25rem !important;
  }

  h2 {
    font-size: 1.5rem !important;
    line-height: 2rem !important;
  }

  h3 {
    font-size: 1.25rem !important;
    line-height: 1.75rem !important;
  }

  /* Better padding for sections on mobile */
  section {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

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

  /* Better button sizing on mobile */
  button, a.inline-block {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Stack grids on mobile */
  .grid {
    grid-template-columns: 1fr !important;
  }

  /* Better form inputs on mobile */
  input, textarea, select {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

@media (max-width: 640px) {
  /* Even smaller screens */
  h1 {
    font-size: 1.75rem !important;
    line-height: 2rem !important;
  }

  /* Reduce padding on very small screens */
  .py-20 {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }

  .py-16 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
}

/* Touch-friendly hover states */
@media (hover: none) {
  a:hover, button:hover {
    opacity: 0.8;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Better focus states for accessibility */
a:focus, button:focus, input:focus, textarea:focus {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

/* Ensure text is readable */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Safe area insets for notched devices */
@supports (padding: max(0px)) {
  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}

.hero-overlay {
  background: linear-gradient(90deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.35) 40%, rgba(0,0,0,0.15) 100%);
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background: rgba(255,255,255,0.3);
  border: 1px solid rgba(255,255,255,0.15);
  transition: all .18s ease;
  display: inline-block;
}
.carousel-dot:hover { transform: scale(1.15); background: rgba(255,255,255,0.9); }

.btn-primary {
  display: inline-block;
  background: var(--primary);
  color: var(--primary-foreground);
  padding: .55rem 1rem;
  border-radius: 0.75rem;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(36,36,36,0.08);
  transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}
.btn-primary:hover { transform: translateY(-2px); opacity: .98; }
.btn-primary:focus { outline: 3px solid color-mix(in srgb, var(--primary) 20%, white); outline-offset: 3px; }

.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--foreground);
  padding: .5rem .95rem;
  border-radius: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(3px);
}
.btn-outline:hover { background: rgba(255,255,255,0.04); }

.bg-card {
  background: var(--card);
  color: var(--card-foreground);
}

.shadow-sm { box-shadow: 0 6px 18px rgba(36,36,36,0.04); }
.shadow-md { box-shadow: 0 12px 30px rgba(36,36,36,0.06); }

/* ensure images in hero and cards look consistent */
.carousel-slide img, .bg-card img {
  object-fit: cover;
  object-position: center;
  width: 100%;
  height: 100%;
}


/* Ensure carousel container establishes stacking context and images sit below overlay/content */
#heroCarousel {
  position: relative;
  z-index: 0;
}

#heroCarousel .carousel-slide img {
  filter: brightness(0.65) contrast(1.05) saturate(0.98);
  transition: filter .35s ease;
  z-index: 0;
  height: 100%;
  width: 100%;
  object-fit: cover;
}

/* Overlay/content above the image */
#heroCarousel .hero-overlay {
  z-index: 10;
  position: relative;
}

/* Keep the little panel behind text subtle but separated from image */
#heroCarousel .hero-overlay .max-w-4xl {
  background: rgba(0,0,0,0.12);
  padding: 0.9rem 1.1rem;
  border-radius: 0.5rem;
}

/* Ensure product card images render at consistent height and don't get pushed away */
.home-page-products .bg-card img {
  object-fit: cover;
  object-position: center;
  width: 100%;
  height: 14rem;   /* consistent with h-56 utility */
  max-height: 14rem;
  display: block;
}

/* Make sure card content sits above its image if needed */
.bg-card > img,
.bg-card img {
  position: relative;
  z-index: 1;
}

/* Small polish: create visual separation between hero and next section */
section + section {
  margin-top: 0.5rem;
}