/* ========================================
   CREATIVE LOADERS - FAMILY CALM
   ======================================== */

/* Main Page Loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Heart Pulse Loader */
.heart-loader {
    position: relative;
    width: 100px;
    height: 100px;
}

.heart-loader .heart {
    position: absolute;
    width: 60px;
    height: 60px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    background: white;
    animation: heartbeat 1.2s ease infinite;
}

.heart-loader .heart::before,
.heart-loader .heart::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
}

.heart-loader .heart::before {
    top: -30px;
    left: 0;
}

.heart-loader .heart::after {
    left: 30px;
    top: 0;
}

@keyframes heartbeat {
    0%, 100% {
        transform: translate(-50%, -50%) rotate(-45deg) scale(1);
    }
    25% {
        transform: translate(-50%, -50%) rotate(-45deg) scale(1.2);
    }
    50% {
        transform: translate(-50%, -50%) rotate(-45deg) scale(1);
    }
}

/* Pills Loader */
.pills-loader {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.pill {
    width: 12px;
    height: 40px;
    background: white;
    border-radius: 25px;
    animation: pillJump 1.2s ease infinite;
}

.pill:nth-child(1) {
    animation-delay: 0s;
}

.pill:nth-child(2) {
    animation-delay: 0.15s;
}

.pill:nth-child(3) {
    animation-delay: 0.3s;
}

.pill:nth-child(4) {
    animation-delay: 0.45s;
}

.pill:nth-child(5) {
    animation-delay: 0.6s;
}

@keyframes pillJump {
    0%, 100% {
        transform: scaleY(1);
    }
    50% {
        transform: scaleY(1.8);
    }
}

/* Medical Cross Loader */
.cross-loader {
    position: relative;
    width: 80px;
    height: 80px;
}

.cross-loader .cross {
    position: absolute;
    width: 100%;
    height: 100%;
    animation: crossRotate 2s linear infinite;
}

.cross-loader .cross::before,
.cross-loader .cross::after {
    content: '';
    position: absolute;
    background: white;
    border-radius: 5px;
}

.cross-loader .cross::before {
    width: 20px;
    height: 80px;
    left: 50%;
    transform: translateX(-50%);
}

.cross-loader .cross::after {
    width: 80px;
    height: 20px;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes crossRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* DNA Helix Loader */
.dna-loader {
    position: relative;
    width: 80px;
    height: 80px;
}

.dna-strand {
    position: absolute;
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    animation: dnaRotate 2s linear infinite;
}

.dna-strand:nth-child(1) { animation-delay: 0s; }
.dna-strand:nth-child(2) { animation-delay: -0.25s; }
.dna-strand:nth-child(3) { animation-delay: -0.5s; }
.dna-strand:nth-child(4) { animation-delay: -0.75s; }
.dna-strand:nth-child(5) { animation-delay: -1s; }
.dna-strand:nth-child(6) { animation-delay: -1.25s; }
.dna-strand:nth-child(7) { animation-delay: -1.5s; }
.dna-strand:nth-child(8) { animation-delay: -1.75s; }

@keyframes dnaRotate {
    0%, 100% {
        transform: translate(0, 0);
        opacity: 1;
    }
    25% {
        transform: translate(35px, 20px);
        opacity: 0.5;
    }
    50% {
        transform: translate(0, 40px);
        opacity: 1;
    }
    75% {
        transform: translate(-35px, 60px);
        opacity: 0.5;
    }
    100% {
        transform: translate(0, 80px);
        opacity: 0;
    }
}

/* Capsule Loader */
.capsule-loader {
    position: relative;
    width: 100px;
    height: 50px;
}

.capsule {
    position: absolute;
    width: 100px;
    height: 50px;
    border-radius: 25px;
    overflow: hidden;
    border: 3px solid white;
}

.capsule-half {
    position: absolute;
    width: 50%;
    height: 100%;
    top: 0;
}

.capsule-half:first-child {
    left: 0;
    background: white;
    animation: capsuleLeft 1.5s ease infinite;
}

.capsule-half:last-child {
    right: 0;
    background: rgba(255, 255, 255, 0.5);
    animation: capsuleRight 1.5s ease infinite;
}

@keyframes capsuleLeft {
    0%, 100% {
        width: 50%;
    }
    50% {
        width: 30%;
    }
}

@keyframes capsuleRight {
    0%, 100% {
        width: 50%;
    }
    50% {
        width: 70%;
    }
}

/* Pulse Waves Loader */
.pulse-loader {
    position: relative;
    width: 120px;
    height: 60px;
}

.pulse-wave {
    position: absolute;
    width: 4px;
    background: white;
    border-radius: 2px;
    animation: pulseWave 1.2s ease infinite;
}

.pulse-wave:nth-child(1) { left: 0px; height: 10px; animation-delay: 0s; }
.pulse-wave:nth-child(2) { left: 10px; height: 30px; animation-delay: 0.1s; }
.pulse-wave:nth-child(3) { left: 20px; height: 50px; animation-delay: 0.2s; }
.pulse-wave:nth-child(4) { left: 30px; height: 60px; animation-delay: 0.3s; }
.pulse-wave:nth-child(5) { left: 40px; height: 40px; animation-delay: 0.4s; }
.pulse-wave:nth-child(6) { left: 50px; height: 20px; animation-delay: 0.5s; }
.pulse-wave:nth-child(7) { left: 60px; height: 35px; animation-delay: 0.6s; }
.pulse-wave:nth-child(8) { left: 70px; height: 55px; animation-delay: 0.7s; }
.pulse-wave:nth-child(9) { left: 80px; height: 45px; animation-delay: 0.8s; }
.pulse-wave:nth-child(10) { left: 90px; height: 25px; animation-delay: 0.9s; }
.pulse-wave:nth-child(11) { left: 100px; height: 15px; animation-delay: 1s; }

@keyframes pulseWave {
    0%, 100% {
        opacity: 0.3;
        transform: scaleY(1);
    }
    50% {
        opacity: 1;
        transform: scaleY(1.2);
    }
}

/* Syringe Loader */
.syringe-loader {
    position: relative;
    width: 100px;
    height: 100px;
}

.syringe {
    position: absolute;
    width: 60px;
    height: 8px;
    background: white;
    border-radius: 4px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: syringeMove 2s ease infinite;
}

.syringe::before {
    content: '';
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid white;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.syringe::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 2px;
    animation: syringeFill 2s ease infinite;
}

@keyframes syringeMove {
    0%, 100% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    50% {
        transform: translate(-50%, -50%) rotate(180deg);
    }
}

@keyframes syringeFill {
    0%, 100% {
        width: 40px;
    }
    50% {
        width: 10px;
    }
}

/* Loading Text */
.loader-text {
    font-family: 'Poppins', sans-serif;
    margin-top: 30px;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.3px;
    animation: textPulse 1.5s ease infinite;
}

.loader-text .dot {
    animation: dotBounce 1.5s ease infinite;
}

.loader-text .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.loader-text .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes textPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

@keyframes dotBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Inline Content Loader */
.content-loader {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 20px;
}

.spinner-dots {
    display: flex;
    gap: 8px;
}

.spinner-dot {
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: dotPulse 1.4s ease infinite;
}

.spinner-dot:nth-child(1) {
    animation-delay: 0s;
}

.spinner-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.spinner-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }
}

