/* GenZi Custom Styles & Design System Tokens */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --color-primary: #7FB7E6;
  --color-primary-hover: #5A9FD4;
  --color-primary-light: #F3F8FC;
  --color-border: #DCE8F2;
  --color-text-main: #1F2A37;
  --color-text-muted: #6B7785;
  --color-coral-sale: #E57373;
  --color-sage-success: #38A169;
}

html {
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--color-text-main);
  background-color: #FFFFFF;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  position: relative;
  min-height: 100vh;
}

#app {
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  min-height: 100vh;
}

/* Responsive safety for all media and text on mobile screens */
img, video, canvas, svg {
  max-width: 100%;
  height: auto;
}

p, h1, h2, h3, h4, h5, h6, span, a, label {
  overflow-wrap: break-word;
}

/* iOS Safari Input Auto-Zoom Fix (<16px auto-zooms viewport) */
@media screen and (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="password"],
  input[type="search"],
  input[type="url"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* Touch manipulation to remove 300ms tap delay on mobile */
button, a, input, select, textarea {
  touch-action: manipulation;
}

/* Smooth momentum scrolling for touch devices */
.overflow-y-auto, .overflow-x-auto {
  -webkit-overflow-scrolling: touch;
}

/* Prevent iOS bounce inside modal and drawers */
.modal-scroll-lock {
  overscroll-behavior: contain;
}

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

.font-garamond {
  font-family: 'Cormorant Garamond', Georgia, serif;
}

/* 3:4 Aspect Ratio Container for consistent fashion photos */
.aspect-fashion {
  aspect-ratio: 3 / 4;
}

/* Smooth transitions */
.transition-smooth {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Image zoom hover effect */
.product-card-img-container {
  position: relative;
  overflow: hidden;
}

.product-card-img-container img.primary-img {
  transition: opacity 0.3s ease, transform 0.5s ease;
}

.product-card-img-container img.secondary-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.5s ease;
}

.product-card:hover .product-card-img-container img.primary-img {
  transform: scale(1.04);
}

.product-card:hover .product-card-img-container img.secondary-img {
  opacity: 1;
  transform: scale(1.04);
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: #F3F8FC;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* Toast animations */
@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.animate-slide-up {
  animation: slideInUp 0.3s ease-out forwards;
}

/* Backdrop blur support */
.backdrop-blur-nav {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Hide scrollbar for touch-swipeable horizontal ribbons while maintaining scrollability */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Float WhatsApp Button Ergonomics on Smartphones & Computers */
@media screen and (max-width: 767px) {
  .whatsapp-floating-btn {
    bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px)) !important;
  }
}

@media screen and (max-width: 1023px) {
  body:has(#mobile-sticky-cart-bar) .whatsapp-floating-btn {
    bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* Print Receipt Styles */
@media print {
  header, footer, .no-print, #cart-drawer, .whatsapp-floating-btn {
    display: none !important;
  }
  body {
    background: white !important;
    color: black !important;
  }
  .print-area {
    width: 100% !important;
    margin: 0 !important;
    padding: 20px !important;
  }
}
