/**
 * ============================================================================
 * VENDOR STORE PAGE - Elevated Glassmorphic Editorial Design
 * ============================================================================
 *
 * Modern, cutting-edge vendor hero with centered editorial layout,
 * refined glassmorphism, luxury accents, and choreographed animations.
 *
 * Related files:
 * - store-vendor.php (template)
 * - assets/css/vendor-badges.css (badge-specific styles)
 *
 * Design: Refined Editorial Glassmorphism
 * Updated: January 2026
 * ============================================================================
 */

/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */

:root {
    --vh-accent-gold: #c9a376;
    --vh-accent-gold-dim: rgba(201, 163, 118, 0.15);
    --vh-glass-bg: rgba(12, 12, 12, 0.85);
    --vh-glass-border: rgba(255, 255, 255, 0.08);
    --vh-glass-border-hover: rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   Keyframe Animations
   ========================================================================== */

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

@keyframes avatarReveal {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.08);
    }
}

@keyframes lineExpand {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 60px;
        opacity: 1;
    }
}

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

/* ==========================================================================
   Vendor Hero - Main Container
   ========================================================================== */

.vendor-hero {
    position: relative;
    margin-bottom: 50px;
    background-color: var(--color-bg-darker, #0e0e0e);
    overflow: hidden;
}

/* ==========================================================================
   Banner with Enhanced Gradient Overlay
   ========================================================================== */

.vendor-hero__banner {
    position: relative;
    height: 320px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.vendor-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(14, 14, 14, 0.7) 0%,
        rgba(14, 14, 14, 0.75) 40%,
        rgba(14, 14, 14, 0.9) 75%,
        rgba(14, 14, 14, 1) 100%
    );
}

/* ==========================================================================
   Content Container - Centered Layout
   ========================================================================== */

.vendor-hero__content {
    position: relative;
    max-width: 950px;
    margin: -220px auto 0;
    padding: 0 2rem 3rem;
    z-index: 2;
    display: flex;
    justify-content: center;
}

/* ==========================================================================
   Glassmorphic Card
   ========================================================================== */

.vendor-hero__card {
    width: 100%;
    max-width: 880px;
    padding: 3rem 3rem 2.5rem;
    background: var(--vh-glass-bg);
    border-radius: 20px;
    border: 1px solid var(--vh-glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset;
    text-align: center;

    animation: cardReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ==========================================================================
   Avatar with Glow Effect
   ========================================================================== */

.vendor-hero__avatar-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 1.75rem;
}

.vendor-hero__avatar-glow {
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        var(--vh-accent-gold-dim) 0%,
        transparent 70%
    );
    filter: blur(15px);
    animation: glowPulse 4s ease-in-out infinite;
    pointer-events: none;
}

.vendor-hero__avatar {
    position: relative;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    z-index: 1;

    animation: avatarReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.15s backwards;
}

.vendor-hero__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   Typography - Editorial Treatment
   ========================================================================== */

.vendor-hero__title {
    font-size: 2.75rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.15;
    margin: 0 0 1.25rem;
    color: var(--color-text, #f1f1f1);

    /* Subtle gradient for depth */
    background: linear-gradient(
        180deg,
        #ffffff 0%,
        rgba(255, 255, 255, 0.88) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;

    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.25s backwards;
}

/* ==========================================================================
   Gold Accent Line
   ========================================================================== */

.vendor-hero__accent-line {
    width: 60px;
    height: 1px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--vh-accent-gold) 50%,
        transparent 100%
    );

    animation: lineExpand 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.35s backwards;
}

/* ==========================================================================
   Description
   ========================================================================== */

.vendor-hero__description {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text-secondary, #bbbbbb);
    max-width: 680px;
    margin: 0 auto 1.75rem;
    opacity: 0.92;

    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.45s backwards;
}

/* Description Content - Truncated State */
.vendor-hero__description[data-truncate="true"] .vendor-hero__description-content {
    max-height: 5.1em; /* ~3 lines at 1.7 line-height */
    overflow: hidden;
    position: relative;
}

/* Fade out at bottom of truncated content */
.vendor-hero__description[data-truncate="true"] .vendor-hero__description-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2em;
    background: linear-gradient(to bottom, transparent, var(--vh-glass-bg));
    pointer-events: none;
}

/* Expanded state - remove truncation */
.vendor-hero__description[data-expanded="true"] .vendor-hero__description-content {
    max-height: none;
}

.vendor-hero__description[data-expanded="true"] .vendor-hero__description-content::after {
    display: none;
}

