@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700;800&family=Cormorant+Garamond:wght@400;500;600;700&display=swap');

:root{
  --pink:#E89CC8;
  --pink-dark:#D87BB5;
  --purple:#B88DD8;
  --purple-dark:#9B6EC7;
  --blue:#A8D8FF;
  --teal:#9FECF0;
  --white:#FFFFFF;
  --glass: rgba(255,255,255,0.22);
  --glass-strong: rgba(255,255,255,0.35);
  --shadow: 0 8px 32px rgba(139, 92, 246, 0.25);
  --glow: 0 0 20px rgba(255, 181, 216, 0.5);
  --radius:20px;
  
  /* Accessibility & Mobile Optimizations */
  --focus-color: #FFE4E1;
  --focus-shadow: 0 0 0 3px rgba(255, 228, 225, 0.6);
  --text-contrast: rgba(0, 0, 0, 0.1);
  --min-touch-size: 44px;
  --content-max-width: 1200px;
  
  /* Typography Scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
  --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.625vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --text-3xl: clamp(2rem, 1.7rem + 1.5vw, 3rem);
}

*{
  box-sizing:border-box;
  margin:0;
  padding:0;
}

html,body{
  height:100%;
  overflow-x:hidden;
}

body{
  margin:0;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: var(--text-base);
  line-height: 1.6;
  background: linear-gradient(135deg, #E89CC8 0%, #D899E6 30%, #B88DD8 60%, #9BB8E6 100%);
  color:var(--white);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  position:relative;
  min-height:100vh;
  text-shadow: 0 1px 3px rgba(0,0,0,0.15);
  
  /* Accessibility improvements */
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

/* Magical sparkle overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 20% 30%, white, transparent),
    radial-gradient(2px 2px at 60% 70%, rgba(255,255,255,0.9), transparent),
    radial-gradient(1px 1px at 50% 50%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 80% 10%, white, transparent),
    radial-gradient(2px 2px at 90% 60%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 33% 80%, white, transparent),
    radial-gradient(1px 1px at 15% 55%, rgba(255,255,255,0.95), transparent);
  background-size: 200% 200%;
  animation: sparkle 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
  opacity: 0.7;
}

@keyframes sparkle {
  0%, 100% { 
    opacity: 0.7;
    transform: scale(1);
  }
  50% { 
    opacity: 1;
    transform: scale(1.1);
  }
}

/* Floating sparkles animation */
.sparkle {
  position: fixed;
  width: 3px;
  height: 3px;
  background: rgba(255, 255, 255, 0.7);  /* Slightly transparent */
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;  /* Background layer - behind all content */
  box-shadow: 0 0 8px rgba(255,255,255,0.5);
  /* Animation applied via inline style in JavaScript */
}

/* ===== ACCESSIBILITY ENHANCEMENTS ===== */

/* Skip link for screen readers */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--white);
  color: var(--purple);
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 9999;
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 6px;
}

/* Focus management */
*:focus {
  outline: none;
  box-shadow: var(--focus-shadow);
  border-radius: 4px;
}

/* Enhanced focus for interactive elements */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus,
[tabindex]:focus {
  outline: 3px solid var(--focus-color);
  outline-offset: 2px;
  box-shadow: var(--focus-shadow), var(--shadow);
}

/* Screen reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --glass: rgba(255,255,255,0.5);
    --glass-strong: rgba(255,255,255,0.7);
  }
  
  body {
    text-shadow: 0 0 1px rgba(0,0,0,0.8);
  }
  
  .btn {
    border: 2px solid rgba(255,255,255,0.8);
  }
}

/* ===== KEYBOARD NAVIGATION ENHANCEMENTS ===== */

/* Focus indicators for keyboard navigation */
.keyboard-focus *:focus {
  outline: 3px solid var(--focus-color);
  outline-offset: 3px;
}

/* Skip to main content improvements */
.skip-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  top: -100px;
  left: 0;
  z-index: 9999;
}

.skip-nav li {
  margin: 0;
  padding: 0;
}

.skip-nav a {
  background: var(--white);
  color: var(--purple);
  padding: 0.5rem 1rem;
  text-decoration: none;
  border-radius: 0 0 4px 0;
  font-weight: 600;
  display: block;
  transition: top 0.3s ease;
}

.skip-nav a:focus {
  position: absolute;
  top: 100px;
}

/* Enhanced keyboard navigation for interactive elements */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus-color);
  outline-offset: 2px;
  box-shadow: var(--focus-shadow), var(--shadow);
}

/* Remove focus outline for mouse users */
button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
input:focus:not(:focus-visible),
select:focus:not(:focus-visible),
textarea:focus:not(:focus-visible),
[tabindex]:focus:not(:focus-visible) {
  outline: none;
  box-shadow: var(--shadow);
}

