/* Critical CSS - FOUC önlemek için (Favori + TikTok + Progress Bar ilk görünüm) */

/* ============================================
   PROGRESS BAR - Critical Stilleri (FOUC Önleme)
   ============================================ */


.checkout-progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin: 0 auto;
    max-width: 400px;
}

.checkout-progress-step {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}

.checkout-progress-step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #53565a;
    border: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

.checkout-progress-step-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.checkout-progress-step-text {
    font-size: 12px;
    font-weight: 500;
    color: #95a5a6;
    white-space: nowrap;
}

/* Active step */
.checkout-progress-step.active .checkout-progress-step-icon,
.checkout-progress-step.completed .checkout-progress-step-icon {
    border-color: #88beaf;
    background: #a3d7c9;
}

/* Progress lines */
.checkout-progress-line-1,
.checkout-progress-line-2 {
    position: absolute;
    top: 33%;
    width: 80px;
    height: 2px;
    background: #e9ecef;
    transform: translateY(-50%);
    z-index: 1;
}

.checkout-progress-line-1 {
    left: 23.5%;
}

.checkout-progress-line-2 {
    left: 57%;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .checkout-progress-step-icon {
        width: 32px;
        height: 32px;
    }
    
    .checkout-progress-step-icon img {
        width: 20px;
        height: 20px;
    }
    
    .checkout-progress-step-text {
        font-size: 11px;
    }
}

/* ============================================
   FAVORİ KALP BADGE - Critical Stilleri
   ============================================ */

.favorite-heart-container {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.favorite-heart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgb(255 255 255 / 19%);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.favorite-heart svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #d24300; /* Sinoz default */
    stroke-width: 2;
    transition: all 0.3s ease;
}

/* The Bath Factory için farklı renk */
body[data-company="The Bath Factory"] .favorite-heart svg {
    stroke: #374151;
}

.favorite-heart.is-favorite svg {
    fill: #d24300;
    stroke: #d24300;
}

body[data-company="The Bath Factory"] .favorite-heart.is-favorite svg {
    fill: #d24300;
    stroke: #d24300;
}

/* Ürün kartı içindeki konumlandırma - Sinoz */
.product-cart-wrap .favorite-heart-container,
.product-item .favorite-heart-container {
    position: absolute;
    top: 0px;
    right: -7px;
    z-index: 10;
}

/* The Bath Factory için farklı konum */
body[data-company="The Bath Factory"] .product-cart-wrap .favorite-heart-container,
body[data-company="The Bath Factory"] .product-item .favorite-heart-container {
    top: 6px;
    left: 5px;
    right: auto;
}

/* Ürün detay sayfası için */
.product-detail .favorite-heart-container {
    position: absolute;
    top: 11px;
    right: 16px;
    z-index: 100;
}

body[data-company="The Bath Factory"] .product-detail .favorite-heart-container {
    left: 15px;
    right: auto;
}

.product-detail .favorite-heart {
    width: 44px;
    height: 44px;
}

.product-detail .favorite-heart svg {
    width: 24px;
    height: 24px;
}

/* ============================================
   TİKTOK VIDEO COMPONENT - Critical Stilleri
   ============================================ */

.tiktok-slide-item {
    display: flex !important;
    justify-content: center;
    align-items: center;
    padding: 20px 8px;
    position: relative;
}

.tiktok-video-wrapper {
    position: relative;
    width: 100%;
    max-width: 350px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.tiktok-video-player {
    width: 100%;
    height: auto;
    aspect-ratio: 9/16;
    display: block;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tiktok-video-player.loaded {
    opacity: 1;
}

/* Loading Placeholder */
.tiktok-video-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(184deg, #ff6a08 0%, #dedad700 85%);
    z-index: 1;
}

.tiktok-video-loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.tiktok-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.tiktok-video-loading p {
    color: #fff;
    margin-top: 15px;
    font-size: 14px;
    font-weight: 500;
}

/* Play/Pause Butonu */
.tiktok-play-pause-btn {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: opacity 0.5s ease, transform 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.tiktok-play-pause-btn svg {
    width: 30px;
    height: 30px;
    color: #000;
}

/* Video oynarken butonu gizle */
.tiktok-video-wrapper.playing .tiktok-play-pause-btn {
    opacity: 0;
    pointer-events: none;
}

/* Paused state için göster */
.tiktok-video-wrapper.paused .tiktok-play-pause-btn,
.tiktok-video-wrapper:not(.playing) .tiktok-play-pause-btn {
    opacity: 1 !important;
    pointer-events: all;
}

/* TikTok Link Container */
.tiktok-link-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    display: flex;
    justify-content: center;
    align-items: center;
}

.tiktok-link-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #000;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    padding: 2px 8px;
}

/* ============================================
   MOBİL UYUMLULUK
   ============================================ */

@media (max-width: 768px) {
    .favorite-heart {
        width: 32px;
        height: 32px;
    }
    
    .favorite-heart svg {
        width: 18px;
        height: 18px;
    }
    
    .product-detail .favorite-heart {
        width: 38px;
        height: 38px;
    }
    
    .product-detail .favorite-heart svg {
        width: 20px;
        height: 20px;
    }
    
    .product-cart-wrap .favorite-heart-container,
    .product-item .favorite-heart-container {
        position: absolute;
        top: -3px;
        right: 5px;
        z-index: 10;
    }
    
    body[data-company="The Bath Factory"] .product-cart-wrap .favorite-heart-container,
    body[data-company="The Bath Factory"] .product-item .favorite-heart-container {
        top: 5px;
        left: 5px;
        right: auto;
    }
    
    .tiktok-slide-item {
        min-height: 400px;
        padding: 10px 5px;
    }
    
    .tiktok-play-pause-btn {
        width: 70px !important;
        height: 70px !important;
    }
    
    .tiktok-play-pause-btn svg {
        width: 30px;
        height: 30px;
    }
}

