/* ============================================
   SKYBUDS-STYLE CSS - SkyBuds Theme
   Comprehensive styling matching heycurio.com
   ============================================ */

/* <picture> elements are transparent to layout: existing `.parent img`
   selectors keep working identically after the WebP picture refactor. */
picture { display: contents; }

/* Google Font - Sora (loaded via theme.liquid) */

/* --------------------------------------------
   CSS VARIABLES
   -------------------------------------------- */
:root {
  /* Primary Colors - Orange Theme */
  --skybuds-red: #FF6B4A;
  --skybuds-red-dark: #E85A3A;
  --skybuds-black: #1a1a1a;
  --skybuds-white: #ffffff;
  --skybuds-gray: #f5f5f5;
  --skybuds-text: #333333;
  --skybuds-text-light: #666666;

  /* Character colors */
  --skybuds-orange: #FF6B4A;
  --skybuds-blue: #8acdea;
  --skybuds-green: #7DD87D;
  --skybuds-pink: #E9698E;
  --skybuds-chloe: #E9698E;
  --skybuds-yellow: #ffd22c;
  --skybuds-coral: #fdb698;
  --skybuds-cyan: #87ddf0;
  --skybuds-purple: #9B7ED9;

  /* Typography - Sora (Google Font) */
  --skybuds-font: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Border Radius */
  --skybuds-radius: 16px;
  --skybuds-radius-lg: 24px;
  --skybuds-radius-xl: 32px;

  /* Shadows */
  --skybuds-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --skybuds-shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);

  /* Transitions */
  --skybuds-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Consistent spacing - Desktop */
  --skybuds-section-py: 100px;
  --skybuds-section-px: 40px;
  --skybuds-container-max: 1200px;
  --skybuds-gap-lg: 48px;
  --skybuds-gap-md: 32px;
  --skybuds-gap-sm: 16px;
}

/* Tablet spacing adjustments (iPad) */
@media (min-width: 768px) and (max-width: 1024px) {
  :root {
    --skybuds-section-py: 80px;
    --skybuds-section-px: 32px;
    --skybuds-gap-lg: 40px;
    --skybuds-gap-md: 28px;
    --skybuds-gap-sm: 14px;
  }
}

/* Mobile spacing adjustments */
@media (max-width: 767px) {
  :root {
    --skybuds-section-py: 60px;
    --skybuds-section-px: 20px;
    --skybuds-gap-lg: 32px;
    --skybuds-gap-md: 24px;
    --skybuds-gap-sm: 12px;
  }
}

/* --------------------------------------------
   GLOBAL OVERRIDES
   -------------------------------------------- */
html, body {
  overflow-x: hidden;
}

body {
  font-family: var(--skybuds-font) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--skybuds-white);
}

* {
  box-sizing: border-box;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--skybuds-font) !important;
  font-weight: 700;
  color: var(--skybuds-black);
  margin: 0;
}

p {
  margin: 0;
}

/* Page Width Container */
.page-width {
  max-width: var(--skybuds-container-max);
  margin: 0 auto;
  padding: 0 var(--skybuds-section-px);
}

/* Header - Only sticky on mobile */
.shopify-section-header {
  position: relative;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.98);
}

@media (max-width: 989px) {
  .shopify-section-header {
    position: sticky;
    top: 0;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
}

/* Custom SkyBuds Logo */
.header__heading-logo-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

.header__heading-logo {
  max-height: 150px;
  width: auto;
}

.header--middle-center .header__heading {
  flex: 1;
  display: flex;
  justify-content: center;
}

/* --------------------------------------------
   BUTTON STYLES
   -------------------------------------------- */
.skybuds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  font-family: var(--skybuds-font);
  font-size: 16px;
  font-weight: 600;
  border-radius: 50px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--skybuds-transition);
}

.skybuds-btn--primary {
  background: var(--skybuds-red);
  color: var(--skybuds-white);
  box-shadow: 0 4px 20px rgba(230, 57, 70, 0.35);
  border: 3px solid transparent;
}

.skybuds-btn--primary:hover {
  background: var(--skybuds-red);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(230, 57, 70, 0.45);
  border: 3px solid #C62828;
}