/* Improve focus for cards and interactive containers */
.product-card:focus-within {
  outline: 2px solid var(--focus-color);
  outline-offset: 2px;
}

/* ===== ENHANCED SEMANTIC ELEMENTS ===== */

/* Better heading hierarchy visual indicators */
h1::before { content: ""; /* Main heading */ }
h2::before { content: ""; /* Section heading */ }
h3::before { content: ""; /* Subsection heading */ }

/* Status and alert messages */
.alert {
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
  border-left: 4px solid;
  background: rgba(255,255,255,0.1);
}

.alert-success {
  border-color: #90EE90;
  color: #90EE90;
}

.alert-warning {
  border-color: #FFD700;
  color: #FFD700;
}

.alert-error {
  border-color: #ffcccb;
  color: #ffcccb;
}

.alert-info {
  border-color: var(--blue);
  color: var(--blue);
}

/* Live region for dynamic content updates */
.live-region {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Better table accessibility */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
}

th, td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

th {
  font-weight: 600;
  background: rgba(255,255,255,0.1);
}

/* Caption styling for tables */
caption {
  font-weight: 600;
  margin-bottom: 0.5rem;
  text-align: left;
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */

/* Image performance optimizations */
img {
  height: auto;
  max-width: 100%;
  display: block;
}

/* Optimize font loading - add to existing font imports */
/* Note: loading and decoding attributes should be added to HTML img tags */

/* Font display optimization */
body {
  font-display: swap;
}

/* Reduce layout shift */
.product-card img {
  aspect-ratio: 3/4;
  object-fit: cover;
}

/* Optimize animations for performance */
.sparkle,
.product-card,
.btn {
  will-change: auto;
}

/* Optimize transforms */
.reveal,
.reveal-left,
.reveal-right,
.reveal-scale {
  contain: layout style paint;
}

/* ===== MOBILE-FIRST RESPONSIVE DESIGN ===== */

/* Touch-friendly sizing */
.btn,
button,
a[role="button"],
input[type="button"],
input[type="submit"] {
  min-height: var(--min-touch-size);
  min-width: var(--min-touch-size);
  padding: 0.75rem 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

/* Improved text sizing and spacing */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 600;
  margin-bottom: 0.75em;
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-base); }
h6 { font-size: var(--text-sm); }

p, li {
  font-size: var(--text-base);
  line-height: 1.6;
  margin-bottom: 1em;
}

/* Better link visibility */
a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.6);
  text-underline-offset: 3px;
  transition: all 0.2s ease;
}

a:hover, a:focus {
  text-decoration-color: var(--focus-color);
  text-shadow: 0 0 8px rgba(255,255,255,0.5);
}

/* Spotlight effects from bottom */
.spotlight {
  position: fixed;
  bottom: 0;
  width: 2px;
  height: 0;
  background: linear-gradient(
    to top,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(255, 255, 255, 0.15) 30%,
    rgba(255, 255, 255, 0.05) 60%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 1; /* Background layer */
  transform-origin: bottom center;
  animation: spotlightBeam 4s ease-in-out infinite;
  filter: blur(2px);
}

.spotlight::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 60vh;
  background: radial-gradient(
    ellipse at bottom,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0.1) 30%,
    transparent 70%
  );
  filter: blur(30px);
}

@keyframes spotlightBeam {
  0%, 100% {
    opacity: 0.4;
    transform: scaleY(0.8) rotate(-2deg);
  }
  50% {
    opacity: 0.7;
    transform: scaleY(1.2) rotate(2deg);
  }
}

/* Neon Castle Effect */
.neon-castle {
  position: fixed;
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%);
  width: 50vw;
  max-width: 800px;
  height: 45vh;
  pointer-events: none;
  z-index: 1;
  opacity: 0.6;
}

.neon-castle svg {
  width: 100%;
  height: 100%;
}

