/* ==================== BASE STYLES ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: rgba(232, 185, 78, 0.3);
  color: #2A1F14;
}

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

::-webkit-scrollbar-track {
  background: #1A130D;
}

::-webkit-scrollbar-thumb {
  background: #E8B94E;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #C9A23C;
}

/* ==================== PRELOADER ==================== */
.loader-pattern {
  border: 3px solid #E8B94E;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

.loader-progress {
  animation: loaderProgress 1.5s ease-in-out forwards;
}

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

@keyframes loaderProgress {
  0% { width: 0%; }
  100% { width: 100%; }
}

/* ==================== PATTERN OVERLAY ==================== */
.pattern-overlay {
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(232, 185, 78, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 75% 75%, rgba(232, 185, 78, 0.05) 1px, transparent 1px);
  background-size: 60px 60px, 40px 40px;
}

/* ==================== NAVBAR ==================== */
#navbar {
  background: transparent;
}

#navbar.scrolled {
  background: rgba(26, 19, 13, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(232, 185, 78, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-logo-text {
  transition: color 0.3s ease;
}

#navbar.scrolled .nav-logo-text {
  color: #FDF8F0;
}

/* ==================== FLOATING ANIMATIONS ==================== */
@keyframes float-slow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes float-medium {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(-3deg); }
}

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

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

/* ==================== SCROLL INDICATOR ==================== */
@keyframes scrollDot {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(8px); opacity: 0; }
}

.animate-scroll-dot {
  animation: scrollDot 1.5s ease-in-out infinite;
}

/* ==================== HERO PARALLAX ==================== */
.hero-parallax {
  will-change: transform;
}

/* ==================== BUTTON GLOW ==================== */
.btn-glow {
  position: relative;
  overflow: hidden;
}

.btn-glow::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.btn-glow:hover::before {
  opacity: 1;
}

/* ==================== SCROLL ANIMATIONS ==================== */
.animate-on-scroll {
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll[data-animation="fade-up"] {
  transform: translateY(40px);
}

.animate-on-scroll[data-animation="fade-right"] {
  transform: translateX(-40px);
}

.animate-on-scroll[data-animation="fade-left"] {
  transform: translateX(40px);
}

.animate-on-scroll[data-animation="zoom-in"] {
  transform: scale(0.9);
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

/* ==================== CATEGORY CARDS ==================== */
.category-card {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease;
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(42, 31, 20, 0.2);
}

/* ==================== PRODUCT CARDS ==================== */
.product-card {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease, border-color 0.5s ease;
}

.product-card:hover {
  transform: translateY(-6px);
}

/* ==================== GLASS CARD ==================== */
.glass-card {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.5s ease;
}

.glass-card:hover {
  transform: translateY(-4px);
}

/* ==================== GALLERY ==================== */
.gallery-item {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item:hover {
  transform: translateY(-4px);
}

/* ==================== ADD TO CART BUTTON ==================== */
.add-to-cart-btn {
  position: relative;
  overflow: hidden;
}

.add-to-cart-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(232, 185, 78, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.add-to-cart-btn:active::after {
  width: 200px;
  height: 200px;
}

/* ==================== SLIDER DOTS ==================== */
.slider-dot.active {
  width: 24px;
  border-radius: 4px;
  background-color: #E8B94E;
}

/* ==================== NEWSLETTER GLOW ==================== */
#emailInput:focus {
  box-shadow: 0 0 30px rgba(232, 185, 78, 0.15), 0 0 60px rgba(232, 185, 78, 0.05);
}

/* ==================== LIGHTBOX ==================== */
#lightbox.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

#lightbox img {
  animation: zoomIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

@keyframes zoomIn {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ==================== TOAST ANIMATION ==================== */
.cart-toast-show {
  opacity: 1 !important;
  transform: translate(-50%, 0) !important;
  pointer-events: auto !important;
}

/* ==================== RESPONSIVE ADJUSTMENTS ==================== */
@media (max-width: 640px) {
  .hero-parallax img {
    object-position: center 30%;
  }
  
  .animate-on-scroll[data-animation="fade-right"],
  .animate-on-scroll[data-animation="fade-left"] {
    transform: translateY(40px);
  }
}

/* ==================== ADDITIONAL PREMIUM TOUCHES ==================== */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.btn-glow {
  background-size: 200% auto;
}

.btn-glow:hover {
  animation: shimmer 3s linear infinite;
}

/* Smooth image loading */
img {
  opacity: 0;
  transition: opacity 0.5s ease;
}

img.loaded {
  opacity: 1;
}