/**
 * HashDrip Premium Effects
 * Ultimate visual enhancements for a premium cannabis brand
 *
 * @package HashDrip
 * @version 1.0.0
 */

/* ==========================================================================
   CSS Variables for Effects
   ========================================================================== */
:root {
    --hd-gold: #D4A843;
    --hd-gold-light: #F4D03F;
    --hd-gold-glow: rgba(212, 168, 67, 0.5);
    --hd-black: #0A0A0A;
    --hd-black-light: #141414;
    --hd-blur: 20px;
}

/* ==========================================================================
   1. STICKY HEADER WITH GLASSMORPHISM
   ========================================================================== */
.hd-header {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hd-header.is-scrolled {
    background: rgba(10, 10, 10, 0.85) !important;
    backdrop-filter: blur(var(--hd-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--hd-blur)) saturate(180%);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5),
                0 1px 0 rgba(212, 168, 67, 0.1);
}

.hd-header.is-scrolled .hd-header__inner {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

/* Offset body for fixed header */
body {
    padding-top: 80px;
}

body.admin-bar {
    padding-top: 112px;
}

body.admin-bar .hd-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .hd-header {
        top: 46px;
    }
    body.admin-bar {
        padding-top: 126px;
    }
}

/* ==========================================================================
   2. SCROLL-TRIGGERED ANIMATIONS
   ========================================================================== */
.hd-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);
}

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

.hd-animate--left {
    transform: translateX(-40px);
}

.hd-animate--left.is-visible {
    transform: translateX(0);
}

.hd-animate--right {
    transform: translateX(40px);
}

.hd-animate--right.is-visible {
    transform: translateX(0);
}

.hd-animate--scale {
    transform: scale(0.9);
}

.hd-animate--scale.is-visible {
    transform: scale(1);
}

/* Stagger delays for groups */
.hd-animate-stagger > *:nth-child(1) { transition-delay: 0s; }
.hd-animate-stagger > *:nth-child(2) { transition-delay: 0.1s; }
.hd-animate-stagger > *:nth-child(3) { transition-delay: 0.2s; }
.hd-animate-stagger > *:nth-child(4) { transition-delay: 0.3s; }
.hd-animate-stagger > *:nth-child(5) { transition-delay: 0.4s; }
.hd-animate-stagger > *:nth-child(6) { transition-delay: 0.5s; }

/* ==========================================================================
   3. CUSTOM GOLD CURSOR
   ========================================================================== */
.hd-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid var(--hd-gold);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transition: transform 0.15s ease-out,
                width 0.2s ease,
                height 0.2s ease,
                background 0.2s ease,
                border-color 0.2s ease;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
}

.hd-cursor-dot {
    position: fixed;
    width: 6px;
    height: 6px;
    background: var(--hd-gold);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    transition: transform 0.05s ease-out;
}

.hd-cursor.is-hovering {
    width: 50px;
    height: 50px;
    background: rgba(212, 168, 67, 0.1);
    border-color: var(--hd-gold-light);
}

.hd-cursor.is-clicking {
    transform: translate(-50%, -50%) scale(0.8);
}

/* Hide on touch devices */
@media (hover: none) and (pointer: coarse) {
    .hd-cursor,
    .hd-cursor-dot {
        display: none !important;
    }
}

/* ==========================================================================
   4. ENHANCED BUTTON EFFECTS
   ========================================================================== */
.hd-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Shine sweep effect */
.hd-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s ease;
}

.hd-btn:hover::before {
    left: 100%;
}

/* Glow pulse on primary buttons */
.hd-btn--primary {
    animation: buttonGlowPulse 3s ease-in-out infinite;
}

.hd-btn--primary:hover {
    animation: none;
    box-shadow: 0 0 30px var(--hd-gold-glow),
                0 0 60px rgba(212, 168, 67, 0.3) !important;
    transform: translateY(-3px) !important;
}

.hd-btn--primary:active {
    transform: translateY(-1px) !important;
}

@keyframes buttonGlowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(212, 168, 67, 0.3);
    }
    50% {
        box-shadow: 0 0 35px rgba(212, 168, 67, 0.5),
                    0 0 50px rgba(212, 168, 67, 0.2);
    }
}

/* Secondary button enhancements */
.hd-btn--secondary {
    position: relative;
    background: transparent !important;
    border: 2px solid rgba(212, 168, 67, 0.5) !important;
}

