/* ==========================================================================
   01. Variables & Design Tokens
   ========================================================================== */

:root {
  /* --- Colors --- */
  /* NOTE: --pf-primary, --pf-secondary, --pf-text, --pf-background
     are set dynamically by class-dynamic-css.php based on the active palette.
     Do NOT hardcode them here — it causes cascade conflicts. */
  --pf-primary-dark: #E6935A;
  
  --pf-white: #ffffff;
  --pf-gray-50: #f9fafb;
  --pf-gray-100: #f3f4f6;
  --pf-gray-200: #e5e7eb;
  --pf-gray-300: #d1d5db;
  --pf-gray-400: #6b7280;
  --pf-gray-500: #4b5563;
  --pf-gray-600: #374151;
  --pf-gray-700: #1f2937;
  --pf-gray-800: #1f2937;
  --pf-gray-900: #111827;

  --pf-danger: #ef4444;
  --pf-success: #10b981;

  /* --- Spacing --- */
  --pf-space-1: 0.25rem;   /* 4px */
  --pf-space-2: 0.5rem;    /* 8px */
  --pf-space-3: 0.75rem;   /* 12px */
  --pf-space-4: 1rem;      /* 16px */
  --pf-space-5: 1.25rem;   /* 20px */
  --pf-space-6: 1.5rem;    /* 24px */
  --pf-space-8: 2rem;      /* 32px */
  --pf-space-10: 2.5rem;   /* 40px */
  --pf-space-12: 3rem;     /* 48px */
  --pf-space-16: 4rem;     /* 64px */
  --pf-space-20: 5rem;     /* 80px */
  --pf-space-24: 6rem;     /* 96px */
  --pf-space-32: 8rem;     /* 128px */
  --pf-space-48: 12rem;    /* 192px */

  /* --- Typography --- */
  --pf-text-xs: 0.75rem;     /* 12px */
  --pf-text-sm: 0.875rem;    /* 14px */
  --pf-text-base: 1rem;      /* 16px */
  --pf-text-lg: 1.125rem;    /* 18px */
  --pf-text-xl: 1.25rem;     /* 20px */
  --pf-text-2xl: 1.5rem;     /* 24px */
  --pf-text-3xl: 1.875rem;   /* 30px */
  --pf-text-4xl: 2.25rem;    /* 36px */
  --pf-text-5xl: 3rem;       /* 48px */
  --pf-text-6xl: 3.75rem;    /* 60px */
  
  /* --- Border Radius --- */
  --pf-radius-sm: 0.25rem;
  --pf-radius-md: 0.375rem;
  --pf-radius-lg: 0.5rem;
  --pf-radius-xl: 0.75rem;
  --pf-radius-2xl: 1rem;
  --pf-radius-3xl: 1.5rem;
  --pf-radius-full: 9999px;

  /* --- Signature Pebble & Pill Tokens (1rem = 16px) --- */
  --pf-radius-pill: 9999px;    /* 24px+ pill buttons & input fields */
  --pf-radius-card: 1.25rem;   /* 20px product/promo card exterior */
  --pf-radius-inner: 0.625rem; /* 10px inner category / review chip */
  --pf-radius-badge: 0.3125rem;/* 5px sale / stock badge */

  /* --- Shadows --- */
  --pf-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --pf-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --pf-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --pf-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --pf-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --pf-shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  /* --- Layout & Containers --- */
  --pf-container-width: 1400px;
  --pawfect-container-width: 1400px;
  --pf-page-width: 1400px;
  --pf-container-narrow: 1120px;
  --pawfect-container-narrow: 1120px;
  --pf-container-small: 800px;
  --pawfect-container-small: 800px;
  --pf-container-padding: 1.5rem;

  /* --- Transitions & Sleek Easing Curves --- */
  --pf-ease-nav: cubic-bezier(0.6, 0, 0.4, 1);
  --pf-ease-smooth: cubic-bezier(0.3, 1, 0.3, 1);   /* Smooth soft ease-out */
  --pf-ease-snappy: cubic-bezier(0.7, 0, 0.3, 1);   /* Punchy hover / pills */
  --pf-ease-drawer: cubic-bezier(0.7, 0, 0.2, 1);   /* Slide drawer acceleration */
  --pf-duration-fast: 200ms;
  --pf-duration-base: 350ms;
  --pf-duration-slow: 600ms;

  --pf-transition-default: all var(--pf-duration-base) var(--pf-ease-smooth);
  --pf-transition-fast: all var(--pf-duration-fast) var(--pf-ease-snappy);

  /* --- Zero-CLS Scrollbar Offset --- */
  --pf-scrollbar-width: 0px;
}

/* Zero-CLS Modal & Drawer Lock */
body.pf-scroll-locked {
  overflow: hidden !important;
  padding-right: var(--pf-scrollbar-width, 0px) !important;
}

/* Full-Page Transition Mask (Sleek D2C Port) */
.pf-page-transition {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background-color: var(--pf-bg-body, var(--pf-background, #FAF7F3));
  z-index: 999998;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 280ms var(--pf-ease-smooth, cubic-bezier(0.3, 1, 0.3, 1)),
              visibility 280ms var(--pf-ease-smooth, cubic-bezier(0.3, 1, 0.3, 1));
}

.pf-page-transition--active {
  opacity: 0.72;
  visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
  .pf-page-transition {
    display: none !important;
  }
}

@media (min-width: 768px) {
  :root {
    --pf-container-padding: 2rem;
  }
}
