/* Kompas Product Slider - Frontend Styles */
@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --kompas-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --kompas-ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --kompas-duration: 0.6s;
    --kompas-font: 'Josefin Sans', sans-serif;
}

/* Main Slider Container */
.kompas-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

/* Slider Track */
.kompas-slider-track {
    position: relative;
    width: 100%;
}

/* Individual Slide */
.kompas-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--kompas-duration) var(--kompas-ease),
                visibility var(--kompas-duration) var(--kompas-ease);
}

.kompas-slide:first-child {
    position: relative;
}

.kompas-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

/* Slide Inner */
.kompas-slide-inner {
    background: var(--slide-bg, #f8f9fa);
    color: var(--slide-text, #1a1a2e);
    min-height: 500px;
    display: flex;
    align-items: center;
    padding: 60px;
    transition: background 0.5s var(--kompas-ease);
    position: relative;
    overflow: hidden;
    font-family: var(--kompas-font);
}

/* Background Decorative Elements */
.kompas-slide-inner::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 40%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: floatBg 8s ease-in-out infinite;
}

.kompas-slide-inner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0,0,0,0.12) 0%, rgba(0,0,0,0.04) 40%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: floatBg 10s ease-in-out infinite reverse;
}

@keyframes floatBg {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -20px) scale(1.05); }
}

/* Decorative Shapes */
.kompas-slide-bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.kompas-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
}

.kompas-slide.active .kompas-shape {
    animation: shapeFloat 1s var(--kompas-ease) forwards;
}

.kompas-shape-1 {
    width: 120px;
    height: 120px;
    top: 15%;
    right: 20%;
    background: linear-gradient(135deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.15) 100%);
    animation-delay: 0.2s !important;
    box-shadow: 0 8px 32px rgba(255,255,255,0.2);
}

.kompas-shape-2 {
    width: 180px;
    height: 180px;
    bottom: 20%;
    right: 35%;
    background: linear-gradient(135deg, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0.08) 100%);
    animation-delay: 0.4s !important;
    box-shadow: 0 8px 32px rgba(255,255,255,0.15);
}

.kompas-shape-3 {
    width: 90px;
    height: 90px;
    top: 60%;
    left: 8%;
    background: linear-gradient(135deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.03) 100%);
    animation-delay: 0.3s !important;
}

.kompas-shape-4 {
    width: 60px;
    height: 60px;
    top: 25%;
    left: 15%;
    background: linear-gradient(135deg, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0.15) 100%);
    animation-delay: 0.5s !important;
    box-shadow: 0 4px 20px rgba(255,255,255,0.2);
}

.kompas-shape-5 {
    width: 140px;
    height: 140px;
    bottom: 15%;
    left: 25%;
    background: linear-gradient(135deg, rgba(0,0,0,0.1) 0%, transparent 100%);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation-delay: 0.35s !important;
}

@keyframes shapeFloat {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Floating animation for shapes after entry */
.kompas-slide.active .kompas-shape-1 {
    animation: shapeFloat 1s var(--kompas-ease) 0.2s forwards, gentleFloat 6s ease-in-out 1.2s infinite;
}

.kompas-slide.active .kompas-shape-2 {
    animation: shapeFloat 1s var(--kompas-ease) 0.4s forwards, gentleFloat 8s ease-in-out 1.4s infinite reverse;
}

.kompas-slide.active .kompas-shape-3 {
    animation: shapeFloat 1s var(--kompas-ease) 0.3s forwards, gentleFloat 7s ease-in-out 1.3s infinite;
}

.kompas-slide.active .kompas-shape-4 {
    animation: shapeFloat 1s var(--kompas-ease) 0.5s forwards, gentleFloat 5s ease-in-out 1.5s infinite reverse;
}

.kompas-slide.active .kompas-shape-5 {
    animation: shapeFloat 1s var(--kompas-ease) 0.35s forwards, gentleFloat 9s ease-in-out 1.35s infinite;
}

@keyframes gentleFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(5px, -10px) rotate(2deg); }
    50% { transform: translate(-5px, -5px) rotate(-1deg); }
    75% { transform: translate(8px, -8px) rotate(1deg); }
}