.hd-btn--secondary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--hd-gold), var(--hd-gold-light));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.hd-btn--secondary:hover {
    border-color: var(--hd-gold) !important;
    color: var(--hd-black) !important;
}

.hd-btn--secondary:hover::after {
    opacity: 1;
}

/* ==========================================================================
   5. LOADING ANIMATION / PRELOADER
   ========================================================================== */
.hd-preloader {
    position: fixed;
    inset: 0;
    background: var(--hd-black);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.hd-preloader.is-loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.hd-preloader__logo {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--hd-gold), var(--hd-gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
    animation: preloaderPulse 1.5s ease-in-out infinite;
}

@keyframes preloaderPulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

.hd-preloader__drip {
    display: flex;
    gap: 0.5rem;
}

.hd-preloader__drop {
    width: 12px;
    height: 12px;
    background: linear-gradient(180deg, var(--hd-gold), var(--hd-gold-light));
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: preloaderDrip 1.2s ease-in-out infinite;
}

.hd-preloader__drop:nth-child(2) { animation-delay: 0.2s; }
.hd-preloader__drop:nth-child(3) { animation-delay: 0.4s; }

@keyframes preloaderDrip {
    0%, 100% {
        transform: translateY(0) scaleY(1);
        opacity: 1;
    }
    50% {
        transform: translateY(15px) scaleY(1.3);
        opacity: 0.7;
    }
}

/* Progress bar */
.hd-preloader__bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--hd-gold), var(--hd-gold-light));
    width: 0;
    transition: width 0.3s ease;
}

/* ==========================================================================
   6. CARD HOVER EFFECTS (Products, Testimonials, etc.)
   ========================================================================== */
.hd-product-card,
.hd-testimonial-card,
.woocommerce ul.products li.product {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative;
}

.hd-product-card::before,
.hd-testimonial-card::before,
.woocommerce ul.products li.product::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(135deg, var(--hd-gold), transparent, var(--hd-gold-light));
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.hd-product-card:hover,
.hd-testimonial-card:hover,
.woocommerce ul.products li.product:hover {
    transform: translateY(-10px) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
                0 0 40px rgba(212, 168, 67, 0.15) !important;
}

.hd-product-card:hover::before,
.hd-testimonial-card:hover::before,
.woocommerce ul.products li.product:hover::before {
    opacity: 1;
}

/* Testimonial specific glow */
.hd-testimonial-card {
    background: var(--hd-black-light) !important;
    border: 1px solid rgba(212, 168, 67, 0.1) !important;
}

.hd-testimonial-card:hover {
    border-color: rgba(212, 168, 67, 0.3) !important;
}

/* Product image zoom */
.hd-product-card__image img,
.woocommerce ul.products li.product img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.hd-product-card:hover .hd-product-card__image img,
.woocommerce ul.products li.product:hover img {
    transform: scale(1.08) !important;
}

/* ==========================================================================
   7. FOOTER ENHANCEMENTS
   ========================================================================== */
.hd-footer {
    position: relative;
    overflow: hidden;
}

/* Gradient border at top */
.hd-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent,
        var(--hd-gold) 20%,
        var(--hd-gold-light) 50%,
        var(--hd-gold) 80%,
        transparent
    );
}

/* Animated gradient shimmer */
.hd-footer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.5),
        transparent
    );
    animation: footerShimmer 4s ease-in-out infinite;
}

@keyframes footerShimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Footer link hover effects */
.hd-footer__widget a {
    position: relative;
    transition: color 0.3s ease, padding-left 0.3s ease !important;
}

.hd-footer__widget a::before {
    content: '→';
    position: absolute;
    left: -20px;
    opacity: 0;
    color: var(--hd-gold);
    transition: opacity 0.3s ease, left 0.3s ease;
}

.hd-footer__widget a:hover {
    color: var(--hd-gold) !important;
    padding-left: 15px;
}

.hd-footer__widget a:hover::before {
    opacity: 1;
    left: 0;
}

