/* ==========================================================================
   WeHome E-Commerce Custom Stylesheet
   Clean White Theme with Forest Green & Slate Accents
   ========================================================================== */

:root {
  --primary: #1b5e3a;
  --primary-hover: #154c2e;
  --primary-light: #e8f5e9;
  --primary-glow: rgba(27, 94, 58, 0.15);
  
  --secondary: #475569;
  --secondary-light: #f1f5f9;
  
  --accent-gold: #d97706;
  --accent-blue: #0284c7;
  --accent-red: #dc2626;

  --bg-white: #ffffff;
  --bg-surface: #f8fafc;
  --bg-subtle: #f1f5f9;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-subtle: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 16px 32px -4px rgba(27, 94, 58, 0.12), 0 6px 12px -2px rgba(15, 23, 42, 0.05);
  --shadow-modal: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Prompt', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-white);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f8fafc;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(34, 197, 94, 0); }
}

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

.animate-fade-in {
  animation: fadeIn 0.35s ease-out forwards;
}

.pulse-call-button {
  animation: pulseGlow 2.5s infinite;
}

/* Glassmorphism Navigation */
.header-sticky {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  transition: all 0.3s ease;
}

.header-scrolled {
  box-shadow: 0 4px 20px -4px rgba(15, 23, 42, 0.08);
}

/* Clean Product Card */
.product-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  position: relative;
}

.product-card:hover {
  transform: translateY(-5px);
  border-color: rgba(27, 94, 58, 0.3);
  box-shadow: var(--shadow-hover);
}

.product-img-wrapper {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 Aspect Ratio */
  background: #ffffff;
  overflow: hidden;
}

.product-img-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

/* Category Filter Tabs */
.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.filter-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-light);
}

.filter-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(27, 94, 58, 0.25);
}

/* Badges */
.badge-material {
  background: #f1f5f9;
  color: #334155;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid #e2e8f0;
}

.badge-material-304 {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #bae6fd;
}

.badge-material-brass {
  background: #fef3c7;
  color: #b45309;
  border-color: #fde68a;
}

.badge-material-zinc {
  background: #f3f4f6;
  color: #374151;
  border-color: #e5e7eb;
}

.badge-promo {
  position: absolute;
  top: 12px;
  left: 12px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 10px rgba(220, 38, 38, 0.3);
  z-index: 10;
}

.badge-popular {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #1b5e3a 0%, #15803d 100%);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 10px rgba(27, 94, 58, 0.3);
  z-index: 10;
}

/* Modals & Drawers */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 860px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-modal);
  transform: scale(0.95);
  transition: all 0.25s ease;
}

.modal-backdrop.open .modal-container {
  transform: scale(1);
}

/* Shopping Cart Drawer */
.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(3px);
  z-index: 110;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.cart-drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  z-index: 120;
  box-shadow: -8px 0 25px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-drawer.open {
  transform: translateX(0);
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 85px;
  right: 20px;
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: #ffffff;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: 360px;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Floating Action Bar on Mobile */
.mobile-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border-color);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 45;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.06);
}

@media (min-width: 768px) {
  .mobile-bottom-bar {
    display: none;
  }
}

/* LINE Green Button */
.btn-line {
  background: #06C755;
  color: #ffffff;
  transition: all 0.2s ease;
}
.btn-line:hover {
  background: #05b14c;
  box-shadow: 0 4px 14px rgba(6, 199, 85, 0.35);
}

/* Phone Green/Navy Button */
.btn-primary {
  background: var(--primary);
  color: #ffffff;
  transition: all 0.2s ease;
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 14px rgba(27, 94, 58, 0.35);
}

/* Feature Icon Box */
.feature-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: all 0.25s ease;
}

.feature-box:hover {
  transform: translateY(-4px);
  border-color: rgba(27, 94, 58, 0.3);
  box-shadow: var(--shadow-card);
}
