@tailwind base;
@tailwind components;
@tailwind utilities;

/* =====================================================
   🔧 BASE RESET & GLOBAL
===================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  scroll-behavior: smooth;
}

/* =====================================================
   🧩 TAILWIND COMPONENT EXTENSIONS
===================================================== */

.card-custom {
  @apply bg-white rounded-lg p-6 shadow-xl;
}

.btn-primary {
  @apply text-white font-semibold rounded-full;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  letter-spacing: 0.5px;
  transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
  box-shadow: 0 2px 4px rgba(0,0,0,.15);
  will-change: transform, box-shadow;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 10px 20px rgba(0,0,0,.3);
}

/* =====================================================
   🪟 GLASS / NAVIGATION
===================================================== */

.glass-effect {
  background: rgba(254, 252, 232, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 12px;
}

/* Mobile Menu */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-in-out;
}

.mobile-menu.active {
  max-height: 500px;
}

/* =====================================================
   🛍️ PRODUCT CARD
===================================================== */

.product-card {
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,.1);
  transition: transform .5s cubic-bezier(.23,1,.32,1),
              box-shadow .5s cubic-bezier(.23,1,.32,1);
  will-change: transform, box-shadow;
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 16px 32px rgba(0,0,0,.2);
}

/* =====================================================
   🧾 MODAL (CART & QR)
===================================================== */

.cart-modal,
.whatsapp-qr-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.5);
  visibility: hidden;
  opacity: 0;
  z-index: 1000;
  transition: opacity .3s ease, visibility .3s ease;
}

.cart-modal.active,
.whatsapp-qr-modal.active {
  visibility: visible;
  opacity: 1;
}

.cart-content,
.qr-content {
  transform: scale(.95);
  transition: transform .3s ease;
}

.cart-modal.active .cart-content,
.whatsapp-qr-modal.active .qr-content {
  transform: scale(1);
}

/* =====================================================
   🏞️ HERO & PARALLAX
===================================================== */

.parallax-hero {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.hero-background-image {
  background-image: url('img/hero.jpg');
  background-color: #a0522d;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
  min-height: 400px;
}

.hero-background-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

@media (max-width: 768px) {
  .parallax-hero,
  .hero-background-image {
    background-attachment: scroll;
  }
}

/* =====================================================
   ⬆️ FLOATING BUTTONS
===================================================== */

.scroll-to-top {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 55px;
  height: 55px;
  background: #92400e;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all .4s cubic-bezier(.68,-.55,.265,1.55);
  z-index: 999;
}

.scroll-to-top:hover {
  background: #78350f;
  transform: scale(1.1);
}

.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 20px;
  width: 60px;
  height: 60px;
  background: #25d366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0,0,0,.35);
  transition: all .3s cubic-bezier(.175,.885,.32,1.275);
  z-index: 999;
}

.whatsapp-float:hover {
  transform: scale(1.15) rotate(5deg);
  box-shadow: 0 8px 20px rgba(0,0,0,.5);
}

/* =====================================================
   🎐 ICON & TOAST
===================================================== */

.fan-icon {
  animation: gentle-spin 8s linear infinite;
}

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

.toast-message {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #10b981;
  color: #fff;
  padding: 12px 24px;
  border-radius: 25px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s ease, transform .4s ease;
  z-index: 1001;
}

.toast-message.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ================= ANIMATION ================= */

.hero-logo {
  width: 150px;
  border-radius: 18px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.45);
  animation: logoFloat 4s ease-in-out infinite,
             logoFade 1.2s ease-out;
}

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

@keyframes heroLogoFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.hero-background-image {
  background-image: url("img/firrklaf.png"); /* ganti sesuai nama file */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

/* overlay biar teks tetap jelas */
.hero-background-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-logo {
  width: 140px;
  animation: float 4s ease-in-out infinite;
}

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