/* ==========================================================================
   YUPPIES VIETNAM - DISTRIBUTOR WEBSITE STYLES
   Inspired by https://8153.matbao.website/ & Products from https://www.yuppies.my/
   W3C Valid CSS3 & Responsive Standards
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,600;1,700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css');

/* Custom Fonts & Variables */
:root {
  --color-primary: #a76d50;
  --color-primary-dark: #84523a;
  --color-primary-light: #f5ebe6;
  --color-dark: #242424;
  --color-dark-sub: #404040;
  --color-cream: #f4eee6;
  --color-cream-card: #ffffff;
  --color-cream-darker: #ece5db;
  --color-border: #ede6dd;
  --font-serif: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-sans: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --shadow-subtle: 0 4px 20px -2px rgba(36, 36, 36, 0.05);
  --shadow-hover: 0 16px 32px -4px rgba(167, 109, 80, 0.15);
}

/* Base resets & typography */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  color: var(--color-dark);
  background-color: var(--color-cream);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: clip;
  max-width: 100%;
  font-size: 0.9375rem;
  line-height: 1.65;
}

main {
  overflow-x: clip;
}

.font-serif {
  font-family: var(--font-serif);
}

.font-sans {
  font-family: var(--font-sans);
}

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

/* Color utility classes for consistency */
.bg-leather {
  background-color: var(--color-primary);
}
.bg-leather-dark {
  background-color: var(--color-primary-dark);
}
.bg-cream {
  background-color: var(--color-cream);
}
.text-leather {
  color: var(--color-primary);
}
.border-leather {
  border-color: var(--color-primary);
}
.border-warm {
  border-color: var(--color-border);
}

/* Luxury card effect */
.product-card {
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
}

.product-card:hover {
  transform: translateY(-6px);
  border-color: #d1b89d;
  box-shadow: 0 20px 30px -10px rgba(167, 109, 80, 0.16);
}