.neon-line {
  fill: none;
  stroke: #E6B5FF;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px #E6B5FF) 
          drop-shadow(0 0 15px #FFB5D8) 
          drop-shadow(0 0 25px rgba(230, 181, 255, 0.5));
  animation: neonPulse 3s ease-in-out infinite;
}

.neon-dot {
  fill: #FFE5B5;
  filter: drop-shadow(0 0 6px #FFE5B5) 
          drop-shadow(0 0 12px #FFB5D8);
  animation: neonPulse 2.5s ease-in-out infinite;
}

.neon-star {
  fill: #B5E5FF;
  stroke: none;
  filter: drop-shadow(0 0 8px #B5E5FF) 
          drop-shadow(0 0 15px rgba(181, 229, 255, 0.8));
  animation: twinkle 2s ease-in-out infinite;
}

@keyframes neonPulse {
  0%, 100% {
    opacity: 0.8;
    filter: drop-shadow(0 0 8px #E6B5FF) 
            drop-shadow(0 0 15px #FFB5D8) 
            drop-shadow(0 0 25px rgba(230, 181, 255, 0.5));
  }
  50% {
    opacity: 1;
    filter: drop-shadow(0 0 12px #E6B5FF) 
            drop-shadow(0 0 20px #FFB5D8) 
            drop-shadow(0 0 35px rgba(230, 181, 255, 0.7));
  }
}

@keyframes twinkle {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* Fairy theme glow animations */
@keyframes fairyGlow {
  0%, 100% {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15), 
                0 0 20px rgba(230, 181, 255, 0.4),
                0 0 30px rgba(255, 181, 216, 0.3);
  }
  50% {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15), 
                0 0 30px rgba(230, 181, 255, 0.6),
                0 0 45px rgba(255, 181, 216, 0.5),
                0 0 60px rgba(181, 229, 255, 0.3);
  }
}

@keyframes fairyGlowHover {
  0%, 100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.15);
  }
}

@keyframes fairyTextGlow {
  0%, 100% {
    text-shadow: 3px 3px 6px rgba(0,0,0,0.2),
                 0 0 30px rgba(230, 181, 255, 0.6),
                 0 0 50px rgba(255, 181, 216, 0.4),
                 0 0 70px rgba(181, 229, 255, 0.3);
  }
  50% {
    text-shadow: 3px 3px 6px rgba(0,0,0,0.2),
                 0 0 40px rgba(230, 181, 255, 0.8),
                 0 0 65px rgba(255, 181, 216, 0.6),
                 0 0 90px rgba(181, 229, 255, 0.5);
  }
}

/* Fallback animation for sparkles (overridden by JS) */
@keyframes float {
  0%, 100% { 
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) translateX(20px) scale(0.5);
    opacity: 0;
  }
}

/* Scroll-triggered reveal animations - instant visibility */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 1;
  transform: translateX(0);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 1;
  transform: translateX(0);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 1;
  transform: scale(1);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.active {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delay for multiple items */
.reveal:nth-child(1) { transition-delay: 0.1s; }
.reveal:nth-child(2) { transition-delay: 0.2s; }
.reveal:nth-child(3) { transition-delay: 0.3s; }
.reveal:nth-child(4) { transition-delay: 0.4s; }
.reveal:nth-child(5) { transition-delay: 0.5s; }

.skip-link{
  position:absolute;
  left:-9999px;
  top:auto;
  width:1px;
  height:1px;
  overflow:hidden;
}
.skip-link:focus{
  left:1rem;
  top:1rem;
  width:auto;
  height:auto;
  background:var(--glass-strong);
  backdrop-filter:blur(10px);
  padding:0.8rem 1.2rem;
  border-radius:12px;
  color:var(--white);
  z-index:9999;
  border:1px solid rgba(255,255,255,0.3);
}

/* focus outlines */
a:focus,button:focus,input:focus,textarea:focus{
  outline:3px solid rgba(255,255,255,0.5);
  outline-offset:3px;
}

.container{
  max-width:1200px;
  margin:0 auto;
  padding:1.5rem 2rem;
  position:relative;
  z-index:2;
}

/* Tighter spacing for professional book site */
.container.hero{
  padding:2rem 2rem 1rem 2rem;
}

.container.features,
.container.testimonials,
.container.buy-section{
  padding:1.5rem 2rem;
  margin-top:1rem;
}

/* About page specific spacing */
.container.about{
  padding:1.5rem 2rem 2rem 2rem;
}

.site-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:1.5rem 2rem;
  background:var(--glass);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
  border-bottom:1px solid rgba(255,255,255,0.2);
  position:relative;
  z-index:100;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1),
              0 0 25px rgba(230, 181, 255, 0.2),
              0 0 40px rgba(255, 181, 216, 0.15);
}

.brand{
  display:flex;
  gap:1rem;
  align-items:center;
}

.logo{
  width:72px;
  height:72px;
  border-radius:50%;
  box-shadow:var(--glow);
  background:var(--glass-strong);
  backdrop-filter:blur(10px);
  padding:8px;
  border:3px solid rgba(255,255,255,0.4);
  transition:transform 0.3s ease, box-shadow 0.3s ease;
  object-fit:cover;
  object-position:center bottom;
}

.logo:hover{
  transform:scale(1.1) rotate(5deg);
  box-shadow:0 0 30px rgba(255, 181, 216, 0.6);
}

.brand h1{
  margin:0;
  font-size:1.8rem;
  font-family: 'Cinzel', serif;
  font-weight:700;
  color:var(--white);
  text-shadow:2px 2px 4px rgba(0,0,0,0.1),
              0 0 20px rgba(230, 181, 255, 0.5),
              0 0 35px rgba(255, 181, 216, 0.3);
  letter-spacing:2px;
}

.tag{
  margin:0.2rem 0 0 0;
  color:rgba(255,255,255,0.95);
  font-size:0.95rem;
  font-style:italic;
  font-weight:500;
}

.nav{
  display:flex;
  gap:1.5rem;
  align-items:center;
}

.nav a{
  color:var(--white);
  text-decoration:none;
  font-size:1.1rem;
  font-weight:600;
  position:relative;
  padding:0.4rem 0.8rem;
  transition:all 0.3s ease;
  text-shadow:1px 1px 2px rgba(0,0,0,0.1);
  border-radius: 4px;
  min-height: var(--min-touch-size);
  display: flex;
  align-items: center;
}

/* Enhanced keyboard navigation for menu items */
.nav a:focus-visible {
  outline: 2px solid var(--focus-color);
  outline-offset: 2px;
  background: rgba(255,255,255,0.15);
}

/* Current page indicator */
.nav a[aria-current="page"] {
  background: rgba(255,255,255,0.2);
  font-weight: 700;
}

.nav a::after{
  content:'';
  position:absolute;
  bottom:0;
  left:50%;
  width:0;
  height:2px;
  background:var(--white);
  transition:width 0.3s ease, left 0.3s ease;
  box-shadow:0 0 8px rgba(255,255,255,0.6);
}

.nav a:hover{
  color:var(--white);
  transform:translateY(-2px);
}

.nav a:hover::after{
  width:100%;
  left:0;
}


.hero{
  display:flex;
  gap:2.5rem;
  align-items:center;
  padding:1.5rem 0 1rem 0;
  position:relative;
}

.hero-left{
  flex:1;
  animation:fadeInUp 1s ease;
}

.hero-right{
  flex:0 0 380px;
  text-align:center;
  animation:fadeInUp 1.2s ease;
}

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

.cover{
  width:100%;
  max-width:320px;
  border-radius:20px;
  box-shadow:0 15px 50px rgba(0,0,0,0.2), var(--glow);
  border:3px solid rgba(255,255,255,0.3);
  transition:transform 0.4s ease, box-shadow 0.4s ease;
}

.cover:hover{
  transform:scale(1.05) rotate(-2deg);
  box-shadow:0 20px 60px rgba(0,0,0,0.25), 0 0 40px rgba(255, 181, 216, 0.6);
}

.eyebrow{
  color:var(--white);
  margin:0 0 0.5rem 0;
  font-size:1.1rem;
  text-transform:uppercase;
  letter-spacing:3px;
  font-weight:600;
  opacity:0.9;
}

.title{
  font-size:3rem;
  margin:0.3rem 0 0.5rem 0;
  font-family: 'Cinzel', serif;
  font-weight:700;
  color:var(--white);
  text-shadow:3px 3px 6px rgba(0,0,0,0.2),
              0 0 30px rgba(230, 181, 255, 0.6),
              0 0 50px rgba(255, 181, 216, 0.4),
              0 0 70px rgba(181, 229, 255, 0.3);
  line-height:1.1;
  animation: fairyTextGlow 3s ease-in-out infinite;
}

.lead{
  color:rgba(255,255,255,0.98);
  font-size:1.15rem;
  line-height:1.7;
  margin:0.8rem 0;
  font-weight:500;
}

.cta-row{
  display:flex;
  gap:1rem;
  margin-top:1.5rem;
  flex-wrap:wrap;
}

.btn{
  display:inline-flex;
  align-items: center;
  justify-content: center;
  padding:0.9rem 2rem;
  min-height: var(--min-touch-size);
  border-radius:50px;
  border:2px solid transparent;
  background:transparent;
  cursor:pointer;
  font-size:var(--text-lg);
  font-family: 'Cormorant Garamond', serif;
  font-weight:600;
  text-decoration:none;
  transition:all 0.3s ease;
  position:relative;
  overflow:hidden;
  color:var(--white);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn::before {
  content:'';
  position:absolute;
  top:50%;
  left:50%;
  width:0;
  height:0;
  border-radius:50%;
  background:rgba(255,255,255,0.2);
  transform:translate(-50%, -50%);
  transition:width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
  width:300px;
  height:300px;
}

.btn.primary{
  background:linear-gradient(135deg, rgba(255,255,255,0.3), rgba(255,255,255,0.1));
  backdrop-filter:blur(10px);
  border:2px solid rgba(255,255,255,0.4);
  box-shadow:0 8px 25px rgba(0,0,0,0.15), 
             0 0 20px rgba(230, 181, 255, 0.4),
             0 0 30px rgba(255, 181, 216, 0.3);
  position:relative;
  z-index:1;
  animation: fairyGlow 2s ease-in-out infinite;
}

.btn.primary:hover{
  transform:translateY(-3px);
  box-shadow:0 12px 35px rgba(0,0,0,0.2), 
             0 0 35px rgba(230, 181, 255, 0.7),
             0 0 50px rgba(255, 181, 216, 0.6),
             0 0 70px rgba(181, 229, 255, 0.4);
  border-color:rgba(255,255,255,0.6);
  animation: fairyGlowHover 1s ease-in-out infinite;
}

.btn.ghost{
  background:transparent;
  border:2px solid rgba(255,255,255,0.3);
  backdrop-filter:blur(5px);
}

.btn.ghost:hover{
  background:rgba(255,255,255,0.15);
  border-color:rgba(255,255,255,0.5);
  transform:translateY(-3px);
}

/* Prevent button hover when entire card is clickable */
.product-card[onclick] .btn.ghost{
  pointer-events:none;
}


.features{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:1.5rem;
  margin-top:2rem;
}

.features article{
  background:var(--glass);
  backdrop-filter:blur(20px);
  padding:1.5rem;
  border-radius:var(--radius);
  border:1px solid rgba(255,255,255,0.25);
  box-shadow:var(--shadow);
  transition:all 0.4s ease;
  text-align:center;
}

.features article:hover{
  transform:translateY(-8px) scale(1.02);
  box-shadow:0 15px 45px rgba(0,0,0,0.2), var(--glow);
  border-color:rgba(255,255,255,0.4);
}

.features h4{
  margin:0 0 0.8rem 0;
  font-family: 'Cinzel', serif;
  font-size:1.4rem;
  color:var(--white);
  font-weight:600;
}

.features p{
  color:rgba(255,255,255,0.95);
  line-height:1.6;
  font-size:1rem;
  font-weight:500;
}

.products-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:1.5rem;
  margin-top:1.5rem;
}

.product-card{
  background:var(--glass);
  backdrop-filter:blur(20px);
  padding:1.25rem;
  border-radius:var(--radius);
  border:1px solid rgba(255,255,255,0.25);
  box-shadow:var(--shadow);
  transition:all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position:relative;
  overflow:hidden;
}

.product-card::before{
  content:'✨';
  position:absolute;
  top:10px;
  right:10px;
  font-size:1.5rem;
  opacity:0;
  transform:scale(0);
  transition:all 0.3s ease;
}

.product-card:hover::before{
  opacity:1;
  transform:scale(1) rotate(20deg);
}

.product-card:hover{
  transform:translateY(-12px) scale(1.03);
  box-shadow:0 20px 60px rgba(0,0,0,0.25), 
             0 0 30px rgba(230, 181, 255, 0.5),
             0 0 50px rgba(255, 181, 216, 0.3);
  border-color:rgba(255,255,255,0.4);
}

.product-card img{
  width:100%;
  height:280px;
  object-fit:cover;
  object-position:center;
  border-radius:12px;
  box-shadow:0 5px 20px rgba(0,0,0,0.15);
  transition:transform 0.3s ease;
}

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

.product-card[onclick]{
  cursor:pointer;
  user-select:none;
}

.product-card[onclick]:active{
  transform:translateY(-8px) scale(1.01);
}

.product-card .meta{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding-top:1rem;
  color:var(--white);
}

.product-card h3{
  font-family: 'Cinzel', serif;
  font-size:1.3rem;
  margin:0.8rem 0 0.5rem 0;
  color:var(--white);
  font-weight:600;
}

.product-card p{
  color:rgba(255,255,255,0.95);
  line-height:1.6;
  font-weight:500;
}

.product-card .price{
  font-size:1.2rem;
  font-weight:700;
  color:var(--white);
}

.product-page{
  max-width:1200px;
  margin:2rem auto;
  padding:0 1rem;
}

.product-detail{
  /* This container will hold the magazine layout generated by JS */
  width: 100%;
}

.product-detail img{
  width:100%;
  border-radius:15px;
  box-shadow:0 10px 40px rgba(0,0,0,0.2);
  margin-bottom:1rem;
}

.product-detail h2{
  margin-top:0;
  font-family: 'Cinzel', serif;
  color:var(--white);
  font-size:2.2rem;
  font-weight:700;
}

.product-detail p{
  color:rgba(255,255,255,0.98);
  line-height:1.8;
  font-size:1.1rem;
  font-weight:500;
}

/* Magazine-style product layout */
.product-magazine-layout {
  display: flex;
  gap: 1.5rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  background: var(--glass);
  backdrop-filter: blur(20px);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: var(--shadow);
}

.product-image-column {
  flex: 0 0 50%;
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.03);
  border-radius: 15px;
  padding: 1rem;
  border: 1px solid rgba(255,255,255,0.15);
}

#image-view-container {
  width: 100%;
  height: 70vh;
  position: relative;
  background: rgba(255,255,255,0.08);
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.product-image-column #main-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 15px;
  box-shadow: 0 15px 50px rgba(0,0,0,0.2);
  display: block;
}

.pdf-viewer {
  background: rgba(255,255,255,0.95);
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 15px 50px rgba(0,0,0,0.2);
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.pdf-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  flex-shrink: 0;
}

.pdf-controls h4 {
  color: #8b7a86;
  margin: 0;
}

#pdf-scroll-container {
  overflow-y: scroll;
  overflow-x: hidden;
  flex: 1;
  border: 1px solid rgba(139,122,134,0.2);
  border-radius: 8px;
  background: #fff;
  padding: 1rem;
}

