/*
Theme Name: Aussie Vape Trend
Theme URI: https://aussievapetrend.com
Author: Vape AU Network
Description: Aussie Vape Trend - disposables, pods, nic salts. Dark navy background, rose accent, Syne/DM Sans typography.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.0
License: Proprietary
Text Domain: aussievapetrend
*/

/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
  --color-bg:           #111624;
  --color-surface:      #182032;
  --color-surface-2:    #1f293d;
  --color-border:       #2b3752;
  --color-border-2:     rgba(43,55,82,0.5);
  --color-ink:          #e8ecf4;
  --color-muted:        #8896b0;
  --color-accent:       #e03c58;
  --color-accent-light: #ea6075;
  --color-accent-hover: #ca2c46;
  --color-gold:         #f59e0b;
  --color-success:      #10b981;

  /* Texture SVGs as data URIs */
  --texture-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  --texture-dots:  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Ccircle cx='1' cy='1' r='1' fill='rgba(255,255,255,0.045)'/%3E%3C/svg%3E");
  --texture-grid:  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M0 0h40v40H0z' fill='none'/%3E%3Cpath d='M0 0h40' stroke='rgba(255,255,255,0.028)' stroke-width='1'/%3E%3Cpath d='M0 0v40' stroke='rgba(255,255,255,0.028)' stroke-width='1'/%3E%3C/svg%3E");
  --texture-slash: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath d='M-1 5L5-1M3 9L9 3' stroke='rgba(255,255,255,0.04)' stroke-width='1'/%3E%3C/svg%3E");
}

/* ============================================
   BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'DM Sans', sans-serif;
  background-color: var(--color-bg);
  color: var(--color-ink);
  margin: 0;
  line-height: 1.6;
  background-image: var(--texture-noise);
  background-blend-mode: overlay;
  background-size: 200px 200px;
  background-repeat: repeat;
}

/* Grain overlay pseudo-element on <html> for a second pass of texture */
html::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background-image: var(--texture-noise);
  background-size: 180px 180px;
  opacity: 0.022;
  mix-blend-mode: overlay;
}

/* Grain overlay pseudo-element on <html> */
html::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background-image: var(--texture-noise);
  background-size: 180px 180px;
  opacity: 0.015;
  mix-blend-mode: multiply;
}

h1, h2, h3, h4, h5, h6,
.font-heading {
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.08;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ============================================
   TEXTURE UTILITY CLASSES
   ============================================ */

/* Dot-grid background — use on surface panels */
.texture-dots {
  background-image: var(--texture-dots);
  background-size: 20px 20px;
  background-repeat: repeat;
}

/* Line-grid — use on dark section dividers */
.texture-grid {
  background-image: var(--texture-grid);
  background-size: 40px 40px;
  background-repeat: repeat;
}

/* Diagonal hatch — use on hero or feature panels */
.texture-slash {
  background-image: var(--texture-slash);
  background-size: 8px 8px;
  background-repeat: repeat;
}

/* Layered noise on a coloured surface (for cards, sections) */
.texture-surface {
  position: relative;
  isolation: isolate;
}
.texture-surface::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--texture-noise);
  background-size: 160px 160px;
  opacity: 0.03;
  mix-blend-mode: overlay;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
}
.texture-surface > * { position: relative; z-index: 1; }

/* Grained edge highlight — top border shimmer */
.texture-edge::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.12) 40%, rgba(255,255,255,0.08) 60%, transparent);
  pointer-events: none;
}

/* ============================================
   GLASS MORPHISM — enhanced with grain
   ============================================ */
.glass {
  background: rgba(24, 32, 50, 0.82);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(43, 55, 82, 0.7);
  position: relative;
}
.glass::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--texture-noise);
  background-size: 160px 160px;
  opacity: 0.025;
  mix-blend-mode: overlay;
  border-radius: inherit;
  pointer-events: none;
}
.glass-light {
  background: rgba(31, 41, 61, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(43, 55, 82, 0.5);
  position: relative;
}
.glass-light::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--texture-noise);
  background-size: 160px 160px;
  opacity: 0.02;
  mix-blend-mode: overlay;
  border-radius: inherit;
  pointer-events: none;
}

/* ============================================
   GLOW EFFECTS
   ============================================ */
.glow-rose { box-shadow: 0 0 28px -6px rgba(224, 60, 88, 0.28); }
.glow-rose-h:hover { box-shadow: 0 0 28px -4px rgba(224, 60, 88, 0.4); }

/* ============================================
   PRODUCT CARDS
   ============================================ */
.product-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product-card:hover { transform: translateY(-3px); }

/* ============================================
   FILTER BUTTONS
   ============================================ */
.filter-btn {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-muted);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--color-accent);
  color: white;
  border-color: transparent;
}

/* ============================================
   CART DRAWER
   ============================================ */
#cart-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 100%; max-width: 24rem;
  z-index: 95;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0, 0.67, 0);
  display: flex;
  flex-direction: column;
}
#cart-drawer.open { transform: translateX(0); }
#cart-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(17, 22, 36, 0.5);
  backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
#cart-overlay.open { opacity: 1; pointer-events: all; }

