/* ========================================
   ANIMATIONS CSS - MODERN EFEKTLER
   Profesyonel animasyonlar ve geçişler
======================================== */

/* ========================================
   KEYFRAME ANİMASYONLARI
======================================== */

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translateY(0);
    }
    40%, 43% {
        transform: translateY(-15px);
    }
    70% {
        transform: translateY(-7px);
    }
    90% {
        transform: translateY(-3px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(205, 197, 191, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(205, 197, 191, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(205, 197, 191, 0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes rotate360 {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(102, 126, 234, 0.2);
    }
    50% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.6);
    }
}

/* ========================================
   SCROLL REVEAL ANİMASYONLARI
======================================== */

.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease;
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-zoom {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s ease;
}

.reveal-zoom.active {
    opacity: 1;
    transform: scale(1);
}

/* ========================================
   HOVER EFEKTLERI
======================================== */

.hover-lift {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.hover-glow:hover {
    animation: glow 2s ease-in-out infinite;
}

.hover-bounce:hover {
    animation: bounce 1s ease-in-out;
}

.hover-rotate:hover {
    transform: rotate(5deg) scale(1.05);
    transition: all 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.1);
    transition: all 0.3s ease;
}

/* ========================================
   BUTON ANİMASYONLARI
======================================== */

.btn-animated {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-animated::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;
}

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

.btn-pulse {
    animation: pulse 2s infinite;
}

.btn-shake:hover {
    animation: shake 0.5s ease-in-out;
}

/* ========================================
   LOADİNG ANİMASYONLARI
======================================== */

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color, #cdc5bf);
    border-radius: 50%;
    animation: rotate360 1s linear infinite;
}

.spinner-large {
    width: 60px;
    height: 60px;
    border-width: 6px;
}

.spinner-small {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.pulse-loader {
    width: 40px;
    height: 40px;
    background: var(--primary-color, #cdc5bf);
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

.dots-loader {
    display: flex;
    gap: 5px;
}

.dots-loader div {
    width: 8px;
    height: 8px;
    background: var(--primary-color, #cdc5bf);
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite both;
}

.dots-loader div:nth-child(1) { animation-delay: -0.32s; }
.dots-loader div:nth-child(2) { animation-delay: -0.16s; }

/* ========================================
   KATEGORI MENU ANİMASYONLARI
======================================== */

.category-item {
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.category-item:hover {
    transform: scale(1.1) translateY(-10px);
    animation: glow 2s ease-in-out infinite;
}

.category-item:nth-child(1) { animation-delay: 0.1s; }
.category-item:nth-child(2) { animation-delay: 0.2s; }
.category-item:nth-child(3) { animation-delay: 0.3s; }
.category-item:nth-child(4) { animation-delay: 0.4s; }
.category-item:nth-child(5) { animation-delay: 0.5s; }
.category-item:nth-child(6) { animation-delay: 0.6s; }
.category-item:nth-child(7) { animation-delay: 0.7s; }
.category-item:nth-child(8) { animation-delay: 0.8s; }

/* ========================================
   ÜRÜN KART ANİMASYONLARI
======================================== */

.product-card {
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.product-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.product-card:hover .product-image {
    animation: float 3s ease-in-out infinite;
}

.product-card:hover .product-button {
    transform: translateY(-2px);
    animation: glow 2s ease-in-out infinite;
}

/* ========================================
   SAYFA GEÇİŞ ANİMASYONLARI
======================================== */

.page-enter {
    animation: fadeInUp 0.8s ease-out;
}

.page-exit {
    animation: fadeInDown 0.5s ease-in reverse;
}

.modal-enter {
    animation: zoomIn 0.3s ease-out;
}

.modal-exit {
    animation: zoomIn 0.2s ease-in reverse;
}

/* ========================================
   TEXT ANİMASYONLARI
======================================== */

.text-typing {
    overflow: hidden;
    border-right: 3px solid var(--primary-color, #cdc5bf);
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    from, to { border-color: transparent; }
    50% { border-color: var(--primary-color, #cdc5bf); }
}

/* ========================================
   PARALLAX EFEKT
======================================== */

.parallax {
    transform: translateZ(0);
    transition: transform 0.1s ease-out;
}

/* ========================================
   MOBILE OPTİMİZASYON
======================================== */

@media (max-width: 768px) {
    .category-item:hover {
        transform: scale(1.05) translateY(-5px);
    }
    
    .product-card:hover {
        transform: translateY(-6px) scale(1.01);
    }
    
    .hover-lift:hover {
        transform: translateY(-4px);
    }
}

/* ========================================
   REDUCED MOTION AYARLARI
======================================== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ========================================
   UTILITY ANIMATION CLASSES
======================================== */

.animate-fadeInUp { animation: fadeInUp 0.8s ease-out; }
.animate-fadeInDown { animation: fadeInDown 0.8s ease-out; }
.animate-fadeInLeft { animation: fadeInLeft 0.8s ease-out; }
.animate-fadeInRight { animation: fadeInRight 0.8s ease-out; }
.animate-zoomIn { animation: zoomIn 0.6s ease-out; }
.animate-bounce { animation: bounce 1s ease-in-out; }
.animate-pulse { animation: pulse 2s infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-glow { animation: glow 2s ease-in-out infinite; }

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
/* ========================================
   SONSUZ KAYAN CAROUSEL ANİMASYONU
======================================== */

.carousel-menu-section {
    overflow: hidden !important;
}

.sliding-products-container {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow: hidden !important;
    animation: scrollRight 25s linear infinite !important;
    width: max-content !important;
    gap: 20px !important;
}

.sliding-products-container:hover {
    animation-play-state: paused !important;
}

/* Sağa doğru sonsuz kayma animasyonu */
@keyframes scrollRight {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Kartları sabitlemek için */
.sliding-product-item {
    flex-shrink: 0 !important;
    animation: none !important; /* Diğer animasyonları iptal et */
}

/* Hover'da kartın kendi animasyonu devam etsin */
.sliding-product-item:hover {
    animation: float 3s ease-in-out infinite !important;
    z-index: 100;
}

/* Mobile optimizasyon */
@media (max-width: 768px) {
    .sliding-products-container {
        animation: scrollRight 20s linear infinite !important;
    }
}