/* Force scrollbar to always show */
#pdf-scroll-container::-webkit-scrollbar {
  width: 12px;
}

#pdf-scroll-container::-webkit-scrollbar-track {
  background: rgba(139,122,134,0.1);
  border-radius: 6px;
}

#pdf-scroll-container::-webkit-scrollbar-thumb {
  background: rgba(139,122,134,0.4);
  border-radius: 6px;
}

#pdf-scroll-container::-webkit-scrollbar-thumb:hover {
  background: rgba(139,122,134,0.6);
}

.product-thumbnails {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.product-content-column {
  flex: 0 0 50%;
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.03);
  border-radius: 15px;
  padding: 1rem;
  border: 1px solid rgba(255,255,255,0.15);
}

.product-content-column h2 {
  margin-top: 0;
  font-family: 'Cinzel', serif;
  color: var(--white);
  font-size: 2.2rem;
  font-weight: 700;
}

.product-content-column .lead {
  line-height: 1.8;
  margin: 1rem 0 1.5rem 0;
  font-size: 1.1rem;
}

.product-meta {
  margin: 0.5rem 0;
  font-size: 0.95rem;
  opacity: 0.95;
}

.product-price {
  font-size: 2rem;
  font-weight: 600;
  margin: 1.5rem 0;
}

