@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400;1,500;1,600&display=swap');

/* ─── Base ─── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  background-color: #fafaf8;
  color: #1a1a18;
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f0efea;
}
::-webkit-scrollbar-thumb {
  background: #9a9a94;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #6b6b66;
}

/* ─── Marquee ─── */
@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}
.animate-marquee {
  display: flex;
  animation: marquee 30s linear infinite;
  white-space: nowrap;
}
.animate-marquee:hover {
  animation-play-state: paused;
}

/* ─── Scroll Reveal ─── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Transitions ─── */
.transition-all {
  transition: all 0.15s ease;
}

/* ─── Fade/Slide Animations ─── */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes slideRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}
@keyframes slideLeft {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease forwards;
}
.animate-slide-down {
  animation: slideDown 0.2s ease forwards;
}
.animate-slide-right {
  animation: slideRight 0.3s ease-out forwards;
}

/* ─── Hero Slider ─── */
.hero-slide {
  position: absolute;
  inset: 0;
  transition: opacity 0.7s ease;
}
.hero-slide.active {
  opacity: 1;
  z-index: 1;
}
.hero-slide.inactive {
  opacity: 0;
  z-index: 0;
}

/* ─── Product Card ─── */
.product-card .quick-add {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  padding: 10px 0;
  background: #fff;
  color: #1a1a18;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.3s ease;
}
.product-card:hover .quick-add {
  opacity: 1;
  transform: translateY(0);
}
.product-card:hover .quick-add:hover {
  background: #5a6b4e;
  color: #fff;
}
.product-card .prod-img {
  transition: transform 0.5s ease;
  background: #e8ede5;
}
.product-card:hover .prod-img {
  transform: scale(1.05);
}

/* ─── Banner Hover ─── */
.banner-item .banner-img {
  transition: transform 0.7s ease;
  background: #e8ede5;
}
.banner-item:hover .banner-img {
  transform: scale(1.05);
}

/* ─── Loading skeleton shimmer (also defined inline on grid pages) ─── */
@keyframes skel-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skel-shimmer {
  background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
  background-size: 200%;
  animation: skel-shimmer 1.4s linear infinite;
}
/* Logo placeholder shown while the store loads (size set inline per slot). */
.logo-shimmer {
  display: inline-block;
  border-radius: 6px;
  vertical-align: middle;
  background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
  background-size: 200%;
  animation: skel-shimmer 1.4s linear infinite;
}

/* ─── Cart Drawer ─── */
.cart-drawer,
#cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 100%;
  max-width: 420px;
  background: #fff;
  box-shadow: -4px 0 32px rgba(0, 0, 0, 0.12);
  z-index: 600;
  transform: translateX(100%);
  transition: transform 0.3s ease-out;
  display: flex;
  flex-direction: column;
}
#cart-drawer.open {
  transform: translateX(0);
}
#cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}
#cart-drawer-footer {
  padding: 1.5rem;
  border-top: 1px solid #ebeae5;
}
#cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 590;
  display: none;
  animation: fadeIn 0.3s ease;
}
#cart-backdrop.open {
  display: block;
}

/* ─── Mobile Menu ─── */
#mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 550;
  display: none;
}
#mobile-menu.open {
  display: block;
}
#mobile-menu-panel {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 85%;
  max-width: 400px;
  background: #fff;
  box-shadow: -4px 0 32px rgba(0, 0, 0, 0.12);
  animation: slideRight 0.3s ease-out forwards;
}

/* ─── Search Bar ─── */
#search-bar {
  display: none;
  border-top: 1px solid #ebeae5;
  animation: slideDown 0.2s ease;
}
#search-bar.open {
  display: block;
}

/* ─── Dropdown ─── */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  width: 192px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border: 1px solid #ebeae5;
  padding: 8px 0;
  z-index: 100;
  animation: slideDown 0.2s ease;
}
.dropdown-trigger:hover .dropdown-menu {
  display: block;
}

/* ─── Dot slider ─── */
.dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
}
.dot.active {
  width: 24px;
  background: #fff;
}

/* ─── Skincare Steps ─── */
.step-item {
  cursor: pointer;
  padding: 20px;
  border-radius: 12px;
  transition: all 0.2s ease;
}
.step-item.active {
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.step-item:not(.active):hover {
  background: rgba(255, 255, 255, 0.5);
}
.step-desc {
  display: none;
}
.step-item.active .step-desc {
  display: block;
  animation: slideDown 0.3s ease;
}
.step-img {
  transition: all 0.5s ease;
}

/* ─── FAQs Accordion ─── */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.3s ease,
    opacity 0.3s ease;
  opacity: 0;
}
.faq-answer.open {
  max-height: 500px;
  opacity: 1;
}
.faq-chevron {
  transition: transform 0.3s ease;
}
.faq-chevron.open {
  transform: rotate(90deg);
}

/* ─── Tabs ─── */
.tab-btn {
  position: relative;
  padding-bottom: 16px;
}
.tab-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #5a6b4e;
  transform: scaleX(0);
  transition: transform 0.2s ease;
}
.tab-btn.active::after {
  transform: scaleX(1);
}

/* ─── Color Swatch Selection ─── */
.color-swatch.selected {
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px #5a6b4e;
}
.size-btn.selected {
  background: #5a6b4e;
  color: #fff;
  border-color: #5a6b4e;
}

/* ─── Shipping Radio ─── */
.shipping-label {
  cursor: pointer;
}
.shipping-label.selected {
  border-color: #5a6b4e;
  background: #e8ede5;
}

/* ─── Toast ─── */
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1a1a18;
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 9000;
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.3s ease;
  pointer-events: none;
}
#toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Category card hover ─── */
.cat-card img {
  transition: transform 0.5s ease;
}
.cat-card:hover img {
  transform: scale(1.05);
}
.cat-card .cat-label {
  transition: all 0.2s ease;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #1a1a18;
}
.cat-card:hover .cat-label {
  background: #5a6b4e;
  color: #fff;
}

/* ─── Wishlist btn ─── */
.wishlist-btn.active {
  background: #c0392b;
  border-color: #c0392b;
  color: #fff;
}

/* ─── Line clamp ─── */
.line-clamp-1 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}
.line-clamp-2 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ─── Responsive ─── */
@media (max-width: 1023px) {
  .desktop-nav {
    display: none;
  }
}
@media (min-width: 1024px) {
  .mobile-menu-btn {
    display: none;
  }
}
