/* ==========================================================================
   CRO Before & After Slider
   Premium Skincare Style
   ========================================================================== */

.cro-before-after-section {
    max-width: 700px;
    margin: 40px auto;
    padding: 40px 30px;
    background: linear-gradient(180deg, #fdfcfb 0%, #f9f7f4 100%);
    border-radius: 20px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06);
    text-align: center;
    box-sizing: border-box;
}

/* Section Header */
.cro-before-after-header {
    margin-bottom: 30px;
}

.cro-before-after-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #b8860b;
    margin-bottom: 12px;
}

.cro-before-after-badge svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.cro-before-after-title {
    font-size: 26px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 10px 0;
    line-height: 1.3;
    font-family: inherit;
}

.cro-before-after-subtitle {
    font-size: 15px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* Slider Container */
.cro-slider-wrapper {
    position: relative;
    margin: 0 auto 20px;
    max-width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.1);
    touch-action: pan-y pinch-zoom;
}

.cro-slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    cursor: ew-resize;
    user-select: none;
    -webkit-user-select: none;
}

.cro-slider-container img {
    display: block;
    width: 100%;
    height: auto;
    pointer-events: none;
}

.cro-slider-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.cro-slider-after img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Slider Handle */
.cro-slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #fff;
    cursor: ew-resize;
    z-index: 10;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.cro-slider-handle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
}

.cro-slider-handle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23333'%3E%3Cpath d='M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z'/%3E%3Cpath d='M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z' transform='rotate(180 12 12)'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* Labels */
.cro-slider-labels {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 5;
}

.cro-slider-label {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Drag Hint */
.cro-drag-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: #888;
    margin-bottom: 20px;
}

.cro-drag-hint svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    animation: cro-hint-bounce 1.5s ease-in-out infinite;
}

@keyframes cro-hint-bounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

/* Disclaimer */
.cro-before-after-disclaimer {
    font-size: 12px;
    color: #999;
    font-style: italic;
    margin: 0;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media (max-width: 991px) {
    .cro-before-after-section {
        max-width: 100%;
        margin: 30px 15px;
        padding: 30px 20px;
        border-radius: 16px;
    }
    
    .cro-before-after-title {
        font-size: 22px;
    }
}

@media (max-width: 767px) {
    .cro-before-after-section {
        margin: 25px 0;
        padding: 25px 0px;
        border-radius: 0;
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    }
    
    .cro-before-after-header {
        margin-bottom: 20px;
    }
    
    .cro-before-after-badge {
        font-size: 11px;
    }
    
    .cro-before-after-title {
        font-size: 20px;
    }
    
    .cro-before-after-subtitle {
        font-size: 14px;
    }
    
    .cro-slider-wrapper {
        border-radius: 12px;
        margin-bottom: 15px;
    }
    
    .cro-slider-handle::before {
        width: 38px;
        height: 38px;
    }
    
    .cro-slider-handle::after {
        width: 16px;
        height: 16px;
    }
    
    .cro-slider-label {
        padding: 5px 10px;
        font-size: 10px;
    }
    
    .cro-drag-hint {
        font-size: 12px;
        margin-bottom: 15px;
    }
    
    .cro-before-after-disclaimer {
        font-size: 11px;
    }
}

/* Active state for better touch feedback */
.cro-slider-container.cro-dragging .cro-slider-handle::before {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}