/* Diagonal Accent Line */
.kompas-slide-accent {
    position: absolute;
    top: 0;
    right: 30%;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.2) 30%, rgba(255,255,255,0.2) 70%, transparent 100%);
    transform: skewX(-15deg);
    pointer-events: none;
    z-index: 0;
}

@media (max-width: 768px) {
    .kompas-slide-inner {
        padding: 40px 24px;
        min-height: 600px;
    }
    
    .kompas-slide-inner::before {
        width: 300px;
        height: 300px;
        top: -10%;
        right: -15%;
    }
    
    .kompas-slide-inner::after {
        width: 250px;
        height: 250px;
    }
    
    .kompas-shape-1,
    .kompas-shape-2 {
        display: none;
    }
}

/* Content Wrapper */
.kompas-slide-content-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

@media (max-width: 968px) {
    .kompas-slide-content-wrap {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
}

/* Text Content */
.kompas-slide-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    opacity: 0;
    transform: translateY(40px);
}

.kompas-slide.active .kompas-slide-text {
    animation: slideTextIn 0.8s var(--kompas-ease-bounce) 0.2s forwards;
}

@keyframes slideTextIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 968px) {
    .kompas-slide-text {
        align-items: center;
    }
}

/* Title */
.kompas-slide-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 16px 0;
    letter-spacing: -0.02em;
    opacity: 0;
    transform: translateY(30px);
}

.kompas-slide.active .kompas-slide-title {
    animation: titleFadeIn 0.8s var(--kompas-ease-bounce) 0.3s forwards;
}

@keyframes titleFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Price Tag - Below title with more flair */
.kompas-slide-price {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 24px;
    opacity: 0;
    transform: translateY(20px);
    position: relative;
}

.kompas-slide.active .kompas-slide-price {
    animation: priceFadeIn 0.7s var(--kompas-ease-bounce) 0.4s forwards;
}

@keyframes priceFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kompas-slide-price del {
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.5;
    text-decoration: line-through;
}

.kompas-slide-price ins {
    text-decoration: none;
    position: relative;
    padding: 4px 14px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* WooCommerce amount styling */
.kompas-slide-price .woocommerce-Price-amount {
    font-weight: 800;
}

.kompas-slide-price .woocommerce-Price-currencySymbol {
    font-size: 0.75em;
    opacity: 0.8;
    margin-right: 2px;
}

/* Description - Between price and button */
.kompas-slide-desc {
    font-size: 1.125rem;
    line-height: 1.7;
    margin: 0 0 28px 0;
    max-width: 480px;
    opacity: 0;
    transform: translateY(20px);
}

.kompas-slide.active .kompas-slide-desc {
    animation: descFadeIn 0.7s var(--kompas-ease) 0.5s forwards;
}

@keyframes descFadeIn {
    to {
        opacity: 0.8;
        transform: translateY(0);
    }
}

@media (max-width: 968px) {
    .kompas-slide-desc {
        margin-left: auto;
        margin-right: auto;
    }
}

/* Button Wrapper - Ensures button is always on its own line */
.kompas-slide-btn-wrap {
    display: block;
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
}

.kompas-slide.active .kompas-slide-btn-wrap {
    animation: btnWrapFadeIn 0.6s var(--kompas-ease) 0.6s forwards;
}

@keyframes btnWrapFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button - White background with dark text */
.kompas-slide-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 36px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    color: #1a1a2e;
    background: white;
    border-radius: 100px;
    transition: all 0.3s var(--kompas-ease);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.03);
}

.kompas-slide.active .kompas-slide-btn {
    animation: none;
}

.kompas-slide-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.03) 0%, rgba(0, 0, 0, 0.08) 100%);
    transform: translateX(-100%);
    transition: transform 0.4s var(--kompas-ease);
}