/* ============================================
   FORMS
   ============================================ */
.input-field {
  width: 100%;
  background: rgba(24, 32, 50, 0.8);
  border: 1px solid rgba(43, 55, 82, 0.8);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-family: 'DM Sans', sans-serif;
  color: var(--color-ink);
  outline: none;
  transition: border-color 0.2s;
}
.input-field:focus { border-color: var(--color-accent); }
.input-field::placeholder { color: #64748b; }
.input-field option { background: #1f293d; color: var(--color-ink); }

/* ============================================
   MARQUEE
   ============================================ */
@keyframes vsa-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.vsa-marquee-track {
  display: flex;
  width: max-content;
  animation: vsa-marquee 38s linear infinite;
}
.vsa-marquee-track:hover { animation-play-state: paused; }

/* ============================================
   SECTION DIVIDERS WITH TEXTURE
   ============================================ */
.section-divider {
  position: relative;
  overflow: hidden;
}
.section-divider::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--texture-dots);
  background-size: 20px 20px;
  opacity: 1;
  pointer-events: none;
}

/* ============================================
   WOOCOMMERCE OVERRIDES
   ============================================ */
.woocommerce-page .woocommerce { width: 100%; }
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  padding: 1.25rem;
  transition: transform 0.2s ease;
}
.woocommerce ul.products li.product:hover { transform: translateY(-3px); }
.woocommerce ul.products li.product .button,
.woocommerce-page ul.products li.product .button {
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: 0.75rem;
  padding: 0.625rem 1.25rem;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s;
}
.woocommerce ul.products li.product .button:hover { background: var(--color-accent-hover); }
.woocommerce span.price,
.woocommerce-page span.price { color: var(--color-ink); font-weight: 700; }

/* ============================================
   BLOG GRID
   ============================================ */
.vsa-post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* ============================================
   NO SCROLLBAR
   ============================================ */
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* ============================================
   UTILITY
   ============================================ */
.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;
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */
@media (max-width: 767px) {
  .md-show { display: none !important; }
}
@media (min-width: 768px) {
  .md-show { display: block !important; }
  .md-flex { display: flex !important; }
}
@media (max-width: 1023px) {
  .lg-show { display: none !important; }
  .lg-flex { display: none !important; }
}
@media (min-width: 1024px) {
  .lg-show { display: inline-block !important; }
  .lg-flex { display: flex !important; }
  .lg-grid { display: grid !important; }
}

/* ============================================
   ANIMATIONS
   ============================================ */

/* Entrance keyframes */
@keyframes vsa-fade-up   { from { opacity:0; transform:translateY(28px); } to { opacity:1; transform:translateY(0); } }
@keyframes vsa-fade-in   { from { opacity:0; } to { opacity:1; } }
@keyframes vsa-scale-in  { from { opacity:0; transform:scale(0.94); } to { opacity:1; transform:scale(1); } }
@keyframes vsa-slide-left{ from { opacity:0; transform:translateX(-24px); } to { opacity:1; transform:translateX(0); } }

/* Ambient / loop keyframes */
@keyframes vsa-float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}
@keyframes vsa-glow-pulse {
  0%, 100% { box-shadow: 0 0 20px -4px rgba(224,60,88,0.2); }
  50%       { box-shadow: 0 0 36px -4px rgba(224,60,88,0.5); }
}
@keyframes vsa-shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

/* Scroll-reveal base state — JS adds .is-visible */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s cubic-bezier(0.16,1,0.3,1), transform 0.55s cubic-bezier(0.16,1,0.3,1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-scale {
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16,1,0.3,1);
}
.reveal-scale.is-visible {
  opacity: 1;
  transform: scale(1);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16,1,0.3,1);
}
.reveal-left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger delays for child items */
.stagger > *:nth-child(1) { transition-delay: 0s;    }
.stagger > *:nth-child(2) { transition-delay: 0.08s; }
.stagger > *:nth-child(3) { transition-delay: 0.16s; }
.stagger > *:nth-child(4) { transition-delay: 0.24s; }
.stagger > *:nth-child(5) { transition-delay: 0.32s; }
.stagger > *:nth-child(6) { transition-delay: 0.40s; }

/* Ambient helpers */
.float-anim   { animation: vsa-float 4s ease-in-out infinite; }
.glow-pulse   { animation: vsa-glow-pulse 3s ease-in-out infinite; }
.hero-fade-up { animation: vsa-fade-up 0.8s cubic-bezier(0.16,1,0.3,1) both; }
.hero-fade-in { animation: vsa-fade-in 1s ease both; }

/* Shimmer on CTA button */
.btn-shimmer {
  background-size: 200% auto;
  background-image: linear-gradient(to right, var(--color-accent) 0%, #fb923c 40%, var(--color-accent) 60%, var(--color-accent) 100%);
  animation: vsa-shimmer 3s linear infinite;
  background-clip: padding-box;
}

/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-scale, .reveal-left { transition: none; opacity: 1; transform: none; }
  .float-anim, .glow-pulse, .hero-fade-up, .hero-fade-in, .btn-shimmer { animation: none; }
}
