/* Thomas Bakehouse - Custom Style Extensions */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Libre+Caslon+Text:ital,wght@0,400;0,700;1,400&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

/* CSS Variables representing design tokens */
:root {
  --primary: #31170d;
  --primary-container: #4a2c20;
  --secondary: #855313;
  --caramel-accent: #c58a46;
  --background: #fff8f0;
  --surface-cream: #faf4ec;
  --surface-beige: #e8d7c5;
  --text-on-surface: #1d1b17;
  --text-on-surface-variant: #504440;
  --warm-shadow: rgba(42, 24, 16, 0.08);
}

/* Base custom resets and setups */
html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--caramel-accent) var(--surface-cream);
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--background);
  color: var(--text-on-surface);
  overflow-x: hidden;
}

/* Custom Scrollbar for premium feel */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--surface-cream);
}
::-webkit-scrollbar-thumb {
  background: var(--caramel-accent);
  border-radius: 9999px;
  border: 2px solid var(--surface-cream);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Typography styles matching the design system specs */
.font-display-premium {
  font-family: 'Libre Caslon Text', serif;
}

.font-editorial {
  font-family: 'Playfair Display', serif;
}

/* Elegant line menu decoration */
.menu-line-item {
  display: flex;
  align-items: baseline;
}
.menu-line-item::after {
  content: "";
  flex-grow: 1;
  border-bottom: 2px dotted var(--surface-beige);
  margin: 0 10px;
  order: 2;
}

/* Glassmorphism utility classes */
.glass-nav {
  background: rgba(255, 248, 240, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.glass-card {
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.glass-accent {
  background: rgba(197, 138, 70, 0.1);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(197, 138, 70, 0.2);
}

/* Shadow utilities using warm tinted shadows */
.warm-shadow-sm {
  box-shadow: 0 4px 15px -3px var(--warm-shadow);
}
.warm-shadow-md {
  box-shadow: 0 10px 25px -5px var(--warm-shadow);
}
.warm-shadow-lg {
  box-shadow: 0 20px 40px -10px var(--warm-shadow);
}

/* Scroll reveal animations */
.reveal-element {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-element.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-100 { transition-delay: 100ms; }
.reveal-delay-200 { transition-delay: 200ms; }
.reveal-delay-300 { transition-delay: 300ms; }
.reveal-delay-400 { transition-delay: 400ms; }

/* Custom Animations & Keyframes */
@keyframes float {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(3deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

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

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.animate-spin-slow {
  animation: spin-slow 20s linear infinite;
}

/* Product spotlight mask/highlight overlay */
.product-spotlight-active {
  position: relative;
  z-index: 10;
  transform: scale(1.03);
  box-shadow: 0 25px 50px -12px rgba(42, 24, 16, 0.2);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Image zoom interactions */
.zoom-container {
  overflow: hidden;
}
.zoom-container img {
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.zoom-container:hover img {
  transform: scale(1.08);
}

/* Custom Lightbox Styles */
.lightbox-modal {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.lightbox-modal.active {
  opacity: 1;
  pointer-events: auto;
}

/* Carousel layout */
.carousel-container {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.carousel-container::-webkit-scrollbar {
  display: none;
}
.carousel-item {
  flex: 0 0 100%;
  scroll-snap-align: start;
}
@media (min-width: 768px) {
  .carousel-item {
    flex: 0 0 50%;
  }
}
@media (min-width: 1024px) {
  .carousel-item {
    flex: 0 0 33.333333%;
  }
}

/* Animated active navigation link indicator */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--caramel-accent);
  transition: width 0.3s ease;
}
.nav-link.active::after {
  width: 100%;
}
.nav-link.active {
  color: var(--caramel-accent) !important;
  font-weight: 700;
}