.kompas-slide-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    color: #1a1a2e;
}

.kompas-slide-btn:hover::before {
    transform: translateX(0);
}

.kompas-slide-btn svg {
    transition: transform 0.3s var(--kompas-ease);
    stroke: #1a1a2e;
}

.kompas-slide-btn:hover svg {
    transform: translateX(5px);
}

/* Image */
.kompas-slide-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8) rotate(-5deg);
}

.kompas-slide.active .kompas-slide-image {
    animation: imageFadeIn 0.9s var(--kompas-ease-bounce) 0.25s forwards;
}

@keyframes imageFadeIn {
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.kompas-slide-image img {
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.2));
    transition: transform 0.5s var(--kompas-ease);
}

.kompas-slide:hover .kompas-slide-image img {
    transform: scale(1.05) translateY(-10px);
}

@media (max-width: 968px) {
    .kompas-slide-image {
        order: -1;
    }
    
    .kompas-slide-image img {
        max-height: 220px;
    }
}

/* Tablet */
@media (max-width: 768px) {
    .kompas-slide-image img {
        max-height: 180px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .kompas-slide-image img {
        max-height: 140px;
    }
}

/* Navigation - Only dots */
.kompas-slider-nav {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 12px 20px;
    background: transparent;
}

/* Nav Buttons - Hidden */
.kompas-nav-btn {
    display: none;
}

/* Dots */
.kompas-dots {
    display: flex;
    align-items: center;
    gap: 12px;
}

.kompas-dot {
    width: 12px;
    height: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s var(--kompas-ease);
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.kompas-dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.kompas-dot.active {
    background: white;
    width: 32px;
    border-radius: 100px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

/* Progress Bar - Hidden */
.kompas-slider-progress {
    display: none;
}

.kompas-progress-bar {
    display: none;
}

/* Slide Transitions - Different Effects */
.kompas-slide.slide-out-left {
    animation: slideOutLeft 0.6s var(--kompas-ease) forwards;
}

.kompas-slide.slide-in-right {
    animation: slideInRight 0.6s var(--kompas-ease) forwards;
}

.kompas-slide.slide-out-right {
    animation: slideOutRight 0.6s var(--kompas-ease) forwards;
}

.kompas-slide.slide-in-left {
    animation: slideInLeft 0.6s var(--kompas-ease) forwards;
}

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

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

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

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

/* Entry Animation for Initial Load */
.kompas-slider {
    opacity: 0;
    transform: translateY(30px);
    animation: sliderEntry 0.8s var(--kompas-ease) 0.1s forwards;
}

@keyframes sliderEntry {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover State */
.kompas-slider:hover .kompas-dot {
    background: rgba(255, 255, 255, 0.6);
}

.kompas-slider:hover .kompas-dot.active {
    background: white;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .kompas-slider-nav {
        bottom: 20px;
        padding: 8px 0px;
    }
    
    .kompas-dot {
        width: 10px;
        height: 10px;
    }
    
    .kompas-dot.active {
        width: 26px;
    }
    
    .kompas-slide-btn {
        padding: 14px 24px;
        font-size: 0.9rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .kompas-dot {
        background: rgba(255, 255, 255, 0.4);
    }
    
    .kompas-dot:hover {
        background: rgba(255, 255, 255, 0.7);
    }
    
    .kompas-dot.active {
        background: white;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .kompas-slide,
    .kompas-slide-text,
    .kompas-slide-price,
    .kompas-slide-title,
    .kompas-slide-desc,
    .kompas-slide-btn,
    .kompas-slide-image,
    .kompas-slider {
        animation: none !important;
        transition: opacity 0.3s ease !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    .kompas-slide.active .kompas-slide-text,
    .kompas-slide.active .kompas-slide-price,
    .kompas-slide.active .kompas-slide-title,
    .kompas-slide.active .kompas-slide-desc,
    .kompas-slide.active .kompas-slide-btn,
    .kompas-slide.active .kompas-slide-image {
        opacity: 1 !important;
    }
}