/* Ring Loader */
.ring-loader {
    position: relative;
    width: 80px;
    height: 80px;
}

.ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: ringRotate 1s linear infinite;
}

.ring:nth-child(2) {
    border-top-color: rgba(255, 255, 255, 0.6);
    animation-duration: 1.5s;
    animation-direction: reverse;
}

.ring:nth-child(3) {
    border-top-color: rgba(255, 255, 255, 0.3);
    animation-duration: 2s;
}

@keyframes ringRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Stethoscope Loader */
.stethoscope-loader {
    position: relative;
    width: 100px;
    height: 100px;
}

.stethoscope {
    position: absolute;
    width: 60px;
    height: 60px;
    border: 4px solid white;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-top-color: transparent;
    animation: stethoscopeRotate 1.5s ease infinite;
}

.stethoscope::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 30px;
    background: white;
    border-radius: 4px;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
}

.stethoscope::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

@keyframes stethoscopeRotate {
    0%, 100% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    50% {
        transform: translate(-50%, -50%) rotate(180deg);
    }
}

/* Brand Loader */
.brand-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.brand-logo {
    font-size: 4rem;
    color: white;
    animation: logoFloat 2s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.progress-bar-container {
    width: 200px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: white;
    border-radius: 3px;
    animation: progressFill 2s ease infinite;
}

@keyframes progressFill {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

/* Small Inline Loader */
.btn-loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Skeleton Loader for Products */
.skeleton-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.skeleton-image {
    width: 100%;
    height: 250px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s ease infinite;
}

.skeleton-content {
    padding: 1.5rem;
}

.skeleton-line {
    height: 16px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    margin-bottom: 10px;
    animation: skeletonLoading 1.5s ease infinite;
}

.skeleton-line.short {
    width: 60%;
}

.skeleton-line.medium {
    width: 80%;
}

@keyframes skeletonLoading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .loader-text {
        font-size: 1.2rem;
    }
    
    .heart-loader {
        width: 80px;
        height: 80px;
    }
    
    .heart-loader .heart {
        width: 50px;
        height: 50px;
    }
}

