/*
  Paper Pun - Stationery & Notebook Design System
  Theme: Soothing Lilac & Iris Purple, Soft Lavender Paper, Deep Velvet Ink Accents
*/

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Caveat:wght@600;700&display=swap');

:root {
  --color-paper: #FAF8FF;
  --color-paper-subtle: #F3EEFA;
  --color-paper-card: #FFFFFF;
  --color-ink: #1A162B;
  --color-ink-light: #635B78;
  --color-terracotta: #7A5AF8;        /* Soothing Iris Purple Accent */
  --color-terracotta-dark: #5B3CC4;   /* Deep Velvet Violet Hover */
  --color-sage: #53389E;              /* Royal Heather Purple */
  --color-sage-light: #F4F0FF;        /* Soft Lilac Tint Badge */
  --color-gold: #D4A373;
  --color-border: #E8E2F2;
  --color-border-dark: #D5CCE5;
  
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-hand: 'Caveat', cursive;
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-paper);
  color: var(--color-ink);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Subtle Paper Texture Background */
.paper-texture {
  background-color: var(--color-paper);
  background-image: radial-gradient(rgba(122, 90, 248, 0.04) 1px, transparent 0);
  background-size: 24px 24px;
}

/* Editorial Serif & Handwritten Accents */
.font-serif-title {
  font-family: var(--font-serif);
}

.font-handwritten {
  font-family: var(--font-hand);
}

/* Ruled Notebook Line Accent */
.ruled-line {
  background-image: repeating-linear-gradient(
    transparent,
    transparent 27px,
    var(--color-border) 28px
  );
}

/* Notebook Stitch & Spine Details */
.notebook-card {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid var(--color-border);
  position: relative;
  background: #fff;
  border-radius: 14px;
}

.notebook-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -8px rgba(122, 90, 248, 0.12);
}

/* GSM Badge Pill */
.gsm-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--color-sage-light);
  color: var(--color-sage);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 9999px;
  letter-spacing: 0.02em;
}

/* Buttons */
.btn-primary {
  background-color: var(--color-terracotta);
  color: #ffffff;
  padding: 12px 24px;
  font-weight: 600;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary:hover {
  background-color: var(--color-terracotta-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(122, 90, 248, 0.3);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-ink);
  border: 1.5px solid var(--color-border-dark);
  padding: 11px 22px;
  font-weight: 600;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}

.btn-secondary:hover {
  background-color: var(--color-paper-subtle);
  border-color: var(--color-terracotta);
  color: var(--color-terracotta);
}

/* Slide-Over Cart Drawer */
.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 22, 43, 0.45);
  backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cart-drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  z-index: 9999;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 32px rgba(26, 22, 43, 0.12);
}

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

/* Floating WhatsApp Button */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: #25D366;
  color: white;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35);
  z-index: 900;
  transition: all 0.25s ease;
}

.whatsapp-float:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.45);
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: #1A162B;
  color: #FAF8FF;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(26, 22, 43, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: toastIn 0.3s ease forwards;
  border: 1px solid rgba(232, 226, 242, 0.2);
}

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

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

::-webkit-scrollbar-track {
  background: var(--color-paper-subtle);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border-dark);
  border-radius: 4px;
}

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