.skybuds-btn--white {
  background: var(--skybuds-white);
  color: var(--skybuds-black);
  box-shadow: var(--skybuds-shadow);
}

.skybuds-btn--white:hover {
  transform: translateY(-2px);
  box-shadow: var(--skybuds-shadow-lg);
}

/* --------------------------------------------
   HERO SECTION
   -------------------------------------------- */
.skybuds-hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px var(--skybuds-section-px) var(--skybuds-section-py);
  background: var(--skybuds-white);
  overflow: hidden;
}

.skybuds-hero__bg-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.skybuds-hero__shape {
  position: absolute;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  opacity: 0.6;
  animation: float 8s ease-in-out infinite;
}

.skybuds-hero__shape--1 {
  width: 200px;
  height: 200px;
  background: var(--skybuds-blue);
  top: 10%;
  left: 5%;
  animation-delay: 0s;
}

.skybuds-hero__shape--2 {
  width: 150px;
  height: 150px;
  background: var(--skybuds-orange);
  top: 20%;
  right: 10%;
  animation-delay: 2s;
}

.skybuds-hero__shape--3 {
  width: 120px;
  height: 120px;
  background: var(--skybuds-green);
  bottom: 20%;
  left: 15%;
  animation-delay: 4s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

.skybuds-hero__container {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.skybuds-hero__title {
  font-size: clamp(36px, 7vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  color: var(--skybuds-black);
  letter-spacing: -0.02em;
}

.skybuds-hero__subtitle {
  font-size: clamp(16px, 2.5vw, 20px);
  color: var(--skybuds-text-light);
  max-width: 500px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.skybuds-hero__cta {
  margin-bottom: 24px;
}

.skybuds-hero__price {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--skybuds-font);
}

.skybuds-hero__price-current {
  font-size: 32px;
  font-weight: 700;
  color: var(--skybuds-black);
}

.skybuds-hero__price-original {
  font-size: 20px;
  color: var(--skybuds-text-light);
  text-decoration: line-through;
}

.skybuds-hero__price-currency {
  font-size: 14px;
  color: var(--skybuds-text-light);
  font-weight: 500;
}

/* --------------------------------------------
   PRODUCT CARDS GRID
   -------------------------------------------- */
.skybuds-products {
  padding: var(--skybuds-gap-lg) var(--skybuds-section-px) var(--skybuds-section-py);
  background: var(--skybuds-white);
}

.skybuds-products__container {
  max-width: 100%;
  padding: 0;
}

.skybuds-products__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--skybuds-gap-sm);
}

/* Tablet - 2 columns */
@media (min-width: 768px) and (max-width: 1024px) {
  .skybuds-products__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

/* Desktop - 3 columns */
@media (min-width: 1025px) {
  .skybuds-products__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

.skybuds-product-card {
  display: block;
  position: relative;
  border-radius: var(--skybuds-radius-lg);
  overflow: hidden;
  text-decoration: none;
  transition: transform var(--skybuds-transition), box-shadow var(--skybuds-transition);
}

.skybuds-product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.skybuds-product-card__image-wrap {
  aspect-ratio: 4/5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: var(--card-bg, #f5f5f5);
}

@media (min-width: 768px) {
  .skybuds-product-card__image-wrap {
    aspect-ratio: 1;
    min-height: 400px;
  }
}

.skybuds-product-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--skybuds-transition);
}

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

.skybuds-product-card__placeholder {
  width: 80%;
  height: 80%;
}

.skybuds-product-card__placeholder svg {
  width: 100%;
  height: 100%;
}

/* Overlay info on image */
.skybuds-product-card__info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 100%);
}

.skybuds-product-card__name {
  font-size: 20px;
  font-weight: 700;
  color: white;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.skybuds-product-card__price {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--skybuds-font);
  background: var(--skybuds-red);
  color: white;
  padding: 10px 18px;
  border-radius: 50px;
  white-space: nowrap;
}

.skybuds-product-card__price-original {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: line-through;
}