.product-perks {
  font-size: 0.95rem;
  opacity: 0.95;
  margin: 1.5rem 0;
}

.product-reviews {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.2);
}

.product-reviews h4 {
  margin: 0 0 1rem 0;
}

.reviews-list {
  display: grid;
  gap: 1rem;
}

/* Enhanced product page element boxes */
.variant-selector {
  background: rgba(255,255,255,0.08);
  border-radius: 15px;
  padding: 1.5rem;
  border: 1px solid rgba(255,255,255,0.2);
  margin: 1.5rem 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.variant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.variant-card {
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 12px;
  padding: 0.75rem;
  transition: all 0.3s ease;
  background: rgba(255,255,255,0.05);
  height: 100%;
  transform: translateY(0);
  cursor: pointer;
}

.variant-card:hover {
  border-color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.1);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.variant-option input:checked + .variant-card {
  border-color: #FFD166;
  background: rgba(255,209,102,0.15);
  box-shadow: 0 0 20px rgba(255,209,102,0.4);
}

.product-price {
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.15);
  margin: 1.5rem 0;
}

.product-reviews {
  background: rgba(255,255,255,0.05);
  border-radius: 15px;
  padding: 1.5rem;
  border: 1px solid rgba(255,255,255,0.15);
  margin-top: 2rem;
}

