/**
 * SVG Placeholder Animation for Greeting Cards Page
 * Paintbrush animation on product card placeholders
 */

/* Placeholder Container Styling */
.product-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fdfaf6;
    background-image: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 1) 0%, rgba(240, 235, 225, 0.4) 100%);
    position: relative;
    overflow: hidden;
    /* Prevent performance-heavy operations from bleeding out */
    contain: content;
}

.product-image-placeholder svg {
    display: none;
    /* Do not render until animated */
    width: 80%;
    height: 80%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.5s ease-in;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.placeholder-text {
    position: relative;
    z-index: 2;
    font-family: var(--font-heading);
    color: rgba(26, 60, 26, 0.3);
    font-size: 1.25rem;
    font-style: italic;
    pointer-events: none;
}

/* Trigger animation when element enters viewport (handled by JS) */
.product-image-placeholder.animate svg {
    display: block;
    opacity: 1;
}

.product-image-placeholder.animate .paint {
    stroke-dasharray: 1.2;
    stroke-dashoffset: 1.2;
    animation: paintStroke 4s ease-in-out forwards;
    will-change: stroke-dashoffset;
}

@keyframes paintStroke {
    0% {
        stroke-dashoffset: 1.2;
        opacity: 0;
    }

    15% {
        opacity: 1;
    }

    100% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
}

/* Page Level Overrides */
.greeting-cards-page {
    background: var(--color-bg-body);
}

.greeting-cards-page .products-header {
    padding-top: 140px;
    padding-bottom: 60px;
    background: transparent;
}

.greeting-cards-page .site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}