.skybuds-product-card__price-sale {
  font-size: 16px;
  font-weight: 700;
  color: white;
}

.skybuds-product-card__price-currency {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

/* --------------------------------------------
   PRESS SECTION
   -------------------------------------------- */
.skybuds-press {
  padding: var(--skybuds-section-py) var(--skybuds-section-px);
  background: var(--skybuds-white);
  overflow: hidden;
}

.skybuds-press__title {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--skybuds-gap-lg);
  color: var(--skybuds-black);
}

.skybuds-press__marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}

.skybuds-press__track {
  display: flex;
  gap: 40px;
  animation: marquee 30s linear infinite;
  width: max-content;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.skybuds-press__item {
  flex-shrink: 0;
  max-width: 300px;
  padding: 24px;
  background: var(--skybuds-gray);
  border-radius: var(--skybuds-radius);
}

.skybuds-press__source {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--skybuds-text-light);
  margin-bottom: 8px;
}

.skybuds-press__quote {
  font-size: 14px;
  color: var(--skybuds-black);
  line-height: 1.5;
  margin: 0;
}

/* --------------------------------------------
   TESTIMONIALS SECTION
   -------------------------------------------- */
.skybuds-testimonials {
  padding: var(--skybuds-section-py) var(--skybuds-section-px);
  background: var(--skybuds-gray);
}

.skybuds-testimonials__title {
  font-size: 36px;
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--skybuds-gap-lg);
  color: var(--skybuds-black);
}

.skybuds-testimonials__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

/* Tablet - 2 columns */
@media (min-width: 768px) {
  .skybuds-testimonials__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop - 3 columns */
@media (min-width: 1025px) {
  .skybuds-testimonials__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.skybuds-testimonial-card {
  background: var(--skybuds-white);
  border-radius: var(--skybuds-radius-lg);
  padding: var(--skybuds-gap-md);
  box-shadow: var(--skybuds-shadow);
}

.skybuds-testimonial-card__stars {
  display: flex;
  gap: 4px;
  margin-bottom: var(--skybuds-gap-sm);
}

.skybuds-testimonial-card__quote {
  font-size: 15px;
  line-height: 1.6;
  color: var(--skybuds-black);
  margin-bottom: 20px;
}

.skybuds-testimonial-card__author {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.skybuds-testimonial-card__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--skybuds-black);
}

.skybuds-testimonial-card__role {
  font-size: 13px;
  color: var(--skybuds-text-light);
}

/* --------------------------------------------
   ABOUT SECTION (Base styles - overridden by inline)
   -------------------------------------------- */
.skybuds-about {
  padding: var(--skybuds-section-py) var(--skybuds-section-px);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  position: relative;
}

.skybuds-about__container {
  max-width: 800px;
  margin: 0 auto;
}

.skybuds-about__content {
  text-align: center;
  color: var(--skybuds-white);
}

.skybuds-about__label {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.8;
  margin-bottom: var(--skybuds-gap-sm);
}

.skybuds-about__title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  color: var(--skybuds-white);
  margin-bottom: 20px;
}

.skybuds-about__text {
  font-size: 18px;
  line-height: 1.7;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto var(--skybuds-gap-md);
}

/* --------------------------------------------
   NEWSLETTER SECTION (Base styles - may be overridden)
   -------------------------------------------- */
.skybuds-newsletter {
  padding: var(--skybuds-section-py) var(--skybuds-section-px);
  background: var(--skybuds-red);
  text-align: center;
}

.skybuds-newsletter__container {
  max-width: 600px;
  margin: 0 auto;
}

.skybuds-newsletter__title {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 800;
  color: var(--skybuds-white);
  margin-bottom: var(--skybuds-gap-sm);
}

.skybuds-newsletter__text {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--skybuds-gap-md);
  line-height: 1.6;
}

.skybuds-newsletter__form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.skybuds-newsletter__input {
  flex: 1;
  min-width: 250px;
  max-width: 350px;
  padding: 16px 24px;
  font-size: 16px;
  font-family: var(--skybuds-font);
  border: none;
  border-radius: 50px;
  outline: none;
}

.skybuds-newsletter__input:focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