.comment {
  background: rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255,255,255,0.1);
}



.cart-contents{
  background:var(--glass);
  backdrop-filter:blur(20px);
  border-radius:var(--radius);
  padding:2rem;
  border:1px solid rgba(255,255,255,0.25);
  box-shadow:var(--shadow);
}

.cart-item{
  display:flex;
  gap:1.5rem;
  align-items:center;
  padding:1rem 0;
  border-bottom:1px solid rgba(255,255,255,0.2);
  transition:all 0.3s ease;
}

.cart-item:hover{
  transform:translateX(10px);
  background:rgba(255,255,255,0.1);
  padding-left:1rem;
  border-radius:10px;
}

.cart-item img{
  width:90px;
  border-radius:10px;
  box-shadow:0 5px 15px rgba(0,0,0,0.15);
}

.cart-actions{
  display:flex;
  gap:1rem;
  align-items:center;
  margin-top:1.5rem;
  flex-wrap:wrap;
}

h2, h3, h4, h5{
  font-family: 'Cinzel', serif;
  color:var(--white);
  text-shadow:2px 2px 4px rgba(0,0,0,0.1),
              0 0 20px rgba(230, 181, 255, 0.4),
              0 0 35px rgba(255, 181, 216, 0.3);
}

h2{
  font-size:2.5rem;
  margin-bottom:1rem;
  font-weight:700;
  animation: fairyTextGlow 3.5s ease-in-out infinite;
}

h3{
  font-size:1.8rem;
  font-weight:600;
}

