/* ============================================
   STYLEHUB IMAGE PLACEHOLDER - COFFEE ANIMATION
   Đắk Lắk Coffee Style ☕
   Version: 1.0
   ============================================ */

/* ===== BASE PLACEHOLDER ===== */
.stylehub-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f0eb 0%, #e8ddd5 50%, #f0e6dc 100%);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    font-family: 'Inter', 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100px;
    min-width: 100px;
}

.stylehub-placeholder::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 90, 43, 0.05) 0%, transparent 50%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(25%, 25%);
    }
}

/* ===== SIZE VARIANTS ===== */
.placeholder-xs {
    width: 50px;
    height: 50px;
}

.placeholder-sm {
    width: 80px;
    height: 80px;
}

.placeholder-md {
    width: 150px;
    height: 150px;
}

.placeholder-lg {
    width: 250px;
    height: 250px;
}

.placeholder-xl {
    width: 350px;
    height: 350px;
}

.placeholder-full {
    width: 100%;
    height: 100%;
    aspect-ratio: 1;
}

.placeholder-card {
    width: 100%;
    height: 200px;
}

/* ===== COFFEE BEANS CONTAINER ===== */
.coffee-beans {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.coffee-bean {
    font-size: 1.5rem;
    filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.2));
}

/* Bean 1 - Bouncing Happy */
.coffee-bean:nth-child(1) {
    animation: bounce1 1.4s ease-in-out infinite;
    color: #8B4513;
}

/* Bean 2 - Rotating Joy */
.coffee-bean:nth-child(2) {
    animation: bounce2 1.4s ease-in-out infinite 0.2s;
    color: #A0522D;
}

/* Bean 3 - Dancing Energy */
.coffee-bean:nth-child(3) {
    animation: bounce3 1.4s ease-in-out infinite 0.4s;
    color: #6F4E37;
}

@keyframes bounce1 {

    0%,
    100% {
        transform: translateY(0) rotate(0deg) scale(1);
    }

    25% {
        transform: translateY(-12px) rotate(-15deg) scale(1.1);
    }

    50% {
        transform: translateY(-5px) rotate(10deg) scale(0.95);
    }

    75% {
        transform: translateY(-8px) rotate(-5deg) scale(1.05);
    }
}

@keyframes bounce2 {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-15px) rotate(360deg);
    }
}

@keyframes bounce3 {

    0%,
    100% {
        transform: translateY(0) rotate(0deg) scale(1);
    }

    33% {
        transform: translateY(-10px) rotate(20deg) scale(1.15);
    }

    66% {
        transform: translateY(-5px) rotate(-10deg) scale(0.9);
    }
}

/* ===== STYLEHUB LOGO TEXT ===== */
.stylehub-text {
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 3px;
    background: linear-gradient(90deg, #8B4513, #D2691E, #CD853F, #D2691E, #8B4513);
    background-size: 300% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShine 3s linear infinite;
    position: relative;
    z-index: 1;
}

@keyframes textShine {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 300% center;
    }
}