/* --------------------------------------------
   RESPONSIVE ADJUSTMENTS
   -------------------------------------------- */
@media (max-width: 767px) {
  .skybuds-hero {
    min-height: auto;
    padding-top: 80px;
  }

  .skybuds-hero__shape {
    display: none;
  }

  /* Mobile typography improvements */
  h1, h2, h3 {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Ensure touch-friendly spacing */
  button, a {
    min-height: 44px;
  }

  /* Better image handling on mobile */
  img {
    max-width: 100%;
    height: auto;
  }
}

/* Small mobile devices */
@media (max-width: 480px) {
  :root {
    --skybuds-section-py: 48px;
    --skybuds-section-px: 16px;
  }
}

/* --------------------------------------------
   SCROLL-TRIGGERED FADE-IN ANIMATIONS
   -------------------------------------------- */

/* Base state for animated elements - hidden until scrolled into view */
@media (prefers-reduced-motion: no-preference) {
  .skybuds-animate {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .skybuds-animate.skybuds-animate--visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* Staggered delays for child elements */
  .skybuds-animate-children > *:nth-child(1) { transition-delay: 0s; }
  .skybuds-animate-children > *:nth-child(2) { transition-delay: 0.1s; }
  .skybuds-animate-children > *:nth-child(3) { transition-delay: 0.15s; }
  .skybuds-animate-children > *:nth-child(4) { transition-delay: 0.2s; }
  .skybuds-animate-children > *:nth-child(5) { transition-delay: 0.25s; }
  .skybuds-animate-children > *:nth-child(6) { transition-delay: 0.3s; }
  .skybuds-animate-children > *:nth-child(7) { transition-delay: 0.35s; }
  .skybuds-animate-children > *:nth-child(8) { transition-delay: 0.4s; }
  .skybuds-animate-children > *:nth-child(9) { transition-delay: 0.45s; }

  /* Fade in from left */
  .skybuds-animate--left {
    opacity: 0;
    transform: translateX(-40px);
  }

  .skybuds-animate--left.skybuds-animate--visible {
    opacity: 1;
    transform: translateX(0);
  }

  /* Fade in from right */
  .skybuds-animate--right {
    opacity: 0;
    transform: translateX(40px);
  }

  .skybuds-animate--right.skybuds-animate--visible {
    opacity: 1;
    transform: translateX(0);
  }

  /* Scale up effect */
  .skybuds-animate--scale {
    opacity: 0;
    transform: scale(0.9);
  }

  .skybuds-animate--scale.skybuds-animate--visible {
    opacity: 1;
    transform: scale(1);
  }

  /* Faster animation variant */
  .skybuds-animate--fast {
    transition-duration: 0.5s;
  }

  /* Slower animation variant */
  .skybuds-animate--slow {
    transition-duration: 1.2s;
  }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .skybuds-animate {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ================================================================
   MOBILE FIX: Disable ALL animations on product page for mobile
   This ensures content is always visible regardless of JS state
   ================================================================ */
@media (max-width: 767px) {
  /* Kill animations on product section completely */
  .skybuds-product.skybuds-animate,
  .skybuds-product .skybuds-animate,
  .skybuds-product .skybuds-fade-in,
  .skybuds-product [class*="skybuds-fade-in"],
  .skybuds-product [class*="skybuds-animate"] {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
    transition: none !important;
    animation: none !important;
  }

  /* Ensure product container uses flexbox column on mobile */
  .skybuds-product__container {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
  }

  /* Ensure product info is visible and properly sized */
  .skybuds-product__info,
  .skybuds-product__info-inner {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
}

/* --------------------------------------------
   UTILITY CLASSES
   -------------------------------------------- */
.skybuds-section {
  padding: var(--skybuds-section-py) var(--skybuds-section-px);
}

.skybuds-container {
  max-width: var(--skybuds-container-max);
  margin: 0 auto;
}

/* Hide Shopify default elements */
.shopify-section-group-footer-group .footer {
  display: none;
}

/* Ensure our footer is visible */
.skybuds-footer-wrap {
  display: block !important;
}