h4 {
  font-weight:600;
  text-shadow:2px 2px 4px rgba(0,0,0,0.1),
              0 0 15px rgba(230, 181, 255, 0.35),
              0 0 25px rgba(255, 181, 216, 0.25);
}

.footer-grid{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:1.5rem;
}

.site-footer{
  background:var(--glass);
  backdrop-filter:blur(20px);
  padding:2rem 0 1.5rem 0;
  margin-top:2.5rem;
  border-top:1px solid rgba(255,255,255,0.2);
}

.site-footer h5{
  font-size:1.2rem;
  margin-bottom:0.7rem;
  font-weight:600;
}

.site-footer p, .site-footer a{
  color:rgba(255,255,255,0.95);
  line-height:1.6;
  font-weight:500;
}

.site-footer a{
  text-decoration:none;
  transition:all 0.3s ease;
  border-bottom:1px solid transparent;
}

.site-footer a:hover{
  color:var(--white);
  border-bottom-color:var(--white);
}

.copy{
  text-align:center;
  color:rgba(255,255,255,0.9);
  margin-top:1.5rem;
  font-size:0.95rem;
  font-weight:500;
}

.about .author-photo{
  width:280px;
  border-radius:var(--radius);
  float:left;
  margin:0 2rem 1rem 0;
  box-shadow:0 10px 40px rgba(0,0,0,0.2), var(--glow);
  border:3px solid rgba(255,255,255,0.3);
  transition:transform 0.4s ease;
}

.about .author-photo:hover{
  transform:scale(1.05) rotate(-2deg);
}

.bio-grid{
  margin:2rem 0;
  background:var(--glass);
  backdrop-filter:blur(20px);
  padding:2rem;
  border-radius:var(--radius);
  border:1px solid rgba(255,255,255,0.25);
  box-shadow:var(--shadow);
}

.bio-grid h3{
  margin-top:1.5rem;
  font-size:1.8rem;
}

.bio-grid p{
  color:rgba(255,255,255,0.98);
  line-height:1.8;
  font-size:1.1rem;
  font-weight:500;
}

.comments{
  margin-top:3rem;
  background:var(--glass);
  backdrop-filter:blur(20px);
  padding:2rem;
  border-radius:var(--radius);
  border:1px solid rgba(255,255,255,0.25);
  box-shadow:var(--shadow);
}

.comments h3{
  font-size:2rem;
  margin-bottom:1.5rem;
}

#comments-list{
  margin-bottom:2rem;
}

.comment{
  background:rgba(255,255,255,0.1);
  padding:1rem;
  border-radius:12px;
  margin-bottom:1rem;
  border-left:3px solid rgba(255,255,255,0.3);
}

.comment strong{
  color:var(--white);
  font-size:1.1rem;
}


/* ===== ENHANCED FORM ACCESSIBILITY ===== */
label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: var(--text-base);
  color: var(--white);
}

input,textarea,select{
  padding:0.9rem 1.2rem;
  border-radius:12px;
  border:2px solid rgba(255,255,255,0.3);
  width:100%;
  background:rgba(255,255,255,0.15);
  backdrop-filter:blur(10px);
  color:var(--white);
  font-size:16px; /* Prevents zoom on mobile */
  font-weight:500;
  font-family: 'Cormorant Garamond', serif;
  transition:all 0.3s ease;
  min-height: var(--min-touch-size);
  box-sizing: border-box;
}

input::placeholder,textarea::placeholder{
  color:rgba(255,255,255,0.75);
  font-weight:500;
  opacity: 1; /* Ensures placeholder is visible in all browsers */
}

/* Form validation states */
input:valid {
  border-color: rgba(144, 238, 144, 0.6);
}

input:invalid:not(:placeholder-shown) {
  border-color: rgba(255, 99, 99, 0.6);
}

/* Fieldset and legend improvements */
fieldset {
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  background: rgba(255,255,255,0.05);
}

legend {
  font-weight: 600;
  padding: 0 1rem;
  color: var(--white);
  font-size: var(--text-lg);
}

/* Checkbox and radio improvements */
input[type="checkbox"],
input[type="radio"] {
  width: auto;
  min-width: 20px;
  min-height: 20px;
  margin-right: 0.5rem;
  accent-color: var(--pink);
}

/* Error and success message styles */
.form-error {
  color: #ffcccb;
  font-size: var(--text-sm);
  margin-top: 0.25rem;
  display: block;
}

.form-success {
  color: #90EE90;
  font-size: var(--text-sm);
  margin-top: 0.25rem;
  display: block;
}

/* Required field indicator */
.required::after {
  content: " *";
  color: #ffcccb;
  font-weight: bold;
}

input:focus,textarea:focus,select:focus{
  background:rgba(255,255,255,0.25);
  border-color:rgba(255,255,255,0.5);
  box-shadow:0 0 20px rgba(255,255,255,0.2);
}