.product-card .product-img {
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

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

/* Top ticker bar */
.top-ticker {
  background: #1e1e1e;
  color: #d6d3d1;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
}

/* Sticky Header styling */
header.site-header {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 0 !important;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 50;
  flex-shrink: 0;
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

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

/* Header & Navigation Typography - Explicitly Noto Sans */
header.site-header nav,
header.site-header .nav-link,
header.site-header .dropdown,
#mobile-menu-drawer,
#mobile-menu-drawer nav,
#mobile-menu-drawer a {
  font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* Navigation active line effect */
.nav-link {
  position: relative;
  font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--color-primary);
  transition: width 0.3s ease;
}

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

.nav-link:hover,
.nav-link.active {
  color: var(--color-primary);
}

/* Badge styling */
.badge-pill {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
}

/* Category filter buttons */
.filter-btn {
  transition: all 0.25s ease;
  font-weight: 500;
  cursor: pointer;
}

.filter-btn.active {
  background-color: var(--color-primary) !important;
  color: #ffffff !important;
  border-color: var(--color-primary) !important;
  box-shadow: 0 4px 14px rgba(167, 109, 80, 0.35);
}

.filter-btn:hover:not(.active) {
  background-color: #f7f2ed;
  color: var(--color-primary);
}

/* Ẩn thanh cuộn cho thanh lướt ngang trên mobile (no-scrollbar) */
.no-scrollbar::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
.no-scrollbar {
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}

/* Bottom Sheet / Card lọc từ dưới lên nửa màn hình cho mobile */
.filter-bottomsheet-backdrop {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.filter-bottomsheet-backdrop.open {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.filter-bottomsheet {
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
}
.filter-bottomsheet.open {
  transform: translateY(0) !important;
  pointer-events: auto !important;
}

.drawer-filter-btn.active {
  background-color: #fdf8f4 !important;
  color: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
  font-weight: 700 !important;
}
.drawer-filter-btn.active .check-icon {
  opacity: 1 !important;
}

/* Video Player section */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 ratio */
  height: 0;
  overflow: hidden;
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.video-wrapper video,
.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

::-webkit-scrollbar-track {
  background: #f1ede8;
}

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

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* Modal animation */
.modal-backdrop {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.modal-content {
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.open .modal-content {
  transform: scale(1) translateY(0);
}

/* Drawer Cart / Order List */
.cart-drawer {
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

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

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast-item {
  animation: toastIn 0.35s ease forwards;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

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

/* Back to top button */
#back-to-top {
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

/* Category item floating style (không khung, không nền đen) */
.category-floating-item {
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.category-floating-item:hover {
  transform: translateY(-8px);
}

.category-floating-item .cat-img {
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  filter: drop-shadow(0 15px 25px rgba(36, 36, 36, 0.12));
}

.category-floating-item:hover .cat-img {
  transform: scale(1.06);
  filter: drop-shadow(0 20px 35px rgba(167, 109, 80, 0.22));
}

/* Modals (Search, Auth, Quick View) */
.modal-overlay {
  background-color: rgba(20, 20, 20, 0.65);
  backdrop-filter: blur(4px);
  transition: opacity 0.3s ease;
}

.modal-content-anim {
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Pulse animation for CTA */
@keyframes softPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(167, 109, 80, 0.5);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(167, 109, 80, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(167, 109, 80, 0);
  }
}

.btn-pulse {
  animation: softPulse 2s infinite;
}

/* ==========================================================================
   SCROLL REVEAL & ENTRANCE ANIMATIONS (Hiệu ứng xuất hiện mượt mà các trang)
   ========================================================================== */
.reveal-on-scroll,
.reveal-fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-fade-left {
  opacity: 0;
  transform: translateX(-32px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-fade-right {
  opacity: 0;
  transform: translateX(32px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

/* Revealed States */
.reveal-on-scroll.is-revealed,
.reveal-fade-up.is-revealed,
.reveal-fade-left.is-revealed,
.reveal-fade-right.is-revealed {
  opacity: 1 !important;
  transform: translate(0, 0) !important;
}

.reveal-scale.is-revealed {
  opacity: 1 !important;
  transform: scale(1) !important;
}

/* Gallery & Born Section icon box transitions */
.gallery-item {
  transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -6px rgba(167, 109, 80, 0.18);
}

.born-icon-box {
  transition: transform 0.3s ease;
}

.born-icon-box:hover {
  transform: translateX(4px);
}

/* Before / After Transformation Slider */
.ba-track {
  background-color: rgba(224, 214, 202, 0.55);
  border: 1px solid #dcd0c2;
  padding: 4px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
}

.ba-tab-btn {
  background: transparent;
  color: #6a5e55;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  padding: 8px 18px;
  border-radius: 9999px;
  transition: all 0.25s ease;
}

@media (max-width: 639px) {
  .ba-track {
    display: flex;
    width: 100%;
    padding: 3px;
    gap: 2px;
    justify-content: space-between;
  }
  .ba-tab-btn {
    flex: 1 1 0%;
    font-size: 0.7rem;
    padding: 7px 6px;
    letter-spacing: -0.01em;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .ba-tab-btn i {
    margin-right: 4px !important;
    font-size: 0.65rem !important;
  }
}

.ba-tab-btn:hover {
  color: #242424;
  background-color: rgba(255, 255, 255, 0.7);
}

.ba-tab-btn.active {
  background-color: #a76d50 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(167, 109, 80, 0.3) !important;
}

#ba-slider-container {
  touch-action: pan-y;
  user-select: none;
}

/* ==========================================================================
   VIDEO SHOWCASE & PLAYLIST (Hiệu ứng active + after indicator)
   ========================================================================== */
.video-nav-btn,
.playlist-btn {
  position: relative;
  background-color: rgba(255, 255, 255, 0.05);
  color: #d1d5db;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.875rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  cursor: pointer;
}

.video-nav-btn:hover,
.playlist-btn:hover {
  border-color: rgba(167, 109, 80, 0.65);
  background-color: rgba(255, 255, 255, 0.09);
  transform: translateX(4px);
}

.video-nav-btn .video-nav-num,
.playlist-btn .video-nav-num {
  background-color: rgba(0, 0, 0, 0.45);
  color: #9ca3af;
  transition: all 0.25s ease;
}

.video-nav-btn .video-nav-title,
.playlist-btn .video-nav-title {
  color: #ffffff;
  transition: all 0.25s ease;
}

.video-nav-btn .video-nav-sub,
.playlist-btn .video-nav-sub {
  color: #9ca3af;
  transition: all 0.25s ease;
}

/* ACTIVE STATE */
.video-nav-btn.active,
.playlist-btn.active {
  background: linear-gradient(135deg, #a76d50 0%, #8c573e 100%) !important;
  color: #ffffff !important;
  border-color: #c98865 !important;
  box-shadow: 0 8px 24px -4px rgba(167, 109, 80, 0.55);
  transform: translateX(6px);
}

.video-nav-btn.active .video-nav-num,
.playlist-btn.active .video-nav-num {
  background-color: rgba(0, 0, 0, 0.35) !important;
  color: #ffffff !important;
}

.video-nav-btn.active .video-nav-title,
.playlist-btn.active .video-nav-title {
  color: #ffffff !important;
}

.video-nav-btn.active .video-nav-sub,
.playlist-btn.active .video-nav-sub {
  color: #fceee8 !important;
}

/* HIỆU ỨNG ::after KHI CHỌN (Glowing Play Icon / Active Indicator) */
.video-nav-btn::after,
.playlist-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%) scale(0);
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.22);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
  background-size: 13px 13px;
  background-position: center 50%;
  background-repeat: no-repeat;
  opacity: 0;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.45);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.video-nav-btn.active::after,
.playlist-btn.active::after {
  transform: translateY(-50%) scale(1);
  opacity: 1;
}

/* Print Styles */
@media print {
  .site-header,
  .top-ticker,
  footer,
  #toast-container,
  #back-to-top {
    display: none !important;
  }
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
}