/* Read More Button - Premium Pill */
/* Hidden by default to prevent flicker - JS reveals when needed */
.vendor-hero__read-more {
    display: none;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.875rem;
    padding: 0.5rem 1.25rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* JS adds data-needs-toggle when content IS truncated - reveal button */
.vendor-hero__description[data-needs-toggle="true"] .vendor-hero__read-more {
    display: inline-flex;
}

.vendor-hero__read-more:hover {
    border-color: var(--vh-accent-gold);
    color: var(--vh-accent-gold);
    transform: translateY(-1px);
}

.vendor-hero__read-more-icon {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.vendor-hero__read-more:hover .vendor-hero__read-more-icon {
    transform: translateY(2px);
}

/* Hide button when expanded */
.vendor-hero__description[data-expanded="true"] .vendor-hero__read-more {
    display: none;
}

/* JS sets data-short="true" when content fits - remove truncation styling */
.vendor-hero__description[data-short="true"] .vendor-hero__description-content {
    max-height: none;
}

.vendor-hero__description[data-short="true"] .vendor-hero__description-content::after {
    display: none;
}

/* ==========================================================================
   Actions Container
   ========================================================================== */

.vendor-hero__actions {
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.55s backwards;
}

/* ==========================================================================
   Follow Button - Premium Pill Design
   ========================================================================== */

.vendor-hero__follow-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2.5rem;
    min-width: 140px;
    background: transparent;
    color: var(--color-text, #f1f1f1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 100px;
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: 0.015em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.vendor-hero__follow-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 100px;
    background: linear-gradient(
        135deg,
        var(--vh-accent-gold-dim) 0%,
        rgba(201, 163, 118, 0.05) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.vendor-hero__follow-btn:hover {
    border-color: var(--vh-accent-gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(201, 163, 118, 0.2);
}

.vendor-hero__follow-btn:hover::before {
    opacity: 1;
}

.vendor-hero__follow-btn:active {
    transform: translateY(0);
}

.vendor-hero__follow-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Following State */
.vendor-hero__follow-btn--following {
    background: var(--vh-accent-gold-dim);
    border-color: rgba(201, 163, 118, 0.4);
}

.vendor-hero__follow-btn--following::before {
    opacity: 1;
}

/* ==========================================================================
   Responsive - Tablet
   ========================================================================== */

@media (max-width: 768px) {
    .vendor-hero__banner {
        height: 320px;
    }

    .vendor-hero__content {
        margin-top: -180px;
        padding: 0 1.25rem 2.5rem;
    }

    .vendor-hero__card {
        padding: 2.5rem 2rem 2rem;
        border-radius: 16px;
    }

    .vendor-hero__avatar-wrapper {
        margin-bottom: 1.5rem;
    }

    .vendor-hero__avatar {
        width: 110px;
        height: 110px;
    }

    .vendor-hero__avatar-glow {
        inset: -10px;
    }

    .vendor-hero__title {
        font-size: 2.25rem;
        margin-bottom: 1rem;
    }

    .vendor-hero__accent-line {
        margin-bottom: 1.25rem;
    }

    .vendor-hero__description {
        font-size: 0.9375rem;
        margin-bottom: 1.5rem;
    }

    .vendor-hero__follow-btn {
        padding: 0.75rem 2rem;
        font-size: 0.875rem;
    }
}

/* ==========================================================================
   Responsive - Mobile
   ========================================================================== */

@media (max-width: 480px) {
    .vendor-hero__banner {
        height: 260px;
    }

    .vendor-hero__content {
        margin-top: -150px;
        padding: 0 1rem 2rem;
    }

    .vendor-hero__card {
        padding: 2rem 1.5rem 1.75rem;
        border-radius: 14px;
    }

    .vendor-hero__avatar-wrapper {
        margin-bottom: 1.25rem;
    }

    .vendor-hero__avatar {
        width: 90px;
        height: 90px;
        border-width: 2px;
    }

    .vendor-hero__avatar-glow {
        inset: -8px;
        filter: blur(12px);
    }

    .vendor-hero__title {
        font-size: 1.75rem;
        margin-bottom: 0.875rem;
    }

    .vendor-hero__accent-line {
        width: 50px;
        margin-bottom: 1rem;
    }

    .vendor-hero__description {
        font-size: 0.875rem;
        line-height: 1.65;
        margin-bottom: 1.25rem;
    }

    .vendor-hero__actions {
        margin-bottom: 1.25rem;
    }

    .vendor-hero__follow-btn {
        width: 100%;
        padding: 0.875rem 1.5rem;
    }
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .vendor-hero__card,
    .vendor-hero__avatar,
    .vendor-hero__title,
    .vendor-hero__accent-line,
    .vendor-hero__description,
    .vendor-hero__actions {
        animation: none;
    }

    .vendor-hero__avatar-glow {
        animation: none;
        opacity: 0.5;
    }

    .vendor-hero__follow-btn {
        transition: none;
    }
}
