/**
 * Prismatic Flower Essences - Holistic Rainbow Design System
 * Colors inspired by chakras, flower essences, and healing energy
 */

:root {
    /* Rainbow Chakra Colors */
    --rainbow-red: #FF0018;        /* Root Chakra */
    --rainbow-orange: #FFA52C;     /* Sacral Chakra */
    --rainbow-yellow: #FFFF41;     /* Solar Plexus */
    --rainbow-green: #008018;      /* Heart Chakra */
    --rainbow-blue: #0000F9;       /* Throat Chakra */
    --rainbow-indigo: #4B0082;     /* Third Eye */
    --rainbow-violet: #86007D;     /* Crown Chakra */

    /* Prismatic Gradients */
    --gradient-rainbow: linear-gradient(90deg,
        var(--rainbow-red) 0%,
        var(--rainbow-orange) 16.67%,
        var(--rainbow-yellow) 33.33%,
        var(--rainbow-green) 50%,
        var(--rainbow-blue) 66.67%,
        var(--rainbow-indigo) 83.33%,
        var(--rainbow-violet) 100%
    );

    --gradient-purple: linear-gradient(135deg, #9400D3 0%, #4B0082 100%);
    --gradient-healing: linear-gradient(135deg, #00C9FF 0%, #92FE9D 100%);
    --gradient-spiritual: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

    /* Holistic Neutrals */
    --earth-cream: #FFF8DC;
    --sage-green: #9DC88D;
    --lavender-mist: #E6E6FA;
    --crystal-white: #FAFAFA;
    --stone-gray: #6B7280;
    --deep-earth: #2D3748;

    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-heading: "Georgia", "Times New Roman", serif;
    --font-accent: "Brush Script MT", cursive;

    /* Spacing - Fibonacci sequence for natural harmony */
    --space-xs: 0.5rem;    /* 8px */
    --space-sm: 0.75rem;   /* 12px */
    --space-md: 1.25rem;   /* 20px */
    --space-lg: 2rem;      /* 32px */
    --space-xl: 3.25rem;   /* 52px */
    --space-2xl: 5.25rem;  /* 84px */

    /* Shadows - Soft and ethereal */
    --shadow-sm: 0 2px 8px rgba(75, 0, 130, 0.1);
    --shadow-md: 0 4px 16px rgba(75, 0, 130, 0.15);
    --shadow-lg: 0 8px 32px rgba(75, 0, 130, 0.2);
    --shadow-glow: 0 0 20px rgba(148, 0, 211, 0.3);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    scroll-padding-top: 70px; /* Account for sticky nav height */
}

body {
    font-family: var(--font-primary);
    color: var(--deep-earth);
    background: var(--crystal-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--space-md);
    color: var(--rainbow-indigo);
}

h1 {
    font-size: 3rem;
    background: var(--gradient-rainbow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Allow product descriptions to override h1 styling */
.product-description h1,
.product-description h2,
.product-description h3 {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: currentColor;
    background-clip: unset;
    color: var(--deep-earth, #2D3748);
    padding: 0.75rem 0;
    margin-top: 1.5rem;
}

.product-description > h1:first-child,
.product-description > h2:first-child,
.product-description > h3:first-child {
    margin-top: 0;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 2rem;
}

p {
    margin-bottom: var(--space-md);
}

a {
    color: var(--rainbow-indigo);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--rainbow-violet);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* Rainbow Header */
.site-header {
    background: var(--gradient-purple);
    color: white;
    padding: var(--space-lg) 0;
    box-shadow: var(--shadow-md);
    position: relative;  /* Not sticky - scrolls away */
    z-index: 1;
}

.site-title {
    font-size: 2.5rem;
    margin: 0;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.site-tagline {
    text-align: center;
    font-style: italic;
    opacity: 0.9;
    margin-top: var(--space-sm);
}

/* Navigation */
.main-nav {
    background: rgba(255,255,255,0.95);
    padding: var(--space-md) 0;
    border-bottom: 3px solid;
    border-image: var(--gradient-rainbow) 1;
}

.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.main-nav a {
    font-weight: 500;
    padding: var(--space-sm) var(--space-md);
    border-radius: 8px;
    transition: all var(--transition-normal);
}

.main-nav a:hover {
    background: var(--gradient-purple);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin: var(--space-xl) 0;
}

.product-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    position: relative;
    padding: 0;
}

/* Clean content positioning */
.product-card > * {
    position: relative;
    z-index: 1;
}

.product-card:hover,
.product-card:active,
.product-card:focus {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-color: var(--rainbow-indigo);
}

/* Touch device support */
@media (hover: none) and (pointer: coarse) {
    .product-card:active {
        transform: translateY(-4px);
        box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    }
}

.product-card picture {
    display: block;
    background: #f9fafb;
    padding: 0;
    line-height: 0;
    flex-shrink: 0;
    border-radius: 11px 11px 0 0;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center;
    display: block;
    margin: 0;
    padding: 0;
    border-radius: 0;
}

.product-info {
    padding: var(--space-md);
    flex-grow: 1;
    background: white;
}

.product-card .product-title {
    font-size: 1rem !important;
    margin-bottom: var(--space-sm);
    color: var(--rainbow-indigo);
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0.75rem 0rem;
}

h3.product-title {
    font-size: 1rem !important;
    -webkit-text-fill-color: var(--rainbow-indigo);
    background: none;
}

/* Ensure related/grid product titles stay small */
.product-grid h3.product-title,
.product-grid .product-title,
.product-card h3.product-title,
.product-card .product-title {
    font-size: 1rem !important;
    line-height: 1.3 !important;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--rainbow-indigo);
    text-align: center;
    padding: 0.5rem 0;
}


.product-category {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    background: var(--lavender-mist);
    color: var(--rainbow-indigo);
    border-radius: 20px;
    font-size: 0.875rem;
    margin-top: var(--space-sm);
}

/* Add to Cart Button on Product Cards */
.product-card .add-to-cart-btn {
    display: block;
    width: 100%;
    padding: 0.75rem;
    margin-top: var(--space-sm);
    background: linear-gradient(135deg, #66bb6a 0%, #43a047 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.product-card .add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 160, 71, 0.4);
    background: linear-gradient(315deg, #66bb6a 0%, #43a047 100%);
}

.product-card .add-to-cart-btn:active {
    transform: translateY(0);
}

.product-card .add-to-cart-btn.adding {
    background: var(--stone-gray);
    cursor: wait;
}

/* Cart Icon and Badge in Navigation */
.cart-icon-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cart-icon {
    font-size: 1rem;
    display: block;
    line-height: 1;
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--rainbow-red);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.cart-badge.hidden {
    display: none;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: var(--space-sm) var(--space-lg);
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all var(--transition-normal);
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-purple);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(315deg, #8B008B 0%, #4B0082 100%);
}

.btn-rainbow {
    background: var(--gradient-rainbow);
    color: white;
    box-shadow: var(--shadow-glow);
    transition: all 0.3s ease;
}

.btn-rainbow:hover,
.btn-rainbow:active {
    background: linear-gradient(90deg,
        var(--rainbow-violet) 0%,
        var(--rainbow-indigo) 16.67%,
        var(--rainbow-blue) 33.33%,
        var(--rainbow-green) 50%,
        var(--rainbow-yellow) 66.67%,
        var(--rainbow-orange) 83.33%,
        var(--rainbow-red) 100%
    );
    color: white;
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(148, 0, 211, 0.5);
}

/* Rainbow Divider */
.rainbow-divider {
    height: 4px;
    background: var(--gradient-rainbow);
    margin: var(--space-xl) 0;
    border-radius: 2px;
}

/* Energy Badges */
.chakra-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    margin: 2px;
}

.chakra-root { background: var(--rainbow-red); }
.chakra-sacral { background: var(--rainbow-orange); }
.chakra-solar { background: var(--rainbow-yellow); color: var(--deep-earth); }
.chakra-heart { background: var(--rainbow-green); }
.chakra-throat { background: var(--rainbow-blue); }
.chakra-third-eye { background: var(--rainbow-indigo); }
.chakra-crown { background: var(--rainbow-violet); }

/* Loading Animation */
@keyframes rainbow-pulse {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.loading {
    background: var(--gradient-rainbow);
    background-size: 200% 200%;
    animation: rainbow-pulse 3s ease infinite;
    height: 4px;
    width: 100%;
}

/* Mobile-First Responsive - Match prismaticflowers.com layout */

/* Prevent horizontal scroll on mobile */
html, body {
    overflow-x: hidden;
    width: 100%;
}

@media (max-width: 768px) {
    body {
        position: relative;
    }

    .container {
        padding: 0 1rem;
        margin: 0 auto;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    h1 {
        font-size: 1.75rem;
        text-align: center;
    }

    h2 {
        font-size: 1.5rem;
        text-align: center;
    }

    h3 {
        font-size: 1.25rem;
    }

    /* Product grid - full width single column */
    .product-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
        margin: var(--space-lg) 0;
        padding: 0;
        width: 100%;
    }

    .product-card {
        width: 100%;
        max-width: 100%;
    }

    .main-nav ul {
        gap: var(--space-sm);
    }

    /* Center all section content */
    .shop-content,
    .featured-products,
    .recent-products,
    .categories,
    .faq-section,
    section {
        text-align: center;
    }

    /* Inline grid fix for category cards */
    section .container > div[style*="grid"] {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* Button adjustments */
    .btn {
        display: inline-block;
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }

    /* Product info padding */
    .product-info {
        padding: var(--space-sm);
    }

    .product-title {
        font-size: 0.95rem;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        line-height: 1.3;
    }

    .product-price {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.35rem;
    }

    .product-title {
        font-size: 0.9rem;
    }

    .product-price {
        font-size: 1.35rem;
    }

    .btn {
        padding: 0.6rem 1.25rem;
        font-size: 0.9rem;
        width: 100%;
        box-sizing: border-box;
    }
}

/* Quick View Modal */
.quick-view-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.quick-view-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.quick-view-content {
    position: relative;
    max-width: 1000px;
    max-height: 90vh;
    margin: 5vh auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    padding: 2rem;
    animation: slideDown 0.3s ease;
}

.quick-view-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--stone-gray);
    color: white;
    font-size: 2rem;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
}

.quick-view-close:hover {
    background: var(--rainbow-red);
    transform: rotate(90deg);
}

.quick-view-loading {
    text-align: center;
    padding: 4rem;
    font-size: 1.5rem;
    color: var(--stone-gray);
}

.quick-view-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.quick-view-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.quick-view-actions .btn,
.quick-view-actions .add-to-cart-btn {
    padding: 1rem;
    font-size: 1rem;
}

/* Quick View Button on Product Cards */
.quick-view-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
    z-index: 10;
    opacity: 1;
}

.quick-view-btn:hover {
    background: var(--gradient-rainbow);
    color: white;
    transform: scale(1.1);
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .quick-view-grid {
        grid-template-columns: 1fr;
    }

    .quick-view-content {
        margin: 2vh 1rem;
        padding: 1.5rem;
    }

    .quick-view-actions {
        flex-direction: column;
    }
}

/* Video Hero Section */
.prismatic-lotus-video-hero {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 400px;
    max-height: 700px;
    overflow: hidden;
}

.prismatic-lotus-video-hero.hero-compact {
    height: 40vh;
    min-height: 250px;
    max-height: 400px;
}

.lotus-video-background {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.lotus-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102,187,106,0.3) 0%, rgba(156,39,176,0.3) 100%);
}

.video-hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 10;
    padding: 2rem;
    max-width: 800px;
    width: 90%;
    box-sizing: border-box;
}

.video-hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
    line-height: 1.2;
    color: white;
}

.hero-compact .video-hero-content h2 {
    font-size: 2rem;
}

.video-hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
    line-height: 1.5;
}

.hero-compact .video-hero-content p {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.video-hero-content .btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .prismatic-lotus-video-hero {
        height: 60vh;
        min-height: 350px;
    }

    .prismatic-lotus-video-hero.hero-compact {
        height: 35vh;
        min-height: 200px;
    }

    .video-hero-content {
        padding: 1rem;
        width: 95%;
    }

    .video-hero-content h2 {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }

    .hero-compact .video-hero-content h2 {
        font-size: 1.25rem;
    }

    .video-hero-content p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .video-hero-content .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .prismatic-lotus-video-hero {
        height: 55vh;
        min-height: 300px;
    }

    .prismatic-lotus-video-hero.hero-compact {
        height: 30vh;
        min-height: 180px;
    }

    .video-hero-content h2 {
        font-size: 1.25rem;
    }

    .hero-compact .video-hero-content h2 {
        font-size: 1.1rem;
    }

    .video-hero-content p {
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
    }

    .video-hero-content .btn {
        padding: 0.6rem 1.25rem;
        font-size: 0.9rem;
    }
}
