@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:wght@400;600;700&display=swap');

html {
  scroll-behavior: smooth;
}

body {
  background-color: #14130F;
  color: #F0EBE1;
  font-family: 'Inter', sans-serif;
  line-height: 1.7;
  letter-spacing: 0.02em;
}

h1, h2 {
  font-family: 'Playfair Display', serif;
  line-height: 1.3;
  margin-bottom: 1rem;
}

h3, h4, h5, h6 {
  font-family: 'Inter', sans-serif;
  line-height: 1.3;
  margin-bottom: 1rem;
  font-weight: 600;
}

section {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #14130F;
}
::-webkit-scrollbar-thumb {
  background: #262320;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3A3630;
}

/* Glassmorphism utility */
.glass {
  background: rgba(28, 26, 22, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(240, 235, 225, 0.05);
}

/* Base styles for scroll animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Product Card Global Behaviors */
.product-card {
  cursor: pointer;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  position: relative;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(20, 19, 15, 0.4);
}

.product-card-img-wrapper {
  overflow: hidden;
}

.product-card-img-wrapper img, 
.product-card img {
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.product-card:hover .product-card-img-wrapper img,
.product-card:hover img {
  transform: scale(1.08);
}

/* Button Hover Utilities */
/* Button System */
.btn-primary {
  background-color: #C8A24A;
  color: #14130F;
  transition: all 0.3s ease;
  padding: 1rem 2.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
}
.btn-primary:hover {
  background-color: #DAB866;
  color: #14130F;
}

.btn-secondary {
  background-color: transparent;
  color: #F0EBE1;
  border: 1px solid #3A3630;
  transition: all 0.3s ease;
  padding: 1rem 2.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.btn-secondary:hover {
  background-color: #C8A24A;
  color: #14130F;
  border-color: #C8A24A;
}

.btn-outline {
  background-color: transparent;
  color: #F0EBE1;
  border: 1px solid #3A3630;
  transition: all 0.3s ease;
  padding: 1rem 2.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.btn-outline:hover {
  background-color: #3A3630;
  color: #F0EBE1;
}

/* Hero specific styles */
.hero-gradient {
  background: linear-gradient(135deg, #262320 0%, #1C1A16 50%, #14130F 100%);
}
.hero-glow {
  background: radial-gradient(circle, rgba(200, 162, 74, 0.15) 0%, rgba(200, 162, 74, 0) 70%);
  animation: floatGlow 8s ease-in-out infinite;
}
@keyframes floatGlow {
  0% { transform: scale(1) translate(0, 0); opacity: 0.5; }
  50% { transform: scale(1.1) translate(2%, 2%); opacity: 0.8; }
  100% { transform: scale(1) translate(0, 0); opacity: 0.5; }
}

.hero-texture {
  background-image: url('https://images.unsplash.com/photo-1518920108398-e7d9c66fae9f?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
  mix-blend-mode: overlay;
  opacity: 0.15;
}

.hero-sparks {
  background-image: 
    radial-gradient(rgba(200, 162, 74, 0.6) 1px, transparent 1px),
    radial-gradient(rgba(200, 162, 74, 0.3) 1px, transparent 1px);
  background-size: 60px 60px, 40px 40px;
  background-position: 0 0, 20px 20px;
  animation: floatSparks 15s linear infinite;
}
@keyframes floatSparks {
  from { background-position: 0 0, 20px 20px; }
  to { background-position: 120px -120px, -40px -100px; }
}

.hero-text-shadow {
  text-shadow: 0px 4px 10px rgba(20, 19, 15, 0.15);
}

.animate-fade-in-smooth {
  animation: fadeInSmooth 1.2s ease-out forwards;
}
@keyframes fadeInSmooth {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.btn-primary-hero {
  background-color: #C8A24A;
  color: #14130F;
  transition: all 0.3s ease;
}
.btn-primary-hero:hover {
  background-color: #DAB866;
  color: #14130F;
}

.btn-secondary-hero {
  background-color: transparent;
  border: 2px solid #3A3630;
  color: #F0EBE1;
  transition: all 0.3s ease;
}
.btn-secondary-hero:hover {
  background-color: #C8A24A;
  border-color: #C8A24A;
  color: #14130F;
}

/* --- Mega Menu & Navigation --- */
.nav-link {
  position: relative;
  display: inline-block;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: #C8A24A;
  transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-item:hover .nav-link::after {
  width: 100%;
}

/* The Products mega-menu.

   OPENED BY JAVASCRIPT, NOT BY :hover. The old rule was
   ".nav-item:hover .mega-menu", which cannot express a close delay, cannot be
   toggled by a click, and cannot be shut with Escape. It also flickered: the
   gap between the trigger and the panel closed it mid-travel. wireMegaMenu in
   js/main.js owns the .is-open class now - 120ms to open, 200ms to close. */
.mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: #1C1A16;
  border-top: 2px solid #C8A24A;
  border-bottom: 1px solid #3A3630;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  visibility: hidden;
  opacity: 0;
  transform: translateY(0.5rem);
  transition: opacity 180ms ease-out, transform 180ms ease-out, visibility 180ms;
  z-index: 100;
  pointer-events: none;
}

.mega-menu.is-open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Someone tabbing into the panel must see it even if the mouse never
   arrived - otherwise the links are reachable but invisible. */
.mega-menu:focus-within {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* --- Search Overlay --- */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 19, 15, 0.95);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  padding: 5% 10%;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.search-input {
  background: transparent;
  border: none;
  border-bottom: 2px solid #3A3630;
  color: #F0EBE1;
  font-size: 3rem;
  padding: 1rem 0;
  font-family: 'Playfair Display', serif;
}

.search-input:focus {
  outline: none;
  border-bottom-color: #C8A24A;
}

/* --- Mobile Accordion Menu --- */
.mobile-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

/* --- Custom Knife Builder Configurator --- */
.configurator-step {
  display: none;
  animation: fadeInSmooth 0.4s ease forwards;
}

.configurator-step.active {
  display: block;
}

.option-card {
  border: 1px solid #3A3630;
  transition: all 0.2s ease;
  cursor: pointer;
}

.option-card:hover {
  border-color: #C8A24A;
}

.option-card.selected {
  border-color: #C8A24A;
  background-color: rgba(200, 162, 74, 0.05);
  box-shadow: 0 0 10px rgba(200, 162, 74, 0.1);
}

.drop-zone {
  border: 2px dashed #3A3630;
  transition: all 0.2s ease;
}

.drop-zone.dragover {
  border-color: #C8A24A;
  background-color: rgba(200, 162, 74, 0.1);
}

/* Hide Spinners in Number Inputs */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}