textarea{
  min-height:120px;
  resize:vertical;
}

.form-inline{
  display:flex;
  gap:0.8rem;
  align-items:stretch;
}

/* ===== MOBILE-FIRST RESPONSIVE DESIGN ===== */

/* Base mobile styles (applied to all screen sizes) */
.container {
  width: 100%;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.hero {
  flex-direction: column;
  padding: 1.5rem 0;
  gap: 2rem;
  text-align: center;
}

.site-header {
  flex-direction: column;
  gap: 1.5rem;
  padding: 1rem;
  text-align: center;
}

.nav {
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.nav a {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  min-width: 80px;
  text-align: center;
  text-decoration: none;
}

.features {
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.footer-grid {
  grid-template-columns: 1fr;
  gap: 1.5rem;
  text-align: center;
}

.product-page {
  padding: 0 1rem;
  margin: 1rem auto;
}

.product-magazine-layout {
  flex-direction: column;
  width: 100%;
  padding: 1rem;
  margin: 0;
}

.product-image-column {
  position: static;
  width: 100%;
  margin-bottom: 1.5rem;
}

.product-content-column {
  width: 100%;
}

#image-view-container {
  height: 60vh;
  min-height: 300px;
}

.product-image-column #main-image {
  max-height: 60vh;
}

#pdf-scroll-container {
  max-height: 60vh;
}

.about .author-photo {
  float: none;
  width: 100%;
  max-width: 280px;
  margin: 0 auto 2rem auto;
  display: block;
  border-radius: 12px;
}

/* Form improvements for mobile */
form {
  width: 100%;
}

input, textarea, select {
  font-size: 16px; /* Prevents zoom on iOS */
  padding: 0.875rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.1);
  color: var(--white);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

input::placeholder, textarea::placeholder {
  color: rgba(255,255,255,0.7);
}

/* Tablet styles (768px and up) */
@media (min-width: 48rem) {
  .container {
    padding: 0 2rem;
  }
  
  .hero {
    padding: 2.5rem 0;
  }
  
  .site-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
  
  .nav {
    gap: 1rem;
    flex-wrap: nowrap;
  }
  
  .features {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .product-magazine-layout {
    flex-direction: row;
    gap: 2rem;
  }
  
  .product-image-column,
  .product-content-column {
    width: 50%;
  }
  
  #image-view-container {
    height: 70vh;
  }
}

/* Desktop styles (1024px and up) */
@media (min-width: 64rem) {
  .hero {
    flex-direction: row;
    text-align: left;
    padding: 3rem 0;
    gap: 3rem;
  }
  
  .features {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }
  
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .nav a:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
  }
  
  .about .author-photo {
    float: left;
    margin: 0 2rem 1rem 0;
    max-width: 300px;
  }
}

/* Large desktop styles (1200px and up) */
@media (min-width: 75rem) {
  .container {
    padding: 0 3rem;
  }
  
  .hero {
    padding: 4rem 0;
  }
  
  .features {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{
    animation-duration:0.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:0.01ms !important;
  }
  
  body::before{
    animation:none;
  }
}

/* Interactive button animations */
.btn{
  position:relative;
  z-index:1;
}

.btn:active{
  transform:translateY(2px) scale(0.98);
}

/* Magical cursor trail effect for links */
a{
  cursor:pointer;
}

/* Shimmer effect for cards on hover */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.product-card::after{
  content:'';
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background:linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  background-size:1000px 100%;
  opacity:0;
  transition:opacity 0.3s ease;
}

.product-card:hover::after{
  opacity:1;
  animation:shimmer 1.5s infinite;
}

/* Add glow to important CTAs */
.btn.primary{
  animation:gentleGlow 3s ease-in-out infinite;
}

@keyframes gentleGlow {
  0%, 100% {
    box-shadow:0 8px 25px rgba(0,0,0,0.15), 0 0 20px rgba(255, 181, 216, 0.3);
  }
  50% {
    box-shadow:0 8px 25px rgba(0,0,0,0.15), 0 0 35px rgba(255, 181, 216, 0.6);
  }
}

/* Enchanted text selection */
::selection{
  background:rgba(255,255,255,0.3);
  color:var(--white);
}

/* Slide in animation for notifications */
@keyframes slideIn {
  from {
    opacity:0;
    transform:translateX(100px);
  }
  to {
    opacity:1;
    transform:translateX(0);
  }
}

/* Custom scrollbar */
::-webkit-scrollbar{
  width:12px;
}

::-webkit-scrollbar-track{
  background:rgba(0,0,0,0.1);
}

::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,0.3);
  border-radius:10px;
  border:2px solid transparent;
  background-clip:content-box;
}

::-webkit-scrollbar-thumb:hover{
  background:rgba(255,255,255,0.5);
  background-clip:content-box;
}

