/* ==========================================================================
   ASN GOLD — LUXURY STYLING EXTENSIONS & MOBILE RESPONSIVE DESIGN SYSTEM
   Tailwind CSS Extension System & Multi-Breakpoint Engine
   Breakpoints: 320px -> 360px -> 375px -> 390px -> 414px -> 430px -> 768px -> 1024px -> 1280px+
   ========================================================================== */

/* 1. CORE RESETS & BASE */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
  min-width: 320px;
}

/* Defensive Overflow Prevention */
* {
  box-sizing: border-box;
}

img, video, canvas, svg {
  max-width: 100%;
  height: auto;
}

/* 2. FLUID TYPOGRAPHY ENGINE (clamp) */
/* Fluid Headings for seamless scaling between 320px mobile and 1440px+ desktop */
h1, .asn-fluid-h1 {
  font-size: clamp(1.75rem, 4.5vw + 0.75rem, 3.75rem);
  line-height: clamp(1.1, 2vw + 1, 1.2);
  letter-spacing: -0.025em;
  word-wrap: break-word;
}

h2, .asn-fluid-h2 {
  font-size: clamp(1.35rem, 2.75vw + 0.65rem, 2.35rem);
  line-height: clamp(1.18, 1.5vw + 1.05, 1.25);
  letter-spacing: -0.02em;
  word-wrap: break-word;
}

h3, .asn-fluid-h3 {
  font-size: clamp(1.05rem, 1.75vw + 0.6rem, 1.6rem);
  line-height: 1.28;
  letter-spacing: -0.015em;
  word-wrap: break-word;
}

h4, .asn-fluid-h4 {
  font-size: clamp(0.92rem, 1.2vw + 0.55rem, 1.25rem);
  line-height: 1.35;
  word-wrap: break-word;
}

/* Paragraphs & Body Typography */
p {
  line-height: 1.62;
  word-wrap: break-word;
}

.asn-fluid-lead {
  font-size: clamp(0.95rem, 1vw + 0.7rem, 1.15rem);
  line-height: 1.6;
}

/* 3. MOBILE TOUCH TARGET ERGONOMICS (>= 44px) */
@media (max-width: 767.98px) {
  /* Ensure all primary buttons and interactive triggers have at least 44px tap area */
  .asn-touch-target,
  button:not(.asn-subtle-btn),
  input[type="submit"],
  input[type="button"],
  .asn-btn-primary,
  .asn-btn-secondary {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Prevent iOS Safari from zooming in on input focus */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="search"],
  select,
  textarea {
    font-size: 16px !important;
    min-height: 44px;
  }

  textarea {
    min-height: 80px;
  }
}

/* 4. CUSTOM SCROLLBAR & HORIZONTAL HIDE */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #F8FAFC;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #D4AF37;
}

.scrollbar-none {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.scrollbar-none::-webkit-scrollbar {
  display: none;
}

/* 5. LUXURY GOLD GRADIENTS & SHIMMER */
.asn-gold-gradient {
  background: linear-gradient(135deg, #D4AF37 0%, #B8972E 100%);
}

.asn-gold-text-gradient {
  background: linear-gradient(135deg, #B8972E 0%, #D4AF37 50%, #997A1E 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.asn-shimmer-text {
  background: linear-gradient(90deg, #B8972E 0%, #FAF8F0 50%, #D4AF37 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: asnShimmer 4s linear infinite;
}

@keyframes asnShimmer {
  to {
    background-position: 200% center;
  }
}

/* Button Shimmer Sweep Effect */
.asn-btn-shimmer {
  position: relative;
  overflow: hidden;
}

.asn-btn-shimmer::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(
    60deg,
    rgba(255, 255, 255, 0) 20%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0) 80%
  );
  transform: rotate(25deg);
  animation: asnSweep 4s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes asnSweep {
  0% { left: -60%; }
  35%, 100% { left: 140%; }
}

/* 6. GLASSMORPHISM */
.asn-glass {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.asn-glass-dark {
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(212, 175, 55, 0.25);
}

/* 7. SCROLL-SNAP HORIZONTAL CAROUSEL (TOUCH NATIVE) */
.asn-snap-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-behavior: smooth;
}

.asn-snap-carousel::-webkit-scrollbar {
  display: none;
}

.asn-snap-item {
  scroll-snap-align: start;
  flex-shrink: 0;
}

/* 8. DYNAMIC TOUCH/SWIPE MOBILE CAROUSEL COMPONENT (For 3, 5, 7 Card Sets) */
@media (max-width: 767.98px) {
  .asn-mobile-carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
  }

  .asn-mobile-carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-behavior: smooth;
    gap: 16px;
    padding: 8px 4px 16px 4px;
  }

  .asn-mobile-carousel-track::-webkit-scrollbar {
    display: none;
  }

  .asn-mobile-carousel-slide {
    flex: 0 0 calc(100% - 24px);
    max-width: 380px;
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }

  @media (max-width: 374px) {
    .asn-mobile-carousel-slide {
      flex: 0 0 calc(100% - 12px);
    }
  }

  /* Carousel Navigation Dots */
  .asn-carousel-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
  }

  .asn-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background-color: #CBD5E1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    padding: 0;
    min-height: 8px !important;
  }

  .asn-carousel-dot.is-active {
    width: 24px;
    background-color: #D4AF37;
    border-radius: 4px;
  }
}

@media (min-width: 768px) {
  /* On tablet/desktop, mobile carousel track automatically becomes standard grid */
  .asn-mobile-carousel-container {
    width: 100%;
  }

  .asn-mobile-carousel-track {
    display: grid !important;
    overflow: visible !important;
    scroll-snap-type: none !important;
    gap: 1.5rem !important;
    padding: 0 !important;
  }

  .asn-mobile-carousel-slide {
    flex: auto !important;
    max-width: none !important;
    width: auto !important;
  }

  .asn-carousel-dots,
  .asn-carousel-nav-btn {
    display: none !important;
  }
}

/* 9. FLOATING ACTIONS (WHATSAPP, CALL & 3D CATALOGUE) */
.asn-pulse-ring {
  position: absolute;
  inset: -4px;
  border-radius: 9999px;
  border: 2px solid #25D366;
  opacity: 0.8;
  animation: asnPulse 2.4s cubic-bezier(0.25, 1, 0.5, 1) infinite;
  pointer-events: none;
}

.asn-pulse-ring-delay {
  animation-delay: 1.2s;
}

@keyframes asnPulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* Floating Actions Safe Area Positioning on Mobile */
.asn-floating-actions {
  position: fixed;
  right: 1rem;
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

@media (max-width: 374px) {
  .asn-floating-actions {
    right: 0.75rem;
    bottom: 1rem;
    gap: 0.5rem;
  }
}

/* 10. KEN BURNS HERO SLIDER */
.asn-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
  background-size: cover;
  background-position: center;
  transform: scale(1);
}

.asn-hero-slide.is-active {
  opacity: 1;
  animation: asnKenBurns 8s ease-out forwards;
}

@keyframes asnKenBurns {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); }
}

/* 11. REVEAL ON SCROLL */
.asn-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.asn-reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* 12. MODAL LIGHTBOX FOR PDF & FLIPBOOK */
.asn-modal {
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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

/* 13. NARROW MOBILE (320px–360px) FINE-TUNING UTILITIES */
@media (max-width: 374px) {
  .asn-xs-compact-px {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
  .asn-xs-compact-gap {
    gap: 0.5rem !important;
  }
  .asn-xs-text-xs {
    font-size: 0.75rem !important;
    line-height: 1rem !important;
  }
}