/* Footer payment method */
.hd-footer__payments {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hd-footer__payments-label {
    color: var(--hd-gray);
    font-size: 0.875rem;
}

.hd-footer__payment-method {
    color: var(--hd-gold);
    font-weight: 600;
    font-size: 0.875rem;
}

/* Social icons enhancement */
.hd-social-links__link {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.hd-social-links__link:hover {
    transform: translateY(-5px) rotate(5deg) !important;
    box-shadow: 0 10px 30px rgba(212, 168, 67, 0.3) !important;
}

/* Newsletter form glow */
.hd-newsletter-form .hd-form__input:focus {
    box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.2),
                0 0 20px rgba(212, 168, 67, 0.1) !important;
}

/* ==========================================================================
   8. PRODUCT QUICK-VIEW MODAL
   ========================================================================== */
.hd-quickview-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.hd-quickview-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.hd-quickview-modal {
    background: var(--hd-black-light);
    border-radius: 1rem;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(212, 168, 67, 0.2);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

.hd-quickview-overlay.is-active .hd-quickview-modal {
    transform: scale(1) translateY(0);
}

.hd-quickview-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: rgba(212, 168, 67, 0.1);
    border: 1px solid rgba(212, 168, 67, 0.3);
    border-radius: 50%;
    color: var(--hd-gold);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.hd-quickview-close:hover {
    background: var(--hd-gold);
    color: var(--hd-black);
    transform: rotate(90deg);
}

.hd-quickview-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
    position: relative;
}

@media (max-width: 768px) {
    .hd-quickview-content {
        grid-template-columns: 1fr;
    }
}

.hd-quickview-image img {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

.hd-quickview-info h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.hd-quickview-price {
    font-size: 1.5rem;
    color: var(--hd-gold);
    font-weight: 700;
    margin-bottom: 1rem;
}

.hd-quickview-desc {
    color: #9CA3AF;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

/* ==========================================================================
   9. ANIMATED DRIP LOGO
   ========================================================================== */
.hd-header__logo-img,
.hd-footer__brand-name {
    position: relative;
}

.hd-header__logo-link {
    position: relative;
    display: inline-block;
}

/* Drip drops animation */
.hd-header__logo-link::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    width: 6px;
    height: 6px;
    background: var(--hd-gold);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    opacity: 0;
    animation: logoDrip 3s ease-in-out infinite;
    transform: translateX(-50%);
}

@keyframes logoDrip {
    0%, 100% {
        opacity: 0;
        transform: translateX(-50%) translateY(0) scale(0.5);
    }
    10% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
    30% {
        opacity: 1;
        transform: translateX(-50%) translateY(10px) scale(0.8);
    }
    50% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px) scale(0.3);
    }
}

/* Logo hover glow */
.hd-header__logo-link:hover .hd-header__logo-img {
    filter: drop-shadow(0 0 10px rgba(212, 168, 67, 0.5));
    transition: filter 0.3s ease;
}

/* Footer brand animated gradient */
.hd-footer__brand-name {
    background: linear-gradient(
        90deg,
        var(--hd-gold),
        var(--hd-gold-light),
        var(--hd-gold)
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: brandGradient 3s linear infinite;
}

@keyframes brandGradient {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* ==========================================================================
   10. ADDITIONAL PREMIUM TOUCHES
   ========================================================================== */

/* Section dividers with gold accent */
.hd-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--hd-gold), transparent);
}

/* Image reveal animation */
.hd-reveal-image {
    overflow: hidden;
}

.hd-reveal-image img {
    transform: scale(1.2);
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.hd-reveal-image.is-visible img {
    transform: scale(1);
}

/* Text highlight effect */
.text-gold {
    position: relative;
    color: var(--hd-gold) !important;
}

.text-gold::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(180deg, transparent, rgba(212, 168, 67, 0.1));
    z-index: -1;
}

/* Features bar hover */
.hd-features-bar__item {
    transition: transform 0.3s ease, background 0.3s ease !important;
    padding: 1rem;
    border-radius: 0.5rem;
}

.hd-features-bar__item:hover {
    transform: translateY(-5px);
    background: rgba(212, 168, 67, 0.05);
}

.hd-features-bar__icon {
    transition: transform 0.3s ease, color 0.3s ease !important;
}

.hd-features-bar__item:hover .hd-features-bar__icon {
    transform: scale(1.2);
    color: var(--hd-gold);
}

/* Smooth page transitions */
.hd-main {
    animation: pageEnter 0.6s ease-out;
}

@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Selection color */
::selection {
    background: var(--hd-gold);
    color: var(--hd-black);
}

::-moz-selection {
    background: var(--hd-gold);
    color: var(--hd-black);
}
