/**
 * Proff Norge - Produktkarusell CSS
 * Plugin versjon med Elementor-kompatibilitet
 */

/* ===== CAROUSEL WRAPPER ===== */
.proff-carousel-wrapper {
    width: 100% !important;
}

.proff-carousel {
    position: relative !important;
    width: 100% !important;
    overflow: hidden !important;
}

/* ===== FILTER TABS ===== */
.proff-carousel__filters {
    display: flex !important;
    justify-content: center !important;
    gap: 10px !important;
    margin-bottom: 15px !important;
}

.proff-carousel__filter-btn {
    background-color: transparent !important;
    color: var(--e-global-color-primary, #002133) !important;
    border: 1px solid var(--e-global-color-primary, #002133) !important;
    padding: 12px 24px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    position: relative !important;
}

.proff-carousel__filter-btn:hover {
    background-color: rgba(0, 33, 51, 0.05) !important;
    color: var(--e-global-color-primary, #002133) !important;
}

.proff-carousel__filter-btn.is-active {
    background-color: var(--e-global-color-primary, #002133) !important;
    color: var(--e-global-color-906c8a2, #FFFFFF) !important;
    border-color: var(--e-global-color-primary, #002133) !important;
}

/* Filtered out cards */
.proff-product-card.is-filtered-out {
    display: none !important;
}

/* ===== SCROLL CONTAINER ===== */
.proff-carousel__container {
    display: flex !important;
    gap: 20px !important;
    overflow-x: auto !important;
    scroll-behavior: smooth !important;
    padding: 10px 0 20px 0 !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    -webkit-overflow-scrolling: touch !important;
}

.proff-carousel__container::-webkit-scrollbar {
    display: none !important;
}

/* ===== PRODUCT CARD ===== */
.proff-product-card {
    display: flex !important;
    flex-direction: column !important;
    width: 300px !important;
    min-width: 300px !important;
    flex-shrink: 0 !important;
    background-color: var(--e-global-color-3b898c0, #E0F4FF) !important; /* #E0F4FF - lyseblå */
    border-radius: 0 !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    text-decoration: none !important;
    color: inherit !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    cursor: pointer !important;
    position: relative !important;
    border: none !important;
    padding: 15px !important;
    gap: 15px !important;
}

.proff-product-card:hover {
    transform: scale(1.02) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
    text-decoration: none !important;
    color: inherit !important;
}

/* ===== PRODUCT TAG ===== */
.proff-product-card__tag {
    position: absolute !important;
    top: 27px !important; /* 15px card padding + 12px */
    left: 27px !important; /* 15px card padding + 12px */
    background-color: var(--e-global-color-secondary, #FF6E12) !important; /* #FF6E12 */
    color: var(--e-global-color-906c8a2, #FFFFFF) !important; /* #FFFFFF */
    padding: 5px 10px !important;
    border-radius: 0 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    z-index: 2 !important;
    line-height: 1 !important;
}

/* ===== PRODUCT IMAGE CONTAINER ===== */
.proff-product-card__image-wrapper {
    width: 100% !important;
    background-color: var(--e-global-color-906c8a2, #FFFFFF) !important; /* #FFFFFF - hvit bakgrunn */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 15px !important;
    overflow: hidden !important;
}

/* Produktbilder - standardisert høyde */
.proff-product-card__image-wrapper .produktbilde-img {
    width: 100% !important;
    max-width: 100% !important;
    height: 180px !important;
    object-fit: contain !important;
    object-position: center center !important;
}

/* ===== PRODUCT CONTENT ===== */
.proff-product-card__content {
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    gap: 8px !important;
    background-color: transparent !important;
}

.proff-product-card__title {
    margin: 0 0 8px 0 !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: var(--e-global-color-primary, #002133) !important; /* #002133 */
    line-height: 1.3 !important;
}

.proff-product-card__description {
    margin: 0 0 16px 0 !important;
    font-size: 14px !important;
    color: var(--e-global-color-text, #57666E) !important; /* #57666E */
    line-height: 1.5 !important;
    flex-grow: 1 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* ===== PRICE AND BUTTON ROW ===== */
.proff-product-card__footer {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-top: auto !important;
    gap: 12px !important;
    padding-top: 15px !important;
    border-top: 1px solid rgba(0, 33, 51, 0.1) !important;
}

.proff-product-card__price {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: var(--e-global-color-primary, #002133) !important; /* #002133 */
    white-space: nowrap !important;
}

/* Rabatt-prosent ved pris */
.proff-product-card__discount {
    background-color: rgba(255, 165, 0, 0.25) !important;  /* 25% gjennomsiktig oransje */
    color: #e67e00 !important; 
    padding: 2px 6px !important;
    border-radius: 4px !important;
    font-size: 0.8em !important;
    font-weight: bold !important;
    margin-left: 8px !important;
}

/* Knapp - bruker Elementor global button styling */
.proff-product-card__button {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    border: none !important;
}

.proff-product-card__button:hover {
    border: none !important;
}

.proff-product-card__button svg {
    flex-shrink: 0 !important;
    width: 18px !important;
    height: 16px !important;
}

/* ===== FADE OVERLAYS ===== */
.proff-carousel__fade {
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 80px !important;
    z-index: 10 !important;
    display: flex !important;
    align-items: center !important;
    transition: opacity 0.3s ease !important;
    pointer-events: none !important;
}

.proff-carousel__fade--left {
    left: 0 !important;
    background: linear-gradient(to right, rgba(255,255,255,1) 0%, rgba(255,255,255,0.9) 40%, rgba(255,255,255,0) 100%) !important;
    justify-content: flex-start !important;
    padding-left: 8px !important;
}

.proff-carousel__fade--right {
    right: 0 !important;
    background: linear-gradient(to left, rgba(255,255,255,1) 0%, rgba(255,255,255,0.9) 40%, rgba(255,255,255,0) 100%) !important;
    justify-content: flex-end !important;
    padding-right: 8px !important;
}

.proff-carousel__fade.is-hidden {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ===== NAVIGATION BUTTONS ===== */
.proff-carousel__nav-btn {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    background-color: var(--e-global-color-906c8a2, #FFFFFF) !important; /* #FFFFFF */
    border: 1px solid var(--e-global-color-3b898c0, #E0F4FF) !important; /* #E0F4FF */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--e-global-color-secondary, #FF6E12) !important; /* #FF6E12 */
    transition: all 0.2s ease !important;
    pointer-events: auto !important;
    padding: 0 !important;
}

.proff-carousel__nav-btn:hover {
    background-color: var(--e-global-color-secondary, #FF6E12) !important; /* #FF6E12 */
    color: var(--e-global-color-906c8a2, #FFFFFF) !important; /* #FFFFFF */
    border-color: var(--e-global-color-secondary, #FF6E12) !important; /* #FF6E12 */
}

.proff-carousel__nav-btn svg {
    width: 24px !important;
    height: 24px !important;
    flex-shrink: 0 !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .proff-product-card {
        width: 260px !important;
        min-width: 260px !important;
    }
    
    .proff-carousel__fade {
        width: 60px !important;
    }

    .proff-carousel__nav-btn {
        width: 36px !important;
        height: 36px !important;
    }

    .proff-carousel__nav-btn svg {
        width: 20px !important;
        height: 20px !important;
    }
}

@media (max-width: 480px) {
    .proff-product-card {
        width: 240px !important;
        min-width: 240px !important;
    }

    .proff-product-card__image-wrapper .produktbilde-img {
        height: 150px !important;
    }

    .proff-carousel__fade {
        width: 50px !important;
    }
    
    .proff-product-card__title {
        font-size: 18px !important;
    }
    
    .proff-product-card__price {
        font-size: 18px !important;
    }
}