/* ===== STATUS TEXT ===== */
.status-text {
    font-size: 0.7rem;
    color: #A0522D;
    margin-top: 6px;
    opacity: 0.8;
    animation: fadeInOut 2s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

@keyframes fadeInOut {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

/* ===== COFFEE STEAM DECORATION ===== */
.coffee-steam {
    position: absolute;
    top: 15%;
    display: flex;
    gap: 4px;
}

.steam {
    width: 3px;
    height: 15px;
    background: rgba(139, 90, 43, 0.3);
    border-radius: 50%;
    animation: steam 2s ease-out infinite;
}

.steam:nth-child(1) {
    animation-delay: 0s;
}

.steam:nth-child(2) {
    animation-delay: 0.3s;
    height: 20px;
}

.steam:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes steam {
    0% {
        transform: translateY(0) scaleY(1);
        opacity: 0.6;
    }

    50% {
        transform: translateY(-10px) scaleY(1.5);
        opacity: 0.3;
    }

    100% {
        transform: translateY(-20px) scaleY(1);
        opacity: 0;
    }
}

/* ===== TYPE: LOADING ===== */
.placeholder-loading .coffee-bean {
    animation-duration: 0.8s;
}

.placeholder-loading .status-text::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0% {
        content: '';
    }

    25% {
        content: '.';
    }

    50% {
        content: '..';
    }

    75% {
        content: '...';
    }

    100% {
        content: '';
    }
}

/* ===== TYPE: ERROR ===== */
.placeholder-error {
    background: linear-gradient(135deg, #fdf2f2 0%, #fee2e2 50%, #fdf2f2 100%);
}

.placeholder-error .coffee-bean {
    animation: shake 0.5s ease-in-out infinite;
    color: #dc3545;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-3px) rotate(-5deg);
    }

    75% {
        transform: translateX(3px) rotate(5deg);
    }
}

.placeholder-error .stylehub-text {
    background: linear-gradient(90deg, #dc3545, #ff6b6b, #dc3545);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
}

.placeholder-error .status-text {
    color: #dc3545;
}

/* ===== TYPE: SUCCESS (bonus) ===== */
.placeholder-success {
    background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 50%, #f0fff4 100%);
}

.placeholder-success .coffee-bean {
    animation: celebrate 1s ease-in-out infinite;
    color: #28a745;
}

@keyframes celebrate {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
    }

    25% {
        transform: scale(1.2) rotate(-10deg);
    }

    50% {
        transform: scale(1) rotate(10deg);
    }

    75% {
        transform: scale(1.1) rotate(-5deg);
    }
}

.placeholder-success .stylehub-text {
    background: linear-gradient(90deg, #28a745, #48bb78, #28a745);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
}

/* ===== SIZE ADJUSTMENTS ===== */

/* Extra Small */
.placeholder-xs .coffee-beans {
    gap: 2px;
    margin-bottom: 4px;
}

.placeholder-xs .coffee-bean {
    font-size: 0.7rem;
}

.placeholder-xs .stylehub-text {
    font-size: 0.4rem;
    letter-spacing: 1px;
}

.placeholder-xs .status-text {
    display: none;
}

.placeholder-xs .coffee-steam {
    display: none;
}

/* Small */
.placeholder-sm .coffee-beans {
    gap: 4px;
    margin-bottom: 6px;
}

.placeholder-sm .coffee-bean {
    font-size: 1rem;
}

.placeholder-sm .stylehub-text {
    font-size: 0.6rem;
    letter-spacing: 1px;
}

.placeholder-sm .status-text {
    font-size: 0.5rem;
}

.placeholder-sm .coffee-steam {
    top: 10%;
}

/* Large */
.placeholder-lg .coffee-beans {
    gap: 15px;
    margin-bottom: 20px;
}

.placeholder-lg .coffee-bean {
    font-size: 2.5rem;
}

.placeholder-lg .stylehub-text {
    font-size: 1.2rem;
    letter-spacing: 5px;
}

.placeholder-lg .status-text {
    font-size: 0.9rem;
}

.placeholder-lg .steam {
    width: 5px;
    height: 25px;
}

/* Extra Large */
.placeholder-xl .coffee-beans {
    gap: 20px;
    margin-bottom: 25px;
}

.placeholder-xl .coffee-bean {
    font-size: 3.5rem;
}

.placeholder-xl .stylehub-text {
    font-size: 1.5rem;
    letter-spacing: 8px;
}

.placeholder-xl .status-text {
    font-size: 1rem;
}

.placeholder-xl .steam {
    width: 6px;
    height: 35px;
}

/* Card size */
.placeholder-card .coffee-bean {
    font-size: 2rem;
}

.placeholder-card .stylehub-text {
    font-size: 1rem;
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    .stylehub-placeholder {
        background: linear-gradient(135deg, #2d2520 0%, #3d332a 50%, #2d2520 100%);
    }

    .stylehub-placeholder::before {
        background: radial-gradient(circle, rgba(210, 150, 80, 0.1) 0%, transparent 50%);
    }

    .status-text {
        color: #d4a574;
    }

    .steam {
        background: rgba(210, 150, 80, 0.4);
    }
}

/* ===== UTILITY: HIDE ELEMENTS ===== */
.placeholder-minimal .coffee-steam,
.placeholder-minimal .status-text {
    display: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 576px) {
    .placeholder-lg {
        width: 180px;
        height: 180px;
    }

    .placeholder-xl {
        width: 250px;
        height: 250px;
    }

    .placeholder-lg .coffee-bean {
        font-size: 2rem;
    }

    .placeholder-xl .coffee-bean {
        font-size: 2.5rem;
    }
}